vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=139)
-   -   [release] Random header image (https://vborg.vbsupport.ru/showthread.php?t=85456)

filburt1 11-28-2002 10:00 PM

[release] Random header image
 
Author: filburt1
Description: Makes the header image a different image (or likely to be a different image) for each page.
Demo: http://www.webdesignforums.net/?styleid=3 (please don't constantly refresh the page to see all four header images)
Screenshot: n/a, see demo

A simple mod but I'm sure somebody could benefit from it.

Rufus69 11-29-2002 02:05 AM

hmm is it that thing that goes from all Pixelated to clear texT?

if so I'm installing :D

filburt1 11-29-2002 02:06 AM

No, and I already posted a tutorial at my forums on how to do that transition :p

MustangBST 11-29-2002 03:00 AM

What does this do. I know you hate to have that question but I didnt see anything

Larry

Tony G 11-29-2002 03:23 AM

Nice mod filburt, anything thats rotational I like! :D

Rufus69 11-29-2002 01:11 PM

bah where on your forums?

filburt1 11-29-2002 03:02 PM

Okay, let's say you have four title images: header1.jpg, header2.jpg, header3.jpg, and header4.jpg. The header image you see in your forums will be one of these chosen randomly.

Rufus: top of the page (alternates between clouds, mountains, earth, and the default one)

Rufus69 11-29-2002 03:28 PM

ah Isee it now :0 nice work :)

MacKenzie 12-13-2002 05:02 PM

Excellent modification, Filburt. I'd seen this done with one of the skins at the relicforums, and liked the idea, especialy as it'll be usefull for my forums where we have a couple title images that everyone wants to use. Thank you for sharing this :)

MacKenzie 12-13-2002 06:29 PM

Minor problem... I can't get this to work. I changed the header as the instructions noted, and put the code into the phpinclude template as well, changing the paths to where I have my images located... but they don't show.

Here's my phpinclude:

Quote:

// This code is PHP4 only:
// ob_start();
// require("yourheader.html");
// $header = ob_get_contents();
// ob_end_clean();
//AdminCP/ModCP Login Link
if ($bbuserinfo[usergroupid]==6) { //Admins
$adminlogin = "| <a href=\"admin/\">Administrator CP</a><br>";
} elseif ($bbuserinfo[usergroupid]==5) { //Mods
$adminlogin = "| <a href=\"mod/\">Moderator CP</a><br>";
} else { //Everyone else
$adminlogin = "";
}
$totalheaderimages = 4;
$randomindex = rand(1, $totalheaderimages);
$headerimage = "images/$randomindex.jpg";

Here's my header:

Quote:

<!-- logo and buttons -->
<center>
<table border="0" width="{tablewidth}" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" align="left" background="{imagesfolder}/menu_background.gif"><a href="index.php?s=$session[sessionhash]"><img src="$headerimage" border="0" alt="$bbtitle"></a></td>
<td valign="bottom" align="right" nowrap background="{imagesfolder}/menu_background.gif">
<!-- toplinks -->
<a href="usercp.php?s=$session[sessionhash]"><img src="{imagesfolder}/top_profile.gif" alt="Here you can view your subscribed threads, work with private messages and edit your profile and preferences" border="0"></a>
<a href="register.php?s=$session[sessionhash]&action=signup"><img src="{imagesfolder}/top_register.gif" alt="Registration is free!" border="0"></a>
<a href="calendar.php?s=$session[sessionhash]"><img src="{imagesfolder}/top_calendar.gif" alt="Calendar" border="0"></a>
<a href="memberlist.php?s=$session[sessionhash]"><img src="{imagesfolder}/top_members.gif" alt="Find other members" border="0"></a>
<a href="misc.php?s=$session[sessionhash]&action=faq"><img src="{imagesfolder}/top_faq.gif" alt="Frequently Asked Questions" border="0"></a>
<a href="search.php?s=$session[sessionhash]"><img src="{imagesfolder}/top_search.gif" alt="Search" border="0"></a>
<a href="index.php?s=$session[sessionhash]"><img src="{imagesfolder}/top_home.gif" alt="Home" border="0"></a>
<a href="member.php?s=$session[sessionhash]&action=logout"><img src="{imagesfolder}/top_logout.gif" alt="Logout" border="0"></a>
&nbsp;
<!-- /toplinks -->
</td>
</tr>
</table>
<!-- /logo and buttons -->

<!-- content table -->
<table bgcolor="{pagebgcolor}" width="{tablewidth}" cellpadding="10" cellspacing="0" border="0">
<tr>
<td>


All times are GMT. The time now is 09:05 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.01107 seconds
  • Memory Usage 1,741KB
  • 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_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
  • (10)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