CakePHP-Whos-Online-Plugin
CakePHP-Whos-Online-Plugin copied to clipboard
CakePHP Who's Online Plugin
Online CakePHP Plugin
Keeps track of users visiting your site, tracking where they are in your application. This will use the user's IP address (converted to a database friendly int).
About
Author Nick Baker Version 2.0 Link http://www.webtechnick.com Email [email protected]
Get it
GIT: [email protected]:webtechnick/CakePHP-Whos-Online-Plugin.git
Changelog:
2.0: CakePHP 2.x upgrade
1.2: Added nicer included element. 1.1: Added tests. 1.0: Initial Release
Setup:
- Copy /Online into app/Plugin/Online
2a) Run the online.sql into your database 2b) Run cake schema run create --plugin Online note: If you choose the cake schema route -- I suggest changing your database engine to MEMORY as it will be faster to access/write than default. note2: if you choose the cake schema route -- change the ip column to 'unsigned'
- Add a bit of code to your AppController.php
//AppController.php var $uses = array('Online.Online');
function beforeRender(){ $this->Online->update($this->here); }
See Who's Online:
I've included a few ways for you to view who's online without too much hassle.
- Use the built in OnlineHelper:
- Use requestAction():
- Or you can use the built in element (css will be needed to make it look nice)
Enjoy! Nick