Mark threads with "[2.0]" for discussions about features in the longer-term future, "[1.6]" is for short-term. This is not the place for general discussions or plugin or template requests. Only features that are approved to happen by the core team should be listed here for better structuring.
Yes, but smartifying configuration.inc.php, personal.inc.php and overview.inc.php do not really need to, since they contain to less html code to smartify, as is (maybe the last somewhere else).
Ian: That's true, some pages use internal function which emit html-code as well. In the long run, we should probably smartify them too. In the beginning, every page should have a template anyway, since we don't know what will be added to them.
I already used ob_start() and ob_get_content() as a workaround for serendipity_plugin_config.
Malte, I found this script erroring...
I did have to take the sed regexes line by line, except one, I do not remember, which errored.
But it would be nice to have inner single quotes like #{serendipity_getFile file=\'\1\'}#g instead of #{serendipity_getFile file=\"\1\"}#g on the onehand and #{\1|escape:\'html\'}#g instead of #{\1|escape:\"html\"}#g.
I dont think we need $foo|escape:'html' either, as we are just rebuilding php's htmlspecialchars, which should be single |escape in Smarty.
Btw is it still possible to use ob_get_contents on function outputs, which throw some error notices with printf and return true/false at the end?
Na, that's not worth it. First of all it's not that way where i got it from, and i don't think it's prettier ;)
I finished another three files
Great :)
All of those files will need testing. But it will be tested at least when the new adminarea gets build. Just make sure they don't throw errors when only loading the page or following the easy-to-test options.
That'd be it. All files have been smartified. Thank you very much for the help, Ian!
Work to be done: Some admin-files use functions to emit html-code, which themselves don't use smarty. They probably should get transformed too. A probably incomplete list:
Most important: Testing. I guess that most of the testing will be done anyway or would become invalid when the new backend gets build. But some events won't work at all, some forms not as expected, all that has to be fixed before this gets into any release.
It should now be possible to modify the admin-area more easily.
Last edited by onli on Sat Mar 03, 2012 2:41 pm, edited 2 times in total.
onli wrote:That'd be it. All files have been smartified. Thank you very much for the help, Ian!
And thanks to both of you for the effort.
Not quite sure as to how to proceed now, to be honest. Obviously, first of all all the .tpl files required for the backend need to be rewritten, but this only makes sense if we also rewrite those not placed in /include/admin/tpl/. Should I edit the ones in /templates/default/ or create a whole new directory or …? Can we go completely nuts in the 2.0 branch and try everything or should we first test it before committing to the core repo?
yellowled wrote:Should I edit the ones in /templates/default/ or create a whole new directory or …? Can we go completely nuts in the 2.0 branch and try everything or should we first test it before committing to the core repo?
As for the first part, I think it makes sense to do that in 2k11. It doesn't have an admin theme yet, it will likely become the default or at least standard theme at some point, so it makes sense to add one, I guess.
Me too, but that might be a long shot. However, given the fact that these tpl files are supposed to be "locked", we're gonna have to move them at some point anyway.
Well, moving the /tpl dir files to the templates/default/admin/ is no big deal, but this might be discussed later, as this is the point of Garvins concerns having a full public admin template spread out to the wild....
To keep this in our hands, we really should leave it where it is for the moment. And yes, default is the right place, as we did not smartify the files to have a fallback case.
So you have 3 or 4 possible points to work with:
- /include/tpl/ (internally smartified before) These could also keep smarty blocks for the upper mentioned functions in future.
- /include/admin/tpl/ (the ones now smartified by Malte and me)
- /templates/default/admin/ (index, entries, media*) and possibly at some time
-/include/admin/importers/tpl/
Going completely nuts is no good, a little bit of testing would be good to have before pushing!