summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2013-08-01 00:47:33 -0400
committerczaks <marcin@6irc.net>2013-08-01 00:47:33 -0400
commit168a4d73cc2c47cd9039ff466b03fb6812fbb677 (patch)
tree418a3d3ba99739fcb4765f914de44b6ecc3f104a /templates
parentcefd5517ac1a532214ac2f47485f63958c87ce25 (diff)
parent5bf0e7f7e76cd3610e0aa692e0c433aca594ee51 (diff)
Merge branch 'master' of https://github.com/savetheinternet/Tinyboard
Diffstat (limited to 'templates')
-rw-r--r--templates/header.html30
-rw-r--r--templates/posts.sql2
-rw-r--r--templates/themes/basic/theme.php2
-rw-r--r--templates/themes/catalog/theme.php2
-rw-r--r--templates/themes/categories/theme.php2
-rw-r--r--templates/themes/frameset/theme.php2
-rw-r--r--templates/themes/recent/theme.php10
-rw-r--r--templates/themes/rrdtool/theme.php2
-rw-r--r--templates/themes/sitemap/theme.php2
9 files changed, 34 insertions, 20 deletions
diff --git a/templates/header.html b/templates/header.html
index be9cdaad..d054fd6d 100644
--- a/templates/header.html
+++ b/templates/header.html
@@ -13,17 +13,31 @@
{% endif %}
{% endif %}
{% if config.recaptcha %}<style type="text/css">{% raw %}
- .recaptcha_image_cell {
- background: none !important;
+ #recaptcha_area {
+ float: none !important;
+ padding: 0 !important;
}
- table.recaptchatable {
+ #recaptcha_logo, #recaptcha_privacy {
+ display: none;
+ }
+ #recaptcha_table {
border: none !important;
}
- #recaptcha_logo, #recaptcha_tagline {
- display: none;
- float: right;
+ #recaptcha_table tr:first-child {
+ height: auto;
+ }
+ .recaptchatable img {
+ float: none !important;
+ }
+ #recaptcha_response_field {
+ font-size: 10pt !important;
+ border: 1px solid #a9a9a9 !important;
+ padding: 1px !important;
+ }
+ td.recaptcha_image_cell {
+ background: transparent !important;
}
- .recaptchatable a {
- display: block;
+ .recaptchatable, #recaptcha_area tr, #recaptcha_area td, #recaptcha_area th {
+ padding: 0 !important;
}
{% endraw %}</style>{% endif %}
diff --git a/templates/posts.sql b/templates/posts.sql
index 698fad77..ca2ec304 100644
--- a/templates/posts.sql
+++ b/templates/posts.sql
@@ -1,4 +1,4 @@
-CREATE TABLE IF NOT EXISTS `posts_{{ board }}` (
+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,
diff --git a/templates/themes/basic/theme.php b/templates/themes/basic/theme.php
index 7ba0d1e7..6ba09ce6 100644
--- a/templates/themes/basic/theme.php
+++ b/templates/themes/basic/theme.php
@@ -25,7 +25,7 @@
$settings['no_recent'] = (int) $settings['no_recent'];
- $query = query("SELECT * FROM `news` ORDER BY `time` DESC" . ($settings['no_recent'] ? ' LIMIT ' . $settings['no_recent'] : '')) or error(db_error());
+ $query = query("SELECT * FROM ``news`` ORDER BY `time` DESC" . ($settings['no_recent'] ? ' LIMIT ' . $settings['no_recent'] : '')) or error(db_error());
$news = $query->fetchAll(PDO::FETCH_ASSOC);
return Element('themes/basic/index.html', Array(
diff --git a/templates/themes/catalog/theme.php b/templates/themes/catalog/theme.php
index 5c9f6769..4e2d40db 100644
--- a/templates/themes/catalog/theme.php
+++ b/templates/themes/catalog/theme.php
@@ -37,7 +37,7 @@
$recent_posts = array();
$stats = array();
- $query = query(sprintf("SELECT *, `id` AS `thread_id`, (SELECT COUNT(*) FROM `posts_%s` WHERE `thread` = `thread_id`) AS `reply_count`, '%s' AS `board` FROM `posts_%s` WHERE `thread` IS NULL ORDER BY `bump` DESC", $board_name, $board_name, $board_name)) or error(db_error());
+ $query = query(sprintf("SELECT *, `id` AS `thread_id`, (SELECT COUNT(*) FROM ``posts_%s`` WHERE `thread` = `thread_id`) AS `reply_count`, '%s' AS `board` FROM ``posts_%s`` WHERE `thread` IS NULL ORDER BY `bump` DESC", $board_name, $board_name, $board_name)) or error(db_error());
while ($post = $query->fetch(PDO::FETCH_ASSOC)) {
$post['link'] = $config['root'] . $board['dir'] . $config['dir']['res'] . sprintf($config['file_page'], ($post['thread'] ? $post['thread'] : $post['id']));
diff --git a/templates/themes/categories/theme.php b/templates/themes/categories/theme.php
index 7d468d0d..74ed61ed 100644
--- a/templates/themes/categories/theme.php
+++ b/templates/themes/categories/theme.php
@@ -36,7 +36,7 @@
public static function news($settings) {
global $config;
- $query = query("SELECT * FROM `news` ORDER BY `time` DESC") or error(db_error());
+ $query = query("SELECT * FROM ``news`` ORDER BY `time` DESC") or error(db_error());
$news = $query->fetchAll(PDO::FETCH_ASSOC);
return Element('themes/categories/news.html', Array(
diff --git a/templates/themes/frameset/theme.php b/templates/themes/frameset/theme.php
index 5fd9d29e..ffab0538 100644
--- a/templates/themes/frameset/theme.php
+++ b/templates/themes/frameset/theme.php
@@ -36,7 +36,7 @@
public static function news($settings) {
global $config;
- $query = query("SELECT * FROM `news` ORDER BY `time` DESC") or error(db_error());
+ $query = query("SELECT * FROM ``news`` ORDER BY `time` DESC") or error(db_error());
$news = $query->fetchAll(PDO::FETCH_ASSOC);
return Element('themes/frameset/news.html', Array(
diff --git a/templates/themes/recent/theme.php b/templates/themes/recent/theme.php
index 98fabfa1..08d910f8 100644
--- a/templates/themes/recent/theme.php
+++ b/templates/themes/recent/theme.php
@@ -42,7 +42,7 @@
foreach ($boards as &$_board) {
if (in_array($_board['uri'], $this->excluded))
continue;
- $query .= sprintf("SELECT *, '%s' AS `board` FROM `posts_%s` WHERE `file` IS NOT NULL AND `file` != 'deleted' AND `thumb` != 'spoiler' UNION ALL ", $_board['uri'], $_board['uri']);
+ $query .= sprintf("SELECT *, '%s' AS `board` FROM ``posts_%s`` WHERE `file` IS NOT NULL AND `file` != 'deleted' AND `thumb` != 'spoiler' UNION ALL ", $_board['uri'], $_board['uri']);
}
$query = preg_replace('/UNION ALL $/', 'ORDER BY `time` DESC LIMIT ' . (int)$settings['limit_images'], $query);
$query = query($query) or error(db_error());
@@ -62,7 +62,7 @@
foreach ($boards as &$_board) {
if (in_array($_board['uri'], $this->excluded))
continue;
- $query .= sprintf("SELECT *, '%s' AS `board` FROM `posts_%s` UNION ALL ", $_board['uri'], $_board['uri']);
+ $query .= sprintf("SELECT *, '%s' AS `board` FROM ``posts_%s`` UNION ALL ", $_board['uri'], $_board['uri']);
}
$query = preg_replace('/UNION ALL $/', 'ORDER BY `time` DESC LIMIT ' . (int)$settings['limit_posts'], $query);
$query = query($query) or error(db_error());
@@ -82,7 +82,7 @@
foreach ($boards as &$_board) {
if (in_array($_board['uri'], $this->excluded))
continue;
- $query .= sprintf("SELECT MAX(`id`) AS `top` FROM `posts_%s` UNION ALL ", $_board['uri']);
+ $query .= sprintf("SELECT MAX(`id`) AS `top` FROM ``posts_%s`` UNION ALL ", $_board['uri']);
}
$query = preg_replace('/UNION ALL $/', ') AS `posts_all`', $query);
$query = query($query) or error(db_error());
@@ -93,7 +93,7 @@
foreach ($boards as &$_board) {
if (in_array($_board['uri'], $this->excluded))
continue;
- $query .= sprintf("SELECT `ip` FROM `posts_%s` UNION ALL ", $_board['uri']);
+ $query .= sprintf("SELECT `ip` FROM ``posts_%s`` UNION ALL ", $_board['uri']);
}
$query = preg_replace('/UNION ALL $/', ') AS `posts_all`', $query);
$query = query($query) or error(db_error());
@@ -104,7 +104,7 @@
foreach ($boards as &$_board) {
if (in_array($_board['uri'], $this->excluded))
continue;
- $query .= sprintf("SELECT `filesize` FROM `posts_%s` UNION ALL ", $_board['uri']);
+ $query .= sprintf("SELECT `filesize` FROM ``posts_%s`` UNION ALL ", $_board['uri']);
}
$query = preg_replace('/UNION ALL $/', ') AS `posts_all`', $query);
$query = query($query) or error(db_error());
diff --git a/templates/themes/rrdtool/theme.php b/templates/themes/rrdtool/theme.php
index 0e0a2f15..a14169a3 100644
--- a/templates/themes/rrdtool/theme.php
+++ b/templates/themes/rrdtool/theme.php
@@ -61,7 +61,7 @@
// debug just the graphing (not updating) with the --debug switch
if (!isset($argv[1]) || $argv[1] != '--debug') {
// Update graph
- $query = query(sprintf("SELECT MAX(`id`) FROM `posts_%s`", $board));
+ $query = query(sprintf("SELECT MAX(`id`) FROM ``posts_%s``", $board));
$count = $query->fetchColumn();
if (!rrd_update($file, Array(
diff --git a/templates/themes/sitemap/theme.php b/templates/themes/sitemap/theme.php
index e210316b..226f8357 100644
--- a/templates/themes/sitemap/theme.php
+++ b/templates/themes/sitemap/theme.php
@@ -19,7 +19,7 @@
$threads = array();
foreach ($boards as $board) {
- $query = query(sprintf("SELECT `id` AS `thread_id`, (SELECT `time` FROM `posts_%s` WHERE `thread` = `thread_id` OR `id` = `thread_id` ORDER BY `time` DESC LIMIT 1) AS `lastmod` FROM `posts_%s` WHERE `thread` IS NULL", $board, $board)) or error(db_error());
+ $query = query(sprintf("SELECT `id` AS `thread_id`, (SELECT `time` FROM ``posts_%s`` WHERE `thread` = `thread_id` OR `id` = `thread_id` ORDER BY `time` DESC LIMIT 1) AS `lastmod` FROM ``posts_%s`` WHERE `thread` IS NULL", $board, $board)) or error(db_error());
$threads[$board] = $query->fetchAll(PDO::FETCH_ASSOC);
}