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 |
#202
|
|||
|
|||
where de u put the image link at
|
#203
|
|||
|
|||
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: Code:
background="{imagesfolder}/catbgtitle.gif" 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: Code:
</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> 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 |
#204
|
|||
|
|||
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
|
#205
|
||||
|
||||
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. |
#206
|
|||
|
|||
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/adm...edit&forumid=1 Can someone help me with this please.. I am somewhat of a dummy when it comes to scripting.. |
#207
|
||||
|
||||
Run the three queries I tell you to run in my first post, they'll add the required fields to your table.
|
#208
|
|||
|
|||
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? |
#209
|
||||
|
||||
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 |
#210
|
|||
|
|||
Will this owkr for 2.2.4?
|
#211
|
||||
|
||||
Yes mewgood, and nafae did you add the template I told you to add? And made sure you added it to all template sets?
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|