|
Joined: Oct 2006
Posts: 358
enthusiast
|
enthusiast
Joined: Oct 2006
Posts: 358 |
Every two weeks or so, I change the header graphic on our forum. That keeps it looking FRESH and I get to show-off different cars.
I've just realized that lots of folks DON"T see the new header because they stay logged in for weeks at a time -- and they never REFRESH the screen.
So, my question is, can I add a "Refresh" statement that will "automatically" do this?? Even if they stay logged in?
(I want a person's account to LOOK for a new header graphic each time they visit the site.)
--BIll B
|
|
|
|
Joined: Apr 2004
Posts: 1,973 Likes: 154
|
Joined: Apr 2004
Posts: 1,973 Likes: 154 |
That would be controlled mainly by their cached files, and their cache file settings. You could possibly add a few lines to your htaccess file to give your site some control over how it requests others to cache your files, but ultimately, their cache is prority over whatever you tell it to do. Add this to your .htaccess file - <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=1209600, public"
</FilesMatch> But the best way to control that your users see your most up to date header image, is just to use a different file name when you change the image. If your current header image is name "201412.jpg", and you want that image to refresh for everyone in January, edit your header and use "201501.jpg". At first, no one will have that file in their cache, so it will be requested from the server. Then use "201502.jpg" for February... and so on.
|
|
|
|
Joined: Oct 2006
Posts: 358
enthusiast
|
enthusiast
Joined: Oct 2006
Posts: 358 |
Oh, yes, of course... change the name! Dang it... Should have thought of that.
I liked using the same name, because all I had to do was save a new graphic file with same name... but of course, you're right... using a different name would FORCE it to change the display...
Hummm... Let me think about this. How can I easily change the name that CP is looking for? I guess that I could change forum/includes/header.php -- or just modify it via the CP.
Okay... just changed the name and EVERYONE got bumped to the new graphic.
Thanks -- Sometimes the answer is just TOO obvious! :-)
--BIll B
|
|
|
|
Joined: Jun 2006
Posts: 16,355 Likes: 125
|
Joined: Jun 2006
Posts: 16,355 Likes: 125 |
You could just add it to the header includes in the CP, then there is no modifications needed.
I don't recall which former member it was, due to lack of communication and lack of updates a huge amount of members have flocked away from the UBB, but someone had a php script which would randomly change their signature graphic; a little complicated for what you're looking for though.
|
|
|
|
Joined: Jun 2006
Posts: 16,355 Likes: 125
|
Joined: Jun 2006
Posts: 16,355 Likes: 125 |
Wouldn't be much harder than randomizing a php array really; don't see the point of it having to be any more involved if you wanted multiple ad's to cycle through
|
|
|
|
Joined: Oct 2006
Posts: 358
enthusiast
|
enthusiast
Joined: Oct 2006
Posts: 358 |
Thanks guys... i wasn't looking for a rotating header or randomizing it. Just want to replace it every week or two. I realized that many guys were still seeing the "old" header since they don't log out. So just changing the graphic name is probably the quickest and easiest way - using the CP. By the way, I do use a "changing graphic" in one of my islands -- "Wha Sup?" It changes every day to a new graphic and text. I have set it up with 365 days. (although I only have about 100 graphics so far)... but it's cool and it keeps the site "fresh". http://vcca.org/forum/--Bill
--BIll B
|
|
|
|
Joined: Jun 2006
Posts: 16,355 Likes: 125
|
Joined: Jun 2006
Posts: 16,355 Likes: 125 |
By the way, I do use a "changing graphic" in one of my islands -- "Wha Sup?" It changes every day to a new graphic and text. I have set it up with 365 days. (although I only have about 100 graphics so far)... but it's cool and it keeps the site "fresh". I'd totally add all graphics to an array, randomize it, and set its cache for 1 day; you'd never have to update a thing, lol
|
|
|
|
Joined: Oct 2006
Posts: 358
enthusiast
|
enthusiast
Joined: Oct 2006
Posts: 358 |
Well, tomorrow (the 16th) is our Forum's Birthday -- 13 years!! So I had to create a new header for tomorrow.... Hooray!!
That makes three new headers in about 10 days... ouch... Sure glad that you reminded me to change the name -- that way EVERYONE sees all of the hard work that I put into this thing. :-)
--BIll B
|
|
|
1 members (Gizmo),
648
guests, and
53
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|