本文整理汇总了PHP中CKunenaLink::GetCategoryPageLink方法的典型用法代码示例。如果您正苦于以下问题:PHP CKunenaLink::GetCategoryPageLink方法的具体用法?PHP CKunenaLink::GetCategoryPageLink怎么用?PHP CKunenaLink::GetCategoryPageLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CKunenaLink
的用法示例。
在下文中一共展示了CKunenaLink::GetCategoryPageLink方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: KunenaShowcatPagination
function KunenaShowcatPagination($catid, $page, $totalpages, $maxpages)
{
$startpage = $page - floor($maxpages / 2) < 1 ? 1 : $page - floor($maxpages / 2);
$endpage = $startpage + $maxpages;
if ($endpage > $totalpages) {
$startpage = $totalpages - $maxpages < 1 ? 1 : $totalpages - $maxpages;
$endpage = $totalpages;
}
$output = '<span class="fb_pagination">' . _PAGE;
if ($startpage > 1) {
if ($endpage < $totalpages) {
$endpage--;
}
$output .= CKunenaLink::GetCategoryPageLink('showcat', $catid, 1, 1, $rel = 'follow');
if ($startpage > 2) {
$output .= "...";
}
}
for ($i = $startpage; $i <= $endpage && $i <= $totalpages; $i++) {
if ($page == $i) {
$output .= "<strong>{$i}</strong>";
} else {
$output .= CKunenaLink::GetCategoryPageLink('showcat', $catid, $i, $i, $rel = 'follow');
}
}
if ($endpage < $totalpages) {
if ($endpage < $totalpages - 1) {
$output .= "...";
}
$output .= CKunenaLink::GetCategoryPageLink('showcat', $catid, $totalpages, $totalpages, $rel = 'follow');
}
$output .= '</span>';
return $output;
}
示例2: ceil
//pagination 2
if (count($messages[0]) > 0) {
echo '<div class="jr-pagenav">' . _PAGE;
if ($page - 2 > 1) {
echo ' ' . CKunenaLink::GetCategoryPageLink('showcat', $catid, 1, 1, $rel = 'follow', $class = 'jr-pagenav-nb');
}
for ($i = $page - 2 <= 0 ? 1 : $page - 2; $i <= $page + 2 && $i <= ceil($total / $threads_per_page); $i++) {
if ($page == $i) {
echo "<div class=\"jr-pagenav-nb-act\"> {$i}</div>";
} else {
echo ' ' . CKunenaLink::GetCategoryPageLink('showcat', $catid, $i, $i, $rel = 'follow', $class = 'jr-pagenav-nb');
}
}
if ($page + 2 < ceil($total / $threads_per_page)) {
echo "<div class=\"jr-pagenav-nb\"> ... </div>";
echo ' ' . CKunenaLink::GetCategoryPageLink('showcat', $catid, ceil($total / $threads_per_page), ceil($total / $threads_per_page), $rel = 'follow', $class = 'jr-pagenav-nb');
}
echo '</div>';
}
?>
</td>
</tr>
</table>
<!-- -->
<div class="<?php
echo $boardclass;
?>
_bt_cvr1">
<div class="<?php
echo $boardclass;
?>
示例3: defined
* @package Kunena
*
* @Copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
defined ( '_JEXEC' ) or die ();
?>
<li class="kcategory-row [K=ROW:krow-]">
<table summary="List of all forum categories">
<tbody>
<tr>
<td class="kcategory-body">
<ul>
<li class="kpost-title">
<h3><?php echo CKunenaLink::GetCategoryPageLink('showcat', intval($this->category->id), 1, $this->escape($this->category->name), 'follow' ) ?></h3>
<div class="clr"></div>
</li>
</ul>
</td>
<td class="kcategory-topics">
<span class="kcategory-views-number"><?php echo $this->formatLargeNumber ( $this->category->numTopics );?></span>
<span class="kcategory-views"> <?php echo JText::_('COM_KUNENA_DISCUSSIONS'); ?> </span>
</td>
<td class="kcategory-posts">
<span class="kcategory-views-number"><?php echo $this->formatLargeNumber ( $this->category->numPosts ); ?></span>
<span class="kcategory-views"> <?php echo JText::_('COM_KUNENA_MY_POSTS'); ?> </span>
</td>
<?php
$last = $this->category->getLastPosted();
示例4: foreach
</td>
</tr>
<?php
} else {
$k = 0;
}
foreach ($this->categories as $leaf) {
?>
<tr class="k<?php
echo $this->tabclass[$k ^= 1];
?>
">
<td class="kcol-mid kcol-ktopictitle">
<div class="ktopic-title-cover">
<?php
echo CKunenaLink::GetCategoryPageLink('showcat', intval($leaf->catid), 1, $this->escape($leaf->catname), 'follow', 'ktopic-title km');
?>
</div>
</td>
<td class="kcol-mid kcol-ktopicviews">
<!-- Views -->
<span class="ktopic-views-number"><?php
echo CKunenaTools::formatLargeNumber((int) $leaf->numTopics);
?>
</span>
<span class="ktopic-views"> <?php
echo JText::_('COM_KUNENA_DISCUSSIONS');
?>
</span>
<!-- /Views -->
示例5: getPagination
function getPagination($catid, $page, $totalpages, $maxpages)
{
$startpage = $page - floor($maxpages / 2) < 1 ? 1 : $page - floor($maxpages / 2);
$endpage = $startpage + $maxpages;
if ($endpage > $totalpages) {
$startpage = $totalpages - $maxpages < 1 ? 1 : $totalpages - $maxpages;
$endpage = $totalpages;
}
$output = '<ul class="kpagination">';
$output .= '<li class="page">' . JText::_('COM_KUNENA_PAGE') . '</li>';
if ($startpage > 1) {
if ($endpage < $totalpages) {
$endpage--;
}
$output .= '<li>' . CKunenaLink::GetCategoryPageLink('showcat', $catid, 1, 1, $rel = 'follow') . '</li>';
if ($startpage > 2) {
$output .= '<li class="more">...</li>';
}
}
for ($i = $startpage; $i <= $endpage && $i <= $totalpages; $i++) {
if ($page == $i) {
$output .= '<li class="active">' . $i . '</li>';
} else {
$output .= '<li>' . CKunenaLink::GetCategoryPageLink('showcat', $catid, $i, $i, $rel = 'follow') . '</li>';
}
}
if ($endpage < $totalpages) {
if ($endpage < $totalpages - 1) {
$output .= '<li class="more">...</li>';
}
$output .= '<li>' . CKunenaLink::GetCategoryPageLink('showcat', $catid, $totalpages, $totalpages, $rel = 'follow') . '</li>';
}
$output .= '</ul>';
return $output;
}