Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-02-25 02:49:01

Inspired
Plugin Author
From: Kiev, Ukraine
Registered: 2005-01-28
Posts: 87
Website

ied_plugin_composer - new plugins never came that easy

Inspired plugin composer is there to make plugin creation comfortable.

Features

Create new plugins right in the admin interface
Edit any plugin data
List and edit files in plugin_cache_dir
Publish plugins by saving .txt file or copying code for distribution
Export plugin from database to .php file
Import plugin from .php file into database

Plug it

inspired.kiev.ua/txp/*ied_plugin_composer* – plugin homepage

File format that the Plugin Composer recognizes (for plugin_cache_dir and import):

<code>
<?php
function txp_plugin_name() {
}
/*
—- PLUGIN METADATA —-
Name: txp_plugin_name
Version: 0.1
Type: 1
Description: this plugin does a lot of things
Author: Joe Smith
Link: http://example.com
—- BEGIN PLUGIN HELP —-
<p>plugin help</p>
—- END PLUGIN HELP & METADATA —-
</code><code>*</code><code>/
?>
</code>

More info

inspired.kiev.ua/*txp-plugin-cheatsheet* – pieces of code for plugin creation that i collect on my site

Last edited by Inspired (2006-05-30 09:08:26)


Plugin Composer — admin plugin to write your own plugins

Offline

#2 2006-02-25 03:36:05

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Re: ied_plugin_composer - new plugins never came that easy

Test it only for a few minutes, but fall in love.

THX

Offline

#3 2006-02-25 09:27:16

Skubidu
Archived Plugin Author
Registered: 2004-10-23
Posts: 611
Website

Re: ied_plugin_composer - new plugins never came that easy

This one is really cool! Thank you!
But would it be possible, that the generated plugin code looks like in the standard plugin template:

# xyz_plugin
# description
# My Name
# http://www.textpattern.com/

# ......................................................................
# This is a plugin for Textpattern - http://textpattern.com/
# To install: textpattern > admin > plugins
# Paste the following text into the 'Install plugin' box:
# ......................................................................

YTo5OntzOjQ6Im5hbWUiO3M6MjI6Im5obl9saXZlY29tbWVudHByZXZpZXciO3M6NzoidmVy
c2lvbiI7czo4OiIwLjUgYmV0YSI7czo2OiJhdXRob3IiO3M6MTQ6Ik5pbHMgSMO2cnJtYW5u
IjtzOjEwOiJhdXRob3JfdXJpIjtzOjI4OiJodHRwOi8vd3d3Lm5pbHNob2Vycm1hbm4uZGUv
IjtzOjExOiJkZXNjcmlwdGlvbiI7czozNzoibGl2ZSBjb21tZW50IHByZXZpZXcgKG1hZGUg
Zm9yIDQuMC4zKSI7czo0OiJ0eXBlIjtpOjE7czo0OiJoZWxwIjtzOjE3NDg6IgoJPHA+VGhp

Last edited by Skubidu (2006-02-25 09:40:51)

Offline

#4 2006-02-25 11:58:45

tranquillo
Archived Plugin Author
Registered: 2005-03-07
Posts: 127
Website

Re: ied_plugin_composer - new plugins never came that easy

Very nice, thanks.

Offline

#5 2006-02-25 12:48:28

Inspired
Plugin Author
From: Kiev, Ukraine
Registered: 2005-01-28
Posts: 87
Website

Re: ied_plugin_composer - new plugins never came that easy

:-) Thanks, Bastian! Btw, I enjoy your plugins too.

Well, Skubidu, I didn’t want to mess the interface and tried to keep it simple, so the generated string doesn’t take much space. Though now I made an update and you have an option: to save the plugin as a text file, which includes the information about the plugin. Hope you enjoy.

Yura

Last edited by Inspired (2006-02-25 12:49:51)


Plugin Composer — admin plugin to write your own plugins

Offline

#6 2006-02-25 12:54:32

Skubidu
Archived Plugin Author
Registered: 2004-10-23
Posts: 611
Website

Re: ied_plugin_composer - new plugins never came that easy

Thank you!! :)

Offline

#7 2006-02-25 15:06:32

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: ied_plugin_composer - new plugins never came that easy

I think there is something I don’t understand…

I enter a name (‘plugin’) and hit ‘create new plugin’.

I fill the fields author, website, version, description, plugin and help. Then click ‘save as plugin_v0.1.txt’, save that file, open it, copy/paste and install it in the plugin tab.

But the plugin preview just shows <?php?>, it does install and shows a plugin called ‘plugin’ with a version 0.1, but there is no author, website, description, code nor help.

So what am I doing wrong?

Offline

#8 2006-02-25 15:24:49

Inspired
Plugin Author
From: Kiev, Ukraine
Registered: 2005-01-28
Posts: 87
Website

Re: ied_plugin_composer - new plugins never came that easy

Doggiez, you must use one of the two big red buttons, that say “Save”, before you can copy the code for distribution. Note that the plugin is actually registered in your textpattern right when you push “Save” (hitting “create new plugin” reserves place in the database for the new plugin), so just go to “plugins”, enable your new plugin, test it, and then go for the code for distribution.

Last edited by Inspired (2006-02-25 15:45:59)


Plugin Composer — admin plugin to write your own plugins

Offline

#9 2006-02-25 15:32:38

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: ied_plugin_composer - new plugins never came that easy

Duh! Thanks :)

EDIT: Working great! Thanks again! I never managed to find out how to use the existing plugin template…

Last edited by doggiez (2006-02-25 15:40:51)

Offline

#10 2006-03-17 05:34:19

Inspired
Plugin Author
From: Kiev, Ukraine
Registered: 2005-01-28
Posts: 87
Website

Re: ied_plugin_composer - new plugins never came that easy

ied_plugin_composer goes to a cool level. Now you can save your plugin as PHP file, edit it in your favourite editing program, test that file in plugin_cache_dir, then import it back (sic!) into the textpattern database with the help of the composer and publish your plugin for everyone’s good. You can as well write your plugin in a php file following the composer’s handy template and then import the file into plugins.

Basically you can now write you plugin in any convenient for you way and publish it in a moment. This should make the plugin useful and loved even by those who already created a lot of plugins.

If you encounter a bug, please let me know. The plugin is still hot.

Hope you all enjoy guys.


Plugin Composer — admin plugin to write your own plugins

Offline

#11 2006-03-17 06:06:09

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: ied_plugin_composer - new plugins never came that easy

This is a great idea. I installed it and had good luck with everything but the browse to upload button. I posted the results in pastebin at <a href=“http://pastebin.com/606919”>Link</a>.
Something along these lines for exporting the current theme from a site to a portable plugin from which it could be installed into another site would also fill a gap.

Offline

#12 2006-03-17 06:21:25

Inspired
Plugin Author
From: Kiev, Ukraine
Registered: 2005-01-28
Posts: 87
Website

Re: ied_plugin_composer - new plugins never came that easy

Thank you for the feedback, rsilletti, I will have to look into what could happen with the upload function. Somehow it works well for me when I test it.
You should also note that you cannot upload anything, only php files formatted the composer’s way (as of 0.3 regular php files can be uploaded as well) – what it exports should also be imported fine.

(sorry, I didn’t quite get the idea of the second line of yours) ah, now i understand that you are talking about themes, well, yeah that’s a good idea too, perhaps for another good plugin.

The php file to import must may have this format:

<code>
<?php
plugin php code
/*
—- PLUGIN METADATA —-
Name: txp_pugin_name
Version: 0.1
Type: 1
Description: this plugin does a lot of things
Author: Joe Smith
Link: http://example.com
—- BEGIN PLUGIN HELP —-
<p>plugin help</p>
—- END PLUGIN HELP & METADATA —-
</code><code>*</code><code>/
?>
</code>

Last edited by Inspired (2006-04-30 21:13:49)


Plugin Composer — admin plugin to write your own plugins

Offline

Board footer

Powered by FluxBB