Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
Timebased Header Image Details »»
Timebased Header Image
Version: 1.00, by cory_booth cory_booth is offline
Developer Last Online: Jun 2013 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 4.0.2 Rating:
Released: 02-23-2010 Last Update: 02-23-2010 Installs: 9
Template Edits
Re-useable Code Additional Files Is in Beta Stage  
No support by the author.

Header Image rotates based on time. This script can also possibly awaken ideas for other script generated images for use throughout VB4.

OK this hack is based on two others I saw here long ago...
1. One hack generated images on the fly.
2. One hack rotated title (header) images based on the user's time.
I dug and dug and can't seem to find them again, so if anyone remembers where the ideas came from please let me know.

This hack will provide a bit of fun for your site and demonstrate the appearance of updates/changes. To begin, you must have atleast two images for use with your header.

I have a title image for morning, afternoon, and night. I used photoshop and adjusted red/green/blue varibles and added some elements for each period. Other than the color adjusts, my images are identical.

Included in the zip are two php files. The purpose of these files is to replace your header image and your background image. So title.php should call your header title image while titleb.php should call the repeating background image. Obviously if you don't have different colors for the background, you may not need to use titleb.php.

Besides inserting the images in the code, you may need to adjust one other portion.
This is in the final few lines and sets the output type.
PHP Code:
header('Content-type: image/png'); 
(i.e. image/jpeg or image/gif)

Once you have title and titleb adjusted, upload to your server and run the files, you should see the image displayed. If all is well, procede to adjust your style vars to call the new images. (see attached images)

The main reason for this release is to stir some ideas with image handling within VB4.

Feel free to use/hack/slash this code for your own needs.


TO USE:

Make changes to title.php
PHP Code:
if ( $sevenam $currentusertime)
{
    
//between 12am and 5am
$img 'http://1.png';
}
else if ( ( 
$sevenam <= $currentusertime ) && ( $twopm $currentusertime ) )
{
    
//it is between 5am and 12pm
$img 'http://2.png';
}
else if ( ( 
$twopm <= $currentusertime ) && ( $eightpm $currentusertime ) )
{
    
//It is between 12pm and 6pm
$img 'http://3.png';
}
else if ( 
$eightpm <= $currentusertime)
{
    
//It is greater then 6pm
$img 'http://1.png';


If using different backgrounds, make changes to titleb.php
PHP Code:
if ( $sevenam $currentusertime)
{
    
//between 12am and 5am
$img 'http://1bg.png';
}
else if ( ( 
$sevenam <= $currentusertime ) && ( $twopm $currentusertime ) )
{
    
//it is between 5am and 12pm
$img 'http://2bg.png';
}
else if ( ( 
$twopm <= $currentusertime ) && ( $eightpm $currentusertime ) )
{
    
//It is between 12pm and 6pm
$img 'http://3bg.png';
}
else if ( 
$eightpm <= $currentusertime)
{
    
//It is greater then 6pm
$img 'http://1bg.png';

If you are not using png format:
Make change to header ('Content')

Upload files to where ever you wish.

Change the varible areas in admincp as indicated in the thumbnails below.

Download Now

File Type: zip title.zip (1.2 KB, 34 views)

Screenshots

File Type: jpg header.jpg (43.7 KB, 0 views)
File Type: jpg headerb.jpg (53.1 KB, 0 views)

Show Your Support

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

Comments
  #2  
Old 02-23-2010, 11:09 PM
Jassem's Avatar
Jassem Jassem is offline
 
Join Date: Jan 2010
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed
Thanks Man
,,,
Reply With Quote
  #3  
Old 02-23-2010, 11:38 PM
ToNetU ToNetU is offline
 
Join Date: Mar 2003
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

interesting mod! tagged for now.
thanks
Reply With Quote
  #4  
Old 02-24-2010, 01:32 PM
forumsonsuz forumsonsuz is offline
 
Join Date: Apr 2007
Location: Turkey
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed
Reply With Quote
  #5  
Old 02-24-2010, 07:48 PM
abdobasha2004's Avatar
abdobasha2004 abdobasha2004 is offline
 
Join Date: Aug 2008
Posts: 541
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice idea, thanks
Reply With Quote
  #6  
Old 04-23-2010, 04:38 PM
Reef Man Reef Man is offline
 
Join Date: Nov 2006
Posts: 123
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any demo?
Reply With Quote
  #7  
Old 04-24-2010, 05:26 AM
J6488EEA8E90 J6488EEA8E90 is offline
 
Join Date: May 2009
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cool idea. A demo would be good.
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 11:07 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.07261 seconds
  • Memory Usage 2,285KB
  • Queries Executed 21 (?)
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
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (3)postbit_attachment
  • (7)postbit_onlinestatus
  • (7)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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete