Quick reply for phpBB3

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
leidris
Registered User
Posts: 5
Joined: Fri Jan 08, 2010 1:04 pm

Re: Quick reply for phpBB3

Post by leidris »

rxu wrote:I'd advice to apply just the last edit for viewtopic_body.html for CA Gen2 style, namely:

Did you mean that I have to ignore #1 and #2 edits to viewtopic_body.html? My understanding from your comments about viewtopic_body.html (one you wrote a long time ago) is that #1 is something with user profile and #2 is something with quote. Is there any other way to do this?

Also, CA Gen2 style has an icon for quick reply. Is it possible to use that instead of "quick reply" in text?

Thank you for your rapid response !! =)
rxu
Extensions Development Team
Posts: 3467
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: Quick reply for phpBB3

Post by rxu »

The thing is that phpBB 3.0.6 has it's own quick reply built-in and people now are confusing it with MOD(s) of quick reply :)
If we use some built-in quick reply things, it will be absolutely different MOD than this.
leidris wrote:Did you mean that I have to ignore #1 and #2 edits to viewtopic_body.html? My understanding from your comments about viewtopic_body.html (one you wrote a long time ago) is that #1 is something with user profile and #2 is something with quote.
Yes. Edit #1 is to quickly paste username into QR box rounded by bbcode tags. Since in CA Gen2 username acts as a dropdown menu, the feature doesn't make sense.
Edit #2 is to quickly paste selected post text as a quote into QR box (a kind of "quick quote" or "quote selected"). It can be implemented, but I need some more time to make it properly. :)
CMA
Registered User
Posts: 330
Joined: Mon Jun 02, 2003 4:15 pm
Location: Vancouver BC Canada
Contact:

Re: Quick reply for phpBB3

Post by CMA »

just curious... how can i add option from posting_editor.html on quickly reply body?... i mean

i use mod from http://www.phpbb.com/community/viewtopi ... &t=1179095 so

i want to copy and paste

Code: Select all

			<!-- IF S_USER_GROUPS -->
			<hr class="dashed" />
			<dl>
				<dt><label for="post_as_groupmember">{L_POST_AS_GROUPMEMBER} :</label></dt>
				<dd><label for="post_as_groupmember"><select name="post_as_groupmember" id="post_as_groupmember"><option value="1"></option>{USER_GROUPS}</select></label></dd>
				<dd>{L_POST_AS_GROUPMEMBER_EXPLAIN}</dd>
			</dl>
			<!-- ENDIF -->
on your quick-edit.html

but i am not sure how to put um "post_as_groupmember" data information on your mod... can you please tell me? so i can see option on quickly reply box...

thank you very much...
rxu
Extensions Development Team
Posts: 3467
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: Quick reply for phpBB3

Post by rxu »

CMA wrote:i use mod from viewtopic.php?f=69&t=1179095
If the link given ir right, the mOD you use is Colored background messages for admins and mods. I've downloaded v.1.0.1 but didn't find a code like you posted above in that MOD's installation instruction.
I could try to help if you'd point me where to look for that code in "Colored background messages for admins and mods" MOD :)
CMA
Registered User
Posts: 330
Joined: Mon Jun 02, 2003 4:15 pm
Location: Vancouver BC Canada
Contact:

Re: Quick reply for phpBB3

Post by CMA »

really? did you check install.xml? and you can see that code is added in post_editor.html.

just want to know how to add or enable "<!-- IF S_USER_GROUPS -->" on your quick_edit.html

i am waiting for author's reply about that...
rxu
Extensions Development Team
Posts: 3467
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: Quick reply for phpBB3

Post by rxu »

CMA wrote:did you check install.xml? and you can see that code is added in post_editor.html.
That's weird, but this is all I can see for posting_editor edits.
cbgm.jpg
cbgm.jpg (135.54 KiB) Viewed 2379 times
CMA
Registered User
Posts: 330
Joined: Mon Jun 02, 2003 4:15 pm
Location: Vancouver BC Canada
Contact:

Re: Quick reply for phpBB3

Post by CMA »

sorry, i should tell you that file you download is old... i use v2 from http://www.modsphpbb3.fr/viewtopic.php?f=54&t=80

see secondposts... ( or maybe third one)
rxu
Extensions Development Team
Posts: 3467
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: Quick reply for phpBB3

