View Full Version : An on/off switch for a variable in a template
dutchbb
09-02-2007, 09:22 AM
Hello, I've got a variable in the forumhome template that I want users to be able to switch on/off in the usercp.
How can I do this?
Paul M
09-02-2007, 09:27 AM
Create a custom userfield in the ACP and use that in your template.
dutchbb
09-02-2007, 10:17 AM
Can you tell me how the statement around the var would look? Thank you.
Dismounted
09-02-2007, 10:59 AM
<if condition="$bbuserinfo['fieldX']">
Where X is the field number.
dutchbb
09-02-2007, 11:39 AM
Thanks, works!
dutchbb
09-04-2007, 11:41 AM
Just one more question: how can I make it checked by default?
Dismounted
09-04-2007, 11:57 AM
There should be a setting when creating the field (I think).
dutchbb
09-07-2007, 11:58 AM
Hm I can't find it...
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.