thx steve for help but also this change of language will be only in the admin part how to let the user to choose his languages?
and how to change the light to left alignement for each languages?
and have another question i want to count the user online on the site but i don't know where to put my php script to count user that have success to logged in
thx again
Posted: Tue Jan 08, 2008 10:32 am
by shannah
how to let the user to choose his languages?
Not sure why the language selector is not showing up. You can always change the language to a desired language by adding -lang=xx where xx is the language code of the language to change to. So you could just add a link to index.php?-lang=en to change to english or index.php?-lang=fr to change to french etc...
how to change the light to left alignement for each languages?
function block__custom_stylesheets(){ echo ''; $app =& Dataface_Application::getInstance(); switch ( $app->_conf['lang'] ){ case 'ar': echo ''; }
}
i want to count the user online
For this you'll probably want to create a table that keeps track of the users who have accessed the script in the past X number of minutes (e.g. 5 minutes). You'll want to store: 1. username (unique) 2. IP address (unique) 3. timestamp
An appropriate place to add code for this would be in the getPreferences() method in the application delegate class because it is executed on every request after the user authentication has been handled.
$res = mysql_query("select count(*) from online_users", df_db()); list($num) = mysql_fetch_row($res); echo $num; // The number of users currently online