Advertisement
DubStepMad

Untitled

Jul 27th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.55 KB | None | 0 0
  1. {{if !\IPS\Request::i()->isAjax()}}
  2. <!-- When altering this template be sure to also check for similar in the hovercard -->
  3. <div data-controller='core.front.profile.main' class='ipsBox'>
  4. {template="profileHeader" app="core" location="front" group="profile" params="$member, false"}
  5. <div data-role="profileContent">
  6. {{endif}}
  7. <div class='ipsColumns ipsColumns_noSpacing ipsColumns_collapseTablet' data-controller="core.front.profile.body">
  8. <div class='ipsColumn ipsColumn_fixed ipsColumn_veryWide ipsAreaBackground' id='elProfileInfoColumn'>
  9. <div class='ipsPad'>
  10. {{if \IPS\Application::appIsEnabled('nexus') and settings.nexus_subs_enabled and settings.nexus_subs_show_public}}
  11. {template="profileSubscription" app="nexus" location="front" group="subscription" params="$member"}
  12. {{endif}}
  13. {{if settings.reputation_enabled and settings.reputation_show_profile}}
  14. {{if settings.reputation_leaderboard_on and settings.reputation_show_days_won_trophy and $member->getReputationDaysWonCount() and $lastDayWon = $member->getReputationLastDayWon()}}
  15. {{$formattedDate = $lastDayWon['date']->dayAndMonth() . ( $lastDayWon['date']->format('Y') == \IPS\DateTime::ts( time() )->format('Y' ) ? '' : " " . $lastDayWon['date']->format('Y') );}}
  16. <div class='ipsLeaderboard_trophy_1 cProfileSidebarBlock ipsSpacer_bottom '>
  17. <div class="ipsGrid">
  18. <div class="ipsGrid_span2 ipsType_center">
  19. <span class='ipsLeaderboard_trophy ipsLeaderboard_trophy_1'>
  20. <i class="fa fa-trophy"></i>
  21. </span>
  22. </div>
  23. <div class="ipsGrid_span10">
  24. <p class='ipsType_reset ipsType_medium'>
  25. <strong>
  26. <a class='ipsType_blendLinks' href="{url="app=core&module=discover&controller=popular&tab=leaderboard&custom_date_start={$lastDayWon['date']->getTimeStamp()}&custom_date_end={$lastDayWon['date']->getTimeStamp()}" seoTemplate="leaderboard_leaderboard"}">
  27. {{if $member->member_id == \IPS\Member::loggedIn()->member_id}}
  28. {lang="profile_you_won" sprintf="$formattedDate"}
  29. {{else}}
  30. {lang="profile_member_won" sprintf="$member->name, $formattedDate"}
  31. {{endif}}
  32. </a>
  33. </strong>
  34. </p>
  35. <p class='ipsType_reset ipsType_small'>{{if $member->member_id == \IPS\Member::loggedIn()->member_id}}{lang="profile_you_congrats"}{{else}}{lang="profile_member_congrats" sprintf="$member->name"}{{endif}}</p>
  36. </div>
  37. </div>
  38. </div>
  39. {{endif}}
  40. <div class='cProfileSidebarBlock ipsBox ipsSpacer_bottom'>
  41. {{if member.group['gbw_view_reps']}}
  42. <a href="{url="app=core&module=members&controller=profile&id={$member->member_id}&do=reputation" seoTemplate="profile_reputation" seoTitle="$member->members_seo_name"}" data-action="repLog" title="{lang="members_reputation" sprintf="$member->name"}">
  43. {{endif}}
  44. <div class='cProfileRepScore ipsPad_half {{if $member->pp_reputation_points > 1}}cProfileRepScore_positive{{elseif $member->pp_reputation_points < 0}}cProfileRepScore_negative{{else}}cProfileRepScore_neutral{{endif}}'>
  45. <h2 class='ipsType_minorHeading'>{lang="profile_reputation"}</h2>
  46. <span class='cProfileRepScore_points'>{number="$member->pp_reputation_points"}</span>
  47. {{if $member->reputation()}}
  48. <span class='cProfileRepScore_title'>{$member->reputation()}</span>
  49. {{endif}}
  50. {{if $member->reputationImage()}}
  51. <div class='ipsAreaBackground_reset ipsAreaBackground_rounded ipsPad_half ipsType_center'>
  52. <img src='{file="$member->reputationImage()" extension="core_Theme"}' alt=''>
  53. </div>
  54. {{endif}}
  55. </div>
  56. {{if member.group['gbw_view_reps']}}
  57. <p class='ipsType_reset ipsPad_half ipsType_right ipsType_light ipsType_small'>
  58. {lang="replog_show_activity"} <i class='fa fa-caret-right'></i>
  59. </p>
  60. </a>
  61. {{if $method = \IPS\Login\Handler::findMethod( 'IPS\Login\Handler\ExternalDatabase' )}}
  62. {{try{ $identifier = \IPS\Db::i()->select( 'token_identifier', 'core_login_links', array( 'token_login_method=? AND token_member=?', $method->id, $member->member_id ) )->first();}catch( \UnderflowException $e ){ $identifier = NULL; } }}
  63. {{if $identifier}}
  64. <a target="_blank" href='https://infinitetruckers.com/user/{$identifier}' class="ipsButton ipsButton_light ipsButton_small ipsButton_fullWidth" title="View IFMP Profile"><i class="fa fa-truck"></i> <span class="ipsResponsive_showDesktop ipsResponsive_inline">&nbsp;IFMP Profile</span></a>
  65. {{endif}}
  66. {{endif}}
  67. {{endif}}
  68. </div>
  69. {{endif}}
  70.  
  71. {{if \IPS\Settings::i()->warn_on and !$member->inGroup( explode( ',', \IPS\Settings::i()->warn_protected ) ) and ( \IPS\Member::loggedIn()->modPermission('mod_see_warn') or ( \IPS\Settings::i()->warn_show_own and \IPS\Member::loggedIn()->member_id == $member->member_id ) )}}
  72. <div class='cProfileSidebarBlock ipsBox ipsSpacer_bottom'>
  73. <div id='elWarningInfo' class='ipsPad {{if $member->mod_posts || $member->restrict_post || $member->temp_ban}}ipsAreaBackground_negative{{endif}} ipsClearfix'>
  74. <i class='ipsPos_left {{if $member->warn_level > 0 || $member->mod_posts || $member->restrict_post || $member->temp_ban}}fa fa-exclamation-triangle{{else}}fa fa-circle-o ipsType_light{{endif}}'></i>
  75. <div>
  76. <h2 class='ipsType_sectionHead'>{lang="member_warn_level" pluralize="$member->warn_level"}</h2>
  77. <br>
  78. {{if !$member->mod_posts && !$member->restrict_post && !$member->temp_ban}}
  79. <span>{lang="no_restrictions_applied"}</span>
  80. <br>
  81. {{else}}
  82. <span>{lang="restrictions_applied"}</span>
  83. <ul class='ipsList_bullets ipsSpacer_top ipsSpacer_half'>
  84. {{if $member->mod_posts}}
  85. <li data-ipsTooltip title="{{if $member->mod_posts == -1}}{lang="moderation_modq_perm"}{{else}}{lang="moderation_modq_temp" sprintf="\IPS\DateTime::ts( $member->mod_posts )"}{{endif}}">
  86. {lang="moderation_modq"}
  87. </li>
  88. {{endif}}
  89. {{if $member->restrict_post}}
  90. <li data-ipsTooltip title="{{if $member->restrict_post == -1}}{lang="moderation_nopost_perm"}{{else}}{lang="moderation_nopost_temp" sprintf="\IPS\DateTime::ts( $member->restrict_post )"}{{endif}}">
  91. {lang="moderation_nopost"}
  92. </li>
  93. {{endif}}
  94. {{if $member->temp_ban}}
  95. <li data-ipsTooltip title="{{if $member->temp_ban == -1}}{lang="moderation_banned_perm"}{{else}}{lang="moderation_banned_temp" sprintf="\IPS\DateTime::ts( $member->temp_ban )"}{{endif}}">
  96. {lang="moderation_banned"}
  97. </li>
  98. {{endif}}
  99. </ul>
  100. {{endif}}
  101. {{if ( member.canWarn( $member ) || ( member.modPermission('can_flag_as_spammer') and !$member->modPermission() and !$member->isAdmin() ) ) and $member->member_id != member.member_id }}
  102. <br>
  103. <ul class='{{if member.canWarn( $member ) && member.modPermission('can_flag_as_spammer') and $member->member_id != member.member_id and !$member->modPermission() and !$member->isAdmin()}} ipsButton_split {{else}} ipsList_inline {{endif}}'>
  104. {{if member.canWarn( $member )}}
  105. <li>
  106. <a href='{$addWarningUrl}' id='elWarnUserButton' data-ipsDialog data-ipsDialog-title="{lang="warn_member" sprintf="$member->name"}" class='ipsButton ipsButton_light ipsButton_verySmall' title='{lang="warn_member" sprintf="$member->name"}'>{lang="warn_user"}</a>
  107. </li>
  108. {{endif}}
  109. {{if member.modPermission('can_flag_as_spammer') and $member->member_id != member.member_id and !$member->modPermission() and !$member->isAdmin()}}
  110. <li>
  111. {{if $member->members_bitoptions['bw_is_spammer']}}
  112. <a href='{url="app=core&module=system&controller=moderation&do=flagAsSpammer&id={$member->member_id}&s=0" seoTemplate="flag_as_spammer" seoTitle="$member->members_seo_name" csrf="true"}' class='ipsButton ipsButton_light ipsButton_verySmall' title='{lang="spam_unflag"}' data-confirm data-confirmSubMessage="{lang="spam_unflag_confirm"}">{lang="spam_unflag"}</a>
  113. {{else}}
  114. <a href='{url="app=core&module=system&controller=moderation&do=flagAsSpammer&id={$member->member_id}&s=1" seoTemplate="flag_as_spammer" seoTitle="$member->members_seo_name" csrf="true"}' class='ipsButton ipsButton_light ipsButton_verySmall' title='{lang="spam_flag"}' data-confirm>{lang="spam_flag"}</a>
  115. {{endif}}
  116. </li>
  117. {{endif}}
  118. </ul>
  119. {{endif}}
  120. </div>
  121. </div>
  122. {{if \count( $member->warnings( 1 ) )}}
  123. <div data-role="recentWarnings" class=''>
  124. <ol class='ipsDataList'>
  125. {{foreach $member->warnings( 2 ) as $warning}}
  126. <li class="ipsDataItem" id='elWarningOverview_{$warning->id}'>
  127. <div class='ipsDataItem_icon ipsType_center'>
  128. <a href="{url="app=core&module=system&controller=warnings&do=view&id={$member->member_id}&w={$warning->id}" seoTemplate="warn_view" seoTitle="$member->members_seo_name"}" data-ipsDialog data-ipsDialog-size='narrow' class="ipsType_blendLinks" data-ipsTooltip title='{lang="wan_action_points" pluralize="$warning->points"}'>
  129. <span class="ipsPoints">{$warning->points}</span>
  130. </a>
  131. </div>
  132. <div class='ipsDataItem_main'>
  133. {{if $warning->canDelete()}}
  134. <a href="{$warning->url('delete')->csrf()}" title='{lang="revoke_this_warning"}' data-ipsTooltip data-action="revoke" class='ipsPos_right ipsButton ipsButton_small ipsButton_light ipsButton_narrow' data-ipsDialog data-ipsDialog-title='{lang="revoke_this_warning"}' data-ipsDialog-size='medium'><i class="fa fa-undo"></i></a>
  135. {{endif}}
  136. <a href="{url="app=core&module=system&controller=warnings&do=view&id={$member->member_id}&w={$warning->id}" seoTemplate="warn_view" seoTitle="$member->members_seo_name"}" data-ipsDialog data-ipsDialog-showFrom='#elWarningOverview_{$warning->id}' data-ipsDialog-size='narrow' class="ipsType_blendLinks" title=''>
  137. <h4 class="ipsType_reset ipsType_medium ipsType_unbold">
  138. {{if \IPS\Settings::i()->warnings_acknowledge}}
  139. {{if $warning->acknowledged}}
  140. <strong class='ipsType_success' title='{lang="warning_acknowledged"}' data-ipsTooltip><i class='fa fa-check-circle'></i></strong>
  141. {{else}}
  142. <strong class='ipsType_light' title='{lang="warning_not_acknowledged"}' data-ipsTooltip><i class='fa fa-circle-o'></i></strong>
  143. {{endif}}
  144. {{endif}}
  145. {lang="core_warn_reason_{$warning->reason}"}
  146. </h4>
  147. <p class='ipsDataItem_meta ipsType_light'>
  148. {lang="byline" sprintf="\IPS\Member::load( $warning->moderator )->name"}{datetime="$warning->date"}
  149. </p>
  150. </a>
  151. </div>
  152. </li>
  153. {{endforeach}}
  154. </ol>
  155. <p class='ipsType_reset ipsType_center ipsType_small ipsPad_half'>
  156. <a href='{url="app=core&module=system&controller=warnings&id={$member->member_id}" seoTemplate="warn_list" seoTitle="$member->members_seo_name"}' class='ipsButton ipsButton_verySmall ipsButton_light ipsButton_fullWidth' title='{lang="see_all_warnings"}' data-ipsDialog data-ipsDialog-remoteVerify='false' data-ipsDialog-remoteSubmit='false' data-ipsDialog-title="{lang="members_warnings" sprintf="$member->name"}">{lang="see_all_c"}</a>
  157. </p>
  158. </div>
  159. {{endif}}
  160. </div>
  161. {{else}}
  162. {{if \IPS\Member::loggedIn()->modPermission('can_flag_as_spammer') and !$member->inGroup( explode( ',', \IPS\Settings::i()->warn_protected ) ) and \IPS\Member::loggedIn()->member_id != $member->member_id}}
  163. {{if $member->members_bitoptions['bw_is_spammer']}}
  164. <a href='{url="app=core&module=system&controller=moderation&do=flagAsSpammer&id={$member->member_id}&s=0" seoTemplate="flag_as_spammer" seoTitle="$member->members_seo_name" csrf="true"}' class='ipsButton ipsButton_light ipsButton_verySmall ipsButton_fullWidth' title='{lang="spam_unflag"}' data-confirm data-confirmSubMessage="{lang="spam_unflag_confirm"}">{lang="spam_unflag"}</a>
  165. {{else}}
  166. <a href='{url="app=core&module=system&controller=moderation&do=flagAsSpammer&id={$member->member_id}&s=1" seoTemplate="flag_as_spammer" seoTitle="$member->members_seo_name" csrf="true"}' class='ipsButton ipsButton_light ipsButton_verySmall ipsButton_fullWidth' title='{lang="spam_flag"}' data-confirm>{lang="spam_flag"}</a>
  167. {{endif}}
  168. {{endif}}
  169. {{endif}}
  170. {{if \count( $followers ) || \IPS\Member::loggedIn()->member_id === $member->member_id}}
  171. <div class='ipsWidget ipsWidget_vertical cProfileSidebarBlock ipsBox ipsSpacer_bottom' id='elFollowers' data-feedID='member-{$member->member_id}' data-controller='core.front.profile.followers'>
  172. {template="followers" group="profile" app="core" params="$member, $followers"}
  173. </div>
  174. {{endif}}
  175. {{if $member->group['g_icon'] || $member->member_title || $member->rank['title'] || $member->rank['image'] || ( ( ( $member->isOnline() AND !$member->isOnlineAnonymously() ) OR ( $member->isOnlineAnonymously() AND \IPS\Member::loggedIn()->isAdmin() ) ) AND $member->location ) || ( $member->birthday AND \IPS\Settings::i()->profile_birthday_type == 'public' or ( \IPS\Settings::i()->profile_birthday_type == 'private' and \IPS\Member::loggedIn()->member_id == $member->member_id ) )}}
  176. <div class='ipsWidget ipsWidget_vertical cProfileSidebarBlock ipsBox ipsSpacer_bottom' data-location='defaultFields'>
  177. <h2 class='ipsWidget_title ipsType_reset'>{lang='profile_about' sprintf='$member->name'}</h2>
  178. <div class='ipsWidget_inner ipsPad'>
  179. {{if $member->group['g_icon'] }}
  180. <div class='ipsType_center ipsPad_half'><img src='{file="$member->group['g_icon']" extension="core_Theme"}' alt=''></div>
  181. {{endif}}
  182. <ul class='ipsDataList ipsDataList_reducedSpacing cProfileFields'>
  183. {{if ( ( $member->isOnline() AND !$member->isOnlineAnonymously() ) OR ( $member->isOnlineAnonymously() AND \IPS\Member::loggedIn()->isAdmin() ) ) AND $member->location}}
  184. <li class="ipsDataItem">
  185. <span class="ipsDataItem_generic ipsDataItem_size3 ipsType_break"><strong>{lang="online_users_location_lang"}</strong></span>
  186. <span class="ipsDataItem_main">{$member->location()|raw}</span>
  187. </li>
  188. {{endif}}
  189. {{if $member->member_title || $member->rank['title'] || $member->rank['image']}}
  190. <li class='ipsDataItem'>
  191. <span class='ipsDataItem_generic ipsDataItem_size3 ipsType_break'><strong>{lang="profile_rank"}</strong></span>
  192. <div class='ipsDataItem_generic ipsType_break'>
  193. {{if $member->member_title}}
  194. {$member->member_title}
  195. <br>
  196. {{elseif $member->rank['title']}}
  197. {$member->rank['title']}
  198. <br>
  199. {{endif}}
  200. {$member->rank['image']|raw}
  201. </div>
  202. </li>
  203. {{endif}}
  204. {{if $member->birthday AND \IPS\Settings::i()->profile_birthday_type == 'public' or ( \IPS\Settings::i()->profile_birthday_type == 'private' and \IPS\Member::loggedIn()->member_id == $member->member_id )}}
  205. <li class='ipsDataItem'>
  206. <span class='ipsDataItem_generic ipsDataItem_size3 ipsType_break'><strong>{lang="bday"}</strong></span>
  207. <span class='ipsDataItem_generic'>{$member->birthday}</span>
  208. </li>
  209. {{endif}}
  210. </ul>
  211. </div>
  212. </div>
  213. {{endif}}
  214. {{foreach $sidebarFields as $group => $fields}}
  215. {{if \count( $fields ) AND \count( array_filter( $fields, function( $fieldValue ){ return $fieldValue['value']; } ) )}}
  216. <div class='ipsWidget ipsWidget_vertical cProfileSidebarBlock ipsBox ipsSpacer_bottom' data-location='customFields'>
  217. {{if $group != 'core_pfieldgroups_0'}}
  218. <h2 class='ipsWidget_title ipsType_reset'>{lang="$group"}</h2>
  219. {{endif}}
  220. <div class='ipsWidget_inner ipsPad'>
  221. <ul class='ipsDataList ipsDataList_reducedSpacing cProfileFields'>
  222. {{foreach $fields as $field => $value}}
  223. {{if $value['value'] !== ""}}
  224. <li class='ipsDataItem ipsType_break'>
  225. {{if $value['custom']}}
  226. {$value['value']|raw}
  227. {{else}}
  228. <span class='ipsDataItem_generic ipsDataItem_size3 ipsType_break'><strong>{lang="$field"}</strong></span>
  229. <div class='ipsDataItem_generic'><div class='ipsType_break ipsContained'>{$value['value']|raw}</div></div>
  230. {{endif}}
  231. </li>
  232. {{endif}}
  233. {{endforeach}}
  234. </ul>
  235. </div>
  236. </div>
  237. {{endif}}
  238. {{endforeach}}
  239. {{if \IPS\Member::loggedIn()->modPermission('can_see_emails')}}
  240. <div class='ipsWidget ipsWidget_vertical cProfileSidebarBlock ipsBox ipsSpacer_bottom'>
  241. <h2 class='ipsWidget_title ipsType_reset'>{lang="profile_contact"}</h2>
  242. <div class='ipsWidget_inner ipsPad'>
  243. <ul class='ipsDataList ipsDataList_reducedSpacing'>
  244. <li class='ipsDataItem'>
  245. <span class='ipsDataItem_generic ipsDataItem_size3'><strong>{lang="profile_email"}</strong></span>
  246. <span class='ipsDataItem_generic'>
  247. <div class='ipsType_break ipsContained'><a href='mailto:{$member->email}' title='{lang="email_this_user"}'>{$member->email}</a></div>
  248. <span class='ipsType_light ipsType_small'>{lang="profile_email_addresses"}</span>
  249. </span>
  250. </li>
  251. </ul>
  252. </div>
  253. </div>
  254. {{endif}}
  255. {{if !empty( $visitors ) || \IPS\Member::loggedIn()->member_id == $member->member_id}}
  256. <div class='ipsWidget ipsWidget_vertical cProfileSidebarBlock ipsBox ipsSpacer_bottom' data-controller='core.front.profile.toggleBlock'>
  257. {template="recentVisitorsBlock" group="profile" params="$member, $visitors"}
  258. </div>
  259. {{endif}}
  260. </div>
  261.  
  262. </div>
  263. <section class='ipsColumn ipsColumn_fluid'>
  264. {$mainContent|raw}
  265. </section>
  266. </div>
  267. {{if !\IPS\Request::i()->isAjax()}}
  268. </div>
  269. </div>
  270. {{endif}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement