![]() |
Advert Management
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 |
And before someone asks for a screenshot.
|
this is awesome :) what about exposure that have no limits?
|
oh god, he comes hack of the month ;)
|
whats an advert? and then explain again what this does?
|
|
^^^ ROFL!
anyways... great man I was looking for this hack last night actually, I will post when I get her installed. cheers PPN. -myles |
PPN:
Great hack. Have your figured out a way to make it count the number of times it has been clicked on like a link? I added a maketableheader2 with a colspan of 4 in the adminfunctions.php file as the default is only a colspan of 2. Parker |
Oh the maketable problem hold on you don't need another function you just need to adjust the variables passed into the function.
Adjusting ads.php just now. |
If you wanted it to count the number times a link had been clicked on you have to start creating a file in which to hold the link information and that means you have to start doing more work and you wouldn't really be able to use the adverts for other media like javascript.
Ill have a think about it though. |
All times are GMT. The time now is 11:52 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|