當前位置: 首頁>>代碼示例>>PHP>>正文


PHP BBCode::format方法代碼示例

本文整理匯總了PHP中BBCode::format方法的典型用法代碼示例。如果您正苦於以下問題:PHP BBCode::format方法的具體用法?PHP BBCode::format怎麽用?PHP BBCode::format使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在BBCode的用法示例。


在下文中一共展示了BBCode::format方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: filter

 private function filter($in)
 {
     $bb = new BBCode();
     return $bb->format($in);
 }
開發者ID:thelectronicnub,項目名稱:shimmie2,代碼行數:5,代碼來源:test.php

示例2: BBCode

$sub = $sanitize->CleanStr($sub, 0);
//Or this
$sub = preg_replace("[\r\n]", "", $sub);
$url = $sanitize->CleanStr($url, 0);
//Or this
$url = preg_replace("[\r\n]", "", $url);
$resto = $sanitize->CleanStr($resto, 0);
//Or this
$resto = preg_replace("[\r\n]", "", $resto);
$com = $sanitize->CleanStr($com, $moderator);
//But they can with this.
$clean = $sanitize->process($name, $com, $sub, $email, $resto, $url, $dest, $moderator);
if (USE_BBCODE === true) {
    require_once CORE_DIR . '/general/text_process/bbcode.php';
    $bbcode = new BBCode();
    $clean['com'] = $bbcode->format($clean['com']);
}
if (SPOILERS && $spoiler) {
    $clean['sub'] = "SPOILER<>" . $clean['sub'];
}
if ($moderator && isset($_POST['showCap'])) {
    if ($moderator == 1) {
        $clean['name'] = '<span class="cap moderator" >' . $clean['name'] . ' ## Mod </span> <img src="http://3chan.ml/static/mod-icon.png" alt="Mod Icon" title="This user is a 3chan Modorator." style="margin-bottom: -3px;"/> ';
    }
    if ($moderator == 2) {
        $clean['name'] = '<span class="cap admin" >' . $clean['name'] . ' ## Admin </span> <img src="http://3chan.ml/static/admin-icon.png" alt="Admin Icon" title="This user is a 3chan Administrator." style="margin-bottom: -3px;"/>';
    }
    if ($moderator == 3) {
        $clean['name'] = '<span class="cap manager" >' . $clean['name'] . ' ## Manager  </span>';
    }
}
開發者ID:Bossgod,項目名稱:3ch,代碼行數:31,代碼來源:regist.php

示例3: display_top

    /**
     * @param array $pools
     * @param string $heading
     * @param bool $check_all
     */
    private function display_top($pools, $heading, $check_all = false)
    {
        global $page, $user;
        $page->set_title($heading);
        $page->set_heading($heading);
        $nav_html = '<a href="' . make_link() . '">Index</a>';
        $poolnav_html = '
			<a href="' . make_link("pool/list") . '">Pool Index</a>
			<br><a href="' . make_link("pool/new") . '">Create Pool</a>
			<br><a href="' . make_link("pool/updated") . '">Pool Changes</a>
		';
        $page->add_block(new Block($nav_html, null, "left", 5, "indexnavleft"));
        $page->add_block(new Block("Pool Navigation", $poolnav_html, "left", 10));
        if (count($pools) == 1) {
            $pool = $pools[0];
            if ($pool['public'] == "Y" || $user->is_admin()) {
                // IF THE POOL IS PUBLIC OR IS ADMIN SHOW EDIT PANEL
                if (!$user->is_anonymous()) {
                    // IF THE USER IS REGISTERED AND LOGGED IN SHOW EDIT PANEL
                    $this->sidebar_options($page, $pool, $check_all);
                }
            }
            $bb = new BBCode();
            $page->add_block(new Block(html_escape($pool['title']), $bb->format($pool['description']), "main", 10));
        }
    }
開發者ID:thelectronicnub,項目名稱:shimmie2,代碼行數:31,代碼來源:theme.php


注:本文中的BBCode::format方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。