vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=229)
-   -   Forum Home Enhancements - Fake rotating banner (https://vborg.vbsupport.ru/showthread.php?t=201654)

pein87 01-12-2009 10:00 PM

Fake rotating banner
 
This mod will show you how to add a diffrent image per page on only the defined pages you select. I use this on my forum and it changes the headers background image if this script is something.

Heres what I used

I added this to the header template in the all style options selection under manage style.

I added this code to replace the vbulletin icon.

PHP Code:

<tr>
<if 
condition="THIS_SCRIPT == 'showthread' OR THIS_SCRIPT ==  'member'">
<
td id="logo1"></td>
<else />
<if 
condition="THIS_SCRIPT == 'group' OR THIS_SCRIPT == 'private'">
<
td id="logo2"></td>
<else />
<
td id="logo"></td>
</if></if>
</
tr

Now the image changes based on the page your on but you need css to give the table data some height.

Remember that you must use OR in caps and not or or || like you would in php or any other progamming language or it will not work an dont forget the ' before and after the declaration of the script example: 'member' is valid but member is not valid.

I used

PHP Code:

#logo {
height200px;
background-color#000000;
background-imageurl(images/freshblue/misc/logo.png);
background-positionright;
background-repeatno-repeat;


That gives it the height of 200 pixels sets the image up for fluid forums and its position is set to right with no repeat. to view this in action view my site.

DEMO

Audax666 01-14-2009 04:23 PM

I got a white page when I try to visit your forum.:confused:

pein87 01-14-2009 05:07 PM

yeah sorry problems with php version host being retarded and not having php 5 installed but it works lol if you need help let me know my example only uses background images since my site isnt a set width but if yours is you can do it for the image source.

erel34 01-15-2009 06:55 PM

Thank you!

s2lo7 01-15-2009 09:55 PM

Good


All times are GMT. The time now is 07:12 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.01782 seconds
  • Memory Usage 1,721KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete