Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Add a banner image to each forum (vb3.6) Details »»
Add a banner image to each forum (vb3.6)
Version: 1.07, by Zachariah Zachariah is offline
Developer Last Online: Jan 2020 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 3.6.4 Rating:
Released: 11-27-2006 Last Update: Never Installs: 176
DB Changes Uses Plugins Template Edits
 
No support by the author.

/* -----------------11/28/2005 10:37AM-----------------
[HowTo] Add a banner option image to each forum w/ Link V.1.7
Tested on vBulletin: 3.6.4

Zachariah - http://www.gzhq.net

Quote:
This is an update of my previous hack:
*** Add a banner image to each forum (VB 3.5x)
https://vborg.vbsupport.ru/showthread.php?t=94119
DEMO
- banner for an on-line game clan/guild.

*** Info:
  • This modification will Add an image banner w/ link Or paste in your own HTML code option per forum.
  • These files can be any image. (png, jpg, gif, ect).
  • This will be located after the $navbar on FORMDISPLAY and SHOWTREAD.
  • This images can be located on the localhost or on a remote server.

Changelog:
------------
1.7
- str_replace used to place hack at $navbar in FORUMDISPLAY, SHOWTHREAD.
- choice to show in thread per forum.
- Place $add_banner in template if str_replace fails to work.
- add_banner template added


1.6
Banner shows up on each thread
adds: 1 more template edit to the install
Requested by: - Ryan McBain

** Note: 1.5 - 1.6 needs only to edit SHOWTHREAD not Reinstall the XML files

1.5
Added HTML option
Added 3.x to VB 3.5 upgrade XML file.

--------------------------------------------------*/

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 11-28-2006, 04:08 PM
Zachariah's Avatar
Zachariah Zachariah is offline
 
Join Date: Feb 2002
Location: Canoga Park, CA
Posts: 2,125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1st post

*** Useage:
These files can be any image. (png, jpg, gif, ect) or paste your HTML code.

To add banners go to:

Forums & Moderators => Forum Manager => Edit/Add Forum =>
scroll do to the bottom enter your details.

This script has a few options.
-
By default install it will attempt to place itself
in FORUMDISPLAY, SHOWTHREAD under location "$navbar" in the templates. If for some
reason your banner does not show up you edit and place $add_banner within the templates.
Reply With Quote
  #3  
Old 11-28-2006, 04:08 PM
Zachariah's Avatar
Zachariah Zachariah is offline
 
Join Date: Feb 2002
Location: Canoga Park, CA
Posts: 2,125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is a simple JAVA random banner code you can paste in the HTML area of any forum.

EX:
This will show @ random.

image1.jpg @ http://www.yoursite1.com
image2.jpg @ http://www.yoursite2.com
image3.jpg @ http://www.yoursite3.com


Code:
<script language="javascript" type="text/javascript">
<!-- 
function banner() { 
}; 

banner = new banner(); 
number = 0; 

// bannerArray 
banner[number++] = "<a href='http://www.yoursite1.com' target='_blank'><img src='/banners/image1.jpg' alt='' border='0' /></a>"
banner[number++] = "<a href='http://www.yoursite2.com' target='_blank'><img src='/banners/image2.jpg' alt='' border='0' /></a>"
banner[number++] = "<a href='http://www.yoursite3.com' target='_blank'><img src='/banners/image3.jpg' alt='' border='0' /></a>" 
 
// keep adding items above here... 

increment = Math.floor(Math.random() * number); 
document.write(banner[increment]); 

//-->
</script>
Useage: If you need more banners edit / add another row.
Code:
banner[number++] = "<a href='http://www.yoursite1.com' target='_blank'><img src='/banners/image1.jpg' alt='' border='0' /></a>"
Link of Destination
Image location
Reply With Quote
  #4  
Old 11-28-2006, 05:46 PM
projectego's Avatar
projectego projectego is offline
 
Join Date: Feb 2006
Location: UK
Posts: 724
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you very much, Zachariah!

[high]* projectego clicks install[/high]
Reply With Quote
  #5  
Old 11-28-2006, 05:47 PM
Veer Veer is offline
 
Join Date: Feb 2006
Posts: 733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

WOW, Thanks a Lot Zachariah

*Installed*
Reply With Quote
  #6  
Old 11-28-2006, 05:49 PM
ShackMaster ShackMaster is offline
 
