Verfasst: 20.05.2006 21:51
Kann den keiner Helfen?
Würde mich sehr freuen wenn doch
Würde mich sehr freuen wenn doch
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Die neue version habe ich aber noch nicht drauf.öffne includes/sessions.php und suche nach:
Code:
function append_sid($url, $non_html_amp = false)
{
global $SID;
if ( !empty($SID) && !preg_match('#sid=#', $url) )
{
$url .= ( ( strpos($url, '?') !== false ) ? ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID;
}
return $url;
}
ersetze gegen:
Code:
function append_sid($url, $non_html_amp = false) // Seo Urls Anfang Version 1.0.7
{
global $SID, $phpEx, $topic_title, $forum_name;
if ( !empty($SID) && !preg_match('#sid=#', $url) )
{
$url .= ( ( strpos($url, '?') !== false ) ? ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID;
}
elseif ( $url != './' && strpos($url, 'login') === false && !defined('IN_ADMIN') )
{
// Jumpbox Fix
if ( strpos($url, 'viewforum') !== false && strpos($url, 'f=') === false )
{
return $url;
}
// Search Author's posts URL
if ( strpos($url, 'search_author') !== false )
{
$author_name = substr( strrchr($url, 'search_author='), 14);
if ( preg_match('#[^a-zA-Z0-9-_.]#', $author_name) )
{
return $url;
}
}
// Title to URL
$url_amp = ( $non_html_amp ) ? '&' : '&';
$url_parms = array( (strpos($url, 'highlight=') !== false && $url{strlen($url)-1} == '=' ? $url_amp . 'highlight=' : ''), $url_amp . 'start=0', $url_amp . 'postdays=0', $url_amp . 'postorder=asc', ".$phpEx?", ".$phpEx", '=', '&', '&');
$url_rparms = array( '', '', '', '', ',', '.html', ',', ',', ',');
$url = str_replace($url_parms, $url_rparms, $url);
$url = ($url == './' ? '' : $url . ( strpos($url, '.html') !== false ? '' : '.html' ));
// replace special chars
if ( ( !empty($topic_title) && strpos($url, 'viewtopic') !== false ) || ( !empty($forum_name) && strpos($url, 'viewforum') !== false ) )
{
$url_search = array( 'Ö', 'Ä', 'Ü', 'ö', 'ä', 'à', 'é', 'è', 'ü', 'ß', '°', '²', '³', '§', '$', '%', '=', '`', '´', '|', '€', 'µ', '~', ' ', '.', ',', "'", '"', '#','"', '&', '+','>', '<', '–', '–', '!', '?','{','}','[', ']', '/', '\\', ";", ")", "(", ':', '_', '*', '@', '^', '&', '---', '--');
$url_replace = array('oe', 'ae', 'ue', 'oe', 'ae', 'a', 'e', 'e', 'ue','ss', '', '', '', '', '', '', '', '', '', '', '', '', '', '-', '-', '-', '', '', '', '', 'und','und', '', '', '', '-', '', '', '', '', '', '', '-', '', '', '', '', '', '-', '', '', '','und', '-', '-');
}
// forum name and topic title to URL
if ( !empty($forum_name) && strpos($url, 'viewforum') !== false )
{
$url = str_replace('viewforum', '', $url);
$forumurl = str_replace($url_search, $url_replace, strtolower($forum_name) . '-');
$url = $forumurl == '-' ? 'forum' . $forumurl . $url : $forumurl . $url;
$url = str_replace('-,f,', '-f', $url);
}
elseif ( !empty($topic_title) && strpos($url, 'viewtopic') !== false )
{
$url = str_replace('viewtopic', '', $url);
$topicurl = str_replace($url_search, $url_replace, strtolower($topic_title) . '-');
$url = $topicurl == '-' ? 'topic' . $topicurl . $url : $topicurl . $url;
$url = str_replace('-,t,', '-t', $url);
$url = str_replace('-,p,', '-p', $url);
}
}
return $url;
} // Seo Urls Ende Version 1.0.7
erstelle eine .htaccess im Root (da wo die index.php von phpBB2 ist) mit folgendem inhalt:
Code:
<Files config.php>
Deny from all
</Files>
DirectoryIndex index.php index.htm index.html
RewriteEngine On
# SEO URL [mgutt]
RewriteRule !\.html$ - [L]
RewriteRule ^[a-z0-9-]+-([pt])([0-9]+)\.html$ /viewtopic.php?$1=$2 [L]
RewriteRule ^[a-z0-9-]+-f([0-9]+)\.html$ /viewforum.php?f=$1 [L]
RewriteRule ^[a-z0-9-]+-u([0-9]+)\.html$ /profile.php?mode=viewprofile&u=$1 [L]
RewriteRule ^([a-zA-Z0-9_]+),([^/,]+),([^/,]*)([^/]*\.html)$ $1$4?$2=$3 [QSA,N]
RewriteRule ^[a-z0-9-]+-([pt])([0-9]+),([^/,]+),([^/,]*)([^/]*\.html)$ viewtopic$5?$1=$2&$3=$4 [QSA,N]
RewriteRule ^[a-z0-9-]+-f([0-9]+),([^/,]+),([^/,]*)([^/]*\.html)$ viewforum$4?f=$1&$2=$3 [QSA,N]
RewriteRule ^([a-zA-Z0-9_]+)\.html$ /$1.php [L]
dann weiter. suche in index.php nach:
Code:
$template->assign_block_vars('catrow.forumrow', array(
füge davor ein:
Code:
$forum_name = $forum_data[$j]['forum_name'];
suche in viewforum.php nach:
Code:
$page_title = $lang['View_forum'] . ' - ' . $forum_row['forum_name'];
füge danach ein:
Code:
$forum_name = $forum_row['forum_name'];
suche in search.php nach und lösche die Zeile:
Code:
$topic_title = $searchset[$i]['topic_title'];
suche nach:
Code:
$forum_url = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . '=' . $searchset[$i]['forum_id']);
füge davor ein:
Code:
$forum_name = $searchset[$i]['forum_name'];
$topic_title = $searchset[$i]['topic_title'];