本文整理汇总了PHP中BBCode::SetDebug方法的典型用法代码示例。如果您正苦于以下问题:PHP BBCode::SetDebug方法的具体用法?PHP BBCode::SetDebug怎么用?PHP BBCode::SetDebug使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BBCode
的用法示例。
在下文中一共展示了BBCode::SetDebug方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: BBCode
}
$bbcode = new BBCode();
$bbcode->AddRule('wstest', array('mode' => BBCODE_MODE_ENHANCED, 'allow' => array('_default' => '/^[a-zA-Z0-9._ -]+$/'), 'template' => '<span style="wstest:{$_default}">{$_content}</span>', 'class' => 'inline', 'allow_in' => array('listitem', 'block', 'columns', 'inline', 'link')));
$bbcode->SetLocalImgDir("smileys");
$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);
}
示例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: root
//include the templates settings, these will assign them to an array in the page class
if (is_readable(Page::$THEME_ROOT . 'settings.php')) {
include Page::$THEME_ROOT . 'settings.php';
}
//this sets the global theme vars
$objPage->setThemeVars();
//set a default breadcrumb
$objPage->addPagecrumb(array(array('url' => '/' . root(), 'name' => langVar('B_MAINSITE'))));
//
//--Setup modules, online system and bbcode stuffz
//
//
//--BBCode Setup
//
$objBBCode = new BBCode();
$objBBCode->SetDebug(true);
$objBBCode->SetDetectURLs(false);
$objBBCode->ClearSmileys();
$objBBCode->SetSmileyDir('/' . root() . 'images/smilies/');
$file = cmsROOT . 'core/bbcode_tags.php';
if (is_readable($file)) {
require_once $file;
} else {
hmsgDie('FAIL', 'Fatal Error - BBCode\'s not available.');
}
//
//--Module Setup
//
$file = cmsROOT . 'core/classes/class.module.php';
if (is_readable($file)) {
require_once $file;