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
- » Recipe for ACL Joomla 2.5
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.
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
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
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?
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]
19-Apr-12 12:26:02
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
- Index
- » MetaMod Pro
- » MetaMod Pro General Support
- » Recipe for ACL Joomla 2.5
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5943
- Posts this week:
- 2
- User Info:
- Total Users:
- 7639
- Newest User:
- corwin8669
- Members Online:
- 1
- Guests Online:
- 92
- Online:
- corwin8669
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked