ja, ich habe das Forum durchsucht, das vorab. Ich habe viel gefunden, das sich mit dem Thema beschäftigt, zu dem ich eine Frage habe, das auch vorab. Leider habe ich nichts gefunden, was 100%ig mein Problem beschreibt.
Im Forum benutze ich eine übersichtliche Zahl von Mods unter anderem auch die Anpassung der URLs mit Hilfe einer .htaccess und den nötigen angepassten php Seiten.
Sonderzeichen habe ich zum Teil schon entfernen können mit Hilfe einiger Anleitungen und Hilfen hier.
Mein Problem/Frage ist, dass ein Beitrag mit Anführungszeichen/Sonderzeichen, diese
in der Adresseingabezeile des Browsers falsch anzeigt. Die jeweiligen Links im Forum und auf den Seiten stimmten aber.
Angezeigter Link im Browser (IE u. Moz.) nach Aufruf des Links ist aber:
Ensprechender Teil in der sessions.php (ich denke, den braucht ihr zu einem Lösungsansatz auch)
function append_sid($url, $non_html_amp = false)
{
$url_search = array( 'Ö', 'Ä', 'Ü',
'ö', 'ä', 'à', 'é', 'è', 'ü', 'ß', '°', '²', '³',
'§', '$', '%', '=', '`', '´', '|', '€', 'µ', '~',
' ', '.', ',', "'", '"', '#','"', '&',
'+','>', '<', '!', '?','{','}','[', ']', '/',
'\\', ";", ")", "(", ':', '_', '*', '@', '^', '&',
'---', '--');
$url_replace = array('oe', 'ae', 'ue', 'oe',
'ae', 'a', 'e', 'e', 'ue','ss', '', '', '', '', '',
'', '', '', '', '', '', '', '', '-', '-', '', '', '',
'', '', 'und','und', '', '', '', '', '',
'', '', '', '-', '', '', '', '', '', '-', '', '', '','
und', '-', '-');
<<<<hier habe ich übrigens eben ein paar mal Enter gedrückt, damit das Board nicht so "breit" wird>>>>
global $SID,$HTTP_SERVER_VARS,$db,$board_config;
if( strstr($url,'viewtopic.php') && !strstr($url,'viewtopic.php?replace') )
{
if(ereg("#",$url)) {
$pos=strpos($url, "#");
$url_temp=substr($url,0,$pos);
$zusatz=substr($url,$pos,strlen($url));
$url=$url_temp;
}
//
// Post
//
if( preg_match('#viewtopic.php\?p=#', $url) ) {
$prg=str_replace("viewtopic.php?","",$url);
parse_str($prg, $prg_output);
$sql = "SELECT *
FROM " . POSTS_TABLE . "
WHERE post_id = '".$prg_output['p']."'";
if ($result = $db->sql_query($sql))
{
$row = $db->sql_fetchrow($result);
$prg_output['t'] = $row['topic_id'];
$sql = "SELECT *
FROM " . TOPICS_TABLE . "
WHERE topic_id = '".$prg_output['t']."'";
if ($result = $db->sql_query($sql))
{
$row = $db->sql_fetchrow($result);
$url1= urlencode(strtolower(str_replace($url_search, $url_replace, $row['topic_title'])));
}
$sql = "SELECT *
FROM " . POSTS_TABLE . "
WHERE post_id < '".$prg_output['p']."'
AND topic_id = '".$prg_output['t']."'";
if ($result = $db->sql_query($sql))
{
$c = $db->sql_numrows($result)+1;
if ($board_config['posts_per_page'] < $c)
$prg_output['start'] = floor(($c-1) / $board_config['posts_per_page']) * $board_config['posts_per_page'];
}
if (isset($prg_output['start']))
$url = preg_replace('#viewtopic.php\?p='.$prg_output['p'].'#','-t'.$prg_output['t'].'-'.$prg_output['start'].'.html',$url);
else
$url = preg_replace('#viewtopic.php\?p='.$prg_output['p'].'#','-t'.$prg_output['t'].'.html',$url);
unset($prg_output['p']);
}
$url=$board_config['script_path']."$url1$url";
}
}
//
// Topic
//
if ( preg_match('#viewtopic.php\?t=#', $url) ) {
$prg=str_replace("viewtopic.php?","",$url);
parse_str($prg, $prg_output);
$highlight = preg_match( '#highlight#', $url) || preg_match( '#vote#', $url) || preg_match( '#newest#', $url);
if (!$highlight) {
$sql = "SELECT topic_title
FROM " . TOPICS_TABLE . "
WHERE topic_id = '".$prg_output['t']."'";
if ( !($result = $db->sql_query($sql)) ) {
#message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}
if ( $row = $db->sql_fetchrow($result) ) {
$start= preg_match('#start=0#', $url);
$postdays = preg_match( '#postdays=0#', $url);
if ($start) {
$url = str_replace( 'viewtopic.php', '', $url );
$url = str_replace( 'start=0', '', $url );
}
if ($postdays) {
$url = str_replace( 'viewtopic.php', '', $url );
$url = str_replace( 'postdays=0', '', $url );
} else {
$url = str_replace( 'viewtopic.php', '', $url );
}
$url1 = strtr($url,array("&t="=>",","?t="=>"-t","&"=>"","amp;"=>"","asc"=>"","start="=>"-","postdays="=>"-p","postorder="=>""));
$url = urlencode(strtolower(str_replace($url_search, $url_replace, $row['topic_title'])));
$url .= $url1. ".html";
}
}
}
//
// Forum
//
if( strstr ($url, 'viewforum.php?f=') ) {
$prg=str_replace("viewforum.php?","",$url);
parse_str($prg, $prg_output);
$sql = "SELECT forum_name
FROM " . FORUMS_TABLE . "
WHERE forum_id = '".$prg_output['f']."'";
if ( !($result = $db->sql_query($sql)) ) {
#message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql);
}
if ( $row = $db->sql_fetchrow($result) ){
$start= preg_match('#start=0#', $url);
$topicdays = preg_match( '#topicdays=0#', $url);
$mark = preg_match( '#mark#', $url);
if ($start) {
$url = str_replace( 'start=0', '', $url );
}
if ($topicdays) {
$url = str_replace( 'topicdays=0', '', $url );
}
if (!($mark)) {
$url = str_replace( 'viewforum.php', '', $url );
$url1 .= strtr($url,array("?f="=>"-f","amp;"=>"","&"=>"","start="=>"-s","topicdays="=>"-"));
$url = urlencode(strtolower(str_replace($url_search, $url_replace, $row['forum_name'])));
$url .= $url1. ".html";
}
}
}
if ( !empty($SID) && !preg_match('#sid=#', $url) )
{
$url .= ( ( strpos($url, '?') !== false ) ? ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID;
}
return $url;