Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#157 2012-09-12 09:34:30

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

Re: ied_plugin_composer - new plugins never came that easy

Pat64 wrote:

Maybe you’re looking for this.

Awesome! Merci beaucoup, Patrick. I’ll make that available separately on my site (and, eventually, .org) and fold it into the plugin distribution when I get round to an official release.


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

#158 2012-09-12 13:48:32

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

Re: ied_plugin_composer - new plugins never came that easy

I’ve just re-released the beta because I’m slapdash like that.

I fixed the issue with the holes in the Textpacks as you switch from language to language and added a little progress counter so you can see how many strings have been loaded. I also rolled in the french translation file so anybody with fr-fr can now benefit from it if you have that language installed.

Also improved the ‘Load strings from plugin’ so you can import them if you have a gTxt method inside a class. Haven’t tested it though so please anybody with such a setup report on the success/failure. Use class::gTxt_method in the box.

The only question mark I have regarding textpacks is the encoding when you export them. Patrick’s one seemed to have embedded weird characters in it wherever an accent occurred, but that was probably because I copy and pasted it from the forum into my crummy text editor before saving it. But I then noticed that the export routine incorrectly used the text/plain MIME type. I changed it to text/plain charset=UTF-8 and it made no visible difference, then I tried text/html charset=UTF-8 which again made no difference, but I left it at that anyway.

PHPStorm made a better job of rendering the UTF-8 version, so I hope it’s just my two-bit editor being awkward. If someone with a decent text editor would please confirm that the export of Textpacks works ok in both the standalone .textpack files and inside exported .php files, that would be a great help. I’m not convinced text/html is the right MIME type to use, so if anybody has a better idea please let me know.

Many thanks. We’re getting there!

Last edited by Bloke (2012-09-12 13:51:18)


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

#159 2012-10-17 18:03:13

ecklesroad
Plugin Author
From: Bemidji, MN
Registered: 2008-02-22
Posts: 119
Website

Re: ied_plugin_composer - new plugins never came that easy

I’m running into a strange bug whenever I save a plugin’s code though ied_plugin_composer. I just tested saving without changing anything and this error gets output:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/grchamb/public_html/textpattern/lib/txplib_misc.php(812) : eval()'d code on line 255 The above errors were caused by the plugin:ied_plugin_composer

Which the above is related to several unescaped single quotes.
'onclick' => 'return verify(''.gTxt('ied_plugin_restore_verify', array('{name}' => $name)).'');'))

Looking at the original source it now looks like saving is stipping the slashes and thus causing the T_CONSTANT_ENCAPSED_STRING error, the saved version in the plugins table does not have the escaped slashes. Any idea where are the slashes being stripped out from?

Edit: Nevermind, everything works great. Our last update of cPanel somehow magic quotes got turned back on for POST only, which I thought was the issue. Carry on.

Last edited by ecklesroad (2012-10-22 18:03:00)

Offline

#160 2013-03-18 14:10:34

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

Re: ied_plugin_composer - new plugins never came that easy

More feature creep in the latest beta!

  • UI improvements to the plugin List allowing multi-select of disk-based plugins.
  • Ability to manually trigger lifecycle events on both DB and disk plugins. Helpful for testing what your plugin is going to do when people install / enable / disable / delete your masterpiece. Also exceptionally handy if you run a site from the cache folder (ordinarily those plugins will have had the “installed” and “enabled” steps skipped) because you can now select plugins and trigger the install+enable steps manually.
  • (only for disk-based plugins) Ability to (re)load the Textpack strings from the plugin template file. Again, handy if you have dropped a plugin into the cache folder and want to quickly load the strings into the local database. Relies on strict adherence to the template though, with the Textpack block ending in EOT;

Please let me know how you get on with these things: already proving really helpful in a multi-site installation running plugins from a central repository.

Last edited by Bloke (2013-03-18 14:11:59)


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

