View Full Version : Add "Sponsored by" banners to your forum categories
Admin
08-28-2001, 10:00 PM
Works with vBulletin v2.2.0!
This hack will allow you to add banners to your categories row (like done on SitePointForum.com (http://www.sitepointforum.com) - use that as a demo ;)).
You can add / remove sponsors for any category that exists and also on creation (of category) time.
You can specify the name, banner url and the sponsor's site.
Currently it only supports categories from level 1, and only on forum index. -if you want more please tell and I'll see what I can do.
Umm, that's it I think. Installation is fairly easy (and the hack itself didn't take too much time :)), so you shouldn't have any problems.
Feedback from any kind is very appreciated! :D
First of all, run the following query
ALTER TABLE forum ADD sponsorname VARCHAR(100) not null AFTER cancontainthreads, ADD sponsorimg VARCHAR(100) not null AFTER sponsorname, ADD sponsorurl VARCHAR(255) not null AFTER sponsorimg
For more info about running queries take a look here (http://www.vbulletin.com/forum/showthread.php?s=&threadid=26272) or here (http://www.vbulletin.com/forum/showthread.php?threadid=18558).
Add a custom template, name it forumhome_forumbit_level1_nopost_sponsor and put the following in it:
<tr id="cat">
<td bgcolor="{categorybackcolor}" colspan="2"><a href="forumdisplay.php?s=$session[sessionhash]&forumid=$forum[forumid]"><normalfont color="{categoryfontcolor}"><b>$forum[title]</b></normalfont></a>
<br><smallfont color="{categoryfontcolor}">$forum[description]</smallfont></td>
<td bgcolor="{categorybackcolor}" colspan="4"><a href="$forum[sponsorurl]" target="_blank"><img src="{imagesfolder}/$forum[sponsorimg]" border="0" alt="Proudly sponsored by $forum[sponsorname]"></a></td>
</tr>
(You can tweak this for your tables. Playing around with the colspans should be enough though. This is for the default table structure)
In forum.php (under your admin folder) add
maketableheader("Sponsors</b> <i>Only supported by categories</i>","",0);
makeinputcode("Sponsor name","sponsorname");
makeinputcode("Sponsor banner file<br>(your default images folder is added, no need in that)","sponsorimg");
makeinputcode("Sponsor full URL","sponsorurl");
right after
makeyesnocode("Count posts made in this forum towards user post counts?","countposts",1);
(around line 121)
Still in forum.php, replace
$DB_site->query("INSERT INTO forum
(forumid,styleid,title,description,active,displayo rder,parentid,
parentlist,allowposting,cancontainthreads,daysprun e,newpostemail,newthreademail,
moderatenew,allowhtml,allowbbcode,allowimages,allo wsmilies,allowicons,
styleoverride,allowratings,countposts,moderateatta ch)
VALUES
(NULL,'$styleset','".addslashes($title)."','".addslashes($description)."','$isactive','$displayorder','$parentid',
'','$allowposting','$cancontainthreads','$daysprun e','".addslashes($newpostemail)."','".addslashes($newthreademail)."',
'$moderatenew','$aallowhtmlcode','$aallowbbcode',' $aallowimgcode','$aallowsmilies','$aallowicons',
'$styleoverride','$allowratings','$countposts','$m oderateattach')");
with
$DB_site->query("INSERT INTO forum
(forumid,styleid,title,description,active,displayo rder,parentid,
parentlist,allowposting,cancontainthreads,sponsorn ame,sponsorimg,
sponsorurl,daysprune,newpostemail,newthreademail,
moderatenew,allowhtml,allowbbcode,allowimages,allo wsmilies,allowicons,
styleoverride,allowratings,countposts,moderateatta ch)
VALUES
(NULL,'$styleset','".addslashes($title)."','".addslashes($description)."','$isactive','$displayorder','$parentid',
'','$allowposting','$cancontainthreads','".addslashes($sponsorname)."','".addslashes($sponsorimg)."',
'".addslashes($sponsorurl)."','$daysprune','".addslashes($newpostemail)."','".addslashes($newthreademail)."',
'$moderatenew','$aallowhtmlcode','$aallowbbcode',' $aallowimgcode','$aallowsmilies','$aallowicons',
'$styleoverride','$allowratings','$countposts','$m oderateattach')");
(around lines 136-147)
Still in forum.php, add
maketableheader("Sponsors</b> <i>Only supported by categories</i>","",0);
makeinputcode("Sponsor name","sponsorname",$forum[sponsorname]);
makeinputcode("Sponsor banner file<br>(your default images folder is added, no need in that)","sponsorimg",$forum[sponsorimg]);
makeinputcode("Sponsor full URL","sponsorurl",$forum[sponsorurl]);
right after
makeyesnocode("Count posts made in this forum towards user post counts?","countposts",$forum[countposts]);
(around line 230)
Still in forum.php, replace
$DB_site->query("UPDATE forum
SET
styleid='$styleset', title='".addslashes($title)."', description='".addslashes($description)."',
active='$isactive', displayorder='$displayorder', parentid='$parentid', parentlist=$parentlist,
allowposting='$allowposting', cancontainthreads='$cancontainthreads', daysprune='$daysprune',
newpostemail='".addslashes($newpostemail)."', newthreademail='".addslashes($newthreademail)."',
moderatenew='$moderatenew', allowhtml='$aallowhtmlcode', allowbbcode='$aallowbbcode',
allowimages='$aallowimgcode', allowsmilies='$aallowsmilies', allowicons='$aallowicons',
styleoverride='$styleoverride', allowratings='$allowratings', countposts='$countposts',
moderateattach='$moderateattach'
WHERE forumid='$forumid'");
with
$DB_site->query("UPDATE forum
SET
styleid='$styleset', title='".addslashes($title)."', description='".addslashes($description)."',
active='$isactive', displayorder='$displayorder', parentid='$parentid', parentlist=$parentlist,
allowposting='$allowposting', cancontainthreads='$cancontainthreads',
sponsorname='".addslashes($sponsorname)."',sponsorimg='".addslashes($sponsorimg)."',
sponsorurl='".addslashes($sponsorurl)."',daysprune='$daysprune',
newpostemail='".addslashes($newpostemail)."', newthreademail='".addslashes($newthreademail)."',
moderatenew='$moderatenew', allowhtml='$aallowhtmlcode', allowbbcode='$aallowbbcode',
allowimages='$aallowimgcode', allowsmilies='$aallowsmilies', allowicons='$aallowicons',
styleoverride='$styleoverride', allowratings='$allowratings', countposts='$countposts',
moderateattach='$moderateattach'
WHERE forumid='$forumid'");
(around lines 261-273)
Save and upload forum.php.
In index.php (the main folder) replace this line
eval("\$forumbits .= \"".gettemplate("forumhome_forumbit_level$depth$tempext")."\";");
with this code
if ($forum['sponsorimg'] && $forum['cancontainthreads']==0 && $depth==1) {
eval("\$forumbits .= \"".gettemplate("forumhome_forumbit_level1_nopost_sponsor")."\";");
} else {
eval("\$forumbits .= \"".gettemplate("forumhome_forumbit_level$depth$tempext")."\";");
}
(around line 298)
Save and upload index.php.
That's it.
If you did everything correctly (it wasn't very hard, was it? :)) and I didn't do any mistakes (it's tested alright!, but I might have forgot something to post), you can start adding sponsors to your forum!
TWTCommish
08-29-2001, 02:14 PM
Looks interesting. Perhaps I'll give it a try. :)
eva2000
08-29-2001, 02:20 PM
wow looks nice might try it on my private testing copy :)
then again with 2.0.4 soon might not :D
Admin
08-29-2001, 02:49 PM
Thanks. :)
What do you mean "with 2.0.4 soon might not"?
This feature is gonna be on 2.0.4?
Awesome! :D
eva2000
08-29-2001, 02:51 PM
Originally posted by FireFly
Thanks. :)
What do you mean "with 2.0.4 soon might not"?
This feature is gonna be on 2.0.4?
Awesome! :D no what i mean is i might not install this hack until after 2.0.4 is released save me the trouble of rehacking this in :)
Admin
08-29-2001, 02:53 PM
Oh ok, gotcha. :)
2.0.4 should be released shortly after John and James return from their expedition
Admin
08-30-2001, 07:47 AM
Expedition?
Are they gonna be on National Geographic, like all those people who're going to Alaska and places like that?
eva2000
08-30-2001, 07:52 AM
Originally posted by FireFly
Expedition?
Are they gonna be on National Geographic, like all those people who're going to Alaska and places like that? LOL
Lordmusic
08-30-2001, 08:59 AM
Don't dis Alaska. I LIVE IN ALASKA. Me = Alaskan Pimp.
Anyways Alaska is cool, and for your info, we don't live in friggin igloos.
Admin
08-30-2001, 09:52 AM
Ok...
TWTCommish
08-30-2001, 02:36 PM
Sure ya do. I saw it on TV! All people in Alaska wear big brown fluffy coats, live in igloos, have dark tan skin, and eat Eskimo Pie. :D TV told me so...
Where did James/John go?
mjames
08-30-2001, 02:42 PM
Originally posted by TWTCommish
Sure ya do. I saw it on TV! All people in Alaska wear big brown fluffy coats, live in igloos, have dark tan skin, and eat Eskimo Pie. :D TV told me so...
Where did James/John go?
My guess? Somewhere out in the Bahamas burning their millions of dollars from vBulletin. :)
BradC
08-30-2001, 02:49 PM
Originally posted by mjames
My guess? Somewhere out in the Bahamas burning their millions of dollars from vBulletin. :)
yah with all that money.... I don't think they will be coming back soon... what was that island tubedogg wanted... maybe they purchased it, and are there.. :)
BradC
08-30-2001, 02:51 PM
Originally posted by Lordmusic
Don't dis Alaska. I LIVE IN ALASKA. Me = Alaskan Pimp.
Anyways Alaska is cool, and for your info, we don't live in friggin igloos.
Wasn't there a tv show on called something like "Northern Exposure" that was about living and.. umm I working in Alaska.. or was that for somewhere else :)
Ohh... I guess we get the image.. of people living in igloo's... surfing the web and buying stuff off of yahoo.. :)
FreshFroot
08-30-2001, 03:58 PM
Great hack...muchas gracias!
Admin
08-30-2001, 04:22 PM
[QUOTE]Originally posted by FreshFroot
Great hack...muchas gracias!
amykhar
08-30-2001, 04:43 PM
I extended this hack a bit to put a sponsor ad in a particular forum.
To do this, I added a new template called forumdisplay_sponsoredby and put this in it:
<br><br><a href="$foruminfo[sponsorurl]" target="_blank"><img src="{imagesfolder}/$foruminfo[sponsorimg]" border="0" alt="Proudly sponsored by $foruminfo[sponsorname]"></a>
<br>
I then edited forumdisplay.php so that
if ($foruminfo['sponsorimg']) {
eval("\$sponsoredby = \"".gettemplate('forumdisplay_sponsoredby')."\";");
}
else {
$sponsoredby = '';
}
was immediately AFTER
if ($foruminfo['allowposting']==1) {
eval("\$newthreadlink = \"".gettemplate('forumdisplay_newthreadlink')."\";");
}
and forumdisplay_sponsoredby was included in the list of required templates.
Finally, I added $sponsoredby to my forumdisplay template.
Sorry for the clumsy explanation. It took a bit of putzing around for me to get this to work, but it does. :)
demo:
http://www.eaforums.com/forumdisplay.php?s=&forumid=27
Amy
Admin
08-30-2001, 04:51 PM
Good job! :)
eva2000
08-30-2001, 07:39 PM
nice extension.. waits for 2.0.4 first :D
FreshFroot
08-31-2001, 01:21 PM
Ok...so I've got the hack installed, now how do I add the sponsors?
Admin
08-31-2001, 01:26 PM
If you want to add sponsors for existing forums, just edit that forum. (Admin CP => Forums and Moderators => Modify => Edit) :)
FreshFroot
08-31-2001, 01:30 PM
Damn your quick! I like your style...thanks :)
FreshFroot
08-31-2001, 01:32 PM
I went into the CP and in to Modify Forums and didn't see anything about sponsors. Did I miss a step somewhere?
Admin
08-31-2001, 01:36 PM
This is where you should look.
If it doesn't show up there, make sure you edited forum.php correctly and uploaded it. :)
FreshFroot
08-31-2001, 01:48 PM
Thanks...I got it corrected, but now my server is acting up!!!
Again...another great hack from FireFly :)
Thomas P
08-31-2001, 02:10 PM
Hi FireFly,
awesome, will use it as soon as I found some sponsors
or found a way to use it an other way,
thx and keep up your good work,
-Tom
FreshFroot
08-31-2001, 02:19 PM
Check out Comission Junction, you can use affiliate programs for your sponsors. Maybe make some $$$.
Thomas P
08-31-2001, 02:34 PM
Thanks for the hint,
am on my way :D
-Tom
Admin
08-31-2001, 03:17 PM
Thanks guys! :D
Shoonra
09-03-2001, 07:39 PM
That's something I've been looking for! I am PHP-phobic though - never installed a hack in my life (I shiver at the thought of upgrading my forums... I always think I'll end up crashing them!).
Firefly, do you provide support by phone for people in your locality :D I might just need that....
Pie'oh'pah
09-04-2001, 12:07 AM
Originally posted by Lordmusic
Don't dis Alaska. I LIVE IN ALASKA. Me = Alaskan Pimp.
Anyways Alaska is cool, and for your info, we don't live in friggin igloos.
MUAHAHA Still laughing man!! :D:D
Everyone who posted in here, the only forum I saw this script on was sitepoint.com did anyone actually install this hack and leave it in?
amykhar
09-04-2001, 10:17 AM
I have it running, but I don't show the banners on my main page, just within specific forums. It is still working great though.
I even managed to use this hack to get a sponsor for one of my forums already. It's going to mean extra cash which we can really use right now. :D
Amy
Mark Hewitt
09-04-2001, 11:48 AM
This hack would be cool if it gets sponsors for you too! ;)
Admin
09-04-2001, 11:56 AM
Hehe. :p
Well I would install it but I don;t want ot have to uninstall it if I don;t like it. How are th sponsor thingys made? Are they pictures because I read over the read me and it didn't say aything about pictures need to be uploaded.
Mark Hewitt
09-04-2001, 12:02 PM
You will need to upload pictures yes.
Admin
09-04-2001, 12:05 PM
You can add sponsors selectively for each category.
If there is no sponsor, nothing different will be shown.
Then I'll be installing this hack, thanks guys.
What technique did they use on Sitepoint.com? I noticed they have some text, and an image over it. How can I achieve this setup?
Admin
09-04-2001, 12:49 PM
The text is just part of the image there.
But anyway, you can change the sponsor template, and add anything you want there.
I'm having trouble. http://forums.suprascene.com
I'd like to right align everything.
Admin
09-04-2001, 02:40 PM
Use this as your template:
<tr id="cat">
<td bgcolor="{categorybackcolor}" colspan="2"><a href="forumdisplay.php?s=$session[sessionhash]&forumid=$forum[forumid]"><normalfont color="{categoryfontcolor}"><b>$forum[title]</b></normalfont></a>
<br><smallfont color="{categoryfontcolor}">$forum[description]</smallfont></td>
<td bgcolor="{categorybackcolor}" colspan="4" align="right"><a href="$forum[sponsorurl]" target="_blank"><img src="{imagesfolder}/$forum[sponsorimg]" border="0" alt="Proudly sponsored by $forum[sponsorname]"></a></td>
</tr>
amykhar
09-04-2001, 04:21 PM
I also added a text field to the database that allows me to put a description or lead-in text next to the forum sponsor image.
I am still playing with the aesthetics, but you can see what I am doing here:
http://www.eaforums.com/forumdisplay.php?s=&forumid=38
Amy
I have test it . It looks like wounderful.
Just make it strong more ...
danielillo
09-05-2001, 03:36 AM
I've been lookig for a hack like this since I saw SPF.
Thanks FireFly.
I just add some templates for it to show also the number of post in each category (needed if you want to set to 1 the depth of your forums and justify the prize you want they to pay to be anounced there).
I just test it on my test forum: http://www.dondepuedo.com/prueba/
As soon as I finish my exams I will put it on the main forums (www.dondepuedo.com/foro)
Thanks again.
PS: Please, excuse my English (I'm from Spain)
Admin
09-05-2001, 09:57 AM
Thanks a lot for the kind words Danielillo. :)
[QUOTE]Originally posted by DYer
I have test it . It looks like wounderful.
Just make it strong more ...
BluSmurf
09-08-2001, 06:06 PM
ahhhhhhhhh this is what I've been looking for :)
will let you know how it goes once I've installed it later
Goldfinger
09-17-2001, 01:50 AM
Nice hack .. but i think ill wait for 2.0.4 too :D
shadowbreed
09-17-2001, 03:07 PM
Great Hack working perfectly and easy to install on 2.0.3
Hi,
first of all i want to say that this hack is absolutely great! FireFly nice work! :)
One request:
The ability to add Banners for a certain Forum. Supported by Pics on the Forum Home Page at Categories _and_ the option to add Banners (468x60 or else) in each forum.
Regards,
shadowbreed
09-18-2001, 08:36 PM
There is an extension for this hack on page two of this thread that allows you to add banners to your forums
Originally posted by shadowbreed
There is an extension for this hack on page two of this thread that allows you to add banners to your forums
Yep, i know this. But is it possible to use this modification _and_ the mod by FireFly at the same time?
amykhar
09-19-2001, 02:21 PM
Originally posted by h4p3
Yep, i know this. But is it possible to use this modification _and_ the mod by FireFly at the same time?
Yes. It simply adds on to Firefly's. it doesn't replace it.
Amy
Goldfinger
09-20-2001, 09:40 AM
works wonderfully. and another great hack by firefly :).
mbombd
09-20-2001, 11:05 AM
good **** firefly, good ****....
ForzaGrifo
09-27-2001, 05:08 AM
When I go to cpanel and tried to modify the forum, I get this parse error on this line in forum.php:
doformfooter("Save Forum");
What's the problem??
SystemLogic
09-27-2001, 05:59 AM
Works excellent.....live example at http://www.systemlogic.net/boards
Admin
09-27-2001, 06:41 AM
SystemLogic:
That really looks good. Thanks. :)
ForzaGrifo:
Can you please paste the complete error message here?
This function is used on almost all files, you really shouldn't have a problem with it.
Is this the only place you get this error?
Alien
09-27-2001, 11:02 AM
Thanks alot for this, I've been using it for a little while without a glitch! :D
YourHostSucks
09-27-2001, 07:02 PM
Works Great!
Thanks! ;)
MarkB
09-27-2001, 09:31 PM
I've just started using this hack on my forum (finally!), and it was easy as I could have hoped to get it working :)
I was wondering if it would be possible to, perhaps in a future version, have a counter that would count click-thrus...?
Thanks for another great piece of code!! :D
YourHostSucks
09-27-2001, 09:46 PM
Yep, I was thinking the same thing..
I am going to set mine up to keep a record of hits for each sponsor.... easy enough to do.. :)
MarkB
09-27-2001, 09:55 PM
Originally posted by YourHostSucks
Yep, I was thinking the same thing..
I am going to set mine up to keep a record of hits for each sponsor.... easy enough to do.. :)
Care to share how to do it? :D
YourHostSucks
09-27-2001, 10:30 PM
Sure man.. Just upload a script to count clicks to a url...
I have attached a basic one, that should work just fine for you... ;)
Read the read me file and you will be all set....
You will just be linking to:
http://yourdomain.com/cgi-bin/blah blah/clickcount.cgi?action=jump&URL=http://yoursponsor.com
Really easy and fast to setup...
----------------------------------------------------------------------------
I would like to see this added to the Hack itself...
Like next to the picture (image) for the sponsor | a cell on top "Hits" and then under that the count on bottom?
(as a option that can be turned on or off)
Ofcourse you could just remove the code (hehe)
I will be trying to set mine up in this way later...
<edit> well maybe this information is not needed to be public.. *thinks*
MarkB
09-27-2001, 10:38 PM
You kick much bottom. Thanks!
YourHostSucks
09-27-2001, 10:53 PM
Blah, I do not think I am going to add the count view to public,
But others may like this feature? Maybe it could be added to this hack... :)
I just added the click count to the admin CP, thats good enuff for me!
MarkB
09-27-2001, 11:43 PM
I've added the banner to my forumdisplay using the code on page 2 - how would I go about adding this to my threads as well? I tried using similar code, but I don't know if showthread.php parses $foruminfo properly(??).
Any idea?:confused:
Ta:)
Mark
TheComputerGuy
09-28-2001, 12:38 AM
Nice Hack FireFly works great
YourHostSucks
09-28-2001, 01:24 AM
Well I tried to add this to PHP include, then use it on the forums
$sp1 = include("http://blahblah.com/cgi-bin/blah/clickcount.cgi?URL=http://blahblah.com");
then place $sp1 where I wanted their number of click to show up..
Well this only placed the number of clicks above the logo , and return the number "1" were the correct number was sup.. to be..
I just* got vBulletin and have not had time to read all the information on it, nor do I understand how it works at all (heh)
But I woud have figure you add that to phpinclude and then use it..
anyone have any ideas? :)
ForzaGrifo
09-28-2001, 01:56 AM
Originally posted by FireFly
ForzaGrifo:
Can you please paste the complete error message here?
This function is used on almost all files, you really shouldn't have a problem with it.
Is this the only place you get this error?
Everyone seems to have no problem but I'm having tons of problem!
Here's the error message when I tried to add a forum in vb's cpanel:
Fatal error: Call to undefined function: makeinputcode() in /home/everyone/public_html/forum/admin/forum.php on line 123
Line 123 is this line:
?makeinputcode("Sponsor name","sponsorname");
In the cpanel I would see the add forum screen but after the "Sponsor(only supported by categories)" header, it gets cut off and the rest of the input fields are not shown.
And I'm getting this error when I try to show my forums:
Parse error: parse error in /home/everyone/public_html/forum/index.php on line 365
Line 365 in my index.php is this:
if?($forum['sponsorimg']?&&?$forum['cancontainthreads']==0?&&?$depth==1)?{
Which doesn't make any sense. It seems it's not regconizing the fact that I have added the new fields in the forum tables, and I'm sure that I have added them to the table.
Please help!!!:(
Admin
09-28-2001, 12:44 PM
MarkB:
if ($forum['sponsorimg']) {
eval("\$sponsoredby = \"".gettemplate('forumdisplay_sponsoredby')."\";");
} else {
$sponsoredby = '';
}
ForzaGrifo:
Well, the first error I have NO idea what is all about.
That function is used on ALL admin pages, can't understand what it's producing an error here.
About the second error:
Can you paste a line or two BEFORE line 365?
Maybe you deleted a ; or }, I dunno. :confused:
SirSteve
09-28-2001, 01:52 PM
makeinputcode("Sponsor banner file<br>(your default images folder is added, no need in that)","sponsorimg");
Shouldn't that be "sponsoring" ?
Also, I would like all my sponsor images in a subfolder under images. Can you help me with this?
YourHostSucks
09-28-2001, 01:57 PM
Also, I would like all my sponsor images in a subfolder under images. Can you help me with this?
when you enter the path to the image just enter:
/images/sponsors/blahblah.gif
or what folder you create and sponsors image name...
Admin
09-28-2001, 01:58 PM
[QUOTE]Originally posted by SirSteve
makeinputcode("Sponsor banner file<br>(your default images folder is added, no need in that)","sponsorimg");
Shouldn't that be "sponsoring" ?
Also, I would like all my sponsor images in a subfolder under images. Can you help me with this?
Admin
09-28-2001, 02:00 PM
[QUOTE]Originally posted by YourHostSucks
when you enter the path to the image just enter:
/images/sponsors/blahblah.gif
or what folder you create and sponsors image name...
YourHostSucks
09-28-2001, 02:08 PM
doh, yea i have mine setup in the /sponsor folder..
and /sponsors/blah.jpg
just a brain fart -=/
SirSteve
09-28-2001, 02:18 PM
Originally posted by FireFly
No, sponsorimg = sponsor image. :)
I seen that afterwards. :)
Thanks.
SirSteve
09-28-2001, 02:21 PM
[QUOTE]Originally posted by FireFly
[B]MarkB:
if ($forum['sponsorimg']) {
eval("\$sponsoredby = \"".gettemplate('forumdisplay_sponsoredby')."\";");
} else {
$sponsoredby = '';
}
Does this add the sponsor to threads? If so, can you tell me exactly where this goes?
Admin
09-28-2001, 03:36 PM
SirSteve, yes, but you might want to change forumdisplay_sponsoredby to another template.
Add that code (with the new template) in showthread.php right after this:
getforumrules($forum,$getperms);
(almost end of file)
Should work. :)
SirSteve
09-28-2001, 04:41 PM
Originally posted by amykhar
and forumdisplay_sponsoredby was included in the list of required templates.
Finally, I added $sponsoredby to my forumdisplay template.
Everything is clean except the above. I have added the forumsdisplay_sponsoredby template and added $sponsoredby in the forumsdisplay template but nothing is showing up.
ForzaGrifo
09-28-2001, 04:55 PM
Originally posted by FireFly
ForzaGrifo:
Well, the first error I have NO idea what is all about.
That function is used on ALL admin pages, can't understand what it's producing an error here.
That's what I was saying. The previous calls to makeinputcode() have no problem. When it gets to the makeinputcode() that takes the sponsorname as parameter, error ocurrs. I think it might have got something to do with the fields in the forum table. I've added them in MyPhpAdmin and I'm pretty sure the fields are where they're suppose to be (i.e. after 'cancontainthreads'). It just makes no sense to me why the call to makeinputcode would fail.
Do you know what might have caused makeinputcode() to fail?
About the second error:
Can you paste a line or two BEFORE line 365?
Maybe you deleted a ; or }, I dunno. :confused:
No I'm pretty sure I didn't make any syntax error in the code.
* ForzaGrifo Just about to throw his hands up and surrender....
:mad:
hondastyle
09-28-2001, 07:34 PM
FireFly, you rock... this hack is sweeet !
The install was rather painless and it's extremely easy to use.
Screenshot attached for those wondering what it looks like..
Great job!
Ok - I set it up and works perfect. Thanks man.
TheComputerGuy
09-29-2001, 11:43 AM
If you have the MSN hack, and the world time hack it will mess them up...on the index.php
So I thought I would tell ya, and make sure that you are using a backup copy
Admin
09-29-2001, 12:08 PM
How will it mess them up, TheComputerGuy?
I don't use those hacks (URLs please? :)), but maybe I can fix it.
shadowbreed
09-29-2001, 01:52 PM
I'm using the world time hack and have this one installed without any problems
TheComputerGuy
09-29-2001, 09:30 PM
it wiped them out..as in they are no longer present ...I changed it back last night...I will be glad to show u the files...
ForzaGrifo
09-30-2001, 01:30 AM
Strange!!! I finally got it to work, but that's after I figured out that the culprit is in the copy and paste!!!!
When I copy and paste the code, it gives error when the script is run. But when I manually type the code in, no errors!!!
Does anyone know why it won't work when I copy the code from this thread and paste it into my text editor??
btw, Thx Firefly for helping!
SirSteve
09-30-2001, 02:00 AM
Originally posted by ForzaGrifo
Strange!!! I finally got it to work, but that's after I figured out that the culprit is in the copy and paste!!!!
When I copy and paste the code, it gives error when the script is run. But when I manually type the code in, no errors!!!
Does anyone know why it won't work when I copy the code from this thread and paste it into my text editor??
btw, Thx Firefly for helping!
You are probably capturing a space where one shouldn't belong...
hacker
09-30-2001, 07:41 AM
Thanks Firefly for this wonderful hack. ;)
MarkB
09-30-2001, 11:12 PM
Thanks for that extra snippet of code for showthread.php, Firefly :) As the kids like to say, you rock!:D
FreestylerNZ
10-02-2001, 07:28 AM
Heya, I just registered so I can post a question.
How exactly do you have different sponsor ads for each Forum?
I did everything that amykhar listed, including adding $sponsoredby to my forumdisplay template.
Nothing shows up at all in the Forum that I added the banner to through the Admin system!
It would be really great if someone could write more detailed instructions on having unique banners in each forum.
Stephan Whelan
10-03-2001, 07:10 AM
Firefly,
I saw this hack a while ago and wanted to install it - however i've only just got round to doing it - and I just wanted to say THANKS! for a great hack...
Rcooper
10-06-2001, 03:00 AM
Great hack! One Question. . .
i want to link to pictures on another server. I figure i would have to edit this part of the template
<img src="{imagesfolder}/$forum[sponsorimg]" border="0" alt="Proudly sponsored by $forum[sponsorname]">
but i am not sure exactl what to do. I understant that I will have to type the full URL to evey sponsor i add. that is ok with me!
Thank for any help and thanks for a GREAT hack!
Ryan C.
YourHostSucks
10-06-2001, 03:06 AM
I would just replace ( src="images/$forum[sponsorimg]" )
With (src="http://www.blahblah.com/blah/images/$forum[sponsorimg]" )
then you store the images in that folder on that site.. and
when you ad the sponsor just write the picture name..
Seems like the best way to me..
Rcooper
10-06-2001, 03:11 AM
YourHostSucks,
only problem is i want to use comission junction to sponsor the forums. This is the code they give you. . .
<a href="http://www.qksrv.net/click-904372-1614906" target="_top" >
<img src="http://www.qksrv.net/image-904372-1614906" width="120" height="60" alt="" border="0"></a>
Any ideas?
BTY Damn your quick! :)
YourHostSucks
10-06-2001, 03:17 AM
So they are going to be your only sponsor?
<img src="http://www.qksrv.net/$forum[sponsorimg]" border="0" alt="Proudly sponsored by $forum[sponsorname]">
Then in your admin control panel add them and use image-904372-1614906 as the image..
and
http://www.qksrv.net/click-904372-1614906 as the sponsor url.... and Their name..
Rcooper
10-06-2001, 03:22 AM
No not my only one just one to fill in till i get some others. ..
YourHostSucks
10-06-2001, 03:27 AM
I edit my other post.. but 120x60 is pretty large to have..
maybe you should use a different image..
Keep the default code for the hack and make your own image.. just link to what they tell you..
EX: Do not change any code.. Just make a new image and upload it to the correct folder..
then link to http://www.qksrv.net/click-904372-1614906
great hack man, I wanted to know this from the get go
only issue the images were left align, no biggie, ez fix.
Rcooper
10-06-2001, 01:12 PM
[QUOTE]Originally posted by snyx
great hack man, I wanted to know this from the get go
only issue the images were left align, no biggie, ez fix.
Admin
10-06-2001, 01:14 PM
rcooper, use this as your template:
<img src="$forum[sponsorimg]" border="0" alt="Proudly sponsored by $forum[sponsorname]">
And now just enter the full url to the image, e.g "http://www.qksrv.net/image-904372-1614906".
YourHostSucks
10-06-2001, 02:50 PM
Doh! Man I was so sleepy (went to bed after was done with this thread)
I was not thinking clear.. :)
But FireFly is wise and has told you the smart thing to do.
Althou I would still suggest you make your own image
and do not change the code... :)
You will see what I mean if you put that 120x60 image
in the sponsor by section.. (hehe)
Rcooper
10-06-2001, 08:17 PM
FireFly yo Rock! Thanks for the great hack and help!
rcooper
YourHostSucks
10-11-2001, 01:27 AM
Just wan't to make sure you know how much I love this feature! :)
THANK YOU! :D
It is working very well!
Hooper
10-18-2001, 08:26 PM
The hack is wonderful. Just what I wanted. But soon after I installed this my search quit working. I'm not sure if it is the hack or not. Most likely not. However, what could cause my search to stop functioning? When you try a search it comes back to no matches found. If you type less than the required letters for search it does the same thing. It will not redirect or anything. Just no matches found.
Any suggestions?
amykhar
10-18-2001, 09:18 PM
When I put something in phpinclude, my buddy list quit working. Have you put anything in there?
(grasping at straws)
Amy
Hooper
10-18-2001, 10:04 PM
Oh god... I've PhP included my ass off! .............................:mad:
This shouldn't keep anything from working. I hope a developer responds to this... HELP.................................
Freddie Bingham
10-18-2001, 10:11 PM
If you over write a vB variable with something in phpinclude than you can cause all sorts of problems.
My advice? Clean out phpinclude and see if your search works.
Hooper
10-18-2001, 10:24 PM
ok. I'll work on it. Thanks.
Freddie Bingham
10-18-2001, 10:28 PM
Look in the search templates for variables (start with $) and see if you have any matching variables in your phpinclude template, i.e. like $query
Hooper
10-18-2001, 10:39 PM
I had to remove the includes. It works now. But this really stinks. My files that I have included were important to my site.
Are there any work arounds?
Shoot freddie. There are quite a few queries in my php includes.
Freddie Bingham
10-18-2001, 10:44 PM
The work arounds are not to use variables of the same name that vB uses.
You can have all the queries you want, just don't name them '$query' - that one would kill the search.
Hooper
10-18-2001, 10:52 PM
Thanks Freddie.
amykhar
10-23-2001, 10:53 AM
I found a new use for this hack :D
I added one extra field to the database, and now have forum-specific web rings at the bottom of my topical conversation forums. This hack is highly adaptive :)
Example: Scroll down and look right above the footer.
http://www.eaforums.com/forumdisplay.php?s=&forumid=27
Amy
Hooper
10-24-2001, 01:09 AM
Amy your a genious. Very nice. Doesn't shock me in the least that you could figure this out.
Very Nice.
Admin
10-24-2001, 10:17 AM
Great work Amy! :)
etones
11-02-2001, 05:58 AM
Hey, this is a really great hack and I want it, however will it work non 2.2.0??
Please reply, cheers all!
Admin
11-02-2001, 11:21 AM
Most chances are that it does, although I haven't had the time to test it yet.
eva2000
11-02-2001, 11:26 AM
Originally posted by FireFly
Most chances are that it does, although I haven't had the time to test it yet. well i'm waiting ;) :D
etones
11-02-2001, 05:04 PM
Im waiting toooo! :)
etones
11-02-2001, 08:02 PM
Tested on 2.2.0 and it works, great one m8!!
Cheers
eva2000
11-02-2001, 08:37 PM
Originally posted by etones
Tested on 2.2.0 and it works, great one m8!!
Cheers hey taz where did ya forum go ? 404 error http://www.e-tones.co.uk/forums/index.php ??
Admin
11-03-2001, 07:15 AM
[QUOTE]Originally posted by etones
Tested on 2.2.0 and it works, great one m8!!
Cheers
etones
11-03-2001, 08:37 AM
Eva, i took it down while testing, its at a secret location :)
message me on ICQ and i'll show you :)
etones
11-03-2001, 09:07 AM
I simply cannot get the below to work with version 2.2.0, can anyone help?
Originally posted by amykhar
I extended this hack a bit to put a sponsor ad in a particular forum.
To do this, I added a new template called forumdisplay_sponsoredby and put this in it:
<br><br><a href="$foruminfo[sponsorurl]" target="_blank"><img src="images/$foruminfo[sponsorimg]" border="0" alt="Proudly sponsored by $foruminfo[sponsorname]"></a>
<br>
I then edited forumdisplay.php so that
if ($foruminfo['sponsorimg']) {
eval("\$sponsoredby = \"".gettemplate('forumdisplay_sponsoredby')."\";");
}
else {
$sponsoredby = '';
}
was immediately AFTER
if ($foruminfo['allowposting']==1) {
eval("\$newthreadlink = \"".gettemplate('forumdisplay_newthreadlink')."\";");
}
and forumdisplay_sponsoredby was included in the list of required templates.
Finally, I added $sponsoredby to my forumdisplay template.
Sorry for the clumsy explanation. It took a bit of putzing around for me to get this to work, but it does. :)
demo:
http://www.eaforums.com/forumdisplay.php?s=&forumid=27
Amy
amykhar
11-05-2001, 01:40 AM
The problem seems to be in displaying the template. I will play with it a bit when I get a chance.
Amy
amykhar
11-05-2001, 01:51 AM
I don't know why this worked, but it did. I simply copied the eval template line
eval("\$newthreadlink = \"".gettemplate('forumdisplay_newthreadlink')."\";");
from above, pasted it into the if statement, and changed the variables. It works fine now. I am using it for the web rings at the bottom of my forums.
http://www.eaforums.com/forumdisplay.php?s=&forumid=49
Amy
Mr. Slugworth
11-06-2001, 06:43 PM
OK, after installing it by hand typing (copy and past didn't work), everything works great, except that on the forums that I have sponsored, only the images shows up, and not the Proudly sponsored by $$$$$. Any ideas of what could be wrong or were to look. I have gone over everything with a fine tooth comb, and can't seem to find anything that looks out of the ordinary.
Thanks!
amykhar
11-07-2001, 08:58 AM
I couldn't find a forum that you have sponsored. It also seems that you require registration to view posts, and that might be why I am not seeing the sponsor images. Do you have a test account so I can peek at your html source?
Amy
Mr. Slugworth
11-07-2001, 01:33 PM
Amy, thanks for the effort. I changed the code in the template from an alt= text referrence to just text, and it showed up great. For some reason, the image was appearing, but the alt text was missing. Thanks again.
Okay...
call me nutty ... but where do I upload sponosor details like image and such like??
I've got the hack installed....thanks for this ....
don't worry ... I found it on page 2 .. didn't realise this was A HUGE thread...
thanks guys ... really like this
check out http://www.studiowhiz.com/_boards we have this running both on the forum front and in the thread display sections...
now what I'm looking at extending is having the ability to put a FLASH file or GIF/JPG in the FORUM display area ... so sponsors get some space ... not too much (Sitepoint have a bit much) ...
any ideas??
DroppedAtBirth
11-09-2001, 03:54 PM
Great hack works great on 2.2.0:)
Hi Firefly
The demo looks great so your hack must be great too :)
I haven't installed this (yet) because i'm more looking into something that can rotate banners of original banner size 468x60 pixels so with every view another banner will get in place.
I have something within vbportal on my main page and would like to see this on my forum, is this possible ?
eg_92901
11-15-2001, 12:59 PM
I use them as my affiliate program. I installed this hack and it works great but CJ say's your not supposed to alter the code they give you.
The way I have it set up now is I just extracted the link and downloaded the image to my server. So I'm actually altering the code?
Is there any way around this. A way to just copy the full code given directly into a field, instead of breaking it up.
trainer
11-16-2001, 02:07 AM
fixed my problem :D
jminiman
11-17-2001, 09:07 PM
Is there any way that we can extend the functionality of this great hack to individual forums? I have support forums for various developers. I'd like to put up a banner or something like that to graphically show who owns the forum.
Does such a hack exist? Recommendations?
amykhar
11-18-2001, 12:17 AM
jminiman read the thread. The instructions are already here.
Amy
jminiman
11-18-2001, 12:37 AM
Amy,
I'd LOVE to see a live example of your hack. Every URL you have posted is now defunct.
jminiman
11-18-2001, 03:33 AM
Amy,
Please give some details as to how to customize this for each forum. Thanks.
jminiman
11-18-2001, 04:14 AM
Hi all,
I can't get rid of the padding around the sponsor images at http://discuss.pocketnow.com (I added one for each category). I tried looking everywhere to kill that padding. No matter what I did, it remained!
Where do I find the padding for these cells?
Admin
11-18-2001, 05:13 AM
Try adding cellspacing="0" cellpadding="0" to the td tag that contains the banned, in your forumhome_forumbit_level1_nopost_sponsor template.
jminiman
11-18-2001, 02:14 PM
Already tried that. Here's my code:
<!--
<tr id="cat">
<td bgcolor="{categorybackcolor}" colspan="2"><a href="forumdisplay.php?s=$session[sessionhash]&forumid=$forum[forumid]"><normalfont color="{categoryfontcolor}"><b>$forum[title]</b></normalfont></a>
<br><smallfont color="{categoryfontcolor}">$forum[description]</smallfont></td>
<td bgcolor="{categorybackcolor}" colspan="4"><table width="100%" border="0" cellspacing="0" cellpadding="0" align="center"><a href="$forum[sponsorurl]" target="_blank"><img src="{imagesfolder}/$forum[sponsorimg]" border="0" alt="$forum[sponsorname]" align="right"></a></table></td>
</tr>
-->
Admin
11-18-2001, 02:43 PM
No I mean add that to this:
<td bgcolor="#606096" colspan="4">
jminiman
11-18-2001, 03:04 PM
I just figured out what the problem is. Table padding is fine. Problem is that for some reason a space exists right beneath ever Category Name, so as you can see in the screen shot, I can enter a line of text beneath "Unit Specific." If I kill that line in FrontPage, the silly "padding" goes away. Where can I kill that line return?
The attached screen shot shows what I'm talking about.
Littlebit
11-21-2001, 01:39 PM
Could someone help me fix this...I'm getting a parse error on this line in index.php:
if ($forum['sponsorimg'] && $forum['cancontainthreads']==0 && $depth==1) {
Littlebit
11-22-2001, 01:14 PM
I'm going to retry the index.php changes, but before I do, could me added code with incorrect spacing be the cause of getting a parse error? I copied and pasted from your thread and included the skips in lines...would that be my mistake?
Hooper
11-25-2001, 04:13 PM
I too have a parsing problem and just emailed Chen about it.
Parse error: parse error in community/index.php on line 310
I've installed this in 3 or 4 versions up to 2.2.1 without a hitch.
Let's hope Chen see's the problem. I love this hack.
Crinos
11-25-2001, 06:33 PM
Well, one of the most common mistakes when posting code in these forums is how the code changes ...
the most common thing I saw was { appearing instead of { when it's in a code quote .... check those and that might solve the problem...
Littlebit
11-25-2001, 11:31 PM
Ohhh..I bet you are right. I thought it might be the spaces in between the lines of the code posted on this thread. It's one of those things... if you don't know how to write the stuff, you certainly would not know if 123 was intentional or not. Thanks. I'll go back and look at it again and give it another whirl.
At what point did this thread go from fireflys hack to amys? Did firefly make a banner hack and then amy made the proudly supported by "sitepoint" hack. I once saw that hack but can't seem to find it anymore, I'm looking for the hack that adds a sponsors on the index not banners but proudly supported by. Any ides where i can find that in here or anywhere on vbhacks?
Thanks!
amykhar
12-05-2001, 06:16 PM
It's not my hack :D
I merely added a bit that allows you to have a different banner in a given forum. Firefly wrote the main part, and the part that puts the banner on the forumhome page.
Amy
I'm still not clear where to find the hack to install the small adds on the index..?
amykhar
12-05-2001, 10:43 PM
Firefly's first post.
Amy
Originally posted by amykhar
Firefly's first post.
Amy
I did that, and nothing happened. No errors but nothing showed up..
http://www.suprascene.com/supraforums
Lionel
12-18-2001, 01:51 PM
Originally posted by amykhar
I extended this hack a bit to put a sponsor ad in a particular forum.
and forumdisplay_sponsoredby was included in the list of required templates.
Amy
I tried that, it does not show... Please where do you include the required templates? I placed them twice in forumdisplay.php with all others.
I got it to work on the main page. It is the forumdisplay that does not show. I am using 2.21
Lionel
12-20-2001, 04:07 PM
I tried to extend the hack so image shows in forumdisplay but it does not work. The only thing that I am not sure is where to include the template in what list?
amykhar
12-20-2001, 05:03 PM
I put mine in the forum display template, right above the $forumslist variable.
Amy
Lionel
12-20-2001, 05:17 PM
I meant
forumdisplay_sponsoredby
you said that you placed it in the list of required templates.
Where is that list?
amykhar
12-20-2001, 05:25 PM
Ah gotcha!
There is a link to add new templates. Click the link, pick the template set that you want to use it in, and then paste in the code that I supplied.
Amy
Lionel
12-20-2001, 05:30 PM
I did all that before. I thought you meant to place it in forumdisplay.php templatesused=
Any way I can't get it to work on forum display. On main page it is fine...
Lionel
12-20-2001, 05:47 PM
I got it to work but it is not what I was hoping. Maybe you can help?
Look here (http://www.haitiwebs.com/haitianforums/) and you will see image. Click on main category. This is where I wanted to show it also. Yours shows in Forum 1 which is even great.
amykhar
12-20-2001, 06:15 PM
I fixed that on mine as well.
Right now, you placed the code somewhere beneath this
if ($foruminfo['allowposting']==1)
Cut out the code that you added, and paste it right below this instead.
unset($imodcache);
Right now, the code is placed only in forums that allow posting. Moving it up a bit gets it on the category pages as well. I don't have the exact code for you because I am no longer running this exact hack.
Amy
hypedave
12-25-2001, 05:58 PM
can someone edit my forum.php file. I have tryed and still can get it to work, thanks
hypedave,
Please note that posting entire vBulletin scripts is not allowed.
Thanks,
Bira
hypedave
12-26-2001, 11:30 AM
yeah I forgot about that, oops sorry, well can someone still help me out, oh yeah, I hate it when people call me hyperdave
if I wanted an r in hype I would add one, thanks :)
Okiewan
01-10-2002, 10:21 PM
First of all... great hack firefly... nice mods too amykhar!
Got it working great on forum home and forum display... now trying to get it to show-up on threads, ie; if a forum is sponsored, the threads within that forum inherit the sponsor and display it on each thread.
tried building duplicate template called sponsoredby_thread, with the following:
<a href="$foruminfo[sponsorurl]" target="_blank"><img src="{imagesfolder}/$foruminfo[sponsorimg]" border="1" alt="This Forum Made Possible by $foruminfo[sponsorname]"></a>
Modified showthread per iinstructions found here, calling that new template.
Added "$sponsoredby" in the template showthread...
Seems to be some kind of path issue? Picks up a holdedr for the image (including alt text), but no sponsor image and no link.
Any ideas? Am I doing this all wrong?
Thanks in advance for any assistance and thanks again for the hack. VERY useful.
rawnet
01-11-2002, 08:00 PM
Hello,
I have followed the steps and added some sponsors in my admin system.
Unfortunately, they are not showing up on my Forums homepage where they should be. When I go to edit the admin, it does not pre-fill in the form fields for sponsor information.
Can anybody shed any light on this?
All the best,
Kind Regards,
Ross Williams
rawnet
01-12-2002, 12:05 PM
PLEASE - can anybody help? I know this hack has been around for a while, and I've been looking forward to installing it, but for some reason no sponsors are appearing on my forums homepage (http://www.servicepals.com/forums). I'm running vBulletin 2.2.1 and vbPortal.
I can add visitors in the backend, but when I go to edit that forum again, the input fields are not pre-filled with the info I just entered. Is this normal?
The forums are not showing up on my front end, but I would like to clarify the backend first to diagnose what the problem is...sniff sniff... :(
Cheers for now,
Ross
Admin
01-12-2002, 12:19 PM
Start with the original forum.php file, and re-install the hack on it.
rawnet
01-12-2002, 12:32 PM
Hi Firefly,
Will do - how likely is this to solve the problem? Has my phenomena been seen before?
Ross
rawnet
01-12-2002, 12:50 PM
SUCCESS.
I suspect that I'd missed one of the queries out on the forum.php part of the hack.
All working now.
Anybody know how I can incorporate a Commission Junction Smartzone into this code? Reason being that I'd like to rotate the sponsors of each forums without input on my part (I is a lazy bugger).
Cheers for now,
Ross
rawnet
01-12-2002, 01:45 PM
Hello,
I've been trying to incorporate Amy's addition, allowing us to display the sponsor at the top of the forum. Have modified forumdisplay.php, created the new template, but am having problems with this bit :
and forumdisplay_sponsoredby was included in the list of required templates.
Where do I define this?
Hugely impressed with this hack guys,
Cheers,
Ross
Okiewan
01-12-2002, 07:54 PM
add it to the section "$templatesused="
Now if I could get some help with my problem above I would be most thankful! Gotta have it! :)
DiSS Troya
01-12-2002, 09:23 PM
appreciate the hack!
Okiewan
01-14-2002, 05:11 PM
Anyone ? Purdy Please?
First of all... great hack firefly... nice mods too amykhar!
Got it working great on forum home and forum display... now trying to get it to show-up on threads, ie; if a forum is sponsored, the threads within that forum inherit the sponsor and display it on each thread.
tried building duplicate template called sponsoredby_thread, with the following:
<a href="$foruminfo[sponsorurl]" target="_blank"><img src="{imagesfolder}/$foruminfo[sponsorimg]" border="1" alt="This Forum Made Possible by $foruminfo[sponsorname]"></a>
Modified showthread per iinstructions found here, calling that new template.
Added "$sponsoredby" in the template showthread...
Seems to be some kind of path issue? Picks up a holdedr for the image (including alt text), but no sponsor image and no link.
Any ideas? Am I doing this all wrong?
Thanks in advance for any assistance and thanks again for the hack. VERY useful.
Okiewan
01-16-2002, 01:36 PM
Okay, I'm guessing one of the following:
1) No one cares
2) No one has time
3) It can't be done
4) I'm invisable
It would be cool to at least find out why the "sponsor in threads" question isn't being answered... I'd know rather to give-up on it or not.
?
Admin
01-16-2002, 01:39 PM
Try using the $forum array instead of $foruminfo in your sponsoredby_thread template. :)
Okiewan
01-16-2002, 01:56 PM
AH HA!
Thanks a lot FireFly... that worked.
Admin
01-16-2002, 02:12 PM
[QUOTE]Originally posted by Okiewan
AH HA!
Thanks a lot FireFly... that worked.
Ninth Dimension
01-24-2002, 09:34 AM
Cool hack, worked fantasticly first time, thank you.
X-Fan
01-28-2002, 11:35 AM
Originally posted by FireFly
[b][Currently it only supports categories from level 1, and only on forum index. -if you want more please tell and I'll see what I can do.
Great hack, firefly, especially for my forum which, when it goes live, will be sponsored by an online store.
It would be fantastic if you could make it so that sponsored by graphics can show up on forums as well - perhaps by inheriting the sponsor info from the parent category?
I have no idea how to do that, though, so could you possibly create a new step-by-step hack to do that?
Airwaves
02-04-2002, 09:26 AM
working with vb2.2.2 ?
http://www.mobile-forum.com - just upgraded to 2.2.2
I have the bg image from the sitepoint forums sponsor cells and it should go lovely with my colour scheme, how do i have it as the bg image in the sponser cells on my site??
also, how do I get the image to be to the RIGHT instead of the left?
importmix
02-04-2002, 02:30 PM
great hack fly!
i also added amy's hack, but it didn't seem to work. i want the same ad from fly's hack to show on the corresponding threads, sub-forums....so on.
Airwaves
02-05-2002, 05:32 PM
finally, i get the button the right, and the image in the background, but the bg image 'tiles' and i do not want it to, you can see the banner on the forums at http://www.airwavescomms.co.uk/forums
here is the code I am using, can someone please modify it to not get the image to tile, I think CSS is my answer, but, i am defo no good at that.. so i beg you please help me!
<tr id="cat">
<td bgcolor="#336D95" background="https://vborg.vbsupport.ru/images/catagory_backing.gif" colspan="2"><a href="forumdisplay.php?s=$session[sessionhash]&forumid=$forum[forumid]"><normalfont color="#000000"><b>$forum[title]</b></normalfont></a>
<br><smallfont color="#000000">$forum[description]</smallfont></td>
<td colspan="4" background="http://www.airwavescomms.co.uk/forum/images/spsback.gif"><a href="$forum[sponsorurl]" target="_blank"><img src="http://www.airwavescomms.co.uk/forum/images/$forum[sponsorimg]" border="0" align="right" width="88" height="31" alt="Proudly sponsored by $forum[sponsorname]"></a></td>
</tr>
i use {imagesfolder } instead of the full URL however, but vb.org decided to parse that and put its own link there.... :confused:
extreme_old
02-06-2002, 01:58 PM
Great hack!!
I have installed the hack now, but how do I then decided what banner to show in each catagories? What's the size of the banners?
Ninth Dimension
02-06-2002, 03:08 PM
All customisation and design of the banners is up to you, you set them up as you see fit, however I personally have gone for 210x37 images
extreme_old
02-06-2002, 07:26 PM
ok, but where do I set which banner for with catagory. I mean I what .php site or template and how? I want to use a difference banner for all catagories and how to I set the url too?? Please help, or paste some code that shows me what to do?
Thanks
Airwaves
02-06-2002, 07:34 PM
the banners can be set up in the forum category properties in admin cp.
each category can have a differnet banner this way
extreme_old
02-07-2002, 02:08 PM
What's wrong here:
Database error in vBulletin Control Panel 2.2.1:
Invalid SQL: UPDATE forum
SET
styleid='1', title='General', description='',
active='1', displayorder='1', parentid='-1', parentlist='10,-1',
allowposting='1', cancontainthreads='0',
sponsorname='2pass',sponsorimg='2pass.gif',
sponsorurl='http://www.mysponsor.com/cgi-bin/tts-in.cgi?1020207-0',daysprune='30',
newpostemail='', newthreademail='',
moderatenew='0', allowhtml='0', allowbbcode='1',
allowimages='0', allowsmilies='1', allowicons='1',
styleoverride='0', allowratings='1', countposts='1',
moderateattach='0'
WHERE forumid='10'
mysql error: Unknown column 'sponsorname' in 'field list'
mysql error number: 1054
I have made all the changes that Firefly describes and. I'am running version 2.2.1
freehtml
03-10-2002, 01:48 PM
will this work on version 2.2.3 also?
Admin
03-10-2002, 04:37 PM
Yup it should.
Floris
03-14-2002, 08:35 PM
and 2.2.4 ?
trainer
03-15-2002, 04:08 AM
could one of the pros help explain how to add-on the specific sponsor for each forum so it carries over to the threads in that forum.
theironmic
03-15-2002, 04:11 AM
where de u put the image link at
Floris
03-15-2002, 11:51 AM
I just applied the hack and everything went fine.
I guess this works on vBulletin 2.2.4
The only thing I have at the moment is the following:
I have applied my own 'Category background image' template hack, and it looks like the categorie is now a default colour instead of a given background.
I fixed this by adding:
background="{imagesfolder}/catbgtitle.gif"
to the newly added forumhome_forumbit_level1_nopost_sponsor template (in the <td> tags)
I also noticed that the categories that had the banner set to them, no longer were devided from the other categories (I have applied my 'Split categories from eachother' template hack.)
So I re-applied that hack, just only to the new template, take a look at my site if you wonder what i mean, this is how my template looks now:
</table>
</td></tr></table><br>
<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center"><tr><td>
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%">
<tr id="cat">
<td background="{imagesfolder}/catbgtitle.gif" bgcolor="{categorybackcolor}" colspan="2"><a href="forumdisplay.php?s=$session[sessionhash]&forumid=$forum[forumid]"><normalfont color="{categoryfontcolor}"><b>$forum[title]</b></normalfont></a><br><smallfont color="{categoryfontcolor}">$forum[description]</smallfont></td>
<td background="{imagesfolder}/catbgtitle.gif" bgcolor="{categorybackcolor}" colspan="4"><a href="$forum[sponsorurl]" target="_blank"><img src="{imagesfolder}/banners/$forum[sponsorimg]" border="0" alt="Proudly sponsored by $forum[sponsorname]"></a></td>
</tr>
<tr align="center" >
<td background="{imagesfolder}/catbgindex.jpg" bgcolor="{tableheadbgcolor}"><smallfont> </smallfont></td>
<td background="{imagesfolder}/catbgindex.jpg" bgcolor="{tableheadbgcolor}" width="80%" align="left"><smallfont color="{tableheadtextcolor}"><b>Forum</b></smallfont></td>
<td background="{imagesfolder}/catbgindex.jpg" bgcolor="{tableheadbgcolor}"><smallfont color="{tableheadtextcolor}"><b>Posts</b></smallfont></td>
<td background="{imagesfolder}/catbgindex.jpg" bgcolor="{tableheadbgcolor}"><smallfont color="{tableheadtextcolor}"><b>Threads</b></smallfont></td>
<td background="{imagesfolder}/catbgindex.jpg" bgcolor="{tableheadbgcolor}" nowrap><smallfont color="{tableheadtextcolor}"><b>Last Post</b></smallfont></td>
<td background="{imagesfolder}/catbgindex.jpg" bgcolor="{tableheadbgcolor}" width="20%"><smallfont color="{tableheadtextcolor}"><b>Moderator</b></smallfont></td>
</tr>
Please notice that I have my banners in imagedir/banners/ directory! And that I use category & indexing background images!So do not forget to edit that to your liking
Now,
Isn't there any way of removing that line in the middle ?
Additional question:
Is there any way of making this only show up for unregistered members?
Guests > get the banners in category
Registered members > dont. they get normal view
forumuser
03-15-2002, 08:30 PM
Once you have installed this hack, which I have done, where do you add the sponsors? I cannot seem to find that, thanks a lot, this hack is awesome by the way
Ninth Dimension
03-15-2002, 10:36 PM
you add the sponser information in the admin panel, just choose to modify the categories, and it should ask you for some information regarding that particular cat.
Good Luck.
B16MCC
03-18-2002, 10:16 PM
ok I applied the hack and I have the new fields in my CP.
When I click save I get an error detailed below..
There seems to have been a slight problem with the PS2 HOUSE database.
Please try again by pressing the refresh button in your browser.
An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.
We apologise for any inconvenience.
OK Standard Stuff..
Here's my detail..
Database error in vBulletin Control Panel 2.2.4:
Invalid SQL: UPDATE forum
SET
styleid='1', title='General', description='General Discussion',
active='1', displayorder='1', parentid='-1', parentlist='1,-1',
allowposting='0', cancontainthreads='0',
sponsorname='Morning Norman',sponsorimg='www.morningnorman.com/photos/Stella.jpg',
sponsorurl='http://www.morningnorman.com/ubb',daysprune='0',
newpostemail='', newthreademail='',
moderatenew='0', allowhtml='1', allowbbcode='1',
allowimages='1', allowsmilies='1', allowicons='1',
styleoverride='0', allowratings='1', countposts='1',
moderateattach='0'
WHERE forumid='1'
mysql error: Unknown column 'sponsorname' in 'field list'
mysql error number: 1054
Date: Tuesday 19th of March 2002 12:03:42 AM
Script: http://www.morningnorman.com/vbb/vbb/admin/forum.php3
Referer: http://www.morningnorman.com/vbb/admin/forum.php3?action=edit&forumid=1
Can someone help me with this please.. I am somewhat of a dummy when it comes to scripting..
Admin
03-19-2002, 05:12 AM
Run the three queries I tell you to run in my first post, they'll add the required fields to your table. :)
tanman
03-19-2002, 02:02 PM
This sponsored by hack is cool.
You said you wanted to know if we wanted more :)
Our site is ad supported. I need to make sure the page top banners are not ignored.... Need to run the banners past some eyeballs, inside the forum threads.
How about a hack that adds a "sponsored by" banner or message with graphic INSIDE a forum thread, automatically, every X posts or so (where x could be set by admin to 10 or 12 or ???)?
One of our competitors has this on a phBB or some such...
Would that be hard?
nafae
03-28-2002, 03:49 AM
Hmm Ok I installed this (Exactly) and made sure by going back and checking all the modified files, however whenever I add a sponsor to a forum, the category just dissapears! Then when I remove the sponsorship fields, the categories reeapear again!
I am unsure of what this is, firefly or anyone else any sort of help you could offer would be appreciated :o
mewgood
03-28-2002, 04:18 AM
Will this owkr for 2.2.4?
Admin
03-28-2002, 08:33 AM
Yes mewgood, and nafae did you add the template I told you to add? And made sure you added it to all template sets?
LouChipher
03-28-2002, 10:02 AM
After 15 pages...
FireFly, your hack is only for categories and not specially for forums, correctly?
Admin
03-28-2002, 02:25 PM
Yes.
nafae
03-28-2002, 04:46 PM
I added the template in the instructions, but not any others, are there other templates I need to add?
Ninth Dimension
04-02-2002, 03:15 PM
Hi everyone, does this hack have the ability to display the sponsors banners on pages other than the forumhome yet?
Admin
04-03-2002, 05:17 AM
Yeah I think someone posted how to make it show up showthread.php. Browser the thread. :)
Ninth Dimension
04-03-2002, 08:30 AM
Ah cool (maybe I should spend some more time reading these messages, but 15 pages is a bit much, and I was so busy yesterday)
dgessler
04-12-2002, 02:28 AM
I have a question if someone can be nice enough and show me some light. Would it be possible to run this with something like phpAds, or any similar ad-tracking software? Just so that it can keep track of impressions, etc. Possible?
Thanks a lot,
Dan
hypedave
04-12-2002, 02:48 AM
I had this previously installed on my vb 2.2.1 board when vb 2.2.5 came out, I built a whole new board, I cant get this to install on vb 2.2.5 for anything in the world has anybody tryed ?
Wayne2k1.com
04-12-2002, 07:31 AM
Yup.
Works with 2.2.5 as well :)
hypedave
04-12-2002, 01:55 PM
Originally posted by Wayne2k1.com
Yup.
Works with 2.2.5 as well :)
how did you get it to work, since I know its works now, I will try again, and i have a problem again I will let you know
JackG
04-14-2002, 06:48 PM
Hi, when I run this in phpMyAdmin:
ALTER TABLE forum ADD sponsorname VARCHAR(100) not null AFTER cancontainthreads, ADD sponsorimg VARCHAR(100) not null AFTER sponsorname, ADD sponsorurl VARCHAR(255) not null AFTER sponsorimg
I get this message;
Your SQL-query has been executed successfully
No tables found in database.
And it dosent create the tables.
I am doing it in the correct place and
their is a forum table thier. My vB version
is 2.2.5.
Does anyone know why this is not working?
Thanks in advance.
UPDATE:
I Have Since Manually Added These Tables.
Airwaves
04-19-2002, 09:09 PM
http://www.sitepointforum.com/
has a nice 'proudly sponsored by' graphic which isnt tiled, when I put this image into my forum, it tiles.
I know you can fix this with CSS, but I cant remeber the code, can anyone help please.
BTW, nice hack, have it on my forum :D
kbusque
05-08-2002, 05:57 PM
I installed the hack, and I think it is working (didn't break anything), where do i go to add sponsors? Sponsor img's etc? Directly in the mysql db?
i dont have time to read the whole thread, does this work for 2.2.5 and 2.2.6 final
Wayne2k1.com
05-28-2002, 05:58 AM
lol :p
I don't have time to install this hack...will you install it for me? :tired:
Admin
05-28-2002, 06:59 AM
[QUOTE]Originally posted by NerdNations
i dont have time to read the whole thread, does this work for 2.2.5 and 2.2.6 final
Palyntir
05-29-2002, 06:54 PM
has anyone been able to make this work with flash banners?
Demetris
05-31-2002, 05:57 PM
Fantastic
Just installed this hack and already have my first paying sponsor.
The only problem i have is that whichever forum headin i add a sponsor to i then loose the link for that forum.
Did i do something wrong
bpuetz
06-20-2002, 11:15 PM
I just love this hack! My site (still in development) will be ad free simply because I hate banners. But this hack gives me a way to generate a few dollars for bandwidth while still being very tasteful and subdued. Thanks so much, FireFly! If you ever make it down San Antonio way, I owe you a margarita! :)
A question. I would like to get rid of the line between the category name cell and the sponsor cell. Anyone know a way to do this without losing the rest of the lines? What I would really like to do is colspan the entire row and left justify the category name and right justify the sponsor ad in the resulting cell. I don't suppose anyone knows any tricks to do this?
Thanks!
Bill
almightyone
06-27-2002, 09:15 PM
Originally posted by NerdNations
i dont have time to read the whole thread, does this work for 2.2.5 and 2.2.6 final
if you dont got time to read a few pages wher will you find the time to install this hack? :ermm: :tired:
robdj
07-02-2002, 12:47 PM
OK, I had a similar problem to nafae -
"whenever I add a sponsor to a forum, the category just dissapears! Then when I remove the sponsorship fields, the categories reeapear again!"
The problem was that I had the template name incorrect. Make sure it is "forumhome_forumbit_level1_nopost_sponsor" exactly (Version 2.2.6)
Great hack - five stars!
Duke Of Lion
07-11-2002, 02:48 PM
Originally posted by FireFly
[b]Works with vBulletin v2.2.0!
For more info about running queries take a look here (http://www.vbulletin.com/forum/showthread.php?s=&threadid=26272) or here (http://www.vbulletin.com/forum/showthread.php?threadid=18558).
I want to look there but it doesn't work! says to enter my username and then my registration number, yeah well my usernames on .org and .com are not the same..... I WANT THEM TO BE, I asked for it when i didn't registred right.....
.org = duke of lion
.com = duke of lions
Please help me out! I am a paying customer and I would appreciate your help!
Admin
07-12-2002, 05:50 AM
Try https://vborg.vbsupport.ru/showthread.php?s=&threadid=26272 ...
Duke Of Lion
07-16-2002, 06:49 PM
Works fine on 2.2.6, but....
On my techie style it the forum (Category) dissapears? what do I do wrong? Also where do I add "Proudly sponsored by..." in the category?
FireFly, THANK You, hope you don't want a piece of the money, it'll bring ;)
Admin
07-16-2002, 06:55 PM
You need to add the new template to all of your template sets.
Duke Of Lion
07-16-2002, 07:35 PM
What about if i have 2 styles and my default image folder for the 2nd style is not /image? what do I fill in when I add the sponsor?
Actually I want to fill in the full path so I don't have the problem? what do I do?
FireFly, THANK You, hope you don't want a piece of the money, it'll bring
FireFly r u too rich already? ;)
Sorry, that I am just a poor student...
dieKetzer
07-17-2002, 09:56 AM
Use this for your template:
<tr id="cat">
<td bgcolor="#005628" colspan="6" cellspacing="0" cellpadding="0">
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD width="50%" valign="middle"><A href="forumdisplay.php?s=$session[sessionhash]&forumid=$forum[forumid]"><NORMALFONT color="#FFCC00"><B>$forum[title]</B></NORMALFONT></A><br><smallfont color="{categoryfontcolor}">$forum[description]</smallfont></TD>
<TD width="50%" valign="top" align="right"><A href="$forum[sponsorurl]" target="_blank"><IMG src="https://vborg.vbsupport.ru/greentek/$forum[sponsorimg]" border="0" alt="Proudly sponsored by $forum[sponsorname]"></A></TD>
</TR>
</TABLE>
</td>
</tr>
Originally posted by bpuetz
A question. I would like to get rid of the line between the category name cell and the sponsor cell. Anyone know a way to do this without losing the rest of the lines? What I would really like to do is colspan the entire row and left justify the category name and right justify the sponsor ad in the resulting cell. I don't suppose anyone knows any tricks to do this?
Thanks!
Bill
bpuetz
07-21-2002, 10:42 PM
The problem (a good problem!) I'm running into with this is that I only have four categories, and one in particular is the one that the sponsors want to be on.
What would it take to allow me to have a pool of sponsors and rotate them randomly? I would like to be able to have individual sponsor pools by category although one pool for all categories would be acceptable. I would like to have equal exposure for all sponsors in the same pool.
Firefly, I would certainly step up with some cash if you could make this happen -- and I bet a number of other folks would also.
Admin
07-22-2002, 06:03 AM
Have you tried these hacks?
https://vborg.vbsupport.ru/showthread.php?s=&threadid=41154&highlight=ads
https://vborg.vbsupport.ru/showthread.php?s=&threadid=39074&highlight=ads
carpman
07-26-2002, 04:16 PM
Hello, will this hack work ok with this hack?
https://vborg.vbsupport.ru/showthread.php?s=&threadid=33961
cheers
Warlord
07-29-2002, 12:17 AM
Originally posted by almightyone
if you dont got time to read a few pages wher will you find the time to install this hack? :ermm: :tired:
Methinks it'd take alot longer to read 16 pages then it would to install this hack. :p
Warlord
07-31-2002, 12:50 AM
Nice hack Firefly! :)
Note to anyone who doesn't know... this hack DOES work on 2.2.6 :)
mikeschultz
08-05-2002, 03:42 PM
is there any way i can add sponsors to the forums, not just the categories?
Destee
08-06-2002, 01:43 AM
FireFly ... Thank You Again !
Wonderful Hack ... (clicking on installed now).
:)
Destee
DannyITR
08-21-2002, 04:08 AM
Here is my error
Parse error: parse error, unexpected ':' in /home/dannyitr/public_html/forums/admin/forum.php on line 156
adn this is the line they are talking about:
VALUES
(NULL,'$styleset','".addslashes <http://www.php.net/addslashes>($title)."','".addslashes <http://www.php.net/addslashes>($description)."','$isactive','$displayorder','$parentid',
DannyITR
08-21-2002, 04:33 AM
Fixed it. for some reason, when I copied and pasted the code it added a website after each "addslashes". I took out all the websites since they are not in the code provided on the first page and it worked!
DannyITR
08-21-2002, 05:37 AM
I can't get the banner in the thread like it says on page 5. Can someone help me?
"and forumdisplay_sponsoredby was included in the list of required templates.
I don't know how to do this so I left it out. Can someone help me?
"SirSteve, yes, but you might want to change forumdisplay_sponsoredby to another template.
Add that code (with the new template) in showthread.php right after this:"
Why would I modify the new template I just created? I tried re-naming it but all my banners disapeared. I still can't get the banners in the threads.
Help.
Audionuts
08-23-2002, 12:07 AM
man this is exatcly what i have been looking for, but i cant get this to work :( after i edit the forum.php and upload, i go to the modify forums in the cp i see the the sponsor stuff on top of everything?? looks real funky and i saw a gif posted here that shows the feature in the options of each forum, and thats not what i get at all...what could i be doing wrong? am i adding the code to the wrong place? i'm a little lost with the instalation instructions...sorry to bug but if anyone has time to help i would really apreciate...
DannyITR
08-27-2002, 04:25 AM
When I wan to add a new forum, I get this problem:
Database error in vBulletin Control Panel 2.2.6:
Invalid SQL: INSERT INTO forum
(forumid,styleid,title,description,active,displayo rder,parentid,
parentlist,allowposting,cancontainthreads,daysprun e,newpostemail,newthreademail,
moderatenew,allowhtml,allowbbcode,allowimages,allo wsmilies,allowicons,
styleoverride,allowratings,countposts,moderateatta ch)
VALUES
(NULL,'1','Vole / Stolen','Post items that have been stolen so people can keep an eye out. ','1','3','13',
'','1','1','','',
'','30','','',
'0','0','1','1','1','1',
'0','1','1','0')
mysql error: Column count doesn't match value count at row 1
mysql error number: 1136
Date: Tuesday 27th of August 2002 01:20:26 AM
Script: http://www.montrealracing.com/forums/forums/admin/forum.php
Referer: http://www.montrealracing.com/forums/admin/forum.php?s=&action=add&parentid=13
DannyITR
08-27-2002, 02:30 PM
They refuse to help me on vb.com so can anyone here please respond?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.