Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons

Reply
 
Thread Tools
The Ultimate Random Header Mod Details »»
The Ultimate Random Header Mod
Version: 1.0.0, by Jaxel Jaxel is offline
Developer Last Online: Sep 2013 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.8.x Rating:
Released: 04-27-2009 Last Update: 04-27-2009 Installs: 53
Template Edits
Additional Files  
No support by the author.

This mod has been rewritten for vB4x here: https://vborg.vbsupport.ru/showthread.php?t=240629

THIS SCRIPT DOES NOT USE JAVASCRIPT!

I wrote this mod for my own website last year (http://www.8wayrun.com/). I was looking for a way to create a random header situation, while also letting people select the random header through their UserCP and FORCE a header depending on what forum they are on. If you go to my website (http://www.8wayrun.com/), a random character will appear on your header, if you ctrl+refresh, a new character will show up... if you go to our character specific forums, the character in the random header will be FORCED to the character of that specific forum... I have done my best to make this script as simple as possible.

Product Demo:
http://www.8wayrun.com/
http://www.8wayrun.com/customstyles/...der/header.php
Installation Procedure:
  1. Create a dedicated folder on your server where you will be putting your random images.
  2. Put the included "header.php" script into the folder you created previously in step 1.
  3. Put the images you want randomized into the folder you created previously in step 1.
Optional Switches:
  1. OPTIONAL: If you want, you can set this script to FORCE a header on specific forum. Its simple, when naming the files for your random images, simply name the file as the forum ID of that forum. So if you want a specific image forced when viewing forum 38, name the file 38.png.
    .
  2. OPTIONAL: If you want, you can let users SELECT which header they want on places where the script would normally randomize.
    1. Create a new "Single-Selection Menu" profile field in your adminCP, set title and description to whatever you want. If you use numbered filenames like those in step 2, you may want to use the description field to let people know what they are selecting. (see screenshot)
    2. For each selection option, enter an image's filename WITHOUT the extension, so wolves.png will be just "wolves".
    3. Set Default: None
    4. Field Required: No
    5. Field Editable: Yes
    6. Private Field: No
    7. Field Searchable on Members List: No
    8. Show on Members List: No
    9. Display Page: Options: Other
    After you submit, this field will be given a name (ex: field9). Make sure to remember this name.
    .
  3. OPTIONAL: Open up the included "header.php" script and go to the section flagged "// VALIDATE CURRENT IMAGE DATA, CHECK FID, CHECK PID". By default, the image randomizer will find ANY image with the JPG, PNG or GIF extension. However, the FORCED and SELECT settings will always look for PNG images. If you would like to change this to either JPG or GIF, you must change the two isntances of PNG to the appropriate format. Only ONE filetype is usable with the FORCED or SELECT options.
    .
  4. The script has a heirarchy of importance when searching for images. The first thing it will look for is the FORCED image from step 1. If it doesn't find a forced image, it will use the user defined image in step 2. If the user doesn't have a defined image, it will pick an image at random from the folder it resides in.
Usage Procedure:
  1. Anywhere you want to use this random script, just link to this script, instead of an image.
    • <img src="DIRECTORY/header.php?fid=$forumid&pid=$bbuserinfo[field9]" />
    • <table background="DIRECTORY/header.php?fid=$forumid&pid=$bbuserinfo[field9]"></table>
    .
  2. The text in BLUE above is the switch for forcing an image based on the forumid. If you don't want to force images depending on the forum, you dont need to include that switch.
    .
  3. The text in RED above is the switch for forcing an image based on user control panel selection. If you don't want to give users the option to select an image manually, you dont need to include the switch. Notice that this switch has a variable called "field9"; this may not be the same in your forum. This variable should be changed to the field name I had you make note of in a previous step.
Don't forget to click INSTALL!

If you want to donate, I'm all for it... as I'm an unemployed computer programmer...

Download Now

File Type: php header.php (1.3 KB, 252 views)

Screenshots

File Type: jpg 1.jpg (247.0 KB, 0 views)
File Type: jpg 2.jpg (199.8 KB, 0 views)
File Type: jpg 3.jpg (213.7 KB, 0 views)

Show Your Support

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

Comments
  #22  
Old 07-02-2009, 05:13 AM
Jaxel Jaxel is offline
 
Join Date: Sep 2005
Posts: 1,160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Merjawy View Post
sorry, but I don't fully get it

is it either or? or can you do all?

can you randomly select forum wide banners and also force certain banners on certain forums and allow users as well?

I tried it now and even forced forum gets the other banners too.. I know I am not getting it


Thanks
You can do as much or as little as you want... either or... and ALL.

4.The script has a heirarchy of importance when searching for images. The first thing it will look for is the FORCED image from step 1. If it doesn't find a forced image, it will use the user defined image in step 2. If the user doesn't have a defined image, it will pick an image at random from the folder it resides in.
Reply With Quote
  #23  
Old 07-02-2009, 05:23 AM
applebeef applebeef is offline
 
Join Date: Jun 2009
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jaxel View Post
Yes, the images are cachable.
Thanks!

One other thing, I tried doing a forced header for a forum and could not get it to work. I'm not really worried about... just thought I'd report.
Reply With Quote
  #24  
Old 07-02-2009, 05:49 AM
ShawneyJ's Avatar
ShawneyJ ShawneyJ is offline
 
Join Date: Jul 2006
Location: Australia
Posts: 1,758
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jaxel View Post
Its a HIGHLY MODIFIED version of this:
https://vborg.vbsupport.ru/showthread.php?t=118935
damn, been looking for a mod like that but set out like your forum for over year.
thanks anyway
Reply With Quote
  #25  
Old 07-02-2009, 03:48 PM
Jaxel Jaxel is offline
 
Join Date: Sep 2005
Posts: 1,160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jaycob View Post
damn, been looking for a mod like that but set out like your forum for over year.
thanks anyway
I will ask Atakan if I can release my version.
Reply With Quote
  #26  
Old 07-03-2009, 08:48 AM
ShawneyJ's Avatar
ShawneyJ ShawneyJ is offline
 
Join Date: Jul 2006
Location: Australia
Posts: 1,758
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jaxel View Post
I will ask Atakan if I can release my version.
YEAH? i will buy you a beer for sure. thx.
Reply With Quote
  #27  
Old 07-04-2009, 07:48 AM
applebeef applebeef is offline
 
Join Date: Jun 2009
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Jaxel, sorry to bother you again, but can you confirm that images cache with this mod?

That would be really important to me. I don't understand why it has a 'scroll down' effect every time if the images is cached.

I have a fast connection so I'm not sure can properly say that they're not caching--- they load fast either way for me-- but why the scrolling? I notice that that effect is pretty much nonexistent on your forum headers.

Here's the url to my header.php if you can take a look to confirm: http://www.wetacollectors.com/forum/...es/header.php?

I'd really appreciate it, thanks
Reply With Quote
  #28  
Old 07-04-2009, 11:37 PM
Jaxel Jaxel is offline
 
Join Date: Sep 2005
Posts: 1,160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You have some weird setting on your directory... as I cant view your image...

If I go here: it will display a random image, and if I press enter on the address bar, it clearly pulls from the cache (as it loads immediately and doesnt have the scroll)
http://www.8wayrun.com/customstyles/...der/header.php

However, if I go to your script: it WONT display an image, instead it will give me a download prompt for your php file... which is something that it should never do.
http://www.wetacollectors.com/forum/...ges/header.php
Reply With Quote
  #29  
Old 07-05-2009, 05:41 AM
applebeef applebeef is offline
 
Join Date: Jun 2009
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jaxel View Post
You have some weird setting on your directory... as I cant view your image...

If I go here: it will display a random image, and if I press enter on the address bar, it clearly pulls from the cache (as it loads immediately and doesnt have the scroll)
http://www.8wayrun.com/customstyles/...der/header.php

However, if I go to your script: it WONT display an image, instead it will give me a download prompt for your php file... which is something that it should never do.
http://www.wetacollectors.com/forum/...ges/header.php
Jaxel, may I ask what browser you use? Your reply has prompted me to look at various things using both Firefox (my main browser) and Safari. Here are some of my findings:

-Your direct header DOES scroll for me in Firefox, with the loading progress bar too. Although it still happens very fast, but it's definitely there, even in instances where the same image has appeared consecutively. I wish I could video it so you could see.

-Your direct header does not scroll in Safari, as far as I can tell. It 'pops' in, which I think is the desired effect.

-My header direct link works fine for me in Firefox (obviously) but trying it in Safari does indeed lead to a download prompt. (Though the header(s) work fine in the forum itself.

-On my actual forum, which I've looked at plenty of times with both browsers and can confirm again-- the scrolling behavior is present on both browsers.


From these results I would hazard to guess you are using Safari (my header direct link doesn't load for you, your header direct link loads 'good') but it's only a guess.

Obviously I don't know further what is 'wrong', but I'm hoping you can find something in these results that might help. This is the link to the forum: http://www.wetacollectors.com/forum
Reply With Quote
  #30  
Old 07-05-2009, 08:07 AM
Jaxel Jaxel is offline
 
Join Date: Sep 2005
Posts: 1,160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I use IE8 on this computer, and FF3 on my other computer... everything works fine on my website without issues.

But I found out what your issue is... You have the following meta tag:
Code:
	<meta http-equiv="Pragma" content="no-cache" />
	<meta http-equiv="Expires" content="-1" />
	<meta http-equiv="Cache-Control" content="no-cache" />
This means nothing on your website will cache... EVER.
Reply With Quote
  #31  
Old 07-05-2009, 02:50 PM
applebeef applebeef is offline
 
Join Date: Jun 2009
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow Jaxel you are so right, it even targets the headers specifically it looks like: <!-- no cache headers -->

How did that get there!? My Vbulletin is pretty vanilla, and quite new (only recently set up, and transferred from PHPBB3)

If that is not a 'standard' part of the code, I honestly have no idea how/why it got there, I certainly did not add that.

I will try and figure out how to remove it. Thanks a lot!
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 05:07 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.06359 seconds
  • Memory Usage 2,344KB
  • Queries Executed 26 (?)
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
  • (1)bbcode_code
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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
  • (4)postbit_attachment
  • (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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete