View Full Version : About Disable / Enable Code
3amalah
01-03-2011, 10:40 AM
Hello I Have A Question Plz
I Have An Html Code Lets Say
<Center>vBulletin</Center>
I Put It In Navbar Template
So It Show (( vBulletin ))
I Need The Ability To Make Users Disable / Enable The Show Of This Code
From The Usercp Panel
I think you might find what you need in the vb manual here: http://www.vbulletin.com/docs/html?manualversion=30806601
Go to the section called "Custom Profile Fields"
3amalah
01-04-2011, 11:26 AM
Yeah I Know How To make Custom Profile I Mean What Is The Code Or Hook
That Give The User Permission To Enable/Disable Some Ads In Header For Example
From There Profile
OK. For example if you add a radio button custom profile field with 'Enabled' and 'Disabled' as the options and it's field11, then you could do this:
<if condition="$bbuserinfo['field11'] == 'Enabled'>
// put ad code here
</if>
3amalah
01-07-2011, 04:11 PM
mmmm Let Me Explain More
Now I Have Marquee Ads In My Forum Header
It Show The Last Topics
Games , Software , Movies ( For Example )
How Can I Make The User Open His Ucercp And Enable / Disable This Ads
Lets Say That The Ad Code Is This
<img src="vBulletin.Jpg" alt ="" />
What Should I Do To Make The User Able To Enable / Disable
Well, you said above that you know how to add a custom profile field, but maybe you misunderstood and thought I meant customizing the profile. If you look at the link I posted above, it shows you how to add an option to the usercp. Please look at it before you decide you already know how to do it, to make sure we are talking about the same thing. (ETA: Here's another link directly to the page I'm talking about: http://www.vbulletin.com/docs/html/main/profile_add)
Once you've added the custom profile field, you should be able to put your code inside an "if" like the example I posted.
Of course it's also possible that I don't uderstand what you're asking, in which case maybe someone else can help you. :)
Digital Jedi
01-10-2011, 05:39 AM
That sounds to me like what he's saying. You want ads that users can opt out of. That's how you'd do it.
3amalah
01-13-2011, 03:12 PM
Well, you said above that you know how to add a custom profile field, but maybe you misunderstood and thought I meant customizing the profile. If you look at the link I posted above, it shows you how to add an option to the usercp. Please look at it before you decide you already know how to do it, to make sure we are talking about the same thing. (ETA: Here's another link directly to the page I'm talking about: http://www.vbulletin.com/docs/html/main/profile_add)
Once you've added the custom profile field, you should be able to put your code inside an "if" like the example I posted.
Of course it's also possible that I don't Uderstand what you're asking, in which case maybe someone else can help you. :)
Hello Mate I Appreciate Your Reply Really And Thank u So Much For It
I need U To Know That I Created 12 Custom Fields In My Forum So I Know How To Make it
But I Need To Ask About Something Else I Will Give U Example
I Have Advertisement Code In My Header Contain 12 Banner Ok ?
How Can I Make The User Able To Disable The Show Of This Banners From His Usercp ?
Did You Got What I Need ?
And Sorry If I Miss Understood Something
That sounds to me like what he's saying. You want ads that users can opt out of. That's how you'd do it.
mmm Thank U For Reply See My Upper Post It Contain The Full Example I Need
I need U To Know That I Created 12 Custom Fields In My Forum So I Know How To Make it
OK. Sorry, it's just that, if you know how to make a custom field then I don't see what the problem is - make a custom field with radio buttons (or a checkbox), then put a conditional in the template to check it.
Digital Jedi
01-13-2011, 09:43 PM
Hello Mate I Appreciate Your Reply Really And Thank u So Much For It
I need U To Know That I Created 12 Custom Fields In My Forum So I Know How To Make it
But I Need To Ask About Something Else I Will Give U Example
I Have Advertisement Code In My Header Contain 12 Banner Ok ?
How Can I Make The User Able To Disable The Show Of This Banners From His Usercp ?
Did You Got What I Need ?
And Sorry If I Miss Understood Something
mmm Thank U For Reply See My Upper Post It Contain The Full Example I Need
I'm sorry if we're misunderstanding you, but it doesn't seem like you're asking anything different than before.
You create a Yes/No custom profile field, then put your banner code inside the condition kh99 showed you, where field11 is the ID number of your custom field. That's how you create a banner that user's can turn on and off in their User CP. You can do this for multiple banners on the page and can customize it to use just one Yes/No field, or multiple Yes/No fields.
3amalah
01-24-2011, 02:28 PM
mm Iam Sorry I Think U R Right And I Was Miss Understanding
I Will Test Your Solution Right Now And Thanks So Much For Helping Me
--------------- Added 1295896381 at 1295896381 ---------------
Good I Made A Custom Field With Yes / No Choose
Whats The Condition Code That I Should Put In Template
If ( Yes ) Else ( No )
Plz Write The Code For Me In vBulletin 4 Not 3
--------------- Added 1295897483 at 1295897483 ---------------
Thanks Found It Here Thank U
https://vborg.vbsupport.ru/showpost.php?p=2149557&postcount=2
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.