本文整理汇总了PHP中DiscussHelper::bbcodeHtmlSwitcher方法的典型用法代码示例。如果您正苦于以下问题:PHP DiscussHelper::bbcodeHtmlSwitcher方法的具体用法?PHP DiscussHelper::bbcodeHtmlSwitcher怎么用?PHP DiscussHelper::bbcodeHtmlSwitcher使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DiscussHelper
的用法示例。
在下文中一共展示了DiscussHelper::bbcodeHtmlSwitcher方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
if (!$post->isProtected() || DiscussHelper::isModerator($post->category_id)) {
?>
<div class="discuss-content">
<?php
if ($system->config->get('main_allowquestionvote')) {
?>
<?php
echo $this->loadTemplate('post.vote.php', array('access' => $access, 'post' => $post));
?>
<?php
}
?>
<div class="discuss-content-item">
<?php
echo DiscussHelper::bbcodeHtmlSwitcher($post, 'question', false);
?>
</div>
<!-- polls -->
<?php
echo $this->getFieldHTML(true, $post);
?>
<?php
echo $this->loadTemplate('post.customfields.php');
?>
<?php
示例2: getEditor
public function getEditor()
{
if ($this->operation == 'creating') {
$type = 'question';
} else {
$type = 'reply';
}
if (!empty($this->content)) {
// No need switch when is a new post/reply
$this->content = DiscussHelper::bbcodeHtmlSwitcher($this->post, $type, true);
}
if ($this->editorType == 'bbcode') {
$html = '<div id="discuss-bbcode">';
$html .= '<textarea class="dc_reply_content full-width" name="dc_reply_content" class="full-width">' . $this->content . '</textarea>';
$html .= '</div>';
} else {
$html = '<div id="discuss-tinymce">';
$html .= $this->editor->display("dc_reply_content", $this->content, '100%', '350', '10', '10', array('pagebreak', 'readmore'));
$html .= '</div>';
}
return $html;
}
示例3: array
echo $profile->getDateJoined();
?>
·
<span class="muted"><?php
echo JText::_('COM_EASYDISCUSS_LAST_SEEN_ON');
?>
</span> <?php
echo $profile->getLastOnline();
?>
</p>
<?php
if ($profile->get('description')) {
?>
<p style="margin: 0 0 15px;"><?php
echo DiscussHelper::bbcodeHtmlSwitcher($profile->get('description'), 'description', false);
?>
</p>
<?php
}
?>
<?php
echo $this->loadTemplate('post.conversation.php', array('userId' => $profile->id));
?>
<?php
if ($system->config->get('main_rss')) {
?>
<a href="<?php
echo DiscussRouter::_('index.php?option=com_easydiscuss&view=profile&id=' . $profile->id . '&format=feed');
示例4: ajaxSubmitReply
//.........这里部分代码省略.........
$table->event = new stdClass();
$results = DiscussEventsHelper::onContentBeforeDisplay('reply', $table);
$table->event->beforeDisplayContent = trim(implode("\n", $results));
$results = DiscussEventsHelper::onContentAfterDisplay('reply', $table);
$table->event->afterDisplayContent = trim(implode("\n", $results));
}
$tpl = new DiscussThemes();
$category = DiscussHelper::getTable('Category');
$category->load($question->category_id);
$table->access = $table->getAccess($category);
// Since the reply dont have any comments yet.
$table->comments = array();
$tpl->set('category', $category);
$tpl->set('post', $table);
$tpl->set('question', $parent);
$tpl->set('isMine', DiscussHelper::isMine($parent->user_id));
$tpl->set('isAdmin', DiscussHelper::isSiteAdmin());
$tpl->set('isMainLocked', $isMainLocked);
$recaptcha = '';
$enableRecaptcha = $config->get('antispam_recaptcha', 0);
$publicKey = $config->get('antispam_recaptcha_public');
$html = $table->published == DISCUSS_ID_PENDING ? $tpl->fetch('post.reply.item.moderation.php') : $tpl->fetch('post.reply.item.php');
//send notification to all comment's subscribers that want to receive notification immediately
$notify = DiscussHelper::getNotification();
$excludeEmails = array();
$attachments = $table->getAttachments();
$emailData['attachments'] = $attachments;
$emailData['postTitle'] = $parent->title;
$emailData['comment'] = DiscussHelper::parseContent($table->content);
$emailData['commentAuthor'] = $my->id ? $creator->getName() : $table->poster_name;
$emailData['postLink'] = DiscussRouter::getRoutedURL('index.php?option=com_easydiscuss&view=post&id=' . $parent->id, false, true);
$emailContent = $table->content;
$isEditing = $isNew == true ? false : true;
$emailContent = DiscussHelper::bbcodeHtmlSwitcher($table, 'reply', $isEditing);
$emailContent = $question->trimEmail($emailContent);
$emailData['replyContent'] = $emailContent;
$emailData['replyAuthor'] = $my->id ? $creator->getName() : $table->poster_name;
$emailData['replyAuthorAvatar'] = $creator->getAvatar();
$emailData['post_id'] = $parent->id;
$emailData['cat_id'] = $parent->category_id;
$subscriberEmails = array();
if (($config->get('main_sitesubscription') || $config->get('main_postsubscription')) && $config->get('notify_subscriber') && $table->published == DISCUSS_ID_PUBLISHED) {
$emailData['emailTemplate'] = 'email.subscription.reply.new.php';
$emailData['emailSubject'] = JText::sprintf('COM_EASYDISCUSS_NEW_REPLY_ADDED', $parent->id, $parent->title);
$posterEmail = $post['poster_email'] ? $post['poster_email'] : $my->email;
// Get the emails of user who subscribe to this post only
// This does not send to subscribers whom subscribe to site and category
$subcribersEmails = DiscussHelper::getHelper('Mailer')->notifyThreadSubscribers($emailData, array($posterEmail, $my->email));
$excludeEmails[] = $posterEmail;
$excludeEmails = array_merge($excludeEmails, $subcribersEmails);
$excludeEmails = array_unique($excludeEmails);
}
//notify post owner.
$postOwnerId = $parent->user_id;
$postOwner = JFactory::getUser($postOwnerId);
$ownerEmail = $postOwner->email;
if ($parent->user_type != 'member') {
$ownerEmail = $parent->poster_email;
}
// Notify Owner
// if reply under moderation, send owner a notification.
if ($config->get('notify_owner') && $table->published == DISCUSS_ID_PUBLISHED && $postOwnerId != $replier->id && !in_array($ownerEmail, $excludeEmails) && !empty($ownerEmail)) {
$emailData['owner_email'] = $ownerEmail;
$emailData['emailSubject'] = JText::sprintf('COM_EASYDISCUSS_NEW_REPLY_ADDED', $parent->id, $parent->title);
$emailData['emailTemplate'] = 'email.post.reply.new.php';
DiscussHelper::getHelper('Mailer')->notifyThreadOwner($emailData);
示例5:
<div class="discuss-clock ml-10 pull-left">
<i class="icon-ed-time"></i> <?php
echo $this->formatDate($system->config->get('layout_dateformat', '%A, %B %d %Y, %I:%M %p'), $post->created);
?>
</div>
</div>
</div>
<div class="discuss-story-bd mb-10">
<div class="ph-10">
<div class="discuss-content">
<div class="discuss-content-item">
<?php
echo DiscussHelper::bbcodeHtmlSwitcher($post, 'reply', false);
?>
<br />
<div id="comment-notification-<?php
echo $post->id;
?>
">
<div class="alert alert-error" style="padding: 5px">
<?php
echo JText::_('COM_EASYDISCUSS_REPLY_UNDER_MODERATE');
?>
</div>
</div>
</div>
</div>
示例6: defined
<?php
/**
* @package EasyDiscuss
* @copyright Copyright (C) 2010 Stack Ideas Private Limited. All rights reserved.
* @license GNU/GPL, see LICENSE.php
*
* EasyDiscuss is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Restricted access');
$signature = trim($signature);
if ($system->config->get('main_signature_visibility') && !empty($signature)) {
?>
<?php
if (DiscussHelper::getHelper('ACL')->allowed('show_signature')) {
?>
<div class="discuss-action-options">
<div class="discuss-signature fs-11"><?php
echo DiscussHelper::bbcodeHtmlSwitcher($signature, 'signature', false);
?>
</div>
</div>
<?php
}
}