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: cpm_formatStats  (Read 5590 times)

0 Members and 1 Guest are viewing this topic.

Gephri

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 235
cpm_formatStats
« on: July 09, 2007, 11:03:15 pm »

Would like to add a new parameter to cpm_formatStats.

How can we have it include total votes?
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: cpm_formatStats
« Reply #1 on: July 10, 2007, 02:26:50 am »

Would like to add a new parameter to cpm_formatStats.

How can we have it include total votes?

As in total votes in the entire system?
Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

Gephri

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 235
Re: cpm_formatStats
« Reply #2 on: July 10, 2007, 06:17:22 am »

hi vuud:

Yes - as in 12,234 votes have been placed for all public images (not the average)
Logged

Gephri

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 235
Re: cpm_formatStats
« Reply #3 on: September 02, 2007, 07:24:31 pm »

hi vuud - any thoughts on how to accomplish this...?
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: cpm_formatStats
« Reply #4 on: September 03, 2007, 07:40:47 pm »

hi vuud - any thoughts on how to accomplish this...?

It would be pretty simple to craft your own SQL code to sum up the votes I think... Its not something cpmfetch will do - or at least not in an efficent way.

You could probably code it to return the data for every photo in the system, then go through and total up the votes and get your sum.  But that would be so hideously bad that on a system with a good number of photos it would bog out.

Your best bet right now is to code your own sql call...

Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

Gephri

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 235
Re: cpm_formatStats
« Reply #5 on: September 04, 2007, 09:30:20 am »

Thanks for giving this some thought vuud - I was thinking it might be as simple as getting Total Views or Total Comments.

But if your coding idea is the way to get the info - I'm with you on not wanting to bog down the system.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 16 queries.