The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Adding a user option -- setting up conditional code
Okay. So, this is probably simple but I can't figure it out.
What I would like to do is add a new user profile option. Either a radio selection or a single check box. The option would be a toggle between two types of visual styles on the postbit_legacy. More specfically, the information displayed under the user name (avatar, join date, posts...etc). The option, which would default to the 'vb default look' could be changed so that, if the users selects the profile option, they would get a different visual style on the post bit. (A cleaner looking display of the info displayed on the left side of all posts). Now, heres where I run into issues. It could be that I am not setting my conditionals up correctly, but what I tried to do was this: In the postbit_legacy code, I would have a conditional statement similar to if <condition="$post["field70"]> If that condition is met, it would display the updated visual style. <else /> it would display the default style. Is this doable? Each time I have tried, the two "styles" were merged and displayed at once, completely destroying the look of the forum. Does this sound more like a logical coding error, perhaps my if statements are nested incorrectly or am I trying to tackle something more complicated? Any advice would be awesome! |
#2
|
||||
|
||||
Do you mean you want to give them the option to choose between the postbit and postbit_legacy?
|
#3
|
|||
|
|||
Quote:
So, the only thing that would change with this option would be the quick stats on all the posts. It's an odd project but when you cater to the wide array of opinions forums have, it's good to have simple options open. |
#4
|
||||
|
||||
$post['field70'] is already added / filled. You want to do something like this:
HTML Code:
<if condition="$post['field70'] == 1"> </if> |
#5
|
|||
|
|||
So, in other words, 1 would be in the selected state and 0 would be deselected?
|
#6
|
||||
|
||||
That's correct.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|