zikula-modules / Mediashare

Mediashare is a media file gallery designed for use with Zikula.
6 stars 1 forks source link

Pager #21

Open hvorragend opened 13 years ago

hvorragend commented 13 years ago

could you please add an pager into the thumbnail-function?

More details :-)

Function 'mediashare_user_thumbnails' The whole pager-logic does not exist. If you have a lot of images inside an album, it could be quite helpful to have a pager. At this moment I am using a quick&dirty smarty-solution with a lot of assign, counter and pnvarcleanfrominput.

A better solution seems to be more work, because you have to modify your UserAPI-functions.

Function 'mediashare_user_list'

A pager already exists here. But the pageSize is hardcoded to "5" (in template "see pager" and UserAPI-function). What do you think of a modvar for this? And a new parameter?

function mediashare_user_list($args) { ... $pageSize = mediashareGetIntUrl('pagesize', $args, 5); ... $items = pnModAPIFunc('mediashare', 'user', 'getList', compact('keyword', 'uname', 'albumId', 'order', 'orderDir', 'recordPos', 'pageSize')); ...}

Function 'mediashare_user_latest'

The number "5" is hard-coded in 'getLatestMediaItems' and 'getLatestAlbums'. Perhaps, we could use the same modvar as above for this.