当前位置: 首页>>代码示例>>PHP>>正文


PHP CKunenaLink::GetCategoryListLink方法代码示例

本文整理汇总了PHP中CKunenaLink::GetCategoryListLink方法的典型用法代码示例。如果您正苦于以下问题:PHP CKunenaLink::GetCategoryListLink方法的具体用法?PHP CKunenaLink::GetCategoryListLink怎么用?PHP CKunenaLink::GetCategoryListLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CKunenaLink的用法示例。


在下文中一共展示了CKunenaLink::GetCategoryListLink方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: KUNENA_get_menu

/**
 * Function  that get the menu used in the header of our board
 * @param array $fbConfig
 * @param array $fbIcons
 * @param int $my_id
 *             The user id
 * @param int $type
 *             What kind of header do you want to print: 1: default (home/profile/latest posts/faq), 2: extended1 (home/profile/view/pending messages/faq) ,3:extended2 (home/profile/reply/view/pdf/faq)
 * @param string $view
 *             The view the user is currently using, only needs to be pass when type==3 or type==2
 * @param int $catid
 *             Only needs to be passed when type==3 or type==2
 * @param int $id
 *             Only needs to be passed when type==3 or type==2
 * @param int $thread
 *             Only needs to be passed when type==3 or type==2 (well actually just give 0 when type==2)
 * @param boolean $is_moderator
 *             Only needs to be passed when type==2
 * @param int $numPending
 *             Number of pending messages, only needs to be passed when type==2
 * @return String $header
 *             The menu :-)
 */
