示例#1
0
 $CofiUser = new CofiUser($posting->user_id);
 // get $post->username;
 // $opUserUsername = $CofiHelper->getUsernameById( $posting->user_id);
 $opUserUsername = $CofiUser->getUsername();
 if ($CofiUser->getAvatar() == "") {
     // display default avatar
     echo "<img src='" . $_root . "components/com_discussions/assets/users/user.png' class='cofiAvatar' alt='{$opUserUsername}' title='{$opUserUsername}' />";
 } else {
     // display uploaded avatar
     echo "<img src='" . $_root . "images/discussions/users/" . $posting->user_id . "/large/" . $CofiUser->getAvatar() . "' class='cofiAvatar' alt='{$opUserUsername}' title='{$opUserUsername}' />";
 }
 echo "</div>";
 // display social media buttons
 $twitter = $CofiUser->getTwitter();
 $facebook = $CofiUser->getFacebook();
 $flickr = $CofiUser->getFlickr();
 $youtube = $CofiUser->getYoutube();
 if ($twitter != "" || $facebook != "" || $flickr != "" || $youtube != "" || $_usePrimezilla == "1") {
     echo "<div class='cofiSocialMediaBox'>";
     if ($twitter != "") {
         echo "<a href='http://" . $twitter . "' title='" . $opUserUsername . " on Twitter' target='_blank' >";
         echo "<img src='" . $_root . "components/com_discussions/assets/icons/twitter_16.png' style='margin: 10px 5px 10px 5px;' />";
         echo "</a>";
     }
     if ($facebook != "") {
         echo "<a href='http://" . $facebook . "' title='" . $opUserUsername . " on Facebook' target='_blank' >";
         echo "<img src='" . $_root . "components/com_discussions/assets/icons/facebook_16.png' style='margin: 10px 5px 10px 5px;' />";
         echo "</a>";
     }
     if ($flickr != "") {
         echo "<a href='http://" . $flickr . "' title='" . $opUserUsername . " on Flickr' target='_blank' >";