phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Autorefresh on the basis of shoutbox autorefresh


 
Search this topic... | Search General Support... | Search Box
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Author Message
lukair
Board Member



Joined: 13 Jun 2011

Posts: 2



PostPosted: Mon Jun 13, 2011 11:53 am 
Post subject: Autorefresh on the basis of shoutbox autorefresh

Hello. I was directed here by "Lumpy Burgertushie" from phpbb forum, and I hope I get some help.

It is a longshot, but it won't hurt if I'll try.

I'm looking for the way to make parts of the main site of a forum to autorefresh, on the same basis as some shoutbox modules are being refreshed.

A forum is build upon phpbb modification by przemo(1.12.6), but I assume most of the stuff evolve around same basis, so maybe someone will be able to help me.

Anyways, cutting to the chase. We have a shoutbox on the main page that is being autorefreshed(just the shoutbox window) by a given amount of seconds, based on this modification:
http://www.przemo.org/phpBB2/forum/viewtopic.php?p=166515#166515

What I'm looking for is the way to make the "who is online" statistic to being autorefreshed by the same token. Is it possible? I heard often about ajax, but I'm thinking that way(the way shoutbox was done) it would be much easier to be done.

So is it possible? Again, I'm looking for the part of the site, where it has "who is online" statistic, to be refreshed by given amount of seconds, not the whole page to be refreshed (by meta atribute).

Thanks guys for any help, in advance
Back to top
dogs and things
Board Member



Joined: 18 Nov 2008

Posts: 621
Location: Spain


flag
PostPosted: Mon Jun 13, 2011 12:47 pm 
Post subject: Re: Autorefresh on the basis of shoutbox autorefresh

How about Auto Refresh Who is Online List?
_________________
phpBB2 will never die, I hope!
Back to top
lukair
Board Member



Joined: 13 Jun 2011

Posts: 2



PostPosted: Mon Jun 13, 2011 1:21 pm 
Post subject: Re: Autorefresh on the basis of shoutbox autorefresh

dogs and things wrote:
How about Auto Refresh Who is Online List?

I saw it couple days back, when I was searching through google. But doesn't it refresh the whole subpage with the "who is online" listing? From my understanding, it doesn't refresh the statistics part of the main page, but the whole subpage dedicated to this section.

Thanks for the interest though, I appriciate it
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 418
Location: Québec


flag
PostPosted: Mon Jun 13, 2011 2:07 pm 
Post subject: Re: Autorefresh on the basis of shoutbox autorefresh

The way they do it is that the shoutbox is in an iframe, so if you use a meta refresh on it, only it is refreshed instead of the entire page. The problem here is I'm not sure how it would work with template parsing. I think you would actually have to take the Who's online code from index.php and move it to a different file that would process it on its own. Then you'd have to split your index_body.tpl in two and parse it differently:

Code:
//
// Generate the page
//
$template->pparse('body1'); // (up to line 52)
?>
<iframe src="whosonline.php">Something here for browsers that don't support iframes</iframe> // This page contains the php code for the data, and does its template parsing (53 to 71)
<?
$template->pparse('body2'); // (line 72 to end)
Back to top
Display posts from previous:   
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0266 seconds using 15 queries. (SQL 0.0023 Parse 0.0008 Other 0.0235)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo