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
Length of entry (number of lines) limit setable?
-
- Regular
- Posts: 88
- Joined: Fri Oct 08, 2004 6:20 am
- Location: 33°6'4.079" North, 117°3'6.563" West
- Contact:
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?
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.
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.
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: Length of entry (number of lines) limit setable?
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".
Provide your "overview" as the entry body, and the extra stuff in the "extended body".
=Don=
Re: Length of entry (number of lines) limit setable?
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.
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.
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: Length of entry (number of lines) limit setable?
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:
You are looking for {$entry.body}. You can truncate it like this:
Code: Select all
{$entry.body|truncate:200:" ..."}
=Don=