• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Character Name Restriction (CAPSLOCK & ÅÄÖ)

OZiRY

ONLiNE
Joined
Mar 11, 2010
Messages
281
Reaction score
5
How do I make it possible to name characters with CAPSLOCK and letters like ÅÄÖ?
 
system/libraries/form_validation.php

PHP:
function nickname($str)
        {
                return ( ! preg_match("/^([a-z' ])+$/i", $str)) ? FALSE : TRUE;
        }
 
Doesnt seem to work..
I replaced:
Code:
	function nickname($str)
	{
		$a = explode(' ', $str);
		$error = 0;
		foreach($a as $b)
			if(!preg_match("/^[a-zA-Z]{3}+(([\'\-][a-zA-Z]{2})?[a-zA-Z]*)*$/", $b))
				$error++;
				
		return $error ? FALSE : TRUE;
	}
with
Code:
function nickname($str) 
        { 
                return ( ! preg_match("/^([a-z' ])+$/i", $str)) ? FALSE : TRUE; 
        }
but it's still not possible to name the characters with capslock or foreign letters.. (accepted by the tibia client)
 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

try that
 
Back
Top