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


PHP CKunenaConfig::getInstance方法代码示例

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


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

示例1: KunenaViewPagination

function KunenaViewPagination($catid, $threadid, $page, $totalpages, $maxpages)
{
    $fbConfig =& CKunenaConfig::getInstance();
    $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::GetThreadPageLink($fbConfig, 'view', $catid, $threadid, 1, $fbConfig->messages_per_page, 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::GetThreadPageLink($fbConfig, 'view', $catid, $threadid, $i, $fbConfig->messages_per_page, $i, '', $rel = 'follow');
        }
    }
    if ($endpage < $totalpages) {
        if ($endpage < $totalpages - 1) {
            $output .= "...";
        }
        $output .= CKunenaLink::GetThreadPageLink($fbConfig, 'view', $catid, $threadid, $totalpages, $fbConfig->messages_per_page, $totalpages, '', $rel = 'follow');
    }
    $output .= '</span>';
    return $output;
}
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:35,代码来源:view.php

示例2: fb_has_post_permission

/**
 * Checks if a user has postpermission in given thread
 * @param database object
 * @param int
 * @param int
 * @param int
 * @param boolean
 * @param boolean
 *
 * @pre: fb_has_read_permission()
 */
function fb_has_post_permission(&$kunena_db, $catid, $replyto, $userid, $pubwrite, $ismod)
{
    $fbConfig =& CKunenaConfig::getInstance();
    if ($ismod) {
        return 1;
    }
    // moderators always have post permission
    if ($replyto != 0) {
        $kunena_db->setQuery("SELECT thread FROM #__fb_messages WHERE id='{$replyto}'");
        $topicID = $kunena_db->loadResult();
        if ($topicID != 0) {
            //message replied to is not the topic post; check if the topic post itself is locked
            $sql = "SELECT locked FROM #__fb_messages WHERE id='{$topicID}'";
        } else {
            $sql = "SELECT locked FROM #__fb_messages WHERE id='{$replyto}'";
        }
        $kunena_db->setQuery($sql);
        if ($kunena_db->loadResult() == 1) {
            return -1;
        }
        // topic locked
    }
    //topic not locked; check if forum is locked
    $kunena_db->setQuery("SELECT locked FROM #__fb_categories WHERE id='{$catid}'");
    if ($kunena_db->loadResult() == 1) {
        return -2;
    }
    // forum locked
    if ($userid != 0 || $pubwrite) {
        return 1;
    }
    // post permission :-)
    return 0;
    // no public writing allowed
}
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:46,代码来源:kunena.permissions.php

示例3: getConfig

 /**
  * Generate forum API
  *
  * @param moscomprofilerUser $user
  * @param array              $params
  * @return object
  */
 function getConfig($user)
 {
     global $_CB_database;
     static $forum = null;
     if ($forum === null) {
         $forum = $this->getForumParams();
         if ($forum !== null) {
             if ($forum->prefix != 'kunena' || $forum->prefix == 'kunena' && !class_exists('KunenaForum')) {
                 if (!$forum->config) {
                     $query = 'SELECT * FROM ' . $_CB_database->NameQuote('#__' . $forum->prefix . '_config');
                     $_CB_database->setQuery($query);
                     $forum->config = $_CB_database->loadAssoc();
                 } else {
                     if ($forum->component == 'com_fireboard') {
                         global $fbConfig;
                         $config =& $fbConfig;
                     } elseif ($forum->component != 'com_kunena') {
                         global $sbConfig;
                         $config =& $sbConfig;
                     }
                     include_once $forum->config;
                     if ($forum->component == 'com_kunena') {
                         $config = get_object_vars(CKunenaConfig::getInstance());
                     }
                     $forum->config = $config;
                 }
             } elseif (class_exists('KunenaFactory')) {
                 $forum->config = get_object_vars(KunenaFactory::getConfig());
             } else {
                 $forum->config = null;
             }
             $forum->version = $this->getVersion($forum);
         }
     }
     if ($forum !== null && isset($user->id)) {
         $forum->userdetails = $this->getUserDetails($user, $forum);
     }
     return $forum;
 }
开发者ID:rogatnev-nikita,项目名称:cloudinterpreter,代码行数:46,代码来源:cb.simpleboardtab.model.php

示例4: trigger

 /**
  * Triggers CB events
  *
  * Current events: profileIntegration=0/1, avatarIntegration=0/1
  **/
 function trigger($event, &$params)
 {
     global $_PLUGINS;
     $fbConfig =& CKunenaConfig::getInstance();
     $params['config'] =& $fbConfig;
     $_PLUGINS->loadPluginGroup('user');
     $_PLUGINS->trigger('kunenaIntegration', array($event, &$fbConfig, &$params));
 }
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:13,代码来源:kunena.communitybuilder.php

