SMF Resmii Türkiye kategori modearatörlerinden husmen73 sağolsun söyledi nasıl yapacağımı. Aşağıdaki kodu scriptinizin en üstüne ekleyin:
// husmen73 (Gülhin)
// Get the correct query string. It may be in an environment variable...
if (!isset($_SERVER['QUERY_STRING']))
$_SERVER['QUERY_STRING'] = getenv('QUERY_STRING');
// Are we going to need to parse the ; out?
if ((strpos(@ini_get('arg_separator.input'), ';') === false || @version_compare(PHP_VERSION, '4.2.0') == -1) && !empty($_SERVER['QUERY_STRING']))
{
// Get rid of the old one! You don't know where it's been!
$_GET = array();
// Was this redirected? If so, get the REDIRECT_QUERY_STRING.
$_SERVER['QUERY_STRING'] = urldecode(substr($_SERVER['QUERY_STRING'], 0, 5) == 'url=/' ? $_SERVER['REDIRECT_QUERY_STRING'] : $_SERVER['QUERY_STRING']);
// Replace ';' with '&' and '&something&' with '&something=&'. (this is done for compatibility...)
// !!! smflib
parse_str(preg_replace('/&(\w+)(?=&|$)/', '&$1=', strtr($_SERVER['QUERY_STRING'], array(';?' => '&', ';' => '&'))), $_GET);
}
elseif (strpos(@ini_get('arg_separator.input'), ';') !== false)
{
$_GET = urldecode__recursive($_GET);
if (@get_magic_quotes_gpc() != 0 && empty($modSettings['integrate_magic_quotes']))
$_GET = stripslashes__recursive($_GET);
// Search engines will send sayfa=profil%3Bid=1, which confuses PHP.
foreach ($_GET as $k => $v)
{
if (is_string($v) && strpos($k, ';') !== false)
{
$temp = explode(';', $v);
$_GET[$k] = $temp[0];
for ($i = 1, $n = count($temp); $i < $n; $i++)
{
@list ($key, $val) = @explode('=', $temp[$i], 2);
if (!isset($_GET[$key]))
$_GET[$key] = $val;
}
}
// This helps a lot with integration!
if (strpos($k, '?') === 0)
{
$_GET[substr($k, 1)] = $v;
unset($_GET[$k]);
}
}
}