Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2015-09-01 12:43:41

etc
Developer
Registered: 2010-11-11
Posts: 4,665
Website GitHub

Re: [docs] Plugin development main page content

Destry wrote #294466:

I wonder why pluggable_ui() was ever mentioned in plugin dev docs to begin with…? (rhetorical)

+1. A bit of enthusiasm about new entry points, I guess.

So if Redbot thinks that’s a good use of the function in a plugin, and you’re saying forget it, then how would you do that — rewrite the custom fields order — using register_callback(), or would it be more complicated than that?

Yes, register_callback('my_own_custom_fields', 'article_ui', 'custom_fields'). You rewrite nothing with pluggable_ui(), you just let other plugins alter your output, see my previous post.

Edit: “taking advantage of pluggable_ui()” just means that Textpattern has opened new entry points (events+steps) for plugins, one could read it as “taking advantage of new events” as well.

Last edited by etc (2015-09-01 14:52:02)

Offline

#14 2015-09-02 15:58:35

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,851
Website

Re: [docs] Plugin development main page content

Okay, I think I’ve got the main plugin dev page in order, but anyone should feel free to point out radical problems, especially with respect to technical issues. I have not written any of the code, or any new content, per se, outside of moving things around, consolidating, and clearing up concepts and relationships.

Also, I didn’t mess with the “How plugins are loaded” and “Plugin lifecycle management and preferences” sections because I don’t know enough about what’s going on there to know how they might be improved, so they are pretty much as I found them. Everything else has been gone over a bit in terms of making concepts clear, linking with other material, etc.

etc,

You’re help has been valuable. Thanks again. The only mention of pluggable_ui() in the main page now is in footnote #5 under the “Function: register_callback()” section. It links to this page. It might still needs some work. I’m hesitant to make it sound like pluggable_ui() is not useful anymore at all, but maybe it isn’t after six years of core evolution. In any case, I’ve used you’re example on that page to show the use-case you pointed out. So thanks for that.

I also realized there was a tutorial in the Admin-side plugin tutorial for creating Extensions panels, so now we have two such examples in the docs, in two different contexts. ;)

Last edited by Destry (2015-09-03 09:09:01)

Offline

#15 2015-09-03 08:09:50

etc
Developer
Registered: 2010-11-11
Posts: 4,665
Website GitHub

Re: [docs] Plugin development main page content

Thanks, I will re-read it a little later today. Few rapid remarks:

Destry wrote #294481:

I’m hesitant to make it sound like pluggable_ui() is not useful anymore at all, but maybe it isn’t after six years of core evolution.

I wouldn’t say it like this, it rather was of little use for common plugin authors from the start. And it’s still useful for those who want to completely rewrite (parts of) the admin interface, but these are rare animals (like smd_user_manager), and they know what they are doing anyway. I’d say, pluggable_ui() is more relevant for themes development, but would like to hear from devs/plugin authors what they think.

Another remark: I would put register_callback() description inside “Callbacks” section.

Offline

#16 2015-09-03 09:08:12

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,851
Website

Re: [docs] Plugin development main page content

Great.

  1. I’ve put the register_callback() section into upper Callbacks section.
  2. Reordered the ToC links and footnotes.
  3. Edited the pluggable_ui() footnote (now #5) to sound nicer. ;)

Just need to normalize the copy on The pluggable_ui function page now. I think I can do that based on what you just mentioned about experienced users, smd_user_manager, etc. Maybe I can get Bloke to comment in there too, if necessary. I think he used pluggable_ui in smd_bio as well. But yeah, he’s an example of an experienced user/dev, for sure. ;)

Offline

Board footer

Powered by FluxBB