2010-07-14, 04:41 PM
I'm sure this has been bought up before but there's not been any changes made yet for it.
The Mod CP is a great feature with loads of potential but it's nearly impossibly to write plugins for. There's only 5 hooks; 3 for reports, one for the ban list, one at the start. Most actions have no hooks at all, not including modcp_start which is obviously always available, but that hook is often just as unusable as having no hooks at all. I was going to write a quick plugin involving banning but gave up because I had to copy a load of code from modcp.php; I had to use modcp_start, so all the code to check the validity of the ban and whether you have permission to do it etc is after the hook has been called, so to make those same checks for my code I had to copy and paste everything, and then the same code, including queries, would be run again later on in the default code. If there was a hook somewhere in the action after these checks had been done it'd be so much easier and more efficient.
I wouldn't consider this a feature as it's not something that has to be thought about, designed, developed or tested, it'd be a 5 minute copy/paste/edit job. It'd be a shame to have to wait until 2.0 to have a plugin-able Mod CP, if every action had a start and edit hook it'd be so much better.
The Mod CP is a great feature with loads of potential but it's nearly impossibly to write plugins for. There's only 5 hooks; 3 for reports, one for the ban list, one at the start. Most actions have no hooks at all, not including modcp_start which is obviously always available, but that hook is often just as unusable as having no hooks at all. I was going to write a quick plugin involving banning but gave up because I had to copy a load of code from modcp.php; I had to use modcp_start, so all the code to check the validity of the ban and whether you have permission to do it etc is after the hook has been called, so to make those same checks for my code I had to copy and paste everything, and then the same code, including queries, would be run again later on in the default code. If there was a hook somewhere in the action after these checks had been done it'd be so much easier and more efficient.
I wouldn't consider this a feature as it's not something that has to be thought about, designed, developed or tested, it'd be a 5 minute copy/paste/edit job. It'd be a shame to have to wait until 2.0 to have a plugin-able Mod CP, if every action had a start and edit hook it'd be so much better.