本文整理汇总了PHP中BBCode::SetTagMarker方法的典型用法代码示例。如果您正苦于以下问题:PHP BBCode::SetTagMarker方法的具体用法?PHP BBCode::SetTagMarker怎么用?PHP BBCode::SetTagMarker使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BBCode
的用法示例。
在下文中一共展示了BBCode::SetTagMarker方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: htmlspecialchars
$bbcode->SetLocalImgURL("smileys");
print "<table class='test_table' align='center'>\n" . "<thead><tr><th>Description</th><th>Result</th><th>Avg. Time</th></thead>\n" . "<tbody>\n";
$numpassed = 0;
$numfailed = 0;
$numtested = 0;
foreach ($BBCodeTestSuite as $test) {
if (is_string($test)) {
print "<tr class='spacer'><th colspan='3'></th></tr>\n" . "<tr class='group'><th colspan='3'>" . htmlspecialchars($test) . "</th></tr>\n";
} else {
$output = "<tr class='test'><td class='descr'>" . htmlspecialchars($test['descr']) . "</td>";
if (@$test['debug'] == true) {
$bbcode->SetDebug(true);
} else {
$bbcode->SetDebug(false);
}
$bbcode->SetTagMarker('[');
$bbcode->SetAllowAmpersand(false);
if (@$test['newline_ignore'] == true) {
$bbcode->SetIgnoreNewlines(true);
} else {
$bbcode->SetIgnoreNewlines(false);
}
if (@$test['detect_urls'] == true) {
$bbcode->SetDetectURLs(true);
} else {
$bbcode->SetDetectURLs(false);
}
if (@$test['urltarget'] == true) {
$bbcode->SetURLTargetable(true);
} else {
$bbcode->SetURLTargetable(false);
示例2: parse_html
public static function parse_html($content, $process_content_plugins = false, $bbcode = true, $autolink = true)
{
if ($bbcode) {
require_once CJLIB_PATH . '/lib/nbbc/nbbc_main.php';
$bbcode = new BBCode();
$bbcode->SetSmileyURL(CJLIB_MEDIA_URI . '/smileys');
$bbcode->SetSmileyDir(CJLIB_MEDIA_PATH . DS . 'smileys');
$bbcode->SetTagMarker('[');
$bbcode->SetAllowAmpersand(false);
$bbcode->SetEnableSmileys(true);
$bbcode->SetDetectURLs($autolink);
$bbcode->SetPlainMode(false);
$bbcode->SetDebug(false);
$content = $bbcode->Parse($content);
} else {
if ($autolink) {
require_once 'lib_autolink.php';
$content = autolink_urls($content, 50, ' rel="nofollow"');
}
}
if ($process_content_plugins) {
$content = JHTML::_('content.prepare', $content);
}
return $content;
}
示例3: BBCode
<input type='checkbox' <?php
if ($tag_marker == '<') {
print "checked='checked'";
}
?>
name='anglebrackets' /> Use <> instead of [] for tags<br />
</td></tr></tbody></table>
</form>
</div>
<?php
if (isset($_POST['bbcode_input'])) {
$bbcode = new BBCode();
$bbcode->SetSmileyURL("../smileys");
$bbcode->SetSmileyDir("../smileys");
$bbcode->SetTagMarker($tag_marker);
$bbcode->SetAllowAmpersand($allow_ampersand);
$bbcode->SetEnableSmileys($enable_smileys);
$bbcode->SetDetectURLs($autourl_mode);
$bbcode->SetPlainMode($plain_mode);
$output = $bbcode->Parse($input);
print "<div class='box'>\n" . "<div class='bbcode'>{$output}</div>\n" . "</div>\n";
}
?>
</body>
</html>