View Full Version : User selectable thread preview
ND4SPD
09-04-2008, 02:24 PM
I'm trying to create an option to enable users to turn off thread preview in their UserCP while leaving it on globally. I've created the User Profile field but not sure how to make it work in the background.
Any help is appreciated!
Thanks!
Opserty
09-04-2008, 03:38 PM
Which "Preview" are you referring to? The one that appears when you are creating a new thread or the one that appears when you hover over a thread title (on forumdisplay.php)?
ND4SPD
09-04-2008, 04:33 PM
The one that appears when you hover over a thread title.
Opserty
09-04-2008, 06:17 PM
Edit the threadbit template.
Look for:
<td class="alt1" id="td_threadtitle_$thread[realthreadid]" title="$thread[preview]">Replace it with:
<td class="alt1" id="td_threadtitle_$thread[realthreadid]" <if condition="$bbuserinfo['fieldX']">title="$thread[preview]"</if>>
Change the "X" to the custom profile field id number.
ND4SPD
09-04-2008, 06:55 PM
Hmm, doesn't appear to work. Does it matter what order I have the options in the custom profile field set? I have Enable and then Disable second with Enable being default.
Thanks for your help by the way!
Opserty
09-06-2008, 09:28 PM
What kind of field is it?
What do you mean by it doesn't work? What happens? Do they all go off or do they all stay on or?
ND4SPD
09-07-2008, 07:13 PM
It's a radio button. It doesn't work as in it leaves thread preview on for all the threads.
Opserty
09-07-2008, 07:33 PM
What are the values for the options?
<td class="alt1" id="td_threadtitle_$thread[realthreadid]" <if condition="$bbuserinfo['fieldX'] == 'Yes'">title="$thread[preview]"</if>>
Add the bit in green. You might need to change "Yes" to the value you've set for the 'on' option so to speak.
ND4SPD
09-07-2008, 10:38 PM
I had Enable / Disable
This is what I have in there - it still leaves the setting on even if I disable it.
<td class="alt1" id="td_threadtitle_$thread[realthreadid]" <if condition="$bbuserinfo['field12'] == 'Enable' ">title="$thread[preview]"</if>>
Opserty
09-07-2008, 10:54 PM
Try double checking the setting because if it wasn't going to work it wouldn't normally show anything. Make sure you are doing it to the right style and browsing in that style.
If it doesn't work then I guess you'll need to wait for someone to make a proper mod. ;)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.