News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

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

User2

SMF 2.1.3.
How to make the "Modify" button appear instead of the "QUICK EDIT" button. I don't need the "QUICK EDIT" button at all.


Sir Osis of Liver

Yes, he did.  Steve recommended posting in coding.

Shouldn't be too difficult, will have a look soon as I get a chance, if someone else doesn't get to it first.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

Display.php


$output['quickbuttons'] = array(
'quote' => array(
'label' => $txt['quote_action'],
'href' => $scripturl.'?action=post;quote='.$output['id'].';topic='.$context['current_topic'], '.'.$context['start'].';last_msg='.$context['topic_last_message'],
'javascript' => 'onclick="return oQuickReply.quote('.$output['id'].');"',
'icon' => 'quote',
'show' => $context['can_quote']
),
'quote_selected' => array(
'label' => $txt['quote_selected_action'],
'id' => 'quoteSelected_'. $output['id'],
'href' => 'javascript:void(0)',
'custom' => 'style="display:none"',
'icon' => 'quote_selected',
'show' => $context['can_quote']
),
'modify' => array(
'label' => $txt['modify'],
'href' => $scripturl.'?action=post;msg='.$output['id'].';topic='.$context['current_topic'].'.'.$context['start'],
'icon' => 'modify_button',
'show' => $output['can_modify']
),

'more' => array(
'remove_topic' => array(
'label' => $txt['remove_topic'],
'href' => $scripturl.'?action=removetopic2;topic='.$context['current_topic'].'.'.$context['start'].';'.$context['session_var'].'='.$context['session_id'],
'javascript' => 'data-confirm="'.$txt['are_sure_remove_topic'].'"',
'class' => 'you_sure',
'icon' => 'remove_button',
'show' => $context['can_delete'] && ($context['topic_first_message'] == $output['id'])
),


This will replace Quick Edit with Modify, and remove Modify from More.  Backup the file before you try this.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sesquipedalian

That will work. However, I recommend making this change by using the integrate_prepare_display_context hook rather than by editing the Display.php file.
I promise you nothing.

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

Sir Osis of Liver

That may be a bitfor OP.  The code edit is pretty simple and easy to undo.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

User2

Sir Oasis of Liver, which is the path to the file Display.php?

Kindred

Sources


Dude. Instead of asking for us to spoon feed you, you'll get alot more traction if you at least TRY before asking....
Сл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."

User2

Why would I try to do something? I'm just an SMF user, not an SMF web developer. After discussing these issues, I will no longer do this.

Sir Osis of Liver

/Sources/Display.php

You're just moving 'modify' => array( from 'more' => array( up to $output['quickbuttons'] = array(.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Doug Heffernan

Quote from: Participant on January 21, 2023, 01:14:50 PMWhy would I try to do something?

To achieve what you asked for?

Quote from: Participant on January 21, 2023, 01:14:50 PMI'm just an SMF user, not an SMF web developer.

You don't have to be a developer to do the aformentioned edits.

Quote from: Participant on January 21, 2023, 01:14:50 PMI will no longer do this.

Then don't.

User2


Random Username

This is a fantastic thread. I like suppressing quick reply in favor of the full editor for consistency and the full suite of editor features. I love axing the quick edit button in favor of modify. But, can I have the reply box open by default when viewing a thread so there is not need to hit the reply button? Can I have the attachment and other options drop down open by default?

Thank you!

Kindred

Quote from: Random Username on January 24, 2023, 06:18:40 AMThis is a fantastic thread. I like suppressing quick reply in favor of the full editor for consistency and the full suite of editor features. I love axing the quick edit button in favor of modify. But, can I have the reply box open by default when viewing a thread so there is not need to hit the reply button? Can I have the attachment and other options drop down open by default?

Thank you!


Ummmm.... dude?

Quotecan I have the reply box open by default when viewing a thread so there is not need to hit the reply button

You LITERALLY just asked for what exists in 2.1.x.
Сл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

I hope you're right and I'm confused! But... are you talking about this quick reply box that opened in this thread by default? It doesn't have the add attachment dialogue and thus isn't open by default. You have to hit preview? The other thing is I don't care which one achieves it but I don't like having both. If could have quick reply open with attachment upload box open by default, then wonderful. Then just remove the reply button and replace it with quick reply or just change the names. lol. Am I making any sense? I know different people like different things... and have different needs.

This is what I'm after:

Kindred

that is true -- attachments require the full editor.  However, 99% of the people who are responding to a post DO NOT want to add an attachment - and the attachment system is complicated enough that loading it in a thread would be  poor idea.   So, having the fill editor, with attachments, in the quick reply location is not going to happen.

however, the quick reply in 2.1 contains all the OTHER functionality of the full editor.
Сл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

I understand your position, wanting what's best for the app/team. Excuse me if I don't use the correct terminology. My needs are a little different though perhaps. I don't suppose you might give me a hint? hehe.

Thanks Kindred.

Sir Osis of Liver

#17
Quote from: Random Username on January 24, 2023, 06:18:40 AMCan I have the attachment and other options drop down open by default?

2.0 had a theme setting to enable/disable collapsible additional post options, another good idea that apparently was  removed from 2.1.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Random Username

I see. I still would appreciate any hints anyone can give me on any of it. I've tried a few things but to no avail as of yet, basically trying to replace the call to the quickreply template. Very simplistic, I know.

Sir Osis of Liver

The code posted above will cause all posts and edits to go to the full reply editor.  Diego's mod will allow you to hide quick reply.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: