Page 1 of 1
Length of entry (number of lines) limit setable?
Posted: Tue Oct 19, 2004 11:47 pm
by Jack
Hi - when you first log into the tool, the latest entries are displayed in their entirety. I would prefer to limit them to, say, 10 lines. If anyone wants to view the entire entry, they can click on the entry header as per normal operation. Is this possible in the current build of Serendipity by setting a value or adding a few lines of code?
Thanks
Posted: Wed Oct 20, 2004 3:51 am
by tadpole
There isn't really anything to do this automatically, but I think what you're really looking for is the extended entry part of the post. The textarea is hidden by default, but at the bottom of the new entry, you'll see some text that says 'Extended Body' (unless you aren't using English...) with a little plus sign next to it. Click it, and put everything you don't want in the textarea that appears.
Re: Length of entry (number of lines) limit setable?
Posted: Sat Aug 27, 2011 3:06 am
by VE2ZAZ
Hi,
Seven years later, that is exactly what I am trying to do: To limit the number of entry lines displayed on the main page and force the readers to click on the entry link to view the whole entry, including comments. Anyone knowing how to do this?
The reason behind this is that the comments are not displayed on the main page, and the readers may not notice that there are "comments(x)" written at the upper right corner, so they will likely read the entry on the main page and miss all the comments...
Thanks in advance,
Bert.
Re: Length of entry (number of lines) limit setable?
Posted: Sat Aug 27, 2011 4:18 am
by Don Chambers
Bert - you can certainly modify your template's files to emit only a specific number of characters... but the best way to deal with this is really as an author....
Provide your "overview" as the entry body, and the extra stuff in the "extended body".
Re: Length of entry (number of lines) limit setable?
Posted: Sat Aug 27, 2011 6:08 pm
by VE2ZAZ
Hi Don,
Funny, I never thought of using that feature. I will give it a try.
Otherwise, would you happen to know what template file to modify to force a maximum number of characters for each entry on the main page? I use the Blue Streak style.
Thanks in advance!
Bert.
Re: Length of entry (number of lines) limit setable?
Posted: Sat Aug 27, 2011 6:19 pm
by Don Chambers
entries.tpl. If your template does not have that file, you can copy it from the /templates/default/ folder to your template folder, then modify it there.
You are looking for {$entry.body}. You can truncate it like this: