WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • General Community »
  • Global WebsiteBaker 2.8.x discussion »
  • Search and multilingual sites (patch included)
  • Print
Pages: [1]   Go Down

Author Topic: Search and multilingual sites (patch included)  (Read 7600 times)

thorn

  • Guest
Search and multilingual sites (patch included)
« on: July 24, 2009, 09:41:41 PM »
Hello,

recently someone asked how to limit the search on a multilingual site while using PAGE_LANGUAGES (i.e. Settings --> "Advanced Settings" --> "Page Languages" activated) instead of /en/, /de/... page hierarchies.

Multilingual sites using those /en/, /de/... page hierarchies are able to use the search_path-parameter inside there search-form. This won't work for sites using PAGE_LANGUAGES, though.

So i figured out a way to make this work for those sites, too. Please find attached the file search.php (from the SVN, latest revision) with some small changes:

- in case PAGE_LANGUAGES is set to true, all database-queries are adjusted accordingly ("... AND language = ".LANGUAGE)

additional:

- if  "Max lines of excerpt" is set to 0 (zero) the new search-method is completely omitted. -- No need to manually rename the search.php-files to deactivate the new search.
- export "time_limit" to the module-based search (this was missing)
- replaced a require_once() by require() -- that doesn't hurt, and fixes issues like https://forum.WebsiteBaker.org/index.php/topic,13187.0.html
- some minor changes

Could someone test this, please?


Even though it's somewhat late, maybe it could make its way into 2.8 ?


thorn.

[gelöscht durch Administrator]
« Last Edit: July 25, 2009, 12:39:39 AM by thorn »
Logged

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
Re: Search and multilingual sites (patch included)
« Reply #1 on: July 24, 2009, 10:01:20 PM »
hi thorn,

Are there any bigger changes betwen this and https://forum.WebsiteBaker.org/index.php/topic,14555.0.html
 ?

All best,
Ivan
Logged
Web developer

thorn

  • Guest
Re: Search and multilingual sites (patch included)
« Reply #2 on: July 25, 2009, 12:34:52 AM »
Hello,

Quote from: crnogorac081 on July 24, 2009, 10:01:20 PM
Are there any bigger changes betwen this and https://forum.WebsiteBaker.org/index.php/topic,14555.0.html

Not really, just added $search_language_sql to the old searchfunction, too. That was still missing in the post you mentioned. Also did some code-cleanup.

Although the attached file is for wb 2.8 RC1, it should (not fully tested) work with 2.7, too.


thorn.
Logged

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
Re: Search and multilingual sites (patch included)
« Reply #3 on: July 25, 2009, 12:46:26 AM »
can you please tell me in short what was this about as I dont understand deuche

Code: [Select]
replaced a require_once() by require() -- that doesn't hurt, and fixes issues like https://forum.WebsiteBaker.org/index.php/topic,13187.0.html

and what does search_convert.php do ?

cheers
Logged
Web developer

thorn

  • Guest
Re: Search and multilingual sites (patch included)
« Reply #4 on: July 25, 2009, 01:05:48 AM »
Hello,

Quote from: crnogorac081 on July 25, 2009, 12:46:26 AM
Quote
replaced a require_once() by require() -- that doesn't hurt, and fixes issues like https://forum.WebsiteBaker.org/index.php/topic,13187.0.html

That's not related to the language-problem. I did some additional fixes, too.


In this thread someone have had a (erroneous?) template which forced wb to call search.php twice -- we didn't figured out why.
In the second call, search_convert.php wasn't loaded, and a relevant variable wasn't set correctly.

The file search_convert.php converts between language-specific spelling.
In time of writing there are only some german entries: in general ä==ae, ß==ss, ...
and some very uncommon  (ſt==st, fi==fi, ...).

thorn.
Logged

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
Re: Search and multilingual sites (patch included)
« Reply #5 on: July 25, 2009, 01:33:58 AM »
so if we have for example some word: äbc and add a line there ä==a , then also abc will be displayed as search result right ?

In that case, we can all define that letter with accent is == letter without it for each of our own language  :-D :-D :-D
Logged
Web developer

Offline ruebenwurzel

  • Betatester
  • **
  • Posts: 8544
  • Gender: Male
  • Keep on Rockin
    • Familie Gallas Online
Re: Search and multilingual sites (patch included)
« Reply #6 on: July 25, 2009, 08:20:58 AM »
Hello,

Quote
Even though it's somewhat late, maybe it could make its way into 2.8 ?

Why not, as far as i see it only fixes "bugs"  :-D. If i got the time to test maybe i'll add it to RC2, this way it can be tested from RC2 testers too.

Matthias
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • General Community »
  • Global WebsiteBaker 2.8.x discussion »
  • Search and multilingual sites (patch included)
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2