cc-devel AT lists.ibiblio.org
Subject: Developer discussion for Creative Commons technology and tools
List archive
[cc-devel] [ cctools-Feature Requests-2769147 ] Popular Downloads Query
- From: "SourceForge.net" <noreply AT sourceforge.net>
- To: noreply AT sourceforge.net
- Subject: [cc-devel] [ cctools-Feature Requests-2769147 ] Popular Downloads Query
- Date: Tue, 21 Apr 2009 22:25:19 +0000
Feature Requests item #2769147, was opened at 2009-04-16 11:04
Message generated for change (Comment added) made by fourstones
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=559969&aid=2769147&group_id=80503
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: ccHost
Group: None
>Status: Closed
Priority: 5
Private: No
Submitted By: Michael Krnac (michaelkrnac)
Assigned to: Victor Stone (fourstones)
Summary: Popular Downloads Query
Initial Comment:
On this Page:
http://summerstyle.net/openclipart.org/?ccm=/view/media/browse
I get the Highest rated Cliparts of the past 4 weeks with this query call:
%query('t=ocal_widget_show_recent_browseview&limit=6&sort=score&sinced=4
weeks ago')%
Is it possible to get the popular downloads (ighest download count) with a
query too?
----------------------------------------------------------------------
>Comment By: Victor Stone (fourstones)
Date: 2009-04-21 15:25
Message:
bug fixes in SVN 12326 allow for the following code to work (drop that into
a file with a PHP extension into your local_files/lib directory
<?
CCEvents::AddHandler(CC_EVENT_API_QUERY_SETUP,
'download_sorter_query_setup');
function download_sorter_query_setup( &$args, &$queryObj,
$requiresValidation )
{
if( !empty($args['sort']) && $args['sort'] == 'download' )
{
$ord = empty($args['ord']) || (strtoupper($args['ord']) == 'DESC')
? 'DESC' : 'ASC';
$queryObj->sql_p['order'] = 'upload_dl_count ' . $ord;
}
}
?>
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=559969&aid=2769147&group_id=80503
-
[cc-devel] [ cctools-Feature Requests-2769147 ] Popular Downloads Query,
SourceForge.net, 04/16/2009
- <Possible follow-up(s)>
- [cc-devel] [ cctools-Feature Requests-2769147 ] Popular Downloads Query, SourceForge.net, 04/16/2009
- [cc-devel] [ cctools-Feature Requests-2769147 ] Popular Downloads Query, SourceForge.net, 04/21/2009
Archive powered by MHonArc 2.6.24.