Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   Is it possible to auto-refresh a text widget ? (http://forum.bytesforall.com/showthread.php?t=18461)

Paul33 Sep 23, 2012 11:59 PM

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 !

juggledad Sep 24, 2012 05:02 AM

The only way I can think it might work would be to have a jscript that did it

Paul33 Sep 24, 2012 03:25 PM

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 ?

Jam Sep 24, 2012 05:16 PM

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.

juggledad Sep 24, 2012 05:50 PM

it should be easy to test, let us know if it works.

lmilesw Sep 24, 2012 08:11 PM

A quick search on wordpress.org found this plugin.

Paul33 Sep 25, 2012 01:17 AM

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 ?

lmilesw Sep 25, 2012 06:27 AM

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.

Paul33 Sep 25, 2012 08:58 AM

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 !

lmilesw Sep 25, 2012 09:05 AM

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.

Paul33 Sep 25, 2012 09:13 AM

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.