Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
2 + 5 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
   

Re: request: pass list of groups to template
by koertzen on 2006/3/21 20:59:12

I agree. I made a similar hack to set a flag if a user is a member of a particular group that was central to that particular installation, which I shall refer to as "install": install_isvolunteer, install_isstaff.

It will make my job easier if the core references these groups and passes them to the template so that I can create end-user interfaces referencing these groups without such a hack.

Thanks,
Jeff
request: pass list of groups to template
by dreamgear on 2006/2/18 16:04:21

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', '&nbsp;'); } // 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.

Who's Online

206 user(s) are online (153 user(s) are browsing Support Forums)


Members: 0


Guests: 206


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits