I get the code uit the UCP file for the register file but it will not work
I have now this code
I Have this in the portal.php
Code: Select all
// Checking amount of available languages
$sql = 'SELECT lang_id
FROM ' . LANG_TABLE;
$result = $db->sql_query($sql);
$lang_row = array();
while ($row = $db->sql_fetchrow($result))
{
$lang_row[] = $row;
}
$db->sql_freeresult($result);
if ($coppa === false && $config['coppa_enable'])
{
$now = getdate();
$coppa_birthday = $user->format_date(mktime($now['hours'] + $user->data['user_dst'], $now['minutes'], $now['seconds'], $now['mon'], $now['mday'] - 1, $now['year'] - 13), $user->lang['DATE_FORMAT']);
unset($now);
$template->assign_vars(array(
'S_LANG_OPTIONS' => (sizeof($lang_row) > 1) ? language_select($user_lang) : '',
));
}
else
{
$template->assign_vars(array(
'S_LANG_OPTIONS' => (sizeof($lang_row) > 1) ? language_select($user_lang) : '',
)
);
}
unset($lang_row);
$this->tpl_name = 'ucp_agreement';
return;
$add_lang = ($change_lang) ? '&change_lang=' . urlencode($change_lang) : '';
$change_lang = request_var('change_lang', '');
if ($change_lang || $user_lang != $config['default_lang'])
{
$use_lang = ($change_lang) ? basename($change_lang) : basename($user_lang);
if (!validate_language_iso_name($use_lang))
{
if ($change_lang)
{
$submit = false;
// Setting back agreed to let the user view the agreement in his/her language
$agreed = (empty($_GET['change_lang'])) ? 0 : $agreed;
}
$user->lang_name = $user_lang = $use_lang;
$user->lang = array();
$user->data['user_lang'] = $user->lang_name;
$user->add_lang(array('common', 'ucp'));
}
else
{
$change_lang = '';
$user_lang = $user->lang_name;
}
}
Code: Select all
'LANGUAGE' => 'Change language',
Code: Select all
<!-- Start Board Language -->
<div class="forabg">
<div class="inner"><span class="corners-top"><span></span></span>
<ul class="topiclist">
<li class="header">
<dl class="icon">
<dt>{LANGUAGE}</dt>
</dl>
</li>
</ul>
<ul class="topiclist forums">
<li>
<div class="content" style="width:auto; height:auto; padding:10px; padding-bottom:0px; text-align:center;">
<select name="lang" id="lang" onchange="change_language(this.value); return false;" tabindex="6" title="{LANGUAGE}">{S_LANG_OPTIONS}</select>
<br />
</div>
</li>
</ul>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- End Board Language -->
I think the code that state in the portal.php is not good
I hope there is some that can help me out this
already thanks for the help
Greets Terr0r