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


PHP CKunenaLink::GetKunenaLink方法代码示例

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


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

示例1: KUNENA_get_pathway

/**
 *  Function to print the pathway
 *  @param object    database object
 *  @param object    category object
 *  @param int        the post id
 *  @param boolean    set title
 */
function KUNENA_get_pathway(&$kunena_db, $obj_fb_cat, $bool_set_title, $obj_post = 0)
{
    global $fbIcons;
    $document =& JFactory::getDocument();
    $fbConfig =& CKunenaConfig::getInstance();
    //Get the Category's parent category name for breadcrumb
    $kunena_db->setQuery("SELECT name, id FROM #__fb_categories WHERE id='" . $obj_fb_cat->getParent() . "'");
    $objCatParentInfo = $kunena_db->loadObject();
    check_dberror("Unable to load category.");
    //get the Moderator list for display
    $kunena_db->setQuery("SELECT * FROM #__fb_moderation AS m LEFT JOIN #__users AS u ON u.id=m.userid WHERE m.catid='" . $obj_fb_cat->getId() . "'");
    $modslist = $kunena_db->loadObjectList();
    check_dberror("Unable to load moderators.");
    //    echo '<div class="fb_pathway">';
    // List of Forums
    // show folder icon
    $return = '<img src="' . KUNENA_URLIMAGESPATH . 'folder.gif" border="0" alt="' . _GEN_FORUMLIST . '" style="vertical-align: middle;" />&nbsp;';
    // link to List of Forum Categories
    $return .= '&nbsp;' . CKunenaLink::GetKunenaLink(_GEN_FORUMLIST) . '<br />';
    // List of    Categories
    if ($objCatParentInfo) {
        if ($bool_set_title) {
            $document->setTitle(stripslashes($objCatParentInfo->name) . ' - ' . stripslashes($obj_fb_cat->getName()) . ' - ' . stripslashes($fbConfig->board_title));
        }
        // show lines
        $return .= '&nbsp;<img src="' . KUNENA_URLIMAGESPATH . 'tree-end.gif" alt="|-" border="0" style="vertical-align: middle;" />';
        $return .= '&nbsp;<img src="' . KUNENA_URLIMAGESPATH . 'folder.gif" alt="' . $objCatParentInfo->name . '" border="0" style="vertical-align: middle;" />&nbsp;';
        // link to Category
        $return .= '&nbsp;' . CKunenaLink::GetCategoryLink('listcat', $objCatParentInfo->id, $objCatParentInfo->name) . '<br />';
        $return .= '&nbsp;<img src="' . KUNENA_URLIMAGESPATH . 'tree-blank.gif" alt="| " border="0" style="vertical-align: middle;" />';
    } else {
        if ($bool_set_title) {
            $document->setTitle(stripslashes($obj_fb_cat->getName()) . ' - ' . stripslashes($fbConfig->board_title));
        }
    }
    // Forum
    // show lines
    $return .= '&nbsp;<img src="' . KUNENA_URLIMAGESPATH . 'tree-end.gif" alt="|-" border="0" style="vertical-align: middle;" />';
    $return .= '&nbsp;<img src="' . KUNENA_URLIMAGESPATH . 'folder.gif" alt="+" border="0" style="vertical-align: middle;" />&nbsp;';
    // Link to forum
    $return .= '&nbsp;' . CKunenaLink::GetCategoryLink('showcat', $obj_fb_cat->getId(), $obj_fb_cat->getName());
    //check if this forum is locked
    if ($obj_fb_cat->getLocked()) {
        $return .= isset($fbIcons['forumlocked']) ? '&nbsp;&nbsp;<img src="' . KUNENA_URLICONSPATH . $fbIcons['forumlocked'] . '" border="0" alt="' . _GEN_LOCKED_FORUM . '" title="' . _GEN_LOCKED_FORUM . '"/>' : '    <img src="' . KUNENA_URLIMAGESPATH . 'lock.gif"    border="0" width="13" height="13" alt="' . _GEN_LOCKED_FORUM . '" title="' . _GEN_LOCKED_FORUM . '">';
    }
    // check if this forum is reviewed
    if ($obj_fb_cat->getReview()) {
        $return .= isset($fbIcons['forumreviewed']) ? '&nbsp;&nbsp;<img src="' . KUNENA_URLICONSPATH . $fbIcons['forumreviewed'] . '" border="0" alt="' . _GEN_REVIEWED . '" title="' . _GEN_REVIEWED . '"/>' : '    <img src="' . KUNENA_URLIMAGESPATH . 'review.gif" border="0" width="15" height="15" alt="' . _GEN_REVIEWED . '" title="' . _GEN_REVIEWED . '">';
    }
    //check if this forum is moderated
    if ($obj_fb_cat->getModerated()) {
        $return .= isset($fbIcons['forummoderated']) ? '&nbsp;&nbsp;<img src="' . KUNENA_URLICONSPATH . $fbIcons['forummoderated'] . '" border="0" alt="' . _GEN_MODERATED . '" title="' . _GEN_MODERATED . '"/>' : '    <img src="' . KUNENA_URLEMOTIONSPATH . 'moderate.gif" border="0"  alt="' . _GEN_MODERATED . '" title="' . _GEN_MODERATED . '"/>';
        $text = '';
        if (count($modslist) > 0) {
            foreach ($modslist as $mod) {
                $text = $text . ', ' . $mod->username;
            }
            $return .= '&nbsp;(' . _GEN_MODERATORS . ': ' . ltrim($text, ",") . ')';
        }
    }
    if ($obj_post != 0) {
        if ($bool_set_title) {
            $document->setTitle($obj_post->subject . ' - ' . stripslashes($fbConfig->board_title));
        }
        // Topic
        // show lines
        $return .= '<br />&nbsp;<img src="' . KUNENA_URLIMAGESPATH . 'tree-blank.gif" alt="| " border="0" style="vertical-align: middle;" />';
        $return .= '&nbsp;<img src="' . KUNENA_URLIMAGESPATH . 'tree-blank.gif" alt="| " border="0" style="vertical-align: middle;" />';
        $return .= '&nbsp;<img src="' . KUNENA_URLIMAGESPATH . 'tree-end.gif" alt="|-" border="0" style="vertical-align: middle;" />';
        $return .= '&nbsp;<img src="' . KUNENA_URLIMAGESPATH . 'folder.gif" alt="+" border="0" style="vertical-align: middle;" />&nbsp;';
        $return .= '&nbsp;<b>' . $obj_post->subject . '</b>';
        // Check if the Topic is locked?
        if ((int) $obj_post->locked != 0) {
            $return .= '&nbsp;<img src="' . KUNENA_URLIMAGESPATH . 'lock.gif"    border="0" width="13" height="13" alt="' . _GEN_LOCKED_TOPIC . '" title="' . _GEN_LOCKED_TOPIC . '"/>';
        }
    }
    //    echo '</div>';
    return $return;
}
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:86,代码来源:fb_layout.php

