BioTorrents.de’s version of Gazelle
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

private-sidebar.twig 6.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <div class="thin">
  2. <div class="sidebar">
  3. {% if featured_aotm %}
  4. <div class="box">
  5. <div class="head colhead_dark">
  6. <strong>Album of the Month</strong>
  7. <a href="forums.php?action=viewthread&amp;threadid={{ featured_aotm.ThreadID}}">[Discuss]</a>
  8. </div>
  9. <div class="center pad">
  10. <a href="torrents.php?id={{ featured_aotm.GroupID }}" class="tooltip" title="{{
  11. featured_aotm.artist_name }} - {{ featured_aotm.Name }}">
  12. <img src="{{ featured_aotm.image|raw }}" alt="{{ featured_aotm.artist_name }} - {{ featured_aotm.Name }}" width="100%" />
  13. </a>
  14. </div>
  15. </div>
  16. {% endif %}
  17. {% if featured_showcase %}
  18. <div class="box">
  19. <div class="head colhead_dark">
  20. <strong>Showcase</strong>
  21. <a href="forums.php?action=viewthread&amp;threadid={{ featured_showcase.ThreadID}}">[Discuss]</a>
  22. </div>
  23. <div class="center pad">
  24. <a href="torrents.php?id={{ featured_showcase.GroupID }}" class="tooltip" title="{{
  25. featured_showcase.artist_name }} - {{ featured_showcase.Name }}">
  26. <img src="{{ featured_showcase.image|raw }}" alt="{{ featured_showcase.artist_name }} - {{ featured_showcase.Name }}" width="100%" />
  27. </a>
  28. </div>
  29. </div>
  30. {% endif %}
  31. {% if viewer.permitted('users_mod') %}
  32. {% set read = staff_blog.readBy(viewer) %}
  33. <div class="box">
  34. <div class="head colhead_dark">
  35. <strong><a href="staffblog.php">Latest staff blog posts</a></strong>
  36. </div>
  37. <ul class="stats nobullet">
  38. {% for article in staff_blog.blogList[0:5] %}
  39. {% set unread = read < article.epoch %}
  40. <li>
  41. {%- if unread %}<strong>{% endif -%}
  42. <a href="staffblog.php#blog{{ article.id }}">{{ article.title }}</a>
  43. {%- if unread %}</strong>{% endif -%}
  44. </li>
  45. {% endfor %}
  46. </ul>
  47. </div>
  48. {% endif %}
  49. <div class="box">
  50. <div class="head colhead_dark"><strong><a href="blog.php">Latest blog posts</a></strong></div>
  51. <ul class="stats nobullet">
  52. {% for article in blog.headlines[0:5] %}
  53. <li>
  54. <a href="blog.php#blog{{ article.0 }}">{{ article.1 }}</a>
  55. </li>
  56. {% endfor %}
  57. </ul>
  58. </div>
  59. {% if leaderboard %}
  60. <div class="box">
  61. <div class="head colhead_dark"><strong>Contest Leaderboard</strong></div>
  62. <table>
  63. {% for entry in leaderboard %}
  64. <tr>
  65. <td><a href="user.php?id={{ entry.user_id }}">{{ entry.username }}</a></td>
  66. <td>{{ entry.entry_count }}</td>
  67. </tr>
  68. {% endfor %}
  69. </table>
  70. <div class="center pad">
  71. <a href="contest.php?action=leaderboard"><em>View More</em></a>
  72. </div>
  73. </div>
  74. {% endif %}
  75. <div class="box">
  76. <div class="head colhead_dark"><strong>Stats</strong></div>
  77. <ul class="stats nobullet">
  78. {% if constant('USER_LIMIT') > 0 %}
  79. <li>Maximum users: {{ constant('USER_LIMIT')|number_format }}</li>
  80. {% endif %}
  81. <li>Enabled users: {{ user_count|number_format }} <a href="stats.php?action=users" class="brackets">Details</a></li>
  82. <li>Users active today: {{ user_stats.Day }} ({{ (user_stats.Day / user_count * 100)|number_format(2) }}%)</li>
  83. <li>Users active this week: {{ user_stats.Week }} ({{ (user_stats.Week / user_count * 100)|number_format(2) }}%)</li>
  84. <li>Users active this month: {{ user_stats.Month }} ({{ (user_stats.Month / user_count * 100)|number_format(2) }}%)</li>
  85. <li>Torrents: {{ torrent_stats.torrentCount|number_format }}</li>
  86. <li>Releases: {{ torrent_stats.albumCount|number_format }}</li>
  87. <li>Artists: {{ torrent_stats.artistCount|number_format }}</li>
  88. <li>"Perfect" FLACs: {{ torrent_stats.perfectCount|number_format }}</li>
  89. <li>Collages: {{ collage_count|number_format }}</li>
  90. <li>Requests: {{ request_stats.requestCount|number_format }} ({{ request_stats.filledPercent|number_format(2) }}% filled)</li>
  91. {% if snatch_stats %}
  92. <li>Snatches: {{ snatch_stats|number_format }}</li>
  93. {% endif %}
  94. <li>Peers: {{ torrent_stats.peerCount|number_format }}</li>
  95. <li>Seeders: {{ torrent_stats.seederCount|number_format }}</li>
  96. <li>Leechers: {{ torrent_stats.leecherCount|number_format }}</li>
  97. <li>Seeder/leecher ratio: {{ ratio(torrent_stats.leecherCount, torrent_stats.seederCount)|raw }}</li>
  98. </ul>
  99. </div>
  100. {%- if poll -%}
  101. <div class="box">
  102. <div class="head colhead_dark"><strong>Poll{% if poll.is_closed %} [Closed]{% endif %}</strong></div>
  103. <div class="pad">
  104. <p><strong>{{ poll.question }}</strong></p>
  105. {% if poll.user_vote or poll.is_closed %}
  106. <ul class="poll nobullet">
  107. {% for id, vote in poll.tally %}
  108. <li title="{{ vote.score }}">
  109. {%- if id == poll.user_vote %}&raquo;&nbsp;{% endif -%}
  110. {{ vote.answer }} ({{ vote.percent|number_format(2) }}%)</li>
  111. <li title="{{ vote.score }}" class="graph">
  112. <span class="left_poll"></span>
  113. <span class="center_poll" style="width: {{ vote.ratio|number_format(2) }}%;"></span>
  114. <span class="right_poll"></span>
  115. <br />
  116. </li>
  117. {% endfor %}
  118. </ul>
  119. <strong>Votes:</strong> {{ poll.votes_total|number_format }}<br />
  120. {% else %}
  121. <div id="poll_container">
  122. <form class="vote_form" name="poll" id="poll" action="">
  123. <input type="hidden" name="action" value="poll" />
  124. <input type="hidden" name="auth" value="{{ auth }}" />
  125. <input type="hidden" name="threadid" value="{{ poll_thread_id }}" />
  126. {% for id, vote in poll.tally %}
  127. <input type="radio" name="vote" id="answer_{{ id }}" value="{{ id }}" />
  128. <label for="answer_{{ id }}">{{ vote.answer }}</label><br />
  129. {% endfor %}
  130. <br /><input type="radio" name="vote" id="answer_0" value="0" /> <label for="answer_0">Blank&#8202;&mdash;&#8202;Show the results!</label><br /><br />
  131. <input type="button" onclick="ajax.post('index.php', 'poll', function(response) { $('#poll_container').raw().innerHTML = response } );" value="Vote" />
  132. </form>
  133. </div>
  134. {% endif %}
  135. <br /><strong>Topic:</strong> <a href="forums.php?action=viewthread&amp;threadid={{ poll_thread_id }}">Visit</a>
  136. </div>
  137. </div>
  138. {% endif -%}
  139. </div>