/sites/all/themes/groundwork/templates/user-profile.tpl.php

https://github.com/front/oslo2011.drupalcamp · PHP · 136 lines · 70 code · 25 blank · 41 comment · 29 complexity · 95718e70f47082aa9d614861e3d33248 MD5 · raw file

  1. <?php
  2. // $Id: user-profile.tpl.php,v 1.2.2.2 2009/10/06 11:50:06 goba Exp $
  3. /**
  4. * @file user-profile.tpl.php
  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. * By default, all user profile data is printed out with the $user_profile
  11. * variable. If there is a need to break it up you can use $profile instead.
  12. * It is keyed to the name of each category or other data attached to the
  13. * account. If it is a category it will contain all the profile items. By
  14. * default $profile['summary'] is provided which contains data on the user's
  15. * history. Other data can be included by modules. $profile['user_picture'] is
  16. * available by default showing the account picture.
  17. *
  18. * Also keep in mind that profile items and their categories can be defined by
  19. * site administrators. They are also available within $profile. For example,
  20. * if a site is configured with a category of "contact" with
  21. * fields for of addresses, phone numbers and other related info, then doing a
  22. * straight print of $profile['contact'] will output everything in the
  23. * category. This is useful for altering source order and adding custom
  24. * markup for the group.
  25. *
  26. * To check for all available data within $profile, use the code below.
  27. * @code
  28. * print '<pre>'. check_plain(print_r($profile, 1)) .'</pre>';
  29. * @endcode
  30. *
  31. * Available variables:
  32. * - $user_profile: All user profile data. Ready for print.
  33. * - $profile: Keyed array of profile categories and their items or other data
  34. * provided by modules.
  35. *
  36. * @see user-profile-category.tpl.php
  37. * Where the html is handled for the group.
  38. * @see user-profile-item.tpl.php
  39. * Where the html is handled for each item in the group.
  40. * @see template_preprocess_user_profile()
  41. */
  42. ?>
  43. <div class="profile">
  44. <?php
  45. profile_load_profile($account);
  46. // now you can call the profile field like profile_firstname
  47. ?>
  48. <?php print theme('user_picture', $account); ?>
  49. <h2><?php print check_plain($account->profile_name);?></h2>
  50. <div class="fields"><?php print check_plain($account->profile_place); ?> (<?php print check_plain($account->profile_location); ?>)</div>
  51. <?php if($account->profile_linkedin or $account->profile_twitter): ?>
  52. <div class="fields">
  53. <table>
  54. <tr>
  55. <?php if($account->profile_linkedin): ?>
  56. <td><a href="<?php print check_url($account->profile_linkedin); ?>"><img src="http://www.linkedin.com/img/webpromo/btn_viewmy_160x25.png" width="160" height="25" border="0" alt="Visit <?php print check_plain($account->profile_name); ?>s profile on LinkedIn" /></a></td>
  57. <?php endif; ?>
  58. <?php if($account->profile_twitter): ?>
  59. <td><a href="<?php print check_url($account->profile_twitter); ?>"><img src="http://twitter-badges.s3.amazonaws.com/follow_me-b.png" alt="Follow <?php print check_plain($account->profile_name); ?> on Twitter" /></a></td>
  60. <?php endif; ?>
  61. </tr>
  62. </table>
  63. </div>
  64. <?php endif; ?>
  65. <?php if($account->profile_drucontrib or $account->profile_drucontribmodules or $account->profile_drucontribtheme or $account->profile_drucontriblocale or $account->profile_drupalservice or $account->profile_drusupport or $account->profile_drupalcon-antwerp or $account->profile_drupalcon-brussels or $account->profile_drupalcon-barcelona or $account->profile_drupalcon-szeged or $account->profile_drupalcon-paris or $account->profile_drupalcon-copenhagen): ?>
  66. <h2 style="clear:both">Drupal</h2>
  67. <div class="fields">
  68. <?php if($account->profile_drucontrib): ?>
  69. <div><?php print check_markup($account->profile_drucontrib); ?></div>
  70. <?php endif ?>
  71. <ul>
  72. <?php if ($account->profile_drucontribmodules == '1'): ?>
  73. <li>I have contributed to module developement.</li>
  74. <?php endif ?>
  75. <?php if ($account->profile_drucontribtheme == '1'): ?>
  76. <li>I have contributed to theme developement.</li>
  77. <?php endif ?>
  78. <?php if ($account->profile_drucontriblocale == '1'): ?>
  79. <li>I have contributed to translation projects</li>
  80. <?php endif ?>
  81. <?php if ($account->profile_drupalservice == '1'): ?>
  82. <li>I offer Drupal related services.</li>
  83. <?php endif ?>
  84. <?php if ($account->profile_drusupport == '1'): ?>
  85. <li>I help in the support forums.</li>
  86. <?php endif ?>
  87. <?php if ($account->profile_drupalconantwerp == '1'): ?>
  88. <li>I attended DrupalCon Antwerp 2005 FOSDEM</li>
  89. <?php endif ?>
  90. <?php if ($account->profile_drupalconbrussels == '1'): ?>
  91. <li>I attended DrupalCon Brussels 2006</li>
  92. <?php endif ?>
  93. <?php if ($account->profile_drupalconbarcelona == '1'): ?>
  94. <li>I participated on DrupalCon Barcelona 2007</li>
  95. <?php endif ?>
  96. <?php if ($account->profile_drupalconszeged == '1'): ?>
  97. <li>I attended DrupalCon Szeged, Hungary 2008</li>
  98. <?php endif ?>
  99. <?php if ($account->profile_drupalconparis == '1'): ?>
  100. <li>I attended DrupalCon Paris 2009</li>
  101. <?php endif ?>
  102. <?php if ($account->profile_drupalconcopenhagen == '1'): ?>
  103. <li>I attended DrupalCon Copenhagen 2010</li>
  104. <?php endif ?>
  105. <?php if ($account->profile_drupalconlondon == '1'): ?>
  106. <li>I attended DrupalCon London 2011</li>
  107. <?php endif ?>
  108. </ul>
  109. </div>
  110. <?php endif; ?>
  111. </div>