Page 1 of 1
feature request/bugfix - recent entries plugin
Posted: Sun Feb 05, 2006 10:11 pm
by carl_galloway
Hi all,
I recently discovered that the recent entries plugin does not play well with posts that have no title. I've been playing with different 'wrong' things that users can do to break a theme, and whilst I have found a fix for entry titles, as below;
Code: Select all
<h4 class="serendipity_title"><a href="{$entry.link}">{$entry.title|@default:$entry.body|truncate:40:" ..."}</a></h4>
I have not been able to do anything with the recent entries plugin. Is it possible to either truncate the entry body like I've done in my entries.tpl, or at least put the entry id in. Without a title or id the link to the post obviously doesn't work, which leaves you with a date on its own, and no way of reading that particular post. See
my themes website for the page.
Re: feature request/bugfix - recent entries plugin
Posted: Mon Feb 06, 2006 1:37 pm
by garvinhicking
Hi!
This is not as easy as it sounds. The problem is within the recententries plugin, the entry body is not available. Fetching it would mean a considerable overhead.
So we only have the timestamp and the id and an empty title. I've now inserted the "#XXX" ID inside the link...
Regards,
Garvin[/list]
Posted: Tue Feb 07, 2006 9:10 pm
by judebert
How about checking for blank title when the entry is saved, and forcing a title if none exists?
Posted: Tue Feb 07, 2006 9:28 pm
by carl_galloway
Guys, sorry to be such a pain in the ass, I know you probably didn't plan on doing half the stuff I've been pushing for, but on the other hand just think how cool s9y will be ....
Carl
Posted: Tue Feb 07, 2006 9:36 pm
by garvinhicking
There is a plugin "entrycheck" that can check for empty titles, but this of course doesn'T solve Carls initial trouble.
I'm afraid, for that singular issue a fix is just too expensive for the little benefit it would IMHO bring. Blog entries without titles are rare. They also make trouble in RSS reader...and why would anyone do that for real
Regards,
Garvin
Posted: Wed Feb 08, 2006 5:08 pm
by carl_galloway
oh Garvin, you are so innocent

, some users really do this. What about a simple check to see if the title is empty (like when a category isn't used) and then a little javascript that stops you saving the entry until you have one?
Carl
Posted: Wed Feb 08, 2006 5:11 pm
by garvinhicking
Actually, that's what the plugin is for. I wouldn't want to force users into having non-empty titles, because some people might need to tweak their own titles to use non-empty titles, and the s9y core shouldn't disallow it.
Well, actually it's really all about the recent entries plugin, where I did insert the entry ID which helps for that rare cases?
Regards,
Garvin
Posted: Wed Feb 08, 2006 8:05 pm
by carl_galloway
yeah your fix does solve the problem, if you consider it a problem.
Thanks,
Carl