I would like to add auto-refresh
5 posters
Page 1 of 1
I would like to add auto-refresh
Is there a code i can use to add auto refresh so that the posts automatically refresh while on the page or just lurking the forums? i used to use a VBulletin forum that had it and many of my members are from that site, they miss that feature.
this is a way to prevent backing out of the page or having to manually refresh the page.
this is a way to prevent backing out of the page or having to manually refresh the page.
ChachachaChia- New Member
- Posts : 14
Reputation : 1
Language : english
Re: I would like to add auto-refresh
Puttin this code into a widget or annoucnement or something will sort that out for you.
This is to refresh every 30 seconds. Change the number accordingly for how often you want.
Personally im not a fan of auto refreshing a whole page.
This is to refresh every 30 seconds. Change the number accordingly for how often you want.
- Code:
function autorefresh() {
window.location.reload();
setTimeout("autorefresh();",30000);
}
jQuery(function() {
setTimeout("autorefresh();",60000);
});
Personally im not a fan of auto refreshing a whole page.
Last edited by LGforum on October 28th 2011, 5:03 pm; edited 1 time in total
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: I would like to add auto-refresh
Where exactly would you suggest placing that?
I am only doing it for my members as it is something they have requested.
Edit: I entered the code as an announcement and it didnt do anything. I then entered it in the javascript management and it caused the page to flash uncontrollably. think i did something wrong.
I am only doing it for my members as it is something they have requested.
Edit: I entered the code as an announcement and it didnt do anything. I then entered it in the javascript management and it caused the page to flash uncontrollably. think i did something wrong.
ChachachaChia- New Member
- Posts : 14
Reputation : 1
Language : english
Re: I would like to add auto-refresh
Sorry yeah i realise my mistake.
Actually i've made quite a feqw and didnt think here.
First of all, this code exectutes on page load, so it would reload your page straight away, which is easily fixable. (edited the code above)
But here is your issue, with auto-refresh.
Say you set it for 30 seconds... and your member is typing something in a message or something, and they take over 30 seconds... the page will refresh and they will lose there work.
Actually i've made quite a feqw and didnt think here.
First of all, this code exectutes on page load, so it would reload your page straight away, which is easily fixable. (edited the code above)
But here is your issue, with auto-refresh.
Say you set it for 30 seconds... and your member is typing something in a message or something, and they take over 30 seconds... the page will refresh and they will lose there work.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: I would like to add auto-refresh
- Code:
<meta http-equiv="refresh" content="SECONDS">
add it wherever you can put code.
Mike- Hyperactive
- Posts : 4255
Reputation : 471
Language : English, HTML, CSS
Location : Loveland, Colorado
Re: I would like to add auto-refresh
There's a META for auto refresh? ... learn something new everyday. HA thanks.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: I would like to add auto-refresh
No problem, you can also make it refresh to a new website
Mike- Hyperactive
- Posts : 4255
Reputation : 471
Language : English, HTML, CSS
Location : Loveland, Colorado
Re: I would like to add auto-refresh
That code was extremely useful, Drogba. Thank you <3!
ℋunni- Forumember
- Posts : 150
Reputation : 4
Language : English
Re: I would like to add auto-refresh
okay, thanks for that.
Now please excuse the newb in me but do i just place that in the java script section?
Now please excuse the newb in me but do i just place that in the java script section?
ChachachaChia- New Member
- Posts : 14
Reputation : 1
Language : english
Re: I would like to add auto-refresh
You put that code, at the top of the website, it's not a javascript.
(if you want the Auto-Refresh for every page, then put it in the Overall_header (PunBB/PhpBB2), but it seems that you're forum version, might be Invision, so i don't know where you could put that.)
(if you want the Auto-Refresh for every page, then put it in the Overall_header (PunBB/PhpBB2), but it seems that you're forum version, might be Invision, so i don't know where you could put that.)
Re: I would like to add auto-refresh
yeah, i was using invision. swithed to pHpBB2, so how do i get to the header to add the code?
ChachachaChia- New Member
- Posts : 14
Reputation : 1
Language : english
Re: I would like to add auto-refresh
Go to, ACP -> Display --> General --> Overall_header --> put that code in,at the top, save, see if it worked or not, then publish..
Re: I would like to add auto-refresh
I believe there is a section in the ACP for adding Meta tags.
ACP>General>Search Engines
at the bottom you can add additional Meta's.
Thoug the information bit says that they only go onto the index and portal... bit pointless.
ACP>General>Search Engines
at the bottom you can add additional Meta's.
Thoug the information bit says that they only go onto the index and portal... bit pointless.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: I would like to add auto-refresh
okay, i placed it in the header and it seemed to work but is there a way to make it more seemless? as it is, the page flashes as it reloads. also, will this auto load any new posts, for instance in the chat thread where members sometimes just stay on one page. that way any new posts will just appear when they are posted.
on a side note, is there a way to remove the post notification when you post, so it doesnt take you to the page that asks for you to click on the forum link or the post link?
on a side note, is there a way to remove the post notification when you post, so it doesnt take you to the page that asks for you to click on the forum link or the post link?
ChachachaChia- New Member
- Posts : 14
Reputation : 1
Language : english
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum