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


PHP SocialManager::display_productions方法代码示例

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


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

示例1: display_individual_user

 /**
  * Displays the information of an individual user
  * @param int $user_id
  */
 public static function display_individual_user($user_id)
 {
     global $interbreadcrumb;
     $safe_user_id = intval($user_id);
     $currentUserId = api_get_user_id();
     $user_table = Database::get_main_table(TABLE_MAIN_USER);
     $sql = "SELECT * FROM {$user_table} WHERE user_id = " . $safe_user_id;
     $result = Database::query($sql);
     $html = null;
     if (Database::num_rows($result) == 1) {
         $user_object = Database::fetch_object($result);
         $userInfo = api_get_user_info($user_id);
         $alt = $userInfo['complete_name'] . ($currentUserId == $user_id ? ' (' . get_lang('Me') . ')' : '');
         $status = get_status_from_code($user_object->status);
         $interbreadcrumb[] = array('url' => 'whoisonline.php', 'name' => get_lang('UsersOnLineList'));
         $html .= '<div class ="thumbnail">';
         $fullurl = $userInfo['avatar'];
         $html .= '<img src="' . $fullurl . '" alt="' . $alt . '" />';
         if (!empty($status)) {
             $html .= '<div class="caption">' . $status . '</div>';
         }
         $html .= '</div>';
         if (api_get_setting('display.show_email_addresses') == 'true') {
             $html .= Display::encrypted_mailto_link($user_object->email, $user_object->email) . '<br />';
         }
         if ($user_object->competences) {
             $html .= Display::page_subheader(get_lang('MyCompetences'));
             $html .= '<p>' . $user_object->competences . '</p>';
         }
         if ($user_object->diplomas) {
             $html .= Display::page_subheader(get_lang('MyDiplomas'));
             $html .= '<p>' . $user_object->diplomas . '</p>';
         }
         if ($user_object->teach) {
             $html .= Display::page_subheader(get_lang('MyTeach'));
             $html .= '<p>' . $user_object->teach . '</p>';
         }
         SocialManager::display_productions($user_object->user_id);
         if ($user_object->openarea) {
             $html .= Display::page_subheader(get_lang('MyPersonalOpenArea'));
             $html .= '<p>' . $user_object->openarea . '</p>';
         }
     } else {
         $html .= '<div class="actions-title">';
         $html .= get_lang('UsersOnLineList');
         $html .= '</div>';
     }
     return $html;
 }
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:53,代码来源:social.lib.php

示例2: display_individual_user

 /**
  * Displays the information of an individual user
  * @param int $user_id
  */
 public static function display_individual_user($user_id, $returnContent = false)
 {
     global $interbreadcrumb;
     $safe_user_id = intval($user_id);
     $curretUserId = api_get_user_id();
     $user_table = Database::get_main_table(TABLE_MAIN_USER);
     $sql = "SELECT * FROM {$user_table} WHERE user_id = " . $safe_user_id;
     $result = Database::query($sql);
     $userInfo = api_get_user_info($user_id);
     $content = null;
     if (Database::num_rows($result) == 1) {
         $user_object = Database::fetch_object($result);
         $alt = $userInfo['complete_name'] . ($curretUserId == $user_id ? '&nbsp;(' . get_lang('Me') . ')' : '');
         $status = api_get_status_from_code($user_object->status);
         $interbreadcrumb[] = array('url' => SocialManager::getUserOnlineLink(), 'name' => get_lang('UsersOnLineList'));
         if ($returnContent == false) {
             Display::display_header($alt, null, $alt);
         }
         $content = '<div class ="thumbnail">';
         if (strlen(trim($user_object->picture_uri)) > 0) {
             $sysdir_array = UserManager::get_user_picture_path_by_id($safe_user_id, 'system');
             $sysdir = $sysdir_array['dir'];
             $webdir_array = UserManager::get_user_picture_path_by_id($safe_user_id, 'web');
             $webdir = $webdir_array['dir'];
             $fullurl = $webdir . $user_object->picture_uri;
             $system_image_path = $sysdir . $user_object->picture_uri;
             list($width, $height, $type, $attr) = @getimagesize($system_image_path);
             $height += 30;
             $width += 30;
             // get the path,width and height from original picture
             $big_image = $webdir . 'big_' . $user_object->picture_uri;
             $big_image_size = api_getimagesize($big_image);
             $big_image_width = $big_image_size['width'];
             $big_image_height = $big_image_size['height'];
             $url_big_image = $big_image . '?rnd=' . time();
             //echo '<a href="javascript:void()" onclick="javascript: return show_image(\''.$url_big_image.'\',\''.$big_image_width.'\',\''.$big_image_height.'\');" >';
             $content .= '<img src="' . $fullurl . '" alt="' . $alt . '" />';
         } else {
             $content .= Display::return_icon('unknown.jpg', get_lang('Unknown'));
         }
         if (!empty($status)) {
             $content .= '<div class="caption">' . $status . '</div>';
         }
         $content .= '</div>';
         if (api_get_setting('show_email_addresses') == 'true') {
             $content .= Display::encrypted_mailto_link($user_object->email, $user_object->email) . '<br />';
         }
         if ($user_object->competences) {
             $content .= Display::page_subheader(get_lang('MyCompetences'));
             $content .= '<p>' . $user_object->competences . '</p>';
         }
         if ($user_object->diplomas) {
             $content .= Display::page_subheader(get_lang('MyDiplomas'));
             $content .= '<p>' . $user_object->diplomas . '</p>';
         }
         if ($user_object->teach) {
             $content .= Display::page_subheader(get_lang('MyTeach'));
             $content .= '<p>' . $user_object->teach . '</p>';
         }
         $content .= SocialManager::display_productions($user_object->user_id);
         if ($user_object->openarea) {
             $content .= Display::page_subheader(get_lang('MyPersonalOpenArea'));
             $content .= '<p>' . $user_object->openarea . '</p>';
         }
     } else {
         if ($returnContent == false) {
             Display::display_header(get_lang('UsersOnLineList'));
         }
         $content .= '<div class="actions-title">';
         $content .= get_lang('UsersOnLineList');
         $content .= '</div>';
     }
     if ($returnContent) {
         return $content;
     } else {
         echo $content;
     }
 }
开发者ID:ragebat,项目名称:chamilo-lms,代码行数:82,代码来源:social.lib.php


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