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

JRMBelgium

Quote from: Sir Osis of Liver on January 20, 2023, 12:45:00 PMDisplay.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.


Is there a way you can make this in to a mod? I can pay you for it if you want.

The reason why I don't want to edit the default php files, is simply because it becomes a mess months or years lather when you have made a manual modification that you forgot about that is in conflict with another mod.

On my forum, admins constantly have to add attachments and change the prefix of a topic, so for them the "Modify" button is way more usefull then the "Quick edit" button. Your suggested modification would make the workflow for them much easier.

Sir Osis of Liver

I don't do mods (it's the old dawg thing), but you can post a request here.  The code edit shouldn't cause any conflicts.  It's helpful to add a /// comment line above the edit that explains what was done, so it's easy to find if you need to in future.


When in Emor, do as the Snamors.
                              - D. Lister

GL700Wing

Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Steve

My pet rock is not feeling well. I think it's stoned.

Sir Osis of Liver

When in Emor, do as the Snamors.
                              - D. Lister

Advertisement: