| Re: $xoops_isadmin, $xoops_isuser, but $xoops_<custom group>? |
| by mjoel on 2013/8/18 14:06:16 Thank you mamba it works... |
| Re: $xoops_isadmin, $xoops_isuser, but $xoops_? |
| by Mamba on 2013/8/18 13:31:30 "in_group" is a function, not a variable, so you need to do something like this: le="color: #000000"><?php if (in_group('nameofmygroup')) { echo "In Group"; } else { echo "Not in Group"; }
|
| Re: $xoops_isadmin, $xoops_isuser, but $xoops_? |
| by mjoel on 2013/8/18 10:58:30 Quote:
How do i use this if Im in custom php page ? i tried this but not working le="color: #000000"><?php if ($in_group == 'nameofmygroup') { echo "In Group"; } else { echo "Not in Group"; }
|
| Re: $xoops_isadmin, $xoops_isuser, but $xoops_<custom group>? |
| by JCash on 2012/1/19 22:01:06 Nice :) Still works with Xoops 2.5.4 but... why it is not implemented by default ? May be into Xoops 2.6 code ? |
| Re: $xoops_isadmin, $xoops_isuser, but $xoops_<custom group>? |
| by redheadedrod on 2010/1/20 15:18:27 It has been a while since this thread was last updated and I want to know if this method works in the latest versions as of this writing.(2.3.3, 2.4.3) If I have this right... In /class/template.php we look for the line... Quote: $this->Smarty(); And insert the following lines after... Quote:
then in our theme/template use Quote:
Then you could use this to go through every id and adjust the theme or template. What adjustments would need to be made to this to make it look at the group name? And I assume that the system used ID 0-2 for anonymous, registered and admin. On my site I have 2 additional users as it is a team site and I am using the registered user as the generic fans and I also have a "player" and "moderator" groups available. Would rather set them up as the names of the groups so if I add or change groups later this can be used. Also looks like the function listed in the first page would work the way I want it to as well and be somewhat simpler in the long run. Has anyone tested this and make sure it works? And as has been asked where would you put this function? Thanks! |