tdVisitorCounterPlugin ====================== Provides funcionalities for easy visitor counting feature, including schema, libs, interface and a flash panel to display latest visiting stats. This plugin is a part of __TD CMF__ and is based on __Doctrine ORM__. Installation ============ Install the plugin via the subversion repository by executing the following command from the project root directory: $ svn co http://svn.symfony-project.com/plugins/tdVisitorCounterPlugin/trunk plugins/tdVisitorCounterPlugin or by using the default symfony plugin install command: $ ./symfony plugin:install -s beta tdVisitorCounterPlugin as the actual release is in its beta stage. There are no assetsto ublish for this plugin since it relies on stOfcPlugin (open flash charts). Usage ===== * Re-run building your model (td_counter table holds data about users visits). * If you wish, you may generate some fixture data for the visitors counter (using _data/fixtures/fixtures.yml_ file). * enable the tdVisitorCounter module in your backend application, so that you may use the statitics about user visits using open flash chart. * make sure the config/routing.yml file is uncommented (otherwise you will have to create your own routing entries forwarding to _index_ action of _tdVisitorCounter_ module). * append the following code inside your main frontend application template (e. g. layout.php): [php] tdVisitorManager::markVisitor(); which adds a single visitor entry to the database. This mechanisms relies on browser cookies - if the _visited_ cookie doesn't exist, such a cookie is created (existing 3 minutes by default) and an entry to the td_counter table is added. Configuration ============= You can modify settings of the tdVisitorCounterPlugin in the __config/tdVisitorCounterPluginConfiguration.class.php__ file: * _td_visitor_counter_cookie_ - name of the cookie used for visitors counting. * _td_visitor_counter_months_ - number of last months shown on the chart. * _td_visitor_counter_days_ - number of last days shown on the chart. * _td_visitor_counter_cookie_interval_ - expire time of a visitor cookie. Statistics demo =============== The plugin is provided with two predefined charts: * monthly stats ![monthly_stats_image](http://img138.imageshack.us/img138/7210/monhtly.jpg "monthly stats image") * daily stats ![daily_stats_image](http://img138.imageshack.us/img138/7503/daily.jpg "daily stats image") Translations ============ You may translate tdVisitorCounter module to your own language by creating __td.XX.xml__ file under _modules/tdVisitorCounter/i18n_ directory (where XX is the language code). So far, English language is the default one and additionally Polish translationis provided. Dependencies ============ * [tdCorePlugin](http://www.symfony-project.org/plugins/tdCorePlugin) * [stOfcPlugin](http://www.symfony-project.org/plugins/stOfcPlugin)