Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Advanced plugin manager
For my latest plugins i code an advanced install script, that adds plugin prefs, plugin tables and import files.
And i see, that more and more plugins have db-prefs instead of editing the plugin code.
For some reasons i thing we need a standard for these things:
- It is a lot of coding work to add the advanced install
- Making sure, that all db-prefs etc. can be removed easy and complete
- A standard could increase security and stability
My plan is to source these functions out to an lib.
That one should:
- Advanced plugin (un)install
- Adding / removing plugin prefs
- Adding / removing plugin table
- Adding / removing files that are needed by plugin
- Adding / removing localisation of plugin
- Update plugin ?
Is anyone interested to take part working on that?
Any other ideas, what a
Offline
Re: Advanced plugin manager
I’ll help anyway I can. I’m going through this exact pain right now updating hak_tinymce.
Shoving is the answer – pusher robot
Offline
#3 2006-06-14 13:25:40
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: Advanced plugin manager
Bastian,
last night I was working on a set of DB functions (based on something Inspired posted recently) to test for/add/remove DB tables and I was about to add them to my own library plugin.
You’re welcome to the code if you want it.
If you want any help on this plugin let me know.
— Steve
Offline
Re: Advanced plugin manager
This is a fantastic idea — a plugin plugin! I’d love to get involved in removing the question mark from the Update Plugin functionality.
‘ve kicked around the idea of a central plugin repository (via Trac or whatever) here before and havn’t heard much response, but at the very least plugins should be able to go to the author’s distribution location and see if it’s changed… I spend way too much time doing this by hand!
Offline
#5 2006-06-15 16:47:17
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: Advanced plugin manager
Jamie
Yep, an update mechanism would be handy, how do you envisage such a feature working?
FWIW, could this work…?
Plugin authors implement a simple query/response mechanism on the plugin server (this could be a plugin too). The server simply uses HTTP headers in response to well formed query URLs fired at it from the plugin doing the update query. A 304 not changed response from the server means nothing to do, a 404 is what-a-ya-talking-about? I know nothing about that plugin!! and a 200 returns the encoded txt of the new version. The plugin library simply updates and activates the 200 page.
— Steve
Offline
Re: Advanced plugin manager
Steve — a plugin-distro plugin could work, but might be overkill unless you had some specific functionality in mind that would require a web service like that.
The simple solution I had in mind (inspired by DokuWiki) would be for each plugin to define a URL for itself that doesn’t change*. When you run “Update Plugins” the plugin manager grabs a copy and updates the plugin if it’s changed — not very smart, but certainly effective, and txp plugins never go over a few dozen K at most.
Then when you’re installing plugins you could just pass a URL to the plugin manager instead of pasting in the code.
*if you really need multiple versions of your plugins on your site you can just symlink the newest oneLast edited by jamiew (2006-06-15 19:56:04)
Offline
Re: Advanced plugin manager
I’m experimenting with uploading plugins as .zip.
The .zip contains all needed files and images, the regular plugin.txt and a plugin.xml which contains all prefs.
An extension “Plugin manager” handels the .zip-upload, extracts the files, install the plugin and adapt prefs out the .xml.
How do you think about that method?
Offline
#8 2006-06-16 00:25:59
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: Advanced plugin manager
Jamie
Good points, KISS sounds just fine as the filesizes are so small.
Bastian
I am looking forward to trying it out :)
— Steve
Offline
#9 2006-06-16 01:01:40
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Advanced plugin manager
Remember to make note that the user will need to have zip support in order for that to work. Lots of servers have it, but lots don’t too.
Offline
#10 2006-06-16 05:07:10
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: Advanced plugin manager
Bastian
Would it be worth including an option to revert a plugin to the previous version after an update?
This is in case an updated plugin happens to be bugged/incompatible with your PHP/MySQL/TxP version in some way.
— Steve
Offline
Re: Advanced plugin manager
Mary wrote:
Remember to make note that the user will need to have zip support in order for that to work. Lots of servers have it, but lots don’t too.
I use PclZip from phpconcept.net and there is also a tar lib:
PclTar.
It is possible to support tar, too.
BTW: I get inspired to use packed plugins by the way eyeos.org managing its apps instaling
eyeOS is definitive worth a look!
net-carver wrote
Would it be worth including an option to revert a plugin to the previous version after an update?
That updating issues will not be part of the first version, but i will keep that in mind.
Offline
#12 2006-06-16 20:05:39
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Advanced plugin manager
I use PclZip from phpconcept.net and there is also a tar lib:
PclTar.
It is possible to support tar, too.
Both are just PHP libraries to easily create and manage compressed archives, they don’t provide the server support for them. In order to use either, you need to have Zlib.
It’s not a bad idea, just remember to make that obvious to the user.
Offline