Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Pagalba Del Kodo

Parašė bartascs· 2012 Vas. 10 22:02:31
#1

Sveiki foromieciai, taigi darau seo nuorodas ir jei pas mane filmo pavadinimas yra su lt raidemis tarkim ž man nerodo jokios raides kaip man padaryti, kad vietoj lt raidziu butu paprastos angliskos tipo ž-z

stai man rodos sita kdoa reikai keist :)

function editurl ($string)
{
 $string = strtolower($string);
 $special = array(
            '?','!','.',',',':',';','*','(',')','{','}','[',']','%','#','¹','@','$','^','-','+','/','\\','=','|','"','\'',
            'à','á','â','ã','ä','å','¸','ç','è','é','ê',
            'ë','ì','í','î','ï','ð','ñ','ò','ó','ô','õ',
            'ú','û','ý',' ','æ','ö','÷','ø','ù','ü','þ','ÿ');
 $normal = array('_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_',
           'a','b','v','g','d','e','e','z','i','y','k',
          'l','m','n','o','p','r','s','t','u','f','h',
           'j','i','e','_','zh','ts','ch','sh','shch',
           '','yu','ya');
 $string =  str_replace($special, $normal, $string);
 return preg_replace(array('/[^a-zA-Z0-9 -]/', '/[ -]+/', '/^-|-$/'), array('', '-', ''), $string);
}


P.S. SEO nuorodas darau :)

Redagavo bartascs· 2012 Vas. 10 22:02:40

Parašė Faitas.· 2012 Vas. 10 22:02:08
#2

Ką tau čia su juo reikia padėti, gali pasakyti?

Parašė minimukas· 2012 Vas. 11 03:02:30
#3


    "Ą", "Č", "Ę", "Ė", "Į", "Š", "Ų", "Ū", "Ž",
    "ą", "č", "ę", "ė", "į", "š", "ų", "ū", "ž");
    $normal = array(
    "A", "C", "E", "E", "I", "S", "U", "U", "Z",
    "a", "c", "e", "e", "i", "s", "u", "u", "z");

Parašė minimukas· 2012 Vas. 11 09:02:44
#4


function editurl ($string)
{
	$string = strtolower($string);
	$special = array(
            '?','!','.',',',':',';','*','(',')','{','}','[',']','%','#','¹','@','$','^','-','+','/','\\','=','|','"','\'',
            'Ą','Č','Ę','Ė','Į','Š','Ų','Ū','Ž','ą','č','ę','ė','į','š','ų','ū','ž');
	$normal = array('_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_',
            'A','C','E','E','I','S','U','U','Z','a','c','e','e','i','s','u','u','z');
	$string =  str_replace($special, $normal, $string);
	return preg_replace(array('/[^a-zA-Z0-9 -]/', '/[ -]+/', '/^-|-$/'), array('', '-', ''), $string);
}


turetu veikti tentie raidziu keitimai nereikalingi ;)