Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-02-03 22:33:21

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

jmd_save: Ctrl/Alt+s saving of fields (articles, forms, prefs, etc.)

Offline

#2 2009-02-04 18:44:32

gerhard01
Plugin Author
Registered: 2006-12-07
Posts: 108

Re: jmd_save: Ctrl/Alt+s saving of fields (articles, forms, prefs, etc.)

Thanks! Very handy plugin.

Offline

#3 2009-02-06 14:18:47

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,475
Website GitHub

Re: jmd_save: Ctrl/Alt+s saving of fields (articles, forms, prefs, etc.)

Way cool, thanks.

Any chance of you being able to extend this to add a callback or similar mechanism for other plugins to hook into? I’m thinking specifically of ied_plugin_composer, but others like smd_tags would benefit from a save shortcut too.

Perhaps in a 3rd party plugin, something like:

global $plugins;
if( in_array("jmd_save", $plugins) ) {
   jmd_save_hook('my_event', 'my_step', 'my_form_id');
}

would add the shortcut saving ability to the plugin?

Actually, that approach might open up a whole world of possibilities and perhaps spawn an entire jmd_shortcuts plugin, where one could ‘register’ shortcut key combos to be associated with particular events/steps/forms in any plugin. Now that would kick even more ass ;-)

Last edited by Bloke (2009-02-06 14:19:42)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#4 2009-03-01 00:08:20

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: jmd_save: Ctrl/Alt+s saving of fields (articles, forms, prefs, etc.)

So I forgot form["name"] was deprecated in XHTML and came up with a lazier way of doing things – submitting the first .publish element. These kinds of diffs make me happy :). I’ll upload a new version if my button-name patch is accepted.

Bloke – would there be any need for >1 keyboard shortcuts on the same page? A generic shortcuts plugin is enticing. The dev version works with ied_plugin_composer too :).

Offline

#5 2009-03-01 07:52:48

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,475
Website GitHub

Re: jmd_save: Ctrl/Alt+s saving of fields (articles, forms, prefs, etc.)

jm wrote:

would there be any need for >1 keyboard shortcuts on the same page? A generic shortcuts plugin is enticing.

Off the top of my head, most of the time you just ‘save’ but in smd_tags for example, there’s a sort of ‘save as’ (create new) function as well so being able to do more than one thing might be damn handy, thanks.

The dev version works with ied_plugin_composer too :)

Sweeeet, looking forward to givng it a spin.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB