Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
Metamod with AEC recipe question
Metamod with AEC recipe question
I am looking at Metamod module to control items in frontend
In This code what would I place in here for "usertype" for AEC and where in your module would I paste this.
// if you are using any Joomla extensions that allow you to create
// your own user groups, you need to use the following syntax:
if ( $user->usertype == "My Special Group Name" ) return 54;
These are the two options in Metamod I would like to use
// if user is not logged in, show mod 44. If they are logged in show mod 45:
if ( MM_NOT_LOGGED_IN ) return 44; else return 45;
// if user is not logged in, show mod 44. If they are logged in show nothing at all:
if ( MM_NOT_LOGGED_IN ) return 44; else return;
I have Joomla 1.5.19
Metamod 2.3
AEC Version 0.14
Re: Metamod with AEC recipe question
Hi Derek,
so are you wanting to show specific modules to people in your AEC group, and either an alternative or nothing to anyone who is not in that group?
I just had a look at the AEC entry in the JED, and it appears that it uses the built-in user groups in Joomla, or can use JACL or others.
So I think that the answer to your question may depend on what underlying system is being used to provide the groups. Do you know what that is? Or perhaps AEC has its own groups... I couldn't tell from the JED description.
If AEC has its own implementation of groups, then I'd need to be able to look at it more closely in order to provide a recipe for it. Perhaps in that case you might be able to provide me some admin access into your site, or send me a copy of AEC to work with? (that's allowed, since AEC is GPL you are allowed to share it).
Best regards,
Stephen
Re: Metamod with AEC recipe question
Hi, I would like to revoke this thread if there's still no recipe for AEC but in my case I should be able to just use $user->groups since the only thing I need is...
Show module to "Registered" users
Not show it to "Authors"
or I should be able to use the MM_NOT_USER_AUTHOR but I can't seem to get it working in no way , could you give me a recipe that should work, for the AEC I could try to get the info you'd need for that. In my case I have two subscriptions, ART and VIP, the former free account and the second a paid more advanced subscr. so the module is "Get VIP access" wich I don't want VIP's to see
, even more advanced, show it every other or third session a Registered user logs in but that's not necessary atm.
*edit: using Joomla 1.7, MetaMod 3.7, aec 0.14.4
Regards,
Kiddi.
Re: Metamod with AEC recipe question
just some more info,
// show a notice to anyone logged in who is not in the "Author" group
if ( MM_LOGGED_IN && MM_NOT_USER_AUTHOR ) return 53;
or.. ( MM_LOGGED_IN && MM_NOT_USER_AUTHOR )
or.. if ( MM_NOT_USER_AUTHOR ) return 53;
or.. if ( MM_USER_AUTHOR ) return; else return 53;
do not work :[
maybe the only thing I haven't tried is the "$user->groups - Array containing 0 or more of the following: "Public"...." how should one setup an array in metamod for usergroup "Author".
When changing from "ART" -> "VIP" manually I have to manually uncheck "Registered" in Joomla user manager, but not from "VIP" -> "ART", then the user is only "Registered", maybe I shouldn't even have do do that.. :]
Re: Metamod with AEC recipe question
Kiddiak I did this a few months ago but it did work.
I did not use authors I used the "logged in" or "not logged in" as in 'registered" or "not registered"
It turns out I did not need to address Juga or AEC for my needs.
So I am not sure my scenario would help you figure out your scenario?
Re: Metamod with AEC recipe question
yeah I think I don't need to address AEC for this, maybe if our subscriptions get more complex but I have to have this based on two different kinds of Registered users, since the free account has limited features but more then a guest ( and a module saying "Get a VIP account" isn't what we want for guests ), and the VIP one a full feature account :] I don't get why this doesn't work :i
Re: Metamod with AEC recipe question
Hi guys - I'm glad that you got this working in J1.7 using the basic logged in / not logged in switch. However I'd be very interested to know if the following approach work for you with AEC/JUGA?
JomGenius has some good detection for normal Joomla user groups. I did some new work on this for Joomla 1.7, so I would like to know if this works for AEC/JUGA as well. I hope so.
To do a basic display of what groups someone is in, you could do this in MetaMod:
$groups = $core_genius->info("groups");
echo "user is in groups: <pre>" . print_r($groups,true)."</pre>";
Could you try that with someone logged in as one of the AEC or JUGA groups, and see if the group name shows up?
If it does, then you can easily control modules by group like this:
// to show someone if someone is in a stated group:
if ($core_genius->check("groups = mygroup1,mygroup2")) return XXX;
// or use this to show if someone is NOT in
// any of the stated groups:
if ($core_genius->check("groups = none of mygroup1, mygroup2")) return XXX;
Hope that helps,
Stephen
Re: Metamod with AEC recipe question
Thanks Stephen I can try to get you a superadmin for the dev site and you could try it there it is 1.5 but it does have juga and AEC
I might even decide to use this site to do a migration test to move to 1.7.
Then you could poke around in there if you like Stephen.
I am just trying to book 2 or 3 hours in my schedule to do it tomorrow or Sunday. So you have motivated me now.
Let me know if any of these options are of interest to you ?
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5943
- Total Posts Today:
- 1
- User Info:
- Total Users:
- 7638
- Newest User:
- moner86658
- Members Online:
- 1
- Guests Online:
- 157
- Online:
- moner86658
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked