Page 25 of 150

Re: Evil Quick Reply

Posted: Sat Jan 05, 2008 8:58 pm
by cunyalen

Re: Evil Quick Reply

Posted: Sat Jan 05, 2008 9:14 pm
by swbfguy
lifeguard81 wrote:
Kreton wrote:
akazihaha wrote:Let's see my problem though this pic ^^Image
I got the same problem :(
I've got this problem to..

What can i do?

this is what you put in viewtopic_body.html (i think anyway, at least for the prosilver style)

Code: Select all

<!-- IF S_QR_ENABLED --><div class="quick-reply-icon"><a href="javascript:toggle_quick_reply();"><span>{L_QUICK_REPLY}</span></a></div><!-- ENDIF -->
just change it to this:

Code: Select all

><!-- IF S_QR_ENABLED --><div class="quick-reply-icon"><a href="javascript:toggle_quick_reply();" title="{L_QUICK_REPLY}"><span></span>{L_QUICK_REPLY}</a></div><!-- ENDIF -->

Re: Evil Quick Reply

Posted: Sun Jan 06, 2008 2:11 am
by akazihaha
To thienlong008: after follow your code, i got this, a little bad about space and an error occur. Giup em fix voi anh oi
Image

Re: Evil Quick Reply

Posted: Sun Jan 06, 2008 6:18 am
by =alex=
Hi Ive installed this mod but I cant see the quick reply button or anything for that matter :?: i refreshed everything so im outa ideas lol im using vistaX (subsilver based) and phpbb3 and yes i followed the right instructions ;)

Re: Evil Quick Reply

Posted: Sun Jan 06, 2008 7:23 am
by danmax
danmax wrote:
thienlong008 wrote:
Okie. Edit files as guidance in install.xml (in \evil_quick_reply_1_0_0c\contrib\addons\smilies_bbcodes) but in posting_qr_body.html I use this code(Replace all code after </script> with this-and - this support subsilver themes or another like them , not support prosilver themes):

Code: Select all

<div id="quick_reply">
	<form action="{S_QR_POST_ACTION}" method="post" name="postform">
		<table class="tablebg" width="100%" cellspacing="1">
    	<tr>
			<th colspan="2">{L_QUICK_REPLY}</th>
		</tr>
		<!-- IF S_QR_SUBJECT -->
		<tr>
            <td class="row1" width="18%"><b class="genmed">{L_SUBJECT}:</b></td>
			<td class="row2" align="left" valign="middle" colspan="2" width="82%"><input class="post" type="text" name="subject" size="45" maxlength="64" tabindex="1" value="{QR_SUBJECT}" style="width: 90%;" /></td>
		</tr>
		<!-- ENDIF -->
		<tr>
            <td class="row1" valign="top" id="smiley-box"><b class="genmed">{L_MESSAGE_BODY}:</b><br /><span class="gensmall">Enter text content here.&nbsp;</span><br /><br />
	            <!-- IF S_SMILIES_ALLOWED -->
		            <table width="100%" cellspacing="5" cellpadding="0" border="0" align="center">
		                <tr>
			                <td class="gensmall" align="center"><b>{L_SMILIES}</b></td>
		                </tr>
		                <tr>
			                <td align="justify">
                                <!-- IF S_SMILIES_ALLOWED and .smiley -->
					                    <!-- BEGIN smiley -->
						                    <a href="#message" 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 -->
			                </td>
		                </tr>

		            </table>
	            <!-- ENDIF -->
	        </td>
            <td class="row1">
            <script type="text/javascript">
		// <![CDATA[
			var form_name = 'postform';
			var text_name = 'message';
		// ]]>
		</script>
            <table width="100%" cellspacing="0" cellpadding="0" border="0">
            <!-- INCLUDE posting_buttons.html -->
            <tr>

                <td class="row1" align="left" valign="middle" colspan="2"> <textarea class="post" name="message" id="message" rows="15" cols="76" tabindex="2" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" style="width: 100%; height: 150px;"></textarea> </td>
                <!-- IF S_BBCODE_ALLOWED -->
			<td width="80" align="center" valign="top">
				<script type="text/javascript">
				// <![CDATA[
					colorPalette('v', 7, 6)
				// ]]>
				</script>
			</td>
			<!-- ENDIF -->
            </tr>
            </table>
            </td>
		</tr>
		<!-- IF S_QR_RESIZE -->
		<tr>
			<td class="row2" colspan="2">
				<input type="button" value=" + " class="btnlite" onclick="textbox_resize(100);" />
				<input type="button" value=" - " class="btnlite" onclick="textbox_resize(-100);" />
			</td>
		</tr>
		<!-- ENDIF -->
		<!-- IF not S_USER_LOGGED_IN -->
		<tr>
			<td class="row1" width="15%"><label for="username"><b class="genmed">{L_USERNAME}: </b></label></td>
			<td class="row2" valign="middle"><input type="text" style="width: 300px" class="post" name="username" id="username" size="30" tabindex="3" /></td>
		</tr>
		<!-- IF S_CONFIRM_CODE -->
		<tr>
			<td class="row1"><label for="confirm_code"><b class="genmed">{L_CONFIRM_CODE}: </b></label></td>
			<td class="row2">
				{CONFIRM_IMAGE}<br clear="all" /><br />
				<input type="hidden" name="confirm_id" value="{CONFIRM_ID}" />
				<input class="post" type="text" name="confirm_code" id="confirm_code" size="8" maxlength="8" tabindex="4" />
			</td>
		</tr>
		<!-- ENDIF -->
		<!-- ENDIF -->
		<tr>
			<td class="cat" align="center" colspan="2">
				{S_QR_HIDDEN_FIELDS}
				<input type="submit" name="preview" tabindex="6" value="{L_PREVIEW}" class="btnlite" />&nbsp;&nbsp;
				<input type="submit" name="post" tabindex="5" value="{L_SUBMIT}" class="btnmain" accesskey="s" />
			</td>
		</tr>
		</table>
	{S_FORM_TOKEN}
	</form>
</div>
QR is working fine for me in 3.0.0 subsilver2 using this tip from thienlong008 (many thanks). Here's what it looks like. I would however like to make the text box side of the view larger, and the smilie side of the box smaller (you can see how the Tip under the bbcode is chopped). Any suggestions?

And always thanks!
Image
Our forum members are really digging this mod just the way it is, but I'd like to bump this post to see if somebody might could take a look at my image of QR and make some suggestions on how to change the look just a little bit. Thanks again folks!

Re: Evil Quick Reply

Posted: Sun Jan 06, 2008 9:44 am
by ElementalWarrior
akazihaha, post your posting_qr_body.html and I can fix your spacing problem, I'll look around for your error, but im not making any promises.

Re: Evil Quick Reply

Posted: Sun Jan 06, 2008 10:04 am
by danmax
ElementalWarrior wrote:akazihaha, post your posting_qr_body.html and I can fix your spacing problem, I'll look around for your error, but im not making any promises.
Great! Many thanks for the offer of help Elemental. It is now 2:00 AM here in CA, but if you're up for it I'll post back tomorrow with my code when I am more capable. Most appreciated..........

Re: Evil Quick Reply

Posted: Sun Jan 06, 2008 1:20 pm
by PHX_Golden
Hi, thx for your work but i uninstall this MOD, when a topic is close, you can see "Quick reply".
Moreover, there is a problem with the text over the image (see below).

Why this mod is validated/released ??? :roll:

Re: Evil Quick Reply

Posted: Sun Jan 06, 2008 1:49 pm
by ChriZathens
PHX_Golden wrote:Hi, thx for your work but i uninstall this MOD, when a topic is close, you can see "Quick reply".
Moreover, there is a problem with the text over the image (see below).

Why this mod is validated/released ??? :roll:
If you browse through recent pages in this topic you will find the solution for the text over the image...
If you are admin you can use quick reply even if the topic is locked. But for this also you will find a solution in this topic.
Read this topic and you will finally get this working great and as you want it..

Re: Evil Quick Reply

Posted: Sun Jan 06, 2008 3:37 pm
by theem
theem wrote:Image

Why am I having 2 images of quick reply...

forum link :
http://www.pakspot.info/forums


Can any one help me out ? :o
i have cleared my acp caches but didn't worked ? :?

Re: Evil Quick Reply

Posted: Sun Jan 06, 2008 4:12 pm
by PHX_Golden
ChriZathens wrote:
PHX_Golden wrote:Hi, thx for your work but i uninstall this MOD, when a topic is close, you can see "Quick reply".
Moreover, there is a problem with the text over the image (see below).

Why this mod is validated/released ??? :roll:
If you browse through recent pages in this topic you will find the solution for the text over the image...
If you are admin you can use quick reply even if the topic is locked. But for this also you will find a solution in this topic.
Read this topic and you will finally get this working great and as you want it..
Ok thank's
But prefer waiting for the futur version. The purpose of a MOD is to do quickly a modification :?

Re: Evil Quick Reply

Posted: Sun Jan 06, 2008 5:09 pm
by senne
HishamAbu wrote:
senne wrote:is it possible to remove the button and make quick reply permanent?
I second this. It would save me having to make different buttons for different skins/styles.

Kind regards
Indeed, but im afraid we have to search for another mod who supports sthis

Re: Evil Quick Reply

Posted: Sun Jan 06, 2008 7:42 pm
by mvf4s
HishamAbu wrote:
senne wrote:is it possible to remove the button and make quick reply permanent?
I second this. It would save me having to make different buttons for different skins/styles.

Kind regards
Yeah I'm not sure if this is a Quick reply since you have to click a button to reply, just like the standard reply button.

Re: Evil Quick Reply

Posted: Sun Jan 06, 2008 8:52 pm
by ElementalWarrior
Ahh but you see it is, you can make it so that the quick reply box stays open, you can theoretically keep the box open and remove the button. Give me a minute to find the file and the appropiate changes.

Re: Evil Quick Reply

Posted: Sun Jan 06, 2008 9:05 pm
by ElementalWarrior
Ok I found the section of code that is the quickreply, its in (go figure) phpbbroot/includes/functions_quick_reply.php . Now if you open that up you'll see something resembling this

Code: Select all

<?php
/**
 * Evil quick reply
 *
 * @package	phpBB3
 * @version 1.0.0
 * @copyright (c) 2007 eviL3
 * @license	http://opensource.org/licenses/gpl-license.php GNU Public License
 *
 */

// Security check (better be safe than sorry, allthough no code is executed anyway)
if (!defined('IN_PHPBB'))
{
	exit;
}

// Only include once... this will actually work :D
if (function_exists('quick_reply'))
{
	return;
}

/**
 * This function will load everything needed for the evil quick reply
 *
 * @param int $topic_id
 * @param int $forum_id
 * @param array $topic_data
 */