#161 2013-03-18 14:28:52

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: ied_plugin_composer - new plugins never came that easy

I’m too young to appreciate all new features, but this lifecycle trigger is tremendous, huge thanks, Stef!

Offline

#162 2013-03-18 14:30:22

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

Re: ied_plugin_composer - new plugins never came that easy

etc wrote:

I’m too young to appreciate all new features, but this lifecycle trigger is tremendous, huge thanks, Stef!

Hehe, you’re welcome. It had been on the ToDo list for far too long and I had a spare hour or two over the weekend so I threw it together.


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

#163 2013-03-19 19:38:46

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: ied_plugin_composer - new plugins never came that easy

Bloke wrote:…already proving really helpful in a multi-site installation running plugins from a central repository.

LOL… in true bloke form. Understatement of the year…

After Joyent/Textdrive hosed about 40 sites for me without warning. I’m refurbishing a collection of 30+ sites (4.2+4.4.1) to 4.6… and this has made the process doable.

Now I’m using standard plugin sets that can be updated across the board or switched between a “stable” and “dev” branch with the mere change of the cache directory pref…. so yes I’d say it’s “proving really helpful”

Offline

#164 2013-11-26 15:29:32

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,599
GitHub Twitter

Re: ied_plugin_composer - new plugins never came that easy

Hi Stef ;)

Only two entries are missing into the French textpack:

Plugins in database => Plugins présents dans la base de données

Chars remaining => Caractères restants

Last edited by Pat64 (2013-11-27 10:28:27)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#165 2014-04-05 14:30:10

MarcoK
Plugin Author
From: Como
Registered: 2006-10-17
Posts: 248
Website

Re: ied_plugin_composer - new plugins never came that easy

Hi Stef, a little question.

I have installed spf_codemirror and i need to set CodeMirror as Plugin editor.
In Plugin editor URL I have insert the codemirror.js url such as spf_codemirror print on source page.
But don’t work. There is any trouble?

Offline

#166 2014-04-06 18:46:53

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

Re: ied_plugin_composer - new plugins never came that easy

MarcoK wrote #280096:

CodeMirror as Plugin editor.

Ah, there’s a bug in the CodeMirror section of ied_plugin_composer, sorry about that. For starters the <script> tags are missing so the javascript gets echoed to the page (d’oh!) but when I fixed that and mended one other little bug with passing config parameters to it, I got a CodeMirror is not defined error, even though it loads all the scripts fine.

I even tried it wrapped in domready, but it still didn’t work so I’m not entirely sure why it’s refusing to start up. Maybe the JS has to be in the <head> section of the page instead of inline, in which case I’ll need to re-engineer that bit of ied_plugin_composer.

So, at the moment, it’s broken. My apologies. I’ll try and get it fixed as soon as I can.


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

#167 2014-06-14 15:37:30

spita
New Member
Registered: 2012-07-23
Posts: 2

Re: ied_plugin_composer - new plugins never came that easy

Hello,
I just can’t manage to make any of the syntax highlight editor work.
Apart from Codemirror, already discussed, the other two seems to be regularly included in the page code, but they someway don’t load.
As for Editarea, it even causes a javascript error (Uncaught ReferenceError: editAreaLoader is not defined), even if, inspecting the code, I can see the javascript tag with the right script in the src pararameter (I can even open it in another window) and the other javascript tag with the init code and the relative parameters.

Am I missing something out?

Thanks.

Offline

#168 2014-06-16 06:33:13

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

Re: ied_plugin_composer - new plugins never came that easy

spita wrote #281425:

I just can’t manage to make any of the syntax highlight editor work.

Yeah, bug-tastic on that front I’m afraid. I let testing slide and the “supported” (ahem) syntax highlighters are hit and miss. Mostly miss. But you’ve reminded me about the fix I began to implement so I’ll revisit it (hopefully tonight) and see if I can throw a version out that at least doesn’t throw errors and at best actually works!


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