本文整理汇总了PHP中BBCode::SetDetectURLs方法的典型用法代码示例。如果您正苦于以下问题:PHP BBCode::SetDetectURLs方法的具体用法?PHP BBCode::SetDetectURLs怎么用?PHP BBCode::SetDetectURLs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BBCode
的用法示例。
在下文中一共展示了BBCode::SetDetectURLs方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
示例2: root
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;
} else {
示例3: htmlspecialchars
} 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);
}
if (is_string(@$test['urlforcetarget'])) {
$bbcode->SetURLTarget($test['urlforcetarget']);
} else {
$bbcode->SetURLTarget(false);
}
if (isset($test['plainmode'])) {
$bbcode->SetPlainMode($test['plainmode']);
示例4: 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>