Fork me on GitHub

Rapport de message :*
 

Re: Module News + SEO

Titre du sujet : Re: Module News + SEO
par grandoc sur 24/05/2009 19:53:02

@Jah
Tiens teste moi çà :

function elimina_acentos$string )
{
  
$string trim($string);
   
  if ( 
ctype_digit($string) )
  {
    return 
$string;
  }
  else
  {     
      
    
// replace accented chars
    
$simbolos = array('('')'':''%''?''¿''!''¡''/''"','$','=','@','&'); 
    
$string str_replace($simbolos''$string);
    
$string ereg_replace("[039]""-"$string);

    
$accents '/&([A-Za-z]{1,2})(grave|acute|circ|cedil|uml|lig);/';
    
$string_encoded htmlentities($string,ENT_QUOTES,'UTF-8');
    
    
$string preg_replace($accents,'$1',$string_encoded);
     
    
// clean out the rest
    
$replace = array('([40])',"([^a-zA-Z0-9-\'])",'(-{2,})'); 
    
$with = array('-','','-');
    
$string preg_replace($replace,$with,$string);
  }

  return 
strtolower($string).'.html';
}


ça maaaaaaaaaaaaaaaaaaaaarche !
Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

57 Personne(s) en ligne (46 Personne(s) connectée(s) sur Forum) | Utilisateur(s): 0 | Invité(s): 57 | Plus ...