本文整理汇总了PHP中BBCode::SetEnableSmileys方法的典型用法代码示例。如果您正苦于以下问题:PHP BBCode::SetEnableSmileys方法的具体用法?PHP BBCode::SetEnableSmileys怎么用?PHP BBCode::SetEnableSmileys使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BBCode
的用法示例。
在下文中一共展示了BBCode::SetEnableSmileys方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: time
<?php
require '../include/mellivora.inc.php';
require CONST_PATH_THIRDPARTY . 'nbbc/nbbc.php';
enforce_authentication();
$time = time();
$bbc = new BBCode();
$bbc->SetEnableSmileys(false);
head('Challenges');
if (isset($_GET['status'])) {
if ($_GET['status'] == 'correct') {
message_dialog('Congratulations! You got the flag!', 'Correct flag', 'Yay!', 'challenge-attempt correct on-page-load');
} else {
if ($_GET['status'] == 'incorrect') {
message_dialog('Sorry! That wasn\'t correct', 'Incorrect flag', 'Ok', 'challenge-attempt incorrect on-page-load');
} else {
if ($_GET['status'] == 'manual') {
message_inline_blue('<h1>Your submission is awaiting manual marking.</h1>', false);
}
}
}
}
$categories = db_select_all('categories', array('id', 'title', 'description', 'available_from', 'available_until'), array('exposed' => 1), 'title ASC');
// determine which category to display
if (isset($_GET['category'])) {
validate_id($_GET['category']);
$current_category = array_search_matching_key($_GET['category'], $categories, 'id');
if (!$current_category) {
message_error(lang_get('no_category_for_id'), false);
}
} else {
示例2: send_email
function send_email(array $receivers, $subject, $body, array $cc_list = null, array $bcc_list = null, $from_email = CONFIG_EMAIL_FROM_EMAIL, $from_name = CONFIG_EMAIL_FROM_NAME, $replyto_email = CONFIG_EMAIL_REPLYTO_EMAIL, $replyto_name = CONFIG_EMAIL_REPLYTO_NAME, $is_html = false)
{
$mail = new PHPMailer();
$mail->IsHTML($is_html);
$mail->XMailer = ' ';
$successfully_sent_to = array();
try {
if (CONFIG_EMAIL_USE_SMTP) {
$mail->IsSMTP();
$mail->SMTPDebug = CONFIG_EMAIL_SMTP_DEBUG_LEVEL;
$mail->Host = CONFIG_EMAIL_SMTP_HOST;
$mail->Port = CONFIG_EMAIL_SMTP_PORT;
$mail->SMTPSecure = CONFIG_EMAIL_SMTP_SECURITY;
$mail->SMTPAuth = CONFIG_EMAIL_SMTP_AUTH;
$mail->Username = CONFIG_EMAIL_SMTP_USER;
$mail->Password = CONFIG_EMAIL_SMTP_PASSWORD;
}
$mail->SetFrom($from_email, $from_name);
if ($replyto_email) {
$mail->AddReplyTo($replyto_email, $replyto_name);
}
// add the "To" receivers
foreach ($receivers as $receiver) {
if (!valid_email($receiver)) {
continue;
}
$mail->AddAddress($receiver);
$successfully_sent_to[] = $receiver;
}
if (empty($successfully_sent_to)) {
message_error('There must be at least one valid "To" receiver of this email');
}
// add the "CC" receivers
if (!empty($cc_list)) {
foreach ($cc_list as $cc) {
if (!valid_email($cc)) {
continue;
}
$mail->AddCC($cc);
$successfully_sent_to[] = $cc;
}
}
// add the "BCC" receivers
if (!empty($bcc_list)) {
foreach ($bcc_list as $bcc) {
if (!valid_email($bcc)) {
continue;
}
$mail->AddBCC($bcc);
$successfully_sent_to[] = $bcc;
}
}
$mail->Subject = $subject;
// HTML email
if ($is_html) {
require CONFIG_PATH_THIRDPARTY . 'nbbc/nbbc.php';
$bbc = new BBCode();
$bbc->SetEnableSmileys(false);
// we assume the email has come to us in BBCode format
$mail->MsgHTML($bbc->parse($body));
} else {
$mail->Body = $body;
}
} catch (Exception $e) {
log_exception($e);
message_error('Could not send email! An exception has been logged. Please contact ' . (CONFIG_EMAIL_REPLYTO_EMAIL ? CONFIG_EMAIL_REPLYTO_EMAIL : CONFIG_EMAIL_FROM_EMAIL));
}
return $successfully_sent_to;
}
示例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: 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>