vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Add "Sponsored by" banners to your forum categories (https://vborg.vbsupport.ru/showthread.php?t=26818)

Warlord 07-29-2002 12:17 AM

Quote:

Originally posted by almightyone

if you dont got time to read a few pages wher will you find the time to install this hack? :ermm: :tired:

Methinks it'd take alot longer to read 16 pages then it would to install this hack. :p

Warlord 07-31-2002 12:50 AM

Nice hack Firefly! :)

Note to anyone who doesn't know... this hack DOES work on 2.2.6 :)

mikeschultz 08-05-2002 03:42 PM

is there any way i can add sponsors to the forums, not just the categories?

Destee 08-06-2002 01:43 AM

FireFly ... Thank You Again !

Wonderful Hack ... (clicking on installed now).

:)

Destee

DannyITR 08-21-2002 04:08 AM

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',

DannyITR 08-21-2002 04:33 AM

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!

DannyITR 08-21-2002 05:37 AM

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:


"SirSteve, yes, but you might want to change forumdisplay_sponsoredby to another template.
Add that code (with the new template) in showthread.php right after this:"

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.

Audionuts 08-23-2002 12:07 AM

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...

DannyITR 08-27-2002 04:25 AM

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

DannyITR 08-27-2002 02:30 PM

They refuse to help me on vb.com so can anyone here please respond?

Audionuts 08-27-2002 07:59 PM

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...

DannyITR 08-28-2002 11:29 PM

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?

Audionuts 08-29-2002 02:52 AM

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.

DannyITR 08-29-2002 11:44 PM

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!

Audionuts 08-29-2002 11:55 PM

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.

DannyITR 08-30-2002 03:28 PM

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?

Audionuts 08-30-2002 03:56 PM

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.


-----------------------------------------------------------------------------------

cklaszlo 09-20-2002 05:37 PM

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

Audionuts 09-20-2002 06:30 PM

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...

cklaszlo 09-20-2002 07:49 PM

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

Audionuts 09-20-2002 08:31 PM

Quote:

Originally posted by cklaszlo
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

just do the same thig you did to your forumhome_forumbit_level1_nopost (xiphoid's hack)
to your forumhome_forumbit_level1_nopost_sponsor
and you will get the break back...

cklaszlo 09-20-2002 08:51 PM

Thanks!!! Worked like a charm.

Audionuts 09-20-2002 08:58 PM

glad i could help :)

pitt2424 10-02-2002 11:34 AM

will this hack work on version 2.2.8

grooveh 10-03-2002 04:37 PM

I am using a modded version of vBIndex, so I do not have this code in my index.php:

Quote:

eval("\$forumbits .= \"".gettemplate("forumhome_forumbit_level$depth$te mpext")."\

any idea where I'd put the following code then?

Quote:

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")."\";");
}

TIA for any help.

Rand M 10-17-2002 09:56 PM

Thank you for the great hack!

Installed on 2.2.8 and working without problem.

Thanks
Rand

pcoskat 10-24-2002 04:34 PM

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!

XrayHead 11-24-2002 08:32 PM

Very nice, think i will install this hack.

Lee

XrayHead 12-05-2002 01:47 PM

Ok i installed and have changed the template big time !!

See what you think,

Template here.............................................. ..


Lee

jeffj 12-06-2002 12:00 AM

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)

:)

Littlebit 12-06-2002 05:58 PM

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

SVTBlackLight01 01-14-2003 06:32 AM

Great mod. Thanks.

Where do I put the "proudly supported by" text to get it to display like on Site Point?

cyc 01-17-2003 08:49 PM

Great hack....very easy to install

Quote:

Where do I put the "proudly supported by" text to get it to display like on Site Point?
It looks like its part of the displayed banner

cheers!

Winky 01-19-2003 12:04 AM

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?

pcoskat 02-01-2003 08:59 PM

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

cymru2000 02-10-2003 10:09 PM

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.

SVTBlackLight01 02-10-2003 10:26 PM

Quote:

Originally posted by cymru2000
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.

How did you use the commission junction images?

cymru2000 02-11-2003 03:26 PM

Quote:

Originally posted by SVTBlackLight01


How did you use the commission junction images?

In
PHP Code:

forumhome_forumbit_level1_nopost_sponsor 

I Put
PHP Code:

<img src="$forum[sponsorimg]border="0" alt="Proudly sponsored by  $forum[sponsorname]"

in relace of
PHP Code:

<img src="{imagesfolder}/$forum[sponsorimg]border="0" alt="Proudly sponsored by $forum[sponsorname]"



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!

retinax 02-14-2003 08:58 PM

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

amykhar 02-14-2003 10:05 PM

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
  • Page Generation 0.01749 seconds
  • Memory Usage 1,875KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete