ExpressionEngine 7.5 has been Released! Learn More!
I’m interested in removing the Quick Save button from one of my client sites. I could just comment it out of the code, but because I’m curious about extensions, I went looking for a way to remove the button using the existing extension hooks.
Near as I can tell, there are only two extensions that have a hope of influencing the Quick Save button – “publish_form_start” which would require me to rewrite the whole publish page, and “publish_form_end,” which seemed promising.
But “publish_form_end” only lets me add additional HTML code onto the end of the form page:
if (isset($EXT->extensions['publish_form_end']))
{
$r .= $EXT->call_extension('publish_form_end', $weblog_id);
}
The variable $r is local in scope, so I can’t reach up to access and/or change any of the already generated page, I can only append to $r. This diminishes the flexibility of the form_end hook.
For a counter example, the hook “publish_form_body_props” works like this:
$DSP->body_props .= ' onLoad="set_catlink();" ';
$edata = $EXT->call_extension('publish_form_body_props');
if ($EXT->end_script === TRUE) return;
Because the body_props are stored in $DSP at the time the hook is called, they are globally accessible to the extension hook.
Anyway, if anyone can think of a hook (or other method) that can modify the publish page to remove the quick save button, please share.
Update Sept.: I did make an extension; version 1.0 was downloaded 35 times.
Update (Nov. 2, 2006): I’ve updated the extension to version 1.1., downloaded 31 times.
Update (Dec. 7, 2006): I’ve updated the extension to version 1.2. See below for details, downloaded 4 times.
Update (Dec. 8, 2006): I’ve updated the extension to version 1.2.1 Stupid bug. Downloaded 20 times.
Update (Jan. 3, 2007): [/b] I’ve updated the extension to version 1.5. Downloaded 37 times.
Update (Jan. 20, 2007): I’ve updated the extension to version 1.5.1. Downloaded 226 times.
Update (July 5, 2007): I’ve updated the extension to version 1.6. Downloaded 9 times.
Update (June 26, 2007): I’ve updated the extension to version 1.7. Downloaded 59 times.
Update (Sept 5, 2007): I’ve updated the extension to version 2.0. This adds EE 1.6 compatibility and a handful of new options. I’m taking suggestions, too. Downloaded 826 times.
Update (April 20, 2009): Yeah, that’s a long time to wait for a bug fix. But you can get 2.0.1 now: http://www.hopstudios.com/software/publish_improve/
I think this comes down to the issue i posted here http://ellislab.com/forums/viewthread/38294/
Essentially, it comes down to the fact that hooks are only in certain places. You often have to duplicate large chunks of code in an extension just to make a minor adjustment. In your case, you would have to rewrite the entire form, just to remove the quick save button.
As promised, here’s my first extension: publishimprove, which ‘improves’ the publish page.
Specifically: “Removes the Quick Save button, Changes “Submit” and “Update” to “Save”, adds “Upload file:” text button. Tested in 1.4.2 (20060620)”
This version, 1.0, is free, and I’d be interested in hearing feedback on it, especially what other publish page improvements I could do for you.
(I didn’t use Javascript…)
TTFN Travis
Update: See the top of the thread for the current version.
First, thanks for putting in the time on this.
This version, 1.0, is free, and I’d be interested in hearing feedback on it, especially what other publish page improvements I could do for you.
How about the option to also remove the Upload button completely?
With the use of WYSIWYG tools that also allow you to upload and insert images inside fields and Mark Huot’s AWESOME File extension, I can finally do away with EE’s silly built-in file uploading/handling functionality - and this huge, confusing button (Pmachine: what’s up with using an icon and not text for this anyway?) is now useless to me (and more importantly, my clients.)
With the use of WYSIWYG tools that also allow you to upload and insert images inside fields and Mark Huot’s AWESOME File extension, I can finally do away with EE’s silly built-in file uploading/handling functionality - and this huge, confusing button (Pmachine: what’s up with using an icon and not text for this anyway?) is now useless to me (and more importantly, my clients.)
It’s all about choices. Many of us don’t use WYSIWYG tools with EE. It’s all about choices. My clients can also use the File Manager Module as well.
Many of us have not liked the file upload icon and the ext.publishimprove.php extension helps with that. As well as trying to explain what Quick Save does. 😊
So I’m using this extension on all of my client sites, at least the newer ones.
It’d also be a good idea to include a “last_call” check in case other extensions are using the same hook. To do so, simply add:
global $EXT;
if($EXT->last_call !== false)
{
$data = $EXT->last_call;
}
to the beginning of your change_save_buttons() method. All it does is reset $data to what other extensions have returned if anything.
It’s all about choices. Many of us don’t use WYSIWYG tools with EE. It’s all about choices. My clients can also use the File Manager Module as well.
Of course it’s about choice. I do choose to use the WYSIWYG tools with EE, because my clients expect such things in their CMS, and I think it’s unreasonable for a non-techie to have to learn HTML (or worse, some “simple” alt-version like markdown or whatever) just to add bold and links to their content when computers can do what they were built to do and do this for them. :-)
My opinion on things like the built-in EE file uploading as well as the File Manager Module is that it isn’t the simplest way of handling a simple operation (Simple from the user’s point of view. I know these things aren’t necessarily simple from a dev point of view.). Both methods take the app user out of the flow of the normal process of updating/adding an entry. Mark’s File extension as well as the extension in this thread do two very important things: simplify the process and keep people focused on the task at hand without making them think (maybe that’s three things). And I thank both Mark and the maker of this extension for helping to make EE better and helping my clients accomplish their tasks faster and easier. (And yes, Derek, it IS a testament to EE that people can add/change things like this to make EE suit whatever people may want/need it to do.)
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.