The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
How to turn code on/off over UserCP?
Hello folks,
a little question of mine, how can i set up a profile field to let the users turn on/off a special feature (ads between the posts). I did a new profile filed, and set the following code in front of the ad-code, but i dont know how to get on ... Code:
if ($vbulletin->userinfo['field6'] == 'Off') { |
#2
|
||||
|
||||
PHP Code:
Like that? |
#3
|
||||
|
||||
Doesn't work. Anybody out there
Code:
if ($vbulletin->userinfo['field6'] == 'On') { <if condition="$GLOBALS['adsense_position'] == $post['postcount']"> $spacer_open <div style="padding:0px 0px $stylevar[cellpadding]px 0px"> <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <td class="thead" align="left">Sponsored Links</td> </tr> <tr> <td class="alt1" align="center"> <!-- Werbung --> </td> </tr> </table> </div> $spacer_close </if> } |
#4
|
||||
|
||||
Use <if> if you are doing it in the templates.
HTML Code:
<if condition="$vbulletin->userinfo['field6'] == 'On'"> your ad code here </if> |
#5
|
||||
|
||||
Thanks Aj it works. Now it logical, (me ) look at the first if-condition and then at the second, whats wrong
Often the answer is in front of you....... |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|