function theme_autologout_block in Automated Logout 6.3
Same name and namespace in other branches
- 6.4 autologout.module \theme_autologout_block()
- 7.4 autologout.module \theme_autologout_block()
Themes the automated logout block.
1 theme call to theme_autologout_block()
- autologout_block in ./
autologout.module - Implementation of hook_block().
File
- ./
autologout.module, line 152 - Used to automagically log out a user after a certain time.
Code
function theme_autologout_block() {
global $user;
$seconds = (int) variable_get('autologout_seconds', 0);
if ($user->uid != 0 && $seconds > 0) {
if (module_exists('jstimer') && module_exists('jst_timer')) {
$content = theme('jstimer', 'jst_timer', array(
'interval' => $seconds,
'format_txt' => t('You will be logged out in ') . ' %hours%:%mins%:%secs%',
'complete' => t('You have been automatically logged out due to inactivity.'),
'no_js_txt' => t('You will be logged out in !time.', array(
'!time' => format_interval($seconds),
)),
));
}
return $content;
}
}