Join Date: Apr 2006
Posts: 252
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm not able to get this to work, either with a single banner or with the script for random banners.

Instead of placing the $add_banner in Forumdisplay and Showthread, could it be added in the Navbar template?
Reply With Quote
  #7  
Old 11-28-2006, 07:01 PM
Replicators's Avatar
Replicators Replicators is offline
 
Join Date: Jul 2005
Location: Jamestown, NY
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What don't make sense is the 3.5.x version works just fine for the 3.6, so whats the sense in a update?
Reply With Quote
  #8  
Old 11-28-2006, 07:01 PM
firstrebel's Avatar
firstrebel firstrebel is offline
 
Join Date: Dec 2005
Location: West London
Posts: 380
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed then uninstalled, for a few reasons.

1] Could not get it to work, just got red X's, in fact got 2 red x's, and I had 5 image files in the scripts. Tried full URL and relative URL.

2] Putting this in each forum is a bit of a long job as I have 40+ forums and I could not get it to work on the forum homepage at all. I would have thought putting the code in the navbar template would be better, then they appear in forumhome and all other forums. I tried that but that didn't work either.

I am obviously doing something wrong, but what. One thing I can't work out is
Code:
href='http://www.yoursite1.com' 
href='http://www.yoursite2.com'
what do I put if it's all on one site.

Bob
Reply With Quote
  #9  
Old 11-28-2006, 10:15 PM
Jonathan Young's Avatar
Jonathan Young Jonathan Young is offline
 
Join Date: Jul 2006
Location: California
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi i updated, then uninstall ed because i had a problem with my images displaying multiple times. I also reinstalled, images still show multiple times website www.bgleague.com/forum
Reply With Quote
  #10  
Old 11-28-2006, 11:47 PM
Zachariah's Avatar
Zachariah Zachariah is offline
 
Join Date: Feb 2002
Location: Canoga Park, CA
Posts: 2,125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ShackMaster View Post
I'm not able to get this to work, either with a single banner or with the script for random banners.

Instead of placing the $add_banner in Forumdisplay and Showthread, could it be added in the Navbar template?
Yes you can but it will only show the banner image on forumdisplay and show thread.

EX:
On the forumdisplay:
Code:
$search_text = '$navbar';
$vbulletin->templatecache['FORUMDISPLAY'] = str_replace($search_text,
$search_text.fetch_template('add_banner'), $vbulletin->templatecache['FORUMDISPLAY']);
This looks @ the template FORUMDISPLAY for $navbar and if found it places the content of add_banner under it. If you have a custom style that has removed $navbar there is a option to place $add_banner.

Quote:
Originally Posted by Replicators View Post
What don't make sense is the 3.5.x version works just fine for the 3.6, so whats the sense in a update?
Many do not look in old 3.5 area.

Quote:
Originally Posted by firstrebel View Post
Installed then uninstalled, for a few reasons.

1] Could not get it to work, just got red X's, in fact got 2 red x's, and I had 5 image files in the scripts. Tried full URL and relative URL.

2] Putting this in each forum is a bit of a long job as I have 40+ forums and I could not get it to work on the forum homepage at all. I would have thought putting the code in the navbar template would be better, then they appear in forumhome and all other forums. I tried that but that didn't work either.

I am obviously doing something wrong, but what. One thing I can't work out is
Code:
href='http://www.yoursite1.com' 
href='http://www.yoursite2.com'
what do I put if it's all on one site.

Bob
Take a look: Google image, Google News, Froogle

Code:
<script language="javascript" type="text/javascript">
<!-- 
function banner() { 
}; 

banner = new banner(); 
number = 0; 

// bannerArray 
banner[number++] = "<a href='http://www.google.com/' target='_blank'><img src='http://www.google.com/intl/en_ALL/images/logo.gif' alt='' border='0' /></a>"
banner[number++] = "<a href='http://news.google.com/' target='_blank'><img src='http://news.google.com/images/news.gif' alt='' border='0' /></a>"
banner[number++] = "<a href='http://froogle.google.com/' target='_blank'><img src='http://froogle.google.com/froogle/intl/en_us/images/froogle_110tall.gif' alt='' border='0' /></a>" 
 
// keep adding items above here... 

increment = Math.floor(Math.random() * number); 
document.write(banner[increment]); 

//-->
</script>
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:44 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05259 seconds
  • Memory Usage 2,312KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete