PDA

View Full Version : Optional Thread Preview Hovertext


zetetic
06-15-2005, 10:00 PM
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:
<td class="alt1" id="td_title_$thread[realthreadid]" title="$thread[preview]">

Replace with: (changing XX to the number of your new profile field)
<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):
UPDATE `userfield` SET `fieldXX`='Yes' WHERE `fieldXX`='';


*Thanks to a hint in Michael Morris' phpinclude_start Tutorial (https://vborg.vbsupport.ru/showthread.php?t=71313)

Robert Basil
06-16-2005, 05:58 PM
Screenshot?

zetetic
06-16-2005, 06:23 PM
This just controls whether the yellow box that shows a thread preview when you hover over a thread title will appear or not. So a screenshot would just look like a normal forum index. :)

Robert Basil
06-16-2005, 06:37 PM
Ok, I understand now. I thought it was a plugin to change the look of the hover text.

Thanks.

Christine
07-09-2005, 11:09 PM
Thanks!

I had done this as a phpinclude_start on 3.0 after the members started a riot over it. Half liked it and half didn't, and in 5 years, I can't recall them ever being SO animated about something.

Thanks for sharing this -- marked as installed and will go mark it off the ToDo list. :D

Edit: You have an extra '>' at the end of your </if> :) Installed and working great.

Biker_GA
07-09-2005, 11:26 PM
For some reason, the thread info isn't showing. Still seeing the URL instead of the preview.

Christine
07-09-2005, 11:41 PM
Biker_GA -- check 2 things:

1. The field # of the additional profile field in the template
2. Your personal profile to see if you have enabled thread preview

Biker_GA
07-09-2005, 11:46 PM
Yep to both.... I'll go back and triple check.

No joy... Still just showing the URL.

Biker_GA
07-09-2005, 11:52 PM
Interesting.. This works just fine with FireFox, but does NOT work with Opera 8.01. :(

zetetic
07-10-2005, 04:31 AM
Edit: You have an extra '>' at the end of your </if>
That closes the 'td' tag. :)

Installed and working great.
Cool.

zetetic
07-10-2005, 04:32 AM
Interesting.. This works just fine with FireFox, but does NOT work with Opera 8.01.
Ah, sorry. I had only tested it on Firefox, not Opera. No idea why it wouldn't work. :(

Christine
07-10-2005, 12:54 PM
Heh. Good thing FF is forgiving on stuff like that. Bad thing that I am trying to get all of this done late at night because of a pending server move.

Will go close that tag now. :D

Biker_GA
07-10-2005, 02:43 PM
Just ran into an issue with this one.

FireFox and IE was showing the New Posts screen like this. Was showing fine in Opera, though. Once I removed the field and reverted the template, everything was back to normal.

sensimilla
07-11-2005, 09:41 AM
thanks will give it a try

The Wise One
10-06-2005, 08:14 PM
works great with 3.5.0...thanks.

*installed

S@NL - BlackBik
01-16-2006, 04:34 PM
It came up on our forum and this hack gives people a choice.
Works and thank you.

*Installed*

S@NL - BlackBik
04-08-2009, 07:09 PM
Stil works on 3.8.2 :)