Hello,
Just released my first proper Expression Engine module, called DynPI. It’s a dynamic plugin interface. Some more information:
Download & documentation location: http://anarchiel.com/ee/dynpi
What is DynPI? DynPI is a dynamic plugin interface that works together with Expression Engine. It allows you to create or upload DynPI plugins, which are little code snippets meant to do some sort of (usually) simple job. Plugins you developed yourself can easily be shared without having to upload any files to your Expression Engine installation directories.
Why DynPI? If you have ever found yourself creating tiny plugins with just a few lines of code to do jobs that EE can’t handle on its own, DynPI is your friend. If you would like to be able to export your newly created (or just edited) plugins for use on some other website, DynPI - again - is your friend. A DynPI plugin just consists of one single file with a .dynpi extension, which can be uploaded through the DynPI module homepage.
Features * Comes as a module for EE with full Control Panel interface for easy management * Allows you to upload pre-made .dynpi files that will get installed without having to * upload the files to your webserver using something like FTP * Comes with a small IDE environment which allows you to code your plugins and their methods directly from the Control Panel * Create clean solutions for issues that aren’t solvable in EE, or would require a lot of work that isn’t necessary with DynPI * Accessible for low level PHP programmers. Most plugins will just contain a few lines of code that process some input data and output some new * Automatic access to EE objects ($TMPL, $DB, etcetera) without the need to global them first. Saves you lines of typing the same thing over and over again and cleans up your code * Manage your plugins easily. Export them with the click of a button and share them with friends or whoever you’d like to use your plugin * Get rid of messy PHP code popping up in your templates; with DynPI, this is history (and as a bonus: you get an easy way of re-using your PHP code snippets) * All your code resides in the database, so almost no messing around with files * Lightning fast development without hassle
If you have any suggestions, bug reports, feature requests or whatever, visit me at: http://anarchiel.com/ee and leave me a message. And please consider this is release 1.0, so things might mess up 😊
Thanks and enjoy yourself.
Hiya,
Sounds interesting. Might be nice to see a few plugins that have been made with this that have real world applications just so that we an see what to do to create them ourselves though.
Do you have any you could share so we can see how to do all of this ourselves?
Best wishes,
Mark
Never mind, please ignore me. Just found the page with the example plugins on. Sorry about that! :-(
Off to give it all a go right now.
Best wishes,
Mark
Just wondering if there would be any way to perhaps make the textarea where you type in the main plugin code not be using code text as it comes out exceptionally small and very very hard to read. I had to bump up the text size on the page a couple of times before I could read the text in it 😉
Also wondering as the plugins are stored in the database does this mean they are faster than normal plugins or perhaps slower or maybe different on different types of server systems maybe?
Wow, thanks for the input so quickly 😛
Glad you found the examples. If you’d like any other examples, just let me know and I’ll fix ‘em.
About the speed: the module builds class code that is stored in the database every time you edit some method code. This class is then SELECTed from the db and the resulting code is evalled. So it should be really fast or at least match the speed of loading files from the filesystem. But it’s a good question which I will dive into to find exactly how things perform.
Hiya,
Yep the speed thing would be one of the important items on my list. I think it’s a really nice way to be able to write plugins quickly and so speed would be my only question on it really. Not too sure how you’d go about testing that though?
If there are any more examples you could put online then that would be great too although I think I get for the most part how to create them now.
Best wishes,
Mark
Here’s a plugin for everyone to test out if they like. Simply a very very quick re-write of my MB Count Down plugin.
Usage
{exp:dynpi plugin="mb_count_down" method="countdown" date="6th May 2010" event="My Event Name Here"}
{if years > 0}{years} year{if years > 1}s{/if}, {/if}{if months > 0}{months} month{if months > 1}s{/if}, {/if}{if days > 0}{days} day{if days > 1}s{/if}, {/if}{if hours > 0}{hours} hour{if hours > 1}s{/if}, {/if}{if minutes > 0}and {minutes} minute{if minutes > 1}s{/if}{/if} left until {event}
{/exp:dynpi}I was just wondering if there would be any way to somehow have the plugin recognise if there is only one function / method in it and if so you don’t then have to write in the method parameter so you would just do this instead :
{exp:dynpi plugin="mb_count_down" date="6th May 2010" event="My Event Name Here"}Would just mean writing the plugin tag would be a little quicker. No biggie if not possible though was just wondering as a lot of the plugins I make just have the one function / method.
Also not sure if I missed something in the naming conventions but I tried calling the plugin mb_countdown and then tested the template but I got no output at all from the template. I’m guessing it has something to do with the method being called countdown also though maybe?
Best wishes,
Mark
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.