function KUNENA_get_menu($cbitemid, $fbConfig, $fbIcons, $my_id, $type, $view = "", $catid = 0, $id = 0, $thread = 0, $is_moderator = false, $numPending = 0)
{
    $func = strtolower(JRequest::getCmd('func', ''));
    if ($func == '') {
        switch ($fbConfig->fbdefaultpage) {
            case 'recent':
                $func = 'latest';
                break;
            case 'my':
                $func = $my_id ? 'mylatest' : 'latest';
                break;
            default:
                $func = 'listcat';
        }
    }
    $header = '<div id="fb_topmenu" ><div id="Kunena_tab"><ul>';
    $header .= ' <li ';
    if ($func == 'latest' || $func == '') {
        $header .= ' class="Kunena_item_active" ';
    }
    $header .= ' >' . CKunenaLink::GetShowLatestLink('<span>' . (array_key_exists('showlatest', $fbIcons) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['showlatest'] . '" border="0" alt="' . _KUNENA_ALL_DISCUSSIONS . '" title="' . _KUNENA_ALL_DISCUSSIONS . '"/>' : _KUNENA_ALL_DISCUSSIONS) . '</span>');
    $header .= '</li>';
    if ($my_id != 0) {
        $header .= ' <li ';
        if ($func == 'mylatest') {
            $header .= ' class="Kunena_item_active" ';
        }
        $header .= ' >' . CKunenaLink::GetShowMyLatestLink('<span>' . (array_key_exists('showmylatest', $fbIcons) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['showmylatest'] . '" border="0" alt="' . _KUNENA_MY_DISCUSSIONS . '" title="' . _KUNENA_MY_DISCUSSIONS . '"/>' : _KUNENA_MY_DISCUSSIONS) . '</span>');
        $header .= '</li>';
    }
    $header .= '<li ';
    if ($func == 'listcat') {
        $header .= ' class="Kunena_item_active" ';
    }
    $header .= ' >' . CKunenaLink::GetCategoryListLink('<span>' . (array_key_exists('home', $fbIcons) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['home'] . '" border="0" alt="' . _KUNENA_CATEGORIES . '"  title="' . _KUNENA_CATEGORIES . '" />' : _KUNENA_CATEGORIES) . '</span>');
    $header .= '</li>';
    if ($my_id != 0) {
        $header .= ' <li ';
        if ($func == 'myprofile') {
            $header .= ' class="Kunena_item_active" ';
        }
        $header .= ' >' . CKunenaLink::GetMyProfileLink($fbConfig, $my_id, '<span>' . (array_key_exists('profile', $fbIcons) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['profile'] . '" border="0" alt="' . _GEN_MYPROFILE . '" title="' . _GEN_MYPROFILE . '"/>' : _GEN_MYPROFILE) . '</span>');
        $header .= '</li>';
    }
    switch ($type) {
        case 3:
            //Threaded view option removed from Kunena
            //            if ($view == "flat") {
            //    			$header .= '<li>';
            //    			$header .= CKunenaLink::GetViewLink('view', $id, $catid, 'threaded', '<span>'. _GEN_THREADED_VIEW .'</span>');
            //                $header .= '</li>';
            //            }
            //            else
            //            {
            //    			$header .= '<li>';
            //                $header .= CKunenaLink::GetViewLink('view', $id, $catid, 'flat', '<span>'. _GEN_FLAT_VIEW .'</span>');
            //                $header .= '</li>';
            //            }
            break;
        case 2:
            //Threaded view option removed from Kunena
            //            if ($view == "flat")
            //            {
            //    			$header .= '<li>';
            //    			$header .= CKunenaLink::GetViewLink('showcat', $id, $catid, 'threaded', '<span>'. _GEN_THREADED_VIEW .'</span>');
            //                $header .= '</li>';
            //            }
            //			else
            //			{
            //    			$header .= '<li>';
            //                $header .= CKunenaLink::GetViewLink('showcat', $id, $catid, 'flat', '<span>'. _GEN_FLAT_VIEW .'</span>');
            //                $header .= '</li>';
            //			}
            if ($is_moderator) {
                if ($numPending > 0) {
                    $numcolor = '<font color="red">';
                    $header .= '<li>';
//.........这里部分代码省略.........
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:101,代码来源:fb_layout.php

示例2: KUNENA_get_menu

/**
 * Function  that get the menu used in the header of our board
 * @param int $cbitemid
 *             Community builder itemid, used for linking to cb profile
 * @param array $fbConfig
 * @param array $fbIcons
 * @param int $my_id
 *             The user id
 * @param int $type
 *             What kind of header do you want to print: 1: default (home/profile/latest posts/faq), 2: extended1 (home/profile/view/pending messages/faq) ,3:extended2 (home/profile/reply/view/pdf/faq)
 * @param string $view
 *             The view the user is currently using, only needs to be pass when type==3 or type==2
 * @param int $catid
 *             Only needs to be passed when type==3 or type==2
 * @param int $id
 *             Only needs to be passed when type==3 or type==2
 * @param int $thread
 *             Only needs to be passed when type==3 or type==2 (well actually just give 0 when type==2)
 * @param boolean $is_moderator
 *             Only needs to be passed when type==2
 * @param int $numPending
 *             Number of pending messages, only needs to be passed when type==2
 * @return String $header
 *             The menu :-)
 */
function KUNENA_get_menu($cbitemid, $fbConfig, $fbIcons, $my_id, $type, $view = "", $catid = 0, $id = 0, $thread = 0, $is_moderator = false, $numPending = 0)
{
    $header = '<div id="fb_topmenu" >';
    $header .= CKunenaLink::GetCategoryListLink('<span>' . (isset($fbIcons['home']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['home'] . '" border="0" alt="' . _KUNENA_CATEGORIES . '"  title="' . _KUNENA_CATEGORIES . '" />' : _KUNENA_CATEGORIES) . '</span>');
    if ($my_id != 0) {
        $header .= CKunenaLink::GetMyProfileLink($fbConfig, $my_id, isset($fbIcons['profile']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['profile'] . '" border="0" alt="' . _GEN_MYPROFILE . '" title="' . _GEN_MYPROFILE . '"/>' : _GEN_MYPROFILE);
    }
    switch ($type) {
        case 3:
            /* DISABLE MENU
                $header.= '<a href="'.JRoute::_(KUNENA_LIVEURLREL.'&amp;func=post&amp;do=reply&amp;replyto='.$thread.'&amp;catid='.$catid).'" >';
                $header.= isset($fbIcons['menureply']) ? '<img src="' . KUNENA_URLICONSPATH.$fbIcons['menureply'].'" border="0" alt="'._GEN_POST_REPLY.'" title="'._GEN_POST_REPLY.'"/>' : _GEN_POST_REPLY;
                $header.= '</a>';
               */
            //Disable threaded view option alltogether for Kunena
            //            if ($view == "flat") {
            //    			$header .= CKunenaLink::GetViewLink('view', $id, $catid, 'threaded', (isset($fbIcons['threadedview']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['threadedview'] . '" border="0" alt="' . _GEN_THREADED_VIEW . '" title="' . _GEN_THREADED_VIEW . '"/>' : _GEN_THREADED_VIEW));
            //            }
            //            else
            //            {
            //                $header .= CKunenaLink::GetViewLink('view', $id, $catid, 'flat', (isset($fbIcons['flatview']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['flatview'] . '" border="0" alt="' . _GEN_FLAT_VIEW . '" title="' . _GEN_FLAT_VIEW . '"/>' : _GEN_FLAT_VIEW));
            //            }
            break;
        case 2:
            //Disable threaded view option alltogether for Kunena
            //            if ($view == "flat")
            //            {
            //    			$header .= CKunenaLink::GetViewLink('showcat', $id, $catid, 'threaded', (isset($fbIcons['threadedview']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['threadedview'] . '" border="0" alt="' . _GEN_THREADED_VIEW . '" title="' . _GEN_THREADED_VIEW . '"/>' : _GEN_THREADED_VIEW));
            //            }
            //			else
            //			{
            //                $header .= CKunenaLink::GetViewLink('showcat', $id, $catid, 'flat', (isset($fbIcons['flatview']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['flatview'] . '" border="0" alt="' . _GEN_FLAT_VIEW . '" title="' . _GEN_FLAT_VIEW . '"/>' : _GEN_FLAT_VIEW));
            //			}
            if ($is_moderator) {
                if ($numPending > 0) {
                    $numcolor = '<font color="red">';
                    $header .= CKunenaLink::GetPendingMessagesLink($catid, isset($fbIcons['pendingmessages']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['pendingmessages'] . '" border="0" alt="' . $numPending . ' ' . _SHOWCAT_PENDING . '" />' : $numcolor . '' . $numPending . '</font> ' . _SHOWCAT_PENDING);
                }
            }
            break;
        case 1:
        default:
            $header .= CKunenaLink::GetShowLatestLink(isset($fbIcons['showlatest']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['showlatest'] . '" border="0" alt="' . _GEN_LATEST_POSTS . '" title="' . _GEN_LATEST_POSTS . '"/>' : _GEN_LATEST_POSTS);
            break;
    }
    if ($fbConfig->enablerulespage) {
        $header .= CKunenaLink::GetRulesLink($fbConfig, isset($fbIcons['rules']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['rules'] . '" border="0" alt="' . _GEN_RULES . '" title="' . _GEN_RULES . '"/>' : _GEN_RULES);
    }
    if ($fbConfig->enablehelppage) {
        $header .= CKunenaLink::GetHelpLink($fbConfig, isset($fbIcons['help']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['help'] . '" border="0" alt="' . _GEN_HELP . '" title="' . _GEN_HELP . '"/>' : _GEN_HELP);
    }
    $header .= '</div>';
    return $header;
}
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:79,代码来源:fb_layout.php

示例3: array_reverse

}
//reverse the array
$jr_path_menu = array_reverse($jr_path_menu);
//attach topic name
$this->kunena_topic_title = '';
if ($func == "view" and $id) {
    $this->kunena_topic_title = $pathway->getMessagesTitles($id);
    $jr_path_menu[] = $this->escape($this->kunena_topic_title);
}
// print the list
if (count($jr_path_menu) == 0) {
    $jr_path_menu[] = '';
}
$jr_forum_count = count($jr_path_menu);
$fireinfo = '';
$firepath = '<div class="path-element-first">' . CKunenaLink::GetCategoryListLink($this->escape($this->config->board_title)) . '</div>';
$firelast = '';
for ($i = 0; $i < $jr_forum_count; $i++) {
    if ($i == $jr_forum_count - 1) {
        if ($this->config->onlineusers) {
            $firelast .= '<br /><div class="path-element-last">' . $jr_path_menu[$i] . $fireinfo . '</div>';
        }
    } else {
        $firepath .= '<div class="path-element">' . $jr_path_menu[$i] . '</div>';
    }
}
//get viewing
$fireonline = '';
if ($this->config->onlineusers) {
    if ($func == "userprofile") {
        $fireonline .= JText::_('COM_KUNENA_USER_PROFILE');
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:31,代码来源:pathway.php


注:本文中的CKunenaLink::GetCategoryListLink方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。