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 |
#72
|
||||
|
||||
Nice Hack FireFly works great
|
#73
|
|||
|
|||
Well I tried to add this to PHP include, then use it on the forums
PHP Code:
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? |
#74
|
|||
|
|||
Quote:
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!!! |
#75
|
||||
|
||||
MarkB:
PHP Code:
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. |
#76
|
|||
|
|||
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? |
#77
|
|||
|
|||
Quote:
when you enter the path to the image just enter: /images/sponsors/blahblah.gif or what folder you create and sponsors image name... |
#78
|
||||
|
||||
[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? |
#79
|
||||
|
||||
[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... |
#80
|
|||
|
|||
doh, yea i have mine setup in the /sponsor folder..
and /sponsors/blah.jpg just a brain fart -=/ |
#81
|
|||
|
|||
Quote:
Thanks. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|