Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-05-16 09:54:48

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

4.0.7 and plugin sort?

1. Updated from svn textpattern install and installed :) it. Noticed file _to_4.0.7.php but in admin still is showing version 4.0.6. Isn’t anything wrong?
2. What is select menu in plugin tab for?


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#2 2008-05-16 10:00:55

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

Re: 4.0.7 and plugin sort?

the_ghost wrote:

2. What is select menu in plugin tab for?

changeset 2871

Looks like plugins can be given a load order so “important” ones can load first if required. I’ve updated ied_plugin_composer to have the ability to change load order in the latest version, but I haven’t tested it on a new svn yet so it’s just guesswork if it functions at the moment. When I’ve tested it I’ll release it.


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

#3 2008-05-16 10:29:25

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: 4.0.7 and plugin sort?

It should work already.
Note that most plugin authors should not specify a plugin load order in their plugin. It defaults to 5 automatically. Only plugins that really must be loaded first/last (compared to other plugins) in order to function correctly, can set a low/high plugin load order

Offline

#4 2008-05-16 10:38:35

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: 4.0.7 and plugin sort?

Recent news. Subscribe here.

Offline

#5 2008-05-16 10:56:11

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

Re: 4.0.7 and plugin sort?

ruud wrote:

most plugin authors should not specify a plugin load order in their plugin.

Ah OK, thanks. I just figured that since the plugin composer can export the plugin as PHP+help in the standard plugin template format I’d offer the ability to change it at compile time for completeness, so it appears in the template as it does in the changeset.

Since I now see this is a user-centric setting that plugin authors merely recommend in their help, I’ll probably either omit it or just set it to 5 and be done with it. What’s one more thing to select after activating a plugin, eh?

Question: if I were to add $plugin['order'] to the array before base64ing it, would the given order be used when the plugin was installed or will they always be installed at level 5 regardless?

Last edited by Bloke (2008-05-16 10:57: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

#6 2008-05-16 11:00:47

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: 4.0.7 and plugin sort?

The author-specified “order” will be set upon installation, but users can choose to change it. This is to give authors a means of “suggesting” a reasonable order.

On most occasions, the plugin would just suggest “5” as a middle ground or simply suggest nothing at all. Some plugins might require to load very early or very late, so the author would set the order to the desired end of the scale.

Offline

#7 2008-05-16 11:10:30

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: 4.0.7 and plugin sort?

If you leave out the $plugin['order'] from the plugin template, it’ll still be set to 5 by default.

Offline

#8 2008-05-16 11:24:43

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

Re: 4.0.7 and plugin sort?

Thanks for clarifying that guys. In that case I’ll leave in the ability for plugin authors to set the load order if they wish.

At the end of the day it’s just a drop-down in the composer’s “edit” page that writes out the $plugin['order'] string before saving; if it’s left alone, they get 5.


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

#9 2008-05-16 11:47:55

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: 4.0.7 and plugin sort?

Victor said

1. Updated from svn textpattern install and installed :) it. Noticed file _to_4.0.7.php but in admin still is showing version 4.0.6. Isn’t anything wrong?

That’s correct. 4.0.7 is not yet released. If the version number was updated to 4.0.7 in _to_4.0.7.php and we were to change or add something to the upgrade script, the upgrade script wouldn’t be executed (due to the updated version number), so we keep it at 4.0.6 until we’re sure there won’t be any more changes to the upgrade script (which is when we release 4.0.7)

Offline

Board footer

Powered by FluxBB