By Julian on Monday, 28 March 2016
Posted in Technical Issues
Replies 12
Likes 0
Views 776
Votes 0
Hi everybody,

first of all good News for all AcyMailing-Users:
AcyBa customized the EasySocial-Plugin for me, so Badges can be assigned with the classig AcyMailing-Filters. This customization was a paid customization for me, but it also will be integrated in the next official release of AcyMailing.

This brings up another question for me: How can I insert the badges in the hover of a user?
I like to have the badges shown here:




All the best, Julian!
Oh, and one more thing:
I would like to show the badges also in kunena:



I guess this makes a lot of sense: Users have badges, so why not showing them?


How can I include them on the space pointed out?
Maybe this can be done with the Kunena-EasySocial-Plugin?

All the best, Julian!
·
Monday, 28 March 2016 09:06
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Julian,

I am really sorry for the delay of this reply.

You can further modify the avatar popbox by going to the /components/com_easysocial/themes/wireframe/profile/popbox.php and add the following line of code somewhere in the file to show user badges.
<div class="pull-left">
<ul class="es-badge-list">
<?php foreach( $user->getBadges() as $badge ){ ?>
<li class="es-badge-item">
<a href="<?php echo $badge->getPermalink();?>" class="badge-link" data-es-provide="tooltip" data-placement="top" data-original-title="<?php echo $this->html( 'string.escape' , $badge->get( 'title' ) );?>">
<img class="es-badge-icon" alt="<?php echo $this->html( 'string.escape' , $badge->get( 'title' ) );?>" src="<?php echo $badge->getAvatar();?>"></a>
</li>
<?php } ?>
</ul>
</div>


Note that the code above is only for example purpose and it's entirely up to you on how you want to style the badge listing.
·
Monday, 28 March 2016 18:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Ezrul,

this works great, thank you!
It works so great, I would like to put it also on the participants-lists of events. But it seems I am unable to find the neccecary file ... there are so much files in the folder themes/wireframe/events/... and none of them seems to match something like "guest-list". I found some files that seem to contain the tabs, but not the content itself.

Can you give me a hint where to look for that kind of user-list?



All the best, Julian!
·
Friday, 01 April 2016 09:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Julian,

If you referring on the event member list, it actually located within the apps file here, /media/com_easysocial/apps/event/guest/themes/default/events/default.list.php .
·
Friday, 01 April 2016 15:54
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Ezrul,

unfortunatelly, after the last upgrade I can´t get it working again.

1. When I modify the popbox.php, simply nothing happens. It seems like the file has no impact on the popup-box. Even when I completely delete the content, the popup-box still appears in the regular layout.

2. Same with default.list.php for the events. I don´t find any way to put something into this file in a way it appears beside the user-names.

Did you change something on the code?

All the best, Julian!
·
Saturday, 11 February 2017 12:53
·
0 Likes
·
0 Votes
·
0 Comments
·
- user pop up file
JoomlaFolder/components/com_easysocial/themes/wireframe/profile/popbox/user.php

- event attendee listing file
JoomlaFolder/media/com_easysocial/apps/event/guests/themes/default/events/list.php
·
Saturday, 11 February 2017 15:47
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex,

great, thank you, it seems to be bouth the right files this time, because some changes happen.
Unfortunatelly, it does not work with the above code.
When I try to put in into the Guest-List of an event, I get the following error:



It says sh404 would throw out an error, but the error also comes up when I deactivate sh404.

In the popup it works better, but still not correct.
There is appearing a list of the badges, but not the icons.



Shouldn´t it be the icons and when hovered the name should appear?

All the best, Julian!
·
Saturday, 11 February 2017 17:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Perhaps you can try attach your customised file included with your code so I can better have a look?
·
Saturday, 11 February 2017 17:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Sure, but I really just added the above code.
Unfortunatelly your template-editor does not support copy&paste, so I made two screenshots.

Here is the popup-code:

·
Saturday, 11 February 2017 17:30
·
0 Likes
·
0 Votes
·
0 Comments
·
Try download my attached file and replace into JoomlaFolder/components/com_easysocial/themes/wireframe/profile/popbox/user.php
·
Saturday, 11 February 2017 17:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex,

works great, thank you.
I saved it through the backend, so it´s an override and survives all updates.

Unfortunatelly, the code does not work for the Event-List. When I simply copy the part of the code for the badges into the list.php, it throws out the error as above.

This is the code of the list.php:


