URL Ti?ng Vi?t kh�ng d?u cho XenForo
Th? thu?t blog1. C�ch 1
B�?c 1: M? file /library/XenForo/Link.php
B�?c 2: T?m
if ($romanize)Th�m xu?ng d�?i
{
$title = utf8_romanize(utf8_deaccent($title));
}
$aPattern = array (
"a" => "�|�|?|?|?|�|?|?|?|?|?|�|?|?|?|?|?|�|�|?|?|?|�|?|?|?|?|?|�|?|?|?|?|?",
"o" => "�|?|?|?|?|�|?|?|?|?|?|�|?|?|?|?|?|�|?|?|?|?|�|?|?|?|?|?|�|?|?|?|?|?",
"e" => "�|�|?|?|?|�|?|?|?|?|?|�|�|?|?|?|�|?|?|?|?|?",
"u" => "�|�|?|?|?|�|?|?|?|?|?|�|�|?|?|?|�|?|?|?|?|?",
"i" => "�|?|?|?|?|�|?|?|?|?",
"y" => "?|?|?|?|?|?|?|?|?|?",
"d" => "�|�",
);
while(list($key,$value) = each($aPattern))
{
$title = @ereg_replace($value, $key, $title);
}
2. C�ch 2
C� th? l�m c�ch sau n?u c�ch tr�n b? l?i
B�?c 1: M? file /library/XenForo/Link.php
B�?c 2: T?m
return strtr($title, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
Th�m ph�a tr�n �o?n code sau
$aPattern = array (
"a" => "�|�|?|?|?|�|?|?|?|?|?|�|?|?|?|?|?|�|�|?|?|?|�|?|?|?|?|?|�|?|?|?|?|?",
"o" => "�|?|?|?|?|�|?|?|?|?|?|�|?|?|?|?|?|�|?|?|?|?|�|?|?|?|?|?|�|?|?|?|?|?",
"e" => "�|�|?|?|?|�|?|?|?|?|?|�|�|?|?|?|�|?|?|?|?|?",
"u" => "�|�|?|?|?|�|?|?|?|?|?|�|�|?|?|?|�|?|?|?|?|?",
"i" => "�|?|?|?|?|�|?|?|?|?",
"y" => "?|?|?|?|?|?|?|?|?|?",
"d" => "�|�",
);
while(list($key,$value) = each($aPattern))
{
$title = preg_replace('/'.$value.'/i', $key, $title);
}