Textpattern 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
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
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
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
Admin
From: The Netherlands
Registered: 2004-06-06
Posts: 7,390
Website

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?


<txp:Els /> ;)
Tag Reference | Unexpected behaviour? Check the tag trace | Still no clue? Check the names of your custom fields

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
Admin
From: The Netherlands
Registered: 2004-06-06
Posts: 7,390
Website

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)


<txp:Els /> ;)
Tag Reference | Unexpected behaviour? Check the tag trace | Still no clue? Check the names of your custom fields

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

Board footer

Powered by FluxBB