1 of 5
1
Extension to remove the ‘Quick Save’ button (and more!)
Posted: 06 September 2006 03:56 AM   [ Ignore ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  619
Joined  05-16-2004

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): 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.

File Attachments
publishimprove.zip  (File Size: 12KB - Downloads: 520)
 Signature 

Fight spam better with “Defensio for EE,” a free module


Hop Studios Internet Consulting
http://www.hopstudios.com/

Profile
 
 
Posted: 18 September 2006 08:11 PM   [ Ignore ]   [ # 1 ]  
Summer Student
Total Posts:  9
Joined  09-04-2006

I think this comes down to the issue i posted here http://expressionengine.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.

Profile
 
 
Posted: 18 September 2006 08:27 PM   [ Ignore ]   [ # 2 ]  
Research Assistant
RankRankRank
Total Posts:  519
Joined  08-11-2004

I’m curious, why are you trying to remoave the Quick Save button? What sort of problems is it presenting?

Profile
 
 
Posted: 18 September 2006 08:30 PM   [ Ignore ]   [ # 3 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  619
Joined  05-16-2004

It confuses every client I have—they all think that to save what they’ve done, they should click quick save.  But in most cases, they should be clicking Submit or update.

I found a way around it, which I’ll post as an extension here someday.

TTFN
Travis

 Signature 

Fight spam better with “Defensio for EE,” a free module


Hop Studios Internet Consulting
http://www.hopstudios.com/

Profile
 
 
Posted: 28 September 2006 06:08 PM   [ Ignore ]   [ # 4 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  7534
Joined  08-05-2002

::cough::  Use javascript to hide the button ::end cough::

 Signature 
Profile
 
 
Posted: 30 September 2006 03:58 AM   [ Ignore ]   [ # 5 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  619
Joined  05-16-2004

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.

 Signature 

Fight spam better with “Defensio for EE,” a free module


Hop Studios Internet Consulting
http://www.hopstudios.com/

Profile
 
 
Posted: 03 October 2006 05:24 AM   [ Ignore ]   [ # 6 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  510
Joined  04-24-2004

Neat, thanks for this!

 Signature 

lukestevensdesign.com · Design 2.0 · Pro Network member

Profile
 
 
Posted: 03 October 2006 06:32 AM   [ Ignore ]   [ # 7 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11677
Joined  04-29-2002

Works on EE 1.5 for me! Thanks.

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 29 October 2006 06:27 PM   [ Ignore ]   [ # 8 ]  
Research Assistant
RankRankRank
Total Posts:  310
Joined  10-25-2005

First, thanks for putting in the time on this.

supersusie - 30 September 2006 03:58 AM

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.)

 Signature 

EE Pro Network Member

Profile
 
 
Posted: 29 October 2006 06:45 PM   [ Ignore ]   [ # 9 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11677
Joined  04-29-2002
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. smile

So I’m using this extension on all of my client sites, at least the newer ones.

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 31 October 2006 09:20 AM   [ Ignore ]   [ # 10 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

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.

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 31 October 2006 10:11 AM   [ Ignore ]   [ # 11 ]  
Research Assistant
RankRankRank
Total Posts:  310
Joined  10-25-2005
Sue Crocker - 29 October 2006 06:45 PM

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.)

 Signature 

EE Pro Network Member

Profile
 
 
Posted: 02 November 2006 02:17 PM   [ Ignore ]   [ # 12 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

I’ve updated this extension to play nice with other extensions.  You can grab 1.0.1 at the bottom of this post.

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 02 November 2006 02:30 PM   [ Ignore ]   [ # 13 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11677
Joined  04-29-2002

Umm.. isn’t this Travis’ extension? Shouldn’t he be the one making the changes?

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 02 November 2006 02:31 PM   [ Ignore ]   [ # 14 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  619
Joined  05-16-2004

Thanks, Sue.  I’ve messaged Mark about this privately.

TTFN
Travis

 Signature 

Fight spam better with “Defensio for EE,” a free module


Hop Studios Internet Consulting
http://www.hopstudios.com/

Profile
 
 
Posted: 02 November 2006 04:04 PM   [ Ignore ]   [ # 15 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  267
Joined  06-12-2002

Ummm, why shouldn’t Mark use someone else’s publicly posted code and make improvements to it? He wasn’t claiming the work as his own.

—Adrienne

Profile
 
 
Posted: 02 November 2006 04:08 PM   [ Ignore ]   [ # 16 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

Yes, but my version effectively splits the development into two branches.  Say what I did didn’t mesh with what Travis did (not that that’s likely, but the point still stands) now you would have two separate builds of essentially the same extension.  This could lead to some confusion and certainly upgrade issues if you try to flip flop between the two branches.

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 02 November 2006 04:14 PM   [ Ignore ]   [ # 17 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

If anyone’s curious the reason I posted the update to travis’ code was because it was interfering with my “File” extension: http://expressionengine.com/forums/viewthread/38997/P18/#186810

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 02 November 2006 04:15 PM   [ Ignore ]   [ # 18 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  31999
Joined  05-14-2004

Just as a note, publicly posted does not mean GPL or Open Source, so it might not be distributable.  Just something to consider for alienne, I’m sure Mark knows about software licensing =)

 Signature 
Profile
MSG
 
 
   
1 of 5
1
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 10:33 AM
Total Registered Members: 62404 Total Logged-in Users: 46
Total Topics: 76629 Total Anonymous Users: 24
Total Replies: 413916 Total Guests: 567
Total Posts: 490545    
Members ( View Memberlist )