Hab mich mal an der Kategorie und an den Usern versucht, das Ergebnis:
Habe mich mal an den Kategoriuen versucht, scheint zu klappen:
Code: Alles auswählen
//
// Kategorien
//
if( strstr ($url, 'index.php?c=') ) {
$prg=str_replace("index.php?","",$url);
parse_str($prg, $prg_output);
$sql = "SELECT cat_title
FROM " . CATEGORIES_TABLE . "
WHERE cat_id = '".$prg_output['c']."'";
if ( !($result = $db->sql_query($sql)) ) {
message_die(GENERAL_ERROR, 'Could not obtain category information', '', __LINE__, __FILE__, $sql);
}
if ( $row = $db->sql_fetchrow($result) ){
$url = str_replace( 'index.php', '', $url );
$url1 .= strtr($url,array("?c="=>"-c"));
$url = urlencode(strtolower(str_replace($url_search, $url_replace, $row['cat_title'])));
$url .= $url1. ".html";
}
}
Einfach in der sessions.php vor
einfügen! und .htacces Regel erstellen, die hab ich grad net greifbar!
Verbesserungen erwünscht!
Die User wollen net so klappen:
Code: Alles auswählen
//
// User
//
if( strstr ($url, 'profile.php?mode=viewprofile&u=') ) {
$prg=str_replace("profile.php?mode=viewprofile&","",$url);
parse_str($prg, $prg_output);
$sql = "SELECT username
FROM " . USERS_TABLE . "
WHERE user_id = '".$prg_output['u']."'";
if ( !($result = $db->sql_query($sql)) ) {
message_die(GENERAL_ERROR, 'Could not obtain user information', '', __LINE__, __FILE__, $sql);
}
if ( $row = $db->sql_fetchrow($result) ){
$url = str_replace( 'profile.php?mode=viewprofile', '', $url );
$url1 .= strtr($url,array("&u="=>"-u"));
$url = urlencode(strtolower(str_replace($url_search, $url_replace, $row['username'])));
$url .= $url1. ".html";
}
}
Änderungen analog zu seo.phpbb.org - Board!