Memberlist core extension
Hi All,
Just wondering the best way to create the following using the Memberlist core extension:
- 2 member groups (1 & 2)
- 3 members in each member group (A, B & C)
- 1 page on the site which presents data for all the members in that particular group. So, if member A from group 1 logged in, they would see the details of members B & C from group 1 but not see the members from group 2. If member A from group 2 logged in, they would only see details for members B & C from group 2.
I tried to achieve this by adding 1 page in the navigation and assigning this page a Memberlist module, but if I check the boxes (in the module) to list groups A & B, then members from both groups see all members from both groups when logged in. It would be handy for it to check the groups of the logged in user and only present other members in their groups.
Do I have to create a module for each group? I'm hoping there's an easier way and i'm just missing something as that would require me to add a module every time I created a group and I could have a large number of groups.
Thanks
Re: Memberlist core extension
You must create 2 memberlist modules for this, where in one you only check group 1 and in the other you check group 2. Then put the modules also on two pages, where one page is only displayed to group 1 and the other to group 2 members.
The other option would be to create a custom list, for example with efg or the listing extension.
Which is more work may depend on the filnal number of groups.
Re: Memberlist core extension
Thanks! I'll check out the custom list option and make a decision.
Re: Memberlist core extension
Hi,
I've been looking at the listing module and extension but it doesn't seem to be able to use a condition to perhaps say:
'WHERE groups = group_of_logged_in_user'
I guess if I needed to I could edit the SQL in the memberlist module to select and unserialze the groups from the tl_member table, and use the result as part of the query but I was hoping to avoid that.
Are there any extensions capable of doing this? Apologies if I have misunderstood your suggestion.
Thanks.
Re: Memberlist core extension
The core module "listing" does have a condition field, please look again.
But in the repository you can also find other modules such as efg or zedseries_listing that may suit.
Re: Memberlist core extension
Hi,
Yes, I see the condition field in the module and zedseries, but I guess I just wondered if there was an example of the condition that I should use to pull the logged in user's group value (insert tag variable?) and apply it. I've checked the documentation but no joy.
If not, no worries, I'll run some tests and see what I can figure out.
Thanks
Re: Memberlist core extension
Quote:
Originally Posted by schaedelio
I just wondered if there was an example of the condition that I should use to pull the logged in user's group value (insert tag variable?) and apply it
You can create a custom insert_tags that returns the value you need and use it in listing module or zedseries listing
Re: Memberlist core extension
Thanks!
I will look at the custom insert tags solution and post my findings.
Re: Memberlist core extension
As of version 1.5, zedseries_listing has a new class that can be used to write custom "listing like" module, take a look at http://www.zedseries.com/zedseries-listing-v-1.5.html.
feel free to contact me if you need more details
Re: Memberlist core extension
Today i installed an update for the memberlist and now it doesnt seem to work, is there something different i need to do with the new version of memberlist?
Thanks.
Re: Memberlist core extension
when i try to use the memberlist module on a page i get the following error
Quote:
Fatal error: Call to undefined method ModuleMemberListExtended::getIndexFreeRequest() in /home/content/n/o/t/nothingsacred/html/system/modules/memberlist/ModuleMemberlist.php on line 326
Could someone please help me figure out what this means.
Thanks,
Ste
Re: Memberlist core extension
Quote:
Originally Posted by matchboxhero
when i try to use the memberlist module on a page i get the following error
Quote:
Fatal error: Call to undefined method ModuleMemberListExtended::getIndexFreeRequest() in /home/content/n/o/t/nothingsacred/html/system/modules/memberlist/ModuleMemberlist.php on line 326
which version of Contao are you running?
Re: Memberlist core extension
Re: Memberlist core extension
Quote:
Originally Posted by matchboxhero
its running on 2.9
As stated in the official repository this is the line 326 of ModuleMemberList module
http://dev.contao.org/projects/membe...rlist.php#L326
the function getIndexFreeRequest is defined into
http://dev.contao.org/projects/typol...ystem.php#L317
check that your installation matches the above files
Re: Memberlist core extension
The extension "memberlist" is tagged from Contao version 2.9.1 to 2.9.2!
Re: Memberlist core extension
Quote:
Originally Posted by xchs
The extension "
memberlist" is tagged from Contao version 2.9.
1 to 2.9.2!
I will try and update the version of contao see if that makes any difference, thanks.