1 (edited by Loa 2011-01-13 12:28)

Topic: [Beta release] msgFlow

This is extension is under active development. If you have any idea of improvements then just Yell!

Requirements:
- Running PunBB installation http://punbb.informer.com/
- Subdirectory for msgFlow locks have to be writeable by php (chmod 777)

Demo
- http://msgflow.avarice.se/index.php
There is currently alot of spambots on the site....

Usage:
When installed all users will get their index and viewforum page updated live and get notification with a beep sound and title change.

Upcoming features in priotized order:
1. Chrome notification support
2. Live update of active topics on Portal by Daris
3. Visible status with on/off toggle, mute (both with cookie, off as default)
4. Live update of "Currently online" users on index

Features implemented:
- Live update of index page
- Live update of viewforum page
- Live update of active topics page

How it works:
The extensions works as follows:
- User arrives to index or viewforum
- With long pulls JS will check if any changes have been done, currently the long pulls will last  280 seconds.
- Connection is done to extern.php where the first person that started to long pull locks a file and then pulls the database every fifth second. When a new post been posted php will return the new post and unlock the file so all other clients can check the database. This way only one client is constantly pulling from the database every fifth second.

Disclaimer:
I have personally used this extension for a very long time, I created it in February and had it running every since. I thought that after actually making mobileswitch and OxygenMobile public then I should make this baby public aswell.

I will keep this extension maintained purely based of interest from other forum managers. If you want this extension maintained then please "watch" the git repository on Github as long as you are using it. This will keep me motivated to continue to work on it and keep it in a state where it is easy to understand and used by others (otherwise it will fall underneath my ugly hacks priority list where it keeps in a state where my preferences are hardcoded).

Download msgFlow

2

Re: [Beta release] msgFlow

Mine does this:

http://img18.imageshack.us/img18/803/watqs.jpg

3

Re: [Beta release] msgFlow

I havn't used subforums with msgFlow. Which extension do you use for subforums?

4

Re: [Beta release] msgFlow

Problem solved, had some collision with PunBB variables that I hadn't noticed.

5 (edited by Loa 2010-12-14 08:26)

Re: [Beta release] msgFlow

