Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Board integration idea? (Non specific cpg feat. req.)  (Read 3019 times)

0 Members and 1 Guest are viewing this topic.

John

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 75
Board integration idea? (Non specific cpg feat. req.)
« on: October 18, 2003, 06:17:32 pm »

This is something I just thought would be nice for coppermine & board users,

Consider the following:

Our users have posted a total of 45 articles
We have 23 registered users
The newest registered user is Xsf41

This appears in phpbb "who is online". Wouldnt it be nice if we could make it show albums and pics here too?

Our users have posted a total of 45 articles
Our users have 39 pics in 6 galleries
We have 23 registered users
The newest registered user is Xsf41

My question is: Is this idea completely unavailable with cpg at present?

Sorry for the non cpg feature req. but i couldnt think where else to put this?

John
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Board integration idea? (Non specific cpg feat. req.)
« Reply #1 on: October 18, 2003, 06:43:21 pm »

Code: [Select]
       $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_ALBUMS']} WHERE 1");
        $nbEnr = mysql_fetch_array($result);
        $album_count = $nbEnr[0];
        mysql_free_result($result);

        $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1");
        $nbEnr = mysql_fetch_array($result);
        $picture_count = $nbEnr[0];
        mysql_free_result($result);

        $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_COMMENTS']} WHERE 1");
        $nbEnr = mysql_fetch_array($result);
        $comment_count = $nbEnr[0];
        mysql_free_result($result);

        $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_CATEGORIES']} WHERE 1");
        $nbEnr = mysql_fetch_array($result);
        $cat_count = $nbEnr[0] - $HIDE_USER_CAT;
        mysql_free_result($result);

        $result = db_query("SELECT sum(hits) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1");
        $nbEnr = mysql_fetch_array($result);
        $hit_count = (int)$nbEnr[0];
        mysql_free_result($result);


This is the rather ugly peice of code that gets the stats....
Logged
SANIsoft PHP applications for E Biz
Pages: [1]   Go Up
 

Page created in 0.014 seconds with 19 queries.