Wer ModRewrite aktiviert hat, kann diesen Mod installieren:
http://www.phpbb.de/viewtopic.php?t=116014
Für diesen Mod hier wird kein ModRewrite benötigt. Auch benötigt ihr kein "ForceType". Das einzige was der Server verstehen muss ist "AcceptPathInfo". Dies kann man theoretisch über eine .htaccess nachträglich aktivieren, aber in der Regel ist diese Funktion aktiv.
Testen könnt ihr das, wenn ihr einen Link zu einem Forum bei euch ändert wie folgt von:
http://www.phpbb.de/viewforum.php?f=48
in:
http://www.phpbb.de/viewforum.php/f/48
Die Seite selbst sollte dann noch gehen (auch wenn jetzt das Design falsch aussieht und die Anzeige erscheint "Das Forum existiert nicht", das regelt dieser Mod dann). Es darf nur keine Fehlermeldung erscheinen. (meist in Englisch)
Dann fangen wir mal an

"SEF Urls" steht für Search Engine Friendly Urls.
Die Version 1.0.2 steht:
Demoboard: www.wiki-forum.de
suche in common.php:
Code: Alles auswählen
?>
Code: Alles auswählen
// SEF Mod Begin
// baseurl
$server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://';
$server_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['server_name']));
$server_port = ($board_config['server_port'] <> 80) ? ':' . trim($board_config['server_port']) : '';
$script_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['script_path']));
$script_name = ($script_name == '') ? $script_name : '/' . $script_name;
$scriptpath = $server_protocol . $server_name . $server_port . $script_name;
if ( !empty($HTTP_SERVER_VARS['PHP_SELF']) )
{
$PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];
}
else if ( !empty($_SERVER['PHP_SELF']) )
{
$PHP_SELF = $_SERVER['PHP_SELF'];
}
else
{
$PHP_SELF = '';
}
// replace slashes
if (strlen(getenv('PATH_INFO')) > 1)
{
$GET_array = array();
$PHP_SELF = str_replace(getenv('PATH_INFO'), '', $PHP_SELF);
$vars = explode('/', substr(getenv('PATH_INFO'), 1));
$cvars = count($vars)-1;
$vars[$cvars] = strpos($vars[$cvars], ',') !== false ? substr(strrchr($vars[$cvars], ','), 1) : $vars[$cvars];
$vars = str_replace('.html', '', $vars);
for ($i=0, $n=sizeof($vars); $i<$n; $i++)
{
if (strpos($vars[$i], '[]'))
{
$GET_array[substr($vars[$i], 0, -2)][] = $vars[$i+1];
}
else
{
$HTTP_GET_VARS[$vars[$i]] = $vars[$i+1];
}
$i++;
}
}
// SEF Mod End
Code: Alles auswählen
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;
}
Code: Alles auswählen
function append_sid($url, $non_html_amp = false)
{
global $SID, $phpEx, $scriptpath;
if ( !empty($SID) && !preg_match('#sid=#', $url) )
{
$url .= ( ( strpos($url, '?') !== false ) ? ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID;
}
elseif ( strpos($url, './') === false && strpos($url, 'login') === false && !defined('IN_ADMIN') )
{
$url_amp = ( $non_html_amp ) ? '&' : '&';
$url_parms = array('?', '=', $url_amp);
$url_rparms = array('/','/', '/');
$url = $scriptpath . preg_replace('#^\/?(.*?)\/?$#', '/\1', trim(str_replace($url_parms, $url_rparms, strpos($url, ".$phpEx?") === false ? $url : $url . '.html')));
}
return $url;
}
Code: Alles auswählen
$u_login_logout = 'login.'.$phpEx.'?logout=true&sid=' . $userdata['session_id'];
Code: Alles auswählen
$u_login_logout = $scriptpath . '/login.'.$phpEx.'?logout=true&sid=' . $userdata['session_id'];
Code: Alles auswählen
$u_login_logout = 'login.'.$phpEx;
Code: Alles auswählen
$u_login_logout = $scriptpath . '/login.'.$phpEx;
Code: Alles auswählen
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';
Code: Alles auswählen
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="'. $scriptpath . '/admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';
Code: Alles auswählen
$s_auth_can .= sprintf($lang['Rules_moderate'], "<a href=\"modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'] . '">', '</a>');
$topic_mod .= "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=delete&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_delete'] . '" alt="' . $lang['Delete_topic'] . '" title="' . $lang['Delete_topic'] . '" border="0" /></a> ';
$topic_mod .= "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=move&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_move'] . '" alt="' . $lang['Move_topic'] . '" title="' . $lang['Move_topic'] . '" border="0" /></a> ';
$topic_mod .= ( $forum_topic_data['topic_status'] == TOPIC_UNLOCKED ) ? "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=lock&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_lock'] . '" alt="' . $lang['Lock_topic'] . '" title="' . $lang['Lock_topic'] . '" border="0" /></a> ' : "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=unlock&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_unlock'] . '" alt="' . $lang['Unlock_topic'] . '" title="' . $lang['Unlock_topic'] . '" border="0" /></a> ';
$topic_mod .= "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=split&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_split'] . '" alt="' . $lang['Split_topic'] . '" title="' . $lang['Split_topic'] . '" border="0" /></a> ';
Code: Alles auswählen
$s_auth_can .= sprintf($lang['Rules_moderate'], "<a href=\"$scriptpath/modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'] . '">', '</a>');
$topic_mod .= "<a href=\"$scriptpath/modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=delete&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_delete'] . '" alt="' . $lang['Delete_topic'] . '" title="' . $lang['Delete_topic'] . '" border="0" /></a> ';
$topic_mod .= "<a href=\"$scriptpath/modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=move&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_move'] . '" alt="' . $lang['Move_topic'] . '" title="' . $lang['Move_topic'] . '" border="0" /></a> ';
$topic_mod .= ( $forum_topic_data['topic_status'] == TOPIC_UNLOCKED ) ? "<a href=\"$scriptpath/modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=lock&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_lock'] . '" alt="' . $lang['Lock_topic'] . '" title="' . $lang['Lock_topic'] . '" border="0" /></a> ' : "<a href=\"$scriptpath/modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=unlock&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_unlock'] . '" alt="' . $lang['Unlock_topic'] . '" title="' . $lang['Unlock_topic'] . '" border="0" /></a> ';
$topic_mod .= "<a href=\"$scriptpath/modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=split&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_split'] . '" alt="' . $lang['Split_topic'] . '" title="' . $lang['Split_topic'] . '" border="0" /></a> ';
Code: Alles auswählen
$rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
Code: Alles auswählen
$rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $scriptpath . '/' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
Code: Alles auswählen
$rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
Code: Alles auswählen
$rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $scriptpath . '/' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
Code: Alles auswählen
$s_watching_topic = "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&unwatch=topic&start=$start&sid=" . $userdata['session_id'] . '">' . $lang['Stop_watching_topic'] . '</a>';
$s_watching_topic_img = ( isset($images['topic_un_watch']) ) ? "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&unwatch=topic&start=$start&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_un_watch'] . '" alt="' . $lang['Stop_watching_topic'] . '" title="' . $lang['Stop_watching_topic'] . '" border="0"></a>' : '';
}
else
{
$s_watching_topic = "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&watch=topic&start=$start&sid=" . $userdata['session_id'] . '">' . $lang['Start_watching_topic'] . '</a>';
$s_watching_topic_img = ( isset($images['Topic_watch']) ) ? "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&watch=topic&start=$start&sid=" . $userdata['session_id'] . '"><img src="' . $images['Topic_watch'] . '" alt="' . $lang['Start_watching_topic'] . '" title="' . $lang['Start_watching_topic'] . '" border="0"></a>' : '';
Code: Alles auswählen
$s_watching_topic = "<a href=\"$scriptpath/viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&unwatch=topic&start=$start&sid=" . $userdata['session_id'] . '">' . $lang['Stop_watching_topic'] . '</a>';
$s_watching_topic_img = ( isset($images['topic_un_watch']) ) ? "<a href=\"$scriptpath/viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&unwatch=topic&start=$start&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_un_watch'] . '" alt="' . $lang['Stop_watching_topic'] . '" title="' . $lang['Stop_watching_topic'] . '" border="0"></a>' : '';
}
else
{
$s_watching_topic = "<a href=\"$scriptpath/viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&watch=topic&start=$start&sid=" . $userdata['session_id'] . '">' . $lang['Start_watching_topic'] . '</a>';
$s_watching_topic_img = ( isset($images['Topic_watch']) ) ? "<a href=\"$scriptpath/viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&watch=topic&start=$start&sid=" . $userdata['session_id'] . '"><img src="' . $images['Topic_watch'] . '" alt="' . $lang['Start_watching_topic'] . '" title="' . $lang['Start_watching_topic'] . '" border="0"></a>' : '';
Code: Alles auswählen
$temp_url = "modcp.$phpEx?mode=ip&" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&" . POST_TOPIC_URL . "=" . $topic_id . "&sid=" . $userdata['session_id'];
$ip_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_ip'] . '" alt="' . $lang['View_IP'] . '" title="' . $lang['View_IP'] . '" border="0" /></a>';
$ip = '<a href="' . $temp_url . '">' . $lang['View_IP'] . '</a>';
$temp_url = "posting.$phpEx?mode=delete&" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&sid=" . $userdata['session_id'];
Code: Alles auswählen
$temp_url = "$scriptpath/modcp.$phpEx?mode=ip&" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&" . POST_TOPIC_URL . "=" . $topic_id . "&sid=" . $userdata['session_id'];
$ip_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_ip'] . '" alt="' . $lang['View_IP'] . '" title="' . $lang['View_IP'] . '" border="0" /></a>';
$ip = '<a href="' . $temp_url . '">' . $lang['View_IP'] . '</a>';
$temp_url = "$scriptpath/posting.$phpEx?mode=delete&" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&sid=" . $userdata['session_id'];
Code: Alles auswählen
$s_auth_can .= sprintf($lang['Rules_moderate'], "<a href=\"modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&start=" . $start . "&sid=" . $userdata['session_id'] . '">', '</a>');
Code: Alles auswählen
$s_auth_can .= sprintf($lang['Rules_moderate'], "<a href=\"" . $scriptpath . "/modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&start=" . $start . "&sid=" . $userdata['session_id'] . '">', '</a>');
Code: Alles auswählen
function smilies_pass($message)
{
Code: Alles auswählen
global $scriptpath;
Code: Alles auswählen
$repl[] = '<img src="'. $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'] . '" alt="' . $smilies[$i]['emoticon'] . '" border="0" />';
Code: Alles auswählen
$repl[] = '<img src="'. $scriptpath . '/' . $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'] . '" alt="' . $smilies[$i]['emoticon'] . '" border="0" />';
Code: Alles auswählen
$avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $profiledata['user_avatar'] . '" alt="" border="0" />' : '';
Code: Alles auswählen
$avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $scriptpath . '/' . $board_config['avatar_path'] . '/' . $profiledata['user_avatar'] . '" alt="" border="0" />' : '';
Code: Alles auswählen
$avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $profiledata['user_avatar'] . '" alt="" border="0" />' : '';
Code: Alles auswählen
$avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $scriptpath . '/' . $board_config['avatar_gallery_path'] . '/' . $profiledata['user_avatar'] . '" alt="" border="0" />' : '';
Code: Alles auswählen
$avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $user_avatar . '" alt="" />' : '';
Code: Alles auswählen
$avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $scriptpath . '/' . $board_config['avatar_path'] . '/' . $user_avatar . '" alt="" />' : '';
Code: Alles auswählen
$avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $user_avatar . '" alt="" />' : '';
Code: Alles auswählen
$avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $scriptpath . '/' . $board_config['avatar_gallery_path'] . '/' . $user_avatar . '" alt="" />' : '';
Code: Alles auswählen
$poster_avatar = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $postrow[$i]['user_avatar'] . '" alt="" border="0" />' : '';
Code: Alles auswählen
$poster_avatar = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $scriptpath . '/' . $board_config['avatar_path'] . '/' . $postrow[$i]['user_avatar'] . '" alt="" border="0" />' : '';
Code: Alles auswählen
$poster_avatar = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $postrow[$i]['user_avatar'] . '" alt="" border="0" />' : '';
Code: Alles auswählen
$poster_avatar = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $scriptpath . '/' . $board_config['avatar_gallery_path'] . '/' . $postrow[$i]['user_avatar'] . '" alt="" border="0" />' : '';
Änderungen an den Templatedateien: ("subSilver" jeweils gegen Euren Templatenamen tauschen und "www.deinedomain.de/pfad/" gegen Euren Domainnamen und Pfad tauschen!)
öffne templates/subSilver/posting_body.tpl und suche nach:
Code: Alles auswählen
{smilies_row.smilies_col.SMILEY_IMG}
Code: Alles auswählen
http://www.deinedomain.de/pfad/{smilies_row.smilies_col.SMILEY_IMG}
Code: Alles auswählen
$current_template_images = $current_template_path . "/images";
Code: Alles auswählen
$current_template_images = 'http://www.deinedomain.de/pfad/' . $current_template_path . "/images";
suche in allen templates/subSilver/Template-Dateien nach: (alle die mit".tpl" enden)
Code: Alles auswählen
<img src="templates/subSilver/images
Code: Alles auswählen
<img src="http://www.deinedomain.de/pfad/templates/subSilver/images
- faq_body.tpl (1)
- index_body.tpl (4)
- modcp_split.tpl (2)
- overall_header.tpl (9)
- posting_preview.tpl (2)
- posting_topic_review.tpl (1)
- privmsg_body.tpl (1)
- search_results_posts.tpl (1)
- viewonline_body.tpl (1)
- viewtopic_body.tpl (1)
- viewtopic_poll_result.tpl (2)
Tipp: Solche Massenänderungen kann man unheimlich gut mit dem kostenlosen Programm Weaverslave automatisch erledigen lassen.