Is it possible to auto-refresh a text widget ?
I can't get an answer to this one elsewhere so here goes !
I run a sports blog on game nights that needs to have a simple widget or plug-in that carries the game score and which updates without visitors/fans having to continually hit F5/Refresh in case the score has changed (that screws the site up big time !). A simple text widget would do. There is other content on the page - eg: a chat room - so I don't want the whole page to refresh - only the score. It sounds simple but I just can't find a way to do it and would love some ideas ! |
The only way I can think it might work would be to have a jscript that did it
|
I'm looking at using the header image as my scoreboard by uploading an image that I update with the score.
I'm thinking if I place only one image in the theme's images/header directory (with the scoreboard on) and select the option to rotate every 15 seconds with javascript then each time I upload a revised scoreboard image, it will pick that up on refresh. Will that work - I can't see why it wouldn't ? |
Readers browsers will cache the first image it loads. I dont think it will work, they will only see original image loaded when they first viewed that page.
|
it should be easy to test, let us know if it works.
|
A quick search on wordpress.org found this plugin.
|
Jam was right - the browser just ignores the updated file even if I upload it with a different name.
Is there no code I can add within the header section to make it refresh somehow ? |
The plugin I sent a link to does a live update. The only downside I see is that you would see all the scores like a Twitter feed with the latest score at the top. Someone who is logged into the site can update the score from the front end and it will automatically update.
|
I think the plug-in is fine as you can limit the displayed messages to just one (the latest) thus making it look like it is updating.
However, cosmetically the header idea looks great if I could make it work but unless somebody knows how to force an auto refresh or somehow to ignore the cache then I'm stuck. I'm positive there is a bit of code that will do this but I'm just not clever enough to know what it is ! |
You could put the plugin into the header by adding a new widget area per the the header config box. The info on adding a new widget area is in that section of the theme options. Then you could increase the font size of the score with CSS.
|
Mmmmm ..... never thought of that !
Will try that out - many thanks ! |
All times are GMT -6. The time now is 06:03 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.