本文整理汇总了PHP中BBCode::SetAllowAmpersand方法的典型用法代码示例。如果您正苦于以下问题:PHP BBCode::SetAllowAmpersand方法的具体用法?PHP BBCode::SetAllowAmpersand怎么用?PHP BBCode::SetAllowAmpersand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BBCode
的用法示例。
在下文中一共展示了BBCode::SetAllowAmpersand方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
require_once dirname(__FILE__) . '/nbbc/nbbc.php';
$BBCode = new BBCode();
$BBCode->smiley_url = Url('/plugins/NBBC/nbbc/smileys');
$BBCode->SetAllowAmpersand(TRUE);
$this->_BBCode = $BBCode;
}
示例2: Parse
function Parse($string)
{
global $config;
require_once dirname(__FILE__) . '/nbbc/nbbc.php';
$setup = new BBCode();
if (!isset($config)) {
// old compatibility mode
$setup->SetSmileyURL(baseaddress() . 'smileys');
} else {
$setup->SetSmileyURL($config->getValue('baseaddress') . 'smileys');
}
// $setup->SetEnableSmileys(false);
$setup->SetAllowAmpersand(true);
// escape (x)html entities
return $setup->Parse(htmlent($string));
}
示例3: 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;
}
示例4: htmlspecialchars
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);
}
示例5: 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>