Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by James Cridland James Cridland is offline
Developer Last Online: Mar 2022 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 02-23-2002 Last Update: Never Installs: 0
 
No support by the author.

I loathe and detest ad banners.

But when you run a board where 50% 'unregistered users' use it, and you want to increase the amount of users you have registered, it might be worth experimenting with an ad banner for unregistered users only.

Enclosed is the code to do that: it's modifying two templates.


This is v2 of the code, with the following enhancements:
- Hide ad banners for users who have donated
- Bug fix: I didn't close the 'normalfont' tag!
- Force users to both register AND verify e-mail addresses

Plus, enhanced information for users, following feedback here


Good sources of ad banners are www.valueclick.com and www.advertwizard.com

Download Now

File Type: (21.4 KB, 354 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 06-09-2002, 02:21 PM
James Cridland James Cridland is offline
 
Join Date: Nov 2001
Location: London, UK
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by SaintDog
Could this be modified to where only those that have made a donation can have the ads removed? I know you would have to manually add them to a usergroup if I wanted to do this, but that would be fine.
Yes, this is quite easy.

Change the line that says
if ($bbuserinfo['userid']<"1") {
to say
if ($bbuserinfo['usergroupid']!="13") {

...where '13' is the usergroup you've added called something like "Contributing Members".

This will then show ads for everyone EXCEPT contributing members.

Quote:
I added a usergroup call Contributing Members, but I am not sure of the # it is, such as an admin has a set usergroup number, as do mods, and super mods (I have not added any other usergroups).
The way I do it...

Click on "User Groups - Modify" in your control panel.
Hold your mouse over the edit link for the 'Contributing Members' group
...look at the end of that URL, where it'll say something like usergroupid=13.
That means 13 is the number.


BTW, this all works fine in v2.2.6.
Reply With Quote
  #23  
Old 06-11-2002, 01:50 AM
Andy R's Avatar
Andy R Andy R is offline
 
Join Date: Feb 2002
Location: Traveling...
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What about having unregistered members having the largest banner, regular members having a smaller text link & contributing members have no ads.

Thanks,

Andy
Reply With Quote
  #24  
Old 06-11-2002, 12:05 PM
danrak danrak is offline
 
Join Date: Dec 2001
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This may be simple but I'm still learning PHP. Anyway, is there a way to add multiable groups? For example, I would prerfer my mentors and moderators not to see the ads since they help out.

BTW, this is a great hack, thanks.
Reply With Quote
  #25  
Old 06-11-2002, 05:56 PM
James Cridland James Cridland is offline
 
Join Date: Nov 2001
Location: London, UK
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's very easy to modify, this hack.

For a "ad banner for unreg / text ad for registered / no ad for donated" then...
PHP Code:
    if ($bbuserinfo['userid']<"1") {
    
$adcode="your ad banner for unregistered users";
    }
    elseif (
$bbuserinfo['usergroupid']=="13") {
    
$adcode="(no ad banner)";
    }
    else {
    
$adcode="your text ad";
    } 
You need to know the category number for your user group of people who have donated - I've used 13 here. Skim further up the thread to find out how this is done.

I'm running a much more complicated version of this hack, which rotates ad banners. One day I might document that, if anyone's interested.


Quote:
Originally posted by danrak
This may be simple but I'm still learning PHP. Anyway, is there a way to add multiable groups? For example, I would prerfer my mentors and moderators not to see the ads since they help out.
PHP is really easy(ish).

$bbuserinfo['userid'] is the user number, and will always be "0" (or not exist) if the user isn't registered.

$bbuserinfo['usergroupid'] is the group that the user is in.

if ($bbuserinfo['usergroupid']=="5") {echo "Hello world";} will do the thing in curly brackets - print "Hello world" in this example - if the usergroupid = 5.

if ($bbuserinfo['usergroupid']!="5") {echo "Hello world";} will do the thing in curly brackets if the usergroupid is NOT 5.

if ($bbuserinfo['usergroupid']>="5") {echo "Hello world";} will do the thing in curly brackets if the usergroupid is 5 OR LARGER.

and if ($bbuserinfo['usergroupid']=="5") {echo "Hello world";}else {echo "Goodbye world";} will only print "Hello world" if the usergroupid is 5 (as above), but will print "Goodbye world" if the usergroupid is anything else.

Does that help work out how you'd show one thing to one user group and another thing to another? Hope so.
Reply With Quote
  #26  
Old 06-11-2002, 07:04 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just a quick Q...

Why is this in Template Moficiations???

Satan
Reply With Quote
  #27  
Old 06-11-2002, 07:11 PM
James Cridland James Cridland is offline
 
Join Date: Nov 2001
Location: London, UK
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Because it's a modification of the php_include template.
Reply With Quote
  #28  
Old 06-11-2002, 10:41 PM
Andy R's Avatar
Andy R Andy R is offline
 
Join Date: Feb 2002
Location: Traveling...
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Especially for adding the limited tutorial at the end! That really helps those of us who are learning and starting from ground zero.
Reply With Quote
  #29  
Old 06-15-2002, 03:44 PM
MrBojangle1's Avatar
MrBojangle1 MrBojangle1 is offline
 
Join Date: Mar 2002
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am quite confused on how to sign up for ads and picking that stuff. Any help would be appreciated if you can help me with the two ad places in first post contact me on AIM SSJ4Gohan354
Reply With Quote
  #30  
Old 06-22-2002, 02:31 AM
funflyer funflyer is offline
 
Join Date: Jun 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I need a way placing rotating banners on my forums. Is there any code or a site where I can how to put banners on my site? I want to have multi banners so each time the person refreshes the page the banner will change and is there any way of keeping track of all the stats so I could tell how many hits, and times it has been showed. Somebody told me about phpadds, Annybody use this?

Here the links, once you create and add banners how do you get them in your templates??

http://sourceforge.net/projects/phpadsnew/
Reply With Quote
  #31  
Old 06-22-2002, 04:49 AM
thehobbyforum's Avatar
thehobbyforum thehobbyforum is offline
 
Join Date: Mar 2002
Location: Los Angeles
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You have to add the place the addclick code to the template where you want it to show - in the admin section of phpadsnew if will give you the banner invocation script - you then take that and place it in the template of you choice - mine is in the header template of my forums - that way it will show up automatically on all pages of the forum
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 09:57 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05035 seconds
  • Memory Usage 2,337KB
  • Queries Executed 26 (?)
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)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete