![]() |
Quote:
|
Nice hack Firefly! :)
Note to anyone who doesn't know... this hack DOES work on 2.2.6 :) |
is there any way i can add sponsors to the forums, not just the categories?
|
FireFly ... Thank You Again !
Wonderful Hack ... (clicking on installed now). :) Destee |
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','$p arentid', |
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!
|
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? Quote:
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. |
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...
|
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...dmin/forum.php Referer: http://www.montrealracing.com/forums...dd&parentid=13 |
They refuse to help me on vb.com so can anyone here please respond?
|
allright! i finally got it...and i was just inserting the code in the wrong places :) my fault 100% i just missunderstood the directions at first ...but this hack rocks!
DannyITR sorry but i dont have a clue how to help you with the problem you are having:( or i would help... |
Mabye I'm confusing.
Here are my two problems: I can't add a new forum since modifying forums.php I can't get the banner in each thread. Would anyone be able to help me? |
ok firs thing is, did you maka aback up of the forum.php file?
you should go back the the original, and in worse case senario jus get it from your original vb zip or just grab it from the svb site... once you do that...you should go back and start from the first step on the forum.php file... i have to say i could not get it to work at first either, but it was all due to my errors, the hack works very nicely, if you want to see it working go to www.dsswareforums.com. |
I see you've got the banners in each thread. They really didn't explain it very well in this thread. Are you able to tell me quickly what I need to modify?
Thanks for helping! |
well honestly i just had to do exactly what the instructions said...
i dont know how else to really help, you just have to follow it step by step. |
The thing is, they didn't really explain it. On page five the question is asked and then someone answers with just a bunch of code. I don't know where to put or in which file. How did you do it?
|
ok i took FireFlys instruction and just tried to change a couple of things on the description to try to make a loittle more clear...dot know if this will help, but i'm just trying to help :)
---------------------------------------------------------------------------------- ////First of all, run the following Mysql 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 ////Add a custom template, name it forumhome_forumbit_level1_nopost_sponsor and put the following in it: <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 bgcolor="#336D95" background="https://vborg.vbsupport.ru/images/catagory_backing.gif" colspan="4"><a href="$forum[sponsorurl]" target="_blank"><img src="https://vborg.vbsupport.ru/images/$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) find: makeyesnocode("Count posts made in this forum towards user post counts?","countposts",1); and right after this code 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"); ////Still in forum.php, replace this line: $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)."','".adds lashes($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)."','".adds lashes($description)."','$isactive','$displayorder ','$parentid', '','$allowposting','$cancontainthreads','".addslas hes($sponsorname)."','".addslashes($sponsorimg)."' , '".addslashes($sponsorurl)."','$daysprune','".adds lashes($newpostemail)."','".addslashes($newthreade mail)."', '$moderatenew','$aallowhtmlcode','$aallowbbcode',' $aallowimgcode','$aallowsmilies','$aallowicons', '$styleoverride','$allowratings','$countposts','$m oderateattach')"); ////Still in forum.php, find: makeyesnocode("Count posts made in this forum towards user post counts?","countposts",$forum[countposts]); right after that 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]); ////Still in forum.php, find: $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'"); and replace 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)."',sponsor img='".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'"); ////Save and upload forum.php. In index.php (the main folder) find this line eval("\$forumbits .= \"".gettemplate("forumhome_forumbit_level$depth$te mpext")."\";"); replace 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$te mpext")."\";"); } ////Save and upload index.php. ----------------------------------------------------------------------------------- |
I installed it and it works great! One thing we use this Hack:
http://www.vbulletin.com/forum/showt...ht=split+forum and when we insert the sponsor ad into the forums for some reason they merge back together thus voiding xiphoid's hack. Any help? Thanks |
oh i had the same problem...you need to do the same hack to the forumdisplay_sponsoredby and forumhome_forumbit_level1_nopost_sponsor
then you will be all set... |
did I mess something? I only created one tmeplate:
forumhome_forumbit_level1_nopost_sponsor Do I need to create another one: forumdisplay_sponsoredby Cause the mod worked with out it. Just merged all the forums together. And which Hack this one or the one that spartated out the forums from each other? Thanks |
Quote:
to your forumhome_forumbit_level1_nopost_sponsor and you will get the break back... |
Thanks!!! Worked like a charm.
|
glad i could help :)
|
will this hack work on version 2.2.8
|
I am using a modded version of vBIndex, so I do not have this code in my index.php:
Quote:
any idea where I'd put the following code then? Quote:
TIA for any help. |
Thank you for the great hack!
Installed on 2.2.8 and working without problem. Thanks Rand |
are there any screen shots of the admin functions for this hack?
I guess what I'm wondering is: How easy is it to add the sponsor information & images? Thx! |
Very nice, think i will install this hack.
Lee |
Ok i installed and have changed the template big time !!
See what you think, Template here.............................................. .. Lee |
this hack uses the 'sponsorimg' field in order to display the rest of the fields. I do not use the sponsorimg field (don't like to display sponsors logos). If you install it and don't include an image for the sponsor, don't expect it to work, but the hack of the hack is easy...just a heads up...
just change this line: if ($forum['sponsorimg'] && $forum['cancontainthreads']==0 && $depth==1) { to if ($forum['sponsorurl'] && $forum['cancontainthreads']==0 && $depth==1) { (assuming you included a link to the sponsor's site) :) |
Hi Firefly,
I need to uninstall this hack. What query do I need to run to complete this? Thanks and hi :) A guess: ALTER TABLE forum REMOVE sponsorname VARCHAR(100) not null AFTER cancontainthreads, REMOVE sponsorimg VARCHAR(100) not null AFTER sponsorname, REMOVE sponsorurl VARCHAR(255) not null AFTER sponsorimg ? lol |
Great mod. Thanks.
Where do I put the "proudly supported by" text to get it to display like on Site Point? |
Great hack....very easy to install
Quote:
cheers! |
I have the expand contract on forum home hack installed and when I install the banner code it breaks my expand contract. Is there any way around this?
|
What are the specific dimensions for the banner? I assume that the sponsor needs to supply the banner in that size (or I have to create it) - yes?
Also, I'm using 2.2.8...I'm assuming this hack works for that? I'm somewhat dense on the topics of hacks, so forgive me if these questions seem sophmoric. Thanks in advance for any replies. Based on the examples I've viewed, this is a lovely hack. :banana: PK |
Just installed the hack, as per instructions on page one, to a 2.2.9 forum. GREAT work. Changed it a bit so that it would display outside site images such as those from commission junction and added "Proudly Sponsored By" to the left of the banner, and then right aligned the lot.
Very nice hack, those wanting to see it working take a look at www.wweforums.co.uk. |
Quote:
|
Quote:
PHP Code:
PHP Code:
PHP Code:
And then in the admin panel just put in the full URL to the image, instead of a partial URL. This image URL can be those given by CJ. Just make sure you use a small sponsorship image! |
Hi, I am installing FireFly's hack on a new Parenting Forum for a customer of mine. I followed the instructions on the original post (and did it twice) but the ads don't show up.. My main forum list page stays the same after I go into the control panel and enter sponsor information to a forum.
I had tried another hack before this one that added a banner anywhere (i put it at bottom) and it worked, but I wanted a hack that allowed banners on each Main Category listing on the main page. So I left the other hack in and installed this one.. The SQL query went through in phpmyadmin with no problems.. I double checked them. I did the code modifications in admin/forum.php and index.php twice, added the template forumhome_forumbit_level1_nopost_sponsor with the correct code, and went into the control panel to add the sponsor info. I guess my question is, if the script can't find the image for the sponsor does it just not show anything (as if the hack wasnt installed) ? The control panel entry for the image says not to put the images folder in the path.. well is that the images folder in my "Forum" folder or the root of my server? I tried many combinations but it acts as if the hack isn't even there. Any suggestions??? Please help! Thanks a lot- BTW the forum is: www.echildshealth.com/Forum James Johns Retina-X Studios www.retinax.com |
ummm retinax, forgive me if I am a wee bit dumb, but I don't see any categories on your forum home. That is where the banners would be - not on the individual forums.
Amy |
All times are GMT. The time now is 01:19 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|