WebsiteBaker Support (2.12.x) > General Help & Support

Search for different variations of characters (a, á, à...)

<< < (5/5)

crnogorac081:
I told him he doesnt need to output it as dropdiwn list, it can be appended inside content div.
Example:

[ Search here: ...   ]

[  Search results:
    { no results }
]

So instead  puting results in dropdown list, you can output content between { }

Or any other way you want..

I wouldnt do this if i found this function or how to make it in wb search function file..

Cheers
I.

svsanchez:
Hello Jacobi and Crnogorac, thanks a lot to both of you for your help.

Crnogorac's search module is very modern, but the main reason I wanted to list the search results in the traditional WB search fashion is to be able to print the results. The module needed a few extra tweaks too, since it was only showing a few results, the prices were not in the correct currency and part of the results were appearing on a layer below my footer. I´m sure these things wouldn't have been too difficult to correct, but in reality all I was asking since the beginning was a fix to include in the search results words with different show spanish characters.

By editing the /search/search_convert_ul.php file it worked!

Here are the lines that I added in case someone else needs to search for Spanish characters in WB 2.12:


--- Code: ---
    //a,á,A,Á
    "\x41" => "(\x41|\x61|\xc3\xa0|\xc3\xa1|\xc3\x80|\xc3\x81)",
    "\x61" => "(\x41|\x61|\xc3\xa0|\xc3\xa1|\xc3\x80|\xc3\x81)",
    "\xc3\xa0" => "(\x41|\x61|\xc3\xa0|\xc3\xa1|\xc3\x80|\xc3\x81)",
    "\xc3\xa1" => "(\x41|\x61|\xc3\xa0|\xc3\xa1|\xc3\x80|\xc3\x81)",

    //e,é,E,É
    "\x45" => "(\x45\x65|\xc3\xa8|\xc3\xa9|\xc3\x88|\xc3\x89)",
    "\x65" => "(\x45\x65|\xc3\xa8|\xc3\xa9|\xc3\x88|\xc3\x89)",
    "\xc3\xa8" => "(\x45\x65|\xc3\xa8|\xc3\xa9|\xc3\x88|\xc3\x89)",
    "\xc3\xa9" => "(\x45\x65|\xc3\xa8|\xc3\xa9|\xc3\x88|\xc3\x89)",

    //i,í,I,Í
    "\x49" => "(\x49|\x69|\xc3\x8d|\xc3\xad)",
    "\x69" => "(\x49|\x69|\xc3\x8d|\xc3\xad)",
    "\xc3\x8d" => "(\x49|\x69|\xc3\x8d|\xc3\xad)",
    "\xc3\xad" => "(\x49|\x69|\xc3\x8d|\xc3\xad)",

    //o,ó,O,Ó
    "\x4f" => "(\x4f|\x6f|\xc3\x93|\xc3\xb3)",
    "\x6f" => "(\x4f|\x6f|\xc3\x93|\xc3\xb3)",
    "\xc3\x93" => "(\x4f|\x6f|\xc3\x93|\xc3\xb3)",
    "\xc3\xb3" => "(\x4f|\x6f|\xc3\x93|\xc3\xb3)",

    //u,ú,U,Ú
    "\x55" => "(\x55|\x75|\xc3\xba|\xc3\x9a)",
    "\x75" => "(\x55|\x75|\xc3\xba|\xc3\x9a)",
    "\xc3\xba" => "(\x55|\x75|\xc3\xba|\xc3\x9a)",
    "\xc3\x9a" => "(\x55|\x75|\xc3\xba|\xc3\x9a)",

    //ñ,Ñ
    "\xc3\xb1" => "(\xc3\xb1|\xc3\x91)",
    "\xc3\x91" => "(\xc3\xb1|\xc3\x91)",


--- End code ---

Again, thanks to both for your help!!!

svsanchez:
There was an error in the e,é,E,É portion, I forgot to separate some expressions with the | character. Here is the corrected code:


--- Code: ---    //e,é,E,É
    "\x45" => "(\x45|x65|\xc3\xa8|\xc3\xa9|\xc3\x88|\xc3\x89)",
    "\x65" => "(\x45|x65|\xc3\xa8|\xc3\xa9|\xc3\x88|\xc3\x89)",
    "\xc3\xa8" => "(\x45|x65|\xc3\xa8|\xc3\xa9|\xc3\x88|\xc3\x89)",
    "\xc3\xa9" => "(\x45|x65|\xc3\xa8|\xc3\xa9|\xc3\x88|\xc3\x89)",

--- End code ---

crnogorac081:
Rename file from .php to .zip and upload it here.

Maybe someone else will need it.

Gast:
@ svsanchez: good job!  (Y)



Navigation

[0] Message Index

[*] Previous page

Go to full version