Model Train Forum banner

ModelTrainForum.com, how about an update to the photo??

4K views 35 replies 11 participants last post by  gunrunnerjohn 
#1 ·
Just a thought. :)

That CP Rail shot is getting a little long in the tooth as they say!
 
#2 ·
I have been waiting and waiting. Kinda makes me feel funny standing on the corner so long. Maybe I should tie a mattress on my back and offer curb service?:D

Didn't everyone turn in their nomination months ago? Haven't heard a word.....Hmm?
 
#18 ·
I was totally opposed to rotating the header, but the more I thought about it, its not a bad idea, only has to change once a day or hour , if the devs can do it. That way people can see a well rounded slice of what were about:) and Shay is a great choice, his stuff is more realistic then the real stuff!
 
#20 ·
It can easily be coded to display a random one. It would require a template conditional:

Add New Plugin
Hook Location: init_startup
Title: RandomNum
Execution Order: 5
Plugin PHP Code: $randomnum = rand(1,4);

Now edit the header template and add $randomnum as part of an image URL like:

<img src="http://www.modeltrainforum.com/images/misc/mtfheader_{$randomnum}.jpg" border="0" alt="Model Train Forum - the complete model train resource" />​


To do one that changes every day, you'd have to take today's date and modulus it.
 
#22 ·
There are many different ways to do it.

If you have 7 images (you could double up some if you don't have that many to start out with), you can script daily by day of the week:

http://www.mediacollege.com/internet/javascript/image/daily.html

Since people seem to like the rotating image idea, if you continue to build upon image choices, you can apply the same principle with an array of 31 images, and apply based on day of the month.

Change currentdate.getDay() to currentdate.getDate() to get 1-31 instead of 0-6 for the array.

John
 
#24 ·
I was trying to keep is simple.

Issue with random daily is generating the random number once, and then using it the whole day.

The script I suggested would be easy to use with vBulletin.

For what you want, it would be better to do a server side script, that runs off a cron job at midnight, that grabs a image from a folder at random, and then copies that image overwriting the file that is the image used for the forums.

Probably can be done in bash or perl, depending on the server setup for the forums.
 
#25 ·
Hi guys,

You would like the banner to rotate between a set number of banners? How many banners were you hoping for it to rotate through? I'm not sure if this is something that I can convince creative to cook up, but once I have the set details I can check with them.

~Sheena
 
#26 ·
Any number that would be reasonable. If it's harder to go above a specific number, we can live with any limitation that has to be imposed. Obviously, we don't want this to become a major project. :) Ideally, it would be a parameter that might change if we come up with a few more nice photos.
 
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top