Post by rxu »

CMA wrote:i should tell you that file you download is old... i use v2
Ah... that's absolutely different story :)
Well, try the following.

Code: Select all

OPEN
includes/quick_reply.php

FIND
// Send vars to template

BEFORE, ADD
$sql = 'SELECT g.group_id, g.group_name, g.group_type
	FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . ' ug
	WHERE ug.user_id = '.(int) $user->data['user_id'].'
		AND g.group_id = ug.group_id 
		AND g.group_type <> ' . GROUP_HIDDEN . '
		AND g.group_bgcolour <> \'\'
		AND ug.user_pending = 0
	ORDER BY g.group_type, g.group_name';
$result = $db->sql_query($sql);

$group_options = '';
while ($row = $db->sql_fetchrow($result))
{
	$group_options .= '<option value="' . $row['group_id'] . '"' . (($row['group_id'] == $post_data['post_as_groupmember']) ? ' selected="selected"' : '') . '>' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
}
$db->sql_freeresult($result);

FIND
'S_PRIVMSGS'			=> false,

AFTER, ADD
	'USER_GROUPS'			=> $group_options,	
	'S_USER_GROUPS'			=> ($group_options != '') ? true : false,

OPEN
styles/prosilver/template/quick_reply.html

FIND
				<!-- IF S_LOCK_POST_ALLOWED -->
					<div><label for="lock_post"><input type="checkbox" name="lock_post" id="lock_post"{S_LOCK_POST_CHECKED} /> {L_LOCK_POST} [{L_LOCK_POST_EXPLAIN}]</label></div>
				<!-- ENDIF -->

AFTER, ADD
			<!-- IF S_USER_GROUPS -->
			<hr class="dashed" />
			<dl>
				<dt><label for="post_as_groupmember">{L_POST_AS_GROUPMEMBER} :</label></dt>
				<dd><label for="post_as_groupmember"><select name="post_as_groupmember" id="post_as_groupmember"><option value="0"></option>{USER_GROUPS}</select></label></dd>
				<dd>{L_POST_AS_GROUPMEMBER_EXPLAIN}</dd>
			</dl>
			<!-- ENDIF -->	 
Last edited by rxu on Sun Jan 10, 2010 7:47 am, edited 1 time in total.
CMA
Registered User
Posts: 330
Joined: Mon Jun 02, 2003 4:15 pm
Location: Vancouver BC Canada
Contact:

Re: Quick reply for phpBB3

Post by CMA »

hmmm the option seem not show up...

i double and triple check...

its not working... yes i did purge the cache and refresh template...
rxu
Extensions Development Team
Posts: 3467
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: Quick reply for phpBB3

Post by rxu »

Are you sure we're both talking about the same quick reply (not 3.0.6 built-in (quickreply_editor.html) but the MOD (quick_reply.html))?
CMA
Registered User
Posts: 330
Joined: Mon Jun 02, 2003 4:15 pm
Location: Vancouver BC Canada
Contact:

Re: Quick reply for phpBB3

Post by CMA »

yes of course...

here is source

Code: Select all

<?php
/** 
*
* @package phpBB3
* @version $Id: quick_reply.php,v 1.6.4 2007/12/22 01:10:26 rxu Exp $
* @copyright (c) 2005 phpBB Group 
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
* Minimum Requirement: PHP 4.3.3
*/

