Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

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

lorachats
Beginner Modder
ranks
useravatar
Offline
4 Posts
Administrator has disabled public posting

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

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Online
3328 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5933
Posts this week:
4
User Info:
 
Total Users:
4384
Newest User:
rash39381
Members Online:
1
Guests Online:
120

Online: 
metamodguy

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked