Advertisement
Guest User

Untitled

a guest
Nov 1st, 2013
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.01 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. * @file
  5. * Default theme implementation to present all user profile data.
  6. *
  7. * This template is used when viewing a registered member's profile page,
  8. * e.g., example.com/user/123. 123 being the users ID.
  9. *
  10. * Use render($user_profile) to print all profile items, or print a subset
  11. * such as render($user_profile['user_picture']). Always call
  12. * render($user_profile) at the end in order to print all remaining items. If
  13. * the item is a category, it will contain all its profile items. By default,
  14. * $user_profile['summary'] is provided, which contains data on the user's
  15. * history. Other data can be included by modules. $user_profile['user_picture']
  16. * is available for showing the account picture.
  17. *
  18. * Available variables:
  19. * - $user_profile: An array of profile items. Use render() to print them.
  20. * - Field variables: for each field instance attached to the user a
  21. * corresponding variable is defined; e.g., $account->field_example has a
  22. * variable $field_example defined. When needing to access a field's raw
  23. * values, developers/themers are strongly encouraged to use these
  24. * variables. Otherwise they will have to explicitly specify the desired
  25. * field language, e.g. $account->field_example['en'], thus overriding any
  26. * language negotiation rule that was previously applied.
  27. *
  28. * @see user-profile-category.tpl.php
  29. * Where the html is handled for the group.
  30. * @see user-profile-item.tpl.php
  31. * Where the html is handled for each item in the group.
  32. * @see template_preprocess_user_profile()
  33. *
  34. * @ingroup themeable
  35. */
  36. ?>
  37. <div class="profile"<?php print $attributes; ?>>
  38. <div class="left">
  39. <img src="<?php print $user_avatar; ?>" alt="Аватар" id="avatar">
  40. <?php print $follow_link; ?>
  41. </div>
  42. <div class="right">
  43. <?php if (isset($user_fullname)) {
  44. print "<h1 id='page-title'>" . $user_fullname . "</h1>";
  45. print "<h2 id='username'>" . $user_login . "</h2>";
  46. }
  47. else {
  48. print "<h1 id='page-title'>" . $user_login . "</h1>";
  49. } ?>
  50.  
  51. <div class="whitespace"></div>
  52.  
  53. <?php if (isset($user_gender)) { ?>
  54. <div class="info-section" data-caption="Общая информация">
  55. <?php if (isset($user_gender)) {
  56. print "<div class='info'>";
  57. print "<div class='label'>Пол</div>";
  58. print "<div class='data'>{$user_gender}</div>";
  59. print "</div>";
  60. } ?>
  61.  
  62. <?php if (isset($user_age)) {
  63. print "<div class='info'>";
  64. print "<div class='label'>Возраст </div>";
  65. print "<div class='data'>{$user_age} {$user_age_suffix}</div>";
  66. print "</div>";
  67. } ?>
  68.  
  69. <?php if (isset($user_city)) {
  70. print "<div class='info'>";
  71. print "<div class='label'>Город</div>";
  72. print "<div class='data'>{$user_city}</div>";
  73. print "</div>";
  74. } ?>
  75. </div>
  76. <?php }?>
  77.  
  78. <div class="info-section" data-caption="Контактная информация">
  79. <?php if ($logged_in) { ?>
  80. <?php if (isset($user_email)) {
  81. print "<div class='info'>";
  82. print "<div class='label'>Эл. почта</div>";
  83. print "<div class='data'><a href='mailto:{$user_email}'>{$user_email}</a></div>";
  84. print "</div>";
  85. } ?>
  86.  
  87. <?php if (isset($user_phone)) {
  88. print "<div class='info'>";
  89. print "<div class='label'>Телефон</div>";
  90. print "<div class='data'>{$user_phone}</div>";
  91. print "</div>";
  92. } ?>
  93. <?php }
  94. else { ?>
  95. Контактная информация доступна только зарегистрированным пользователям. Для получения доступа к данному разделу
  96. <a href="/user/login">войдите</a> или <a href="/user/register">зарегистрируйтесь</a> на сайте.
  97. <?php } ?>
  98. </div>
  99.  
  100. <div class="info-section" data-caption="Наблюдают за <?php print $user_login; ?>">
  101. <?php print views_embed_view('user_follow', 'follow_me'); ?>
  102. <a href="<?php print "/user/" . $user_login . "/followers"; ?>" class="follow-more-link">Полный список</a>
  103. </div>
  104.  
  105. <div class="info-section" data-caption="<?php print $user_login; ?> наблюдает за пользователями">
  106. <?php print views_embed_view('user_follow', 'follow_by_me'); ?>
  107. <a href="<?php print "/user/" . $user_login . "/following"; ?>" class="follow-more-link">Полный список</a>
  108. </div>
  109.  
  110. <div class="info-section" data-caption="Последние объявления о поиске попутчика">
  111. <?php print views_embed_view('trips', 'last_3_in_profile', $user_login); ?>
  112. <a href="<?php print "/user/" . $user_login . "/trips"; ?>" class="follow-more-link">Все объявления</a>
  113. </div>
  114.  
  115. </div>
  116. <?php //print render($user_profile); ?>
  117. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement