Rob Locke
02-02-2006, 08:30 PM
1) Open your cmps_index.php (or whatever you've renamed it).
Find:$phrasegroups = array();
$globaltemplates = array();
$actiontemplates = array();
$specialtemplates = array();Replace it with:$phrasegroups = array('adv_links');
$globaltemplates = array();
$actiontemplates = array();
$specialtemplates = array('links_d_cache');NOTE: If you already have entries in array(); just add...'adv_links',...and...'links_d_cache',...immediately after the first parentheses of $phrasegroups and $specialtemplates respectively.
2) In your forum directory open modules/stats.php.
Find:eval('$home["$mods[modid]"][\'content\'] = "' . fetch_template('adv_portal_stats') . '";');
Above it add:$getlinkcats = $db->query("SELECT linkcount, postcount FROM " . TABLE_PREFIX . "links_categories");
while ($linkcats = $db->fetch_array($getlinkcats))
{
$stats['linkcategories']++;
$stats['links'] += $linkcats['linkcount'];
$stats['linkposts'] += $linkcats['postcount'];
}
$stats['linkcategories'] = number_format($stats['linkcategories']);
$stats['links'] = number_format($stats['links']);
$stats['linkposts'] = number_format($stats['linkposts']);
$getlinkstats = $db->query_first("SELECT SUM(views) AS views FROM " . TABLE_PREFIX . "links WHERE valid = 1");
$stats['linkviews'] = number_format($getlinkstats['views']);Save and upload the file to the server.
3) In your admin control panel go to Styles & Templates > Template Manager and click the «» button to show the templates. In vBadvanced CMPS Templates open adv_portal_stats. At the very end (or wherever you prefer to place it) add:<tr>
<td class="thead"><a href="http://yoursite.com/linksdirectory/$session[sessionurl_q]">$vbphrase[links]</a></td>
</tr>
<tr>
<td class="$bgclass">
<span class="smallfont">$vbphrase[directories]: $stats[linkcategories]<br />
$vbphrase[links]: $stats[links]<br />
$vbphrase[posts]: $stats[linkposts]<br />
$vbphrase[total_views]: $stats[linkviews]<br /></span>
</td>
</tr>Make sure you replace yoursite.com and linksdirectory with your information.
That's it. Enjoy!
Find:$phrasegroups = array();
$globaltemplates = array();
$actiontemplates = array();
$specialtemplates = array();Replace it with:$phrasegroups = array('adv_links');
$globaltemplates = array();
$actiontemplates = array();
$specialtemplates = array('links_d_cache');NOTE: If you already have entries in array(); just add...'adv_links',...and...'links_d_cache',...immediately after the first parentheses of $phrasegroups and $specialtemplates respectively.
2) In your forum directory open modules/stats.php.
Find:eval('$home["$mods[modid]"][\'content\'] = "' . fetch_template('adv_portal_stats') . '";');
Above it add:$getlinkcats = $db->query("SELECT linkcount, postcount FROM " . TABLE_PREFIX . "links_categories");
while ($linkcats = $db->fetch_array($getlinkcats))
{
$stats['linkcategories']++;
$stats['links'] += $linkcats['linkcount'];
$stats['linkposts'] += $linkcats['postcount'];
}
$stats['linkcategories'] = number_format($stats['linkcategories']);
$stats['links'] = number_format($stats['links']);
$stats['linkposts'] = number_format($stats['linkposts']);
$getlinkstats = $db->query_first("SELECT SUM(views) AS views FROM " . TABLE_PREFIX . "links WHERE valid = 1");
$stats['linkviews'] = number_format($getlinkstats['views']);Save and upload the file to the server.
3) In your admin control panel go to Styles & Templates > Template Manager and click the «» button to show the templates. In vBadvanced CMPS Templates open adv_portal_stats. At the very end (or wherever you prefer to place it) add:<tr>
<td class="thead"><a href="http://yoursite.com/linksdirectory/$session[sessionurl_q]">$vbphrase[links]</a></td>
</tr>
<tr>
<td class="$bgclass">
<span class="smallfont">$vbphrase[directories]: $stats[linkcategories]<br />
$vbphrase[links]: $stats[links]<br />
$vbphrase[posts]: $stats[linkposts]<br />
$vbphrase[total_views]: $stats[linkviews]<br /></span>
</td>
</tr>Make sure you replace yoursite.com and linksdirectory with your information.
That's it. Enjoy!