Changeset 690 for trunk/inc/system.php
- Timestamp:
- Mar 19, 2010, 9:22:00 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/system.php
r630 r690 28 28 } 29 29 30 function SeoUrl($ title)30 function SeoUrl($Address) 31 31 { 32 $address = $title; 33 $diakritika = array("á","ä","č","ď","é","ě","ë","í","ň","ó","ö","ř","š","ť","ú","ů","ü","ý","ž","Á","Ä","Č","Ď","É","Ě","Ë","Í","Ň","Ó","Ö","Ř","Š","Ť","Ú","Ů","Ü","Ý","Ž"); 34 $nediakritika = array("a","a","c","d","e","e","e","i","n","o","o","r","s","t","u","u","u","y","z","A","A","C","D","E","E","E","I","N","O","O","R","S","T","U","U","U","Y","Z"); 35 $address = str_replace($diakritika, $nediakritika, $address); 36 $address = strtolower ($address); 37 $address = preg_replace ("/[^[:alpha:][:digit:]]/", "-", $address); 38 $address = trim ($address, "-"); 39 $address = preg_replace ("/[-]+/", "-", $address); 40 return($address); 32 $Diakritika = array("á","ä","č","ď","é","ě","ë","í","ň","ó","ö","ř","š","ť","ú","ů","ü","ý","ž","Á","Ä","Č","Ď","É","Ě","Ë","Í","Ň","Ó","Ö","Ř","Š","Ť","Ú","Ů","Ü","Ý","Ž"); 33 $Nediakritika = array("a","a","c","d","e","e","e","i","n","o","o","r","s","t","u","u","u","y","z","A","A","C","D","E","E","E","I","N","O","O","R","S","T","U","U","U","Y","Z"); 34 $Address = str_replace($Diakritika, $Nediakritika, $Address); 35 $Address = strtolower($Address); 36 $Address = preg_replace("/[^[:alpha:][:digit:]]/", "-", $Address); 37 $Address = trim($Address, "-"); 38 $Address = preg_replace("/[-]+/", "-", $Address); 39 return($Address); 41 40 } 42 41
Note:
See TracChangeset
for help on using the changeset viewer.