本文整理汇总了PHP中parse_message函数的典型用法代码示例。如果您正苦于以下问题:PHP parse_message函数的具体用法?PHP parse_message怎么用?PHP parse_message使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了parse_message函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deletepost
public function deletepost($id)
{
global $lang_common, $lang_post, $pd;
if ($this->user->g_read_board == '0') {
message($lang_common['No view'], '403');
}
// Fetch some informations about the post, the topic and the forum
$cur_post = $this->model->get_info_delete($id);
if ($this->config['o_censoring'] == '1') {
$cur_post['subject'] = censor_words($cur_post['subject']);
}
// Sort out who the moderators are and if we are currently a moderator (or an admin)
$mods_array = $cur_post['moderators'] != '' ? unserialize($cur_post['moderators']) : array();
$is_admmod = $this->user->g_id == FEATHER_ADMIN || $this->user->g_moderator == '1' && array_key_exists($this->user->username, $mods_array) ? true : false;
$is_topic_post = $id == $cur_post['first_post_id'] ? true : false;
// Do we have permission to edit this post?
if (($this->user->g_delete_posts == '0' || $this->user->g_delete_topics == '0' && $is_topic_post || $cur_post['poster_id'] != $this->user->id || $cur_post['closed'] == '1') && !$is_admmod) {
message($lang_common['No permission'], '403');
}
if ($is_admmod && $this->user->g_id != FEATHER_ADMIN && in_array($cur_post['poster_id'], get_admin_ids())) {
message($lang_common['No permission'], '403');
}
// Load the delete.php language file
require FEATHER_ROOT . 'lang/' . $this->user->language . '/delete.php';
if ($this->feather->request()->isPost()) {
$this->model->handle_deletion($is_topic_post, $id, $cur_post['tid'], $cur_post['fid']);
}
$page_title = array(feather_escape($this->config['o_board_title']), $lang_delete['Delete post']);
define('FEATHER_ACTIVE_PAGE', 'delete');
$this->header->setTitle($page_title)->display();
require FEATHER_ROOT . 'include/parser.php';
$cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']);
$this->feather->render('delete.php', array('lang_common' => $lang_common, 'lang_delete' => $lang_delete, 'cur_post' => $cur_post, 'id' => $id, 'is_topic_post' => $is_topic_post));
$this->footer->display();
}
示例2: editpost
public function editpost($id)
{
global $lang_common, $lang_prof_reg, $lang_post, $lang_register;
if ($this->user->g_read_board == '0') {
message($lang_common['No view'], '403');
}
// Fetch some informations about the post, the topic and the forum
$cur_post = $this->model->get_info_edit($id);
// Sort out who the moderators are and if we are currently a moderator (or an admin)
$mods_array = $cur_post['moderators'] != '' ? unserialize($cur_post['moderators']) : array();
$is_admmod = $this->user->g_id == FEATHER_ADMIN || $this->user->g_moderator == '1' && array_key_exists($this->user->username, $mods_array) ? true : false;
$can_edit_subject = $id == $cur_post['first_post_id'];
if ($this->config['o_censoring'] == '1') {
$cur_post['subject'] = censor_words($cur_post['subject']);
$cur_post['message'] = censor_words($cur_post['message']);
}
// Do we have permission to edit this post?
if (($this->user->g_edit_posts == '0' || $cur_post['poster_id'] != $this->user->id || $cur_post['closed'] == '1') && !$is_admmod) {
message($lang_common['No permission'], '403');
}
if ($is_admmod && $this->user->g_id != FEATHER_ADMIN && in_array($cur_post['poster_id'], get_admin_ids())) {
message($lang_common['No permission'], '403');
}
// Load the post.php language file
require FEATHER_ROOT . 'lang/' . $this->user->language . '/post.php';
// Load the bbeditor.php language file
require FEATHER_ROOT . 'lang/' . $this->user->language . '/bbeditor.php';
// Start with a clean slate
$errors = array();
if ($this->feather->request()->isPost()) {
// Let's see if everything went right
$errors = $this->model->check_errors_before_edit($id, $can_edit_subject, $errors);
// Setup some variables before post
$post = $this->model->setup_variables($cur_post, $is_admmod, $can_edit_subject, $errors);
// Did everything go according to plan?
if (empty($errors) && !$this->request->post('preview')) {
// Edit the post
$this->model->edit_post($id, $can_edit_subject, $post, $cur_post, $is_admmod);
redirect(get_link('post/' . $id . '/#p' . $id), $lang_post['Post redirect']);
}
} else {
$post = '';
}
$page_title = array(feather_escape($this->config['o_board_title']), $lang_post['Edit post']);
$required_fields = array('req_subject' => $lang_common['Subject'], 'req_message' => $lang_common['Message']);
$focus_element = array('edit', 'req_message');
define('FEATHER_ACTIVE_PAGE', 'edit');
$this->header->setTitle($page_title)->setFocusElement($focus_element)->setRequiredFields($required_fields)->display();
if ($this->request->post('preview')) {
require_once FEATHER_ROOT . 'include/parser.php';
$preview_message = parse_message($post['message'], $post['hide_smilies']);
} else {
$preview_message = '';
}
$this->feather->render('edit.php', array('lang_common' => $lang_common, 'cur_post' => $cur_post, 'lang_post' => $lang_post, 'errors' => $errors, 'preview_message' => $preview_message, 'id' => $id, 'feather_config' => $this->config, 'feather_user' => $this->user, 'checkboxes' => $this->model->get_checkboxes($can_edit_subject, $is_admmod, $cur_post, 1), 'feather' => $this->feather, 'can_edit_subject' => $can_edit_subject, 'post' => $post, 'lang_bbeditor' => $lang_bbeditor));
$this->footer->display();
}
示例3: evgs_item_div
function evgs_item_div($topic_id)
{
global $db, $pun_user, $pun_config, $lang_topic, $lang_common;
$result = $db->query('SELECT * FROM ' . $db->prefix . 'glossary_items WHERE topic_id=' . $topic_id) or error('Could not fetch glossary item info', __FILE__, __LINE__, $db->error());
if (!$db->num_rows($result)) {
return;
}
$cur_gloss = $db->fetch_assoc($result);
$cur_gloss['description'] = parse_message($cur_gloss['description'], '1');
$username = '<a href="profile.php?id=' . $cur_gloss['user_id'] . '">' . pun_htmlspecialchars($cur_gloss['username']) . '</a>';
show_gloss_item($cur_gloss, 'viewtopic');
}
示例4: view
public function view()
{
if (isset($this->id)) {
if (FALSE === ($user_rep = $this->reputation->get_by_id($this->id))) {
message(App::$lang_common['Bad request']);
}
// Fix notice for fancy_video
global $smilies, $forum_user, $ext_info;
if (!defined('FORUM_PARSER_LOADED')) {
require FORUM_ROOT . 'include/parser.php';
}
$user_rep['reason'] = parse_message($user_rep['reason'], 0);
App::send_json(array('message' => $user_rep['reason']));
}
if (FALSE === ($user_rep = $this->reputation->get_user($this->uid))) {
message(App::$lang_common['Bad request']);
}
App::$forum_page['form_action'] = forum_link(App::$forum_url['reputation_delete'], $this->uid);
View::$instance = View::factory($this->view . 'view', array('heading' => sprintf(App::$lang['User reputation'], forum_htmlencode($user_rep['username'])) . ' <strong>[+' . $user_rep['count_rep_plus'] . ' / -' . $user_rep['count_rep_minus'] . '] </strong>'));
$count = $this->reputation->count_by_user_id($this->uid);
if ($count > 0) {
// Fix notice for fancy_video
global $smilies, $forum_user, $ext_info;
if (!defined('FORUM_PARSER_LOADED')) {
require FORUM_ROOT . 'include/parser.php';
}
App::paginate($count, App::$forum_user['disp_topics'], App::$forum_url['reputation_view'], array($this->uid));
if (App::$forum_user['g_id'] == FORUM_ADMIN) {
/*
* Fix table layout described on: http://punbb.ru/post31786.html#p31786
*/
App::$forum_loader->add_css('#brd-reputation table{table-layout:inherit;}', array('type' => 'inline'));
$template = 'view_admin';
} else {
$template = 'view_user';
}
View::$instance->content = View::factory($this->view . $template, array('records' => $this->reputation->get_info($this->uid, App::$forum_user['g_id'], App::$forum_page['start_from'], App::$forum_page['finish_at'])));
} else {
View::$instance->content = View::factory($this->view . 'view_empty', array('lang' => App::$lang));
}
App::$forum_page['crumbs'][] = array(sprintf(App::$lang['User reputation'], forum_htmlencode($user_rep['username'])), forum_link(App::$forum_url['reputation_view'], $this->uid));
}
示例5: time
}
// Load cached feed
if (isset($cache_id) && file_exists(FORUM_CACHE_DIR . 'cache_' . $cache_id . '.php')) {
include FORUM_CACHE_DIR . 'cache_' . $cache_id . '.php';
}
$now = time();
if (!isset($feed) || $cache_expire < $now) {
// Setup the feed
$feed = array('title' => $luna_config['o_board_title'] . $forum_name, 'link' => '/index.php', 'description' => sprintf(__('The most recent threads at %s.', 'luna'), $luna_config['o_board_title']), 'items' => array(), 'type' => 'topics');
// Fetch $show topics
$result = $db->query('SELECT t.id, t.poster, t.subject, t.posted, t.last_post, t.last_poster, p.message, p.hide_smilies, u.email_setting, u.email, p.poster_id, p.poster_email FROM ' . $db->prefix . 'topics AS t INNER JOIN ' . $db->prefix . 'posts AS p ON p.id=' . ($order_posted ? 't.first_post_id' : 't.last_post_id') . ' INNER JOIN ' . $db->prefix . 'users AS u ON u.id=p.poster_id LEFT JOIN ' . $db->prefix . 'forum_perms AS fp ON (fp.forum_id=t.forum_id AND fp.group_id=' . $luna_user['g_id'] . ') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.moved_to IS NULL' . $forum_sql . ' ORDER BY ' . ($order_posted ? 't.posted' : 't.last_post') . ' DESC LIMIT ' . (isset($cache_id) ? 50 : $show)) or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());
while ($cur_topic = $db->fetch_assoc($result)) {
if ($luna_config['o_censoring'] == '1') {
$cur_topic['subject'] = censor_words($cur_topic['subject']);
}
$cur_topic['message'] = parse_message($cur_topic['message']);
$item = array('id' => $cur_topic['id'], 'title' => $cur_topic['subject'], 'link' => '/viewtopic.php?id=' . $cur_topic['id'] . ($order_posted ? '' : '&action=new'), 'description' => $cur_topic['message'], 'author' => array('name' => $order_posted ? $cur_topic['poster'] : $cur_topic['last_poster']), 'pubdate' => $order_posted ? $cur_topic['posted'] : $cur_topic['last_post']);
if ($cur_topic['poster_id'] > 1) {
if ($cur_topic['email_setting'] == '0' && !$luna_user['is_guest']) {
$item['author']['email'] = $cur_topic['email'];
}
$item['author']['uri'] = '/profile.php?id=' . $cur_topic['poster_id'];
} elseif ($cur_topic['poster_email'] != '' && !$luna_user['is_guest']) {
$item['author']['email'] = $cur_topic['poster_email'];
}
$feed['items'][] = $item;
}
// Output feed as PHP code
if (isset($cache_id)) {
if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) {
require FORUM_ROOT . 'include/cache.php';
示例6: forum_number_format
$forum_page['post_ident']['num'] = '<span class="post-num">' . forum_number_format($forum_page['start_from'] + $forum_page['item_count']) . '</span>';
$forum_page['post_ident']['byline'] = '<span class="post-byline">' . sprintf($cur_set['pid'] == $cur_set['first_post_id'] ? $lang_topic['Topic byline'] : $lang_topic['Reply byline'], '<strong>' . forum_htmlencode($cur_set['pposter']) . '</strong>') . '</span>';
$forum_page['post_ident']['link'] = '<span class="post-link"><a class="permalink" rel="bookmark" title="' . $lang_topic['Permalink post'] . '" href="' . forum_link($forum_url['post'], $cur_set['pid']) . '">' . format_time($cur_set['pposted']) . '</a></span>';
($hook = get_hook('se_results_posts_row_pre_item_ident_merge')) ? eval($hook) : null;
// Generate the topic title
$forum_page['item_subject'] = '<a class="permalink" rel="bookmark" title="' . $lang_topic['Permalink topic'] . '" href="' . forum_link($forum_url['topic'], array($cur_set['tid'], sef_friendly($cur_set['subject']))) . '">' . sprintf($cur_set['pid'] == $cur_set['first_post_id'] ? $lang_topic['Topic title'] : $lang_topic['Reply title'], forum_htmlencode($cur_set['subject'])) . '</a> <small>' . sprintf($lang_topic['Search replies'], forum_number_format($cur_set['num_replies']), '<a href="' . forum_link($forum_url['forum'], array($cur_set['forum_id'], sef_friendly($cur_set['forum_name']))) . '">' . forum_htmlencode($cur_set['forum_name']) . '</a>') . '</small>';
// Generate author identification
$forum_page['user_ident'] = $cur_set['poster_id'] > 1 && $forum_user['g_view_users'] == '1' ? '<strong class="username"><a title="' . sprintf($lang_search['Go to profile'], forum_htmlencode($cur_set['pposter'])) . '" href="' . forum_link($forum_url['user'], $cur_set['poster_id']) . '">' . forum_htmlencode($cur_set['pposter']) . '</a></strong>' : '<strong class="username">' . forum_htmlencode($cur_set['pposter']) . '</strong>';
// Generate the post actions links
$forum_page['post_actions'] = array();
$forum_page['post_actions']['forum'] = '<span><a href="' . forum_link($forum_url['forum'], array($cur_set['forum_id'], sef_friendly($cur_set['forum_name']))) . '">' . $lang_search['Go to forum'] . '<span>: ' . forum_htmlencode($cur_set['forum_name']) . '</span></a></span>';
if ($cur_set['pid'] != $cur_set['first_post_id']) {
$forum_page['post_actions']['topic'] = '<span><a class="permalink" rel="bookmark" title="' . $lang_topic['Permalink topic'] . '" href="' . forum_link($forum_url['topic'], array($cur_set['tid'], sef_friendly($cur_set['subject']))) . '">' . $lang_search['Go to topic'] . '<span>: ' . forum_htmlencode($cur_set['subject']) . '</span></a></span>';
}
$forum_page['post_actions']['post'] = '<span><a class="permalink" rel="bookmark" title="' . $lang_topic['Permalink post'] . '" href="' . forum_link($forum_url['post'], $cur_set['pid']) . '">' . $lang_search['Go to post'] . '<span> ' . forum_number_format($forum_page['start_from'] + $forum_page['item_count']) . '</span></a></span>';
$forum_page['message'] = parse_message($cur_set['message'], $cur_set['hide_smilies']);
// Give the post some class
$forum_page['item_status'] = array('post', $forum_page['item_count'] % 2 != 0 ? 'odd' : 'even');
if ($forum_page['item_count'] == 1) {
$forum_page['item_status']['firstpost'] = 'firstpost';
}
if ($forum_page['start_from'] + $forum_page['item_count'] == $forum_page['finish_at']) {
$forum_page['item_status']['lastpost'] = 'lastpost';
}
if ($cur_set['pid'] == $cur_set['first_post_id']) {
$forum_page['item_status']['topicpost'] = 'topicpost';
}
($hook = get_hook('se_results_posts_row_pre_display')) ? eval($hook) : null;
?>
<div class="<?php
echo implode(' ', $forum_page['item_status']);
示例7: time
}
// Load cached feed
if (isset($cache_id) && file_exists(LUNA_CACHE_DIR . 'cache_' . $cache_id . '.php')) {
include LUNA_CACHE_DIR . 'cache_' . $cache_id . '.php';
}
$now = time();
if (!isset($feed) || $cache_expire < $now) {
// Setup the feed
$feed = array('title' => $luna_config['o_board_title'] . $forum_name, 'link' => '/index.php', 'description' => sprintf(__('The most recent threads at %s.', 'luna'), $luna_config['o_board_title']), 'items' => array(), 'type' => 'threads');
// Fetch $show threads
$result = $db->query('SELECT t.id, t.commenter, t.subject, t.commented, t.last_comment, t.last_commenter, p.message, p.hide_smilies, u.email_setting, u.email, p.commenter_id, p.commenter_email FROM ' . $db->prefix . 'threads AS t INNER JOIN ' . $db->prefix . 'comments AS p ON p.id=' . ($order_commented ? 't.first_comment_id' : 't.last_comment_id') . ' INNER JOIN ' . $db->prefix . 'users AS u ON u.id=p.commenter_id LEFT JOIN ' . $db->prefix . 'forum_perms AS fp ON (fp.forum_id=t.forum_id AND fp.group_id=' . $luna_user['g_id'] . ') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.moved_to IS NULL' . $forum_sql . ' ORDER BY ' . ($order_commented ? 't.commented' : 't.last_comment') . ' DESC LIMIT ' . (isset($cache_id) ? 50 : $show)) or error('Unable to fetch thread info', __FILE__, __LINE__, $db->error());
while ($cur_thread = $db->fetch_assoc($result)) {
if ($luna_config['o_censoring'] == '1') {
$cur_thread['subject'] = censor_words($cur_thread['subject']);
}
$cur_thread['message'] = parse_message($cur_thread['message']);
$item = array('id' => $cur_thread['id'], 'title' => $cur_thread['subject'], 'link' => '/thread.php?id=' . $cur_thread['id'] . ($order_commented ? '' : '&action=new'), 'description' => $cur_thread['message'], 'author' => array('name' => $order_commented ? $cur_thread['commenter'] : $cur_thread['last_commenter']), 'pubdate' => $order_commented ? $cur_thread['commented'] : $cur_thread['last_comment']);
if ($cur_thread['commenter_id'] > 1) {
if ($cur_thread['email_setting'] == '0' && !$luna_user['is_guest']) {
$item['author']['email'] = $cur_thread['email'];
}
$item['author']['uri'] = '/profile.php?id=' . $cur_thread['commenter_id'];
} elseif ($cur_thread['commenter_email'] != '' && !$luna_user['is_guest']) {
$item['author']['email'] = $cur_thread['commenter_email'];
}
$feed['items'][] = $item;
}
// Output feed as PHP code
if (isset($cache_id)) {
if (!defined('LUNA_CACHE_FUNCTIONS_LOADED')) {
require LUNA_ROOT . 'include/cache.php';
示例8: RenderBody
function RenderBody()
{
global $main;
foreach ($this->data as $c)
{
$rating = $c->rating>0 ? "rulez" : ($c->rating<0 ? "sucks" : "");
$p = $c->comment;
$p = parse_message($p);
$author = false;
if (array_search($c->user->id,$this->credits)!==false)
$author = true;
echo "<div class='comment cite-".$c->user->id."".($author?" author":"")."' id='c".$c->id."'>\n";
echo " <div class='content'>".$p."</div>\n";
echo " <div class='foot'>\n";
if ($c->rating)
echo "<span class='vote ".$rating."'>".$rating."</span>";
if ($main->userCDCs[$c->user->id])
{
echo "<span class='vote cdc'>cdc</span>";
unset($main->userCDCs[$c->user->id]);
}
echo "<span class='tools' data-cid='".$c->id."'></span> added on the <a href='prod.php?post=".$c->id."'>".$c->addedDate."</a> by ";
echo $c->user->PrintLinkedName()." ".$c->user->PrintLinkedAvatar();
echo "</div>\n";
echo "</div>\n";
}
$this->paginator->RenderNavbar();
}
示例9: censor_words
}
if ($show_as == 'posts') {
++$post_count;
$icon_type = 'icon';
if (!$pun_user['is_guest'] && $cur_search['last_post'] > $pun_user['last_visit'] && (!isset($tracked_topics['topics'][$cur_search['tid']]) || $tracked_topics['topics'][$cur_search['tid']] < $cur_search['last_post']) && (!isset($tracked_topics['forums'][$cur_search['forum_id']]) || $tracked_topics['forums'][$cur_search['forum_id']] < $cur_search['last_post'])) {
$item_status = 'inew';
$icon_type = 'icon icon-new';
$icon_text = $lang_topic['New icon'];
} else {
$item_status = '';
$icon_text = '<!-- -->';
}
if ($pun_config['o_censoring'] == '1') {
$cur_search['message'] = censor_words($cur_search['message']);
}
$message = parse_message($cur_search['message'], $cur_search['hide_smilies']);
$pposter = pun_htmlspecialchars($cur_search['pposter']);
if ($cur_search['poster_id'] > 1) {
if ($pun_user['g_view_users'] == '1') {
$pposter = '<strong><a href="profile.php?id=' . $cur_search['poster_id'] . '">' . $pposter . '</a></strong>';
} else {
$pposter = '<strong>' . $pposter . '</strong>';
}
}
?>
<div class="blockpost<?php
echo $post_count % 2 == 0 ? ' roweven' : ' rowodd';
if ($cur_search['pid'] == $cur_search['first_post_id']) {
echo ' firstpost';
}
if ($post_count == 1) {
示例10: display_posts_view
public function display_posts_view($tid, $start_from)
{
global $pd, $lang_topic;
$post_data = array();
require FEATHER_ROOT . 'include/parser.php';
$post_count = 0;
// Keep track of post numbers
// Retrieve a list of post IDs, LIMIT is (really) expensive so we only fetch the IDs here then later fetch the remaining data
$find_ids = DB::for_table('posts')->select('id')->where('topic_id', $tid)->order_by('id')->limit($this->user->disp_posts)->offset($start_from)->find_many();
foreach ($find_ids as $id) {
$post_ids[] = $id['id'];
}
// Retrieve the posts (and their respective poster)
$select_display_posts_view = array('u.title', 'u.num_posts', 'g.g_id', 'g.g_user_title', 'p.id', 'p.poster', 'p.poster_id', 'p.message', 'p.hide_smilies', 'p.posted', 'p.edited', 'p.edited_by');
$result = DB::for_table('posts')->table_alias('p')->select_many($select_display_posts_view)->inner_join('users', array('u.id', '=', 'p.poster_id'), 'u')->inner_join('groups', array('g.g_id', '=', 'u.group_id'), 'g')->where_in('p.id', $post_ids)->order_by('p.id')->find_many();
foreach ($result as $cur_post) {
$post_count++;
// If the poster is a registered user
if ($cur_post->poster_id > 1) {
if ($this->user->g_view_users == '1') {
$cur_post->poster_disp = '<a href="' . get_link('user/' . $cur_post->poster_id . '/') . '">' . feather_escape($cur_post->poster) . '</a>';
} else {
$cur_post->poster_disp = feather_escape($cur_post->poster);
}
// get_title() requires that an element 'username' be present in the array
$cur_post->username = $cur_post->poster;
$cur_post->user_title = get_title($cur_post);
if ($this->config['o_censoring'] == '1') {
$cur_post->user_title = censor_words($cur_post->user_title);
}
} else {
$cur_post->poster_disp = feather_escape($cur_post->poster);
$cur_post->user_title = $lang_topic['Guest'];
}
// Perform the main parsing of the message (BBCode, smilies, censor words etc)
$cur_post->message = parse_message($cur_post->message, $cur_post->hide_smilies);
$post_data[] = $cur_post;
}
return $post_data;
}
示例11: while
<ul>
<?php
while (list(, $cur_error) = each($errors)) {
echo "\t\t\t\t" . '<li><strong>' . $cur_error . '</strong></li>' . "\n";
}
?>
</ul>
</div>
</div>
</div>
<?php
} else {
if (isset($_POST['preview'])) {
require_once PUN_ROOT . 'include/parser.php';
$preview_message = parse_message($p_message, !$smilies);
?>
<div id="postpreview" class="blockpost">
<h2><span><?php
echo $lang_post['Post preview'];
?>
</span></h2>
<div class="box">
<div class="inbox">
<div class="postright">
<div class="postmsg">
<?php
echo $preview_message . "\n";
?>
</div>
</div>
示例12: _e
_e('Post errors', 'luna');
?>
</h3>
</div>
<div class="panel-body">
<?php
foreach ($errors as $cur_error) {
echo "\t\t\t\t" . $cur_error . "\n";
}
?>
</div>
</div>
<?php
} elseif (isset($_POST['preview'])) {
require_once FORUM_ROOT . 'include/parser.php';
$preview_message = parse_message($p_message);
?>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><?php
_e('Post preview', 'luna');
?>
</h3>
</div>
<div class="panel-body">
<p><?php
echo $preview_message . "\n";
?>
</p>
</div>
</div>
示例13: array
echo $id == $cur_post['first_post_id'] ? $lang_post['Edit topic'] : $lang_post['Edit reply'];
?>
</span></h2>
</div>
<?php
// If preview selected and there are no errors
if (isset($_POST['preview']) && empty($forum_page['errors'])) {
if (!defined('FORUM_PARSER_LOADED')) {
require FORUM_ROOT . 'include/parser.php';
}
// Generate the post heading
$forum_page['post_ident'] = array();
$forum_page['post_ident']['num'] = '<span class="post-num">#</span>';
$forum_page['post_ident']['byline'] = '<span class="post-byline">' . sprintf($id == $cur_post['first_post_id'] ? $lang_post['Topic byline'] : $lang_post['Reply byline'], '<strong>' . forum_htmlencode($cur_post['poster']) . '</strong>') . '</span>';
$forum_page['post_ident']['link'] = '<span class="post-link">' . format_time(time()) . '</span>';
$forum_page['preview_message'] = parse_message($message, $hide_smilies);
($hook = get_hook('ed_preview_pre_display')) ? eval($hook) : null;
?>
<div class="main-subhead">
<h2 class="hn"><span><?php
echo $id == $cur_post['first_post_id'] ? $lang_post['Preview edited topic'] : $lang_post['Preview edited reply'];
?>
</span></h2>
</div>
<div id="post-preview" class="main-content main-frm">
<div class="post singlepost">
<div class="posthead">
<h3 class="hn"><?php
echo implode(' ', $forum_page['post_ident']);
?>
</h3>
示例14: f_link_to
}
}
}
if ($sf_user->getId() > 1 && $comment['poster_id'] > 1) {
echo ' ' . f_link_to(__('PM'), 'message_send.php?id=' . $comment['poster_id'] . '&pid=' . $comment['id']);
}
?>
</dd>
</dl>
</div>
<div class="postright">
<div class="postmsg">
<p>
<?php
$text = $comment->message;
$text = parse_message($text, false, $post_id_list);
$text = htmlspecialchars_decode($text, ENT_NOQUOTES);
// parse_message always use html_special_chars, and so does retrieval of the text
echo $text;
?>
</p>
</div>
</div>
<div class="clearer"></div>
<div class="postfootright">
<ul><?php
if ($sf_user->getId() > 1) {
echo '<li class="postreport">' . f_link_to(__('Report'), 'misc.php?report=' . $comment->id) . ' | ';
} else {
echo '<li class="postreport">' . f_link_to(__('Report'), 'misc.php?email=' . sfConfig::get('app_moderator_forum_user_id') . '&doc=' . urlencode('/forums/viewtopic.php?pid=' . $comment->id . '#p' . $comment->id)) . ' | ';
}
示例15: foreach
</p>
<ul class="error-list">
<?php
foreach ($errors as $cur_error) {
echo "\t\t\t\t" . '<li><strong>' . $cur_error . '</strong></li>' . "\n";
}
?>
</ul>
</div>
</div>
</div>
<?php
} elseif ($feather->request->post('preview')) {
require_once FEATHER_ROOT . 'include/parser.php';
$preview_message = parse_message($post['message'], $post['hide_smilies']);
?>
<div id="postpreview" class="blockpost">
<h2><span><?php
echo $lang_post['Post preview'];
?>
</span></h2>
<div class="box">
<div class="inbox">
<div class="postbody">
<div class="postright">
<div class="postmsg">
<?php
echo $preview_message . "\n";
?>
</div>