The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Need help with php
Hey, i would like to know if any one can help me add an option to the user control panel.
I would like to add an option under the Miscellaneous Options that enables or disables code i place in a template, is there someone who can assist me? |
#2
|
||||
|
||||
You don't need to mess with PHP for this in vbulletin. Create the user profile field using the user profile field manager. Once you create it note the field number. You can then referrence the field in templates using <if condition="$bbuserinfo['fieldX']">do this<else />do this</if>
If you need to refer to it in the post bit for the profile of that poster use $post['fieldX'] instead. For more information regarding user profile fields check this part of the manual: http://www.vbulletin.com/docs/html/profile |
#3
|
|||
|
|||
I'm sorry but i didn't understand you explaination. What i would like to do is is create an options fo my registered users to disable an enable the Google ads i have placed in my header.
I would also like this option to appear under the 'Edit Options' area of the User Control Panel. |
#4
|
||||
|
||||
You can do that by creating a user profile field following the instructions in the vbulletin manual linked above - then use the template conditionals I gave above in the header template
|
#5
|
|||
|
|||
Okay, how do i put this option in 'Edit Options' rather than in 'Edit Profile'. Also, how do i make the selection a dropdown menu rather than a list of options.
I do not want whether my user has enabled or disabled this option to appear in their post bit but just disable a code. Also, do i replace 'FieldX' with the name of of my new field? <if condition="$bbuserinfo['googads']">no ads<else />ads</if> or do i do this? <if condition="$bbuserinfo['enable']">ads<else />no ads</if> |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|