Since previewing draft and future entries in 2.0 opens in the same window as new page, I would like to revert this for the 1.7 Series too, since there they currently open as a "_blank" new window without sidebar and banners. Ok?
Twiddling with this, I found a funny behaviour:
The file preview_iframe.tpl does have access to the current templates config, and knows about template_config setters for example, but does not access
Code: Select all
Code: Select all
This sounds easy to manage on first view. Playing with that, I found all the functions to build and access iframed previews and the nature of serendipity_getFile to be far more detailled and finetuned, than a first look really offers. (*)
I tried to find out why serendipity_getFile does not work there, maybe as an result from Smarty3 scoping, but this seems to do in 2.0. (Why?)
As a minor: Also the .css and js call do behave different, when being called by this, since the first writes "user.css" and does only return a 404 not found and the second errors empty "", but with a syntax error in console.
My local tests on this returned, that this seems not to be attributed to the Smarty3 scope, since also happens in my local test 1.6 Series install. Can anyone of you verify this for old 1.6 and current 1.7 Series too, please! (Since I don't really have clean releases. Open iframe page source code to check)
Then it would be nice to know, if we can make serendipity_getFile happen to work in 1.7x too or rename the path builder in both files and both branches as showed above to make sure.
What do you think?
(*) This, btw, is what I often experience with S9y. Easy and old looking code (remember the "kiddy"... ) often offers far more, than you can see, coming from one certain point of view. Knowing this, I try to be very careful before I change code.