How to add search keyword as title in Search pages? (General)

by Auge ⌂ @, Wednesday, June 06, 2018, 10:34 (12 days ago) @ Sri

Thanks a lot for the reply Auge.

Yes I would like search results to be as

24 entries for 'DSGVO' found

This is a not so simple task but it's doable.

- Change the relevant strings (keys: one_posting_found, several_postings_found) in the language file(s), actually lines #214 and #215 in english.lang to introduce a placeholder for the search term(s). If we would do it, we would do it for all languages by replacing the original (mostly translated) strings by an english string with exception of the german language.
- Remove the singular-plural-logic from the templates search.inc.tpl line #20 and replace it with a simple output of a variable.
- Add the singular-plural-logic to the PHP-script search.inc.php, put the search term(s) into the string and assign it to the template mentioned above.

How to bring the content of the message into the description field with a restriction of 300 first 300 characters.

This would be a bigger challenge because at the moment we simply use the description from the forum settings. At the moment I see no way to change the value at a later processing step but generally it should be possible to generate a variable with a wanted content and the description from the forum setting as its fallback in the PHP-script and to inject the variable into the template as on many other places.

Tschö, Auge

Trenne niemals Müll, denn er hat nur eine Silbe!

Complete thread:

 RSS Feed of thread

powered by my little forum