Back to vBulletin 3.5 Add-ons

Optional Thread Preview Hovertext
Mod Version: 1.00, by zetetic

This modification is in the archives.
vB Version: 3.5.4 Rating: (0 vote - 0 average) Installs: 14
Released: 16 Jun 2005 Last Update: 16 Jun 2005 Downloads: 10
Not Supported Template Edits  

There are at least two other hacks around here explaining how to do this in 3.0.x (one I posted), and this 3.5 version isn't much different, but I recently discovered* that both of the old ones involve an unnecessary file edit so this is probably a better choice. It's technically a mini-mod since there are no file edits and it's not a plug-in, but until there's a mini-mod forum for 3.5 I guess this is the logical forum to put it in.

Step One

Go into the ACP

Select User Profile Field Manager from the left menu.

Select Add New User Profile Field

Profile Field Type --> Single-Selection Radio Buttons

Title: Display Thread Preview
Description: Select whether to display a thread preview when hovering over the title.
Options: Yes No (separated by a carriage return)
Set Default: Yes
Display Order: Leave at default
Field Required: Yes (if you want the option to appear at registration, otherwise No)
Field Editable by User: Yes
Private Field: Yes
Field Searchable on Members List: No
Show on Members List: No

Leave the Optional Input section as it is.

Which page displays this option?: Options: Thread Viewing

Click Save, make a note of the new field number! (example: field23)

Step Two

In the threadbit template, find:
HTML Code:
<td class="alt1" id="td_title_$thread[realthreadid]" title="$thread[preview]">
Replace with: (changing XX to the number of your new profile field)
HTML Code:
<td class="alt1" id="td_title_$thread[realthreadid]" <if condition="($vbulletin->userinfo['fieldXX'] == 'Yes')">title="$thread[preview]"<else />title=""</if>>
That's it!

Note: If you install this on a populated forum and you had thread previews ON by default, you will need to run this query to ensure that it remains on for all your current members (changing XX to the number of your new profile field and adding your own table prefix if applicable):
SQL Query: (https://www.vbulletin.com/docs/html/maintenance_query" target="new">how to run queries)
UPDATE `userfield` SET `fieldXX`='Yes' WHERE `fieldXX`='';


*Thanks to a hint in Michael Morris' Using PHPINCLUDE_START. (Last Lesson - #7 - Added 12-16-4)
vBulletin 3.6 Template Modifications
User Optional Thread Preview Hovertext vBulletin 3.0 Full Releases

vblts.ru supports vBulletin®, 2022-2024