Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
User Optional Thread Preview Hovertext Details »»
User Optional Thread Preview Hovertext
Version: 1.00, by zetetic zetetic is offline
Developer Last Online: May 2015 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 06-07-2005 Last Update: Never Installs: 3
 
No support by the author.

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
Replace with (Changing fieldXX to the name of the new field you created in step one!):

PHP Code:
if (($vboptions['threadpreview'] > 0) AND ($bbuserinfo['fieldXX'] == 'Yes')) 
Save and upload forumdisplay.php and that's it!

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]UPDATE `userfield` SET `fieldXX`='Yes' WHERE `fieldXX`='';[/sql]

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 06-08-2005, 05:25 PM
nexialys
Guest
 
Posts: n/a
Default

... this no hijack...

thanks to release it..
Reply With Quote
  #3  
Old 06-08-2005, 08:34 PM
zetetic's Avatar
zetetic zetetic is offline
 
Join Date: Apr 2004
Posts: 338
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nexialys
... this no hijack...

thanks to release it..
I'm glad you approve.
Reply With Quote
  #4  
Old 07-18-2005, 11:04 AM
woodysfj40 woodysfj40 is offline
 
Join Date: Jun 2004
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the "threadpreview" PHP code also appears in the Search.php file, and can additionally be changed there.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:01 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08004 seconds
  • Memory Usage 2,229KB
  • Queries Executed 17 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete