本文整理汇总了PHP中generate_smilies函数的典型用法代码示例。如果您正苦于以下问题:PHP generate_smilies函数的具体用法?PHP generate_smilies怎么用?PHP generate_smilies使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了generate_smilies函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: viewtopic_modify_data
/**
* Show bbcodes and smilies in the quickreply
* Template data for Ajax submit
*
* @param object $event The event object
* @return null
* @access public
*/
public function viewtopic_modify_data($event)
{
$forum_id = $event['forum_id'];
$topic_data = $event['topic_data'];
$post_list = $event['post_list'];
$topic_id = $topic_data['topic_id'];
$s_quick_reply = false;
if (($this->user->data['is_registered'] || $this->config['qr_allow_for_guests']) && $this->config['allow_quick_reply'] && $topic_data['forum_flags'] & FORUM_FLAG_QUICK_REPLY && $this->auth->acl_get('f_reply', $forum_id)) {
// Quick reply enabled forum
$s_quick_reply = $topic_data['forum_status'] == ITEM_UNLOCKED && $topic_data['topic_status'] == ITEM_UNLOCKED || $this->auth->acl_get('m_edit', $forum_id) ? true : false;
}
if (!$this->user->data['is_registered'] && $s_quick_reply) {
add_form_key('posting');
$s_attach_sig = $this->config['allow_sig'] && $this->user->optionget('attachsig') && $this->auth->acl_get('f_sigs', $forum_id) && $this->auth->acl_get('u_sig');
$s_smilies = $this->config['allow_smilies'] && $this->user->optionget('smilies') && $this->auth->acl_get('f_smilies', $forum_id);
$s_bbcode = $this->config['allow_bbcode'] && $this->user->optionget('bbcode') && $this->auth->acl_get('f_bbcode', $forum_id);
$s_notify = false;
$qr_hidden_fields = array('topic_cur_post_id' => (int) $topic_data['topic_last_post_id'], 'lastclick' => (int) time(), 'topic_id' => (int) $topic_data['topic_id'], 'forum_id' => (int) $forum_id);
// Originally we use checkboxes and check with isset(), so we only provide them if they would be checked
!$s_bbcode ? $qr_hidden_fields['disable_bbcode'] = 1 : true;
!$s_smilies ? $qr_hidden_fields['disable_smilies'] = 1 : true;
!$this->config['allow_post_links'] ? $qr_hidden_fields['disable_magic_url'] = 1 : true;
$s_attach_sig ? $qr_hidden_fields['attach_sig'] = 1 : true;
$s_notify ? $qr_hidden_fields['notify'] = 1 : true;
$topic_data['topic_status'] == ITEM_LOCKED ? $qr_hidden_fields['lock_topic'] = 1 : true;
$this->template->assign_vars(array('S_QUICK_REPLY' => true, 'U_QR_ACTION' => append_sid("{$this->phpbb_root_path}posting.{$this->php_ext}", "mode=reply&f={$forum_id}&t={$topic_id}"), 'QR_HIDDEN_FIELDS' => build_hidden_fields($qr_hidden_fields), 'USERNAME' => $this->request->variable('username', '', true)));
if ($this->config['enable_post_confirm']) {
$captcha = $this->captcha->get_instance($this->config['captcha_plugin']);
$captcha->init(CONFIRM_POST);
}
if ($this->config['enable_post_confirm'] && (isset($captcha) && $captcha->is_solved() === false)) {
$this->template->assign_vars(array('S_CONFIRM_CODE' => true, 'CAPTCHA_TEMPLATE' => $captcha->get_template()));
}
// Add the confirm id/code pair to the hidden fields, else an error is displayed on next submit/preview
if (isset($captcha) && $captcha->is_solved() !== false) {
$this->template->append_var('QR_HIDDEN_FIELDS', build_hidden_fields($captcha->get_hidden_fields()));
}
}
// Ajaxify viewtopic data
if ($this->request->is_ajax() && $this->request->is_set('qr_request')) {
if (!$this->user->data['is_registered'] && $this->config['enable_post_confirm']) {
$captcha = $this->captcha->get_instance($this->config['captcha_plugin']);
$captcha->init(CONFIRM_POST);
// Add the confirm id/code pair to the hidden fields, else an error is displayed on next submit/preview
if (isset($captcha) && $captcha->is_solved() !== false) {
$this->template->append_var('QR_HIDDEN_FIELDS', build_hidden_fields($captcha->get_hidden_fields()));
}
}
// Fix issues if the inserted post is not the first.
if ($this->qr_insert && !$this->qr_first) {
$this->template->alter_block_array('postrow', array('S_FIRST_ROW' => false), false, 'change');
}
$page_title = $event['page_title'];
$this->template->assign_vars(array('S_QUICKREPLY_REQUEST' => true, 'S_QR_NO_FIRST_POST' => $this->qr_insert, 'S_QR_FULL_QUOTE' => $this->config['qr_full_quote']));
$this->template->append_var('QR_HIDDEN_FIELDS', build_hidden_fields(array('qr' => 1, 'qr_cur_post_id' => (int) max($post_list))));
// Output the page
page_header($page_title, false, $forum_id);
page_footer(false, false, false);
$json_response = new \phpbb\json_response();
$json_response->send(array('success' => true, 'result' => $this->template->assign_display('@tatiana5_quickreply/quickreply_template.html', '', true), 'insert' => $this->qr_insert));
}
if ($s_quick_reply) {
include_once $this->phpbb_root_path . 'includes/functions_posting.' . $this->php_ext;
// HTML, BBCode, Smilies, Images and Flash status
$bbcode_status = $this->config['allow_bbcode'] && $this->config['qr_bbcode'] && $this->auth->acl_get('f_bbcode', $forum_id) ? true : false;
$smilies_status = $this->config['allow_smilies'] && $this->config['qr_smilies'] && $this->auth->acl_get('f_smilies', $forum_id) ? true : false;
$img_status = $bbcode_status && $this->auth->acl_get('f_img', $forum_id) ? true : false;
$url_status = $this->config['allow_post_links'] ? true : false;
$flash_status = $bbcode_status && $this->auth->acl_get('f_flash', $forum_id) && $this->config['allow_post_flash'] ? true : false;
$quote_status = true;
// Build custom bbcodes array
if ($bbcode_status) {
display_custom_bbcodes();
}
// Generate smiley listing
if ($smilies_status) {
generate_smilies('inline', $forum_id);
}
// Show attachment box for adding attachments if true
$form_enctype = @ini_get('file_uploads') == '0' || strtolower(@ini_get('file_uploads')) == 'off' || !$this->config['allow_attachments'] || !$this->auth->acl_get('u_attach') || !$this->auth->acl_get('f_attach', $forum_id) ? '' : '" enctype="multipart/form-data';
$allowed = $this->auth->acl_get('f_attach', $forum_id) && $this->auth->acl_get('u_attach') && $this->config['allow_attachments'] && $form_enctype;
$attachment_data = false;
if ($bbcode_status || $smilies_status || $this->config['qr_attach'] && $allowed) {
$this->user->add_lang('posting');
}
if ($this->config['qr_attach'] && $allowed) {
$this->template->assign_vars(array('U_QR_ACTION' => append_sid("{$this->phpbb_root_path}posting.{$this->php_ext}", "mode=reply&f={$forum_id}&t={$topic_id}") . $form_enctype));
include_once $this->phpbb_root_path . 'includes/message_parser.' . $this->php_ext;
$message_parser = new \parse_message();
$message_parser->set_plupload($this->plupload);
$message_parser->set_mimetype_guesser($this->mimetype_guesser);
$message_parser->get_submitted_attachment_data($this->user->data['user_id']);
//.........这里部分代码省略.........
开发者ID:edipdincer,项目名称:QuickReply,代码行数:101,代码来源:listener.php
示例2: display_edit_form
/**
* Display the edit form
*
* @param bool $preview
*/
protected function display_edit_form($preview = false)
{
generate_smilies('inline', 0);
display_custom_bbcodes();
add_form_key('article');
$this->template->assign_vars(array('S_PREVIEW' => $preview, 'TITLE' => $this->data['article_title'], 'MESSAGE' => $preview ? $this->data['article_text'] : $this->message_parser->message, 'PREVIEW_MESSAGE' => $this->message_parser->message, 'SOURCES' => $this->data['article_sources'], 'S_BBCODE_ALLOWED' => $this->option['bbcode'], 'S_LINKS_ALLOWED' => $this->option['url'], 'S_BBCODE_IMG' => $this->option['img'], 'S_BBCODE_FLASH' => $this->option['flash'], 'S_BBCODE_QUOTE' => $this->option['quote'], 'BBCODE_STATUS' => $this->option['bbcode'] ? sprintf($this->user->lang['BBCODE_IS_ON'], '<a href="' . append_sid("{$this->phpbb_root_path}faq.{$this->php_ext}", 'mode=bbcode') . '">', '</a>') : sprintf($this->user->lang['BBCODE_IS_OFF'], '<a href="' . append_sid("{$this->phpbb_root_path}faq.{$this->php_ext}", 'mode=bbcode') . '">', '</a>'), 'IMG_STATUS' => $this->option['img'] ? $this->user->lang['IMAGES_ARE_ON'] : $this->user->lang['IMAGES_ARE_OFF'], 'FLASH_STATUS' => $this->option['flash'] ? $this->user->lang['FLASH_IS_ON'] : $this->user->lang['FLASH_IS_OFF'], 'SMILIES_STATUS' => $this->option['smilies'] ? $this->user->lang['SMILIES_ARE_ON'] : $this->user->lang['SMILIES_ARE_OFF'], 'URL_STATUS' => $this->option['bbcode'] && $this->option['url'] ? $this->user->lang['URL_IS_ON'] : $this->user->lang['URL_IS_OFF'], 'EDIT_REASON' => $this->data['article_edit_reason'], 'TOPIC_ID' => (int) $this->data['article_topic_id'], 'S_AUTH_ACTIVATE' => $this->auth->acl_get('u_wiki_set_active'), 'S_AUTH_EDIT_TOPIC' => $this->auth->acl_get('u_wiki_edit_topic'), 'S_AUTH_REDIRECT' => $this->auth->acl_get('u_wiki_set_redirect'), 'S_AUTH_STICKY' => $this->auth->acl_get('u_wiki_set_sticky'), 'S_ACTIVE' => $preview ? $this->data['article_approved'] : 1, 'S_STICKY' => $this->data['article_sticky'], 'ARTICLE_REDIRECT' => $this->data['article_redirect'], 'ARTICLE_DESCRIPTION' => $this->data['article_description']));
}
开发者ID:tas2580,项目名称:wiki,代码行数:12,代码来源:functions.php
示例3: post
/**
* Controller for /post
*
* @throws http_exception
* @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
*/
public function post()
{
if (!$this->is_available()) {
throw new http_exception(404, 'IDEAS_NOT_AVAILABLE');
}
if ($this->user->data['user_id'] == ANONYMOUS) {
throw new http_exception(404, 'LOGGED_OUT');
}
$this->language->add_lang('posting');
if (!function_exists('submit_post')) {
include $this->root_path . 'includes/functions_posting.' . $this->php_ext;
}
if (!function_exists('display_custom_bbcodes')) {
include $this->root_path . 'includes/functions_display.' . $this->php_ext;
}
$mode = $this->request->variable('mode', '');
$title = $this->request->variable('title', '', true);
$message = $this->request->variable('message', '', true);
if ($mode === 'submit') {
$submit = $this->ideas->submit($title, $message, $this->user->data['user_id']);
if (is_array($submit)) {
$this->template->assign_vars(array('ERROR' => implode('<br />', $submit), 'MESSAGE' => $message));
} else {
return new RedirectResponse($this->helper->route('phpbb_ideas_idea_controller', array('idea_id' => $submit)));
}
}
display_custom_bbcodes();
generate_smilies('inline', 0);
// BBCode, Smilies, Images URL, and Flash statuses
$bbcode_status = (bool) $this->config['allow_bbcode'] && $this->auth->acl_get('f_bbcode', $this->config['ideas_forum_id']);
$smilies_status = (bool) $this->config['allow_smilies'] && $this->auth->acl_get('f_smilies', $this->config['ideas_forum_id']);
$img_status = (bool) $bbcode_status && $this->auth->acl_get('f_img', $this->config['ideas_forum_id']);
$url_status = (bool) $this->config['allow_post_links'];
$flash_status = (bool) $bbcode_status && $this->auth->acl_get('f_flash', $this->config['ideas_forum_id']) && $this->config['allow_post_flash'];
$this->template->assign_vars(array('TITLE' => $title, 'S_POST_ACTION' => $this->helper->route('phpbb_ideas_post_controller', array('mode' => 'submit')), 'S_BBCODE_ALLOWED' => $bbcode_status, 'S_SMILIES_ALLOWED' => $smilies_status, 'S_LINKS_ALLOWED' => $url_status, 'S_BBCODE_IMG' => $img_status, 'S_BBCODE_FLASH' => $flash_status, 'S_BBCODE_QUOTE' => true, 'BBCODE_STATUS' => $this->language->lang($bbcode_status ? 'BBCODE_IS_ON' : 'BBCODE_IS_OFF', '<a href="' . $this->helper->route('phpbb_help_bbcode_controller') . '">', '</a>'), 'IMG_STATUS' => $img_status ? $this->language->lang('IMAGES_ARE_ON') : $this->language->lang('IMAGES_ARE_OFF'), 'FLASH_STATUS' => $flash_status ? $this->language->lang('FLASH_IS_ON') : $this->language->lang('FLASH_IS_OFF'), 'URL_STATUS' => $bbcode_status && $url_status ? $this->language->lang('URL_IS_ON') : $this->language->lang('URL_IS_OFF'), 'SMILIES_STATUS' => $smilies_status ? $this->language->lang('SMILIES_ARE_ON') : $this->language->lang('SMILIES_ARE_OFF')));
// Assign breadcrumb template vars
$this->template->assign_block_vars_array('navlinks', array(array('U_VIEW_FORUM' => $this->helper->route('phpbb_ideas_index_controller'), 'FORUM_NAME' => $this->language->lang('IDEAS')), array('U_VIEW_FORUM' => $this->helper->route('phpbb_ideas_post_controller'), 'FORUM_NAME' => $this->language->lang('NEW_IDEA'))));
return $this->helper->render('idea_new.html', $this->language->lang('NEW_IDEA'));
}
开发者ID:VSEphpbb,项目名称:phpbb-ideas,代码行数:45,代码来源:post_controller.php
示例4: render_data_for_page
//.........这里部分代码省略.........
$this->template->assign_block_vars('navlinks', array('FORUM_NAME' => $this->user->lang['MCHAT_TITLE'], 'U_VIEW_FORUM' => $this->helper->route('dmzx_mchat_controller')));
}
// Run code...
if ($mchat_view) {
$message_number = $mchat_custom_page ? $this->config_mchat['message_limit'] : $this->config_mchat['message_num'];
$sql_where = $this->user->data['user_mchat_topics'] ? '' : 'WHERE m.forum_id = 0';
// Message row
$sql = 'SELECT m.*, u.username, u.user_colour, u.user_avatar, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height, u.user_allow_pm
FROM ' . $this->mchat_table . ' m
LEFT JOIN ' . USERS_TABLE . ' u ON m.user_id = u.user_id
' . $sql_where . '
ORDER BY message_id DESC';
$result = $this->db->sql_query_limit($sql, $message_number);
$rows = $this->db->sql_fetchrowset($result);
$this->db->sql_freeresult($result);
if ($this->config['mchat_message_top']) {
$rows = array_reverse($rows, true);
}
foreach ($rows as $row) {
// auth check
if ($row['forum_id'] != 0 && !$this->auth->acl_get('f_read', $row['forum_id'])) {
continue;
}
// edit, delete and permission auths
$mchat_ban = $this->auth->acl_get('a_authusers') && $this->user->data['user_id'] != $row['user_id'] ? true : false;
// edit auths
if ($this->user->data['user_id'] == ANONYMOUS && $this->user->data['user_id'] == $row['user_id']) {
$chat_auths = $this->user->data['session_ip'] == $row['user_ip'] ? true : false;
} else {
$chat_auths = $this->user->data['user_id'] == $row['user_id'] ? true : false;
}
$mchat_edit = $this->auth->acl_get('u_mchat_edit') && ($this->auth->acl_get('m_') || $chat_auths) ? true : false;
$mchat_del = $this->auth->acl_get('u_mchat_delete') && ($this->auth->acl_get('m_') || $chat_auths) ? true : false;
$mchat_avatar = $row['user_avatar'] ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], $row['user_avatar_width'] > $row['user_avatar_height'] ? 40 : 40 / $row['user_avatar_height'] * $row['user_avatar_width'], $row['user_avatar_height'] > $row['user_avatar_width'] ? 40 : 40 / $row['user_avatar_width'] * $row['user_avatar_height']) : '';
$message_edit = $row['message'];
decode_message($message_edit, $row['bbcode_uid']);
$message_edit = str_replace('"', '"', $message_edit);
// Edit Fix ;)
$message_edit = mb_ereg_replace("'", "’", $message_edit);
if (sizeof($foes_array)) {
if (in_array($row['user_id'], $foes_array)) {
$row['message'] = sprintf($this->user->lang['MCHAT_FOE'], get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], $this->user->lang['GUEST']));
}
}
$row['username'] = mb_ereg_replace("'", "’", $row['username']);
$message = str_replace('\'', '’', $row['message']);
$this->template->assign_block_vars('mchatrow', array('MCHAT_ALLOW_BAN' => $mchat_ban, 'MCHAT_ALLOW_EDIT' => $mchat_edit, 'MCHAT_ALLOW_DEL' => $mchat_del, 'MCHAT_USER_AVATAR' => $mchat_avatar, 'U_VIEWPROFILE' => $row['user_id'] != ANONYMOUS ? append_sid("{$this->phpbb_root_path}memberlist.{$this->phpEx}", 'mode=viewprofile&u=' . $row['user_id']) : '', 'U_USER_IDS' => $row['user_id'] != ANONYMOUS && $this->user->data['user_id'] != $row['user_id'] ? append_sid("{$this->phpbb_root_path}ucp.{$this->phpEx}", 'i=pm&mode=compose&u=' . $row['user_id']) : '', 'BOT_USER_ID' => $row['user_id'] != '1', 'U_USER_ID' => $row['user_id'] != ANONYMOUS && $this->config['allow_privmsg'] && $this->auth->acl_get('u_sendpm') && $this->user->data['user_id'] != $row['user_id'] && $row['user_id'] != '1' && ($row['user_allow_pm'] || $this->auth->acl_gets('a_', 'm_') || $this->auth->acl_getf_global('m_')) ? append_sid("{$this->phpbb_root_path}ucp.{$this->phpEx}", 'i=pm&mode=compose&u=' . $row['user_id']) : '', 'MCHAT_MESSAGE_EDIT' => $message_edit, 'MCHAT_MESSAGE_ID' => $row['message_id'], 'MCHAT_USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], $this->user->lang['GUEST']), 'MCHAT_USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour'], $this->user->lang['GUEST']), 'MCHAT_USERNAME_COLOR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour'], $this->user->lang['GUEST']), 'MCHAT_USER_IP' => $row['user_ip'], 'MCHAT_U_WHOIS' => $this->helper->route('dmzx_mchat_controller', array('mode' => 'whois', 'ip' => $row['user_ip'])), 'MCHAT_U_BAN' => append_sid("{$this->phpbb_root_path}adm/index.{$this->phpEx}", 'i=permissions&mode=setting_user_global&user_id[0]=' . $row['user_id'], true, $this->user->session_id), 'MCHAT_MESSAGE' => generate_text_for_display($message, $row['bbcode_uid'], $row['bbcode_bitfield'], $row['bbcode_options']), 'MCHAT_TIME' => $this->user->format_date($row['message_time'], $this->config_mchat['date']), 'MCHAT_CLASS' => $row['message_id'] % 2 ? 1 : 2));
}
// Write no message
if (empty($rows)) {
$mchat_no_message = true;
}
// display custom bbcodes
if ($mchat_allow_bbcode && $this->config['allow_bbcode']) {
$this->functions_mchat->display_mchat_bbcodes();
}
// Smile row
if ($mchat_smilies) {
if (!function_exists('generate_smilies')) {
include $this->phpbb_root_path . 'includes/functions_posting.' . $this->phpEx;
}
generate_smilies('inline', 0);
}
// If the static message is defined in the language file use it, else just use the entry in the database
if (isset($this->user->lang[strtoupper('static_message')]) || !empty($this->config_mchat['static_message'])) {
$this->config_mchat['static_message'] = $this->config_mchat['static_message'];
if (isset($this->user->lang[strtoupper('static_message')])) {
$this->config_mchat['static_message'] = $this->user->lang[strtoupper('static_message')];
}
}
// If the static message is defined in the language file use it, else just use the entry in the database
if (isset($this->user->lang[strtoupper('mchat_rules')]) || !empty($this->config_mchat['rules'])) {
if (isset($this->user->lang[strtoupper('mchat_rules')])) {
$this->config_mchat['rules'] = $this->user->lang[strtoupper('mchat_rules')];
}
}
// a list of users using the chat
if ($mchat_custom_page) {
$mchat_users = $this->functions_mchat->mchat_users($mchat_session_time, true);
} else {
$mchat_users = $this->functions_mchat->mchat_users($mchat_session_time);
}
$this->template->assign_vars(array('MCHAT_USERS_COUNT' => $mchat_users['mchat_users_count'], 'MCHAT_USERS_LIST' => $mchat_users['online_userlist']));
}
break;
}
// show index stats
if (!empty($this->config['mchat_stats_index']) && !empty($this->user->data['user_mchat_stats_index'])) {
// stats display
$mchat_session_time = !empty($this->config_mchat['timeout']) ? $this->config_mchat['timeout'] : $this->config['session_length'];
$mchat_stats = $this->functions_mchat->mchat_users($mchat_session_time);
$this->template->assign_vars(array('MCHAT_INDEX_STATS' => true, 'MCHAT_INDEX_USERS_COUNT' => $mchat_stats['mchat_users_count'], 'MCHAT_INDEX_USERS_LIST' => !empty($mchat_stats['online_userlist']) ? $mchat_stats['online_userlist'] : '', 'L_MCHAT_ONLINE_EXPLAIN' => $mchat_stats['refresh_message']));
}
$copyright = base64_decode('PGEgaHJlZj0iaHR0cDovL3JtY2dpcnI4My5vcmciPlJNY0dpcnI4MzwvYT4gJmNvcHk7IDxhIGhyZWY9Imh0dHA6Ly93d3cuZG16eC13ZWIubmV0IiB0aXRsZT0id3d3LmRtengtd2ViLm5ldCI+ZG16eDwvYT4=');
add_form_key('mchat_posting');
// Template function...
$this->template->assign_vars(array('MCHAT_FILE_NAME' => $this->helper->route('dmzx_mchat_controller'), 'MCHAT_REFRESH_JS' => 1000 * $this->config_mchat['refresh'], 'MCHAT_ADD_MESSAGE' => $mchat_add_mess, 'MCHAT_READ_MODE' => $mchat_read_mode, 'MCHAT_ARCHIVE_MODE' => $mchat_archive_mode, 'MCHAT_INPUT_TYPE' => $this->user->data['user_mchat_input_area'], 'MCHAT_RULES' => $mchat_rules, 'MCHAT_ALLOW_SMILES' => $mchat_smilies, 'MCHAT_ALLOW_IP' => $mchat_ip, 'MCHAT_ALLOW_PM' => $mchat_pm, 'MCHAT_ALLOW_LIKE' => $mchat_like, 'MCHAT_ALLOW_QUOTE' => $mchat_quote, 'MCHAT_NOMESSAGE_MODE' => $mchat_no_message, 'MCHAT_ALLOW_BBCODES' => $mchat_allow_bbcode && $this->config['allow_bbcode'] ? true : false, 'MCHAT_MESSAGE_TOP' => $this->config['mchat_message_top'] ? true : false, 'MCHAT_ENABLE' => $this->config['mchat_enable'], 'MCHAT_ARCHIVE_URL' => $this->helper->route('dmzx_mchat_controller', array('mode' => 'archive')), 'MCHAT_CUSTOM_PAGE' => $mchat_custom_page, 'MCHAT_INDEX_HEIGHT' => $this->config_mchat['index_height'], 'MCHAT_CUSTOM_HEIGHT' => $this->config_mchat['custom_height'], 'MCHAT_READ_ARCHIVE_BUTTON' => $mchat_read_archive, 'MCHAT_FOUNDER' => $mchat_founder, 'MCHAT_CLEAN_URL' => $this->helper->route('dmzx_mchat_controller', array('mode' => 'clean', 'redirect' => $on_page)), 'MCHAT_STATIC_MESS' => !empty($this->config_mchat['static_message']) ? htmlspecialchars_decode($this->config_mchat['static_message']) : '', 'L_MCHAT_COPYRIGHT' => $copyright, 'MCHAT_WHOIS' => $this->config_mchat['whois'], 'MCHAT_MESSAGE_LNGTH' => $this->config_mchat['max_message_lngth'], 'L_MCHAT_MESSAGE_LNGTH_EXPLAIN' => intval($this->config_mchat['max_message_lngth']) ? sprintf($this->user->lang['MCHAT_MESSAGE_LNGTH_EXPLAIN'], intval($this->config_mchat['max_message_lngth'])) : '', 'MCHAT_MESS_LONG' => sprintf($this->user->lang['MCHAT_MESS_LONG'], $this->config_mchat['max_message_lngth']), 'MCHAT_USER_TIMEOUT' => $this->config_mchat['timeout'] ? 1000 * $this->config_mchat['timeout'] : false, 'MCHAT_WHOIS_REFRESH' => 1000 * $this->config_mchat['whois_refresh'], 'MCHAT_PAUSE_ON_INPUT' => $this->config_mchat['pause_on_input'] ? true : false, 'L_MCHAT_ONLINE_EXPLAIN' => $this->functions_mchat->mchat_session_time($mchat_session_time), 'MCHAT_REFRESH_YES' => sprintf($this->user->lang['MCHAT_REFRESH_YES'], $this->config_mchat['refresh']), 'L_MCHAT_WHOIS_REFRESH_EXPLAIN' => sprintf($this->user->lang['WHO_IS_REFRESH_EXPLAIN'], $this->config_mchat['whois_refresh']), 'S_MCHAT_AVATARS' => $mchat_avatars, 'S_MCHAT_LOCATION' => $this->config_mchat['location'], 'S_MCHAT_SOUND_YES' => $this->user->data['user_mchat_sound'], 'S_MCHAT_INDEX_STATS' => $this->user->data['user_mchat_stats_index'], 'U_MORE_SMILIES' => append_sid("{$this->phpbb_root_path}posting.{$this->phpEx}", 'mode=smilies'), 'U_MCHAT_RULES' => $this->helper->route('dmzx_mchat_controller', array('mode' => 'rules')), 'S_MCHAT_ON_INDEX' => $this->config['mchat_on_index'] && !empty($this->user->data['user_mchat_index']) ? true : false));
// Return for: \$this->helper->render(filename, lang_title);
return array('filename' => 'mchat_body.html', 'lang_title' => $this->user->lang['MCHAT_TITLE']);
}
开发者ID:ezpz-cz,项目名称:web-plugins,代码行数:101,代码来源:render_helper.php
示例5: get_cms_access_auth
$access_allowed = get_cms_access_auth('cms', $cms_admin->mode, $cms_admin->action, $cms_admin->l_id, $cms_admin->b_id);
if (!$access_allowed) {
message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']);
}
include IP_ROOT_PATH . 'includes/class_db.' . PHP_EXT;
$class_db = new class_db();
include IP_ROOT_PATH . 'includes/class_form.' . PHP_EXT;
$class_form = new class_form();
include_once IP_ROOT_PATH . 'includes/functions_selects.' . PHP_EXT;
include_once IP_ROOT_PATH . 'includes/functions_post.' . PHP_EXT;
include_once IP_ROOT_PATH . 'includes/bbcode.' . PHP_EXT;
$page_title = $lang['CMS_TITLE'];
$cms_type = 'cms_standard';
$preview_block = isset($_POST['preview']) ? true : false;
if ($cms_admin->mode == 'smilies') {
generate_smilies('window');
exit;
}
if (isset($_POST['block_reset'])) {
if ($cms_admin->ls_id == false) {
redirect(append_sid($cms_admin->root . '?mode=blocks&l_id=' . $cms_admin->l_id, true));
} else {
redirect(append_sid($cms_admin->root . '?mode=blocks&ls_id=' . $cms_admin->ls_id, true));
}
}
if (isset($_POST['cancel'])) {
redirect(append_sid($cms_admin->root, true));
}
$template->assign_vars(array('S_CMS_AUTH' => true, 'S_EDIT_SETTINGS' => true, 'S_L_ADD' => true, 'S_L_EDIT' => true, 'S_L_DELETE' => true, 'S_B_ADD' => true, 'S_B_EDIT' => true, 'S_B_DELETE' => true));
$cms_admin->s_hidden_fields = '';
$cms_admin->s_append_url = '';
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:31,代码来源:cms.php
示例6: fix_displayimage
//.........这里部分代码省略.........
if (strpos($match, $v) !== FALSE) {
$matches[3][$key] = " style=\"border:1pix;border-color:grey;\"";
break;
}
}
$film_strip = ereg_replace(preg_quote($match), $matches[1][$key] . $matches[2][$key] . $matches[3][$key] . $matches[4][$key] . $matches[5][$key], $film_strip);
}
$film_strip = ereg_replace("class=\"image\"", "", $film_strip);
}
//removes alt and title from film_strip
$pattern = "#(alt=\")(.*?)(\")#s";
if (preg_match_all($pattern, $film_strip, $matches)) {
foreach ($matches[0] as $key => $match) {
$film_strip = ereg_replace(preg_quote($match), "", $film_strip);
}
}
$pattern = "#(title=\")(.*?)(\")#s";
if (preg_match_all($pattern, $film_strip, $matches)) {
foreach ($matches[0] as $key => $match) {
$film_strip = ereg_replace(preg_quote($match), "", $film_strip);
}
}
//and try to set a border on current vote
$result = cpg_db_query("SELECT rating FROM `{$CONFIG['TABLE_PREFIX']}user_votes` WHERE pid = {$CURRENT_PIC_DATA['pid']} AND user_id = " . USER_ID);
if ($row = mysql_fetch_row($result)) {
$pattern = "#(<img.*?rating{$row[0]}.*?)(border=\"0\")(.*?/>)#s";
if (preg_match($pattern, $votes, $matches)) {
$votes = ereg_replace(preg_quote($matches[0]), $matches[1] . "border=\"2\"" . $matches[3], $votes);
}
}
// find if user can vote (not own image) and if can vote verifies that the voting block is not hidden
if ($CURRENT_PIC_DATA['owner_id'] == USER_ID || !USER_CAN_RATE_PICTURES) {
//<a href="javascript:location.href='./ratepic.php?pic=22&rate=1'" title="Beurk"><img src="themes/alphadxd/images/rating1.gif" border="0" alt="Beurk" /></a>
$pattern = "#(<a href.*?ratepic.*?\\>)(.*?)(</a>)#s";
if (preg_match_all($pattern, $votes, $matches)) {
foreach ($matches[0] as $key => $match) {
$votes = ereg_replace(preg_quote($match), $matches[2][$key], $votes);
}
}
} else {
$votes = ereg_replace(preg_quote("display: none;"), "", $votes);
}
// only display current user's comments in a contest
if ($CURRENT_ALBUM_DATA['comments'] != 'YES') {
return;
}
$comments = '';
$pid = $CURRENT_PIC_DATA['pid'];
if (!$CONFIG['enable_smilies']) {
$tmpl_comment_edit_box = template_extract_block($saved_template_image_comments, 'edit_box_no_smilies', '{EDIT}');
template_extract_block($saved_template_image_comments, 'edit_box_smilies');
template_extract_block($saved_template_add_your_comment, 'input_box_smilies');
} else {
$tmpl_comment_edit_box = template_extract_block($saved_template_image_comments, 'edit_box_smilies', '{EDIT}');
template_extract_block($saved_template_image_comments, 'edit_box_no_smilies');
template_extract_block($saved_template_add_your_comment, 'input_box_no_smilies');
}
$tmpl_comments_buttons = template_extract_block($saved_template_image_comments, 'buttons', '{BUTTONS}');
template_extract_block($saved_template_image_comments, 'ipinfo', '');
//suppressed by PL
template_extract_block($saved_template_image_comments, 'report_comment_button');
// won't report on own comment, would we?
$newpostok = true;
$query = "SELECT msg_id, msg_author, msg_body, UNIX_TIMESTAMP(msg_date) AS msg_date, author_id, author_md5_id, msg_raw_ip, msg_hdr_ip, pid FROM {$CONFIG['TABLE_COMMENTS']} WHERE pid='{$pid}' AND msg_author='" . USER_NAME . "' ORDER BY msg_id DESC LIMIT 1";
$result = cpg_db_query($query);
if ($row = mysql_fetch_array($result)) {
$user_can_edit = true;
$comment_buttons = $tmpl_comments_buttons;
$comment_edit_box = $tmpl_comment_edit_box;
if ($CONFIG['enable_smilies']) {
$comment_body = process_smilies(make_clickable($row['msg_body']));
$smilies = generate_smilies("f{$row['msg_id']}", 'msg_body');
} else {
$comment_body = make_clickable($row['msg_body']);
$smilies = '';
}
$params = array('{EDIT}' => &$tmpl_comment_edit_box, '{BUTTONS}' => &$tmpl_comments_buttons);
$template = template_eval($saved_template_image_comments, $params);
$params = array('{MSG_AUTHOR}' => stripslashes($row['msg_author']), '{MSG_ID}' => $row['msg_id'], '{PID}' => $row['pid'], '{EDIT_TITLE}' => &$lang_display_comments['edit_title'], '{CONFIRM_DELETE}' => &$lang_display_comments['confirm_delete'], '{MSG_DATE}' => localised_date($row['msg_date'], '%d %B %Y'), '{MSG_BODY}' => bb_decode($comment_body), '{MSG_BODY_RAW}' => $row['msg_body'], '{OK}' => &$lang_display_comments['OK'], '{SMILIES}' => $smilies, '{REPORT_COMMENT_TITLE}' => &$lang_display_comments['report_comment_title'], '{WIDTH}' => $CONFIG['picture_table_width']);
$comments .= template_eval($template, $params);
$newpostok = false;
// only 1 comment per author
}
if (USER_ID == $CURRENT_PIC_DATA['owner_id'] || USER_ID == 0) {
$newpostok = false;
}
if ($newpostok) {
$user_name_input = '<tr><td><input type="hidden" name="msg_author" value="' . stripslashes(USER_NAME) . '" /></td>';
template_extract_block($saved_template_add_your_comment, 'user_name_input', $user_name_input);
$user_name = '';
$params = array('{ADD_YOUR_COMMENT}' => $lang_display_comments['add_your_comment'], '{NAME}' => $lang_display_comments['name'], '{COMMENT}' => "", '{PIC_ID}' => $pid, '{USER_NAME}' => $user_name, '{MAX_COM_LENGTH}' => $CONFIG['max_com_size'], '{OK}' => $lang_display_comments['OK'], '{SMILIES}' => '', '{WIDTH}' => $CONFIG['picture_table_width']);
if ($CONFIG['enable_smilies']) {
$params['{SMILIES}'] = generate_smilies();
} else {
template_extract_block($saved_template_add_your_comment, 'smilies');
}
$comments .= template_eval($saved_template_add_your_comment, $params);
}
}
}
开发者ID:phill104,项目名称:branches,代码行数:101,代码来源:codebase.php
示例7: rate
public function rate($image_id)
{
$this->user->add_lang_ext('phpbbgallery/core', array('gallery'));
add_form_key('gallery');
$submit = $this->request->variable('submit', false);
$error = $message = '';
// load Image Data
$image_data = $this->image->get_image_data($image_id);
$album_id = (int) $image_data['image_album_id'];
$album_data = $this->loader->get($album_id);
$this->display->generate_navigation($album_data);
$page_title = $image_data['image_name'];
$image_backlink = $this->helper->route('phpbbgallery_image', array('image_id' => $image_id));
$album_backlink = $this->helper->route('phpbbgallery_album', array('album_id' => $album_id));
$image_loginlink = $this->url->append_sid('relative', 'image_page', "album_id={$album_id}&image_id={$image_id}");
$this->gallery_auth->load_user_premissions($this->user->data['user_id']);
$rating = new \phpbbgallery\core\rating($image_id, $image_data, $album_data);
if (!($this->gallery_config->get('allow_rates') && $rating->is_able())) {
// The user is unable to rate.
$this->misc->not_authorised($image_backlink, $image_loginlink);
}
$this->user->add_lang('posting');
include_once $this->phpbb_root_path . 'includes/functions_posting.' . $this->php_ext;
$bbcode_status = $this->config['allow_bbcode'] ? true : false;
$smilies_status = $this->config['allow_smilies'] ? true : false;
$img_status = $bbcode_status ? true : false;
$url_status = $this->config['allow_post_links'] ? true : false;
$flash_status = false;
$quote_status = true;
include_once $this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext;
// Build custom bbcodes array
display_custom_bbcodes();
// Build smilies array
generate_smilies('inline', 0);
/**
* Rating-System: now you can comment and rate in one form
*/
$s_user_rated = false;
if ($this->gallery_config->get('allow_rates')) {
$user_rating = $rating->get_user_rating($this->user->data['user_id']);
// Check: User didn't rate yet, has permissions, it's not the users own image and the user is logged in
if (!$user_rating && $rating->is_allowed()) {
$rating->display_box();
// User just rated the image, so we store it
$rate_point = $this->request->variable('rating', 0);
if ($rating->rating_enabled && $rate_point > 0) {
$rating->submit_rating();
$s_user_rated = true;
$message .= $this->user->lang['RATING_SUCCESSFUL'] . '<br />';
}
$this->template->assign_vars(array('S_ALLOWED_TO_RATE' => $rating->is_allowed()));
}
}
$message .= '<br />' . sprintf($this->user->lang['CLICK_RETURN_IMAGE'], '<a href="' . $image_backlink . '">', '</a>');
$message .= '<br />' . sprintf($this->user->lang['CLICK_RETURN_ALBUM'], '<a href="' . $album_backlink . '">', '</a>');
$this->url->meta_refresh(3, $image_backlink);
trigger_error($message);
return $this->helper->render('gallery/comment_body.html', $page_title);
}
开发者ID:here-we-go,项目名称:phpbbgallery,代码行数:59,代码来源:comment.php
示例8: theme_html_comments
function theme_html_comments($pid)
{
global $CONFIG, $USER, $CURRENT_ALBUM_DATA, $comment_date_fmt, $HTML_SUBST;
global $template_image_comments, $template_add_your_comment, $lang_display_comments, $lang_common, $REFERER;
$html = '';
//report to moderator buttons
if (!($CONFIG['report_post'] == 1 && USER_CAN_SEND_ECARDS)) {
template_extract_block($template_image_comments, 'report_comment_button');
}
if (!$CONFIG['enable_smilies']) {
$tmpl_comment_edit_box = template_extract_block($template_image_comments, 'edit_box_no_smilies', '{EDIT}');
template_extract_block($template_image_comments, 'edit_box_smilies');
template_extract_block($template_add_your_comment, 'input_box_smilies');
} else {
$tmpl_comment_edit_box = template_extract_block($template_image_comments, 'edit_box_smilies', '{EDIT}');
template_extract_block($template_image_comments, 'edit_box_no_smilies');
template_extract_block($template_add_your_comment, 'input_box_no_smilies');
}
$tmpl_comments_buttons = template_extract_block($template_image_comments, 'buttons', '{BUTTONS}');
$tmpl_comments_ipinfo = template_extract_block($template_image_comments, 'ipinfo', '{IPINFO}');
if ($CONFIG['comments_sort_descending'] == 1) {
$comment_sort_order = 'DESC';
} else {
$comment_sort_order = 'ASC';
}
$result = cpg_db_query("SELECT msg_id, msg_author, msg_body, UNIX_TIMESTAMP(msg_date) AS msg_date, author_id, author_md5_id, msg_raw_ip, msg_hdr_ip, pid, approval FROM {$CONFIG['TABLE_COMMENTS']} WHERE pid='{$pid}' ORDER BY msg_id {$comment_sort_order}");
while ($row = mysql_fetch_array($result)) {
// while-loop start
$user_can_edit = GALLERY_ADMIN_MODE || USER_ID && USER_ID == $row['author_id'] && USER_CAN_POST_COMMENTS || !USER_ID && USER_CAN_POST_COMMENTS && $USER['ID'] == $row['author_md5_id'];
if ($user_can_edit != '' && $CONFIG['comment_user_edit'] != 0 || GALLERY_ADMIN_MODE) {
$comment_buttons = $tmpl_comments_buttons;
$comment_edit_box = $tmpl_comment_edit_box;
} else {
$comment_buttons = '';
$comment_edit_box = '';
}
$comment_ipinfo = $row['msg_raw_ip'] && GALLERY_ADMIN_MODE ? $tmpl_comments_ipinfo : '';
$hide_comment = 0;
// comment approval
$pending_approval = '';
if (USER_IS_ADMIN) {
//display the selector approve/disapprove
if ($row['approval'] == 'NO') {
$pending_approval = '<a href="reviewcom.php?pos=-{PID}&msg_id={MSG_ID}&what=approve" title="' . $lang_display_comments['approve'] . '"><img src="images/approve.gif" border="0" alt="" align="middle" /></a>';
} else {
$pending_approval = '<a href="reviewcom.php?pos=-{PID}&msg_id={MSG_ID}&what=disapprove" title="' . $lang_display_comments['disapprove'] . '"><img src="images/disapprove.gif" border="0" alt="" align="middle" /></a>';
}
} else {
// user or guest is logged in - start
if ($row['approval'] == 'NO') {
// the comment is not approved - start
if ($user_can_edit) {
// the comment comes from the current visitor, display it with a warning that it needs admin approval
$pending_approval = '<img src="images/approve.gif" border="0" alt="" title="' . $lang_display_comments['pending_approval'] . '" align="middle" />';
} else {
// the comment comes from someone else - don't display it at all
if ($CONFIG['comment_placeholder'] == 0) {
$hide_comment = 1;
} else {
$row['msg_author'] = $lang_display_comments['unapproved_comment'];
$row['msg_body'] = $lang_display_comments['pending_approval_message'];
$row['author_id'] = 0;
}
}
}
// the comment is not approved - end
}
// user or guest is logged in - end
if ($CONFIG['enable_smilies']) {
$comment_body = process_smilies(make_clickable($row['msg_body']));
$smilies = generate_smilies("f{$row['msg_id']}", 'msg_body');
} else {
$comment_body = make_clickable($row['msg_body']);
$smilies = '';
}
// wrap the comment into italics if it isn't approved
if ($row['approval'] == 'NO') {
$comment_body = '<em>' . $comment_body . '</em>';
$row['msg_author'] = $row['msg_author'];
}
$ip = $row['msg_hdr_ip'];
if ($row['msg_hdr_ip'] != $row['msg_raw_ip']) {
$ip .= ' [' . $row['msg_raw_ip'] . ']';
}
$params = array('{EDIT}' => &$comment_edit_box, '{BUTTONS}' => &$comment_buttons, '{IPINFO}' => &$comment_ipinfo, '{PENDING_APPROVAL}' => &$pending_approval);
$template = template_eval($template_image_comments, $params);
if ($row['author_id'] == 0) {
$profile_lnk = stripslashes($row['msg_author']);
} else {
$profile_lnk = '<a href="profile.php?uid=' . $row['author_id'] . '">' . stripslashes($row['msg_author']) . '</a>';
}
$params = array('{MSG_AUTHOR_LNK}' => $profile_lnk, '{MSG_AUTHOR}' => $row['msg_author'], '{MSG_ID}' => $row['msg_id'], '{PID}' => $row['pid'], '{EDIT_TITLE}' => &$lang_display_comments['edit_title'], '{DELETE_TITLE}' => &$lang_display_comments['delete_title'], '{CONFIRM_DELETE}' => &$lang_display_comments['confirm_delete'], '{MSG_DATE}' => localised_date($row['msg_date'], $comment_date_fmt), '{MSG_BODY}' => bb_decode($comment_body), '{MSG_BODY_RAW}' => $row['msg_body'], '{OK}' => &$lang_display_comments['OK'], '{SMILIES}' => $smilies, '{IP}' => $ip, '{REPORT_COMMENT_TITLE}' => &$lang_display_comments['report_comment_title'], '{WIDTH}' => $CONFIG['picture_table_width']);
if ($hide_comment != 1) {
$html .= template_eval($template, $params);
}
}
// while-loop end
if (USER_CAN_POST_COMMENTS && $CURRENT_ALBUM_DATA['comments'] == 'YES') {
if (USER_ID) {
$user_name_input = '<tr><td><input type="hidden" name="msg_author" value="' . stripslashes(USER_NAME) . '" /></td>';
//.........这里部分代码省略.........
开发者ID:phill104,项目名称:branches,代码行数:101,代码来源:theme.php
示例9: main
//.........这里部分代码省略.........
}
$bbcode_uid = $bbcode_bitfield = $bbcode_flags = '';
$warn_msg = generate_text_for_storage($signature, $bbcode_uid, $bbcode_bitfield, $bbcode_flags, $enable_bbcode, $enable_urls, $enable_smilies);
if (sizeof($warn_msg)) {
$error += $warn_msg;
}
if (!$submit) {
// Parse it for displaying
$signature_preview = generate_text_for_display($signature, $bbcode_uid, $bbcode_bitfield, $bbcode_flags);
} else {
if (!sizeof($error)) {
$user->optionset('sig_bbcode', $enable_bbcode);
$user->optionset('sig_smilies', $enable_smilies);
$user->optionset('sig_links', $enable_urls);
$sql_ary = array('user_sig' => $signature, 'user_options' => $user->data['user_options'], 'user_sig_bbcode_uid' => $bbcode_uid, 'user_sig_bbcode_bitfield' => $bbcode_bitfield);
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE user_id = ' . $user->data['user_id'];
$db->sql_query($sql);
$message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
trigger_error($message);
}
}
// Replace "error" strings with their real, localised form
$error = array_map(array($user, 'lang'), $error);
$decoded_message = generate_text_for_edit($signature, $bbcode_uid, $bbcode_bitfield);
/** @var \phpbb\controller\helper $controller_helper */
$controller_helper = $phpbb_container->get('controller.helper');
$template->assign_vars(array('ERROR' => sizeof($error) ? implode('<br />', $error) : '', 'SIGNATURE' => $decoded_message['text'], 'SIGNATURE_PREVIEW' => $signature_preview, 'S_BBCODE_CHECKED' => !$enable_bbcode ? ' checked="checked"' : '', 'S_SMILIES_CHECKED' => !$enable_smilies ? ' checked="checked"' : '', 'S_MAGIC_URL_CHECKED' => !$enable_urls ? ' checked="checked"' : '', 'BBCODE_STATUS' => $user->lang($config['allow_sig_bbcode'] ? 'BBCODE_IS_ON' : 'BBCODE_IS_OFF', '<a href="' . $controller_helper->route('phpbb_help_bbcode_controller') . '">', '</a>'), 'SMILIES_STATUS' => $config['allow_sig_smilies'] ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'], 'IMG_STATUS' => $config['allow_sig_img'] ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'], 'FLASH_STATUS' => $config['allow_sig_flash'] ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'], 'URL_STATUS' => $config['allow_sig_links'] ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'], 'MAX_FONT_SIZE' => (int) $config['max_sig_font_size'], 'L_SIGNATURE_EXPLAIN' => $user->lang('SIGNATURE_EXPLAIN', (int) $config['max_sig_chars']), 'S_BBCODE_ALLOWED' => $config['allow_sig_bbcode'], 'S_SMILIES_ALLOWED' => $config['allow_sig_smilies'], 'S_BBCODE_IMG' => $config['allow_sig_img'] ? true : false, 'S_BBCODE_FLASH' => $config['allow_sig_flash'] ? true : false, 'S_LINKS_ALLOWED' => $config['allow_sig_links'] ? true : false));
add_form_key('ucp_sig');
// Build custom bbcodes array
display_custom_bbcodes();
// Generate smiley listing
generate_smilies('inline', 0);
break;
case 'avatar':
add_form_key('ucp_avatar');
$avatars_enabled = false;
if ($config['allow_avatar'] && $auth->acl_get('u_chgavatar')) {
/* @var $phpbb_avatar_manager \phpbb\avatar\manager */
$phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
$avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers();
// This is normalised data, without the user_ prefix
$avatar_data = \phpbb\avatar\manager::clean_row($user->data, 'user');
if ($submit) {
if (check_form_key('ucp_avatar')) {
|
请发表评论