Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-03-2011, 10:40 AM
3amalah 3amalah is offline
 
Join Date: Nov 2010
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default About Disable / Enable Code

Hello I Have A Question Plz

I Have An Html Code Lets Say

HTML Code:
<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
Reply With Quote
  #2  
Old 01-03-2011, 01:06 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think you might find what you need in the vb manual here: http://www.vbulletin.com/docs/html?m...rsion=30806601

Go to the section called "Custom Profile Fields"
Reply With Quote
  #3  
Old 01-04-2011, 11:26 AM
3amalah 3amalah is offline
 
Join Date: Nov 2010
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 01-04-2011, 02:20 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:

Code:
<if condition="$bbuserinfo['field11'] == 'Enabled'>
// put ad code here
</if>
Reply With Quote
  #5  
Old 01-07-2011, 04:11 PM
3amalah 3amalah is offline
 
Join Date: Nov 2010
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 01-07-2011, 07:50 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 01-10-2011, 05:39 AM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 01-13-2011, 03:12 PM
3amalah 3amalah is offline
 
Join Date: Nov 2010
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
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

Quote:
Originally Posted by Digital Jedi View Post
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
Reply With Quote
  #9  
Old 01-13-2011, 03:31 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by 3amalah View Post
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.
Reply With Quote
  #10  
Old 01-13-2011, 09:43 PM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by 3amalah View Post
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:47 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04690 seconds
  • Memory Usage 2,261KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_html
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete