Tekst met een variabele meertalig maken OPGELOST
Geplaatst: 16 mei 2005, 13:26
In mijn 'Wie is online' box heb ik een mod toegevoegd die weergeeft welke leden zich in de laatste 48 uur hebben geregisteerd. Werkt goed echter is hij niet meertalig. Een normale tekst kan ik wel 2 talig maken maar het lukt mij niet met een variabele daarin. Wie heeft juiste code voor mij?
Code: Selecteer alles
#
#-----[ OPEN ]------------------------------------------
#
# index.php
#
#-----[ FIND ]------------------------------------------
#
# //
# // Start output of page
# //
#
#-----[ REPLACE WITH ]------------------------------------------
#
//
// Begin Last x hours registrations MOD
//
$new_user_list = '';
$number_of_hours = 48;
$sql = "SELECT user_id, username, user_regdate
FROM " . USERS_TABLE . "
ORDER BY user_regdate DESC";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query users', '', __LINE__, __FILE__, $sql);
}
while( $row = $db->sql_fetchrow($result) )
{
if ( $row['user_regdate'] >= ( time() - $number_of_hours*3600 ) )
$new_user_list .= ($new_user_list !='') ? ', <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><b>' . $row['username'] . '</b></a>' : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><b>' . $row['username'] . '</b></a>';
else break;
}
$new_user_list = ($new_user_list != '') ? 'In last ' . $number_of_hours . ' hours registered: ' . $new_user_list : 'There are no new users in last ' . $number_of_hours . ' hours';
$db->sql_freeresult($result);
//
// End Last x hours registrations MOD
//
#
#-----[ FIND ]------------------------------------------
#
# 'FORUM_IMG' => $images['forum'],
#
#-----[ BEFORE, ADD ]------------------------------------------
#
# 'NEW_USERS_LAST_DAYS' => $new_user_list,
#
#-----[ OPEN ]------------------------------------------
#
# templates\subSilver\index_body.tpl
#
#-----[ FIND ]------------------------------------------
#
# <td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}<br />{NEWEST_USER}</span>
#
#-----[ REPLACE WITH ]------------------------------------------
#
# <td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}<br />{NEWEST_USER}<br />{NEW_USERS_LAST_DAYS}</span>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM