Page 1 of 1

previewing with iframes

Posted: Tue May 17, 2005 8:06 pm
by winkiller
Image

a) long blank space that's not there when not using IFrames (also with really long articles)
b) written by _missing author name_
c) 0.8 had it, 0.8.1 still has it

I'd gladly fix it, but as I'm really new to the s9y-code I have no idea where to look.

Re: previewing with iframes

Posted: Wed May 18, 2005 12:13 pm
by garvinhicking
The problem is related to CSS issues; when not using iframes the CSS of your frontend cannot be loaded and thus may not affect the preview.

I think we had to introduce a X pixel transparent floating image on the left side for the entry to fix some commin height problems; the iframe adjusts its height according to the entry, but on some themes this did not work.

Sadly this issue is a bit hard to debug, put I'll try to put it on my todo list.

The missing author name must be because a global array in the preview is missing a proper array index.

If you care to get into the code (which I would greatly appreciate) here's a list of files/functions you should investigate:

include/functions_config.inc.php:
- function serendipity_is_iframe()
- function serendipity_iframe()
- function serendipity_iframe_create()

include/functions_entries.inc.php:
- function serendipity_print_entries()
(there watch out for the use of the $preview variable and then $entry associative array; also look at templates/default/entries.tpl where the author key is emitted:

Code: Select all

{$CONST.POSTED_BY} <a href="{$entry.link_author}">{$entry.author}</a>
HTH and thanks for your feedback,
Garvin

Posted: Wed May 18, 2005 2:55 pm
by Guest
I'll try to get through the code soon

Posted: Wed May 18, 2005 5:06 pm
by winkiller
OK, already sent 2 fixes, perhaps it's resolved now =)