When user choose to se latest post on top, quick reply should go on top to....

Started by henrik1782, February 01, 2011, 08:57:44 AM

Previous topic - Next topic

henrik1782

Hi...

Running SMF 2.0 RC4 curve theme.

When quick reply is enabled and user choose to se newest post in top, it should be possible to change the place of quick reply to go on top to. Other wise it make no sense.

I would appreciate if soneone can make a mod for this.

Best regards
Henrik Poulsen
My favorite mods: Forum Firewall, httBL, MessagePreviewOnHover, BoardHover Mod, VB Style Board Index, Separate Replies and Views Column, Realtime clock by Joker, ENotify, Topic Solved.

Joker™

Ok so accomplish what you have asked for go to,

Make backup of file before editing it


themes\default\Display.template.php

Find:
<a id="msg', $message['id'], '"></a>', $message['first_new'] ? '<a id="new"></a>' : '';



Add After:
if ($context['can_reply'] && !empty($options['display_quick_reply']) && !empty($options['view_newest_first']))
{
echo '
<a id="quickreply"></a>
<div class="tborder" id="quickreplybox">
<div class="cat_bar">
<h3 class="catbg">
<span class="ie6_header floatleft"><a href="javascript:oQuickReply.swap();">
<img src="', $settings['images_url'], '/', $options['display_quick_reply'] == 2 ? 'collapse' : 'expand', '.gif" alt="+" id="quickReplyExpand" class="icon" />
</a>
<a href="javascript:oQuickReply.swap();">', $txt['quick_reply'], '</a>
</span>
</h3>
</div>
<div id="quickReplyOptions"', $options['display_quick_reply'] == 2 ? '' : ' style="display: none"', '>
<span class="upperframe"><span></span></span>
<div class="roundframe">
<p class="smalltext lefttext">', $txt['quick_reply_desc'], '</p>
', $context['is_locked'] ? '<p class="alert smalltext">' . $txt['quick_reply_warning'] . '</p>' : '',
$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);" style="margin: 0;">
<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 '
<strong>', $txt['name'], ':</strong> <input type="text" name="guestname" value="', $context['name'], '" size="25" class="input_text" tabindex="', $context['tabindex']++, '" />
<strong>', $txt['email'], ':</strong> <input type="text" name="email" value="', $context['email'], '" size="25" class="input_text" tabindex="', $context['tabindex']++, '" /><br />';

// Is visual verification enabled?
if ($context['require_verification'])
echo '
<strong>', $txt['verification'], ':</strong>', template_control_verification($context['visual_verification_id'], 'quick_reply'), '<br />';

echo '
<div class="quickReplyContent">
<textarea cols="75" rows="7" style="', $context['browser']['is_ie8'] ? 'max-width: 100%; min-width: 100%' : 'width: 100%', '; height: 100px;" name="message" tabindex="', $context['tabindex']++, '"></textarea>
</div>
<div class="righttext padding">
<input type="submit" name="post" value="', $txt['post'], '" onclick="return submitThisOnce(this);" accesskey="s" tabindex="', $context['tabindex']++, '" class="button_submit" />
<input type="submit" name="preview" value="', $txt['preview'], '" onclick="return submitThisOnce(this);" accesskey="p" tabindex="', $context['tabindex']++, '" class="button_submit" />';

if ($context['show_spellchecking'])
echo '
<input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'postmodify\', \'message\');" tabindex="', $context['tabindex']++, '" class="button_submit" />';

echo '
</div>
</form>
</div>
<span class="lowerframe"><span></span></span>
</div>
</div><br />';
}





Find:
if ($context['can_reply'] && !empty($options['display_quick_reply']))



Replace it with:
if ($context['can_reply'] && !empty($options['display_quick_reply']) && empty($options['view_newest_first']))
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

henrik1782

Hi Joker ...

Thanks a lot... this is excellent work and just what I wanted ;D

Best regards
Henrik Poulsen

My favorite mods: Forum Firewall, httBL, MessagePreviewOnHover, BoardHover Mod, VB Style Board Index, Separate Replies and Views Column, Realtime clock by Joker, ENotify, Topic Solved.

Joker™

Your welcome, I personally don't feel like converting this as a mod, but if you want I can convert it into a mod package.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

henrik1782

My favorite mods: Forum Firewall, httBL, MessagePreviewOnHover, BoardHover Mod, VB Style Board Index, Separate Replies and Views Column, Realtime clock by Joker, ENotify, Topic Solved.

Joker™

How about a option for admins to enable or disable this mod from admin panel?
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Joker™

I've submitted the mod with some changed. Once it is approved you can see it here.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

henrik1782

Hi Joker ...

Dont know if you have implementet the admin enable/disable, but I think that would be much appreciated.

My favorite mods: Forum Firewall, httBL, MessagePreviewOnHover, BoardHover Mod, VB Style Board Index, Separate Replies and Views Column, Realtime clock by Joker, ENotify, Topic Solved.

Joker™

Quote from: henrik1782 on February 02, 2011, 03:51:29 AM
Hi Joker ...

Dont know if you have implementet the admin enable/disable, but I think that would be much appreciated.
Just wait and test the mod when it is approved ;). Thanks for the idea.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Advertisement: