diff -r 000000000000 -r db23957ad1c7 plugins/ajim/client.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/ajim/client.php Sun Jan 11 21:38:42 2009 -0500 @@ -0,0 +1,84 @@ +attachHook('compile_template', 'ajim_compile_sidebar();'); + +function ajim_compile_sidebar() +{ + global $db, $session, $paths, $template, $plugins; // Common objects + global $lang; + + $template->add_header(''); + $template->add_header(''); + $can_mod = $session->get_permissions('ajim_mod') ? 'true' : 'false'; + $template->add_header(''); + + $msg_loading = $lang->get('ajim_msg_loading'); + $html = '
'; + $html .= <<<__EOF +
+
+
+ + $msg_loading + +
+
+__EOF; + if ( $session->get_permissions('ajim_post') ) + { + if ( $session->user_logged_in ) + { + $html .= ''; + } + else + { + $l_name = $lang->get('ajim_lbl_name'); + $l_site = $lang->get('ajim_lbl_website'); + $html .= <<<______EOF + + + + + +
+ $l_name + + +
+______EOF; + } + $b_submit = $lang->get('ajim_btn_submit'); + $html .= ''; + $html .= <<<____EOF +
+ +
+____EOF; + if ( $session->get_permissions('ajim_mod') ) + { + $html .= '
'; + if ( $session->auth_level < USER_LEVEL_CHPREF ) + { + $html .= '' . $lang->get('ajim_btn_mod') . ''; + } + $html .= '
'; + } + } + else + { + $msg_nopost = $lang->get('ajim_msg_no_post'); + $html .= <<<____EOF + $msg_nopost +____EOF; + } + + $html .= '
+
'; + $template->sidebar_widget('AjIM Shoutbox', $html); +}