Zikula: A Flexible Open Source Content Management System
home | forum | international support | contact us

Docs for page pnuserapi.php

Procedural File: pnuserapi.php

Source Location: /HitCount/pnuserapi.php

Classes:



Page Details:

Zikula Application Framework



Tags:

version:  $Id: pnuserapi.php 24383 2008-06-12 14:15:02Z markwest $
copyright:  (c) 2002, Zikula Development Team
link:  http://www.zikula.org
license:  GNU/GPL








hitcount_userapi_get [line 19]

mixed hitcount_userapi_get( $args['modname'] $args, $args['objectid'] 1)

get a hitcount for a specific item



Tags:

return:  hits the corresponding hit count, or void if no hit exists


Parameters

$args['objectid']   1   ID of the item this hitcount is for
$args['modname']   $args   name of the module this hitcount is for
[ Top ]



hitcount_userapi_gethits [line 54]

array hitcount_userapi_gethits( $args['modname'] $args, $args['itemids'] 1)

get a hitcount for a list of items



Tags:

return:  = $hits;


Parameters

$args['itemids']   1   array of item IDs
$args['modname']   $args   name of the module you want items from
[ Top ]



hitcount_userapi_getmodules [line 158]

array hitcount_userapi_getmodules( $args)

get the list of modules for which we're counting items



Tags:

return:  = $numitems


Parameters

   $args  
[ Top ]



hitcount_userapi_leftjoin [line 212]

array('table' hitcount_userapi_leftjoin( $args['modname'] $args, $args['modid'] 1, $args['itemids'] 2)

return the field names and correct values for joining on hitcount table example : SELECT ..., $moduleid, $itemid, $hits,...

FROM ... LEFT JOIN $table ON $field = <name of itemid field> WHERE ... AND $hits > 1000 AND $where




Tags:

return:  => 'nuke_hitcount', 'field' => 'nuke_hitcount.pn_itemid', 'where' => 'nuke_hitcount.pn_itemid IN (...) AND nuke_hitcount.pn_moduleid = 123', 'moduleid' => 'nuke_hitcount.pn_moduleid', ... 'hits' => 'nuke_hitcount.pn_hits')


Parameters

$args['modid']   1   ID of the module you want items from
$args['itemids']   2   optional array of itemids that we are selecting on
$args['modname']   $args   name of the module you want items from, or
[ Top ]



hitcount_userapi_tophits [line 104]

array hitcount_userapi_tophits( $args['modname'] $args, $args['numitems'] 1, $args['startnum'] 2)

get the list of items with top N hits for a module



Tags:

return:  of array('itemid' => $itemid, 'hits' => $hits)


Parameters

$args['numitems']   1   number of items to return
$args['startnum']   2   start at this number (1-based)
$args['modname']   $args   name of the module you want items from
[ Top ]


Packages:

Files:

Classes: