• 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!

Create Account Problem

carbine

There’s too much blood in my alcohol system.
Joined
Jul 23, 2013
Messages
69
Reaction score
11
Location
Sweden
I never like to post Threads.. I always want to try to fix them by my own but this I don´t understand.. You guys known something about this?
I can't select ony world type or world name..? Something I need to do in config?
Thanks for respond!

dg3yh2.png
 
DId you connect your database ?

and inside the config did you configure it right ?

example

PHP:
    $config['sqlUser'] = 'YOUR SQL USER NAME';
   
    // phpmyadmin password for OT server:
    $config['sqlPassword'] = 'YOUR PASSWORD FOR PHPMYADMIN';
   
    // The database name to connect to. (This is usually same as username).
    $config['sqlDatabase'] = 'DATABASE NAME';
   
    // Hostname is usually localhost or 127.0.0.1.
    $config['sqlHost'] = '127.0.0.1';
 
PHP:
if(Website::getServerConfig()->isSetKey('mysqlHost'))
        {
            define('SERVERCONFIG_SQL_TYPE', 'mysql');
            define('SERVERCONFIG_SQL_HOST', 'localhost');
            define('SERVERCONFIG_SQL_PORT', '80'); <-- the port i hope?
            define('SERVERCONFIG_SQL_USER', 'MYUSERNAME');
            define('SERVERCONFIG_SQL_PASS', 'MYPASS');
            define('SERVERCONFIG_SQL_DATABASE', 'MYDATABASENAME');
            define('SERVERCONFIG_SQLITE_FILE', 'forgottenserver.s3db'); <-- SERVER FILE?
        }
        elseif(Website::getServerConfig()->isSetKey('sqlHost'))
        {
            define('SERVERCONFIG_SQL_TYPE', 'sqlType');
            define('SERVERCONFIG_SQL_HOST', 'sqlHost');
            define('SERVERCONFIG_SQL_PORT', 'sqlPort');
            define('SERVERCONFIG_SQL_USER', 'sqlUser');
            define('SERVERCONFIG_SQL_PASS', 'sqlPass');
            define('SERVERCONFIG_SQL_DATABASE', 'sqlDatabase');
            define('SERVERCONFIG_SQLITE_FILE', 'sqlFile');
        }

But I can still see if a players in online on the website and database :S

The only thing I cant see is:
World Name:
[suggest game world]
when create account
 
Last edited:
How it should look like
PHP:
$config['site']['worlds'] = array(0 => 'Testing');
x55nFYq.png


This is how it looks like when you use invalid number as world id
PHP:
$config['site']['worlds'] = array(01 => 'Testing');
H5BB3yd.png
 
How it should look like
PHP:
$config['site']['worlds'] = array(0 => 'Testing');
x55nFYq.png


This is how it looks like when you use invalid number as world id
PHP:
$config['site']['worlds'] = array(01 => 'Testing');
H5BB3yd.png
Hey Ninja!

Im using:
PHP:
$config['site']['worlds'] = array(0 => 'Testing');
 
I downloaded the AAC & layout from the link you provided in your previous post and it worked with default settings. So what have you changed exactly? :p
 
i go
Simply importing the MySQL schema
nPuE6eC.png
I got that fixed but I still cant see world name.. I see the world name everywhere.. like:
Testchar died at level 100 by: dragon :Testing

But not when I create account!
 
I got this problem fixed! ;)
I went to createaccount.php and went to:
PHP:
$main_content .= '</tr></table></div></td></tr><tr><td class="LabelV150"><span'.(isset($e['world']) ? ' class="red"' : '').'><b>World Name:</b></span></td><td><div id="js_world_box" style="display:none"><table width="100%"><tr id="world_list_tr" style="text-align:left"></tr></table><span onClick="ToggleVisibility(\'js_world_box\', \'suggested_world_box\'); UpdateServerList(); "><small>[<a style="cursor:pointer">suggest game world</a>]</small></span></div><div id="suggested_world_box">Suggested world: <span id="suggested_world_div"></span><br/><span onClick="ToggleVisibility(\'suggested_world_box\', \'js_world_box\'); "><small>[<a style="cursor:pointer">change game world</a></span>]</small></div></td></tr><tr><td><table id="js_world_box" width="100%"><tr id="world_list_tr"></tr></table><table id="plain_world_box" width="100%"><tr><td>';
foreach($worlds as $k =>$v)
    $main_content .= '<input id="server_static_'.$config['site']['worlds'][$k].'" type="radio" name="world" value="'.$config['site']['worlds'][$k].'"'.($config['site']['worlds'][$k] == $_POST['world'] ? ' checked="checked"' : '').'><label for="server_static_'.$config['site']['worlds'][$k].'">'.$config['site']['worlds'][$k].'</label><br/>';
$main_content .= '</td></tr></table></td></tr>'.(isset($e['world']) ? '<tr><td></td><td><span class="FormFieldError">'.$e['world'].'</span></td></tr>' : '').'</table></div></div><div class="TableShadowContainer"><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif)"><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif)"></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif)"></div></div></div></td></tr><tr><td><div class="TableShadowContainerRightTop"><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif)"></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif)"><div class="TableContentContainer"><table class="TableContent" width="100%"><tr><td><b>Please select all of the following check boxes:</b></td></tr><tr><td><input type="checkbox" name="agreerules" value="true"  onClick="if(this.checked == true) {  document.getElementById(\'agreerules_errormessage\').innerHTML = \'\';} else {  document.getElementById(\'agreerules_errormessage\').innerHTML = \'You have to agree to the Tibia Rules in order to create an account!\';}"'.($_POST['step'] == 'docreate' && !isset($e['rules']) ? ' checked="checked"' : '').'/>I agree to the <a href="?subtopic=legaldocuments&page=rules" target="_blank">Tibia Rules</a>.</td></tr><tr><td><span id="agreeprivacy_errormessage" class="FormFieldError">'.(isset($e['privacy']) ? $e['privacy'] : '').'</span></td></tr></table></div></div><div class="TableShadowContainer"><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif)"><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif)"></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif)"></div></div></div></td></tr><script type="text/javascript">PreselectWorld="';
if(isset($_POST['world']) && !empty($_POST['world']))
    foreach($config['site']['worlds'] as $id =>$name)
        if($worlds[$id] && $name == $_POST['world']) {
            $main_content .= $name;
            break;
        }

Change:
PHP:
id="plain_world_box" width="100%"><tr><td>';

TO

PHP:
id="sha1_world_box" width="100%"><tr><td>';
 
Back
Top