View Full Version : Mini Mods - 8WayRun.Com - Random Header
Jaxel
04-16-2010, 10:00 PM
Don't forget to click INSTALL!
I'm an unemployed computer programmer... if you appreciate the work I have done on this mod, please don't hesitate in offering me a donation by clicking the "Support Developer" link to the right of this text.
I had to rewrite this mod because it stopped working in vB4x. It now requires a product installation; don't blame me, blame vB4x.
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/exm-blue-dark/header/header.php
Installation Procedure:
Upload all the files in the "upload" directory of the attached zip file to your forum root.
.
Import the product file called "product-header.xml" in the Product Manager of vBulletin.
.
RANDOM OPTION: Put the images you want randomized into the "header" folder that you just uploaded in the previous step.
This randomized option will work with any JPG, GIF or PNG image extension.
.
SELECTED OPTION: If you want, you can let users SELECT which header they want on places where the script would normally randomize.
Create a new "Single-Selection Menu" profile field in your adminCP.
For each selection option, enter an image's filename as an option.
Set Default: None
Field Required: No
Field Editable: Yes
Private Field: No
Field Searchable on Members List: No
Show on Members List: No
Display Page: Options: Other
After you submit, this field will be given a name (ex: field9). Make sure to remember this name.
This selected option will work with any image extension defined in an image's filename
.
FORCED OPTION: If you want to FORCE an image on specific forum, upload the image, to the "header/forums" directory.
Images are forced by their forum ID, so if the forum you want to force is forum 38, then name the image "38.png".
By default, this selected option will only work with the PNG image extension.
If you want to change this extension to something else, open up the included "header/header.php".
Find and edit the fourth line in this file which by default should state: $forced = ".png";
.
NOTE: This script has a heirarchy of importance when searching for images.
The first thing it will look for is the FORCED OPTION.
If it doesn't find a forced image, it will use the SELECTED OPTION.
If it doesn't find a selected image, it will use the RANDOM OPTION.
Usage Procedure:
Anywhere you want to use this random script, just link to this script, instead of an image.
header/header.php?fid={vb:var forum.forumid}&pid={vb:var bbuserinfo.field9}
Notice the field9 above, this should match the field name given to you in a previous step.
You can use this script anywhere you would normally use an image; whether it be your logo image, or even the background image to your header or website.
Juggernaut
04-17-2010, 04:22 AM
Looks very nice, tagged for later :D
sploodge
04-17-2010, 07:16 AM
How do you get it to display an image in the main forum list ( forum.php ).. I have it working for individual forums but naming the png by the forum ID but I get no image in the forum index not the CMS.
Installed though :)..
WassoufTunClub
04-17-2010, 10:53 AM
Nice Jaxel thnx. I wait a new version for Video directory vb4
Poeta
04-17-2010, 01:12 PM
just to let you know that there is a malware on your forum found with Avast!. Ciao :)
pjcnlv
04-18-2010, 12:19 PM
Very cool! IS there a way to set a group of header images per forum:
Forum33_1.png
Forum33_2.png
Forum33_4.png
etc
Where only Forum 33 would show the above images randomly?
JohnMcClane
04-18-2010, 11:09 PM
Feature request - could you possibly include an option to change the header + thread title strips + footer? Would be cool if all 3 or even just header and footer could be changed at once.
Jaxel
04-19-2010, 03:21 AM
You can easily use this mod multiple times by creating multiple folders and linking to each header.php differently.
Jaxel
04-19-2010, 09:06 PM
Okay... just uploaded a new version. Fixes a big with the SELECT OPTION. Now if someone selects an image, and then later decides to go back to RANDOM, it will be handled correctly.
TimberFloorAu
04-19-2010, 09:20 PM
Only see Random Header, wheres the original script gone mate ? or is that it :)
Strike that LOL< I thought I was on your Media MOD !!!
I am a terwatt ;)
sploodge
04-24-2010, 02:56 PM
Still cannot get this to randomize banners.. Works for individual forums ( by naming the image as the forum number )..
Any suggestions?
EDIT: Fixed it..... Being a tool :)
Contra Fates
04-28-2010, 01:44 AM
I've been waiting for this mod, thanks!
The only issue I'm having is that the user selected portion isn't working. =( Any suggestions?
rdbrown
05-01-2010, 09:41 PM
I can get the logo to be random on my site, but I can't get the forced option to work. For example I edited the header/header.php file and changed the forced to .jpg instead of the .png. I then placed a logo named 33.jpg into the header/forums folder. When I goto the forum with the id of 33, It is still giving me random images. Has anyone else had this problem? Or am I doing something wrong?
I also have a question as to wether or not I did the right thing in the StyleVars>ImagePaths>titleimage. Instead of the default image that was there, I replaced it with header/header.php.
Thanks
Jaxel
05-04-2010, 03:36 PM
titleimage should be:
header/header.php?fid={vb:var forum.forumid}
not
header/header.php
your24hourstore
05-04-2010, 08:01 PM
Usage Procedure:
Anywhere you want to use this random script, just link to this script, instead of an image.
header/header.php?fid={vb:var forum.forumid}&pid={vb:var bbuserinfo.field9}
Notice the field9 above, this should match the field name given to you in a previous step.
You can use this script anywhere you would normally use an image; whether it be your logo image, or even the background image to your header or website
the above script can it be modified to just show specif imgs in specific forums , Not Random?
rdbrown
05-07-2010, 06:26 PM
I went Into the Style Variable Editor and replaced the title image with header/header.php?fid={vb:var forum.forumid}&pid={vb:var bbuserinfo.field9}. I placed my image in header/forums and named it as 33.png and when I goto forum 33 it doesn't load this image. It still does the random image. I am not really interested in the user select option. I am only interested in random and forum specific logos. Am I placing the variable in the wrong place? Maybe I have to manually edit the header code instead of replacing the variable?
https://vborg.vbsupport.ru/external/2010/05/49.jpg
titleimage should be:
header/header.php?fid={vb:var forum.forumid}
not
header/header.php
Usage Procedure:
Anywhere you want to use this random script, just link to this script, instead of an image.
header/header.php?fid={vb:var forum.forumid}&pid={vb:var bbuserinfo.field9}
Notice the field9 above, this should match the field name given to you in a previous step.
You can use this script anywhere you would normally use an image; whether it be your logo image, or even the background image to your header or website
the above script can it be modified to just show specif imgs in specific forums , Not Random?
your24hourstore
05-07-2010, 10:31 PM
I went Into the Style Variable Editor and replaced the title image with header/header.php?fid={vb:var forum.forumid}&pid={vb:var bbuserinfo.field9}. I placed my image in header/forums and named it as 33.png and when I goto forum 33 it doesn't load this image. It still does the random image. I am not really interested in the user select option. I am only interested in random and forum specific logos. Am I placing the variable in the wrong place? Maybe I have to manually edit the header code instead of replacing the variable?
https://vborg.vbsupport.ru/external/2010/05/49.jpg
jaxel is so busy on media he has no time to even come look at this :<
give him time, it does work random and its kind of kool
rdbrown
05-08-2010, 05:18 PM
Disregard my previous question. I ended up putting it into my header template and it now works.
I did notice that the forced logo only works on the forum, but not the threads in that forum. Is there a way to make it work on all of the threads in forum that is forced?
Golzarion
05-12-2010, 11:43 AM
I did notice that the forced logo only works on the forum, but not the threads in that forum. Is there a way to make it work on all of the threads in forum that is forced?
Yes ! that would very nice ! I rewrite the codes for this ability . Now it can show them on "threads in forum that is forced " too .
Just use the attached file .
rdbrown
05-20-2010, 10:07 PM
Golzarion, that was an great fix. Thanks.
Scalemotorcars
05-31-2010, 08:56 PM
titleimage should be:
header/header.php?fid={vb:var forum.forumid}
not
header/header.php
I had a custom style and nothing worked until this edit. Thanks... Working perfectly now.
Xencored
07-19-2010, 03:53 PM
This is awesome can it be used on None vbulletin pages?
Thanks
Jaxel
08-13-2010, 10:10 PM
This mod has been globalized, so now the FID and PID will work on everypage.
And yes, Animemike, header.php can be used on ANY page; not just VB. All the product file does is send the registers for FID and PID. With the VB3 version, it didn't even need a product since you didn't have to register anything.
Xencored
08-23-2010, 11:22 PM
Animemike, header.php can be used on ANY page; not just VB. All the product file does is send the registers for FID and PID. With the VB3 version, it didn't even need a product since you didn't have to register anything.
Awesome thanks man :up::up:
Golzarion
09-09-2010, 07:57 PM
One important question : Dose this mod causes the high server load ? ( cpu usage )
I think may be it is better not to use this mod on big forums with heavy traffics...
Any idea ?
utahwildlife
09-29-2010, 11:30 AM
I am really interested in this mod. I am assuming this will work with vb 4.0.7?
8thos
11-20-2010, 09:52 PM
Interesting.
Santori
11-21-2010, 02:14 AM
Sorry but I don`t understand this purpose, Vbulletin can do this without any mod.
Create a style for each forum with a different logo.
Then go to the forum desired and in the options force the forum to see in other style.
Juggernaut
11-21-2010, 04:30 AM
One important question : Dose this mod causes the high server load ? ( cpu usage )?
This is the only reason I haven't installed this, I don't know how resource intensive this is, if you load a new banner everytime you open a new page in your forum.
Jaxel
11-23-2010, 06:13 PM
This is the only reason I haven't installed this, I don't know how resource intensive this is, if you load a new banner everytime you open a new page in your forum.
That doesn't make it resource intensive... that makes it BANDWIDTH intensive... Loading an image takes almost no server resources. And bandwidth is CHEAP. However, if you wanted to save on bandwidth, you could set your htaccess to simply cache images.
tekmaster
12-23-2010, 02:00 PM
This is basically what I've been looking for, my problem is I have a custom main header logo which is cut into 3 separate images. I'm not sure how I can implement this onto my site, maybe you can assist me on this?
Makaveli007
07-04-2011, 09:49 PM
is it possible to have different banners on different styles? from what i see, all banners that rotate are located in the header folder, but there is no way to tell the mod which set should be loaded, if you want to have different sets of images.
example my site had 2 styles, dark and light. we have about 10 dark banners, and 10 light banners. i cant dump all 20 banners in the header folder as they would get mixed up between the 2 styles.
is there any way around this?
inigo
07-07-2011, 07:45 AM
I am trying this, but I have a problem. The random option is working fine, but when I try to force to some forums, it doesn´t work.
In the URL of the image appears (clicking properties of the image): domain.com/header/header.php?fid={vb:var%20forum.forumid}
I think the %20 of the space is the problem.
I ´ve setup the image URL in custom vars as:
header/header.php?fid={vb:var forum.forumid}
because i don´t want the users to customize this setting,
In header.php forced to .png as default, and in the forums directory a 33.png, but when I enter in the Forum 33 it apperars a random image.
Is that sapce in the URL (%20) the problem?
Any help would be apreciated,
tested in Vb 4.1.2
Thanks,
inigo
07-20-2011, 04:47 PM
Any help?
Scalemotorcars
08-06-2011, 08:59 PM
The force isnt working for me either.
NTMID8
08-14-2011, 02:41 AM
The force isnt working for me either.
I also can not get force to work. I am using header/header.php?fid={vb:var forum.forumid}.
NTMID8
08-14-2011, 02:48 AM
Very cool! IS there a way to set a group of header images per forum:
Forum33_1.png
Forum33_2.png
Forum33_4.png
etc
Where only Forum 33 would show the above images randomly?
With this ability, the mod would be perfect! Any chance?
inigo
08-15-2011, 07:04 AM
Any help for these last problems?
Is this mod supported, isn't it? Please give us some response to know if we can try to make it to work with your help, or if we have to uninstall it and try the eother way with php styles.
Thanks,
Scalemotorcars
08-20-2011, 12:47 PM
Odd this developer usually has great support.
NTMID8
08-22-2011, 09:17 PM
Jaxel hasn't been on since early August. I just left him a message at his forum, though it is now running Xenforo so he may have jumped ship. :(
Scalemotorcars
08-25-2011, 02:26 PM
He sure did. I just noticed he's now posting mods on the Xenforo site.
To bad. Uninstalled.....
wickedstangs
09-16-2011, 09:51 PM
Jaxel another awesome mod.. thanks...
Fluke667
09-30-2011, 03:55 PM
i want my users to SELECT the header but its not working header is always random
whats the problem?
Ellendway
11-27-2011, 07:50 AM
Oh great, another awesome mod and the author is gone. What's wrong with world? :P
cloferba
04-20-2012, 08:57 PM
Oh great, another awesome mod and the author is gone. What's wrong with world? :P
just because Xenforo is better ;)
fwulfers
06-03-2012, 04:51 PM
Does anyone have this running on vb 4.2.0? Any suggestions to fix the Forced image on a specific forum?
Are there any similar mods that are supported or working as they should? This is the prefect mod I was looking for..
Lu480nm
10-19-2012, 07:25 AM
Does anyone have this running on vb 4.2.0? Any suggestions to fix the Forced image on a specific forum?
Are there any similar mods that are supported or working as they should? This is the prefect mod I was looking for..
up!
sticky
01-11-2013, 10:26 PM
Can't get this working on 4.2.0
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.