vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Different banner on each forumbit (https://vborg.vbsupport.ru/showthread.php?t=93673)

Beermonster 08-04-2005 10:00 PM

Different banner on each forumbit
 
This is an update of my previous have hack https://vborg.vbsupport.ru/showthread.php?t=63994


This modification will add an image banner with link and text to each forum you choose, and display it in on your forumhome postbits, you can have a different banner for each forum with additional text above the banner like Sponsored by or affiliated with, or you can choose to have no text.

Please click install for support


This will only work on vBulletin 3.5.0 RC1 and above this will not work on versions before RC1

20050929 - Updated zip with Firefox fix
20050930 - Updated zip with Real Firefox fix, plus added text under image code
20051122 - Updated html again

Blam Forumz 08-05-2005 06:30 PM

I like this, thanks ^_^

Rich 08-05-2005 07:37 PM

Hello,

I am currently using the vbSponsors mod that Live Wire has completed. If I wasn't, I would be using this one. Thanks!

kall 08-05-2005 07:39 PM

What's a "forumhome postbit"? Do you mean "forumbit"? :)

Beermonster 08-05-2005 07:42 PM

Quote:

Originally Posted by kall
What's a "forumhome postbit"? Do you mean "forumbit"? :)


I guess I do :o I've changed it for you :)

Bojangles 09-03-2005 03:53 AM

Installed and worked just great. However Firefox users had a problem with viewing the banner correctly. I checked out the previous version of this you made and saw this fix for them. Can you update your hack with it?

https://vborg.vbsupport.ru/showpost....3&postcount=72

Beermonster 09-03-2005 07:37 PM

Quote:

Originally Posted by Bojangles
Installed and worked just great. However Firefox users had a problem with viewing the banner correctly. I checked out the previous version of this you made and saw this fix for them. Can you update your hack with it?

https://vborg.vbsupport.ru/showpost....3&postcount=72

You should only need to alter the template code

Code:


<if condition="$forum['fhbanner']">
<table align="right" border="0"><tr><td align="center" valign="top">
<if condition="$forum['fh_banner']"><font size="1">$forum[fh_text]</font><br><a href="http://$forum[fh_url]" target="_blank"><img src="images/fhbanner/$forum[fh_banner]" alt="$forum[fh_url]" border="0" /></a>
</td></tr></table>
</if>


Bojangles 09-03-2005 08:22 PM

That is what I had to do manually.. it isn't that big of a deal. Just suggesting that maybe you can re-release your mod with that updated code. Either way, it's cool :).

stinger2 09-28-2005 09:35 AM

is there a way to make the text written under the banner?? instead of above it.....i think it will be better alignment with the main forum text
rgds

Beermonster 09-28-2005 09:52 AM

Quote:

Originally Posted by stinger2
is there a way to make the text written under the banner?? instead of above it.....i think it will be better alignment with the main forum text
rgds

All you need to do is move the relevent line of code :)

Code:

<!-- Ad Banner Start -->
<table align="right" width="15%" border="0">
<div align="center" valign="top" valign="top">       
<if condition="$forum['fh_banner']"><a href="http://$forum[fh_url]" target="_blank"><img src="images/fhbanner/$forum[fh_banner]" alt="$forum[fh_url]" border="0" /><br><font size="1">$forum[fh_text]</font></a></div></if></table>
<!-- Ad Banner end -->

Hope that helps?

stinger2 09-28-2005 09:59 PM

thank you sir for the quick response..just installed and it looks charming now.....
can i ask for one thing more.......

the fix you gave for fire fox...corrected the original...but it seems not working on this one.......any idea

Beermonster 09-29-2005 05:36 AM

Quote:

Originally Posted by stinger2
thank you sir for the quick response..just installed and it looks charming now.....
can i ask for one thing more.......

the fix you gave for fire fox...corrected the original...but it seems not working on this one.......any idea

Because I didn't do it ;)

Code:

<if condition="$forum['fhbanner']">
<table align="right" border="0"><tr><td align="center" valign="top">
<if condition="$forum['fh_banner']"><a href="http://$forum[fh_url]" target="_blank"><img src="images/fhbanner/$forum[fh_banner]" alt="$forum[fh_url]" border="0" /><br><font size="1">$forum[fh_text]</font></a>
</td></tr></table>
</if>


I've also updated the zip with the Firefox fix

dreck 09-30-2005 12:49 AM

The IE code works great. But the foxfire gets this error when trying to save.
Code:

The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/thisdarn/public_html/vb/includes/adminfunctions_template.php(3519) : eval()'d code on line 5

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.


stinger2 09-30-2005 07:37 AM

yes sir...this is what i was getting and reffered to in my previouse post....the fix is not working for the text under version......

but i really do suggest that the text under become the original hack.....the alignment is great....i will attach a snapshot for it..hope we get a fix for firefox
kind regards

Beermonster 09-30-2005 11:18 AM

