The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Hello, everyone! I am using .htaccess to make my links simpler, but there is a problem.
My forum is in serbian, and I have a problem because my thread names sometimes contain accented letters (š, ć, đ, etc.). Those letters look different in URLs, or doesn't show at all. I am trying to replace them with non-accented letters (s, c, dj in this case) which are easily readable in my language. I got this code: Code:
function google($input){
setlocale(LC_ALL, "en_US.UTF8");
$input = str_replace(array("'", "-", "đ"), array("", "", "dj"), $input);
$input = mb_convert_case($input, MB_CASE_LOWER, "UTF-8");
$input = iconv("UTF-8", "ASCII//TRANSLIT", $input);
$input = preg_replace("#[^a-zA-Z0-9]+#", "-", $input);
$input = preg_replace("#(-){2,}#", "$1", $input);
$input = trim($input, "-");
return $input;
}
|
|
#2
|
||||
|
||||
|
probably a file that has to do with creating new threads
|
|
#3
|
|||
|
|||
|
class_friendly_url.php seems to be doing that part of the job.
If I am right, where do you think I should put this code?
|
|
#4
|
||||
|
||||
|
I'm willing to bet this has been done before so you really shouldn't need to write code for it. I mean. vb has been international for years, so you can't be the first person with the problem.
Have you searched at vb.com? |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|