By Jan Kovač on Thursday, 10 March 2016
Posted in Technical Issues
Likes 0
Views 324
Votes 0
Please help me with this simple thing (for you).

in this file components/com_easysocial/themes/wireframe/points/default.php

for this tag

<ul class="fd-reset-list points-list">...</ul>


add a condition that allows to display only points items that have a specific value. Like as one "ul- tag" for point rules with value 5points.

<div data-dashboard>
<div class="view-heading" data-dashboard-heading>
<h3 data-heading-title><?php echo JText::_( 'COM_EASYSOCIAL_POINTS_HEADING' );?></h3>
<p data-heading-desc><?php echo JText::_( 'COM_EASYSOCIAL_POINTS_HEADING_DESC' ); ?></p>
</div>

<div class="es-container pt-20">
<ul class="fd-reset-list points-list">
<?php foreach( $points as $point ){ ?>
<li class="es-widget es-point<?php echo $point->points < 0 ? ' es-point-red' : '';?><?php echo $point->points > 10 ? ' es-point-green' : '';?>">
<div class="es-widget-head">
<a href="<?php echo $point->getPermalink();?>">
<h5><?php echo JText::_( $point->title );?></h5>
</a>
</div>

<div class="es-widget-body">

<div class="point-result">
<div class="point-result-inner">
<?php echo $point->points; ?>
</div>
</div>
<div class="point-desp"><?php echo $point->get( 'description' ); ?></div>
</div>

<div class="es-widget-foot">
<h6><?php echo JText::_( 'COM_EASYSOCIAL_POINTS_ACHIEVERS' );?>:</h6>
<span><?php echo $point->getTotalAchievers();?></span>
</div>
</li>
<?php } ?>
</ul>
<div class="mt-20 pagination-wrapper text-center">
<?php echo $pagination->getListFooter( 'site' ); ?>
</div>
</div>
</div>
Hello Jan,

Ah, I see. Please try to study the attached file on how I group them.
·
Thursday, 10 March 2016 12:18
·
0 Likes
·
0 Votes
·
0 Comments
·
some like this, but functional

<div>
<?php foreach ($points as $point) { if ($point->id == 5) echo $point->value;} { ?>
<ul></ul>
<?php } ?>
<?php foreach ($points as $point) { if ($point->id == 10) echo $point->value;} { ?>
<ul></ul>
<?php } ?>
<?php foreach ($points as $point) { if ($point->id == 20) echo $point->value;} { ?>
<ul></ul>
<?php } ?>
</div>
·
Thursday, 10 March 2016 08:17
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Jan,

Based on your code, you are checking on the point ID. I'm sorry, I'm a bit lost here. Can you elaborate more on this?
·
Thursday, 10 March 2016 11:35
·
0 Likes
·
0 Votes
·
0 Comments
·
[
{
"title" : "Install Applications",
"alias" : "install-apps",
"description" : "Earn points when you install applications for your profile.",
"command" : "apps.install",
"extension" : "com_easysocial",
"state" : true,
"points" : 5 // ID as operator for value
}
]
·
Thursday, 10 March 2016 11:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Group for points rules with the same value, which is specified by ID or some like this.
·
Thursday, 10 March 2016 11:53
·
0 Likes
·
0 Votes
·
0 Comments
·
http://easysocial.stackideas.com/points/

sorting points with same value to each standalone ul tags.
·
Thursday, 10 March 2016 11:58
·
0 Likes
·
0 Votes
·
0 Comments
·
excelent...thanks

It's exactly it
·
Thursday, 10 March 2016 12:48
·
0 Likes
·
0 Votes
·
0 Comments
·
You're welcome.
·
Thursday, 10 March 2016 12:56
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post