By Tony Boutemeur on Friday, 04 May 2018
Posted in General
Likes 0
Views 891
Votes 0
Hi,

On Easydiscuss menu, "Groups" (after Badges) isn't visible.

When I enabled Easydiscuss toolbar, it was visible.

I took a look in mod_easydiscuss_navigation in /templates/vanilla/html and Group menu is written as the original folder in /components/com_easydiscuss/themes/wireframe/toolbar/default.php


<?php if ($group) { ?>
<li class="<?php echo $active == 'groups' ? ' is-active' : '';?>">
<a href="/<?php echo EDR::_('view=groups');?>" class="ed-navbar__footer-link"><?php echo JText::_('COM_EASYDISCUSS_TOOLBAR_GROUPS');?></a>
</li>
<?php } ?>


I created a fake group with a fake discussion with Easydiscuss app and the discussion was created (all works as expected) but impossible to find this discussion in Easydiscuss (instead of from Easysocial group) if I don't get a Group link in Easydiscuss menu.

Do you have an idea for fix it?
Hey Tony,

My apologies as I misread you mentioning the navigation module in Vanilla template. Looks like there is a bug here where the $group is not defined.

I will log this issue in our tracker.

In the meantime, you can add the following code in the file: JoomlaFolder/templates/vanilla/html/mod_easydiscuss_navigation/default.php http://take.ms/3fG5w
[gist type="php"]
$group = ED::easysocial()->isGroupAppExists();
[/gist]
·
Friday, 04 May 2018 18:52
·
0 Likes
·
0 Votes
·
0 Comments
·
If I am referring to the other menu link like Tags or Categories, Groups link must be written like this (I think):


<?php if ($showGroup) { ?>
<li class="<?php echo $active == 'groups' ? ' is-active' : '';?>">
<a href="<?php echo EDR::_('view=groups');?>" class="ed-navbar__footer-link"><?php echo JText::_('COM_EASYDISCUSS_TOOLBAR_GROUPS');?></a>
</li>
<?php } ?>


But nothing happens, groups in easydiscuss menu doesn't appear
·
Friday, 04 May 2018 17:13
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Tony,

The code from your opening post or from the file(/components/com_easydiscuss/themes/wireframe/toolbar/default.php) should be correct.

Make sure the Easydiscuss group app is enabled, and the user is logged in.

If the option is still not showing, can you provide me the backend and ftp access to your site so I can check this?
·
Friday, 04 May 2018 18:11
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Raymond,

If I set module like toolbar I have got Notice: Undefined variable: group in /~/templates/vanilla/html/mod_easydiscuss_navigation/default.php on line 72 with this: <?php if ($group) { ?>

In mod_easydiscuss_navigation, you cannot set <?php if ($group) { ?>, I think the module code asking this form: <?php if ($showGroup) { ?> and doesn't want recognize the original code from toolbar.

At this time, I have to go. I will set an access when I am going back, if there is no answer.
·
Friday, 04 May 2018 18:35
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you Raymond,

Indeed, in my default.php file, $showGroup was like this:

$config = ED::config();

$showRecent = $config->get('layout_toolbardiscussion');
$showCategories = $config->get('layout_toolbarcategories');
$showTags = $config->get('layout_toolbartags');
$showBadges = $config->get('layout_toolbarbadges');
$showUsers = $config->get('layout_toolbarusers');
$showGroup = $config->get('layout_toolbargroups'); <----

$input = JFactory::getApplication()->input;
$active = $input->get('view', 'index');

As you recommended I set $group = ED::easysocial()->isGroupAppExists(); and it works!

Good job! Thank you.
·
Saturday, 05 May 2018 00:38
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for updating us on this Tony, glad that your issue is resolved now
·
Saturday, 05 May 2018 00:40
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post