diff options
| author | santo spider <spider@santo> | 2015-07-29 10:07:36 -0400 |
|---|---|---|
| committer | santo spider <spider@santo> | 2015-07-29 10:07:36 -0400 |
| commit | e44476a648ab0bbf8d44f80f3123e3020ff20966 (patch) | |
| tree | d1e010ed1d7134d634613ee28d4ac156e4710ea3 | |
| parent | 8b14b0f953e176b15cd4892d3f77410dd73914be (diff) | |
| download | stats-e44476a648ab0bbf8d44f80f3123e3020ff20966.tar.gz stats-e44476a648ab0bbf8d44f80f3123e3020ff20966.tar.bz2 stats-e44476a648ab0bbf8d44f80f3123e3020ff20966.zip | |
update options
| -rw-r--r-- | admin/schema_inc.php | 1 | ||||
| -rw-r--r-- | templates/menu_stats_admin.tpl | 14 | ||||
| -rw-r--r-- | templates/user_stats.tpl | 4 |
3 files changed, 11 insertions, 8 deletions
diff --git a/admin/schema_inc.php b/admin/schema_inc.php index a8a1905..5fc0e0c 100644 --- a/admin/schema_inc.php +++ b/admin/schema_inc.php @@ -60,6 +60,7 @@ $gBitInstaller->registerPreferences( STATS_PKG_NAME, array( // ### Default UserPermissions $gBitInstaller->registerUserPermissions( STATS_PKG_NAME, array( + array('p_stats_admin', 'Can admin stats', 'admin', STATS_PKG_NAME), array('p_stats_view_referer', 'Can view referer stats', 'editors', STATS_PKG_NAME), array('p_stats_view', 'Can view site stats', 'editors', STATS_PKG_NAME), ) ); diff --git a/templates/menu_stats_admin.tpl b/templates/menu_stats_admin.tpl index 375df13..48ebca6 100644 --- a/templates/menu_stats_admin.tpl +++ b/templates/menu_stats_admin.tpl @@ -1,13 +1,13 @@ {strip} {if $packageMenuTitle}<a href="#"> {tr}{$packageMenuTitle|capitalize}{/tr}</a>{/if} <ul class="{$packageMenuClass}"> - <li><a class="item" href="{$smarty.const.KERNEL_PKG_URL}admin/index.php?page=stats">{tr}Stats{/tr}</a></li> + <li><a class="item" href="{$smarty.const.KERNEL_PKG_URL}admin/index.php?page=stats">{tr}Stats Settings{/tr}</a></li> <li><a class="item" href="{$smarty.const.STATS_PKG_URL}index.php">{tr}Site Stats{/tr}</a></li> - {if $gBitSystem->mDb->mType eq 'postgres'} - <li><a class="item" href="{$smarty.const.STATS_PKG_URL}users.php">{tr}User Stats{/tr}</a></li> - {/if} - {if $gBitSystem->isFeatureActive( 'stats_referers' ) and $gBitUser->hasPermission( 'p_stats_view_referer' )} - <li><a class="item" href="{$smarty.const.STATS_PKG_URL}referrers.php">{tr}Referer Stats{/tr}</a></li> - {/if} +{if $gBitSystem->mDb->mType eq 'postgres'} + <li><a class="item" href="{$smarty.const.STATS_PKG_URL}users.php">{tr}User Stats{/tr}</a></li> +{/if} +{if $gBitSystem->isFeatureActive( 'stats_referers' ) and $gBitUser->hasPermission( 'p_stats_view_referer' )} + <li><a class="item" href="{$smarty.const.STATS_PKG_URL}referrers.php">{tr}Referer Stats{/tr}</a></li> +{/if} </ul> {/strip} diff --git a/templates/user_stats.tpl b/templates/user_stats.tpl index 01a792c..82bf96e 100644 --- a/templates/user_stats.tpl +++ b/templates/user_stats.tpl @@ -20,7 +20,9 @@ <tr class="{cycle values="even,odd"}"> <td>{$timeframe}</td> <td> - [<a href="{$smarty.const.STATS_PKG_URL}referrers.php?period={$smarty.request.period}&timeframe={$timeframe|urlencode}">Referrers</a>] + {if $gBitSystem->isFeatureActive( 'stats_referers' ) and $gBitUser->hasPermission( 'p_stats_view_referer' )} + [<a href="{$smarty.const.STATS_PKG_URL}referers.php?period={$smarty.request.period}&timeframe={$timeframe|urlencode}">Referrers</a>] + {/if} </td> <td><div style="width:{math equation="round( ( r / m ) * 100 )" r=$reg m=$userStats.max}%; background:#ff9;padding:0 0 0 5px;">{booticon iname="icon-user"} <a href="{$smarty.const.USERS_PKG_URL}admin/index.php?period={$smarty.request.period}&timeframe={$timeframe|urlencode}">{$reg}</a></div></td> </tr> |
