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
  #22  
Old 05-27-2002, 11:58 AM
Jeremy W. Jeremy W. is offline
 
Join Date: May 2002
Posts: 91
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So, does this do rotations if there are more then one ad for a certain forum?
Reply With Quote
  #23  
Old 05-27-2002, 12:19 PM
Parker Clack Parker Clack is offline
 
Join Date: Oct 2001
Posts: 351
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Jeremy:

Yes as long as you have them in the same forum they will show up together. You chose the forum(s) that you want the banner(s) to show up in. So you can have multiple banners for a single forum.

PPN:

I did notice though if you have more than one banner for a forum though it will create multiple of the banners. Say I put in banner1 and banner2 to show up in forum1. When I go back to the admin for the banners I will see three banner1s show up and 1 banner2. Now if I go back and delete the extra banner1s they will not show up again but when you first add them they are often times multiples.

Parker
Reply With Quote
  #24  
Old 05-27-2002, 12:28 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will test it now, this shouldn't really happen as there is only one query. Does it appear 3 times when you add banner1 or does it only appear 3 times when you after you add banner2?

xiphoid: to exclude pages you have to start doing more checking, what files are you wanting to exclude? Tell me and i'll try and get the code done to do it.
Reply With Quote
  #25  
Old 05-27-2002, 12:51 PM
Floris Floris is offline
 
Join Date: Jan 2002
Posts: 1,898
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

showthread.php (maybe) We are still discussing this

but at least:
newthread.php
newreply.php
editpost.php
report.php
postings.php
Reply With Quote
  #26  
Old 05-27-2002, 01:19 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not many files then

You'll need to add this code below

PHP Code:
eval("\$advert = trim("".str_replace("\'""'"addslashes($advert['advert']))."");"); 
PHP Code:
if (substr($PHP_SELF,-strlen('newthread.php'))=='newthread.php' or substr($PHP_SELF,-strlen('newreply.php'))=='newreply.php' or substr($PHP_SELF,-strlen('editpost.php'))=='editpost.php' or substr($PHP_SELF,-strlen('report.php'))=='report.php' or substr($PHP_SELF,-strlen('postings.php'))=='postings.php') {
  
$advert='';

Reply With Quote
  #27  
Old 05-27-2002, 01:46 PM
Floris Floris is offline
 
Join Date: Jan 2002
Posts: 1,898
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You the man
(and firefly ofcourse)

I will tweak it now (global.php I assume)

[update]
Yep, global.php and it works perfectly !!
Reply With Quote
  #28  
Old 05-27-2002, 02:43 PM
Sparkz's Avatar
Sparkz Sparkz is offline
 
Join Date: Nov 2001
Posts: 544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am pretty sure I am a man too.
/me checks between his legs...

Yup, definitely a man...
Reply With Quote
  #29  
Old 05-27-2002, 04:53 PM
Parker Clack Parker Clack is offline
 
Join Date: Oct 2001
Posts: 351
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PPN:

It happens after I add the second banner. The first one will get tripled.

I also noticed that the move function doesn't work with having the $advert array in global.php. Somehow it messes with postings.php and the move function thinks that you are trying to move it back to the same forumid. If I put the code in forumdisplay.php and showthread.php it works as I want it.

Would putting the check that you have written above resolve the issue with postings.php?

Thanks,
Parker
Reply With Quote
  #30  
Old 05-27-2002, 06:19 PM
Henry-RS's Avatar
Henry-RS Henry-RS is offline
 
Join Date: Mar 2002
Location: Chicago
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I installed this without a problem, but there doesn't seem to be a feature that rotates the banners if you add two different ones to one specific forum, using the one "$advert" variable.

How can I make them rotate, by picking random banners that were assigned to that area?
Reply With Quote
  #31  
Old 05-27-2002, 06:31 PM
Parker Clack Parker Clack is offline
 
Join Date: Oct 2001
Posts: 351
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Henry:

If you put more than one banner for a forum the script will randomly pick the banner to display out of the ones that you have assigned to that forum area. From what I have experienced they are about one a one to one footing. Your mileage may vary.

Parker
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 06:20 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.04932 seconds
  • Memory Usage 2,310KB
  • 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
  • (2)bbcode_php
  • (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
  • (4)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