The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
Works with vBulletin v2.2.0!
This hack will allow you to add banners to your categories row (like done on 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! First of all, run the following query Code:
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 Add a custom template, name it forumhome_forumbit_level1_nopost_sponsor and put the following in it: 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"><a href="$forum[sponsorurl]" target="_blank"><img src="{imagesfolder}/$forum[sponsorimg]" border="0" alt="Proudly sponsored by $forum[sponsorname]"></a></td> </tr> In forum.php (under your admin folder) add PHP Code:
PHP Code:
Still in forum.php, replace PHP Code:
PHP Code:
Still in forum.php, add PHP Code:
PHP Code:
Still in forum.php, replace PHP Code:
PHP Code:
Save and upload forum.php. In index.php (the main folder) replace this line PHP Code:
PHP Code:
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! Show Your Support
|
Comments |
#182
|
||||
|
||||
appreciate the hack!
|
#183
|
||||
|
||||
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: PHP Code:
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. |
#184
|
||||
|
||||
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. ? |
#185
|
||||
|
||||
Try using the $forum array instead of $foruminfo in your sponsoredby_thread template.
|
#186
|
||||
|
||||
AH HA!
Thanks a lot FireFly... that worked. |
#187
|
||||
|
||||
[QUOTE]Originally posted by Okiewan
AH HA! Thanks a lot FireFly... that worked. |
#188
|
||||
|
||||
Cool hack, worked fantasticly first time, thank you.
|
#189
|
||||
|
||||
Quote:
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? |
#190
|
||||
|
||||
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? |
#191
|
||||
|
||||
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. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|