The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to make a simple 'option'
Hey all.
Say I make a really simply template change that I want to be optional. ( the case in question, I want users to be able to choose to have the forum catergory icons on or off ) Currently I've done this in a rather messy way, having one skin set with the forum catergory icons, each skin set with a child skin with the mod to remove those icons. Now surely I should be able to stick a yes/no choice in somewhere, say on the user optionsm say in the visible post elements section of the usercp: /forum/profile.php?do=editoptions Quote:
|
#2
|
|||
|
|||
In your template, use a conditional:
HTML Code:
<if condition="$bbuserinfo['fieldn']"> <!-- code if "Show forum category icons" is checked --> </if> |
#3
|
|||
|
|||
^ ^
okay, that makes sense, thanks. But how do I then add the necessary line of code to allow user selection of that choice? |
#4
|
|||
|
|||
It does it automaticly when adding a new field
|
#5
|
|||
|
|||
Sorry, I'm still not following. I do understand you stick the if statement around the code in question.
Where do the options for user selection then become avalible? |
#6
|
|||
|
|||
Sorry for bumping this up, but this seems such an easy thing to do... yet I'm lost
|
#7
|
|||
|
|||
Really sorry for bumping my thread yet again, but I wrapped a conditional around my statement and did -not- find an option suddenly appear? What on earth am I doing wrong?
|
#8
|
|||
|
|||
You must add a profile field (via the admin cp) so the user can have the option to select. That's the fieldn that filburt referred to.
|
#9
|
|||
|
|||
oooh, I will give it a go...
|
#10
|
|||
|
|||
Is this valid code then?
Code:
<if condition="$bbuserinfo['field15']"> <!-- code if "Show forum category icons" is checked --> </if> <if condition!="$bbuserinfo['field15']"> <!-- code if "Show forum category icons" isn't checked --> </if> Cause I'm getting a parse error |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|