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.

 

Recipe for ACL Joomla 2.5

Recipe for ACL Joomla 2.5

I've run through the various recipes but none seems to work, I believe that they are written for 1.5

Is there an update on how I can show a module based on whether the user logged in is admin, author, customgroup1, customgroup2 etc?

Thanks in advance for your continued support. smile

lordbarron
Guest
useravatar
Offline
Administrator has disabled public posting

Re: Recipe for ACL Joomla 2.5

if ($core_genius->check("groups = customgroup1")) return XXX;
// replace XXX with module id to use for customgroup1


You can find more info on the JomGenius page.

Cheers,
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
Offline
3328 Posts
User info in posts
Administrator has disabled public posting

Re: Recipe for ACL Joomla 2.5

Thanks Stephen,

I should of looked there, I was scanning the recipe pages as they had seemingly relevant articles.

lordbarron
Guest
useravatar
Offline
Administrator has disabled public posting

Re: Recipe for ACL Joomla 2.5

I've tried running the following code

if ($core_genius->check("groups != Portfolio")) return 167;

or

if (!$core_genius->check("groups = Portfolio")) return 167;

to load a module if the group isn't part of my Portfolio group. It seems to work in reverse, however If I run just

if ($core_genius->check("groups = Portfolio")) return 167;

Then it adds the module to all groups.

I'm loading the content in a {loadposition xxx } placeholder on a category description page. I don't know if this would have an impact.

I am confused.dot.com

lordbarron
Guest
useravatar
Offline
Administrator has disabled public posting

Re: Recipe for ACL Joomla 2.5

Hi,

when you're dealing with a condition that can contain more than one value (e.g. you can be a member of several groups), the != operator does not act in the way you might expect.

What it does is tests for != against every member of the set, e.g. group != foo OR group != bar OR group != wombat
If you think about that hard enough you realise that there's no value that can actually succeed.

A better way in JomGenius is to do this:

if ($core_genius->check("none of groups = Portfolio")) return 167;

... where "none of" means that none of the items on the left equals the item on the right.

Alternatively you can just negate the entire condition:

if ( ! $core_genius->check("groups = Portfolio")) return 167;

Cheers,
Stephen
ps your e-mail address for this forum always bounces. Can you update your address on here, or PM it to me and I'll update it for you?

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
Offline
3328 Posts
User info in posts
Administrator has disabled public posting

Re: Recipe for ACL Joomla 2.5

Thanks again, I'm going to get my head around what you've said and then implement it. I was getting any error message when I tried to update my email

Invalid registration. If you're a valid user, please hit the back button on your browser and fill in your real details.

My email address is This e-mail address is being protected from spambots. You need JavaScript enabled to view it - probably worth changing my handle to xxxxxxxx to while your there. Thanks for pointing that out.

[edited to remove address]

Edited By: metamodguy
19-Apr-12 11:26:02
lordbarron
Guest
useravatar
Offline
Administrator has disabled public posting

Re: Recipe for ACL Joomla 2.5

Ooops, really sorry about the message. I've been having a terrible time with spam account registrations, and it looks like I set up that rule a bit too tightly.

Fixed now - and your e-mail and handle should be changed now (though old one is still showing above - oh well).

Thanks,
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
Offline
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:
3
User Info:
 
Total Users:
4412
Newest User:
doyal54741
Members Online:
1
Guests Online:
130

Online: 
doyal54741

Forum Legend:

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