Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

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

Version: 3.0.11 Rating:
Released: 02-13-2004 Last Update: 12-17-2005 Installs: 98
DB Changes Template Edits
Code Changes  
No support by the author.

Works on: VB3 RC3 - 3.1+

This modification will Add an image banner w/ link option per forum.

This hack modifies/adds :

1 php file
2 templates
4 query / table field
4 added phrase

*1.6 Update 12.18.05

Useage:
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. This images can be located on the localhost or on a remote server.

Admincp -> Forums & Moderators -> Forum Manager -> Edit Forum -> Fill out the banner info.

Banner Image - (location of image)
Banner URL - (Link that you go to when u click the banner)
Alt Tag (if you mouse over the banner; pop-up text)
HTML Paste (added)

You can also fill out the info when you make a new forum.

NOTES:


Changes:
--------
1.6
Banner shows up on each thread
adds: 1 more template edit to the install

*1.5
+Added HTML option

*1.2
+ Added Alt text for each banner(admincp)
+ Images no longer must be on the server
You can use a local image off your webserver or use a image at another location.
EX: /images/banner/someimage.jpg or http://www.yoursite.com/someimage.jpg

*1.1
+ Added option for image to have a link

*1.0
+ Image banner for every forum under the $navbar

*//


JAVA BANNER ROTATION

FYI-

I did some playing around took the <if></if> statement added to the ForumsDisplay template. You can insted place it in the header / footer template and it will show up also.

VB3.5X ver
https://vborg.vbsupport.ru/showthread.php?t=94119

Show Your Support

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

Comments
  #32  
Old 03-08-2004, 08:47 AM
xg3 xg3 is offline
 
Join Date: Jan 2004
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi, im looking for a hack to do this: http://www.srtforums.com/forums/index.php?
add the sponsored banner links on the front page next to an individual forum. is there a hack that does this? this is the closest one ive found.
Reply With Quote
  #33  
Old 03-08-2004, 09:04 AM
joeychgo's Avatar
joeychgo joeychgo is offline
 
Join Date: Mar 2004
Location: Chicago, IL
Posts: 933
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would like that as well.

Also, I would like a hack that randomly changes between banners on the forum pages..... SO perhaps 4 or 5 different banners would randomly rotate between page clicks........
Reply With Quote
  #34  
Old 03-08-2004, 06:05 PM
Beermonster Beermonster is offline
 
Join Date: Dec 2003
Location: England
Posts: 362
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

/me clicks install

Thanks for that, is there some way of adding a click counter to it?
Reply With Quote
  #35  
Old 03-09-2004, 11:39 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 Beermonster
[high]* Beermonster clicks install
[/high]

Thanks for that, is there some way of adding a click counter to it?
Yeppers, I'll have something soon. Have been worken on some other things.
Reply With Quote
  #36  
Old 03-11-2004, 12:44 AM
gopherhockey's Avatar
gopherhockey gopherhockey is offline
 
Join Date: Jul 2002
Posts: 202
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gmarik
Random option and a counter would be a good future option, nice.
Or a feature to allow different forums to have different banners (as in sponsors for various forums)
Reply With Quote
  #37  
Old 03-11-2004, 02:53 AM
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 gopherhockey
Or a feature to allow different forums to have different banners (as in sponsors for various forums)

Currently this allows a different image w/ link per forum made.
Reply With Quote
  #38  
Old 03-20-2004, 06:12 AM
Michael Morris's Avatar
Michael Morris Michael Morris is offline
 
Join Date: Nov 2003
Location: Knoxville TN
Posts: 774
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi. I have this working fine on our normal pages now but it doesn't want to work on our advance pages (note that I moved the banner into the header and changed the code as follows)

Code:
<if condition="$foruminfo['banner'] AND $foruminfo['bannerlink']"><a href="$foruminfo[bannerlink]" target="_blank"><img src="images/banner/$foruminfo[banner]" alt="$foruminfo[banner]" border="0" /></a>
<else />
<if condition="$foruminfo['banner']"><img src="images/banner/$foruminfo[banner]" alt="$foruminfo[banner]" border="0" />
<else /><img src="images/banner/default.gif" border="0">
</if></if></if>
That displays a default image if no forum is currently selected (like the main page). Anyway, vbadvance displays the default, but I would like it to display the banner... Wait a sec... BRB
Reply With Quote
  #39  
Old 03-20-2004, 06:19 AM
Michael Morris's Avatar
Michael Morris Michael Morris is offline
 
Join Date: Nov 2003
Location: Knoxville TN
Posts: 774
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I was double checking to make sure I had banners defined for each of the three forums. Anyway, vbulletin is dropping to the default image, which means it isn't putting anything into the $foruminfo['banner'] variable. How do I go about retrieving this info?
Reply With Quote
  #40  
Old 03-20-2004, 07:23 AM
Michael Morris's Avatar
Michael Morris Michael Morris is offline
 
Join Date: Nov 2003
Location: Knoxville TN
Posts: 774
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, so you don't want your banner in the $navbar template but in your header. Fine. Here's one way.

Code:
<if condition="$foruminfo['banner'] AND $foruminfo['bannerlink']">
  <a href="$foruminfo[bannerlink]" target="_blank">
    <img src="images/banner/$foruminfo[banner]" alt="$foruminfo[banner]" border="0" />
  </a>
<else />
<if condition="$foruminfo['banner']">
  <img src="images/banner/$foruminfo[banner]" alt="$foruminfo[banner]" border="0" />
<else />
  <img src="images/banner/default.gif" border="0">
</if></if></if>
Note the extra statement after the else that sets a default page for your forum.

Now if you're like me and you use vbadvance you can port variant headers over there without changing your $header template. First set $index_header and $index_footer equal to the site's normal header & footer as follows:

Code:
eval('$index_header = "' . fetch_template('header') . '";');
eval('$index_footer = "' . fetch_template('footer') . '";');
Then, assuming you don't have any other default.gif files in your header, you can do a str replace for each forum. The site I work on has three as follows:

Code:
if ($newsforum == 110)
{
$index_header = str_replace("default.gif", "scifinews.gif", $index_header);
}
elseif ($newsforum == 111)
{
$index_header = str_replace("default.gif", "pdfnews.gif", $index_header);
}
else
{
$index_header = str_replace("default.gif", "ENNewsLogo.gif", $index_header);
}
That bit of code goes immediately after the second bit. I hope this makes some sense - it's 5 AM here and I'm babbling.
Reply With Quote
  #41  
Old 03-20-2004, 04:10 PM
Eternal2u Eternal2u is offline
 
Join Date: Feb 2004
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is there any possiblity of changing this to make it where you can enable a random banner to appear..

so you cna put in say 10+ banners, and just have one randomly appear...would be kinda easy i think with a nice php sscript...hmm i think i might have a go at that now tha ti think of it...if you don't mind me editing your mod a bit eh?
Reply With Quote
Reply

Thread Tools

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 06:08 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.07250 seconds
  • Memory Usage 2,312KB
  • Queries Executed 25 (?)
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
  • (4)bbcode_code
  • (3)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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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