Previous Thread
Next Thread
Print Thread
Hop To
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
UBB.threads Developer
UBB.threads Developer
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 -

Code
<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.


current developer of UBB.threads php forum software
current release: UBB.threads 8.0.0 // wip: UBB.threads 8.0.1
isaac @ id242.com // my forum @ CelicaHobby.com
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
UBB.threads Developer
UBB.threads Developer
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.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Dec 2003
Posts: 6,624
Likes: 84
Joined: Dec 2003
Posts: 6,624
Likes: 84
Something I use is:
http://www.spyka.net/scripts/javascript/simple-banner-rotator.
I add it all to the html includes section of UBB and edit from it also.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Jun 2006
Posts: 16,355
Likes: 125
UBB.threads Developer
UBB.threads Developer
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


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
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
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,355
Likes: 125
Originally Posted by Bill B
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


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
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

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Another error
by Baldeagle - 10/07/2024 9:08 PM
Is this a cookie issue?
by Baldeagle - 10/05/2024 2:01 PM
Search button not there
by ehill - 10/02/2024 2:56 PM
Change the Order of the buttons in a post
by Unixspot - 09/19/2024 10:04 PM
Purging logs does not work
by Baldeagle - 09/12/2024 5:16 PM
Who's Online Now
1 members (Gizmo), 648 guests, and 53 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)