solved Change profile index to groups the profile is following?

alt=
@tettlingen
7 years ago
93 posts
Hi. A question.

I use profile tweeks to make GROUPS the default profile index page for one of my quotas, and It is working very well. However, this only shows the groups a profile has CREATED but not the ones they are FOLLOWING, - the latter would be ideal for my site.

Is it i possible to make MY_GROUPS (Groups you follow) the profile index instead?
I see that profile tweeks does have a list with modules that can be used, but this is not avaliable as an option.

It this doable adjusting some template somewere?

Regards

updated by @tettlingen: 02/16/18 09:58:22AM
paul
@paul
7 years ago
4,326 posts
Yep - This is fairly straightforward by editing the Group module's item_index.tpl template. Change lin 52 from

        {jrCore_list module="jrGroup" profile_id=$_profile_id order_by="_created desc" pagebreak="8" page=$_post.p pager=true}

to

    	{$_mygroups = jrGroup_get_user_groups($_user_id)}
        {$in = implode(',', $_mygroups)}
        {jrCore_list module="jrGroup" search="_item_id IN `$in`" order_by="_created desc" pagebreak="8" page=$_post.p pager=true}

You can then change any Group module language strings to suit.
hth


--
Paul Asher - JR Developer and System Import Specialist
michael
@michael
7 years ago
7,714 posts
There are a few correct ways to eidt the Group modules item_index.tpl template. Choose a method that you like from here:

Docs: "Altering a Modules Template"
https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/1051/altering-a-modules-template
alt=
@tettlingen
7 years ago
93 posts
Thank you

Tags