1
I made the following hack to header.php to allow me to show different things based on whether users are members of a specific group:
le="color: #000000"><?php *** header.php.orig_060218 Sat Feb 18 15:40:09 2006 --- header.php Sat Feb 18 15:57:11 2006 *************** *** 85,104 **** --- 85,105 ---- $xoopsTpl->assign('xoops_banner', ' '); } // Weird, but need extra <script> tags for 2.0.x themes $xoopsTpl->assign('xoops_js', '//--></script><script type="text/javascript" src="'.XOOPS_URL.'/include/xoops.js"></script><script type="text/javascript"><!--'); // get all blocks and assign to smarty $xoopsblock = new XoopsBlock(); $block_arr = array(); if ($xoopsUser != '') { $xoopsTpl->assign(array('xoops_isuser' => true, 'xoops_userid' => $xoopsUser->getVar('uid'), 'xoops_uname' => $xoopsUser->getVar('uname'), 'xoops_isadmin' => $xoopsUserIsAdmin)); $groups = $xoopsUser->getGroups(); + $xoopsTpl->assign('xoops_ugroups',$groups); } else { $xoopsTpl->assign(array('xoops_isuser' => false, 'xoops_isadmin' => false)); $groups = XOOPS_GROUP_ANONYMOUS; } $toppage = false; if (isset($xoopsModule) && is_object($xoopsModule)) { // set page title $xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name')); $xoopsTpl->assign('xoops_dirname', $xoopsModule->getVar('dirname')); $moduleid = $xoopsModule->getVar('mid');
The line that begins with the plus sign "+" is the only addition. It would be nice if this made it into the next version. BTW this site is running 2.0.13.1.