Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * @file
- * Default theme implementation to present all user profile data.
- *
- * This template is used when viewing a registered member's profile page,
- * e.g., example.com/user/123. 123 being the users ID.
- *
- * Use render($user_profile) to print all profile items, or print a subset
- * such as render($user_profile['user_picture']). Always call
- * render($user_profile) at the end in order to print all remaining items. If
- * the item is a category, it will contain all its profile items. By default,
- * $user_profile['summary'] is provided, which contains data on the user's
- * history. Other data can be included by modules. $user_profile['user_picture']
- * is available for showing the account picture.
- *
- * Available variables:
- * - $user_profile: An array of profile items. Use render() to print them.
- * - Field variables: for each field instance attached to the user a
- * corresponding variable is defined; e.g., $account->field_example has a
- * variable $field_example defined. When needing to access a field's raw
- * values, developers/themers are strongly encouraged to use these
- * variables. Otherwise they will have to explicitly specify the desired
- * field language, e.g. $account->field_example['en'], thus overriding any
- * language negotiation rule that was previously applied.
- *
- * @see user-profile-category.tpl.php
- * Where the html is handled for the group.
- * @see user-profile-item.tpl.php
- * Where the html is handled for each item in the group.
- * @see template_preprocess_user_profile()
- *
- * @ingroup themeable
- */
- ?>
- <div class="profile"<?php print $attributes; ?>>
- <div class="left">
- <img src="<?php print $user_avatar; ?>" alt="Аватар" id="avatar">
- <?php print $follow_link; ?>
- </div>
- <div class="right">
- <?php if (isset($user_fullname)) {
- print "<h1 id='page-title'>" . $user_fullname . "</h1>";
- print "<h2 id='username'>" . $user_login . "</h2>";
- }
- else {
- print "<h1 id='page-title'>" . $user_login . "</h1>";
- } ?>
- <div class="whitespace"></div>
- <?php if (isset($user_gender)) { ?>
- <div class="info-section" data-caption="Общая информация">
- <?php if (isset($user_gender)) {
- print "<div class='info'>";
- print "<div class='label'>Пол</div>";
- print "<div class='data'>{$user_gender}</div>";
- print "</div>";
- } ?>
- <?php if (isset($user_age)) {
- print "<div class='info'>";
- print "<div class='label'>Возраст </div>";
- print "<div class='data'>{$user_age} {$user_age_suffix}</div>";
- print "</div>";
- } ?>
- <?php if (isset($user_city)) {
- print "<div class='info'>";
- print "<div class='label'>Город</div>";
- print "<div class='data'>{$user_city}</div>";
- print "</div>";
- } ?>
- </div>
- <?php }?>
- <div class="info-section" data-caption="Контактная информация">
- <?php if ($logged_in) { ?>
- <?php if (isset($user_email)) {
- print "<div class='info'>";
- print "<div class='label'>Эл. почта</div>";
- print "<div class='data'><a href='mailto:{$user_email}'>{$user_email}</a></div>";
- print "</div>";
- } ?>
- <?php if (isset($user_phone)) {
- print "<div class='info'>";
- print "<div class='label'>Телефон</div>";
- print "<div class='data'>{$user_phone}</div>";
- print "</div>";
- } ?>
- <?php }
- else { ?>
- Контактная информация доступна только зарегистрированным пользователям. Для получения доступа к данному разделу
- <a href="/user/login">войдите</a> или <a href="/user/register">зарегистрируйтесь</a> на сайте.
- <?php } ?>
- </div>
- <div class="info-section" data-caption="Наблюдают за <?php print $user_login; ?>">
- <?php print views_embed_view('user_follow', 'follow_me'); ?>
- <a href="<?php print "/user/" . $user_login . "/followers"; ?>" class="follow-more-link">Полный список</a>
- </div>
- <div class="info-section" data-caption="<?php print $user_login; ?> наблюдает за пользователями">
- <?php print views_embed_view('user_follow', 'follow_by_me'); ?>
- <a href="<?php print "/user/" . $user_login . "/following"; ?>" class="follow-more-link">Полный список</a>
- </div>
- <div class="info-section" data-caption="Последние объявления о поиске попутчика">
- <?php print views_embed_view('trips', 'last_3_in_profile', $user_login); ?>
- <a href="<?php print "/user/" . $user_login . "/trips"; ?>" class="follow-more-link">Все объявления</a>
- </div>
- </div>
- <?php //print render($user_profile); ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement