ElementalWarrior wrote: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 thisCode: Select all
Now if you scroll down to the sectionCode: 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); } } } ?>
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).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, );
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.
I think it's because you set the mod in viewtopic_body.html searching the FIRST occurrence of {L_POST_REPLY}... instead of the second one.nlhma wrote:Thank you.
I did check the file, and it was set to false already. And my problem is that it shows up at the top but not at the bottom, its not as I suppose in the post that it was completely hidden.
Here is the image of my forum:
KellyBean wrote:That's because RC8 changed the way it does buttons
This is what the instructions said to add:
buttons.css:Here's how I modified it:Code: Select all
.quick-reply-icon, .quick-reply-icon a { background: transparent none 0 0 no-repeat; }
I did the same for colours.css.Code: Select all
.quick-reply-icon span { background: transparent none 0 0 no-repeat; }
Also, on view_topic.html
You need to change this:To this: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 -->
(thanks to karlsemple for the help and tips!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 -->
)
Thank you so much. I figure out that the first one is for the quick reply on top, and the second one is for it at the bottom.Cleori wrote:I think it's because you set the mod in viewtopic_body.html searching the FIRST occurrence of {L_POST_REPLY}... instead of the second one.nlhma wrote:Thank you.
I did check the file, and it was set to false already. And my problem is that it shows up at the top but not at the bottom, its not as I suppose in the post that it was completely hidden.
Here is the image of my forum:
The add part of this section applies on SECOND occurrence of that, near line 243 of file viewtopic_body.html
NOW, my own question:
I'd like the mod ALWAYS ACTIVE, i.e. the quick reply box ALWAYS SHOWN... I don't need any toggle for my users
Anyone can suggest me what should I have to modify?
I try just to comment the javascript functions... and didn't worked...
Thank you
Smilies add-on is in the same downloaded zip file... "contrib" foldernlhma wrote:One more question. I do not allow guest posting, so could anyone show me how to disable the quick reply for guest? And also, if possible, could anyone show me how to have smilies and other functions on quick reply?
Thank you!
Thanks. That worked for me, too.Remor wrote:With this mod quick reply work on my forum gold 3.0.0