PDA

View Full Version : How to have a custom user field available in forum display?


Spinball
08-08-2004, 04:42 PM
Hi folks,
I'm writing a (simple) hack but need a new custom user field to be available in the FORUMDISPLAY template.
How would I do this, please?
(I looked at doing a select from the database in forumdisplay but got lost).

Colin F
08-08-2004, 05:21 PM
Do you want the field to be available on each threadbit or on the top, meaning it's associated with the viewing user?

Spinball
08-08-2004, 05:57 PM
Hi and thanks for the quick reply.
It needs to be available at the top associated with the user.
Basically I use my hack at
https://vborg.vbsupport.ru/showthread.php?t=67942
to display a news feed at the top of specific forums just below the navbar.
But after requests from my members, I want to give them the option to display the news at the top, bottom or not at all.
I have created a custom user field (field9) which has a drop-down list of these options.
Dependant upon what the value of this field is, I want to display the news at the top, bottom or not at all.
If you can help out, I will add the details to my hack (with full credit, of course) making it more useful to the vBulletin.org community.
Many thanks.

Colin F
08-08-2004, 06:05 PM
use $bbuserinfo[field9]

so you would have something like this: <if condition="$bbuserinfo[field9] == 'top'">bla</if>

and the same at the bottom.

Spinball
08-14-2004, 07:01 AM
Many thanks, that's awesome and works perfectly!