Username
Forgot password?
Welcome to our site!
Or Join with FTTF

Who's online module

1

1095 views
I am working on the "who's online" module. Finished writing the plugin
that updates the ONLINE records with the user data (user id, username, avatar, what url they are on, title of page and geo ip location)
This update is made after every page request. When you run the php in fastcgi mode controlled by php-fpm (you should, all the cool kids are doing it) this data is written after the page is served to the browser, so there is no noticeable performance hit.

The module is written as a plugin, it can be easily disabled from !config.ini by commenting out just one line.

Next step or steps would be to write a code to actually display a small block with 'who's online' and then we can include that block anywhere on the site.

I will also write the controller to show the list of all users online with links to pages that they are on right now.

It will be a while before all is ready but at least the logic to update the "ONLINE" collection is almost done. I just have to add additional config block to !config.ini to allow admin to also enable tracking "Guests" activity so non-logged in users will also be tracked with geo location and what pages they viewing currently. For performance reasons admin may want to disable guests online tracking.

I hope to have this finished by next weekend.

I am also working on exporting geo ip data into Mongo collections, so no more use of shmop extension will be required - it will be pure Mongo DB based ip to location lookup. I think I got it working even on 32 bit php now, using float as opposed to integer to store larger numbers. The whole GeoIP class will also become much cleaner and probably even more efficient.

I just have to test it more.
 
asked September 25, 2011 at 5:30 PM

 US

0 Answers

Be the first to answer this question

Join with account you already have

FTTF

Preview

Alert