Version: 1.00, by Dean C
Developer Last Online: Nov 2023
Version: 2.2.x
Rating:
Released: 03-21-2003
Last Update: 03-21-2003
Installs: 38
No support by the author.
vB Sponsors
by Mist
Description:
Wow my first major hack is finally here. This hack allows you to add sponsors to forums via the administrators control panel. You can only have one sponsor per forum. The way in which this hack differs from all others is that it displays it inside the forum (in forumdisplay.php). It allows you to select a sponsor name, image, url, and log views and clicks for each banner (which are all editable via the administrators control panel).
Features:
Sponsors on forumdisplay
Easily edit your sponsors for each forum via the Admin CP
Logs clicks and views for each sponsor
A wide variety of customizable options via the Admin CP (coming soon)
Installation:
Simply follow the instruction in the attachment
Credits:
NanoEntity for guidance on the click logging.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Then you should already have some code at the bottom of forumdisplay.php. Replace it with this:
PHP Code:
///// Forum sponsors (by mist) start ///////////
if ($foruminfo['sponsorname'] and $foruminfo['sponsorimage'] and $foruminfo['sponsorurl'] and $totalthreads>0)
{
if ($foruminfo[sponsorviews]=="0")
{
$foruminfo[sponsorviews]=0;
}
$foruminfo[sponsorviews]++;
$DB_site->query("UPDATE forum SET sponsorviews=$foruminfo[sponsorviews] WHERE forumid=$forumid");
eval("\$fdopentable = \"".gettemplate('forumdisplay_opentable')."\";");
eval("\$getsponsor = \"".gettemplate('forumdisplay_sponsor')."\";");
}
///// Forum sponsors (by mist) end ///////////
Today at 09:40 PM Mist said this in Post #24 Ok i feel so stupid. The reason this doesn't work is because i didn't include the modifcations to the 'forumdisplay' template.
I've updated the zip and if you have already installed this follow these instructions:
Then you should already have some code at the bottom of forumdisplay.php. Replace it with this:
PHP Code:
///// Forum sponsors (by mist) start ///////////
if ($foruminfo['sponsorname'] and $foruminfo['sponsorimage'] and $foruminfo['sponsorurl'] and $totalthreads>0)
{
if ($foruminfo[sponsorviews]=="0")
{
$foruminfo[sponsorviews]=0;
}
$foruminfo[sponsorviews]++;
$DB_site->query("UPDATE forum SET sponsorviews=$foruminfo[sponsorviews] WHERE forumid=$forumid");
eval("\$fdopentable = \"".gettemplate('forumdisplay_opentable')."\";");
eval("\$getsponsor = \"".gettemplate('forumdisplay_sponsor')."\";");
}
///// Forum sponsors (by mist) end ///////////
Regards
- miSt
omg, youre trying to make it up to use by saying "Regards"??? :banana:
PS
I don't have any need for this hack yet. But I might in the near future.
Xiphoid - i was expecting this , well the original idea was to have only one sponsor per forum. Adding a second banner or possibly more would mean adding an id field to the forum table for the banner and then for the other banner it would mean 5 new fields for the forum table. This IMO is a bit too much. However it is something i have in mind for the future