Proof of concept: Modify the admin area - no core mods

Post your new plugins here!
User avatar
LordMatt
Posts: 33
Joined: Wed May 01, 2013 7:46 pm

Proof of concept: Modify the admin area - no core mods

Postby LordMatt » Sun Jun 08, 2014 9:15 pm

I have been thinking about this for quite some time now so I finally got on and wrote it. This is a PoC plugin that actually only puts an extra box in the admin area saying that it worked but the entire admin area can be edited, links can be changed, new menu items can be added anywhere and the functionality of all things can be overridden and altered at will. Better yet there is not a core mod to be seen. Not one.

That said there are quite a few files and a few htaccess tricks needed to get it working.

You can find the code here:

https://github.com/Lord-Matt-NucleusCMS ... NucleusCMS

How it works is that there is an extended version of ADMIN.php which gets loaded instead of the normal one which allows the output to be captured and made available as a simpleXML object that can be edited.

The framework gives you three new events but the most important one is the one that gives your plugin the admin area as an object. I chose this method as the admin area is XHTML strict and it is very hard to break that in simpleXML.

To make it work a htaccess file in the /nucleus/ folder rewrites requests for index.php to a new file so the old one is never edited. The files for the mod all go in a special folder out of the way and you can update your copy (or not) as you wish and nothing will break (in theory).

The plugin itself is just to show that you can fiddle with the admin area all you want now.

Return to “Plugin Development”