Found x static pages: question

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
aschlemmer
Regular
Posts: 70
Joined: Fri Feb 23, 2007 6:13 pm
Location: Freiburg/Germany
Contact:

Found x static pages: question

Post by aschlemmer »

Hi all,

first, thanks for the excellent support here in this forum.

Here's my question: Where can I localized the search results header "Found x static pages:" -- even a full text search over all s9y files didn't give me a the idea ...

And, also: Which options are available after @escape: ?
i did use:

Code: Select all

|@escape:none|@truncate:200:
to remain the formatting in a static pages search hit.

TIA, Achim
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

If you want to define other/new text for your template the best way is to add new variable names in the tpl-files of your template and define these in a lang_xx.inc.php in your template folder. (xx is the language-code like _de or _en) And the same in an UTF-8-folder for the UTF8.

But if you want to override text-variables, which are still used by s9y (when you do not want to add new ones in the template-files or - and this is your point here - you want to override variables used by plugins), you have to do define them in lang-files as described above, but you must tell s9y that it should load your lang-files first! You can do this by adding some text to your serendipity_config_local.inc.php:

Code: Select all

	// End of Serendipity configuration file
	// You can place your own special variables after here:

	$serendipity['useTemplateLanguage'] = true;

but there is a little problem in the moment: The overriding for plugin-text do not work in the moment: http://board.s9y.org/viewtopic.php?t=9422&highlight=


but you can test it like this:

make a new definition for a standard-s9y-variable in your template-folder:

Code: Select all

@define('POSTED_BY', 'The author of this article:');
(normal is "Posted by")

wrong way: to edit the lang-file in the plugin-directory, because after a plugin-update all changes are away.
Ciao, Stephan
aschlemmer
Regular
Posts: 70
Joined: Fri Feb 23, 2007 6:13 pm
Location: Freiburg/Germany
Contact:

Post by aschlemmer »

Thanks, Stephan!

This is very sad! So I'm obliged to confront German users with an English status message like "Found 1 static pages:"??

This is really a drawback and the first point where I'm really worrying about s9y!

Isn't there a way to edit the original plugin code? (Even if I must change this with every update)

Thanks,
Achim
aschlemmer
Regular
Posts: 70
Joined: Fri Feb 23, 2007 6:13 pm
Location: Freiburg/Germany
Contact:

Post by aschlemmer »

ah, just tested and worls:

Defined inside the plugin lang-file:

@define('STATICPAGE_SEARCHRESULTS', 'Andere Seiten gefunden:');

Now I must assure to add this line with every update. Annoying. But I'm even happy with this workaround.
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

This is very sad! So I'm obliged to confront German users with an English status message like "Found 1 static pages:"??
as I see, there is a german lang-file in this plugin, but in there is no definition for STATICPAGE_SEARCHRESULTS, so the first way would be to add something like

Code: Select all

@define('STATICPAGE_SEARCHRESULTS', 'Weitere %d Seiten gefunden:');
in the german files (normal and UTF8).

This had to be make to the plugin in the CSV by one of the maintainer here - Gaaarvin!!!!
This is really a drawback and the first point where I'm really worrying about s9y!
As I read in the mentioned thread in the moment this (no possibility to load user-defined-overriding-phrases to plugin-variables) is a side-effect of the new plugin API - so it would be realy sad if there is no other way. :-(

But Garvin says overriding phrases is a not so important thing and the API is more important - because I am one of a very little group who uses these feature. :-( So, every one who wants to override such phrases should to notifiy it! :-)
Ciao, Stephan
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

stm999999999 wrote:

Code: Select all

@define('STATICPAGE_SEARCHRESULTS', 'Weitere %d Seiten gefunden:');
in the german files (normal and UTF8).

This had to be make to the plugin in the CSV by one of the maintainer here - Gaaarvin!!!!
Now, now, let's not bring in the shotgun when the flyswatter will do. :) I took care of it.
stm999999999 wrote:But Garvin says overriding phrases is a not so important thing and the API is more important - because I am one of a very little group who uses these feature. :-( So, every one who wants to override such phrases should to notifiy it! :-)
Absolutely. The more people who use a feature, the more attention it'll get.

I just wish I were multilingual. Maybe I should start practicing my Spanish again.
Judebert
---
Website | Wishlist | PayPal
Post Reply