Login     Sign up
Network Statistics
Thakim (@thakim83)
Join date: Oct 8th 2010
Community posts: 87
View Profile
Send Message

Is it possible to remove network statistics from the homepage of the site?

174 months ago
Ian (@eeji)
Join date: Aug 3rd 2010
Community posts: 107
View Profile
Send Message

yes. which theme/template are you using?

174 months ago
Thakim (@thakim83)
Join date: Oct 8th 2010
Community posts: 87
View Profile
Send Message

I am using the default theme.

174 months ago
Ian (@eeji)
Join date: Aug 3rd 2010
Community posts: 107
View Profile
Send Message

open /themes/default/page.tpl.php

find and remove:
[code] //## display network statistics.
$res = sql_query("SELECT count() as num from ".tb()."accounts");
$row = sql_fetch_array($res);
$stats['members'] = $row['num'];
$res = sql_query("SELECT count(
) as num from ".tb()."friends");
$row = sql_fetch_array($res);
$stats['friendships'] = $row['num']/2;
$res = sql_query("SELECT count() as num from ".tb()."comments");
$row = sql_fetch_array($res);
$stats['comments'] = $row['num'];
$res = sql_query("SELECT count(
) as num from ".tb()."streams");
$row = sql_fetch_array($res);
$stats['activities'] = $row['num'];
$theme_default_cache_left .= '
<div>
<strong>'.t('Network Statistics').':</strong><br />
<strong>'.$stats['activities'].'</strong> '.t('Activities').'<br />
<strong>'.$stats['members'].'</strong> '.t('Members').'<br />
<strong>'.$stats['friendships'].'</strong> '.t('Friendships').'<br />
<strong>'.$stats['comments'].'</strong> '.t('Comments').'
</div>
';

    echo $theme_default_cache_left;[/code]
174 months ago
Philip Rees (@piprees)
Join date: Dec 8th 2010
Community posts: 98
View Profile
Send Message

How do we do this on the blue template?

Id like to remove it whilst the membership builds and put it back later.

172 months ago
Eliz zeta (@eliz)
Join date: Nov 29th 2010
Community posts: 153
View Profile
Send Message

cut and save it anywhere you want, and let just one line commented
//## display network statistics.
than past it when you want.

172 months ago
Philip Rees (@piprees)
Join date: Dec 8th 2010
Community posts: 98
View Profile
Send Message

OK - done that, now how can i make the network statistics ONLY appear in the admin panel?

172 months ago