<?php
/**
* @package EasySocial
* @copyright Copyright (C) 2010 - 2016 Stack Ideas Sdn Bhd. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* EasySocial is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
?>
<div>
<?php foreach ($guests as $guest) { ?>
<div class="es-users-item" data-item data-id="<?php echo $guest->id;?>" data-return="<?php echo $returnUrl;?>">
<div class="o-grid">
<div class="o-grid__cell">
<div class="o-flag">
<div class="o-flag__image">
<?php echo $this->html('avatar.user', $guest->user, 'md', false, true); ?>
</div>

<div class="o-flag__body">
<a href="<?php echo $guest->user->getPermalink();?>" class="es-user-name"><?php echo $guest->user->getName();?></a>


<div class="es-user-meta">
<ol class="g-list-inline g-list-inline--delimited es-user-item-meta">
<li>
<?php if ($event->isOwner($guest->uid)) { ?>
<span class="o-label o-label--primary-o label-owner"><?php echo JText::_('APP_EVENT_GUESTS_OWNER'); ?></span>
<?php } ?>

<?php if ($event->isAdmin($guest->uid) && !$event->isOwner($guest->uid)) { ?>
<span class="o-label o-label--danger-o label-admin"><?php echo JText::_('APP_EVENT_GUESTS_ADMIN'); ?></span>
<?php } ?>

<?php if ($guest->isGoing()) { ?>
<span class="o-label o-label--success-o label-going"><?php echo JText::_('APP_EVENT_GUESTS_GOING'); ?></span>
<?php } ?>

<?php if ($guest->isNotGoing()) { ?>
<span class="o-label o-label--warning-o label-not-going"><?php echo JText::_('APP_EVENT_GUESTS_NOT_GOING'); ?></span>
<?php } ?>

<?php if ($guest->isMaybe()) { ?>
<span class="o-label o-label--info-o label-maybe"><?php echo JText::_('APP_EVENT_GUESTS_MAYBE'); ?></span>
<?php } ?>

<?php if ($guest->isPending()) { ?>
<span class="o-label o-label--warning-o label-pending"><?php echo JText::_('APP_EVENT_GUESTS_PENDING'); ?></span>
<?php } ?>

<?php if ($guest->isInvited()) { ?>
<span class="o-label o-label--warning-o label-pending-invitation"><?php echo JText::_('APP_EVENT_GUESTS_INVITED'); ?></span>
<?php } ?>
</li>
</ol>
</div>
</div>
</div>
</div>

<?php if ($this->access->allowed('reports.submit') || $filter == 'list' || $filter == 'all') { ?>
<div class="o-grid__cell o-grid__cell--auto-size">
<div role="toolbar" class="btn-toolbar">

<?php echo $this->html('user.conversation', $guest->user); ?>

<?php if (($event->isAdmin() || $this->my->isSiteAdmin()) && !$event->isOwner($guest->user->id)) { ?>
<div role="group" class="btn-group">
<button data-bs-toggle="dropdown" class="btn btn-es-default-o btn-sm dropdown-toggle_" type="button">
<i class="fa fa-ellipsis-h"></i>
</button>

<ul class="dropdown-menu dropdown-menu-right">
<?php if (($myGuest->isOwner() || $this->my->isSiteAdmin()) && $guest->isStrictlyAdmin()) { ?>
<li>
<a href="javascript:void(0);" data-guest-demote><?php echo JText::_('APP_EVENT_GUESTS_REVOKE_ADMIN'); ?></a>
</li>
<li class="divider"></li>
<?php } ?>

<?php if (($myGuest->isOwner() || $this->my->isSiteAdmin()) && $guest->isStrictlyAdmin()) { ?>
<li>
<a href="javascript:void(0);" data-guest-promote><?php echo JText::_('APP_EVENT_GUESTS_MAKE_ADMIN'); ?></a>
</li>
<li class="divider"></li>
<?php } ?>

<?php if ($guest->isPending()) { ?>
<li>
<a href="javascript:void(0);" data-guest-approve><?php echo JText::_('APP_EVENT_GUESTS_APPROVE_REQUEST'); ?></a>
</li>
<li>
<a href="javascript:void(0);" data-guest-reject><?php echo JText::_('APP_EVENT_GUESTS_REJECT_REQUEST'); ?></a>
</li>
<li class="divider"></li>
<?php } ?>

<?php if ($myGuest->isOwner() || $this->my->isSiteAdmin() || ($myGuest->isAdmin() && !$guest->isAdmin())) { ?>
<li>
<a href="javascript:void(0);" data-guest-remove><?php echo JText::_('APP_EVENT_GUESTS_REMOVE_FROM_EVENT'); ?></a>
</li>
<?php } ?>
</ul>
</div>
<?php } ?>
</div>
</div>
<?php } ?>
</div>

</div>
<?php } ?>

<?php echo $this->html('html.emptyBlock', 'APP_EVENT_GUESTS_EMPTY', 'fa-users', true); ?>
</div>

<?php if ($pagination) { ?>
<div class="es-pagination-footer">
<?php echo $pagination->getListFooter('site');?>
</div>
<?php } ?>

There also comes a second question in mind: I can´t access this file in the backend of ES. Is there any reason for this difference? I would like to save it also as an override once it works ...

All the best, Julian!

·
Sunday, 12 February 2017 07:54
·
0 Likes
·
0 Votes
·
0 Comments
·
You're welcome, I can't see any badge code you inserted on this file JoomlaFolder/media/com_easysocial/apps/event/guests/themes/default/events/list.php

Can you enter that badge code into this file and attach into your next reply?
·
Sunday, 12 February 2017 11:23
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post