Example #1
0
 /**
  * Generate a link to an user profile of a social platform.
  *
  * <code>
  * $avatar  = JHtml::_("userideas.profile", $socialProfiles, $userId, "javascript: void(0);");
  * </code>
  *
  * @param stdClass  $socialProfiles Social profiles object.
  * @param integer $userId         User ID
  * @param string  $default        A link to default profile.
  *
  * @return string
  */
 public static function profile($socialProfiles, $userId, $default = null)
 {
     $link = !$socialProfiles ? null : $socialProfiles->getLink($userId);
     // Set the link to default picture
     if (!$link and $default !== null) {
         $link = $default;
     }
     return $link;
 }