示例5: hasPostPermission

/**
 * Checks if a user has postpermission in given thread
 * @param database object
 * @param int
 * @param int
 * @param boolean
 * @param boolean
 */
function hasPostPermission($kunena_db, $catid, $id, $userid, $pubwrite, $ismod)
{
    $fbConfig =& CKunenaConfig::getInstance();
    $app =& JFactory::getApplication();
    $topicLock = 0;
    if ($id != 0) {
        $kunena_db->setQuery("SELECT thread FROM #__fb_messages WHERE id='{$id}'");
        $topicID = $kunena_db->loadResult();
        $lockedWhat = _GEN_TOPIC;
        if ($topicID != 0) {
            $sql = "SELECT locked FROM #__fb_messages WHERE id='{$topicID}'";
        } else {
            $sql = "SELECT locked FROM #__fb_messages WHERE id='{$id}'";
        }
        $kunena_db->setQuery($sql);
        $topicLock = $kunena_db->loadResult();
    }
    if ($topicLock == 0) {
        //topic not locked; check if forum is locked
        $kunena_db->setQuery("SELECT locked FROM #__fb_categories WHERE id='{$catid}'");
        $topicLock = $kunena_db->loadResult();
        $lockedWhat = _GEN_FORUM;
    }
    if (($userid != 0 || $pubwrite) && ($topicLock == 0 || $ismod)) {
        return 1;
    } else {
        //user is not allowed to write a post
        if ($topicLock) {
            echo "<p align=\"center\">{$lockedWhat} " . _POST_LOCKED . "<br />";
            echo _POST_NO_NEW . "<br /><br /></p>";
        } else {
            $app->enqueueMessage(_POST_NO_PUBACCESS1, 'notice');
            $app->enqueueMessage(_POST_NO_PUBACCESS2, 'notice');
            $app->redirect(CKunenaLink::GetShowLatestURL());
        }
        return 0;
    }
}
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:46,代码来源:post.php

示例6: CKunenaUsers

 function CKunenaUsers()
 {
     $fbConfig =& CKunenaConfig::getInstance();
     if ($fbConfig->username == 1) {
         $this->mapping['name'] = $this->mapping['username'];
     }
 }
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:7,代码来源:kunena.user.class.php

示例7: stdClass

 function &prepareContent(&$content)
 {
     $fbConfig =& CKunenaConfig::getInstance();
     // Joomla Mambot Support, Thanks hacksider
     if ($fbConfig->jmambot) {
         $row = new stdClass();
         $row->text =& $content;
         $params = new JParameter('');
         $dispatcher =& JDispatcher::getInstance();
         JPluginHelper::importPlugin('content');
         $results = $dispatcher->trigger('onPrepareContent', array(&$row, &$params, 0));
         $content =& $row->text;
     }
     return $content;
 }
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:15,代码来源:class.kunena.php