Sorry guys me being lazy and not checking my code, I've tested it on 3.5.0 Gold with Firefox and IE with text above and below image, zip updated :)

stinger2 09-30-2005 11:58 AM

thank you sir
..for some reason the text below with firefox fix is not working.....at least for me..
it doesnot show any error...but........the forum structure is totally disturbed..all spaces are disturbed with IE and avant

mclark2112 09-30-2005 12:39 PM

Put the </if> inside the last </td>

This will fix the screwed up forum stuff in Firefox.

Quote:

<table align="right" border="0"><tr><td align="center" valign="top">
<if condition="$forum['fh_banner']"><font size="1">$forum[fh_text]</font><br><a href="http://$forum[fh_url]" target="_blank"><img src="images/fhbanner/$forum[fh_banner]" alt="$forum[fh_url]" border="0" /></a></if>
</td></tr></table>

dreck 09-30-2005 01:43 PM

Quote:

Originally Posted by Beermonster
Sorry guys me being lazy and not checking my code, I've tested it on 3.5.0 Gold with Firefox and IE with text above and below image, zip updated :)

That code screws up my forum view BIG TIME!
The IE still works fine.

PixelFx 09-30-2005 05:22 PM

Quote:

Originally Posted by dreck
That code screws up my forum view BIG TIME!
The IE still works fine.

this looks really promising thanks for working on this :)

stinger2 09-30-2005 10:46 PM

Quote:

Originally Posted by mclark2112
Put the </if> inside the last </td>
PHP Code:

<table align="right" border="0"><tr><td align="center" valign="top">
<if 
condition="$forum['fh_banner']"><font size="1">$forum[fh_text]</font><br><a href="http://$forum[fh_url]target="_blank"><img src="images/fhbanner/$forum[fh_banner]alt="$forum[fh_url]border="0" /></a></if>
</
td></tr></table

This will fix the screwed up forum stuff in Firefox.

thanks mclark....and thanks beermonster
it works great....its a fix for the text above

for the text under its

PHP Code:

<!-- Ad Banner Start Firefox Friendly Text under image -->
<
table align="right" border="0"><tr><td align="center" valign="top">
<if 
condition="$forum['fh_banner']"><a href="http://$forum[fh_url]target="_blank"><img src="images/fhbanner/$forum[fh_banner]alt="$forum[fh_url]border="0" /><br><font size="1">$forum[fh_text]</font></a></if>
</
td></tr></table>
<!-- 
Ad Banner end Firefox Friendly Text under image --> 

now it became a complet one...thanks every one for the great share
ps..hope the original file will be updated
regards

dreck 09-30-2005 11:51 PM

Quote:

Originally Posted by stinger2
PHP Code:

<!-- Ad Banner Start Firefox Friendly Text under image -->
<
table align="right" border="0"><tr><td align="center" valign="top">
<if 
condition="$forum['fh_banner']"><a href="http://$forum[fh_url]target="_blank"><img src="images/fhbanner/$forum[fh_banner]alt="$forum[fh_url]border="0" /><br><font size="1">$forum[fh_text]</font></a></if>
</
td></tr></table>
<!-- 
Ad Banner end Firefox Friendly Text under image --> 

now it became a complet one...thanks every one for the great share
ps..hope the original file will be updated
regards

Yes, thank you... This works well with both IE & foxfire!

hashesh 10-01-2005 07:40 PM

how hard would it put to use html code in this?

the new google adsense 468x15 would be cool to have in there.

HC. 10-02-2005 11:20 PM

what size banners do you have to use?
can you have more than 1 banner?

Steelersfan 10-04-2005 04:01 AM

I see I have the option for this with subforums but the images don't show up. I assume I have to edit another template but I'm not sure which one. Could anyone help with this?

Beermonster 10-07-2005 08:00 AM

Quote:

Originally Posted by Steelersfan
I see I have the option for this with subforums but the images don't show up. I assume I have to edit another template but I'm not sure which one. Could anyone help with this?

You can put the code in forumhome_forumbit_level1_post but TBH I'm not really sure where for some reason I can only get it to show under the forum name, put it after

Code:

<if condition="$show['subforums']"><div class="smallfont" style="margin-top:$stylevar[cellpadding]px"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>

funinthesun 10-15-2005 01:36 AM

Excellent! Thank you :)

*Clicks install*

funinthesun 10-15-2005 03:54 PM

How do I add the image banners with a html code? All my banners have a specific codes for affiliate programs. Thanks.

puertoblack2003 11-13-2005 08:33 PM

Quote:

Originally Posted by stinger2
thanks mclark....and thanks beermonster
it works great....its a fix for the text above

for the text under its

PHP Code:

<!-- Ad Banner Start Firefox Friendly Text under image -->
<
table align="right" border="0"><tr><td align="center" valign="top">
<if 
condition="$forum['fh_banner']"><a href="http://$forum[fh_url]target="_blank"><img src="images/fhbanner/$forum[fh_banner]alt="$forum[fh_url]border="0" /><br><font size="1">$forum[fh_text]</font></a></if>
</
td></tr></table>
<!-- 
Ad Banner end Firefox Friendly Text under image --> 