示例2: intval

$fbConfig =& CKunenaConfig::getInstance();
?>
<!-- Pathway -->
<?php 
$sfunc = JRequest::getVar("func", null);
if ($func != "") {
    ?>

    <div class = "<?php 
    echo $boardclass;
    ?>
forum-pathway">
        <?php 
    $catids = intval($catid);
    $jr_path_menu = array();
    echo '<div class="path-element-first">' . CKunenaLink::GetKunenaLink(kunena_htmlspecialchars(stripslashes($fbConfig->board_title))) . '</div>';
    while ($catids > 0) {
        $query = "SELECT * FROM #__fb_categories WHERE id='{$catids}' AND published='1'";
        $kunena_db->setQuery($query);
        $results = $kunena_db->loadObject();
        if (!$results) {
            break;
        }
        $parent_ids = $results->parent;
        $fr_name = kunena_htmlspecialchars(trim(stripslashes($results->name)));
        //$cids=@mysql_result( $results, 0, 'id' );
        $sname = CKunenaLink::GetCategoryLink('showcat', $catids, $fr_name);
        if ($catid == $catids && $sfunc != "view") {
            $fr_title_name = $fr_name;
            $jr_path_menu[] = $fr_name;
        } else {
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:31,代码来源:fb_pathway.php


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