forked from leftypol/leftypol
Merge branch 'master' of https://github.com/savetheinternet/Tinyboard
Conflicts: mod.php
This commit is contained in:
commit
e6b9bad788
8 changed files with 279 additions and 44 deletions
|
@ -1,3 +1,44 @@
|
|||
<p style="text-align:center">
|
||||
Most recent:
|
||||
</p>
|
||||
<table class="modlog" style="width:700px;margin:auto">
|
||||
<tr>
|
||||
<th>Board</th>
|
||||
<th>Thread</th>
|
||||
<th>Hash (SHA1)</th>
|
||||
<th>Created</th>
|
||||
<th>Expires</th>
|
||||
<th>Passed</th>
|
||||
</tr>
|
||||
{% for hash in recent %}
|
||||
<tr>
|
||||
<td>{{ config.board_abbreviation|sprintf(hash.board) }}</td>
|
||||
<td>
|
||||
{% if hash.thread %}
|
||||
{{ hash.thread }}
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}</td>
|
||||
<td>
|
||||
<small><code>{{ hash.hash }}</code></small>
|
||||
</td>
|
||||
<td>
|
||||
<span title="{{ hash.created|date(config.post_date) }}">{{ hash.created|ago }} ago</span>
|
||||
</td>
|
||||
<td>
|
||||
{% if hash.expires %}
|
||||
<span title="{{ hash.expires|date(config.post_date) }}">
|
||||
{{ hash.expires|until }}
|
||||
</span>
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ hash.passed }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
<p style="text-align:center">
|
||||
Most used (in active):
|
||||
</p>
|
||||
|
@ -38,6 +79,7 @@
|
|||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
<p style="text-align:center">
|
||||
Total: <strong>{{ total }}</strong> (<strong>{{ expiring }}</strong> set to expire)
|
||||
</p>
|
||||
|
|
89
templates/mod/debug/recent_posts.html
Normal file
89
templates/mod/debug/recent_posts.html
Normal file
|
@ -0,0 +1,89 @@
|
|||
<table class="modlog">
|
||||
<tr>
|
||||
<th>Time</th>
|
||||
<th>Board</th>
|
||||
<th>ID</th>
|
||||
<th>Thread</th>
|
||||
<th>IP</th>
|
||||
<th>Name</th>
|
||||
<th>Subject</th>
|
||||
<th>File</th>
|
||||
<th>Body (snippet)</th>
|
||||
</tr>
|
||||
{% for post in posts %}
|
||||
<tr>
|
||||
<td class="minimal">
|
||||
<small>{{ post.time | ago }} ago</small>
|
||||
</td>
|
||||
<td class="minimal">
|
||||
<a href="?/{{ config.board_path|sprintf(post.board) }}{{ config.file_index }}">{{ config.board_abbreviation|sprintf(post.board) }}</a>
|
||||
</td>
|
||||
<td class="minimal" >
|
||||
{% if post.thread %}
|
||||
{% set thread = post.thread %}
|
||||
{% else %}
|
||||
{% set thread = post.id %}
|
||||
{% endif %}
|
||||
<a href="{{ config.root ~ post.board ~ '/' ~ config.dir.res}}{{ config.file_page|sprintf(thread) }}#{{ post.id }}">
|
||||
{{ post.id }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="minimal">
|
||||
<small>
|
||||
{% if post.thread %}
|
||||
{{ post.thread }}
|
||||
{% else %}
|
||||
(OP)
|
||||
{% endif %}
|
||||
</small>
|
||||
</td>
|
||||
<td class="minimal">
|
||||
{% if mod|hasPermission(config.mod.show_ip, post.board) %}
|
||||
<a href="?/IP/{{ post.ip }}">
|
||||
{{ post.ip }}
|
||||
</a>
|
||||
{% else %}
|
||||
<em>hidden</em>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="minimal" >
|
||||
<small>
|
||||
{% if post.email|length > 0 %}
|
||||
{# start email #}
|
||||
<a class="email" href="mailto:{{ post.email }}">
|
||||
{% endif %}
|
||||
{% set capcode = post.capcode|capcode %}
|
||||
<span {% if capcode.name %}style="{{ capcode.name }}" {% endif %}class="name">{{ post.name }}</span>
|
||||
{% if post.trip|length > 0 %}
|
||||
<span {% if capcode.trip %}style="{{ capcode.trip }}" {% endif %}class="trip">{{ post.trip }}</span>
|
||||
{% endif %}
|
||||
{% if post.email|length > 0 %}
|
||||
{# end email #}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if capcode %}
|
||||
{{ capcode.cap }}
|
||||
{% endif %}
|
||||
</small>
|
||||
</td>
|
||||
<td class="minimal" >
|
||||
{% if post.subject %}
|
||||
<small>{{ post.subject }}</small>
|
||||
{% else %}
|
||||
–
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="minimal">
|
||||
{% if post.file %}
|
||||
<small>{{ post.file }} ({{ post.filesize | filesize }})</small>
|
||||
{% else %}
|
||||
–
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<small><em>{{ post.snippet }}</em></small>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
26
templates/mod/debug/sql.html
Normal file
26
templates/mod/debug/sql.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
<form action="" method="post">
|
||||
<input type="hidden" name="token" value="{{ security_token }}">
|
||||
<textarea style="display:block;margin:5px auto;width:90%;max-width:600px" rows="3" name="query">{{ query | e }}</textarea>
|
||||
<input style="display:block;margin:5px auto" type="submit" value="Query">
|
||||
</form>
|
||||
|
||||
{% if result == 'empty' %}
|
||||
<p style="text-align:center">Query successful (no result).</p>
|
||||
{% elseif result %}
|
||||
<table class="modlog">
|
||||
<tr>
|
||||
{% for key in keys %}
|
||||
<th>{{ key | e }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% for row in result %}
|
||||
<tr>
|
||||
{% for col in row %}
|
||||
<td>{{ col | e }}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% elseif error %}
|
||||
<p style="text-align:center;color:#d00">{{ error | e }}</p>
|
||||
{% endif %}
|
|
@ -32,8 +32,16 @@
|
|||
{% trans %}Comment{% endtrans %}
|
||||
</th>
|
||||
<td>
|
||||
<textarea name="body" id="body" rows="5" cols="35">{{ post.body_nomarkup }}</textarea>
|
||||
<textarea name="body" id="body" rows="8" cols="35">{% if raw %}{{ post.body | e }}{% else %}{{ post.body_nomarkup }}{% endif %}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p style="text-align:center">
|
||||
{% if raw %}
|
||||
{% trans %}Currently editing raw HTML.{% endtrans %}
|
||||
<a href="?/{{ board }}/edit/{{ post.id }}">{% trans %}Edit markup instead?{% endtrans %}</a>
|
||||
{% else %}
|
||||
<a href="?/{{ board }}/edit_raw/{{ post.id }}">{% trans %}Edit raw HTML instead?{% endtrans %}</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
</form>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue