Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Advert Management Details »»
Advert Management
Version: 1.00, by Scott MacVicar Scott MacVicar is offline
Developer Last Online: Mar 2016 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 05-25-2002 Last Update: Never Installs: 47
 
No support by the author.

This is a script to allow you to manage the adverts on your forums, you can have any sort of advert you can imagine there is no actual limit with this hack to what it can be, javascript, flash, image, text and images.

You add adverts to a category or a forum or the whole board. If the category has child forums they will inherit the adverts as well as their own adverts if they have any.
Adverts can have a set exposure such as 10,000 views and once it has reached that it will stop.

It fills a variable called $advert which you just place in any template, such as the header, you can also use variables and replacements within the adverts, such as $bbuserinfo[userid] for the persons userid in a link within an advert.

Updated June 9th at 19:44 GMT

Added date limits and options for unlimited exposures.
To upgrade from an older version, reapply code in global.php, upload ads.php and run this sql query to alter the ads table you made.

[sql]ALTER TABLE `ads` ADD `time` INT(10) DEFAULT '0' NOT NULL;[/sql]

[sql]ALTER TABLE `ads` ADD `wholeforum` SMALLINT(1) DEFAULT '0' NOT NULL;[/sql]
If you already run that query though are still experiencing problems with the time always being January 1st run

[sql]ALTER TABLE `ads` CHANGE `time` `time` INT(10) DEFAULT '0' NOT NULL[/sql]

New features include showing the advert on the entire forum by using a radio button, some highlighting in the admin panel, italic name indicates the time period has ended and a bold name means the advert has met its quota for exposures.

You must chance RAND() to RAND(NOW()) if you have mysql 3.23.52 or above

Scott

Show Your Support

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

Comments
  #12  
Old 05-26-2002, 07:37 PM
Parker Clack Parker Clack is offline
 
Join Date: Oct 2001
Posts: 351
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PPN:

Ok, I will see what you do. Thanks.

I added another row so that the actual banner would show up too.

Below the last </tr> I added

echo "<tr>";
echo "<td colspan='4' align='center'>$ads[advert]</td>";
echo "</tr>";

and I added the ability to reset the count on the advert to zero if you wanted by adding

// ###################### Start Reset #######################
if ($action=="reset") {

doformheader("ads","zero");
makehiddencode("adid",$adid);
maketableheader("Confirm reset");
makedescription("Are you sure you want to reset this advert");
doformfooter("Yes","",2,"No");

}

// ###################### Start Kill #######################
if ($HTTP_POST_VARS['action']=="zero") {

$ad = $DB_site->query("SELECT name FROM ads WHERE adid='$adid'");
$DB_site->query("UPDATE ads SET exposed=0 WHERE adid='$adid'");
echo "<p>Advert $ad[name] has been reset</p>";
$action="list";

}

and just link to reset.

Thanks again for a great hack. This is something that I thought should have been included with vBulletin from the start.

Parker
Reply With Quote
  #13  
Old 05-26-2002, 08:18 PM
scsa20's Avatar
scsa20 scsa20 is offline
 
Join Date: Mar 2002
Location: Mars
Posts: 458
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by PPN
Em its an advert

http://www.dictionary.com/search?q=advertisement
lol, dictionary.com, the only place where I go to for defantions
Reply With Quote
  #14  
Old 05-26-2002, 08:51 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep but that can cause problems showing the ad if it has alot of ads or if its javascript with \ in it as it would be stripped and could cause problems.
The reset thing i'll add to the release then.
Reply With Quote
  #15  
Old 05-26-2002, 09:08 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Uploads ads.php from the zip again to get the reset feature working on your board, you can use this to reset your ad hits to start exposures at 0 again.
Reply With Quote
  #16  
Old 05-26-2002, 09:57 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

advert eh? you're the first person I have met abbreviate advertisements into advert, instead of plainly referring to it as an ad.

nonetheless, excellent hack
Reply With Quote
  #17  
Old 05-27-2002, 12:33 AM
Sparkz's Avatar
Sparkz Sparkz is offline
 
Join Date: Nov 2001
Posts: 544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If that is the case, you need to get out more, Velocd :P

I think advert occurs pretty commonly...
Reply With Quote
  #18  
Old 05-27-2002, 02:57 AM
duke duke is offline
 
Join Date: Dec 2001
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a great

sugestion
1. what if you want to have two different rotatons one at top and obe at bottom you would need to variable's is that a posability to add.

2. there should be a way to set the banner to unlimited exposers

3. rotate the ad in all or one forum to beable to choose two or three forums right now it is a little limited to all of one catagory or one forum
Reply With Quote
  #19  
Old 05-27-2002, 05:45 AM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would you post a pic of what it looks like from the users end?
Reply With Quote
  #20  
Old 05-27-2002, 10:43 AM
Parker Clack Parker Clack is offline
 
Join Date: Oct 2001
Posts: 351
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

neo:

The upper right hand banner is what the enduser will see.
Reply With Quote
  #21  
Old 05-27-2002, 11:36 AM
Floris Floris is offline
 
Join Date: Jan 2002
Posts: 1,898
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It works very nice I expected to find instructions for many files, but this was very quick and easy. Great hack!

One little tweak me and my users want, is to exclude the showthread and postreply pages. Or at least an option for the admin to also show on those pages, or not.

Another little tweak is the option to show certain banners for unlimited time.
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 08:26 PM.


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.05083 seconds
  • Memory Usage 2,307KB
  • Queries Executed 25 (?)
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_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
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete