Guest User

cash

a guest
Feb 15th, 2010
550
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.41 KB | None | 0 0
  1. <?php
  2.  
  3.     /**
  4.      * Elgg user display (details)
  5.      *
  6.      * @package ElggProfile
  7.      * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
  8.      * @author Curverider Ltd <[email protected]>
  9.      * @copyright Curverider Ltd 2008-2010
  10.      * @link http://elgg.com/
  11.      *
  12.      * @uses $vars['entity'] The user entity
  13.      */
  14.  
  15.     if ($vars['full'] == true) {
  16.         $iconsize = "large";
  17.     } else {
  18.         $iconsize = "medium";
  19.     }
  20.  
  21.     // wrap all profile info
  22.     echo "<div id=\"profile_info\">";
  23.  
  24. ?>
  25.  
  26. <table cellspacing="0">
  27. <tr>
  28. <td>
  29.  
  30. <?php
  31.  
  32.     // wrap the icon and links in a div
  33.     echo "<div id=\"profile_info_column_left\">";
  34.  
  35.     echo "<div id=\"profile_icon_wrapper\">";
  36.     // get the user's main profile picture
  37.     echo elgg_view(
  38.                         "profile/icon", array(
  39.                                                 'entity' => $vars['entity'],
  40.                                                 //'align' => "left",
  41.                                                 'size' => $iconsize,
  42.                                                 'override' => true,
  43.                                             )
  44.                     );
  45.  
  46.  
  47.     echo "</div>";
  48.     echo "<div class=\"clearfloat\"></div>";
  49.     // display relevant links
  50.     echo elgg_view("profile/profilelinks", array("entity" => $vars['entity']));
  51.  
  52.     // close profile_info_column_left
  53.     echo "</div>";
  54.  
  55. ?>
  56. </td>
  57. </tr>
  58. <tr>
  59. <td>
  60.  
  61.     <div id="profile_info_column_middle" >
  62.             <?php
  63.  
  64.         if ($vars['entity']->canEdit()) {
  65.  
  66.     ?>
  67.         <p class="profile_info_edit_buttons">
  68.             <a href="<?php echo $vars['url']; ?>pg/profile/<?php echo $vars['entity']->username; ?>/edit/"><?php echo elgg_echo("profile:edit"); ?></a>
  69.         </p>
  70.     <?php
  71.  
  72.         }
  73.  
  74.     ?>
  75.  
  76.  
  77.  
  78.     <?php
  79.  
  80.     // Simple XFN
  81.     $rel = "";
  82.     if (page_owner() == $vars['entity']->guid)
  83.         $rel = 'me';
  84.     else if (check_entity_relationship(page_owner(), 'friend', $vars['entity']->guid))
  85.         $rel = 'friend';
  86.  
  87.     // display the users name
  88.     echo "<h2><a href=\"" . $vars['entity']->getUrl() . "\" rel=\"$rel\">" . $vars['entity']->name . "</a></h2>";
  89.  
  90.     //insert a view that can be extended
  91.     echo elgg_view("profile/status", array("entity" => $vars['entity']));
  92.  
  93.         if ($vars['full'] == true) {
  94.  
  95.     ?>
  96.     <?php
  97.         $even_odd = null;
  98.  
  99.         if (is_array($vars['config']->profile) && sizeof($vars['config']->profile) > 0)
  100.             foreach($vars['config']->profile as $shortname => $valtype) {
  101.                 if ($shortname != "description") {
  102.                     $value = $vars['entity']->$shortname;
  103.                     if (!empty($value)) {
  104.  
  105.                 //This function controls the alternating class
  106.                 $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
  107.  
  108.  
  109.     ?>
  110.     <p class="<?php echo $even_odd; ?>">
  111.         <b><?php
  112.  
  113.             echo elgg_echo("profile:{$shortname}");
  114.  
  115.         ?>: </b>
  116.         <?php
  117.  
  118.             echo elgg_view("output/{$valtype}",array('value' => $vars['entity']->$shortname));
  119.  
  120.         ?>
  121.  
  122.     </p>
  123.  
  124.     <?php
  125.                     }
  126.                 }
  127.             }
  128.  
  129.         }
  130.  
  131.     ?>
  132.     </div><!-- /#profile_info_column_middle -->
  133.  
  134. </td>
  135. </tr>
  136. <?php if (!get_plugin_setting('user_defined_fields', 'profile')) {?>
  137. <tr>
  138. <td>
  139.     <div id="profile_info_column_right">
  140.     <p class="profile_aboutme_title"><b><?php echo elgg_echo("profile:aboutme"); ?></b></p>
  141.  
  142.     <?php if ($vars['entity']->isBanned()) { ?>
  143.         <div id="profile_banned">
  144.         <?php
  145.             echo elgg_echo('profile:banned');
  146.         ?>
  147.         </div><!-- /#profile_info_column_right -->
  148.  
  149.     <?php } else { ?>
  150.  
  151.         <?php
  152.         echo elgg_view('output/longtext', array('value' => $vars['entity']->description));
  153.         //echo autop(filter_tags($vars['entity']->description));
  154.         ?>
  155.  
  156.     <?php } ?>
  157.  
  158.     </div><!-- /#profile_info_column_right -->
  159.  
  160. </td>
  161.  
  162.  
  163.  
  164. </tr>
  165. <?php } ?>
  166.  
  167. </table>
  168.  
  169.  
  170.  
  171. </div><!-- /#profile_info -->
  172.  
Advertisement
Add Comment
Please, Sign In to add comment