Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod Pro
- » MetaMod Pro General Support
- » Module display
Module display
Module display
Hi,
I'm using Metamodpro and GMaccess. I have members in three groups (gmaccess) : blue, red and yellow.
I want to display a Module in the case of an users of the 'blue group' is logged in (and not for the users of the others groups).
It's Is it possible to do this ?
Can you help me ?
Thank's
Re: Module display
Hi lorachats,
I'm not sure I want to install that on my test server, since it manipulates some internal Joomla files... however, I downloaded it and took a look at the source.
I *think* this will work:
if ($user->id > 0) {
$gmid = fonctionGmaccess::myaccess( $user->id );
$gmid = explode( ",", $gmid );
if (is_array($gmid) ) {
if ( in_array( $gmid, '1' ) ) return XXX;
if ( in_array( $gmid, '2' ) ) return YYY;
if ( in_array( $gmid, '3' ) ) return ZZZ;
}
}
Replace XXX, YYY, and ZZZ with the module ids to use for groups 1, 2 and 3. Replace 1, 2 and 3 with the group ids for the blue, red and yellow groups. I'm sorry I don't know how to convert these to look for names rather than group ids, but I hope it's not too inconvenient.
I would be very happy to know if this works for you...
Best regards,
Stephen
- Index
- » MetaMod Pro
- » MetaMod Pro General Support
- » Module display
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5942
- Posts this week:
- 2
- User Info:
- Total Users:
- 7628
- Newest User:
- horlogekorting34
- Members Online:
- 0
- Guests Online:
- 122
- Online:
- There are no members online
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked