![]() |
![]() |
![]()
Post
#1
|
|
![]() Grupa: Zarejestrowani Postów: 97 Pomógł: 0 Dołączył: 16.06.2007 Ostrzeżenie: (0%) ![]() ![]() |
W najnowszej wersji IPB znów pojawił się problem z automatyczną zmianą wielkich i małych liter w tytułach przyjaznych linków.
Doszedłem po tropie, że za ten stan rzeczy jest odpowiedzialny plik core.php , a dokładniej: /* Convert it */ if ( self::isUTF8( $text ) ) { if ( function_exists('mb_strtolower') ) { $text = mb_strtolower($text, 'UTF-8'); } $text = self::utf8Encode( $text, 250 ); } /* Finish off */ $text = strtolower($text); if ( strtolower( IPS_DOC_CHAR_SET ) == 'utf-8' ) { $text = preg_replace( '#&.+?;#' , '', $text ); $text = preg_replace( '#[^%a-z0-9 _-]#', '', $text ); } else { /* Remove &#xx; and &#xxx; but keep &#xxxx; */ $text = preg_replace( '/&#(\d){2,3};/', '', $text ); $text = preg_replace( '#[^%&\#;a-z0-9 _-]#', '', $text ); $text = str_replace( array( '"', '&'), '', $text ); } $text = str_replace( array( '`', ' ', '+', '.', '?', '_', '#' ), '-', $text ); $text = preg_replace( "#-{2,}#", '-', $text ); $text = trim($text, '-'); IPSDebug::addMessage( "<span style='color:red'>makeSeoTitle ($text) called</span>" ); return ( $text ) ? $text : '-'; Pytanie brzmi: nie wiem czym zastąpić instrukcję $text = mb_strtolower($text, 'UTF-8'); aby konwertowała text na UTF bez utraty specjalnych znaków diakrytycznych lub dużych liter? -------------------- Forum komputerowe
|
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 14.08.2025 - 02:23 |