[DEV] phpBB Live!

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
jbwyme
Registered User
Posts: 12
Joined: Thu Mar 09, 2006 11:20 pm

[DEV] phpBB Live!

Post by jbwyme »

I am working on using AJAX to make phpBB live... everything that is dynamic will be updated live... for any suggestions or features you would like post here.

The index page is about all I have worked on so far but its turning out nicely. For those worried about bandwidth, it doesn't make too many simultaneous connections, it checks for new post data and user regdate every second and doesn't do anything unless there is new data. If there is new data it will send off requests to get the data and display it. I also set a 15 minute timeout for the main function so the page will go static if people leave it open after 15 min.

Current Features:
Index page is nearly done - New Topics, New Posts, Last Poster, New Users, Total Users, Current Time all update live! Time out set for 15 minutes
Last edited by jbwyme on Tue Jul 04, 2006 6:52 pm, edited 12 times in total.

jbwyme
Registered User
Posts: 12
Joined: Thu Mar 09, 2006 11:20 pm

Post by jbwyme »

DEMO forum here

username: demo
password: demo

jbwyme
Registered User
Posts: 12
Joined: Thu Mar 09, 2006 11:20 pm

Post by jbwyme »

How can I get access to the array $images and $lang from a new php file?

I have at the top

Code: Select all

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
what else do I need so that I can access $images['forum_new'] for instance?

User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Post by igorw »

jbwyme wrote: How can I get access to the array $images and $lang from a new php file?

I have at the top

Code: Select all

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
what else do I need so that I can access $images['forum_new'] for instance?


Should work, as common.php includes template.php
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three

jbwyme
Registered User
Posts: 12
Joined: Thu Mar 09, 2006 11:20 pm

Post by jbwyme »

hmm wonder why I can't get access... let me check my code again.

jbwyme
Registered User
Posts: 12
Joined: Thu Mar 09, 2006 11:20 pm

Post by jbwyme »

Code: Select all

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
echo $images['icon_latest_reply'];
page is blank... any ideas?

jbwyme
Registered User
Posts: 12
Joined: Thu Mar 09, 2006 11:20 pm

Post by jbwyme »

got it... needed session management as well

jbwyme
Registered User
Posts: 12
Joined: Thu Mar 09, 2006 11:20 pm

Post by jbwyme »

what do you guys think so far with the home page nearing completion? Worthwhile/effective MOD or no?

best way to test it is to open up two browsers next to eachother and post a message in one and what the home page the other... also try registering a new user.

a few things I am wondering about: how much will the site slow down with more users and so many concurrent connections? What is the bandwidth for each request VS a full page reload? Each seperate update requires a new request and I have it set using setInterval for 1 second each. I wonder if there is a more effecient way?

Kster
Registered User
Posts: 36
Joined: Sun May 07, 2006 7:31 am

Post by Kster »

i'd kiss you if you can really pull this off...
it'd make any board seem lag free and appear real-time...

but the downside is everybody will migrate to phpbb and soon phpbb will be a paid service and vbulletin be free... haha

kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Post by kkroo »

this is going on my board for sure when it is done :D
My MODs

Need a coder?

Enjoy my Mods? - Image

jbwyme
Registered User
Posts: 12
Joined: Thu Mar 09, 2006 11:20 pm

Post by jbwyme »

okay, I think figured out the solution to the bandwidth problem:
I set an Interval that sends a request every second which returns last post time and last regdate and checks against a div element, if it is different (newer) then it will execute an update else it does nothing.. This should save big time rather than having 10 - 20 consistant requests.

Right now the Index page should be nearly done as far as post and user updating goes, I need to make it so onlne users and # online is updated live but the rest is working.

jbwyme
Registered User
Posts: 12
Joined: Thu Mar 09, 2006 11:20 pm

Post by jbwyme »

Added a timeOut function so that if a user sits on any page for more than 15 minutes, page goes static (this will be big, so people don't camp on you site and eat up bandwidth)

User avatar
*=Matt=*
Registered User
Posts: 389
Joined: Mon Dec 20, 2004 11:56 pm
Location: Oakdale, Wisconsin

Post by *=Matt=* »

Its a pretty good MOD. I found something you may want to look into.

First: Your language should not me hardcoded ;)

Code: Select all

obj.innerHTML = "New Posts!";
...
obj.innerHTML = "New Users!";
...
obj.innerHTML = "Nothing New!";
...
obj.innerHTML = "no updates needed!";
Second: Well nothign else I could say needs fixing. Your coding looks good oo yeah i know what Iw as going to say. I do you need the big file of Prototype. From what it looks like you only use it for the AJAX. I think there is a lite version of Prototype out there somewhere. I'll geta url later.

Well this MOD look very good. Good Luck :P

jbwyme
Registered User
Posts: 12
Joined: Thu Mar 09, 2006 11:20 pm

Post by jbwyme »

thanks for the feedback... those innerHTML are jsut there for placers for now i'll remove them later.. I will also look at stripping down prototype.

Shadow503
Registered User
Posts: 107
Joined: Mon Feb 13, 2006 11:43 pm
Contact:

Post by Shadow503 »

The users online keeps breaking. When it refreshes it goes from:
In total there are 2 users online :: 1 Registered, 0 Hidden and 1 Guest [ Administrator ] [ Moderator ]

To This:
[ Administrator ] [ Moderator ]

Using IE 6.0.2900.2180 (dunno if that helps)

Post Reply

Return to “[2.0.x] MODs in Development”