Guest User

Untitled

a guest
Jan 17th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. foreach ($activities as $activity){
  5.  
  6. // user
  7. $user = CFactory::getUser( $activity->actor );
  8. $name = $user->getDisplayName();
  9. $link = CRoute::_('index.php?option=com_community&view=profile&userid='.$activity->actor);
  10.  
  11. //likes
  12. $likes = count(explode(',', $activity->like));
  13. echo $activity->id. ' - '.JHtml::Date($activity->created, 'd-m-Y H:i:s', true) .' por <a href="'.$link.'">'.$name.'</a>';
  14. echo ' <i class="fa fa-thumbs-up"></i> '.$likes.'<hr>';
  15. }
  16. ?>
Add Comment
Please, Sign In to add comment