By Pawan on Monday, 23 May 2016
Posted in General
Replies 3
Likes 0
Views 245
Votes 0
In the previous version of ED , with your help I was able to customize to show the 'answered' filter active on page load for support group. This helps the support group to easily find the answered questions. But that customization does not work in the new version.

The Customization was done on the file : Components/com_easydiscuss/view/index/view.html.php

by finding the user group id and putting and making the Unanswered filter when certain ID was found.

$gid = $my->groups;
//8 is the group_id of superuser, 11 is for lawyer, 17 is for moderator
$lawyer ='11';
$superuser = '8';
$moderator= '17';
if (in_array($lawyer, $gid)){$filter='unanswered';}
if (in_array($moderator, $gid)){$filter='unanswered';}


Now in the latest version, the following code does not fetch the group id on the above specified file:
$gid = $my->groups;


My question is what shortest code should I use here to fetch user group id or array of the group ids.
I am sorry for the delay of this reply,

Based on what you described above, it seems like you missing this line of code to get the current user id :

$my = JFactory::getUser();

Perhaps you can give it a try.

By the way, I am really sorry but we are actually quite tied up with our own internal development Easysocial 2.0 and we wouldn't be able to assist you with these customizations right now If this is a priority, please do post them on our sales section at https://crm.stackideas.com and our sales department would get back to you with a proper quote.
·
Tuesday, 24 May 2016 11:52
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks.
·
Tuesday, 24 May 2016 12:51
·
0 Likes
·
0 Votes
·
0 Comments
·
You're welcome.
·
Tuesday, 24 May 2016 15:30
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post