slimstat

NP_SlimStat.php

SlimStat provides sweet statistics for your blog. It uses SlimStat, by Stephen Wettone - see http://wettone.com/code/slimstat.

General Plugin info
Current Version: 0.3
Download: here (.zip, 36KB)
Demo: screenshots here
Forum Thread: here

Installing

  1. Unpack NP_SlimStat.zip and upload the files it contains to your Nucleus installation, keeping relative paths intact.
  2. Install the plugin.
  3. Add this to your config.php:

include_once(”/usr/home/pstella/public_html/nucleus/plugins/slimstat/inc.stats.php”);

Access www.yoursite.domain/stats to see the sweet statistics ;-)

Upgrading

From v0.1 to v0.3

If you want to upgrade from 0.1 to 0.3 and keep your current data, do not uninstall the plugin and install the new one. Instead, follow the instructions:

  1. replace NP_SlimStat.php and the /slimstat directory by the new version (do not uninstall before!!!)
  2. uninstall the plugin
  3. reinstall the plugin

Doing this, the plugin will just update the database table, adding a needed extra column.

On the other hand, if you have version 0.1 installed and want to start from zero, just uninstall the old version, update the plugin files and reinstall the plugin (all your data will be lost).

From v0.2x to v0.3

As the v0.2x uninstaller will leave the database tables intact, you can safely use it to upgrade to v0.3. After uninstalling it, overwrite all files with the new ones and then use the v0.3 installer.

Translating

Versions 0.2 and up support internationalization, so you can translate the stats into your own language. Follow the author’s instructions:

To translate SlimStat, add a new file at /plugins/slimstat/i18n/language-code/index.php, by making a copy of i18n/en-gb/index.php, where language-code is your language code (like “pt-br”). To use the new language, change the language setting in _config.php from its default of en-gb.

If you’ve translated SlimStat into a different language, please send me the file and I’ll include it in future releases.

Directory Structure

If you get an error message “Warning: Failed opening...”, it is probably because you have placed some files in the wrong place. To make things clearer, here’s an explanation about the plugin directory structure. Inside the compressed package (NP_SlimStat.zip), there are two directories:

plugins

The contents of the /nucleus/plugins directory should be placed inside your /nucleus/plugins directory. These are the files

  1. NP_SlimStat.php (the plugin main file - Nucleus-SlimStat integration)
  2. slimstat - directory containing the files below:
    1. _config.php (SlimStat’s configuration)
    2. _functions.php (SlimStat’s functions)
    3. _i18n.php (internationalization class)
    4. inc.class.php (responsible for increasing the the page counter)
    5. i18n - directory containing the directory below:
      1. en-gb - directory containing the file below:
        1. index.php - English (Great Britain) language file

stats

The contents of the “stats” directory should be placed in a directory in the same level of config.php. Say, you see config.php? Create a folder “stats” in that level and put the files of the folder “stats” inside it. These are the files:

  1. index.php (the main file to see the stats)
  2. _summary.php (included in index.php, shows main stats data)
  3. _details.php (included in index.php, shows detailed stats data)
  4. rss.php (provides stats syndication)
  5. _css.css (a stylesheet)
  6. external.gif (the unique image used by the script :!:)
  7. plugins - directory containing the directory below:
    1. paths - the “paths” SlimStat plugin directory
      1. index.php - the “paths” SlimStat plugin file

Tips and Tricks

Wishlist

History

  • Version 0.3, released 2006-09-17:
    • updated script to include latest SlimStat version (v0.9.4)
  • Version 0.22, released 2005-12-16:
    • blog id parameter added to the links on the stats menu
  • Version 0.21, released 2005-12-16:
    • just a quick fix in /stats/paths/index.php
  • Version 0.2, released 2005-12-16:
    • upgraded to SlimStat 0.8 (which now provides internationalization)
    • added pagename column to the database table to show the page title instead of the url in the “Recent resources” table
    • time is now based on the blog time offset, not the server time
    • several fixes
    • smoother integration (less changes required in less places)
  • Version 0.1, released 2005-12-04:
    • initial version
 
slimstat.txt · Last modified: 2006/12/19 10:49 by agtlewis