示例8: showlist

    function showlist($ulrows, $total_results, $pageNav, $limitstart, $query_ext, $search = "")
    {
        $app =& JFactory::getApplication();
        $fbConfig =& CKunenaConfig::getInstance();
        $kunena_db =& JFactory::getDBO();
        if ($search == "") {
            $search = _KUNENA_USRL_SEARCH;
        }
        ?>

        <script type = "text/javascript">
            <!--
            function validate()
            {
                if ((document.usrlform.search == "") || (document.usrlform.search.value == ""))
                {
                    alert('<?php 
        echo _KUNENA_USRL_SEARCH_ALERT;
        ?>
');
                    return false;
                }
                else
                {
                    return true;
                }
            }
                    //-->
        </script>

        <?php 
        if ($fbConfig->joomlastyle < 1) {
            $boardclass = "fb_";
        }
        ?>
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr1">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr2">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr3">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr4">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr5">
        <table class = "fb_blocktable" id ="fb_userlist" border = "0" cellspacing = "0" cellpadding = "0" width="100%">
            <thead>
                <tr>
                    <th>
                        <table width = "100%" border = "0" cellspacing = "0" cellpadding = "0">
                            <tr>
                                <td align = "left">
                                    <div class = "fb_title_cover  fbm">
                                        <span class="fb_title fbl"> <?php 
        echo _KUNENA_USRL_USERLIST;
        ?>
</span>

                                        <?php 
        printf(_KUNENA_USRL_REGISTERED_USERS, $app->getCfg('sitename'), $total_results);
        ?>
                                    </div>
                                </td>

                                <td align = "right">
                                    <form name = "usrlform" method = "post" action = "<?php 
        echo CKunenaLink::GetUserlistURL();
        ?>
" onsubmit = "return validate()">
                                        <input type = "text"
                                            name = "search"
                                            class = "inputbox"
                                            style = "width:150px"
                                            maxlength = "100" value = "<?php 
        echo $search;
        ?>
" onblur = "if(this.value=='') this.value='<?php 
        echo $search;
        ?>
';" onfocus = "if(this.value=='<?php 
        echo $search;
        ?>
') this.value='';" />

                                        <input type = "image" src = "<?php 
        echo KUNENA_TMPLTMAINIMGURL . '/images/usl_search_icon.gif';
        ?>
" alt = "<?php 
        echo _KUNENA_USRL_SEARCH;
        ?>
//.........这里部分代码省略.........
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:101,代码来源:userlist.php

示例9: smileypath

function smileypath()
{
    $fbConfig =& CKunenaConfig::getInstance();
    if (is_dir(KUNENA_PATH_TEMPLATE . DS . $fbConfig->template . '/images/' . KUNENA_LANGUAGE . '/emoticons')) {
        $smiley_live_path = JURI::root() . '/components/com_kunena/template/' . $fbConfig->template . '/images/' . KUNENA_LANGUAGE . '/emoticons';
        $smiley_abs_path = KUNENA_PATH_TEMPLATE . DS . $fbConfig->template . '/images/' . KUNENA_LANGUAGE . '/emoticons';
    } else {
        $smiley_live_path = KUNENA_PATH_TEMPLATE_DEFAULT . DS . 'images/' . KUNENA_LANGUAGE . '/emoticons';
        $smiley_abs_path = KUNENA_PATH_TEMPLATE_DEFAULT . DS . 'images/' . KUNENA_LANGUAGE . '/emoticons';
    }
    $smileypath['live'] = $smiley_live_path;
    $smileypath['abs'] = $smiley_abs_path;
    return $smileypath;
}
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:14,代码来源:admin.kunena.php

示例10: __construct

 function __construct()
 {
     $this->_db = JFactory::getDBO();
     $this->config = CKunenaConfig::getInstance();
     $this->document =& JFactory::getDocument();
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:6,代码来源:kunena.pathway.class.php

示例11: getAvatarKunena

 function getAvatarKunena($userID)
 {
     if (file_exists(JPATH_SITE . DS . "components" . DS . "com_kunena" . DS . "lib" . DS . "kunena.user.class.php")) {
         require_once JPATH_SITE . DS . "components" . DS . "com_kunena" . DS . "lib" . DS . "kunena.user.class.php";
         $app = JFactory::getApplication();
         $document = JFactory::getDocument();
         $fbConfig = CKunenaConfig::getInstance();
         //print_r($fbConfig);die();
         if ($fbConfig->avatar_src == 'fb') {
             //get avatar image from database
             $db = JFactory::getDBO();
             $sql = "SELECT `avatar` FROM #__fb_users WHERE `userid`='{$userID}'";
             $db->setQuery($sql);
             //die($db->getQuery ());
             $imgPath = $db->loadResult();
             if ($imgPath) {
                 $fireboardAvatar = '';
                 if (@(!is_null($fbConfig->version)) && @isset($fbConfig->version) && @$fbConfig->version == '1.0.1') {
                     $fireboardAvatar = 'components/com_kunena/' . $imgPath;
                 } else {
                     $fireboardAvatar = 'images/fbfiles/avatars/' . $imgPath;
                 }
                 //check exist image of user
                 if (file_exists(JPATH_SITE . DS . $fireboardAvatar)) {
                     return JURI::root() . $fireboardAvatar;
                 } else {
                     // Return false if Image file doesn't exist.
                     return false;
                 }
             } else {
                 // user don't use avatar.
                 return false;
             }
         }
     }
     return false;
 }
开发者ID:jomsocial,项目名称:JSVoice,代码行数:37,代码来源:jahelper.php

示例12: getConfig

	/**
	 * Get a Kunena configuration object
	 *
	 * Returns the global {@link CKunenaConfig} object, only creating it if it doesn't already exist.
	 *
	 * @return object CKunenaConfig
	 */
	public static function getConfig()
	{
		require_once(KPATH_SITE.'/lib/kunena.config.class.php');
		return CKunenaConfig::getInstance();
	}
开发者ID:rich20,项目名称:Kunena,代码行数:12,代码来源:factory.php

示例13: ReportForm

function ReportForm($id, $catid)
{
    $app =& JFactory::getApplication();
    $fbConfig =& CKunenaConfig::getInstance();
    $kunena_my =& JFactory::getUser();
    $redirect = JRoute::_(KUNENA_LIVEURLREL . '&amp;func=view&amp;catid=' . $catid . '&amp;id=' . $id . '&amp;Itemid=' . KUNENA_COMPONENT_ITEMID) . '#' . $id;
    //$redirect = JRoute::_($redirect);
    if (!$kunena_my->id) {
        $app->redirect($redirect);
        return;
    }
    if ($fbConfig->reportmsg == 0) {
        $app->redirect($redirect);
        return;
    }
    ?>

<div class = "<?php 
    echo $boardclass;
    ?>
_bt_cvr1">
    <div class = "<?php 
    echo $boardclass;
    ?>
_bt_cvr2">
        <div class = "<?php 
    echo $boardclass;
    ?>
_bt_cvr3">
            <div class = "<?php 
    echo $boardclass;
    ?>
_bt_cvr4">
                <div class = "<?php 
    echo $boardclass;
    ?>
_bt_cvr5">
                    <table class = "fb_blocktable" id = "fb_forumfaq" border = "0" cellspacing = "0" cellpadding = "0" width = "100%">
                        <thead>
                            <tr>
                                <th>
                                    <div class = "fb_title_cover">
                                        <span class = "fb_title"><?php 
    echo _KUNENA_COM_A_REPORT;
    ?>
</span>
                                    </div>
                            </tr>
                        </thead>

                        <tbody>
                            <tr>
                                <td class = "fb_faqdesc">
                                    <form method = "post" action = "<?php 
    echo JRoute::_(KUNENA_LIVEURLREL . '&amp;func=report');
    ?>
">
                                        <table width = "100%" border = "0">
                                            <tr>
                                                <td width = "10%">
<?php 
    echo _KUNENA_REPORT_REASON;
    ?>
:
                                                </td>

                                                <td>
                                                    <input type = "text" name = "reason" class = "inputbox" size = "30"/>
                                                </td>
                                            </tr>

                                            <tr>
                                                <td colspan = "2">
<?php 
    echo _KUNENA_REPORT_MESSAGE;
    ?>
:
                                                </td>
                                            </tr>

                                            <tr>
                                                <td colspan = "2">
                                                    <textarea id = "text" name = "text" cols = "40" rows = "10" class = "inputbox"></textarea>
                                                </td>
                                            </tr>
                                        </table>

                                        <input type = "hidden" name = "do" value = "report"/>
                                        <input type = "hidden" name = "id" value = "<?php 
    echo $id;
    ?>
"/>
                                        <input type = "hidden" name = "catid" value = "<?php 
    echo $catid;
    ?>
"/>
                                        <input type = "hidden" name = "reporter" value = "<?php 
    echo $kunena_my->id;
    ?>
"/>
//.........这里部分代码省略.........
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:101,代码来源:report.php

示例14: 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 categories.");
    //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;' . fb_Link::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;' . fblink::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;' . fbLink::GetCategoryLink('listcat', $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(stripslashes($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

示例15: ParseRoute

 function ParseRoute($segments)
 {
     $funcitems = array(array('func' => 'showcat', 'var' => 'catid'), array('func' => 'view', 'var' => 'id'));
     $doitems = array('func', 'do');
     $funcpos = $dopos = 0;
     $fbConfig =& CKunenaConfig::getInstance();
     $vars = array();
     while (($segment = array_shift($segments)) !== null) {
         $seg = explode(':', $segment);
         $var = array_shift($seg);
         $value = array_shift($seg);
         // If SEF categories are allowed: Translate category name to catid
         if ($fbConfig->sefcats && $funcpos == 0 && $dopos == 0 && ($value !== null || !in_array($var, self::$functions))) {
             self::loadCategories();
             $catname = strtr($segment, ':', '-');
             foreach (self::$catidcache as $cat) {
                 if ($catname == self::filterOutput($cat['name']) || $catname == JFilterOutput::stringURLSafe($cat['name'])) {
                     $var = $cat['id'];
                     break;
                 }
             }
         }
         if (empty($var)) {
             continue;
         }
         // Empty parameter
         if (is_numeric($var)) {
             if ($funcpos > count($funcitems)) {
                 continue;
             }
             // Unknown parameter
             $vars['func'] = $funcitems[$funcpos]['func'];
             $value = $var;
             $var = $funcitems[$funcpos++]['var'];
         } else {
             if ($value === null) {
                 if ($dopos > count($doitems)) {
                     continue;
                 }
                 // Unknown parameter
                 $value = $var;
                 $var = $doitems[$dopos++];
             }
         }
         $vars[$var] = $value;
     }
     // Check if we should use listcat instead of showcat
     if (isset($vars['func']) && $vars['func'] == 'showcat') {
         if (empty($vars['catid'])) {
             $parent = 0;
         } else {
             $db =& JFactory::getDBO();
             $quesql = 'SELECT parent FROM #__fb_categories WHERE id=' . (int) $vars['catid'];
             $db->setQuery($quesql);
             $parent = $db->loadResult();
         }
         if (!$parent) {
             $vars['func'] = 'listcat';
         }
     }
     return $vars;
 }
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:62,代码来源:router.php


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