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


PHP forum::getInfo方法代码示例

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


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

示例1: processLock

function processLock($id, $mode)
{
    global $roster, $addon, $installer;
    $query = "UPDATE `" . $roster->db->table('forums', $addon['basename']) . "` SET `locked` = '{$mode}' WHERE `forum_id` = '" . $id . "';";
    $result = $roster->db->query($query);
    if (!$result) {
        $roster->set_message('Database Error: ' . $roster->db->error() . '<br />SQL: ' . $query);
    } else {
        if ($mode == 1) {
            $roster->set_message($roster->locale->act['f_lock']);
        } else {
            $roster->set_message($roster->locale->act['f_unlock']);
        }
    }
}
$info = $functions->getInfo('forum', $_GET['id']);
//print_r($info);
$forums = $functions->getTopics($_GET['id']);
$x = $functions->getCrumbsa($_GET['id']);
$roster->tpl->assign_vars(array('CRUMB' => $x, 'M_STARTTOPIC' => makelink('guild-' . $addon['basename'] . '-addtopic&amp;id=' . $_GET['id']), 'LOCKED' => $info['locked'] == 1 ? true : false, 'IMAGE' => '<div class="icon"><img src="' . $addon['url_path'] . 'images/topic_unread_locked.gif"></a></div>', 'CANLOCK' => $roster->auth->getAuthorized($addon['config']['forum_lock']), 'L_ACTIVEU' => $info['locked'] == 1 ? 'locked' : 'unlocked', 'L_ACTIVET' => $info['locked'] == 1 ? $roster->locale->act['lock'] : $roster->locale->act['unlock'], 'L_ACTIVEOP' => $info['locked'] == 1 ? 'unlock' : 'lock', 'TOPIC_ID' => $info['forum_id'], 'FORUM_TITLE' => $info['title']));
foreach ($forums as $id => $forum) {
    if ($roster->auth->getAuthorized($forum['access'])) {
        $is_read = $functions->get_topic_tracking($forum['forumid'], $forum['topicid'], $forum['r_date']);
        $roster->tpl->assign_block_vars('forums', array('FORUM_ID' => $forum['topicid'], 'FORUM_URL' => makelink($addon['basename'] . '-topic&amp;tid=' . $forum['topicid']), 'TITLE' => $forum['title'], 'POSTS' => $forum['posts'], 'POSTER' => $forum['poster'], 'L_POSTER' => $forum['l_poster'], 'C_DATE' => date("F j, Y, g:i a", $forum['c_date']), 'R_DATE' => date("F j, Y, g:i a", $forum['r_date']), 'T_POSTER' => $forum['t_poster'], 'T_TITLE' => $forum['t_title'], 'STICKY' => $forum['sticky'] == 1 ? true : false, 'READ' => $is_read, 'LOCKED' => $forum['locked'] == 1 ? true : false, 'IMAGEL' => $forum['locked'] == 1 ? '_locked' : '', 'IMAGEM' => $forum['l_poster'] == $roster->auth->user['usr'] ? '_mine' : '', 'T_ACCESS' => $roster->auth->getAuthorized($forum['access']), 'DESC' => $forum['desc']));
    }
}
$roster->tpl->set_filenames(array('topic_main' => $addon['basename'] . '/topics.html'));
$roster->tpl->display('topic_main');
function createTopic()
{
    global $roster, $addon;
开发者ID:Sajaki,项目名称:wowroster_dev,代码行数:31,代码来源:forum.php

示例2: makelink

    global $roster, $addon, $installer;
    $query = "UPDATE `" . $roster->db->table('topics', $addon['basename']) . "` SET `locked` = '{$mode}' WHERE `topic_id` = '" . $id . "';";
    $result = $roster->db->query($query);
    if (!$result) {
        $roster->set_message('Database Error: ' . $roster->db->error() . '<br />SQL: ' . $query);
    } else {
        if ($mode == 1) {
            $roster->set_message($roster->locale->act['t_lock']);
        } else {
            $roster->set_message($roster->locale->act['t_unlock']);
        }
    }
}
//require_once (ROSTER_LIB . 'bbcode.php' );
//$bbcode = new bbcode();
$info = $functions->getInfo('topic', $_GET['tid']);
$forums = $functions->getPosts($_GET['tid']);
$x = $functions->getCrumbsb($_GET['tid']);
$roster->tpl->assign_vars(array('CRUMB' => $x, 'M_REPLYPOST' => makelink('guild-' . $addon['basename'] . '-topic_reply&amp;tid=' . $_GET['tid']), 'LOCKED' => $info['locked'] == 1 ? true : false, 'IMAGE' => '<div class="icon"><img src="' . $addon['url_path'] . 'images/topic_unread_locked.gif"></a></div>', 'CANLOCK' => $roster->auth->getAuthorized($addon['config']['forum_lock']), 'CANPOST' => $roster->auth->getAuthorized($addon['config']['forum_start_topic']), 'L_ACTIVEU' => $info['locked'] == 1 ? 'locked' : 'unlocked', 'L_ACTIVET' => $info['locked'] == 1 ? $roster->locale->act['lock'] : $roster->locale->act['unlock'], 'L_ACTIVEOP' => $info['locked'] == 1 ? 'unlock' : 'lock', 'TOPIC_ID' => $info['topic_id'], 'TOPIC_TITLE' => $info['title']));
foreach ($forums as $id => $forum) {
    $f = null;
    $u = null;
    $message = '';
    $u = $roster->auth->GetUserInfo($forum['user_id']);
    $bg = '';
    if ($roster->auth->_ingroup('1', $u['access'])) {
        $bg = ' xadmin';
    } else {
        if ($roster->auth->_ingroup('2', $u['access'])) {
            $bg = ' xmod';
        }
开发者ID:Sajaki,项目名称:wowroster_dev,代码行数:31,代码来源:topic.php


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