MyBB Community Forums

Full Version: Editing the quick edit "Save Changes" buttons
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can anyone please point me in the right direction to change these buttons when in "quick edit"? I cant find a template anywhere, so I'm guessing its hard coded in, but I cant seem to find it anywhere.
https://i.imgur.com/2ZiWJ1N.png

Essentially, I'm wanting to add another button next to them leading to the Advanced Editor. Thanks for any help.
(2018-04-13, 08:47 PM)Harry K. Wrote: [ -> ]Can anyone please point me in the right direction to change these buttons when in "quick edit"? I cant find a template anywhere, so I'm guessing its hard coded in, but I cant seem to find it anywhere.
https://i.imgur.com/2ZiWJ1N.png

Essentially, I'm wanting to add another button next to them leading to the Advanced Editor. Thanks for any help.



In "showthread.lang.php" find:

$l['save_changes'] = 'Save Changes';
$l['cancel_edit'] = 'Cancel Edit';
I'm trying to add another button, next to those but I cant seem to find them.
(2018-04-13, 08:47 PM)Harry K. Wrote: [ -> ]Essentially, I'm wanting to add another button next to them leading to the Advanced Editor. Thanks for any help.
Bump  Blush Anyone?
if you like to use a plugin for the requirement then see Go to Full Reply/Edit plugin
(2018-04-15, 02:52 PM).m. Wrote: [ -> ]if you like to use a plugin for the requirement then see Go to Full Reply/Edit plugin

Oh! Brilliant thanks for that, I tried looking but I couldn't find anything. I'd prefer to do it without a plugin if i can to be honest. Do you know a way I'd be able to implement it using Patches?

If not, that plugin is perfect, thanks.
^ you can easily trace the required code from the plugin
[I believe you have required skills ..]
(2018-04-15, 03:00 PM).m. Wrote: [ -> ]^ you can easily trace the required code from the plugin
[I believe you have required skills ..]

I've never actually had a proper play with Patches. I'll see what I can do, thanks for the help. Smile
patches plugin is not required for adding that full edit button
it was beautifully done by using jQuery code [GitHub link]
that can be added near bottom of showthread template
[of course you have to replace ".$lang->gotofull_edit." with required phrase]
(2018-04-15, 04:06 PM).m. Wrote: [ -> ]patches plugin is not required for adding that full edit button
it was beautifully done by using jQuery code [GitHub link]
that can be added near bottom of showthread template
[of course you have to replace ".$lang->gotofull_edit." with required phrase]

Hmm.. I tried something similar to that just before posting but couldn't get it to work. Looking a little closer, It's calling for the dropdown which I removed previously.  Blush Thanks for the help, will be able to do it now.

Got it working, I had to work my own way round it as I really didn't want the drop down. Toungue Thanks again for your help in pointing me in that direction.

For anyone that's interested in accomplishing this without a dropdown, this is the code I used.
<a href="javascript:void(0)" class="quick_edit_button mini button secondary" id="quick_edit_post_{$post['pid']}" style="padding-left: 7px;"><i class="fas fa-pencil-alt"></i></a>
<script type="text/javascript">
$(document).ready(function(){
    $("#quick_edit_post_{$post['pid']}").click(function(){
        $("#adv{$post['pid']}").css({"display": "block"}); // Showing Advanced Editor button.
		$("#quick_edit_post_{$post['pid']}").addClass("mqselected") // Adding highlight to Edit button.
		$("button").click(function(){
			$("#adv{$post['pid']}").css({"display": "none"}); // Removing Advanced button on Cancel or Save.
			$("#quick_edit_post_{$post['pid']}").removeClass("mqselected") // Removing Highlight.
		});
        });
});
</script>

Code I used for the editor button, I placed this in postbit_classic(postbit) template just below the post_body div.
<div class="float_right" id="adv{$post['pid']}" style="display:none;margin-top:-35px;"><a href="editpost.php?pid={$post['pid']}" class="titletip button mini secondary" title="Any unsaved changes to your post will be lost if you switch to Advanced Editor">Advanced Editor</a></div>

Example
[Image: zLbCR8c.gif]