Focus of the admin-section
Posted: Tue Feb 21, 2006 12:48 am
Hello All
As you know I maintain (or tries to, at least) the Xinha module. This has proven quite difficult to complete mostly due to path-troubles, and I understand I'm not the only one with these problems resulting in various hacks like javascript correction of paths etc.
The sole cause to the trouble I think is the different focus'es of the admin and the user section and I therefore wondered if it was possible to maintain the root focus eventhough in admin, and I tried to hack a bit. In less than an hours work I got half the admin to work, including moduleinterface and theming, without leaving the root focus!
I use a simple admin.php?file=listcontent.php structure with some checks to prevent url-tricks. I also got my Xinha module to work perfectly, as all my relative/absolute bugs vanished into thin air!
Of course I would not suggest such a rather radical change just to fix my own small module-problems, so I thought about pros and cons for this change, and so far came up with this list:
Pros:
- Same focus for admin and userside is easier to figure when doing modules which can be used from both "sides"
- WYSIWYG-modules are FAR easier to get to work
- WYSIWYG-modules are easier to get to work on client side also
- We get rid of that odd include("../include.php"); etc. inserted everywhere across the admin-files
- Admin-files still confined to the admin-dir, just called through /admin.php
- Modules can be made more ready for a possible future rewrite of the admin as a module of its own
- A lot of the changes can be made in existing system-functions hiding the change from most users/programmers.
Cons:
- It requires fixes all over the admin-section (I'll gladly do it, it's quite easy)
- It may require small changes in modules, but as long as the API-url-path-generating function are used most of if can be fixed centrally in the class.module.php file
That's what I came up with for the moment...
I know it's rather a large step, but I hope you'll consider it for post-0.12 pre-1.0 stuff. As for the admin-section itself, it should be rather straight-forward to do, and I'd be glad to do it all! The trouble is of course the modules, which all will have to be checked, though I think a lot will work "out-of-the" box!
Looking forward to hearing your thoughts, and please do not chop my head off if you think it's the dummest idea on the planet.
Best regards
Morten/Silmarillion
As you know I maintain (or tries to, at least) the Xinha module. This has proven quite difficult to complete mostly due to path-troubles, and I understand I'm not the only one with these problems resulting in various hacks like javascript correction of paths etc.
The sole cause to the trouble I think is the different focus'es of the admin and the user section and I therefore wondered if it was possible to maintain the root focus eventhough in admin, and I tried to hack a bit. In less than an hours work I got half the admin to work, including moduleinterface and theming, without leaving the root focus!
I use a simple admin.php?file=listcontent.php structure with some checks to prevent url-tricks. I also got my Xinha module to work perfectly, as all my relative/absolute bugs vanished into thin air!
Of course I would not suggest such a rather radical change just to fix my own small module-problems, so I thought about pros and cons for this change, and so far came up with this list:
Pros:
- Same focus for admin and userside is easier to figure when doing modules which can be used from both "sides"
- WYSIWYG-modules are FAR easier to get to work
- WYSIWYG-modules are easier to get to work on client side also
- We get rid of that odd include("../include.php"); etc. inserted everywhere across the admin-files
- Admin-files still confined to the admin-dir, just called through /admin.php
- Modules can be made more ready for a possible future rewrite of the admin as a module of its own
- A lot of the changes can be made in existing system-functions hiding the change from most users/programmers.
Cons:
- It requires fixes all over the admin-section (I'll gladly do it, it's quite easy)
- It may require small changes in modules, but as long as the API-url-path-generating function are used most of if can be fixed centrally in the class.module.php file
That's what I came up with for the moment...
I know it's rather a large step, but I hope you'll consider it for post-0.12 pre-1.0 stuff. As for the admin-section itself, it should be rather straight-forward to do, and I'd be glad to do it all! The trouble is of course the modules, which all will have to be checked, though I think a lot will work "out-of-the" box!
Looking forward to hearing your thoughts, and please do not chop my head off if you think it's the dummest idea on the planet.
Best regards
Morten/Silmarillion