Update: I introduced file locks very recently and that was really a big factor that made it possible to release it (no one wants to have all users polling the sql database every second...I didn't bother..). So when I introduced locks it didn't cross my mind that different groups needed different locks cause they can see different parts of the forum and get different updates. This is now fixed.

Re: [Beta release] msgFlow

Loa wrote:

Usage:
When installed all users will get their index page updated live and get notification with a beep sound and title change.

Have this test installed here and notice no updating at all.
Also users are auto-logged-out after a few minutes here. Is that the problem? Or the "- Subdirectory for msgFlow locks have to be writeable by php"
Or am I wrong in expecting the sound to come after 1-4 minutes of someone posting? And the page to reload?

7 (edited by Loa 2010-12-14 20:13)

Re: [Beta release] msgFlow

Well, the sound should go of almost instantly. It all depends on the pulling frequency to sql. And that one is set to 5secs so max 5 secs.

Users shouldn't get logged out cause of the extension itself.

But if the "locks" directory underneath the extension isnt writable by php then all browsers will start to basically spit out requests to the server. Havn't put in fixes for this yet.

8

Re: [Beta release] msgFlow

Yea I notice that my browser here is spitting out requests to your server. Make sure that php can create and lock files in locks directory.

Re: [Beta release] msgFlow

so 777 for locks directory in extension?

10

Re: [Beta release] msgFlow

Yea

11

Re: [Beta release] msgFlow

what browsers have you tested it with?

12

Re: [Beta release] msgFlow

Both Firefox and Chrome.

The problem is on the server side cause the client side shouldn't make a new request to the server before the previous one returns. And they return almost directly for me so something is wrong on the server side.

I suggest that you disable the extension. I'm coding debuging code right now and stuff to make sure that clients doesnt continue to spit out new requests if the previous ones failed. And give us some info through browser console about the error.

13

Re: [Beta release] msgFlow

ok disabled it for the mo....

14

Re: [Beta release] msgFlow

I'l give you a shout as soon as I got some troubleshooting code finished here  wink

15

Re: [Beta release] msgFlow

I have now updated the source including the js. So you might need to refresh your browser cache to make sure you got the latest version.

The changes includes that the clients will now stop pulling the server incase it receives message that a server side error occured (couldn't create lock file, couldn't lock file ..). Just look at the json responses in net tab in firebug.

16

Re: [Beta release] msgFlow

OK thanks, it's re-activated.

Edit: Very nice - just one thing....
I wrote a test message (in chrome) and posted it.
In firefox window behind the chrome I nearly immediately saw update (so  brilliant that's working!)
BUT no sound?
what could be issue?

Edit 2: I haven't test this; but for my purposes a tab open with "active topics" and your ext updating that would be my perfect solution.... (if you have a long index page like here, it's not as easy to keep up with new topics as it is with active topics page) and with a beep....  is that do-able?

17

Re: [Beta release] msgFlow

I don't know about the sound, never been an issue for me or my users. And they use Firefox, Chrome, Opera and IE, but I will check into it.

Currently I only completed the code for msgFlow on index page. Next on the todo list is viewforum and then I could add active topics page (it's gonna be basically the same code anyway)... It's totally do-able, and it's a really great idea... never thought about active topics page...

I'm also planning to add Chrome Notifications which is really sweet for all chrome users (including me)  big_smile.

18

Re: [Beta release] msgFlow

Loa wrote:

Next on the todo list is viewforum and then I could add active topics page

Great!  maybe you can make them all ON/OFF set-able... independtly...
but the auto refresh works well here already on index.... doesn't seem to slow down....

did you notice any speed issues of site loading etc?

19

Re: [Beta release] msgFlow

I could try to fix the settings thing per user... but I'm very unsure how that works in PunBB. And I always get into these problems on how to do the interface etc.... msgflow
is pretty simple itself cause I really don't need to go into that much PunBB specific stuff.
But eventually when viewforum and active topics are working as they should then I will dig into that aswell wink

I have pushed an update to github with working sound wink

20

Re: [Beta release] msgFlow

Regarding the forum slowdown I would say none, none at all.

The visitors of my webpage are actually game fanatics of a sort... so they are constantly monitoring our forum. So I would actually say that server wise msgFlow makes it easier for the server. Cause none of my users sits and auto-refresh on auto and stuff like that anymore. It's all done by msgFlow and the extension only updates every fifth minute per user but gives near instant response.

My hope is to make msgFlow able to update almost all parts of the page. Stuff like online list, even threads while reading them. So it will significantly reduce the refreshs and jumps that users do back and forth on the forum. smile

21

Re: [Beta release] msgFlow

On big forums with tons of users then they might get issues with numbers of connections. But... well... then probably msgFlow isnt for them. But we are talking about forums with 10, 000 online users....

22

Re: [Beta release] msgFlow

Loa wrote:

I have pushed an update to github with working sound

Nice! Works!

23 (edited by Loa 2010-12-15 10:43)

Re: [Beta release] msgFlow

Great! big_smile

I was thinking about putting something in the top div.main-head that gives status and global on/off, while the settings for on/off independently for every page exists in the user profile settings.

In div.main-head:
[ msgFlow On ]
[ msgFlow Off ]
[ msgFlow Failed (click to retry) ]
[ msgFlow not active on this page ]

Just wondering if anyone have a much better idea before I start implementing these kind of stuff?

24

Re: [Beta release] msgFlow

By the way... I have a chrome punbb tab open on another screen.... and that hasn't updated in at least 10min... even though there are new posts....

Any ideas why that would be? is it on a IP basis? so if I'm looking at 3 pcs 3 punbb forums will it stop updating them if one is updated?

25

Re: [Beta release] msgFlow

Love this idea.
Anyway we could get it made part of the activetopics page for Daris's portal? big_smile