PortalParts.com Site

 Forum Index > Geeklog > Filemgmt Plugin Support New Topic Post Reply
 A quick fix for the File Management stats with Geeklog 1.4.0
 |  Printable Version
Dirk
 January 28 2006 14:09 PM (Read 2993 times)  
Forum Big Cheese
Big Cheese

Status: offline

Registered: 09/05/02
Posts: 87

When using the File Management plugin with Geeklog 1.4.0, you'll notice that the plugin's entry on Geeklog's stats page appears out of line with the other entries. That's because of a few changes in the plugin API in 1.4.0. Here's a simple fix:

PHP Formatted Code
function plugin_statssummary_filemgmt ()
{
    global $_FM_TABLES, $LANG_FILEMGMT;

    $total_pages = DB_count ($_FM_TABLES['filemgmt_filedetail']);
    $total_downloads = DB_getItem ($_FM_TABLES['filemgmt_filedetail'],
                                   'SUM(hits)', '');
    $item_count = COM_NumberFormat ($total_pages)
                . ' (' . COM_NumberFormat ($total_downloads) . ')';

    return array ($LANG_FILEMGMT['nofiles'], $item_count);
}


Simply add that function to the File Management's functions.inc file and the plugin's stats will be in line with the rest of the stats again.

The detailed stats (Top Ten Accessed Files in Repository) will need more work for the alternating row colors, but I leave that to Blaine :wink:

bye, Dirk


 
Profile Email Website PM
Quote
Content generated in: 0.19 seconds
New Topic Post Reply



 All times are CST. The time is now 11:47 AM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content