Public area => The Pub => Plugins => Topic started by: live627 on January 11th, 2012, 09:20 AM
Title: Show Hooks
Post by: live627 on January 11th, 2012, 09:20 AM
I got this idea from http://custom.simplemachines.org/mods/index.php?mod=3285 (Integration Hooks Report, by Emanuel and Sinan).
This plugin is basically the same principle as the SMF mod linked above, but with some Wedge-y aspects (which, incidentally, are impossible in SMF, or, at least, extremely convoluted). It shows all hooks installed on the platform, categorised by plugin as can be seen in the attachment. Yet, there will be some stray hooks where webmasters customise their forum,, if they didn't edit the core.
There is a drop down box which allows for filtering by a specific plugin, stray hooks, or none at all.
Title: Re: Show Hooks
Post by: Nao on January 11th, 2012, 11:38 AM
Quite interesting!
Title: Re: Show Hooks
Post by: TE on January 11th, 2012, 11:45 AM
Extremely useful for plugin developers, would be nice as a build-in feature :cool:
Title: Re: Show Hooks
Post by: Arantor on January 11th, 2012, 12:26 PM
Oh, that's NICE. I deliberately didn't think about it being core, partly because I felt it could be done better as a plugin, partly because I suspect most users don't care and partly because I couldn't visualise a good UI. But I knew it could be done :)
Title: Re: Show Hooks
Post by: Nao on January 11th, 2012, 01:37 PM
I'd like to see that core too, yes.
Does it/would it provide the list of functions currently attached to any hooks...? As well as the ability to disable them?
Title: Re: Show Hooks
Post by: live627 on January 12th, 2012, 12:31 AM
Quote
would be nice as a build-in feature
I'd tend to say otherwise. It would only be of REAL use to plugin developers. The average admin wouldn't even care, so long as what they use works. Since the latter is in the vast majority, I'd feel most woad see this as bloat.
Quote
disable them?
Only stray hooks can. I deliberately disabled the remove checkbox for plugin hooks on the assumption that either all or none can go.
Quote
Does it/would it provide the list of functions currently attached to any hooks...?
I like that idea and I know just how to implement it.
Quote
visualise a good UI.
Do you think the one I came up with is good?
Title: Re: Show Hooks
Post by: Arantor on January 12th, 2012, 12:31 AM
Yes, I think you came up with a good UI, though it's hard to tell exactly what the screenshot is showing since it got resized on upload :/
Title: Re: Show Hooks
Post by: live627 on January 12th, 2012, 12:47 AM
I'll see if putting it in Aeva would help.
Posted: January 12th, 2012, 12:43 AM
Alright, I can't.
Title: Re: Show Hooks
Post by: Arantor on January 12th, 2012, 01:00 AM
Try it now. I created a new profile in the permissions that should allow you to upload to it.
Title: Re: Show Hooks
Post by: live627 on January 12th, 2012, 01:11 AM
It works, but The file size is larger (78049 KB) than the system allows. It's 162K.
Title: Re: Show Hooks
Post by: Arantor on January 12th, 2012, 01:16 AM
Huh, try that now.
/meidly speculates this will want some UI love going forward.
Title: Re: Show Hooks
Post by: live627 on January 12th, 2012, 01:32 AM
It went through akright. Thanks for bothering to set it up for me.
Title: Re: Show Hooks
Post by: Arantor on January 12th, 2012, 01:36 AM
No worries :)
FWIW, the album should be set up so that anyone in the Consultants group can post images to it. I might end up posting some of mine to it sometime as and when I get time :/
Title: Re: Show Hooks
Post by: live627 on January 12th, 2012, 01:43 AM
It uses the 'Consultants' profile. As to selecting which groups can write to it, I saw only 'Regular Members'.
Title: Re: Show Hooks
Post by: Arantor on January 12th, 2012, 01:47 AM
...ok, now I'm confused. I have no idea why that should be.
(Honestly, I get more than a shade confused by Aeva's permissions.)
Title: Re: Show Hooks
Post by: Arantor on January 12th, 2012, 02:43 AM
Also, I like the interface better now I can see it.
Might I suggest two separate views for this? The current one gives you the hooks split by different plugins, but I'm also thinking it might be useful to have the hooks just in their own order.
Incidentally, to really make use of that it would be handy if we had some way of classifying hooks (like is done in the comments currently, but more formally so), so that we could group them by functionality (and for hooks added by plugins, we could break them down by plugin that adds hooks)
Hmm, more thought required.
Title: Re: Show Hooks
Post by: Nao on January 12th, 2012, 08:14 AM
Is there really a priority flag in hooks..? I don't remember seeing that...
Title: Re: Show Hooks
Post by: Arantor on January 12th, 2012, 08:49 AM
There has been for a while...
Title: Re: Show Hooks
Post by: live627 on January 12th, 2012, 08:53 AM
Is there really a priority flag in hooks..? I don't remember seeing that...
Kinda like in WordPress, where you can specify a hooked action or filter to be run before or after the other.
Title: Re: Show Hooks
Post by: Arantor on January 12th, 2012, 04:47 PM
This is looking like a very sexy plugin.
Have to say, actually, late last night I was thinking about this particular plugin and whether it wouldn't be a bad idea to have some kind of SDK package as a single plugin that included this, plus other tools (like the DB structure -> XML plugin I mentioned, as well as one for converting bbcodes you'd developed in the to-be-built editor into XML)
Title: Re: Show Hooks
Post by: live627 on March 12th, 2012, 05:33 AM
What does the grey icon look like? A hook, or a knight from chess? :^^;:
Title: Re: Show Hooks
Post by: Arantor on March 12th, 2012, 08:57 AM
Looks like a hook :)
Title: Re: Show Hooks
Post by: Nao on March 12th, 2012, 01:18 PM
A Möbius strip? (RIP Moebius(http://en.wikipedia.org/wiki/Jean_Giraud), BTW. A very influential French comic book artist who was also the costume and world designer on the first Tron, and also made concept art for Alien and The Abyss among others.)