UBB.threads user selectable tooltip preferences

From what I’ve seen, the naysayers win in most cases and it ends up with the forum turning off the option entirely. Whoever wants it, just can’t get it. Matter of fact, this is the case over at Ubb.central right now ( I posted the solution there as well ).

It’s turned off for whatever reason.

So, that leads me to this post and the first modification to stock UBB.threads 7.5.6. This post will walk you through what you need to do in order to give the users the option to have it or not by editing their profile and choosing which they prefer.

Step 1:

Go into Registration settings / Registration screen and set the Custom field prompt ( example picture below ) to something meaningful:

When saved, this will add an extra field to the user profile screen that allows them to show the Tooltip ( 1 ) or to not show it ( 0 ).

Step 2:

Enable tooltips globally for the forum. In other words, it will be turned on by default. This is done in Display Options, General and is pictured below:

Step 3:

Open up the file ‘scripts/postlist.inc.php’ and make 2 small changes. This will essentially look at the user profile setting and enable tooltips or not.



Change to:


Then find:

$postrow[$z]['tooltip'] = "";
if ($config['TOOLTIP_LENGTH'] && $config['TOOLTIP_LENGTH'] > 0) {

and change to:

$postrow[$z]['tooltip'] = "";
if ($config['TOOLTIP_LENGTH'] && $config['TOOLTIP_LENGTH'] > 0
                                              && $user['USER_EXTRA_FIELD_1'] == '1') {

Step 4:

Tell your forum members about it or better yet, link to this post! :hihi:

That’s it!

3 Responses to “UBB.threads user selectable tooltip preferences”

  1. Okay I forgot.
    I know I asked before.
    If I enable this the default is null.
    Meaning it is off.
    What do I add to enable the tooltip if the field is null not 0 or 1?

  2. I figured it out.
    Change ==

  3. Oh, had to make it != ‘0’
    Not == ‘1’