/**
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

$quick_reply = false;
$mode = (isset($topic_id)) ? 'reply' : 'post';

$quick_reply_userprefs = ($user->optionget('viewquick' . $mode)) ? true : false;
$quick_reply_guests = ($user->data['user_id'] == ANONYMOUS && $config['allow_quick_' . $mode] == 2) ? true : false;
$quick_reply_display = ($user->data['user_id'] == ANONYMOUS) ? $quick_reply_guests : $quick_reply_userprefs;

if ($config['allow_quick_' . $mode] && $quick_reply_display)
{
	$main_data = array();
	$main_data = ($mode == 'reply') ? $topic_data : $forum_data;
	
	if ($auth->acl_get('f_' . $mode, $forum_id))
	{
		$quick_reply = true;
	}

	if ($main_data['forum_type'] != FORUM_POST)
	{
		$quick_reply = false;
	}

	if (($main_data['forum_status'] == ITEM_LOCKED || (isset($main_data['topic_status']) && $main_data['topic_status'] == ITEM_LOCKED)) && !$auth->acl_get('m_edit', $forum_id))
	{
		$quick_reply = false;
	}
}

if ($quick_reply)
{
	include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
	$user->add_lang(array('posting', 'mcp', 'mods/quick_reply'));

	// Set some default variables
	$uninit = array('post_attachment' => 0, 'poster_id' => $user->data['user_id'], 'enable_magic_url' => 0, 'topic_status' => 0, 'topic_type' => POST_NORMAL, 'post_subject' => '', 'topic_title' => '', 'post_time' => 0, 'post_edit_reason' => '', 'notify_set' => 0);
	foreach ($uninit as $var_name => $default_value)
	{
		if (!isset($main_data[$var_name]))
		{
			$main_data[$var_name] = $default_value;
		}
	}
	unset($uninit);

	$options = array('allow_' . $mode . '_icons' => 1, 'allow_' . $mode . '_checkboxes' => 2, 'allow_' . $mode . '_attachbox' => 3, 'allow_' . $mode . '_smilies' => 4);
	foreach ($options as $key => $value)
	{
		$config[$key] = ($config['allow_quick_' . $mode . '_options'] & 1 << $value) ? 1 : 0;

	}
	
	$bbcode_status	= ($config['allow_bbcode'] && $auth->acl_get('f_bbcode', $forum_id)) ? true : false;
	$smilies_status	= ($bbcode_status && $config['allow_smilies'] && $auth->acl_get('f_smilies', $forum_id)) ? true : false;
	$img_status		= ($bbcode_status && $auth->acl_get('f_img', $forum_id)) ? true : false;
	$url_status		= ($config['allow_post_links']) ? true : false;
	$flash_status	= ($bbcode_status && $auth->acl_get('f_flash', $forum_id) && $config['allow_post_flash']) ? true : false;
	$quote_status	= ($auth->acl_get('f_' . $mode, $forum_id)) ? true : false;

	if ($config['allow_' . $mode . '_smilies'])
	{
		generate_smilies('inline', $forum_id);
	}
	
	$s_topic_icons = false;
	if ($main_data['enable_icons'] && $auth->acl_get('f_icons', $forum_id) && $config['allow_' . $mode . '_icons'])
	{
		$s_topic_icons = posting_gen_topic_icons($mode, ($mode == 'reply') ? $main_data['icon_id'] : '');
	}

	$bbcode_checked		= ($config['allow_bbcode']) ? !$user->optionget('bbcode') : 1;
	$smilies_checked	= ($config['allow_smilies']) ? !$user->optionget('smilies') : 1;
	$urls_checked		= false;
	$sig_checked		= ($config['allow_sig'] && $user->optionget('attachsig')) ? true: false;
	$lock_topic_checked	= (isset($main_data['topic_status']) && $main_data['topic_status'] == ITEM_LOCKED) ? 1 : 0;

	// Check if user is watching this topic
	if ($mode != 'post' && $config['allow_topic_notify'] && $user->data['is_registered'])
	{
		$sql = 'SELECT topic_id
			FROM ' . TOPICS_WATCH_TABLE . '
			WHERE topic_id = ' . $topic_id . '
				AND user_id = ' . $user->data['user_id'];
		$result = $db->sql_query($sql);
		$main_data['notify_set'] = (int) $db->sql_fetchfield('topic_id');
		$db->sql_freeresult($result);
	}
	
	// If the user is replying or posting and not already watching this topic but set to always being notified we need to overwrite this setting
	$notify_set			= ($mode != 'edit' && $config['allow_topic_notify'] && $user->data['is_registered'] && !$main_data['notify_set']) ? $user->data['user_notify'] : $main_data['notify_set'];
	$notify_checked		= ($mode == 'post') ? $user->data['user_notify'] : $notify_set;

	// Action URL, include session_id for security purpose
	$s_action = append_sid("{$phpbb_root_path}posting.$phpEx", "mode=$mode&f=$forum_id", true, $user->session_id);
	$s_action .= (isset($topic_id) && $topic_id) ? "&t=$topic_id" : '';

	// Visual Confirmation
	$solved_captcha = false;

	if ($config['enable_post_confirm'] && !$user->data['is_registered'] && $solved_captcha === false && ($mode == 'post' || $mode == 'reply' || $mode == 'quote'))
	{
		// Show confirm image
		$sql = 'DELETE FROM ' . CONFIRM_TABLE . "
			WHERE session_id = '" . $db->sql_escape($user->session_id) . "'
				AND confirm_type = " . CONFIRM_POST;
		$db->sql_query($sql);

		// Generate code
		$code = gen_rand_string(mt_rand(5, 8));
		$confirm_id = md5(unique_id($user->ip));
		$seed = hexdec(substr(unique_id(), 4, 10));

		// compute $seed % 0x7fffffff
		$seed -= 0x7fffffff * floor($seed / 0x7fffffff);

		$sql = 'INSERT INTO ' . CONFIRM_TABLE . ' ' . $db->sql_build_array('INSERT', array(
			'confirm_id'	=> (string) $confirm_id,
			'session_id'	=> (string) $user->session_id,
			'confirm_type'	=> (int) CONFIRM_POST,
			'code'			=> (string) $code,
			'seed'			=> (int) $seed)
		);
		$db->sql_query($sql);

		$template->assign_vars(array(
			'S_CONFIRM_CODE'			=> true,
			'CONFIRM_ID'				=> $confirm_id,
			'CONFIRM_IMAGE'				=> '<img src="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=confirm&id=' . $confirm_id . '&type=' . CONFIRM_POST) . '" alt="" title="" />',
			'L_POST_CONFIRM_EXPLAIN'	=> sprintf($user->lang['POST_CONFIRM_EXPLAIN'], '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>'),
		));
	}

	$s_hidden_fields = ($mode == 'reply' || $mode == 'quote') ? '<input type="hidden" name="topic_cur_post_id" value="' . $main_data['topic_last_post_id'] . '" />' : '';
	$s_hidden_fields .= '<input type="hidden" name="lastclick" value="' . time() . '" />';

	// Add default subject
	$subject = '';
	if ($mode == 'reply')
	{
		$subject = ((strpos($main_data['topic_title'], 'Re: ') !== 0) ? 'Re: ' : '') . censor_text($main_data['topic_title']);
	}
	
	// Add form encoding type
	$form_enctype = (@ini_get('file_uploads') == '0' || strtolower(@ini_get('file_uploads')) == 'off' || @ini_get('file_uploads') == '0' || !$config['allow_attachments'] || !$auth->acl_get('u_attach') || !$auth->acl_get('f_attach', $forum_id)) ? '' : ' enctype="multipart/form-data"';

	// Attachment entry
	// Not using acl_gets here, because it is using OR logic
	$show_attach_box = false;
	if ($auth->acl_get('f_attach', $forum_id) && $auth->acl_get('u_attach') && $config['allow_attachments'] && $form_enctype && $config['allow_' . $mode . '_attachbox'])
	{
		$show_attach_box = true;
	}	

	$extra_options_display = ($config['allow_' . $mode . '_checkboxes']) ? 'show' : 'none';
	add_form_key('posting');

	// Send vars to template
        $sql = 'SELECT g.group_id, g.group_name, g.group_type
           FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . ' ug
           WHERE ug.user_id = '.(int) $post_data['poster_id'].'
              AND g.group_id = ug.group_id 
              AND g.group_type <> ' . GROUP_HIDDEN . '
              AND g.group_bgcolour <> \'\'
              AND ug.user_pending = 0
           ORDER BY g.group_type, g.group_name';
        $result = $db->sql_query($sql);

$group_options = '';
while ($row = $db->sql_fetchrow($result))
{
   $group_options .= '<option value="' . $row['group_id'] . '"' . (($row['group_id'] == $post_data['post_as_groupmember']) ? ' selected="selected"' : '') . '>' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
}
$db->sql_freeresult($result);
         
	$template->assign_vars(array(

		'QUICK_REPLY'			=> $quick_reply,
		'EXTRA_OPTIONS_DISPLAY'	=> $extra_options_display,
		'SUBJECT'				=> $subject,
		
		'SMILIES_STATUS'		=> ($smilies_status) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
		'BBCODE_STATUS'			=> ($bbcode_status) ? sprintf($user->lang['BBCODE_IS_ON'], '<a href="' . append_sid("{$phpbb_root_path}faq.$phpEx", 'mode=bbcode') . '">', '</a>') : sprintf($user->lang['BBCODE_IS_OFF'], '<a href="' . append_sid("{$phpbb_root_path}faq.$phpEx", 'mode=bbcode') . '">', '</a>'),
		'IMG_STATUS'			=> ($img_status) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],
		'FLASH_STATUS'			=> ($flash_status) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'],
		'SMILIES_STATUS'		=> ($smilies_status) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
		'URL_STATUS'			=> ($bbcode_status && $url_status) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'],
		
		'L_QUICK_REPLY'				=> $user->lang['QUICK_' . strtoupper($mode)],
		'L_ICON'					=> ($mode == 'reply') ? $user->lang['POST_ICON'] : $user->lang['TOPIC_ICON'],
		'L_MESSAGE_BODY_EXPLAIN'	=> (intval($config['max_post_chars'])) ? sprintf($user->lang['MESSAGE_BODY_EXPLAIN'], intval($config['max_post_chars'])) : '',
		
		'S_DISPLAY_USERNAME'		=> (!$user->data['is_registered']) ? true : false,	
		'S_SHOW_TOPIC_ICONS'		=> $s_topic_icons,
		'S_SMILIES_ALLOWED'			=> ($smilies_status && $config['allow_' . $mode . '_smilies']) ? true : false,
		'S_BBCODE_ALLOWED'			=> $bbcode_status,
		'S_BBCODE_CHECKED'			=> ($bbcode_checked) ? ' checked="checked"' : '',
		'S_SMILIES_ALLOWED'			=> $smilies_status,
		'S_SMILIES_CHECKED'			=> ($smilies_checked) ? ' checked="checked"' : '',
		'S_SIG_ALLOWED'				=> ($auth->acl_get('f_sigs', $forum_id) && $config['allow_sig'] && $user->data['is_registered']) ? true : false,
		'S_SIGNATURE_CHECKED'		=> ($sig_checked) ? ' checked="checked"' : '',
		'S_NOTIFY_ALLOWED'			=> (!$user->data['is_registered'] || !$config['allow_topic_notify'] || !$config['email_enable']) ? false : true,
		'S_NOTIFY_CHECKED'			=> ($notify_checked) ? ' checked="checked"' : '',
		'S_LOCK_TOPIC_ALLOWED'		=> (($mode == 'edit' || $mode == 'reply' || $mode == 'quote') && ($auth->acl_get('m_lock', $forum_id) || ($auth->acl_get('f_user_lock', $forum_id) && $user->data['is_registered'] && !empty($main_data['topic_poster']) && $user->data['user_id'] == $main_data['topic_poster'] && $main_data['topic_status'] == ITEM_UNLOCKED))) ? true : false,
		'S_LOCK_TOPIC_CHECKED'		=> ($lock_topic_checked) ? ' checked="checked"' : '',
		'S_LINKS_ALLOWED'			=> $url_status,
		'S_MAGIC_URL_CHECKED'		=> ($urls_checked) ? ' checked="checked"' : '',
		
		'S_BBCODE_IMG'			=> $img_status,
		'S_BBCODE_URL'			=> $url_status,
		'S_BBCODE_FLASH'		=> $flash_status,
		'S_BBCODE_QUOTE'		=> $quote_status,
		'S_SHOW_ATTACH_BOX'		=> $show_attach_box,
		'S_PRIVMSGS'			=> false,
                'USER_GROUPS'         => $group_options,
                'S_USER_GROUPS'         => ($group_options != '') ? true : false,


		'S_HIDDEN_FIELDS'		=> $s_hidden_fields,
		'S_FORM_ENCTYPE'		=> $form_enctype,
		'S_POST_ACTION'			=> $s_action )

	);
	
	// Build custom bbcodes array
	display_custom_bbcodes();
}
	
?>

Code: Select all

<script type="text/javascript">
// <![CDATA[
	function hide_qr(show)
	{
		dE('postform');
		dE('qr_showeditor_div');
		if (show && document.getElementById('qr_editor_div').style.display != 'none')
		{
			document.getElementsByName('message')[0].focus();
		}
		return true;
	}


	function init_qr()
	{
		dE('qr_showeditor_div');
		return true;
	}
	onload_functions.push('init_qr();');
	// ]]>
</script>
<noscript>
	<form method="post" action="{U_QR_ACTION}">
		<div class="panel" id="qr_ns_editor_div">
			<div class="inner"><span class="corners-top"><span></span></span>
				<div class="content">
					<h2>{L_QUICKREPLY}</h2>
					<fieldset class="fields1">
						<dl style="clear: left;">
							<dt><label for="subject">{L_SUBJECT}:</label></dt>
							<dd><input type="text" name="subject" id="subject-ns" size="45" maxlength="64" tabindex="2" value="{SUBJECT}" class="inputbox autowidth" /></dd>
						</dl>
					<div id="message-box-ns">
						<textarea style="height: 9em;" name="message" rows="7" cols="76" tabindex="3" class="inputbox"></textarea>
					</div>
					</fieldset>
					<fieldset class="submit-buttons">
						{S_FORM_TOKEN}
						{QR_HIDDEN_FIELDS}
						<input type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" class="button1" />&nbsp;
						<input type="submit" accesskey="f" tabindex="7" name="full_editor" value="{L_FULL_EDITOR}" class="button2" />&nbsp;
					</fieldset>
				</div>
			<span class="corners-bottom"><span></span></span></div>
		</div>
	</form>
</noscript>
<form id="postform" method="post" action="{S_POST_ACTION}" onsubmit="return checkForm(this);" name="postform"{S_FORM_ENCTYPE}>

	<div class="panel" id="postingbox">
		<div class="inner"><span class="corners-top"><span></span></span>
		
		<h3>{L_QUICK_REPLY}</h3>

	<fieldset class="fields1">
		<!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->

		<!-- IF S_SHOW_TOPIC_ICONS -->
		<dl>
			<dt><label for="icon">{L_ICON}:</label></dt>
			<dd>
				<label for="icon"><input type="radio" name="icon" id="icon" value="0" checked="checked" /> {L_NO_TOPIC_ICON}</label>
				<!-- BEGIN topic_icon --><label for="icon-{topic_icon.ICON_ID}"><input type="radio" name="icon" id="icon-{topic_icon.ICON_ID}" value="{topic_icon.ICON_ID}" {topic_icon.S_ICON_CHECKED} /><img src="{topic_icon.ICON_IMG}" width="{topic_icon.ICON_WIDTH}" height="{topic_icon.ICON_HEIGHT}" alt="" title="" /></label> <!-- END topic_icon -->
			</dd>
		</dl>
		<!-- ENDIF -->

		<!-- IF S_DISPLAY_USERNAME -->
		<dl>
			<dt><label for="username">{L_USERNAME}:</label></dt>
			<dd><input type="text" tabindex="1" name="username" id="username" size="25" value="{USERNAME}" class="inputbox" /></dd>
		</dl>
		<!-- ENDIF -->

		<!-- IF S_POST_ACTION -->
		<dl style="clear: left;">
			<dt><label for="subject">{L_SUBJECT}:</label></dt>
			<dd><input type="text" name="subject" id="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->60<!-- ELSE -->64<!-- ENDIF -->" tabindex="2" value="{SUBJECT}" class="inputbox autowidth" /></dd>
		</dl>
			<!-- IF S_CONFIRM_CODE -->
			<dl>
				<dt><label for="confirm_code">{L_CONFIRM_CODE}:</label><br /><span>{L_CONFIRM_CODE_EXPLAIN}</span></dt>
					<dd><input type="hidden" name="confirm_id" value="{CONFIRM_ID}" />{CONFIRM_IMAGE}</dd>
					<dd><input type="text" name="confirm_code" id="confirm_code" size="8" maxlength="8" tabindex="3" class="inputbox narrow" title="{L_CONFIRM_CODE}" /></dd>
			</dl>
			<!-- ENDIF -->
		<!-- ENDIF -->

		<!-- INCLUDE posting_buttons.html -->

		<div id="smiley-box">
			<!-- IF S_SMILIES_ALLOWED and .smiley -->
				<strong>{L_SMILIES}</strong><br />
				<!-- BEGIN smiley -->
					<a href="#" onclick="insert_text('{smiley.A_SMILEY_CODE}', true); return false;"><img src="{smiley.SMILEY_IMG}" width="{smiley.SMILEY_WIDTH}" height="{smiley.SMILEY_HEIGHT}" alt="{smiley.SMILEY_CODE}" title="{smiley.SMILEY_DESC}" /></a>
				<!-- END smiley -->
			<!-- ENDIF -->
			<!-- IF S_SHOW_SMILEY_LINK and S_SMILIES_ALLOWED-->
				<br /><a href="{U_MORE_SMILIES}" onclick="popup(this.href, 300, 350, '_phpbbsmilies'); return false;">{L_MORE_SMILIES}</a>
			<!-- ENDIF -->

			<!-- IF BBCODE_STATUS -->
			<!-- IF .smiley --><hr /><!-- ENDIF -->
			{BBCODE_STATUS}<br />
			<!-- IF S_BBCODE_ALLOWED -->
				{IMG_STATUS}<br />
				{FLASH_STATUS}<br />
				{URL_STATUS}<br />
				{SMILIES_STATUS}
			<!-- ENDIF -->
			<!-- ENDIF -->
		</div>

		<div id="message-box">
			<textarea <!-- IF S_UCP_ACTION -->name="signature" id="signature" style="height: 9em;"<!-- ELSE -->name="message" id="message"<!-- ENDIF --> rows="15" cols="76" tabindex="3" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" class="inputbox">{MESSAGE}</textarea>
		</div>
	</fieldset>

			<span class="corners-bottom"><span></span></span></div>
		</div>

		<!-- IF not S_SHOW_DRAFTS and not $SIG_EDIT eq 1 -->
		<div class="panel bg2">
			<div class="inner"><span class="corners-top"><span></span></span>
			<fieldset class="submit-buttons">
				{S_HIDDEN_FIELDS}
				<input type="submit" tabindex="5" name="preview" value="{L_PREVIEW}" class="button1" onclick="document.getElementById('postform').action += '#preview';" />&nbsp;
				<input type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" class="button1" />&nbsp;

				</fieldset>

			<span class="corners-bottom"><span></span></span></div>
		</div>
		<!-- ENDIF -->

		
		<!-- IF  not $SIG_EDIT eq 1 -->
			<div id="tabs">
				<ul>
					<li id="options-panel-tab" class="activetab" style="display: {EXTRA_OPTIONS_DISPLAY};"><a href="#tabs" onclick="subPanels('options-panel'); return false;"><span>{L_OPTIONS}</span></a></li>
					<!-- IF S_SHOW_ATTACH_BOX --><li id="attach-panel-tab" <!-- IF not EXTRA_OPTIONS -->class="activetab"<!-- ENDIF -->><a href="#tabs" onclick="subPanels('attach-panel'); return false;"><span>{L_ADD_ATTACHMENT}</span></a></li><!-- ENDIF -->
				</ul>
			</div>
		<!-- ENDIF -->

		<!-- IF not S_SHOW_DRAFTS and not $SIG_EDIT eq 1 -->
		<div class="panel bg3" id="options-panel" style="display: {EXTRA_OPTIONS_DISPLAY};">
			<div class="inner"><span class="corners-top"><span></span></span>

			<fieldset class="fields1">
				<!-- IF S_BBCODE_ALLOWED -->
					<div><label for="disable_bbcode"><input type="checkbox" name="disable_bbcode" id="disable_bbcode"{S_BBCODE_CHECKED} /> {L_DISABLE_BBCODE}</label></div>
				<!-- ENDIF -->
				<!-- IF S_SMILIES_ALLOWED -->
					<div><label for="disable_smilies"><input type="checkbox" name="disable_smilies" id="disable_smilies"{S_SMILIES_CHECKED} /> {L_DISABLE_SMILIES}</label></div>
				<!-- ENDIF -->
				<!-- IF S_LINKS_ALLOWED -->
					<div><label for="disable_magic_url"><input type="checkbox" name="disable_magic_url" id="disable_magic_url"{S_MAGIC_URL_CHECKED} /> {L_DISABLE_MAGIC_URL}</label></div>
				<!-- ENDIF -->
				<!-- IF S_SIG_ALLOWED -->
					<div><label for="attach_sig"><input type="checkbox" name="attach_sig" id="attach_sig"{S_SIGNATURE_CHECKED} /> {L_ATTACH_SIG}</label></div>
				<!-- ENDIF -->
				<!-- IF S_NOTIFY_ALLOWED -->
					<div><label for="notify"><input type="checkbox" name="notify" id="notify"{S_NOTIFY_CHECKED} /> {L_NOTIFY_REPLY}</label></div>
				<!-- ENDIF -->
				<!-- IF S_LOCK_TOPIC_ALLOWED -->
					<div><label for="lock_topic"><input type="checkbox" name="lock_topic" id="lock_topic"{S_LOCK_TOPIC_CHECKED} /> {L_LOCK_TOPIC}</label></div>
				<!-- ENDIF -->
				<!-- IF S_LOCK_POST_ALLOWED -->
					<div><label for="lock_post"><input type="checkbox" name="lock_post" id="lock_post"{S_LOCK_POST_CHECKED} /> {L_LOCK_POST} [{L_LOCK_POST_EXPLAIN}]</label></div>
				<!-- ENDIF -->

         <!-- IF S_USER_GROUPS -->
         <hr class="dashed" />
         <dl>
            <dt><label for="post_as_groupmember">{L_POST_AS_GROUPMEMBER} :</label></dt>
            <dd><label for="post_as_groupmember"><select name="post_as_groupmember" id="post_as_groupmember"><option value="0"></option>{USER_GROUPS}</select></label></dd>
            <dd>{L_POST_AS_GROUPMEMBER_EXPLAIN}</dd>
         </dl>
         <!-- ENDIF -->

				<!-- IF S_TYPE_TOGGLE or S_TOPIC_TYPE_ANNOUNCE or S_TOPIC_TYPE_STICKY -->
				<hr class="dashed" />
				<!-- ENDIF -->
			</fieldset>
			<!-- ENDIF -->

		<span class="corners-bottom"><span></span></span></div>

	</div>

	<!-- IF S_SHOW_ATTACH_BOX --><!-- INCLUDE posting_attach_body.html --><!-- ENDIF -->
	{S_FORM_TOKEN}
</form>

<!-- IF EXTRA_OPTIONS_DISPLAY eq 'show' -->
<script type="text/javascript">
// <![CDATA[
	subPanels(show_panel);
// ]]>
</script>
<!-- ENDIF -->
rxu
Extensions Development Team
Posts: 3467
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: Quick reply for phpBB3

Post by rxu »

Ah yes. For QR we can't use $post_data['poster_id'] of course. Try to edit SQL query in includes/quick_reply.php in this way:

Code: Select all

FIND
 WHERE ug.user_id = '.(int) $post_data['poster_id'].'

REPLACE WITH
 WHERE ug.user_id = '.(int) $user->data['user_id'].'
Last edited by rxu on Sun Jan 10, 2010 7:49 am, edited 1 time in total.
CMA
Registered User
Posts: 330
Joined: Mon Jun 02, 2003 4:15 pm
Location: Vancouver BC Canada
Contact:

Re: Quick reply for phpBB3

Post by CMA »

prefect... of course it works prefectly...

thank you very much for your time...
User avatar
Théonaute
Registered User
Posts: 341
Joined: Sun Jan 22, 2006 10:31 am

Re: Quick reply for phpBB3

Post by Théonaute »

rxu wrote:Ah yes. For QR we can't use $post_data['poster_id'] of course. Try to edit SQL query in includes/quick_reply.php in this way:

Code: Select all

FIND
 WHERE ug.user_id = '.(int) $post_data['poster_id'].'

REPLACE WITH
 WHERE ug.user_id = '.(int) $user->data['user_id'].'
You can't use $user->data here because if an admin or mod edit this post, he will see his own groups, not the post author's group...
This is why I use $post_data in my mod ;)
Théonaute | ex-MOD Team member on phpbb-fr.com
No more phpBB's activities. No MODs updates, no new MODs... Thanks.
rxu
Extensions Development Team
Posts: 3467
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: Quick reply for phpBB3

Post by rxu »

Théonaute wrote:You can't use $user->data here because if an admin or mod edit this post, he will see his own groups
There's nothing to do with post edit here, QR is just for posting ;) Unless I'm missing something in your MOD.
Locked

Return to “[3.0.x] MOD Database Releases”