Modifying Admin - is there a module type for the Admin section?
Posted: Thu Feb 09, 2006 12:19 am
First thing: I like CMS a lot, and have used it for a couple of non-profit websites so far. (It rocks, and I tried out at least 15 CMSes before settling on CMS.) Now I have a better-paying client. They want to maintain page content themselves, and would like more granular permissions, such as limiting admin users to modifying pages only in certain "sections" of the website (sections determined by the menu hierarchy and content_alias field.)
I spent time with CMS's admin code looking for a way to integrate external admin code, maybe plugin-style. But it looks like I'll be modifying the various scripts under ./admin to obtain the functionality I'm looking for. Technically I have no problem doing that, but then what about when updates to CMS come out? I'll be out of sync and have to reintegrate my code, and redeploy to customers. Time-consuming.
One other option is to extend the Admin menu. This implies that the new menu link would point to one of my own scripts, and then my code'll take charge from there. That'd be alright, but that means replicating a lot of admin code that already exists. For example, ./admin/listcontent.php displays content in the system. Great, and I'd like to make it "know" about the "sections" of the site to which user groups will be granted modify permission. (I looked into subclassing AdminTheme, but the admin menu definition it contains is hard-coded, and I didn't see a way to graft on new menu choices without duplicating the entire menu definition in the subclass.)
So, my dilemma is, I'd like to add features to Admin without making it so that the code has to be reinserted every time there's a new release! I'll post my mods to version control here, but there's always the possibility that a feature I develop won't be of interest to anyone else, you know?
Any ideas about this situation appreciated...
-sloop
I spent time with CMS's admin code looking for a way to integrate external admin code, maybe plugin-style. But it looks like I'll be modifying the various scripts under ./admin to obtain the functionality I'm looking for. Technically I have no problem doing that, but then what about when updates to CMS come out? I'll be out of sync and have to reintegrate my code, and redeploy to customers. Time-consuming.
One other option is to extend the Admin menu. This implies that the new menu link would point to one of my own scripts, and then my code'll take charge from there. That'd be alright, but that means replicating a lot of admin code that already exists. For example, ./admin/listcontent.php displays content in the system. Great, and I'd like to make it "know" about the "sections" of the site to which user groups will be granted modify permission. (I looked into subclassing AdminTheme, but the admin menu definition it contains is hard-coded, and I didn't see a way to graft on new menu choices without duplicating the entire menu definition in the subclass.)
So, my dilemma is, I'd like to add features to Admin without making it so that the code has to be reinserted every time there's a new release! I'll post my mods to version control here, but there's always the possibility that a feature I develop won't be of interest to anyone else, you know?
Any ideas about this situation appreciated...
-sloop