News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

SMF 2.1. Replace the "Quick edit" button with "Modify".

Started by User2, January 20, 2023, 09:08:56 AM

Previous topic - Next topic

Random Username

I must be doing something wrong. Currently no reply opens automatically but the buttons for quick reply are replaced as described. Presently you have to click reply to open up the dialogue and then another click to open the attachment dialogue.

Random Username

Seems like now I saw what I thought was a javascript action to open the attachment window somewhere.... If I could add that to the quick reply javascript section in display.template.php, would that not achieve the goal?

Sir Osis of Liver

OP wanted to remove Quick Reply, the mod does that.  He also wanted to remove Quick Edit and replace it with Modify, the code does that.  I don't believe there's any way to uncollapse "Attachments and other options" in 2.1, would require a code edit.  You can try it here -

Post.template.php


// If the admin has enabled the hiding of the additional options - show a link and image for it.
if (!empty($modSettings['additional_options_collapsable']))
echo '
<div id="post_additional_options_header">
<strong><a href="#" id="postMoreExpandLink"> ', $context['can_post_attachment'] ? $txt['post_additionalopt_attach'] : $txt['post_additionalopt'], '</a></strong>
</div>';

echo '
<div id="post_additional_options">';

// Display the checkboxes for all the standard options - if they are available to the user!


If there is a setting, I can't find it.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Random Username


Kindred

As i already said,  You will not be able to easily put the full editor into the quick reply location.

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Random Username

Thank you, Kindred. I'll pay my developer to do it, maybe.

Sesquipedalian

@Random Username, this isn't exactly what you are asking for, but it may be of interest. It was created in response to the same request from a few other users, and those who have used it have been satisfied with it as a solution.
https://custom.simplemachines.org/index.php?mod=4313
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Sir Osis of Liver

Just getting back to this.  To keep attachments and other options uncollapsed -

Post.template.php


/// If the admin has enabled the hiding of the additional options - show a link and image for it.
$modSettings['additional_options_collapsable'] = null;
if (!empty($modSettings['additional_options_collapsable']))
echo '
<div id="post_additional_options_header">
<strong><a href="#" id="postMoreExpandLink"> ', $context['can_post_attachment'] ? $txt['post_additionalopt_attach'] : $txt['post_additionalopt'], '</a></strong>
</div>';

echo '
<div id="post_additional_options">';

// Display the checkboxes for all the standard options - if they are available to the user!



Bit of a hack, but it's simple and works.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Random Username


Random Username

Or maybe it is working. I do not have quick reply showing up. I have the modify button on the quick buttons instead of quick edit and if I hit reply the attachments options are there. I assume this is what I just changed. I'm just greedy. I want the post reply with attachments to show up without having to hit reply. Like quick reply was but with the attachment options.

It comes down to this. I want to encourage posting attachments as much as possible. If it could upload for them, I'd do that. ;)

@Sesquipedalian Thank you. Unfortunately that mod would not install for me.

Sir Osis of Liver

If you want to simplify the ui and encourage members to post attachments, remove quick reply with the mod, replace quick edit with modify, and edit post template to always show attachments uncollapsed.  That's the simplest way to do it, and simplest way for members to use it.  Some members will not even know quick reply exists if they have to scroll down after last post to find it.  You can also remove the other options and shortcuts, which aren't especially useful to most members (I never use them). 
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Random Username


Sir Osis of Liver

They're in Post.template.php -


// Display the checkboxes for all the standard options - if they are available to the user!
echo '
<div id="post_settings" class="smalltext">
<ul class="post_options">
', $context['can_notify'] ? '<li><input type="hidden" name="notify" value="0"><label for="check_notify"><input type="checkbox" name="notify" id="check_notify"' . ($context['notify'] || !empty($options['auto_notify']) || $context['auto_notify'] ? ' checked' : '') . ' value="1"> ' . $txt['notify_replies'] . '</label></li>' : '', '
', $context['can_lock'] ? '<li><input type="hidden" name="already_locked" value="' . $context['already_locked'] . '"><input type="hidden" name="lock" value="0"><label for="check_lock"><input type="checkbox" name="lock" id="check_lock"' . ($context['locked'] ? ' checked' : '') . ' value="1"> ' . $txt['lock_topic'] . '</label></li>' : '', '
<li><label for="check_back"><input type="checkbox" name="goback" id="check_back"' . ($context['back_to_topic'] || !empty($options['return_to_post']) ? ' checked' : '') . ' value="1"> ' . $txt['back_to_topic'] . '</label></li>
', $context['can_sticky'] ? '<li><input type="hidden" name="already_sticky" value="' . $context['already_sticky'] . '"><input type="hidden" name="sticky" value="0"><label for="check_sticky"><input type="checkbox" name="sticky" id="check_sticky"' . ($context['sticky'] ? ' checked' : '') . ' value="1"> ' . $txt['sticky_after_posting'] . '</label></li>' : '', '
<li><label for="check_smileys"><input type="checkbox" name="ns" id="check_smileys"', $context['use_smileys'] ? '' : ' checked', ' value="NS"> ', $txt['dont_use_smileys'], '</label></li>', '
', $context['can_move'] ? '<li><input type="hidden" name="move" value="0"><label for="check_move"><input type="checkbox" name="move" id="check_move" value="1"' . (!empty($context['move']) ? ' checked" ' : '') . '> ' . $txt['move_after_posting'] . '</label></li>' : '', '
', $context['can_announce'] && $context['is_first_post'] ? '<li><label for="check_announce"><input type="checkbox" name="announce_topic" id="check_announce" value="1"' . (!empty($context['announce']) ? ' checked' : '') . '> ' . $txt['announce_topic'] . '</label></li>' : '', '
', $context['show_approval'] ? '<li><label for="approve"><input type="checkbox" name="approve" id="approve" value="2"' . ($context['show_approval'] === 2 ? ' checked' : '') . '> ' . $txt['approve_this_post'] . '</label></li>' : '', '
</ul>
</div><!-- #post_settings -->';




Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Random Username

Thank you, Sir. Great stuff. Still love to have the reply window open by default if a solution comes to you! ;)

 ;D

Sir Osis of Liver

Which reply window?  Quick reply is open by default, but we're removing that.  You can only get to post editor using reply button.  If you tried to replace quick edit with the full post editor, I think some people would have problems finding it.  You have to bear in mind that a page will display differently in different browsers, on different monitors with different screen resolutions, and on mobile devices.  If you do too much cutting and patching the result may look fine to you, but may be unuseable to others.  Can also cause problems with future updates.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Random Username

I'd be fine with quick reply if it was open with attachment options by default.

Kindred

but that's the thing --  the attachment code is "heavy" - which is why it's only loaded in the main post/reply screen.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Random Username

Kindred, I understand but my needs are different. I will have enough server capacity to handle it. And this is minor compared to other heavy stuff I'm doing.

Kindred

Your needs are mostly irrelevant to the situation - It's not a SERVER heavy thing -- it's a CLIENT heavy thing.

believe me when I say: There is a reason why the attachments is not part of the quick reply box.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sesquipedalian

Quote from: Random Username on January 25, 2023, 02:16:20 PM@Sesquipedalian Thank you. Unfortunately that mod would not install for me.

That's very strange to hear. The mod uses only integration hooks, so the only way it could fail to install would be if you have messed up file permissions. Check those and try again.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Advertisement: