We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

How and where would I add this kind of thing? | Forum

Topic location: Forum home » Support » General Questions
Alan
Alan Nov 19 '11
 Something like this needs to be added but how? I should also mention it needs to be done in the background similar to nncron because otherwise those with the added radio player will find it would keep refreshing the player as well thus a disruptive radio/music service lol.

"<META HTTP-EQUIV="refresh" CONTENT="59">"
The Forum post is edited by Alan Nov 20 '11
Michael I.
Michael I. Nov 21 '11
http://yoursite.com/admin/settings/page - you can add META tags in the 'Custom head code' section and it will be added to all pages of your site. 
Alan
Alan Nov 21 '11
Thank you now my only real concern with this is, as you can tell it's a kind of refresh for the site/pages, if I have a radio station built into my site will it interrupt the radio station every 59 seconds?

Hmmm yes it does interrupt it :( I need a way to refresh but somehow in the background without interrupting the pages and radio so to speak?

Ok so a quick look at the page source of FB and this is something I see 

"
<noscript><meta http-equiv="refresh" content="0; URL=/?_fb_noscript=1" /> </noscript>"

Now how to add something for my site? I know it wouldn't be "?_fb_noscript=1" />" but that's where I'm lost?
The Forum post is edited by Alan Nov 21 '11
Keelan Leader
Keelan Nov 21 '11
Why are you doing this? are you refreshing for up-to-date radio stats? If so i just embed them in an iframe widget and refresh the iframe.
Alan
Alan Nov 21 '11
I am doing or attempting to do this because I don't want to click refresh all the time. With Facebook, Google or any other social networking site it refreshes itself automatically but without disrupting the page you are on.

I am finding that if I try to do this and I am listening to my radio station then it will constantly just disrupt the music playing and if you are trying to write something in "What's happening" then you had better be quick or the page refreshes and you have to start writing the post again lol. I have a radio player widget/plugin on my site.

I have disabled the refresh though at the moment until I can figure out how FB does it because I also notice Oxwall itself (main site) also does not have this same function yet either? I always thought it was a cron thing but it turns out it isn't >.<

And sorry for all the questions all the time lol. I see it like this though if I don't ask then I will never find out. It's better to be severely inquisitive than to just sit there and get confused and mess things up without gaining the correct knowledge for it :)
The Forum post is edited by Alan Nov 21 '11
Keelan Leader
Keelan Nov 21 '11
This is ajax its something that Oxwall hasn't implemented. Refresh your site isn't really the solution to this issue.
Alan
Alan Nov 21 '11
Ahhh I am unsure about ajax as I have not even looked into it lol. But thank you for letting me know I appreciate it :)

Could it be added? 

"Custom head code"
<script src="http://ajax.googleapis.com/.../1.3.0/jquery.min.js"></script><script>var auto_refresh = setInterval(function(){$('#loaddiv').fadeOut('slow').load('index.php').fadeIn("slow");}, 20000);</script>

"Custom tail code"
<div id="loaddiv"></div>

It appears not unless I have messed up somewhere?
The Forum post is edited by Alan Nov 21 '11
Michael I.
Michael I. Nov 22 '11
The one thing I cannot understand is why do you want to refresh your page automatically? To see new updates when they are added?
Alan
Alan Nov 22 '11
Ok well I been having a look around the folders and files and it turns out that for what I was looking for is not even a line long >.< It turns out that I don't need it for the entire site (unless there is anything to do with time involved) such as newsfeed plugin and maybe the chat plugin. 

My mistake aka_le_Mulder lol. I have not really been thinking straight and within reason finally got a decent night sleep and came to the conclusion I just need to be able to keep a 59 second to 5 mins refresh in the newsfeed.