function quick_reply($topic_id, $forum_id, &$topic_data)
{
	global $template, $user, $auth, $db;
	global $phpbb_root_path, $phpEx, $config;

	// Some little config for the quick reply, allows the admin to change these default values through the database.
	$qr_config = array(
		// Disable it easily
		'enabled'			=> isset($config['evil_qr_enabled']) ? $config['evil_quick_reply'] : true,
		// Do you want the subject line to be displayed
		'display_subject'	=> isset($config['evil_qr_display_subject']) ? $config['evil_qr_display_subject'] : true,
		// Shall the box be hidden on pageload?
		'hide_box'			=> isset($config['evil_qr_hide_box']) ? $config['evil_qr_hide_box'] : false,
		// Display the buttons to resize the textarea?
		'resize'			=> isset($config['evil_qr_resize']) ? $config['evil_qr_resize'] : true,
		// Displays BBcode tags
		'bbcodes'			=> isset($config['evil_qr_bbcodes']) ? $config['evil_qr_bbcodes'] : true,
		// Displays Smilies
		'smilies'			=> isset($config['evil_qr_smilies']) ? $config['evil_qr_smilies'] : true,
	);

	// Check if user has reply permissions for this forum or the topic is locked
	if (!$auth->acl_get('f_reply', $forum_id) || ($topic_data['topic_status'] == ITEM_LOCKED && !$auth->acl_get('m_lock', $forum_id)) || !$qr_config['enabled'])
	{
		return;
	}

	// Hidden fields
	$s_hidden_fields = array(
		't'			=> $topic_id,
		'f'			=> $forum_id,
		'mode'		=> 'reply',
		'lastclick'	=> time(),
		'icon'		=> 0,
	);

	// Set preferences such as allow smilies, bbcode, attachsig
	$reply_prefs = array(
		'disable_bbcode'	=> ($config['allow_bbcode'] && $user->optionget('bbcode')) ? false : true,
		'disable_smilies'	=> ($config['allow_smilies'] && $user->optionget('smilies')) ? false : true,
		'disable_magic_url'	=> false,
		'attach_sig'		=> ($config['allow_sig'] && $user->optionget('attachsig')) ? true: false,
		'notify'			=> ($config['allow_topic_notify'] && ($user->data['user_notify'] || isset($topic_data['notify_status']))) ? true : false,
		'lock_topic'		=> ($topic_data['topic_status'] == ITEM_LOCKED && $auth->acl_get('m_lock', $forum_id)) ? true : false,
		// Displays BBcode tags
		'bbcodes'			=> isset($config['evil_qr_bbcodes']) ? $config['evil_qr_bbcodes'] : true,
		// Displays Smilies
		'smilies'			=> isset($config['evil_qr_smilies']) ? $config['evil_qr_smilies'] : true,
	);

	foreach ($reply_prefs as $name => $value)
	{
		if ($value)
		{
			$s_hidden_fields[$name] = 1;
		}
	}

	$subject = ((strpos($topic_data['topic_title'], 'Re: ') !== 0) ? 'Re: ' : '') . censor_text($topic_data['topic_title']);

	if (!$qr_config['display_subject'])
	{
		$s_hidden_fields['subject'] = $subject;
		$subject = '';
	}

	// Confirmation code handling (stolen from posting.php)
	if ($config['enable_post_confirm'] && !$user->data['is_registered'])
	{
		// 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="" />',
		));
	}

	// new RC6 stuff
	add_form_key('posting');

	// Page title & action URL, include session_id for security purpose
	$s_action = append_sid("{$phpbb_root_path}posting.$phpEx", false, true, $user->session_id);

	// Assign template variables
	$template->assign_vars(array(
		'QR_SUBJECT'			=> $subject,

		'S_QR_HIDDEN_FIELDS'	=> build_hidden_fields($s_hidden_fields),
		'S_QR_POST_ACTION'		=> $s_action,

		'S_QR_ENABLED'			=> $qr_config['enabled'], // this is true anyway :P
		'S_QR_SUBJECT'			=> $qr_config['display_subject'],
		'S_QR_HIDE_BOX'			=> $qr_config['hide_box'],
		'S_QR_RESIZE'			=> $qr_config['resize'],
		// Displays BBcode tags
		'S_QR_BBCODES'			=> $qr_config['bbcodes'],
		// Displays Smilies
		'S_QR_SMILIES'			=> $qr_config['smilies'],
	));
	if ($qr_config['smilies'] || $qr_config['bbcodes'])
	{
		$user->add_lang('posting');
		
		if ($qr_config['smilies'])
		{
			include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
			
			generate_smilies('inline', $forum_id);
			$template->assign_var('S_SMILIES_ALLOWED', true);
		}
		
		if ($qr_config['bbcodes'])
		{
			$template->assign_var('S_BBCODE_ALLOWED', true);
		}
	}

}

?>
Now if you scroll down to the section

Code: Select all

$qr_config = array(
		// Disable it easily
		'enabled'			=> isset($config['evil_qr_enabled']) ? $config['evil_quick_reply'] : true,
		// Do you want the subject line to be displayed
		'display_subject'	=> isset($config['evil_qr_display_subject']) ? $config['evil_qr_display_subject'] : true,
		// Shall the box be hidden on pageload?
		'hide_box'			=> isset($config['evil_qr_hide_box']) ? $config['evil_qr_hide_box'] : false,
		// Display the buttons to resize the textarea?
		'resize'			=> isset($config['evil_qr_resize']) ? $config['evil_qr_resize'] : true,
		// Displays BBcode tags
		'bbcodes'			=> isset($config['evil_qr_bbcodes']) ? $config['evil_qr_bbcodes'] : true,
		// Displays Smilies
		'smilies'			=> isset($config['evil_qr_smilies']) ? $config['evil_qr_smilies'] : true,
	);
you can see that tehre is a comment above 'hide_box' that says 'Shall the box be hidden on page load.' In mine it is set to false because I had already changed it to be opened at page load, but when you install the mod it is originally set to true, simply erase 'true' and replace it with 'false' (no quotes).

Now when I was installing QR I ran into a problem with acually getting it to show up in my theme. (AcidTech) which is a subsilver2 based style. The problem was it didn't have a button. So I made one to match my Theme and I set in the imageset.cfg in phpbbroot/styles/acidtech/imageset/en/ . All I had to do was to add img_button_quick_reply = button_quick_reply.gif*20*103 to the bottom. Now if you want to remove the button and make the box permenent all you have to do is remove the img_button_quick_reply = button_quick_reply.gif*20*103 (or whatever the image link is in the file) and refresh the imageset and you should have no button, whether the text stays there I have to check. I'll post either way.