Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Plugging in the Plugin Manager
« on October 10th, 2011, 02:39 AM »
OK, so what's been going on lately? Nao's been busy with a variety of tweaks and gouges to the source, but I've been busy working away on plugins.

(Yes, careful readers will note that we used to call them add-ons, but they're officially called plugins now after the big conversation we invited everyone into. It's a small detail but an important one and since it affects usability, we wanted to make sure you were all involved.)

Why am I writing about it now? Apart from the fact it's been weeks since our last blog post, I really wanted to pimp out the fact that plugins now exist for it - you see, last month when I talked about it, it was still just fresh off the design board, had a few rough edges but worked. Now, some of those rough edges have been smoothed out - you can, for example, actually delete plugins now once they're disabled.

But that's not really what I wanted to talk about. I wanted to talk about the plugins themselves, and I've attached a screenshot from the plugin manager as it is on my PC right now.

First up, you might be wondering why WedgeDesk is broken, when it would be a plugin I'd be more inclined to keep updated. Well, it's only because I very recently changed the hook mechanics in the display page, phasing out the old display_buttons hook and I haven't yet updated WD for the new hook, but that's something I'll do soon enough. (It's also, incidentally, how I realised it wasn't possible to delete a plugin that couldn't be enabled for whatever reason)

All of the other plugins were discussed in http://wedge.org/pub/6929/personal-plugin-showcase-yes-i-m-an-attention-grabbing-git/ - a somewhat aptly named thread, if I may say so myself. ;) If you're curious about any of the plugins I would encourage you to go read that thread, as it has pictures and more details about them.

It's actually listing them alphabetically, though I think I need to change that to include natural case sorting (r in reCAPTCHA comes after Z in the ASCII table, and it probably should discount the case) and I suspect the interface may need some changes going forward to cope with lots of plugins at once - but that's why I'm opening the floor now, so that if you have any thoughts about that, that there's a venue to share them now that you can actually see what having multiple plugins at once would look like.

Oh, and I suppose to validate that it's not some kind of random hyperbole - these are real plugins that can be used :)

It's been a fun period these last few days, kicking out small plugins - I've spent maybe an hour and a half per plugin, and in that time I've been able to establish that the hooks are present for the plugins to work with, and if they weren't present, to make them available; until I wrote the reCAPTCHA plugin, the hooks to extend the verification system didn't exist, for example.

It's also interesting in other ways, I get to test other systems in Wedge, and find ways to enhance them; one of the screenshots I've posted for 'Flitter' in the above-mentioned thread shows a 'Your settings have been saved' message - this is an enhancement I only added recently as I couldn't be sure whether saving had been done without going into the DB. It's a usability enhancement, and it doesn't require plugins having to manually support it; it's covered totally automatically for standard settings pages :) And I managed to find a small bug in the admin pages because of doing plugins, there's really no better way to test how things work than by trying to break them!

My plugins repo is not publicly available (though a few people do have access to it) and I certainly wouldn't call these release-quality, in almost every case it's to prove the system is up to the job, rather than to make sure there's plugins for everyone when we get round to doing some kind of launch (and I can't see my releasing the plugins before Wedge 1.0 gold anyway)

Sadly, I'm going to have to leave it here for now, it's late, I have a few things to do before bed, and even more sadly I couldn't find a good musical reference to leave in this post :( But as the philosopher Jagger once said, you can't always get what you want. But if you try sometimes, you might just find you get what you need.
But there you are, that's where I am right now :)

📎 wedge_plugin_manager.png - 30.28 kB, 640x368, viewed 1,700 times.

When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial




Re: Plugging in the Plugin Manager
« Reply #19, on October 12th, 2011, 12:22 AM »
Works for me, got me here just fine.

It's down to the page boundary crossover where it breaks. I did the code differently when I added that in Wedge.


Re: Plugging in the Plugin Manager
« Reply #21, on October 12th, 2011, 12:29 AM »
Hmm, I don't know exactly what's wrong with it, I just know it's a bit fussy at times :P


Re: Plugging in the Plugin Manager
« Reply #23, on October 13th, 2011, 01:25 AM »
OK, so I've been thinking about this a bit more, having been making the Birthdays plugin.

Now, the performance engineer in me wants to create a file whose purpose is simply to add a new item to the admin area, and a file for handling settings, while the pragmatist in me wants to stick with the one file, accepting the limitations thereof.

I can't help but think I'd avoid this issue by creating structure in the plugin manager itself that made it able to append new items (or entire new sections), as appropriate. I was always reluctant to do it from there, from the position that I'd rather see plugins not be hampered by having to fit into boxes, so to speak, but I'm thinking that for typical plugins (i.e. those who just don't really care where they end up and are content to be 'end of the list') it would be useful.

Thoughts?
Re: Plugging in the Plugin Manager
« Reply #24, on October 13th, 2011, 03:02 AM »
I'm also thinking this might be useful for simple plugins to extend the admin search interface. I find it stupid that I have to declare a function just to put one line in it.

e.g.

Code: [Select]
function birthdayAdminSearch(&$settings_search)
{
$settings_search[] = array('ModifyBirthdaySettings', 'area=birthdays');
}

Hmm. It's time for bed, I'll sleep on it and see how I feel about it in the morning as like the above it has to be stored somewhere, you can't just keep hammering the XML on loading the admin (though it's marginally easier on searching because it's not every-single-admin-page the way the main admin areas list is.


Re: Plugging in the Plugin Manager
« Reply #26, on October 13th, 2011, 09:35 AM »
I'm sensing it would be its own $modSettings entry maintained by the plugin manager.

Implementation details aside, is it practical and desirable to have these things controlled by the plugin manifest?