Advertisement
Guest User

serverlist template invision community

a guest
Dec 2nd, 2021
23
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -<app version="10014" key="serverlist">
  2. -<template template_location="front" template_data="$data, $tableHeader, $allServerStats, $orientation = 'horizontal'" template_name="serverlist" template_group="widgets">
  3.  
  4. -<![CDATA[<div class='serverList'>
  5. {{if $orientation == 'horizontal'}}
  6. <table id='serverList' class='ipsTable ipsTable_responsive ipsTable_zebra'>
  7. <tbody>
  8. {{foreach $data as $server}}
  9. <tr class='{{if $server['new_server']}}newServer{{endif}}{{if !$server['online']}} hapajkule_offline{{endif}}{{if $server['online']}} hapajkule_online{{endif}}'>
  10. <td><img src='{$server['type_icon']}' alt='{$server['type']}' data-ipsTooltip title='{$server['type_name']}'></td>
  11. <td><span data-ipsTooltip title='{{if $server['online']}}{lang="online"}{{else}}{lang="offline"}{{endif}}' class='ipsBadge ipsBadge_{{if $server['online']}}positive'>{{else}}negative'>{{endif}}</span></td>
  12. <td>
  13. <div class='ipsType_medium ipsTruncate ipsTruncate_line ipsResponsive_hidePhone ipsResponsive_hideTablet {{if $server['desc']}}ipsCursor_help{{endif}}' {{if $server['desc']}}data-ipsTooltip title='{lang="more_information"}...' data-ipsDialog data-ipsDialog-title='{lang="cdesc"}' data-ipsDialog-content='#serverInfo{$server['id']}'{{endif}}>
  14. {expression="$server['shortname'] ?: $server['hostname']" raw="true"}
  15. </div>
  16. <div class='ipsType_small'>
  17. <div class='ipsResponsive_hideDesktop'>
  18. <div {{if $server['desc']}}data-ipsTooltip title='{lang="more_information"}...' data-ipsDialog data-ipsDialog-title='{lang="cdesc"}' data-ipsDialog-content='#serverInfo{$server['id']}' class='ipsCursor_help'{{endif}}>{truncate="$server['shortname'] ?: $server['hostname']" length="25" raw="true"}</div>
  19. {lang="gs_sl_players"}: {$server['players_num']} / {$server['players_max']}
  20. </div>
  21. </div>
  22. </td>
  23. <td><div><a class='ipsType_blendLinks ipsType_large' data-ipsTooltip title='{lang="gs_sl_join"}' href='{$server['link']}'>{$server['ip']}</a></div></td>
  24. <td class='ipsResponsive_hidePhone ipsResponsive_hideTablet'>
  25. <div class='playersCount'>
  26. <a href='#' id='playersInfoDialog{$server['id']}' data-ipsDialog data-ipsDialog-title='{lang="gs_sl_players_on_server" sprintf="$server['shortname'] ?: $server['hostname']" raw="true"}' data-ipsDialog-content='#playersInfo{$server['id']}'>{$server['players_num']} / {$server['players_max']}</a>
  27. </div>
  28. <div class='ipsProgressBar ipsProgressBar_mini ipsProgressBar_fullWidth' data-ipsTooltip title='{lang="gs_sl_show_players"}'>
  29. <div data-role="progressBar" class='ipsProgressBar_progress ipsProgressBar' style='width: {$server['percent']}%; background: rgb(201,122,97); background: linear-gradient(90deg, rgba(201,122,97,1) 0%, rgba(234,166,116,1) 100%);'></div>
  30. </div>
  31. </td>
  32. <td>
  33. <div class='ipsResponsive_hidePhone ipsResponsive_hideTablet'>
  34. {{if $server['map'] != 'n/a'}}<span id='mapInfoMenu{$server['id']}' class='ipsCursor_pointer' data-ipsMenu{{if settings.gs_sl_nextmap_pos == 1 AND $server['next_map']}} data-ipsTooltip title='{lang="gs_sl_next_map"} {$server['next_map']}'{{endif}}>{{endif}}
  35. {$server['map']}
  36. {{if $server['map'] != 'n/a'}}</span>{{endif}}
  37. {{if settings.gs_sl_nextmap_pos == 2 AND $server['next_map'] AND $server['next_map'] != 'n/a'}}
  38. &nbsp;→&nbsp;<span id='nextMapInfoMenu{$server['id']}' class='ipsCursor_pointer' data-ipsMenu>{$server['next_map']}</span>
  39. <div id='nextMapInfoMenu{$server['id']}_menu' class='ipsHide'>
  40. <img src='{$server['nextmap_image']}' alt='{$server['next_map']}'>
  41. </div>
  42. {{endif}}
  43. </div>
  44. </td>
  45. <td class='ipsResponsive_hidePhone'>
  46. <a class='hapajkule_list_serwers_btnn' data-ipsTooltip title='{lang="gs_sl_players_most"}: {$server['players_most']['players']} ( {$server['players_most']['date']} )'><i class="fas fa-bolt"></i></a>
  47. {{if $server['gt']}}
  48. <a class='hapajkule_list_serwers_btnn' data-ipsTooltip title='{lang="gs_sl_gt"}' href='http://www.gametracker.com/server_info/{$server['gt_ip']}' target='_blank'><i class="fab fa-google" aria-hidden="true"></i></a>
  49. {{endif}}
  50. {{if $server['tv_link']}}
  51. <a class='hapajkule_list_serwers_btnn' data-ipsTooltip title='{lang="gs_sl_tv"}' href='{$server['tv_link']}' target='_blank'><i class="fas fa-tv"></i></a>
  52. {{endif}}
  53. {{if $server['stats_link']}}
  54. <a class='hapajkule_list_serwers_btnn' data-ipsTooltip title='{lang="gs_sl_stats"}' href='{$server['stats_link']}' target='_blank'><i class="fas fa-chart-line"></i></a>
  55. {{endif}}
  56. {{if $server['shop_link']}}
  57. <a class='hapajkule_list_serwers_btnn' data-ipsTooltip title='{lang="gs_sl_shop"}' href='{$server['shop_link']}' target='_blank'><i class="fas fa-store-alt"></i></a>
  58. {{endif}}
  59. </td>
  60. <td>
  61. <div class="hapajkule_list_serwers_btn">
  62. <a href="{$server['link']}">Połącz</a>
  63. </div>
  64. </td>
  65. </tr>
  66. {{endforeach}}
  67. </tbody>
  68. </table>
  69.  
  70. {{if settings.gs_sl_public_stats}}
  71. <table id='publicStats' class='ipsType_reset ipsWidget_title ipsTable ipsTable_responsive ipsResponsive_hidePhone'>
  72. <tbody>
  73. <tr class='ipsType_center ipsType_light ipsType_small ipsClearfix'>
  74. <td><i class='fa fa-server'></i> {lang="gs_sl_total_servers"}: <strong>{$allServerStats['game_servers'] + $allServerStats['voice_servers']}</strong><sup data-ipsTooltip title='{lang="gs_sl_online_servers"}'> {$allServerStats['online_servers']}</sup></td>
  75. <td><i class='fa fa-percent'></i> {lang="gs_sl_fill_servers"} <strong>{$allServerStats['fill_servers']}</strong></td>
  76. <td><i class='fa fa-users'></i> {lang="gs_sl_players_num"}: <strong>{$allServerStats['players_num']}</strong> / <strong>{$allServerStats['players_max']}</strong></td>
  77. <td><i class='fa fa-line-chart'></i> {lang="gs_sl_players_most"}: <strong>{$allServerStats['players_most']}</strong></td>
  78. <td><i class='fa fa-refresh'></i> {lang="updatedDate"}: <strong>{$allServerStats['last_update']|raw}</strong></td>
  79. </tr>
  80. </tbody>
  81. </table>
  82. {{endif}}
  83. {{else}}
  84. <h3 class='ipsWidget_title ipsType_reset'>
  85. <i class='fa fa-list'></i>
  86. {$tableHeader|raw}
  87. </h3>
  88. <div class='ipsWidget_inner ipsType_small'>
  89. {{foreach $data as $server}}
  90. <div class='ipsClearfix{{if $server['new_server']}} newServer{{endif}}{{if !$server['online']}} ipsType_negative{{endif}}'>
  91. <div class='ipsPos_left ipsType_medium'>
  92. <img src='{$server['type_icon']}' alt='{$server['type']}' data-ipsTooltip title='{$server['type_name']}'>
  93. <strong {{if $server['desc']}}data-ipsTooltip title='{lang="more_information"}...' data-ipsDialog data-ipsDialog-title='{lang="cdesc"}' data-ipsDialog-content='#serverInfo{$server['id']}'{{endif}}>{truncate="$server['shortname'] ?: $server['hostname']" length="23" raw="true"}</strong>
  94. </div>
  95. <div class='ipsPos_right'><span class='ipsBadge ipsBadge_{{if $server['online']}}positive'>{lang="online"}{{else}}negative'>{lang="offline"}{{endif}}</span></div>
  96. <div class='ipsClear'></div>
  97. <div class='ipsPos_left'><strong>{lang="ip_address"}:</strong> <a data-ipsTooltip title='{lang="gs_sl_join"}' href='{$server['link']}'>{$server['ip']}</a></div>
  98. <div class='ipsClear'></div>
  99. <div class='ipsPos_left'><strong>{lang="gs_sl_map_name"}:</strong> <a href='#' id='mapInfoMenu{$server['id']}' data-ipsMenu{{if $server['next_map']}} data-ipsTooltip title='{lang="gs_sl_next_map"} {$server['next_map']}'{{endif}}>{truncate="$server['map']" length="15"}</a></div>
  100. <div class='ipsPos_right'>
  101. <span class='ipsBadge ipsBadge_most ipsBadge_negative ipsBadge_icon fa' data-ipsTooltip title='{lang="gs_sl_players_most"}: {$server['players_most']['players']} ( {$server['players_most']['date']} )'></span>
  102. {{if $server['gt']}}
  103. <a class='ipsBadge ipsBadge_gt ipsBadge_icon fa' data-ipsTooltip title='{lang="gs_sl_gt"}' href='http://www.gametracker.com/server_info/{$server['gt_ip']}' target='_blank'></a>
  104. {{endif}}
  105. {{if $server['tv_link']}}
  106. <a class='ipsBadge ipsBadge_tv ipsBadge_new ipsBadge_icon fa' data-ipsTooltip title='{lang="gs_sl_tv"}' href='{$server['tv_link']}' target='_blank'></a>
  107. {{endif}}
  108. {{if $server['stats_link']}}
  109. <a class='ipsBadge ipsBadge_stats ipsBadge_style2 ipsBadge_icon fa' data-ipsTooltip title='{lang="gs_sl_stats"}' href='{$server['stats_link']}' target='_blank'></a>
  110. {{endif}}
  111. {{if $server['shop_link']}}
  112. <a class='ipsBadge ipsBadge_shop ipsBadge_intermediary ipsBadge_icon fa' data-ipsTooltip title='{lang="gs_sl_shop"}' href='{$server['shop_link']}' target='_blank'></a>
  113. {{endif}}
  114. </div>
  115. <div class='ipsProgressBar ipsProgressBar_mini ipsProgressBar_fullWidth' data-ipsTooltip title='{lang="gs_sl_show_players"}'>
  116. <div data-role="progressBar" class='ipsProgressBar_progress ipsProgressBar' style='width: {$server['percent']}%; background: {$server['percent_color']}'>
  117. <div class='playersCount'>
  118. <a href='#' id='playersInfoDialog{$server['id']}' data-ipsDialog data-ipsDialog-title='{lang="gs_sl_players_on_server" sprintf="$server['shortname'] ?: $server['hostname']" raw="true"}' data-ipsDialog-content='#playersInfo{$server['id']}'>{$server['players_num']} / {$server['players_max']}</a>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. <hr class='ipsHr'>
  124. {{endforeach}}
  125. </div>
  126. {{endif}}
  127. </div>
  128.  
  129. {{foreach $data as $server}}
  130. {{if $server['desc']}}
  131. <div class='ipsHide' id='serverInfo{$server['id']}'>
  132. <div class='ipsType_center'>{lang="gs_sl_descContentLang{$server['id']}"}</div>
  133. </div>
  134. {{endif}}
  135.  
  136. <div class='playersInfo ipsHide' id='playersInfo{$server['id']}'>
  137. {{if !$server['players_num']}}
  138. <div class='ipsType_center ipsType_bold' style='margin: 5px;'>{lang="gs_sl_no_players"}</div>
  139. {{else}}
  140. <table class='ipsTable ipsTable_responsive'>
  141. <thead>
  142. <tr>
  143. <th>#</th>
  144. <th>{lang="gs_sl_player_name"}</th>
  145. <th data-score-type='{$server['type']}'>{lang="gs_sl_player_score"}</th>
  146. <th data-time-type='{$server['type']}'>{lang="gs_sl_player_time"}</th>
  147. </tr>
  148. </thead>
  149. <tbody>
  150. {{foreach $server['players'] as $key => $player}}
  151. <tr>
  152. <td><i class='fa fa-user'></i></td>
  153. <td>{$player['gq_name']|raw}</td>
  154. <td data-score-type='{$server['type']}'>{lang="gs_sl_score" pluralize="$player['gq_kills'] ?: $player['gq_score']"}</td>
  155. <td data-time-type='{$server['type']}'>{$player['gq_time']}</td>
  156. </tr>
  157. {{endforeach}}
  158. </tbody>
  159. </table>
  160. {{endif}}
  161. </div>
  162.  
  163. <div id='mapInfoMenu{$server['id']}_menu' class='ipsHide'>
  164. <img src='{$server['map_image']}' alt='{$server['map']}'>
  165. </div>
  166. {{endforeach}}]]>
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement