diff options
| -rw-r--r-- | admin/schema_inc.php | 8 | ||||
| -rw-r--r-- | index.php | 23 | ||||
| -rw-r--r-- | pv_chart.php | 22 | ||||
| -rw-r--r-- | referer_stats.php | 23 | ||||
| -rw-r--r-- | stats_lib.php | 16 | ||||
| -rw-r--r-- | templates/referer_stats.tpl | 66 | ||||
| -rw-r--r-- | templates/stats.tpl | 5 | ||||
| -rw-r--r-- | usage_chart.php | 22 |
8 files changed, 114 insertions, 71 deletions
diff --git a/admin/schema_inc.php b/admin/schema_inc.php index f22a81c..4d72142 100644 --- a/admin/schema_inc.php +++ b/admin/schema_inc.php @@ -25,14 +25,14 @@ $gBitInstaller->registerPackageInfo( STATS_PKG_NAME, array( ) ); // ### Default Preferences -$gBitInstaller->registerPreferences( SHOUTBOX_PKG_NAME, array( +$gBitInstaller->registerPreferences( STATS_PKG_NAME, array( array('', 'feature_referer_stats','y') ) ); // ### Default UserPermissions -$gBitInstaller->registerUserPermissions( SHOUTBOX_PKG_NAME, array( - array('bit_p_view_referer_stats', 'Can view referer stats', 'editors', 'shoutbox'), - array('bit_p_view_stats', 'Can view site stats', 'basic', 'shoutbox'), +$gBitInstaller->registerUserPermissions( STATS_PKG_NAME, array( + array('bit_p_view_referer_stats', 'Can view referer stats', 'editors', 'stats'), + array('bit_p_view_stats', 'Can view site stats', 'basic', 'stats'), ) ); @@ -1,12 +1,21 @@ <?php +/** + * $Header: /cvsroot/bitweaver/_bit_stats/index.php,v 1.2 2005/06/28 07:45:58 spiderr Exp $ + * + * Copyright (c) 2004 bitweaver.org + * Copyright (c) 2003 tikwiki.org + * Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. + * All Rights Reserved. See copyright.txt for details and a complete list of authors. + * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details + * + * $Id: index.php,v 1.2 2005/06/28 07:45:58 spiderr Exp $ + * @package stats + * @subpackage functions + */ -// $Header: /cvsroot/bitweaver/_bit_stats/index.php,v 1.1 2005/06/19 05:05:49 bitweaver Exp $ - -// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. -// All Rights Reserved. See copyright.txt for details and a complete list of authors. -// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. - -// Initialization +/** + * required setup + */ require_once( '../bit_setup_inc.php' ); include_once( STATS_PKG_PATH.'stats_lib.php' ); diff --git a/pv_chart.php b/pv_chart.php index 6eafe46..29b8407 100644 --- a/pv_chart.php +++ b/pv_chart.php @@ -1,11 +1,21 @@ <?php +/** + * $Header: /cvsroot/bitweaver/_bit_stats/pv_chart.php,v 1.2 2005/06/28 07:45:58 spiderr Exp $ + * + * Copyright (c) 2004 bitweaver.org + * Copyright (c) 2003 tikwiki.org + * Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. + * All Rights Reserved. See copyright.txt for details and a complete list of authors. + * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details + * + * $Id: pv_chart.php,v 1.2 2005/06/28 07:45:58 spiderr Exp $ + * @package stats + * @subpackage functions + */ -// $Header: /cvsroot/bitweaver/_bit_stats/pv_chart.php,v 1.1 2005/06/19 05:05:49 bitweaver Exp $ - -// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. -// All Rights Reserved. See copyright.txt for details and a complete list of authors. -// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. - +/** + * required setup + */ require_once( '../bit_setup_inc.php' ); //Include the code include (UTIL_PKG_PATH."phplot.php"); diff --git a/referer_stats.php b/referer_stats.php index 6741506..7512b34 100644 --- a/referer_stats.php +++ b/referer_stats.php @@ -1,12 +1,21 @@ <?php +/** + * $Header: /cvsroot/bitweaver/_bit_stats/referer_stats.php,v 1.2 2005/06/28 07:45:58 spiderr Exp $ + * + * Copyright (c) 2004 bitweaver.org + * Copyright (c) 2003 tikwiki.org + * Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. + * All Rights Reserved. See copyright.txt for details and a complete list of authors. + * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details + * + * $Id: referer_stats.php,v 1.2 2005/06/28 07:45:58 spiderr Exp $ + * @package stats + * @subpackage functions + */ -// $Header: /cvsroot/bitweaver/_bit_stats/referer_stats.php,v 1.1 2005/06/19 05:05:49 bitweaver Exp $ - -// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. -// All Rights Reserved. See copyright.txt for details and a complete list of authors. -// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. - -// Initialization +/** + * required setup + */ require_once( '../bit_setup_inc.php' ); include_once ( STATS_PKG_PATH.'stats_lib.php'); diff --git a/stats_lib.php b/stats_lib.php index d047487..7605e15 100644 --- a/stats_lib.php +++ b/stats_lib.php @@ -1,5 +1,21 @@ <?php +/** + * $Header: /cvsroot/bitweaver/_bit_stats/Attic/stats_lib.php,v 1.2 2005/06/28 07:45:58 spiderr Exp $ + * + * Copyright (c) 2004 bitweaver.org + * Copyright (c) 2003 tikwiki.org + * Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. + * All Rights Reserved. See copyright.txt for details and a complete list of authors. + * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details + * + * $Id: stats_lib.php,v 1.2 2005/06/28 07:45:58 spiderr Exp $ + * @package stats + */ +/** + * @package stats + * @subpackage StatsLib + */ class StatsLib extends BitBase { function StatsLib() { BitBase::BitBase(); } diff --git a/templates/referer_stats.tpl b/templates/referer_stats.tpl index c15e0ed..2f3e876 100644 --- a/templates/referer_stats.tpl +++ b/templates/referer_stats.tpl @@ -1,48 +1,36 @@ <div class="floaticon">{bithelp}</div> <div class="display statistics"> -<div class="header"> -<h1><a href="{$gBitLoc.STATS_PKG_URL}referer_stats.php">{tr}Referer stats{/tr}</a></h1> -</div> + <div class="header"> + <h1>{tr}Referer Statistics{/tr}</h1> + </div> -<div class="body"> + <div class="body"> + <table class="data"> + <caption>{tr}Referer Statistics{/tr}</caption> + <tr> + <th>{smartlink ititle="Hits" isort=hits iorder=desc idefault=1 offset=$offset}</th> + <th>{smartlink ititle="Referer" isort=referer offset=$offset}</th> + <th>{smartlink ititle="Last Hit" isort=last offset=$offset}</th> + </tr> -<table class="find"> -<tr><td>{tr}Find{/tr}</td> - <td> - <form method="get" action="{$gBitLoc.STATS_PKG_URL}referer_stats.php"> - <input type="text" name="find" value="{$find|escape}" /> - <input type="submit" value="{tr}find{/tr}" name="referer" /> - <input type="hidden" name="sort_mode" value="{$sort_mode|escape}" /> - </form> - </td> -</tr> -</table> + {section name=user loop=$channels} + <tr class="{cycle values='odd,even'}"> + <td style="text-align:right;">{$channels[user].hits}</td> + <td>{$channels[user].referer}</td> + <td style="text-align:right;">{$channels[user].last|bit_short_datetime}</td> + </tr> + {sectionelse} + <tr class="norecords"><td colspan="3">{tr}No records found{/tr}</td></tr> + {/section} + </table> + </div> <!-- end .body --> -<table class="data"> -<tr> -<th><a href="{$gBitLoc.STATS_PKG_URL}referer_stats.php?offset={$offset}&sort_mode={if $sort_mode eq 'referer_desc'}referer_asc{else}referer_desc{/if}">{tr}Term{/tr}</a></th> -<th><a href="{$gBitLoc.STATS_PKG_URL}referer_stats.php?offset={$offset}&sort_mode={if $sort_mode eq 'hits_desc'}hits_asc{else}hits_desc{/if}">{tr}Hits{/tr}</a></th> -<th><a href="{$gBitLoc.STATS_PKG_URL}referer_stats.php?offset={$offset}&sort_mode={if $sort_mode eq 'last_desc'}last_asc{else}last_desc{/if}">{tr}Last{/tr}</a></th> -</tr> -{cycle values="even,odd" print=false} -{section name=user loop=$channels} -<tr class="{cycle}"> -<td>{$channels[user].referer}</td> -<td>{$channels[user].hits}</td> -<td>{$channels[user].last|bit_short_datetime}</td> -</tr> -{sectionelse} -<tr class="norecords"><td colspan="2">{tr}No records found{/tr}</td></tr> -{/section} -</table> + <div class="navbar"> + <a href="{$gBitLoc.STATS_PKG_URL}referer_stats.php?clear=1">{tr}clear stats{/tr}</a> + </div> -</div> <!-- end .body --> - -<div class="navbar"> - <a href="{$gBitLoc.STATS_PKG_URL}referer_stats.php?clear=1">{tr}clear stats{/tr}</a> -</div> - -{include file="bitpackage:kernel/pagination.tpl"} + {include file="bitpackage:kernel/pagination.tpl"} + {minifind} </div> <!-- end .statistics --> diff --git a/templates/stats.tpl b/templates/stats.tpl index 7f64e73..cc7d60b 100644 --- a/templates/stats.tpl +++ b/templates/stats.tpl @@ -1,4 +1,4 @@ -{* $Header: /cvsroot/bitweaver/_bit_stats/templates/stats.tpl,v 1.1 2005/06/19 05:05:49 bitweaver Exp $ *} +{* $Header: /cvsroot/bitweaver/_bit_stats/templates/stats.tpl,v 1.2 2005/06/28 07:45:59 spiderr Exp $ *} <div class="display statistics"> <div class="header"> <h1>{tr}Stats{/tr}</h1> @@ -28,8 +28,9 @@ <a href="#quiz_stats">{tr}Quizzes{/tr}</a>{/if} </div> - <div class="body"> + <div class="clear"></div> + <div class="body"> <a name="site_stats"></a> <table class="panel"> <caption>{tr}Site Statistics{/tr}</caption> diff --git a/usage_chart.php b/usage_chart.php index 1a665c7..685d1b1 100644 --- a/usage_chart.php +++ b/usage_chart.php @@ -1,11 +1,21 @@ <?php +/** + * $Header: /cvsroot/bitweaver/_bit_stats/usage_chart.php,v 1.2 2005/06/28 07:45:58 spiderr Exp $ + * + * Copyright (c) 2004 bitweaver.org + * Copyright (c) 2003 tikwiki.org + * Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. + * All Rights Reserved. See copyright.txt for details and a complete list of authors. + * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details + * + * $Id: usage_chart.php,v 1.2 2005/06/28 07:45:58 spiderr Exp $ + * @package stats + * @subpackage functions + */ -// $Header: /cvsroot/bitweaver/_bit_stats/usage_chart.php,v 1.1 2005/06/19 05:05:49 bitweaver Exp $ - -// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. -// All Rights Reserved. See copyright.txt for details and a complete list of authors. -// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. - +/** + * required setup + */ require_once( '../bit_setup_inc.php' ); require_once (STATS_PKG_PATH."stats_lib.php"); //Include the code |
