Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: Teemu- on December 21, 2016, 02:38:33 PM

Title: Quick reply problem?
Post by: Teemu- on December 21, 2016, 02:38:33 PM
Hello, I installed just the beta version 2.1 (Beta 2)

I can not get a quick answer out of sight in any way. How should it be out?

I have tried the settings / Theme settings to get out of it, but did not succeed
Title: Re: Quick reply problem?
Post by: Kindred on December 21, 2016, 11:22:30 PM
It is no longer hideable
Title: Re: Quick reply problem?
Post by: Colin on December 22, 2016, 05:27:11 PM
Just for a bit of context, is their a certain reason why you would want to disable quick reply:

Design, functionality?

Title: Re: Quick reply problem?
Post by: w4rkr4f7 on December 29, 2016, 05:20:19 AM
Hello, I installed just the beta version 2.1 (Beta 2)

I can not get a quick answer out of sight in any way. How should it be out?

I have tried the settings / Theme settings to get out of it, but did not succeed

if you don't want it at all  open Themes/default/Display Template.php  and delete:

Code: [Select]
function template_quickreply()
{
global $context, $modSettings, $scripturl, $options, $txt;
echo '
<a id="quickreply"></a>
<div class="tborder" id="quickreplybox">
<div class="cat_bar">
<h3 class="catbg">
', $txt['quick_reply'], '
</h3>
</div>
<div id="quickReplyOptions">
<div class="roundframe">', empty($options['use_editor_quick_reply']) ? '
<p class="smalltext lefttext">' . $txt['quick_reply_desc'] . '</p>' : '', '
', $context['is_locked'] ? '<p class="alert smalltext">' . $txt['quick_reply_warning'] . '</p>' : '',
!empty($context['oldTopicError']) ? '<p class="alert smalltext">' . sprintf($txt['error_old_topic'], $modSettings['oldTopicDays']) . '</p>' : '', '
', $context['can_reply_approved'] ? '' : '<em>' . $txt['wait_for_approval'] . '</em>', '
', !$context['can_reply_approved'] && $context['require_verification'] ? '<br>' : '', '
<form action="', $scripturl, '?board=', $context['current_board'], ';action=post2" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" onsubmit="submitonce(this);">
<input type="hidden" name="topic" value="', $context['current_topic'], '">
<input type="hidden" name="subject" value="', $context['response_prefix'], $context['subject'], '">
<input type="hidden" name="icon" value="xx">
<input type="hidden" name="from_qr" value="1">
<input type="hidden" name="notify" value="', $context['is_marked_notify'] || !empty($options['auto_notify']) ? '1' : '0', '">
<input type="hidden" name="not_approved" value="', !$context['can_reply_approved'], '">
<input type="hidden" name="goback" value="', empty($options['return_to_post']) ? '0' : '1', '">
<input type="hidden" name="last_msg" value="', $context['topic_last_message'], '">
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
<input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '">';

// Guests just need more.
if ($context['user']['is_guest'])
echo '
<dl id="post_header">
<dt>
', $txt['name'], ':
</dt>
<dd>
<input type="text" name="guestname" size="25" value="', $context['name'], '" tabindex="', $context['tabindex']++, '" class="input_text">
</dd>
<dt>
', $txt['email'], ':
</dt>
<dd>
<input type="email" name="email" size="25" value="', $context['email'], '" tabindex="', $context['tabindex']++, '" class="input_text" required>
</dd>
</dl>';

echo '
', template_control_richedit($context['post_box_name'], 'smileyBox_message', 'bbcBox_message'), '
<script>
function insertQuoteFast(messageid)
{
if (window.XMLHttpRequest)
getXMLDocument(smf_prepareScriptUrl(smf_scripturl) + \'action=quotefast;quote=\' + messageid + \';xml;pb=', $context['post_box_name'], ';mode=\' + (oEditorHandle_', $context['post_box_name'], '.bRichTextEnabled ? 1 : 0), onDocReceived);
else
reqWin(smf_prepareScriptUrl(smf_scripturl) + \'action=quotefast;quote=\' + messageid + \';pb=', $context['post_box_name'], ';mode=\' + (oEditorHandle_', $context['post_box_name'], '.bRichTextEnabled ? 1 : 0), 240, 90);
return false;
}
function onDocReceived(XMLDoc)
{
var text = \'\';
for (var i = 0, n = XMLDoc.getElementsByTagName(\'quote\')[0].childNodes.length; i < n; i++)
text += XMLDoc.getElementsByTagName(\'quote\')[0].childNodes[i].nodeValue;
$("#', $context['post_box_name'], '").data("sceditor").InsertText(text);

ajax_indicator(false);
}
</script>';

// Is visual verification enabled?
if ($context['require_verification'])
{
echo '
<div class="post_verification">
<strong>', $txt['verification'], ':</strong>
', template_control_verification($context['visual_verification_id'], 'all'), '
</div>';
}

// Finally, the submit buttons.
echo '
<br class="clear_right">
<span id="post_confirm_buttons">
', template_control_richedit_buttons($context['post_box_name']), '
</span>';
echo '
</form>
</div>
</div>
</div>
<br class="clear">';

// draft autosave available and the user has it enabled?
if (!empty($context['drafts_autosave']))
echo '
<script>
var oDraftAutoSave = new smf_DraftAutoSave({
sSelf: \'oDraftAutoSave\',
sLastNote: \'draft_lastautosave\',
sLastID: \'id_draft\',', !empty($context['post_box_name']) ? '
sSceditorID: \'' . $context['post_box_name'] . '\',' : '', '
sType: \'', 'quick', '\',
iBoard: ', (empty($context['current_board']) ? 0 : $context['current_board']), ',
iFreq: ', (empty($modSettings['masterAutoSaveDraftsDelay']) ? 60000 : $modSettings['masterAutoSaveDraftsDelay'] * 1000), '
});
</script>';

if ($context['show_spellchecking'])
echo '
<form action="', $scripturl, '?action=spellcheck" method="post" accept-charset="', $context['character_set'], '" name="spell_form" id="spell_form" target="spellWindow"><input type="hidden" name="spellstring" value=""></form>';

echo '
<script>
var oQuickReply = new QuickReply({
bDefaultCollapsed: false,
iTopicId: ', $context['current_topic'], ',
iStart: ', $context['start'], ',
sScriptUrl: smf_scripturl,
sImagesUrl: smf_images_url,
sContainerId: "quickReplyOptions",
sImageId: "quickReplyExpand",
sClassCollapsed: "toggle_up",
sClassExpanded: "toggle_down",
sJumpAnchor: "quickreply",
bIsFull: true
});
var oEditorID = "', $context['post_box_name'], '";
var oEditorObject = oEditorHandle_', $context['post_box_name'], ';
var oJumpAnchor = "quickreply";
</script>';
}
Title: Re: Quick reply problem?
Post by: Arantor on December 29, 2016, 05:47:17 AM
If you delete the entire function things will break.
Title: Re: Quick reply problem?
Post by: w4rkr4f7 on December 29, 2016, 06:09:23 AM
then you can remove div only <div class="tborder" id="quickreplybox">


Code: [Select]
<div class="tborder" id="quickreplybox">
<div class="cat_bar">
<h3 class="catbg">
', $txt['quick_reply'], '
</h3>
</div>
<div id="quickReplyOptions">
<div class="roundframe">', empty($options['use_editor_quick_reply']) ? '
<p class="smalltext lefttext">' . $txt['quick_reply_desc'] . '</p>' : '', '
', $context['is_locked'] ? '<p class="alert smalltext">' . $txt['quick_reply_warning'] . '</p>' : '',
!empty($context['oldTopicError']) ? '<p class="alert smalltext">' . sprintf($txt['error_old_topic'], $modSettings['oldTopicDays']) . '</p>' : '', '
', $context['can_reply_approved'] ? '' : '<em>' . $txt['wait_for_approval'] . '</em>', '
', !$context['can_reply_approved'] && $context['require_verification'] ? '<br>' : '', '
<form action="', $scripturl, '?board=', $context['current_board'], ';action=post2" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" onsubmit="submitonce(this);">
<input type="hidden" name="topic" value="', $context['current_topic'], '">
<input type="hidden" name="subject" value="', $context['response_prefix'], $context['subject'], '">
<input type="hidden" name="icon" value="xx">
<input type="hidden" name="from_qr" value="1">
<input type="hidden" name="notify" value="', $context['is_marked_notify'] || !empty($options['auto_notify']) ? '1' : '0', '">
<input type="hidden" name="not_approved" value="', !$context['can_reply_approved'], '">
<input type="hidden" name="goback" value="', empty($options['return_to_post']) ? '0' : '1', '">
<input type="hidden" name="last_msg" value="', $context['topic_last_message'], '">
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
<input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '">';

// Guests just need more.
if ($context['user']['is_guest'])
echo '
<dl id="post_header">
<dt>
', $txt['name'], ':
</dt>
<dd>
<input type="text" name="guestname" size="25" value="', $context['name'], '" tabindex="', $context['tabindex']++, '" class="input_text">
</dd>
<dt>
', $txt['email'], ':
</dt>
<dd>
<input type="email" name="email" size="25" value="', $context['email'], '" tabindex="', $context['tabindex']++, '" class="input_text" required>
</dd>
</dl>';

echo '
', template_control_richedit($context['post_box_name'], 'smileyBox_message', 'bbcBox_message'), '
<script>
function insertQuoteFast(messageid)
{
if (window.XMLHttpRequest)
getXMLDocument(smf_prepareScriptUrl(smf_scripturl) + \'action=quotefast;quote=\' + messageid + \';xml;pb=', $context['post_box_name'], ';mode=\' + (oEditorHandle_', $context['post_box_name'], '.bRichTextEnabled ? 1 : 0), onDocReceived);
else
reqWin(smf_prepareScriptUrl(smf_scripturl) + \'action=quotefast;quote=\' + messageid + \';pb=', $context['post_box_name'], ';mode=\' + (oEditorHandle_', $context['post_box_name'], '.bRichTextEnabled ? 1 : 0), 240, 90);
return false;
}
function onDocReceived(XMLDoc)
{
var text = \'\';
for (var i = 0, n = XMLDoc.getElementsByTagName(\'quote\')[0].childNodes.length; i < n; i++)
text += XMLDoc.getElementsByTagName(\'quote\')[0].childNodes[i].nodeValue;
$("#', $context['post_box_name'], '").data("sceditor").InsertText(text);

ajax_indicator(false);
}
</script>';

// Is visual verification enabled?
if ($context['require_verification'])
{
echo '
<div class="post_verification">
<strong>', $txt['verification'], ':</strong>
', template_control_verification($context['visual_verification_id'], 'all'), '
</div>';
}

// Finally, the submit buttons.
echo '
<br class="clear_right">
<span id="post_confirm_buttons">
', template_control_richedit_buttons($context['post_box_name']), '
</span>';
echo '
</form>
</div>
</div>
</div>
Title: Re: Quick reply problem?
Post by: Arantor on December 29, 2016, 06:22:57 AM
I'm curious why you'd remove it at all, it's been shown repeatedly over the last decade of forum use to improve response rates and engagement of users.