本文整理匯總了PHP中gallery::countComments方法的典型用法代碼示例。如果您正苦於以下問題:PHP gallery::countComments方法的具體用法?PHP gallery::countComments怎麽用?PHP gallery::countComments使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類gallery
的用法示例。
在下文中一共展示了gallery::countComments方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: ceil
}
if (!empty($system->config['perpage'])) {
$pages = ceil(sizeof($images) / $system->config['perpage']);
if (!empty($_GET['page']) && (int) $_GET['page'] > 0) {
$page = (int) $_GET['page'] - 1;
} else {
$page = 0;
}
$start = $page * $system->config['perpage'];
$total = $system->config['perpage'];
} else {
$pages = 1;
$page = 0;
$start = 0;
$total = sizeof($images);
}
$keys = @array_keys($images);
$data['pagination'] = rcms_pagination(sizeof($images), $system->config['perpage'], $page + 1, '?' . $_SERVER['QUERY_STRING']);
$c = $start;
$data['images'] = array();
while ($total > 0 && $c < sizeof($keys)) {
$image =& $images[$keys[$c]];
if ($image_data = $gallery->getData($image)) {
$data['images'][$image] = $image_data + array('thumbnail' => $gallery->getThumbnail($image), 'comments' => $gallery->countComments($image));
}
$total--;
$c++;
}
$data['linkdata'] = $linkdata;
show_window('<a href="?module=gallery">' . __('Gallery') . '</a>' . (cfr('GALLERY') ? ' ' . edit_button(ADMIN_FILE . '?show=module&id=gallery.upload&tab=5') : '') . (get('keyword') ? ' → ' . get('keyword') : ''), !empty($images) ? rcms_parse_module_template('gallery.tpl', $data) : __('Nothing founded'), 'center');
}