2009-05-25, 05:50 PM
As you probably know, there is a way to put international characters in a domain name:
http://en.wikipedia.org/wiki/Internation...omain_name
Unfortunatelly, it doesn't seem to work well with MyBB. We had a thread on our Polish suppot concerning that problem:
http://www.mybboard.pl/polskie-znaki-w-a...-4737.html
In a nutshell: there was a MyBB installed at http://pierzchała.pl/forum/ (where "ł" is obviously an international character). Unfortunatelly, there was no way to log in as the user was redirected into "http://www.pierzchaå/;�a.pl/forum/index.ph" after a successful login. Seems like an encoding problem.
We managed to fix the problem by replacing the approporiate piece of code in redirect() function in inc/functions.php with the following:
http://en.wikipedia.org/wiki/Internation...omain_name
Unfortunatelly, it doesn't seem to work well with MyBB. We had a thread on our Polish suppot concerning that problem:
http://www.mybboard.pl/polskie-znaki-w-a...-4737.html
In a nutshell: there was a MyBB installed at http://pierzchała.pl/forum/ (where "ł" is obviously an international character). Unfortunatelly, there was no way to log in as the user was redirected into "http://www.pierzchaå/;�a.pl/forum/index.ph" after a successful login. Seems like an encoding problem.
We managed to fix the problem by replacing the approporiate piece of code in redirect() function in inc/functions.php with the following:
// Show redirects only if both ACP and UCP settings are enabled, or ACP is enabled, and user is a guest.
if($mybb->settings['redirects'] == 1 && ($mybb->user['showredirect'] != 0 || !$mybb->user['uid']))
{
$url = str_replace("&", "&", $url);
$url = htmlspecialchars($url);
$url = explode('/',$url);
$valid_url = 'http://www.xn--pierzchaa-xub.pl';
$go = 0;
foreach ($url as $key => $value)
{
if(($value=='forum')||($go==1))
{
$go = 1;
$valid_url .= '/'.$value;
}
}
if($go!=0) $url = $valid_url;
else $url = implode('/',$url);
eval("\$redirectpage = \"".$templates->get("redirect")."\";");
output_page($redirectpage);
}
else
{
$url = str_replace("#", "&#", $url);
$url = htmlspecialchars_decode($url);
$url = str_replace(array("\n","\r",";"), "", $url);
$url = explode('/',$url);
$valid_url = 'http://www.xn--pierzchaa-xub.pl';
$go = 0;
foreach ($url as $key => $value)
{
if(($value=='forum')||($go==1))
{
$go = 1;
$valid_url .= '/'.$value;
}
}
if($go!=0) $url = $valid_url;
else $url = implode('/',$url);
run_shutdown();
header("Location: $url");
}
but I know that it's really a poor solution.