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 |
#152
|
|||
|
|||
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. |
#153
|
||||
|
||||
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) { |
#154
|
||||
|
||||
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?
|
#155
|
||||
|
||||
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. |
#156
|
||||
|
||||
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... |
#157
|
||||
|
||||
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.
|
#158
|
|||
|
|||
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! |
#159
|
||||
|
||||
It's not my hack
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 |
#160
|
|||
|
|||
I'm still not clear where to find the hack to install the small adds on the index..?
|
#161
|
||||
|
||||
Firefly's first post.
Amy |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|