XOOP-Stats v0.60 for XOOPS 2

XOOPS@IBDeeming! announces a new release of XOOP-Stats v0.60 for XOOPS 2.2.x (yes, it will run under 2.0.13.2) XOOP-Stats continues to evolve and become a better, more enhanced offerring for XOOPS 2 administrators. There are a number of enhancements to make this an integral part of your XOOPS site!

This version has the following features:

XOOP-Stats v0.45

This version has the following features:

XOOP-Stats V0.3 for XOOPS 2

Version 0.3

This version has the following features:

Version 0.2

Version 0.1

The is more planned for the future, and we are always open to suggestions or needs!

Make a BACKUP if UNSURE prior to Installing or Upgrading!!!

FRESH INSTALLATION

NOTE: If you are upgrading, skip this step!

The installation of this module is standard to any XOOPS site. There is one exception to the installation noted below to have Statistics running on your site.
  1. Log in to your XOOPS site as ADMIN
  2. Go to your XOOPS administration cPanel
  3. Copy the Statistics package to the modules directory
  4. Install Statistics module
    1. select the System Admin->Modules link.
    2. Locate the Statistics module in the lower list of the screen
    3. Select the icon to install the module
    4. Confirm your installation
    5. You should see a screen with the information showing the module has been installed. You can return to Module administration.
    6. If you are using custom templates for your site, make sure you generate the new ones with a fresh install of XOOPStats
  5. There is a minor requirement to make this thing go.
    1. Add the following to your header.php (XOOPS 2.0.x) or bottom of common.php (XOOPS 2.2.x) file located in the root of XOOPS

      // for stats by XOOPS@IBDeeming!
      require_once XOOPS_ROOT_PATH.'/modules/statistics/include/hitcounter.php';

    2. for xoops 2.0.x
      at the top of the file header.php under the line
      require_once XOOPS_ROOT_PATH.'/class/xoopsblock.php';
    3. for xoops 2.2.x
      at the bottom of the file include/common.php under the line
      $xoopsLogger->context = "module";
      but before the last ' } ' (curly brace)
  6. You should now be collecting data
  7. There are two blocks included with this module, activate as you would any block on your XOOPS site.
    1. Hitcounter - shows a graphical representation of the hits to your site. Check the options as listed above.
    2. Referers - shows the referers that have come to your site.

UPGRADE

There has been many table changes to allow the new functionality of tracking referers, and a new table for holding your blacklist, and counting blocked hits. I have supplied the proper raw sql files in the statistics/sql folder. I have also created an upgrade script to facilitate the upgrade of tables if you are not comfortable with sql files. Please follow these recommended steps for a successful upgrade!
  1. Log in to your XOOPS site as ADMIN
  2. Go to your XOOPS administration cPanel
  3. Deactivate the Statistics module
    1. Uncheck the Active box for Statistics
    2. Select Submit
  4. Copy the Statistics package to the modules directory
  5. Go to the Admin/Modules panel and Update teh XOOPStats module
  6. Run modules/statistics/admin/upgrade.php
  7. If you are running custom templates, delete them for Site Statistics, re-generate.
  8. Go to the Admin cPanel of your XOOPS site.
  9. Update the Statistics module
    1. select the System Admin->Modules link.
    2. select the upgrade option for Statistics
  10. Activate the statistics module
    1. Check the Active box for Statistics
    2. Select Submit
  11. Don't foget to check the settings for the Referers block!

ALL INSTALLATIONS - Activating User Screen Width and Color Depth

The capturing of screen width and color depth is not required for the active collection of stats data for your site. If you would like to capture this addtional data, you will need to activate the javascript required for reading this data from the users screen. This is very simple!

  1. Use the following script code:
    <script language="javascript">
    <!--
    writeCookie();
    
    function writeCookie()
    {
     var today = new Date();
     var the_date = new Date("December 25, 2012");
     var the_cookie_date = the_date.toGMTString();
     var the_cookie = "sw=" + screen.width +
          "; expires=" + the_cookie_date +
          "; path=/" +
          "; domain=";
    
     document.cookie=the_cookie
    
     var today = new Date();
     var the_date = new Date("December 25, 2012");
     var the_cookie_date = the_date.toGMTString();
     var the_cookie = "sc=" + screen.colorDepth +
          "; expires=" + the_cookie_date +
          "; path=/" +
          "; domain=";
    
     document.cookie=the_cookie
    }
    //-->
    </script>
    
    Make sure it is contained within the valid script tags for Javascript!!!
  2. Log in as admin to your site
  3. Select Sytem Admin->Preferences
  4. Select Edit Meta Tags and Footer
  5. Add the Javascript provided anywhere within the FOOTER text entry field (this will activate for all themes that are properly supporting the xoops_footer Smarty tag. They all should be!
  6. Save your settings!
  7. This counts for visitors in your site, not admin pages.

SUPPORT

Go to XOOPS@IBDeeming! and check the forums. You can also contact us at the site for more support!

Thanks for using this mod!