now it became a complet one...thanks every one for the great share
ps..hope the original file will be updated
regards

yeah that too worked for me as well :nervous: ****INSTALLED*******

craiovaforum 11-21-2005 05:59 PM

Beermonster why don't you update the zip with the code posted by mclark2112 and stinger2
Because it gave me a lot of headaches trying all the fixes posted here and only after doing what they wrote it work
it should be nice to put it in the zip so it will work on new installs without giving headaches to the admins...

Beermonster 11-22-2005 07:03 AM

Quote:

Originally Posted by craiovaforum
Beermonster why don't you update the zip with the code posted by mclark2112 and stinger2
Because it gave me a lot of headaches trying all the fixes posted here and only after doing what they wrote it work
it should be nice to put it in the zip so it will work on new installs without giving headaches to the admins...

It's finding time :disappointed:

Updated but I havn't checked them just going by what has been posted here :)

DiSS Troya 12-13-2005 04:36 AM

Does this work for 3.5.2? Have all the bugs been worked out?

UK Jimbo 01-25-2006 04:18 AM

Seems to work fine for me on v3.5.3

If you're upgrading from the older v3.0.x version of it you might want to use the following queries to copy the old data over after you've installed the hack:

Code:

UPDATE forum SET fh_banner=fhbanner;
UPDATE forum SET fh_url=fhbannerlink;
UPDATE forum SET fh_text=fhmessage;

After making this change you'll need to flush the forum cache. From the forum manager choose to edit any forum (it doesn't matter) and save it without making any changes.


If you want to remove the columns created by the older v3.0.x hack you can use the following SQL

Code:

ALTER TABLE forum DROP fhbanner;
ALTER TABLE forum DROP fhbannerlink;
ALTER TABLE forum DROP fhmessage;


The Chief 01-27-2006 03:45 PM

Installed this is great and SOO easy to modify for your needs...

thanks so much!!

/me clicks install

m_k 02-23-2006 09:35 PM

this is exactly what I needed for some links back to main site

<clicks install>

thanks for a great hack :-)

m_k 02-24-2006 09:56 AM

could this be modified to add a second banner next to the first one? would that be difficult to implement?

foulplay 04-02-2006 07:38 AM

I can't get my banner to show. I followed the directions. I guess i'm confused in creating my folder like it says:

Create a "fhbanner" folder EX: $vbhome/images/fhbanner

I don't know what's $vbhome? I did it like this: forums/images/fhbanner

Is that the same thing as $vbhome?

Beermonster 04-02-2006 07:48 AM

Quote:

Originally Posted by ant0nio
I can't get my banner to show. I followed the directions. I guess i'm confused in creating my folder like it says:

Create a "fhbanner" folder EX: $vbhome/images/fhbanner

I don't know what's $vbhome? I did it like this: forums/images/fhbanner

Is that the same thing as $vbhome?

If you forums are in a forums dir then forums/images/fhbanner would be correct, basically find your images dir and make a fhbanner dir in it :)

foulplay 04-02-2006 06:46 PM

Quote:

Originally Posted by Beermonster
If you forums are in a forums dir then forums/images/fhbanner would be correct, basically find your images dir and make a fhbanner dir in it :)


I did that..but for the Love of God, it's not working for me. I followed the hack to the "T" and still my banners won't show up. I know I copied and edited the Template : forumhome_forumbit_level2_post and added the following code:

<!-- Ad Banner Start Firefox Friendly Text above image -->
<table align="right" border="0"><tr><td align="center" valign="top">
<if condition="$forum['fh_banner']"><font size="1">$forum[fh_text]</font><br><a href="http://$forum[fh_url]" target="_blank"><img src="images/fhbanner/$forum[fh_banner]" alt="$forum[fh_url]" border="0" /></a></if>
</td></tr></table>
<!-- Ad Banner end Firefox Friendly Text above image -->


I also imported the file: "banner_ad_postbits.xml"


What am I doing wrong??? And yes I did went to Forum Manager, scrolled to the bottom and added everything correctly, Just how you displayed it on the attachment pictures.

My VBulletin is 3.5.4

defcon_420 04-04-2006 10:52 AM

you rock! works great with 3.5.4

found the instructions a little unclear but works a treat!

Devil Woman 04-05-2006 10:42 PM

I am having the same problem as ant0nio I have followed the instructions to a T created a fhbanner folder added my image into there and I have tried the following

forums/images/fhbanner/picturename.jpg

and i have tried

images/fhbanner/picturename.jpg

Am i going wrong somewhere?

Nikki


All times are GMT. The time now is 04:39 AM.

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.02580 seconds
  • Memory Usage 1,864KB
  • 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
  • (7)bbcode_code_printable
  • (4)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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