Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-05-01 14:28:49

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Text separator for Search and others things

In vanilla Textpattern, the text excerpt return by a search is separated by ... . First of all, it should be an ellipsis and not three dots, but more important not all languages use an ellipsis or a pure ellipsis for this kind of truncation (for example French use […] but I’m sure Oriental and Middle-Eastern languages have very different ones).

There’s two way of addressing this:

  1. Create a i18n string, and gtxt() it. It’s simpler for newcomers, faster for everyone.
  2. Use a tag attribute to specify what to use to truncate text in the relevant tags (right now that’s search, but it may be used by other things, like an auto-excerpt plugin). It allows to use whatever string one’s wants.
  3. Or, of course, both. The i18n string is the default if no attribute is specified.

I was going to submit a tiny patch for the first part, but I can’t find where the dots are generated anymore. It used to be in search.php (and it’s still in the source), but it’s labeled as deprecated, and the doarticle() don’t have any ...

Offline

#2 2007-05-01 15:59:17

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Text separator for Search and others things

This was fixed in crockery already (we’re trying not to add new stuff to the dev branch).

Offline

Board footer

Powered by FluxBB