Hi everyone.
I am trying to add towns or city but it only appears to me to select but without name of the city here I leave a capture.
I am using myacc
this is the code that should appear
pd : This is account.create_character.html.twig
I made an edit but I couldn't get the city names to appear but the city numbers did !
my code
config.php towns
I am trying to add towns or city but it only appears to me to select but without name of the city here I leave a capture.
I am using myacc
this is the code that should appear
pd : This is account.create_character.html.twig
PHP:
{% endif %}
{% if config.character_towns|length > 1 %}
<td>
<table class="TableContent" width="100%">
<tr class="Odd" valign="top">
<td width="160"><br/><b>Select your city:</b></td>
<td>
<table class="TableContent" width="100%">
{% for town_id in config.character_towns %}
<tr>
<td>
<input type="radio" name="town" id="town{{ town_id }}" value="{{ town_id }}"
{% if town is not null and town == town_id %} checked="checked"{% endif %}>
<label for="town{{ town_id }}">{{ config.towns[town_id] }}</label>
</td>
</tr>
{% endfor %}
</table>
</td>
</tr>
</table>
</td>
{% endif %}
</tr>
</table>
</div>
</td>
</tr>
</table>
I made an edit but I couldn't get the city names to appear but the city numbers did !
my code
PHP:
{% if config.character_towns|length > 1 %}
<tr>
<td>
<div class="TableContentContainer">
<table class="TableContent" width="100%" style="border:1px solid #faf0d7;">
<tbody>
<tr class="LabelH">
<td colspan="2">Select your town</td>
</tr>
<tr class="Odd">
{% for town_id in config.character_towns %}
<td>
{% set town_name = config.towns[town_id] %}
{{ town_id }}: {{ town_name }} <!-- Debugging -->
{% if town_name is defined %}
<input type="radio" name="town" id="town{{ town_id }}" value="{{ town_id }}"
{% if town is not null and town == town_id %} checked="checked"{% endif %}>
<label for="town{{ town_id }}">{{ town_name }}</label>
{% else %}
<label for="town{{ town_id }}">Unknown Town</label>
{% endif %}
</td>
{% endfor %}
</tr>
</tbody>
</table>
</div>
</td>
</tr>
{% endif %}
config.php towns
Code:
// town list used when creating character
// won't be displayed if there is only one item (rookgaard for example)
'character_towns' => array(1, 3),
// list of towns
// if you use TFS 1.3 with support for 'towns' table in database, then you can ignore this - it will be configured automatically (generated from your .OTBM map)
'towns' => array(
0 => 'No Town',
1 => 'Tutorial City',
2 => 'Dawport',
3 => 'Rockgaard',
5 => 'AbDendriel',
6 => 'Carlin',
8 => 'Thais',
9 => 'Venore',
10 => 'Ankrahmun',
11 => 'Edron',
12 => 'Farmine',
13 => 'Darashia',
14 => 'Liberty Bay',
15 => 'Port Hope',
16 => 'Svargrond',
17 => 'Yalahar',
20 => 'Rathleton'
),