Version: 1.00, by Scott MacVicar
Developer Last Online: Mar 2016
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
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.
OK, I have run the MySQL command via PHPMyAdmin. In order to run the comman, I had to remove the apostrophy marks (').
Here is the result I got:
PHP Code:
Your SQL-query has been executed successfully
SQL-query :
CREATE TABLE ads(
adid smallint(5) NOT NULL auto_increment,
name varchar(25) NOT NULL default '',
forumid smallint(5) NOT NULL default 0,
wholeforum smallint(1) NOT NULL default 0,
exposed smallint(10) NOT NULL default 0,
exposures smallint(10) NOT NULL default 0,
time int(10) NOT NULL default 0,
advert text NOT NULL,
KEY adid (adid)
)
I have edited the /forums/admin/index.php file and all the admin features seem to be working. I can create ads and modify them.
When I ad the code to global.php and upload the modified file, I get a MySQL error:
PHP Code:
Database error in vBulletin 2.2.6:
Invalid SQL: SELECT * FROM ads WHERE wholeforum='1' AND time>=1024693619 AND (exposed<=exposures OR exposures=0) ORDER BY RAND()
mysql error: You have an error in your SQL syntax near 'RAND()' at line 1
mysql error number: 1064
Date: Friday 21st of June 2002 03:06:59 PM
Script: [url]http://www.airstreamforums.com/forums/forums/index.php?s=[/url]
Referer: [url]http://www.airstreamforums.com/forums/online.php?s=[/url]
I have reverted back to the original gloabl.php for now.
Hey PPN, just wanted to let you know, i found a bug.
i have mine set to unlimited exposures...but the exposure count for all adverts only went to 32767 for Houston, Austin, and Dallas, and will not go any higher....so the counter has a bug somewhere....