vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > Add-On Modules & Modifications > vBa CMPS v3.x & 2.x > Modifications (version 3.x & 2.x)

Reply
 
Thread Tools Display Modes
  #1  
Old 02-02-2006, 07:30 PM
Rob Locke Rob Locke is offline
Member
 
Join Date: Jan 2005
Posts: 65
Default Add Links Directory Stats to CMPS Stats Module

1) Open your cmps_index.php (or whatever you've renamed it).

Find:
PHP Code:
$phrasegroups = array();
$globaltemplates = array();
$actiontemplates = array();
$specialtemplates = array(); 
Replace it with:
PHP Code:
$phrasegroups = array('adv_links');
$globaltemplates = array();
$actiontemplates = array();
$specialtemplates = array('links_d_cache'); 
NOTE: If you already have entries in array(); just add...
PHP Code:
'adv_links'
...and...
PHP Code:
'links_d_cache'
...immediately after the first parentheses of $phrasegroups and $specialtemplates respectively.

2) In your forum directory open modules/stats.php.

Find:
PHP Code:
eval('$home["$mods[modid]"][\'content\'] = "' fetch_template('adv_portal_stats') . '";'); 
Above it add:
PHP Code:
$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:
Code:
<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!
__________________
Rob.
Reply With Quote
  #2  
Old 02-03-2006, 11:07 AM
Ramses Ramses is offline
Senior Member
 
Join Date: Aug 2005
Posts: 249
Default Re: Add Links Directory Stats to CMPS Stats Module

Excellent work, thank you very much Rob.
Reply With Quote
  #3  
Old 02-03-2006, 03:01 PM
Rob Locke Rob Locke is offline
Member
 
Join Date: Jan 2005
Posts: 65
Default Re: Add Links Directory Stats to CMPS Stats Module

You are very welcome. I hope it works for you.
__________________
Rob.
Reply With Quote
  #4  
Old 09-05-2007, 04:19 PM
xerohack xerohack is offline
Junior Member
 
Join Date: Oct 2006
Posts: 5
Default Re: Add Links Directory Stats to CMPS Stats Module

esta muy bueno este manual quizas te sirva de algo esto www.zonagamerz.comantes de todo esto seria mejor que creemos un punto de restauracion para no perder nuestros estilos amigos graciaz
Reply With Quote
  #5  
Old 11-05-2009, 12:45 AM
appsfinder appsfinder is offline
Junior Member
 
Join Date: Aug 2008
Posts: 26
Smile updated works for me

$getlinkcats = $db->query("SELECT linkcount, postcount FROM " . TABLE_PREFIX . "adv_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 . "adv_links WHERE valid = 1");
$stats['linkviews'] = number_format($getlinkstats['views']);
Reply With Quote
  #6  
Old 11-05-2009, 01:20 AM
appsfinder appsfinder is offline
Junior Member
 
Join Date: Aug 2008
Posts: 26
Default

just one thing not displaying categories name? any help
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[REQ] - Additional Stats in the Stats Module interfx Module & Modification Discussion & Requests 1 12-31-2005 09:51 AM
Combo Forum Stats / Gallery Stats mholtum Troubleshooting / "How do I..." Questions 7 06-01-2005 02:34 PM


All times are GMT -4. The time now is 06:28 PM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.