View Full Version : vb Sponsors
Dean C
03-21-2003, 10:00 PM
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.
Dean C
03-22-2003, 12:14 PM
<i>Space reserved for FAQ's</i>
Dean C
03-22-2003, 12:16 PM
Adding / Editing a sponsor:
Dean C
03-22-2003, 12:16 PM
Viewing a sponsor on forumdisplay:
Dean C
03-22-2003, 12:17 PM
Error when url specifies an invalid sponsor:
Dean C
03-22-2003, 12:17 PM
Redirection to the sponsor:
Kars10
03-22-2003, 12:22 PM
He, very cool!!
Exactly what i need for my board...:)
* Kars10 kicks install!
assassingod
03-22-2003, 12:25 PM
Great hack Mist, I love the little comments in sponser.php ;)
Dean C
03-22-2003, 12:43 PM
Thanks for the feedback and well spotted on the comments ;) hehe
- miSt
TheComputerGuy
03-22-2003, 01:07 PM
How does this show up in the forumdisplay if the templates in forumdisplay are not used?
Dean C
03-22-2003, 02:50 PM
Hehe i already figured that one out when writing the hack - if there are no threads in the forum the sponsor does not display :)
- miSt
GoTTi
03-22-2003, 04:06 PM
mist you got AIM or MSN?
GoTTi
03-22-2003, 04:40 PM
nothing is showing up on the forum.
Dean C
03-22-2003, 04:50 PM
You mean the sponsor isn't displaying?
- miSt
GoTTi
03-22-2003, 05:14 PM
no nothing...the option shows up in the admin CP, when i input the info...nothing came up...
In the sponsor Banner Filename area, i put the address to the banner in there right?
GoTTi
03-22-2003, 05:16 PM
actually i just noticed...
The sponsor views are showing up in the admin CP, they are being counting, but nothing is showing up in the forum where I have the banner on.
TheComputerGuy
03-22-2003, 05:21 PM
That is my problem as well.
Dean C
03-22-2003, 05:22 PM
I still have no idea what your are referring too. You mean the sponsor filename is showing up as a red cross or it simply isn't showing up?
- miSt
Dean C
03-22-2003, 05:23 PM
Sorry can you show me a screenshot of what is happening as im still puzzled. Is the column for the sponsors not showing up on forumdisplay?
Regards
- miSt
dirtymerc
03-22-2003, 05:28 PM
Not working for me either, when you add a sponser to a forum, it does not display anything, it is the original setup without any additions to the layout of the category page. There must be some sort of problem between the script and the display.
Dean C
03-22-2003, 05:30 PM
I'll be back online later after investigating :)
- miSt
VampireMan
03-22-2003, 06:07 PM
looks good , will have an install sometime laters :-)
GoTTi
03-22-2003, 06:22 PM
ok the attach ss shows the admin cp, modifying a forum with the options in there right....
everything is setup right, and u can see the Sponsor Views are recording when the forum is accessed, but there is no banner showing on the forum.
Dean C
03-22-2003, 06:40 PM
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:
In your 'forumdisplay' template find: :
----------------------------------------------------------------------
$forumdisplay[forumslist]
----------------------------------------------------------------------
+
+++
+
** Above ** it add:
----------------------------------------------------------------------
$fdopentable
----------------------------------------------------------------------
+
+++
+
Again in your 'forumdisplay' template find: :
----------------------------------------------------------------------
forumdisplay[threadslist]
----------------------------------------------------------------------
+
+++
+
Below ** it add:
----------------------------------------------------------------------
$getsponsor
----------------------------------------------------------------------
Then you should already have some code at the bottom of forumdisplay.php. Replace it with this:
///// 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
Mephisteus
03-22-2003, 08:30 PM
Today at 09:40 PM Mist said this in Post #24 (https://vborg.vbsupport.ru/showthread.php?postid=371477#post371477)
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:
///// 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.
GoTTi
03-22-2003, 10:00 PM
lol
* GoTTi smacks mist
your not stupid pal ;)
GoTTi
03-22-2003, 10:08 PM
ight it works...
question: How can I make it where if the link is clicked on it will open up in a new window...
ALSO...
is there a banner rotation that can be placed on this?
Floris
03-22-2003, 11:48 PM
You can just add a target="_blank" to the <A> tag that holds the clickety.
I am also curious about rotation.
Dean C
03-23-2003, 08:41 AM
Da_gotti - in your forumdisplay_sponsor template change this:
<a href="$bburl/sponsor.php?s=$session[sessionhash]&name=$foruminfo[sponsorname]&forumid=$forumid">
To this:
<a href="$bburl/sponsor.php?s=$session[sessionhash]&name=$foruminfo[sponsorname]&forumid=$forumid" target="new">
_____________________
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 :)
- miSt
Koopa
03-23-2003, 02:11 PM
Nice hack, I may use this :)
Dean C
03-23-2003, 02:39 PM
Thankyou :)
alkatraz
03-23-2003, 03:38 PM
sweeet
dirtymerc
03-24-2003, 01:43 AM
Is it possible to make it so you can add more than one sponser per forum?
Dean C
03-24-2003, 03:27 PM
Not at this time but as my knowledge expands this is possible :)
esquared
03-24-2003, 07:19 PM
I would defiantly be interested in this when you're able to add more then one sponsor per forum. :)
Hella nice hack!
ryans
03-24-2003, 07:29 PM
any way to make this use a different database? Just create a new database. also any place were i can see it actually installed?
thanks!
Dean C
03-25-2003, 04:01 PM
Not that i know or ryans as it would involve sharing databases :)
- miSt
Webdork
03-25-2003, 08:29 PM
Any example sites running this - I clicked on all the links in this thread and no one seemed to be using it? Id like to see how it looks on a site.
Dean C
03-26-2003, 03:48 PM
The screenshots explain it all but i encourage anyone using it to show a link to their forumdisplay.php ;)
- miSt
Mental Stamina
03-27-2003, 03:49 AM
i haven't looked at the coding or used this script
i'm speaking in theory
to make it use multiple sponsors shouldn't be too hard
the user should add another ad via the admin panel to a forum that already has an ad
then...when you select from the table where forumid=$forumid
it will return multiple rows
just loop it and print it
depending on how you do it...it may require an extra template
nice hack though
-Stamina
Dean C
03-27-2003, 03:30 PM
Thanks forthe feedback Stam...
But the problem is there is only one banner per row - the ideal way to do this is with a new table and join it to the forum table - i'm not that experienced enough yet though :)
- miSt
cobradude
03-28-2003, 03:47 AM
Does it show anything on the forum home page to indicate the forum is sponsored or just within the forum itself?
Fi_InCogNiTo
03-28-2003, 05:32 AM
Does this support styles like ekko and noviia? I installed as per instructios and went over them 2 times and I see no change in my forum. I can see no sponsors at all. I edited the sponsor info in the admincp, still nothing.
Dean C
03-28-2003, 03:36 PM
Today at 05:47 AM cobradude said this in Post #42 (https://vborg.vbsupport.ru/showthread.php?postid=374390#post374390)
Does it show anything on the forum home page to indicate the forum is sponsored or just within the forum itself?
Currently it only shows it on the forumdisplay :)
- miSt
Dean C
03-28-2003, 03:38 PM
Today at 07:32 AM Fi_InCogNiTo said this in Post #43 (https://vborg.vbsupport.ru/showthread.php?postid=374435#post374435)
Does this support styles like ekko and noviia? I installed as per instructios and went over them 2 times and I see no change in my forum. I can see no sponsors at all. I edited the sponsor info in the admincp, still nothing.
Well it depends how modified the forumdisplay template for those skins are. From what i've seen on them they should work :p
Go back and re-do the changes as the style will not effect this hack other than if the forumdisplay template is heavily modified it may distort the tables :)
- miSt
dennx
05-13-2003, 08:22 AM
Whoever is using this hack, please list your URLs.
Thanks
Dennis
PurpleCow
05-13-2003, 12:34 PM
Can this hack be changed/tweaked in such a way that, the forum sponsor is just a button ad of size say 88 x 31 or 100 x 28 ??
And this button should appear in the home page of forums in the moderator column...instead of the moderator list.
And this sponsor can be different for different forums and each one can have specific image !
And with this change, the hack should work on ver 2.3.0, if its already not working in ver230 !
Thanks
skrueger80
06-12-2003, 05:30 AM
i went through the whole set of instructs one at a time, and went over it twice.. where is the option for the sponser stuff in the admincp? nothign shows up at all in either my admin cp or the actual forums. i made sure i did everythign inthe text file as well as everyhtign listing int his thread. but still to no avial.. is the sponser thign in the "vbulletin options?" or .. im so confused. i would be greatly indebted if someone could show em the way.
Dean C
06-12-2003, 08:57 AM
You go to edit a forum. Then there is all the options there :)
- miSt
skrueger80
06-12-2003, 08:54 PM
Thanks alot mist, (i clicked install) i musta just had a blond moment or somehting, thanks for helping so fats.
but one thing, i notice onthe sponser images that are over 1kb, they don't show only ones less than that show up. is that hard coded somewhere or can i change it?
thanks again for this marvelous hack.
Dean C
06-13-2003, 10:22 AM
Sorry what do you mean skrueger? :)
- miSt
Edit: disregard this post please :)
ryans
07-11-2003, 04:47 PM
Great hack. I'm curious though. In my forum display I do not user the moderator field. anyway to have it show up in that space instead?
PurpleCow
07-13-2003, 05:54 AM
ryans...I was looking for a similiar thing.
Instead of showing up the image in the forum display...it could be shown in the mod column only.
Can this be done mist ??
Thanks for your time !
Bulleh
07-13-2003, 10:23 AM
ok hacked installed, seems great
just a few opinions
1) Maybe it could have the box there when you dont have a sponsor saying "Sponsor This Forum - Click Here To Find Out How" or something like that,
2) in the Admin CP, when you add the sponsor, and it asks for image name, can you not make it so you can post the URL for that image, instead of having to upload it to your /images folder each time u add a sponsor,
as ive said , a great hack, just a few opinions,
Wow thanks!
/me hits install
clamcrusher
08-14-2003, 06:25 PM
when i try and run the last query:
ALTER TABLE forum ADD sponsorclicks MEDIUMINT(10) not null default '0' AFTER sponsorviews;
it sais this:
Database error in vBulletin Control Panel 2.2.8:
Invalid SQL: ALTER TABLE forum ADD sponsorclicks MEDIUMINT(10) not null default '0' AFTER sponsorviews;
mysql error: You have an error in your SQL syntax near ';
' at line 1
mysql error number: 1064
Date: Thursday 14th of August 2003 03:21:09 AM
Script: http://www.anabolic-alchemy.com/admin/query.php
Referer: http://209.67.24.185/admin/query.php?t=0&s=
the others worked just fine
i finsihed the hcak install but i dont see anything in the admin panel to add banners, guess that query needs to be ran for it to work. help?
clamcrusher
08-16-2003, 06:53 PM
ok when i try to make new forums i see the fields now. but i cant make a new forum cause when i try and save it it gives this error:
Database error in vBulletin Control Panel 2.2.8:
Invalid SQL: INSERT INTO forum
(forumid,styleid,title,description,active,displayo rder,parentid,
parentlist,allowposting,cancontainthreads,sponsorn ame,sponsorimage,sponsorurl,sponsorviews,sponsorcl icks,
daysprune,newpostemail,newthreademail,
moderatenew,allowhtml,allowbbcode,allowimages,allo wsmilies,allowicons,
styleoverride,allowratings,countposts,moderateatta ch)
VALUES
(NULL,'1','Secure Questions','Ask questions in here that only the moderators and admins will be able to see. When you make posts in here only you and the mods will be able to view it, other members will not see it. DONT ASK FOR SOURCES, none will be given to you.','1','8','-1',
'','1','1','','','','','',
'30','','',
'0','0','1','0','1','1',
'0','0','0','0')
mysql error: Unknown column 'sponsorclicks' in 'field list'
mysql error number: 1054
Date: Saturday 16th of August 2003 03:49:34 AM
Script: http://www.anabolic-alchemy.com/admin/forum.php
Referer: http://209.67.24.185/admin/forum.php?action=add&s=
Dean C
08-16-2003, 08:17 PM
You haven't run the queries as it asked in the file ^^
FastAttack
09-11-2003, 10:11 PM
Hey mist are you going to update this for 3.0 ?
drumsy
09-12-2003, 04:03 AM
For some odd reason, it just refuses to show. I've followed everything by the book...:confused:
Dean C
09-12-2003, 06:43 AM
FastAttack - yes when i have some time and hacks are allowed.
drumsy - I don't know what to say. It works for me and others so you must have applied something incorrectly :)
drumsy
09-12-2003, 04:08 PM
Is it working for 2.3.2?
Dean C
09-12-2003, 05:43 PM
This should work for all versions in the vb 2.x.x series :)
zsmom
10-25-2003, 04:42 PM
Installed with no problems on 2.3.2.
Thanks for the great hack!
cymru2000
10-30-2003, 10:38 AM
I have a strange problem, i can add sponsors to NEW forums but the field is not there when i try and edit existing ones, any reason for this
Dean C
10-30-2003, 03:37 PM
You've placed the code in the wrong place :) ^^ Try reapplying the changes to forum.php making sure you edit the correct lines.
when i go to my admin pannel i get a blank page can someone help
and what do i have to do with sponsor_main
gmarik
12-21-2003, 07:13 AM
Really interesting. One think could be added and I would install and advertise your hack on this board:
Client quotes could be added, that mean three fields the admin can add:
1) client name
2) company (maybe)
3) the speech
What do you think, could you do that? Several quotes could be added and shown in random order, just like the Lesane's quote hack.
umm i dont understand sry
Triality
01-14-2004, 10:33 PM
for some reason the link is not working. when i click on the sponser image it is a broken link.
FastAttack
01-15-2004, 12:27 AM
hey mist any chance yet for you to port this to 3.0?
Dean C
01-15-2004, 01:48 PM
Lots of work right now so we'll see how I get on :)
mikeym
02-01-2004, 03:34 AM
I'm trying to install it on 2.3.4 but there is no file forum.php to edit, is there such a file in this version? Unless you are refering to the one in the admin directory?
mikeym
02-01-2004, 03:54 AM
Well I installed it and everything is working on the admin side but I can't see the sponsers on the client side of my forum. Anyone know what this can be?
Edit: Problem Solved. :)
pitt2424
01-05-2005, 04:43 PM
my banners aren't showing up, when i go to put a banner in it says that any image bigger than 200 pixels wide are not supported, is this the reason they are not showing up cause some of my banners are 500 pixels or more? or is this just because i have to add the other stuff on page 2 of this thread? can this be changed to make the pixel sizes bigger?(therefore allowing a bigger sponsor banner) and if so how do you change it?
thanx for any help.......
pitt2424
01-06-2005, 01:48 AM
any help?
pitt2424
01-06-2005, 05:26 PM
this still isn't working for me? can someone please help? :confused:
FalkinPro
01-05-2007, 02:57 PM
this still isn't working for me? can someone please help?
Have you tried resizing your images to meet the requested sizes? As long as you have the proper image type and sizes it should work just fine. :confused:
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.