User Optional Thread Preview Hovertext
This modification is in the archives.
This is a remake of the similar hack by nexialys. I think doing it this way is preferrable because it requires only two small file edits and a new custom profile field, with no alteration of the core database tables, template modifications or new phrases. I originally posted this solution on his thread, but I thought it might be considered a hijack. So, here's a new thread with my way of implementing his idea.
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 name! (example: field23) Step Two Edit forumdisplay.php (In two places!) Find: PHP Code:
if ($vboptions['threadpreview'] > 0)
PHP Code:
if (($vboptions['threadpreview'] > 0) AND ($bbuserinfo['fieldXX'] == 'Yes'))
Note: Doing it this way will result in the default setting for existing users being No (an empty string, specifically), so you will have to run this query after you add this setting if you want existing users to see the hovertext by default. Don't forget to add any applicable prefix to the table name and change XX to the number of the new field you created! SQL Query: (how to run queries)
UPDATE `userfield` SET `fieldXX`='Yes' WHERE `fieldXX`=''; Download This modification is archived and cannot be downloaded. |
Similar Mods
Optional Thread Preview Hovertext | vBulletin 3.5 Add-ons |