Changeset 690 for trunk/inc/system.php


Ignore:
Timestamp:
Mar 19, 2010, 9:22:00 PM (15 years ago)
Author:
george
Message:
  • Přidáno: Zavedení systému pěkných URL. Přejmenováno mnoho stránek.
  • Přidáno: Skript pro generování SERVERALERT aktualit pro klienta.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/inc/system.php

    r630 r690  
    2828  }
    2929   
    30   function SeoUrl($title)
     30  function SeoUrl($Address)
    3131  { 
    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); 
    4140  }
    4241 
Note: See TracChangeset for help on using the changeset viewer.