summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2013-07-31 02:30:44 -0400
committerczaks <marcin@6irc.net>2013-07-31 02:30:44 -0400
commit96bcf5dd1e8e09bce46c80291a24562d64ebc8dc (patch)
tree3721653471b6586c6fb7c09d4100810c6b419faa /templates
parent793042ee6ccd2fd1770c68ed55bfb1f58f2bf185 (diff)
parentb22bcdecf9cce8b08c48283290173996b6c8abf2 (diff)
Merge branch 'master' of https://github.com/savetheinternet/Tinyboard
Conflicts: inc/functions.php inc/mod/pages.php install.php js/expand.js mod.php
Diffstat (limited to 'templates')
-rw-r--r--templates/mod/log.html6
-rw-r--r--templates/post_form.html2
-rw-r--r--templates/posts.sql63
3 files changed, 38 insertions, 33 deletions
diff --git a/templates/mod/log.html b/templates/mod/log.html
index e75330b5..0aa3f110 100644
--- a/templates/mod/log.html
+++ b/templates/mod/log.html
@@ -18,7 +18,11 @@
{% endif %}
</td>
<td class="minimal">
- <a href="?/IP/{{ log.ip }}">{{ log.ip }}</a>
+ {% if mod|hasPermission(config.mod.show_ip_modlog) %}
+ <a href="?/IP/{{ log.ip }}">{{ log.ip }}</a>
+ {% else %}
+ <em>hidden</em>
+ {% endif %}
</td>
<td class="minimal">
<span title="{{ log.time|date(config.post_date) }}">{{ log.time|ago }}</span>
diff --git a/templates/post_form.html b/templates/post_form.html
index 0ea2b999..391f0657 100644
--- a/templates/post_form.html
+++ b/templates/post_form.html
@@ -88,7 +88,7 @@
</td>
</tr>
{% endif %}
- {% if mod %}
+ {% if mod and ((not id and post.mod|hasPermission(config.mod.sticky, board.uri)) or (not id and post.mod|hasPermission(config.mod.lock, board.uri)) or post.mod|hasPermission(config.mod.rawhtml, board.uri)) %}
<tr>
<th>
{% trans %}Flags{% endtrans %}
diff --git a/templates/posts.sql b/templates/posts.sql
index c766d38e..0a1dc92a 100644
--- a/templates/posts.sql
+++ b/templates/posts.sql
@@ -1,32 +1,33 @@
CREATE TABLE IF NOT EXISTS `posts_{{ board }}` (
- `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
- `thread` int(11) DEFAULT NULL,
- `subject` varchar(100) DEFAULT NULL,
- `email` varchar(30) DEFAULT NULL,
- `name` varchar(35) DEFAULT NULL,
- `trip` varchar(15) DEFAULT NULL,
- `capcode` varchar(50) DEFAULT NULL,
- `body` text NOT NULL,
- `body_nomarkup` text DEFAULT NULL,
- `time` int(11) NOT NULL,
- `bump` int(11) DEFAULT NULL,
- `thumb` varchar(50) DEFAULT NULL,
- `thumbwidth` int(11) DEFAULT NULL,
- `thumbheight` int(11) DEFAULT NULL,
- `file` varchar(50) DEFAULT NULL,
- `filewidth` int(11) DEFAULT NULL,
- `fileheight` int(11) DEFAULT NULL,
- `filesize` int(11) DEFAULT NULL,
- `filename` text DEFAULT NULL,
- `filehash` text DEFAULT NULL,
- `password` varchar(20) DEFAULT NULL,
- `ip` varchar(45) NOT NULL,
- `sticky` int(1) NOT NULL,
- `locked` int(1) NOT NULL,
- `sage` int(1) NOT NULL,
- `embed` text,
- UNIQUE KEY `id` (`id`),
- KEY `thread_id` (`thread`, `id`),
- KEY `time` (`time`),
- FULLTEXT KEY `body` (`body`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `thread` int(11) DEFAULT NULL,
+ `subject` varchar(100) DEFAULT NULL,
+ `email` varchar(30) DEFAULT NULL,
+ `name` varchar(35) DEFAULT NULL,
+ `trip` varchar(15) DEFAULT NULL,
+ `capcode` varchar(50) DEFAULT NULL,
+ `body` text NOT NULL,
+ `body_nomarkup` text,
+ `time` int(11) NOT NULL,
+ `bump` int(11) DEFAULT NULL,
+ `thumb` varchar(50) DEFAULT NULL,
+ `thumbwidth` int(11) DEFAULT NULL,
+ `thumbheight` int(11) DEFAULT NULL,
+ `file` varchar(50) DEFAULT NULL,
+ `filewidth` int(11) DEFAULT NULL,
+ `fileheight` int(11) DEFAULT NULL,
+ `filesize` int(11) DEFAULT NULL,
+ `filename` text,
+ `filehash` text CHARACTER SET ascii,
+ `password` varchar(20) DEFAULT NULL,
+ `ip` varchar(39) CHARACTER SET ascii NOT NULL,
+ `sticky` int(1) NOT NULL,
+ `locked` int(1) NOT NULL,
+ `sage` int(1) NOT NULL,
+ `embed` text,
+ UNIQUE KEY `id` (`id`),
+ KEY `thread_id` (`thread`,`id`),
+ KEY `time` (`time`),
+ FULLTEXT KEY `body` (`body`)
+ ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ;
+ \ No newline at end of file