当前位置: 首页>>代码示例>>PHP>>正文


PHP SocialManager::get_picture_user方法代码示例

本文整理汇总了PHP中SocialManager::get_picture_user方法的典型用法代码示例。如果您正苦于以下问题:PHP SocialManager::get_picture_user方法的具体用法?PHP SocialManager::get_picture_user怎么用?PHP SocialManager::get_picture_user使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SocialManager的用法示例。


在下文中一共展示了SocialManager::get_picture_user方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_lang

                        <button class="btn btn-primary" name="btn_accepted" type="submit" id="btn_accepted_' . $sender_user_id . '" value="' . get_lang('Accept') . ' "onclick="javascript:register_friend(this)">
                        ' . get_lang('Accept') . '</button>
                        <button class="btn btn-danger" name="btn_denied" type="submit" id="btn_deniedst_' . $sender_user_id . ' " value="' . get_lang('Deny') . ' " onclick="javascript:denied_friend(this)" >
                        ' . get_lang('Deny') . '</button>
                    </div>
                </div>
        </div>';
    }
}
if (count($list_get_invitation_sent) > 0) {
    $social_right_content .= '<div class="span8">' . Display::page_subheader(get_lang('InvitationSent')) . '</div>';
    foreach ($list_get_invitation_sent as $invitation) {
        $sender_user_id = $invitation['user_receiver_id'];
        $social_right_content .= '<div id="id_' . $sender_user_id . '" class="invitation_confirm span8">';
        $picture = UserManager::get_user_picture_path_by_id($sender_user_id, 'web', false, true);
        $friends_profile = SocialManager::get_picture_user($sender_user_id, $picture['file'], 92);
        $userInfo = api_get_user_info($sender_user_id);
        $title = Security::remove_XSS($invitation['title'], STUDENT, true);
        $content = Security::remove_XSS($invitation['content'], STUDENT, true);
        $date = api_convert_and_format_date($invitation['send_date'], DATE_TIME_FORMAT_LONG);
        $social_right_content .= '
        <div class="span2">
            <a class="thumbnail" href="' . $userInfo['profile_url'] . '">
            <img src="' . $friends_profile['file'] . '"  /></a>
        </div>
        <div class="span3">
            <a class="profile_link" href="' . $userInfo['profile_url'] . '">' . $userInfo['complete_name'] . '</a>
            <div>' . $title . ' : ' . $content . '</div>
            <div>' . get_lang('DateSend') . ' : ' . $date . '</div>
            </div>
        </div>';
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:invitations.php

示例2: count

 $number_friends = count($friends);
 if ($number_friends != 0) {
     $number_loop = $number_friends / $number_of_images;
     $loop_friends = ceil($number_loop);
     $j = 0;
     $friend_html .= '<ul class="thumbnails">';
     for ($k = 0; $k < $loop_friends; $k++) {
         if ($j == $number_of_images) {
             $number_of_images = $number_of_images * 2;
         }
         while ($j < $number_of_images) {
             if (isset($friends[$j])) {
                 $friend_html .= '<li class="span2">';
                 $friend = $friends[$j];
                 $user_name = api_xml_http_response_encode($friend['firstName'] . ' ' . $friend['lastName']);
                 $friends_profile = SocialManager::get_picture_user($friend['friend_user_id'], $friend['image'], 92);
                 $friend_html .= '<div class="thumbnail" onMouseover="show_icon_delete(this)" onMouseout="hide_icon_delete(this)" class="image-social-content" id=div_' . $friends[$j]['friend_user_id'] . '>';
                 $friend_html .= '<img src="' . $friends_profile['file'] . '" id="imgfriend_' . $friend['friend_user_id'] . '" title="' . $user_name . '" />';
                 $friend_html .= '<div class="caption">';
                 $friend_html .= '<a href="profile.php?u=' . $friend['friend_user_id'] . '"><h5>' . $user_name . '</h5></a>';
                 $friend_html .= '<p><button class="btn" onclick="delete_friend(this)" id=img_' . $friend['friend_user_id'] . '>' . get_lang('Delete') . '</button></p>';
                 $friend_html .= '</div>';
                 $friend_html .= '</div>';
                 $friend_html .= '</li>';
             }
             $j++;
         }
     }
     $friend_html .= '</ul>';
 }
 echo $friend_html;
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:31,代码来源:social.ajax.php

示例3: listMyFriends

function listMyFriends($user_id, $link_shared, $show_full_profile)
{
    //SOCIALGOODFRIEND , USER_RELATION_TYPE_FRIEND, USER_RELATION_TYPE_PARENT
    $friends = SocialManager::get_friends($user_id, USER_RELATION_TYPE_FRIEND);

    $friendHtml = '';
    $number_of_images = 30;
    $number_friends = 0;
    $number_friends = count($friends);

    $friendHtml = '<div class="nav-list"><h3>'.get_lang('SocialFriend').'<span>(' . $number_friends . ')</span></h3></div>';

    if ($number_friends != 0) {
        if ($number_friends > $number_of_images) {
            if (api_get_user_id() == $user_id) {
                $friendHtml.= ' : <span><a href="friends.php">'.get_lang('SeeAll').'</a></span>';
            } else {
                $friendHtml.= ' : <span>'
                    .'<a href="'.api_get_path(WEB_CODE_PATH).'social/profile_friends_and_groups.inc.php'
                    .'?view=friends&height=390&width=610&user_id='.$user_id.'"'
                    .'class="thickbox" title="'.get_lang('SeeAll').'" >'.get_lang('SeeAll').'</a></span>';
            }
        }

        $friendHtml.= '<ul class="nav nav-list">';
        $j = 1;
        for ($k=0; $k < $number_friends; $k++) {
            if ($j > $number_of_images) break;

            if (isset($friends[$k])) {
                $friend = $friends[$k];
                $name_user    = api_get_person_name($friend['firstName'], $friend['lastName']);
                $user_info_friend = api_get_user_info($friend['friend_user_id'], true);

                if ($user_info_friend['user_is_online']) {
                    $statusIcon = Display::span('', array('class' => 'online_user_in_text'));
                } else {
                    $statusIcon = Display::span('', array('class' => 'offline_user_in_text'));
                }

                $friendHtml.= '<li class="">';
                // the height = 92 must be the sqme in the image_friend_network span style in default.css
                $friends_profile = SocialManager::get_picture_user($friend['friend_user_id'], $friend['image'], 20, USER_IMAGE_SIZE_SMALL);
                $friendHtml.= '<img src="'.$friends_profile['file'].'" id="imgfriend_'.$friend['friend_user_id'].'" title="'.$name_user.'"/>';
                $link_shared = (empty($link_shared)) ? '' : '&'.$link_shared;
                $friendHtml.= $statusIcon .'<a href="profile.php?' .'u=' . $friend['friend_user_id'] . $link_shared . '">' . $name_user .'</a>';
                $friendHtml.= '</li>';
            }
            $j++;
        }
        $friendHtml.='</ul>';
    } else {
        $friendHtml.= '<div class="">'.get_lang('NoFriendsInYourContactList').'<br />'
            .'<a class="btn" href="'.api_get_path(WEB_PATH).'whoisonline.php">'. get_lang('TryAndFindSomeFriends').'</a></div>';
    }

    return $friendHtml;
}
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:58,代码来源:profile.php

示例4: get_lang

     $friend_html .= '<div id="friend-container" class="social-friend-container">';
     $friend_html .= '<div id="friend-header" >';
     if ($number_friends == 1) {
         $friend_html .= '<div style="float:left;width:80%">' . $number_friends . ' ' . get_lang('Friend') . '</div>';
     } else {
         $friend_html .= '<div style="float:left;width:80%">' . $number_friends . ' ' . get_lang('Friends') . '</div>';
     }
     $friend_html .= '</div>';
     // close div friend-header
     for ($k = 0; $k < $number_friends; $k++) {
         if (isset($friends[$k])) {
             $friend = $friends[$k];
             $name_user = api_get_person_name($friend['firstName'], $friend['lastName']);
             $friend_html .= '<div id=div_' . $friend['friend_user_id'] . ' class="image_friend_network" ><span><center>';
             // the height = 92 must be the sqme in the image_friend_network span style in default.css
             $friends_profile = SocialManager::get_picture_user($friend['friend_user_id'], $friend['image'], 92, USER_IMAGE_SIZE_MEDIUM, 'width="85" height="90" ');
             $friend_html .= '<a href="' . $friend['user_info']['profile_url'] . '">';
             $friend_html .= '<img src="' . $friends_profile['file'] . '" ' . $friends_profile['style'] . ' id="imgfriend_' . $friend['friend_user_id'] . '" title="' . $name_user . '" />';
             $friend_html .= '</center></span>';
             $friend_html .= '<center class="friend">' . $name_user . '</a></center>';
             $friend_html .= '</div>';
         }
     }
     echo $friend_html;
     echo '</div>';
 } else {
     $usergroup = new UserGroup();
     // show all groups by user_id
     // MY GROUPS
     $results = $usergroup->get_groups_by_user($user_id, 0);
     $grid_my_groups = array();
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:profile_friends_and_groups.inc.php

示例5: api_get_person_name

         if ($j > $number_of_images) {
             break;
         }
         if (isset($friends[$k])) {
             $friend = $friends[$k];
             $name_user = api_get_person_name($friend['firstName'], $friend['lastName']);
             $user_info_friend = api_get_user_info($friend['friend_user_id'], true);
             if ($user_info_friend['user_is_online']) {
                 $status_icon = Display::span('', array('class' => 'online_user_in_text'));
             } else {
                 $status_icon = Display::span('', array('class' => 'offline_user_in_text'));
             }
             $friend_html .= '<li class="span2">';
             $friend_html .= '<div class="thumbnail">';
             // the height = 92 must be the sqme in the image_friend_network span style in default.css
             $friends_profile = SocialManager::get_picture_user($friend['friend_user_id'], $friend['image'], 92, USER_IMAGE_SIZE_ORIGINAL);
             $friend_html .= '<img src="' . $friends_profile['file'] . '"  id="imgfriend_' . $friend['friend_user_id'] . '" title="' . $name_user . '" />';
             $friend_html .= '<div class="caption">';
             $friend_html .= $status_icon . '<a href="' . $user_info_friend['profile_url'] . '">';
             $friend_html .= $name_user;
             $friend_html .= '</a></div>';
             $friend_html .= '</div>';
             $friend_html .= '</li>';
         }
         $j++;
     }
     $friend_html .= '</ul>';
 } else {
     // No friends!! :(
     $friend_html .= '<div><h3>' . get_lang('SocialFriend') . '</h3></div>';
     $friend_html .= '<div id="friend-container" class="social-friend-container">';
开发者ID:ragebat,项目名称:chamilo-lms,代码行数:31,代码来源:profile.php


注:本文中的SocialManager::get_picture_user方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。