Just wondering: Is there a way to serendipity_fetchPrintEntries without images potentially included in those entries, but keeping the markup intact?
YL
serendipity_fetchPrintEntries, but no images
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: serendipity_fetchPrintEntries, but no images
I cannot see an easy way to do that. you can strip all html from the entry, but that does not seem to be what you want. You could search the entry for image code then strip (or replace) only that code, but that is problematic too because an image might begin with <img>, but if it has comments, it would begin with a <div class="serendipity_imageComment">....
How about the lazy route - make sure images are only used in the extended body, then fetch only the entry body???
How about the lazy route - make sure images are only used in the extended body, then fetch only the entry body???
=Don=
Re: serendipity_fetchPrintEntries, but no images
*sigh* I was assuming that, but I thought I'd ask anyway.Don Chambers wrote:I cannot see an easy way to do that.
Jeez, no.Don Chambers wrote:you can strip all html from the entry, but that does not seem to be what you want.
Yeah, well, I got five words for you: Multiuser blog plus wysiwyg editor. (In other words, prone for error. It's not the best solution I can think of theoretically, but probably the only one existing.)Don Chambers wrote:How about the lazy route - make sure images are only used in the extended body, then fetch only the entry body???
YL
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: serendipity_fetchPrintEntries, but no images
Definitely a worst-case scenario, especially if the images need to be part of the entry, and are not contained within an extended property field.yellowled wrote:Yeah, well, I got five words for you: Multiuser blog plus wysiwyg editor. (In other words, prone for error.....)
YL
=Don=
Re: serendipity_fetchPrintEntries, but no images
Perhaps you could suppress the image with CSS? It would still be fetched, just never displayed. Something like:
Of course, if you still need the images in the single-entry view, you'd have to include that CSS through your template, checking the $view variable.
Code: Select all
.serendipity_entry_body img {
display:none;
}
Re: serendipity_fetchPrintEntries, but no images
Hmmmmm ...judebert wrote:Perhaps you could suppress the image with CSS?
Yes, I do -- but that shouldn't be difficult here since this template has a Mimbo-ish start page anywayjudebert wrote:Of course, if you still need the images in the single-entry view, you'd have to include that CSS through your template, checking the $view variable.
I'll have to check it out in detail, but this sounds promising. Thanks for the input, Jude!
YL