1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-27 17:00:52 +01:00

fileboard support

This commit is contained in:
Marcin Łabanowski 2015-04-22 05:54:48 +02:00
parent 4060bf10ed
commit 4014682882
33 changed files with 216 additions and 107 deletions

View File

@ -282,7 +282,8 @@
'file_url', 'file_url',
'json_response', 'json_response',
'user_flag', 'user_flag',
'no_country' 'no_country',
'tag'
); );
// Enable reCaptcha to make spam even harder. Rarely necessary. // Enable reCaptcha to make spam even harder. Rarely necessary.
@ -735,6 +736,11 @@
$config['allowed_ext'][] = 'png'; $config['allowed_ext'][] = 'png';
// $config['allowed_ext'][] = 'svg'; // $config['allowed_ext'][] = 'svg';
// Allowed extensions for OP. Inherits from the above setting if set to false. Otherwise, it overrides both allowed_ext and
// allowed_ext_files (filetypes for downloadable files should be set in allowed_ext_files as well). This setting is useful
// for creating fileboards.
$config['allowed_ext_op'] = false;
// Allowed additional file extensions (not images; downloadable files). // Allowed additional file extensions (not images; downloadable files).
// $config['allowed_ext_files'][] = 'txt'; // $config['allowed_ext_files'][] = 'txt';
// $config['allowed_ext_files'][] = 'zip'; // $config['allowed_ext_files'][] = 'zip';
@ -1518,6 +1524,13 @@
// Allow OP to remove arbitrary posts in his thread // Allow OP to remove arbitrary posts in his thread
$config['user_moderation'] = false; $config['user_moderation'] = false;
// File board. Like 4chan /f/
$config['file_board'] = false;
// Thread tags. Set to false to disable
// Example: array('A' => 'Chinese cartoons', 'M' => 'Music', 'P' => 'Pornography');
$config['allowed_tags'] = false;
/* /*
* ==================== * ====================
* Public post search * Public post search

View File

@ -453,7 +453,8 @@ class Thread {
event('show-thread', $this); event('show-thread', $this);
$built = Element('post_thread.html', array('config' => $config, 'board' => $board, 'post' => &$this, 'index' => $index, 'hasnoko50' => $hasnoko50, 'isnoko50' => $isnoko50, 'mod' => $this->mod)); $file = ($index && $config['file_board']) ? 'post_thread_fileboard.html' : 'post_thread.html';
$built = Element($file, array('config' => $config, 'board' => $board, 'post' => &$this, 'index' => $index, 'hasnoko50' => $hasnoko50, 'isnoko50' => $isnoko50, 'mod' => $this->mod));
return $built; return $built;
} }

View File

@ -1358,6 +1358,10 @@ function index($page, $mod=false) {
$body .= $thread->build(true); $body .= $thread->build(true);
} }
if ($config['file_board']) {
$body = Element('fileboard.html', array('body' => $body, 'mod' => $mod));
}
return array( return array(
'board' => $board, 'board' => $board,
'body' => $body, 'body' => $body,

View File

@ -312,7 +312,12 @@ if (isset($_POST['delete'])) {
$url_without_params = $post['file_url']; $url_without_params = $post['file_url'];
$post['extension'] = strtolower(mb_substr($url_without_params, mb_strrpos($url_without_params, '.') + 1)); $post['extension'] = strtolower(mb_substr($url_without_params, mb_strrpos($url_without_params, '.') + 1));
if (!in_array($post['extension'], $config['allowed_ext']) && !in_array($post['extension'], $config['allowed_ext_files']))
if ($post['op'] && $config['allowed_ext_op']) {
if (!in_array($post['extension'], $config['allowed_ext_op']))
error($config['error']['unknownext']);
}
else if (!in_array($post['extension'], $config['allowed_ext']) && !in_array($post['extension'], $config['allowed_ext_files']))
error($config['error']['unknownext']); error($config['error']['unknownext']);
$post['file_tmp'] = tempnam($config['tmp'], 'url'); $post['file_tmp'] = tempnam($config['tmp'], 'url');
@ -536,6 +541,10 @@ if (isset($_POST['delete'])) {
"\n<tinyboard flag alt>" . $flag_alt . "</tinyboard>"; "\n<tinyboard flag alt>" . $flag_alt . "</tinyboard>";
} }
if ($config['allowed_tags'] && $_POST['op'] && isset($_POST['tag']) && isset($config['allowed_tags'][$_POST['tag']])) {
$post['body'] .= "\n<tinyboard tag>" . $_POST['tag'] . "</tinyboard>";
}
if ($config['proxy_save'] && isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { if ($config['proxy_save'] && isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$proxy = preg_replace("/[^0-9a-fA-F.,: ]/", '', $_SERVER['HTTP_X_FORWARDED_FOR']); $proxy = preg_replace("/[^0-9a-fA-F.,: ]/", '', $_SERVER['HTTP_X_FORWARDED_FOR']);
$post['body'] .= "\n<tinyboard proxy>".$proxy."</tinyboard>"; $post['body'] .= "\n<tinyboard proxy>".$proxy."</tinyboard>";
@ -565,7 +574,11 @@ if (isset($_POST['delete'])) {
if ($post['has_file']) { if ($post['has_file']) {
$fnarray = array(); $fnarray = array();
foreach ($post['files'] as $key => &$file) { foreach ($post['files'] as $key => &$file) {
if (!in_array($file['extension'], $config['allowed_ext']) && !in_array($file['extension'], $config['allowed_ext_files'])) if ($post['op'] && $config['allowed_ext_op']) {
if (!in_array($file['extension'], $config['allowed_ext_op']))
error($config['error']['unknownext']);
}
elseif (!in_array($file['extension'], $config['allowed_ext']) && !in_array($file['extension'], $config['allowed_ext_files']))
error($config['error']['unknownext']); error($config['error']['unknownext']);
$file['is_an_image'] = !in_array($file['extension'], $config['allowed_ext_files']); $file['is_an_image'] = !in_array($file['extension'], $config['allowed_ext_files']);

View File

@ -36,7 +36,7 @@ div.banner {
font-weight: normal; font-weight: normal;
} }
p.intro span.name { .intro span.name {
font-family: serif; font-family: serif;
font-size: 12px; font-size: 12px;
} }

View File

@ -353,7 +353,7 @@ width: 100%;
#attention_bar:hover { #attention_bar:hover {
background-color: rgba(88, 53, 41, 0.3); background-color: rgba(88, 53, 41, 0.3);
} }
p.intro a.email span.name { .intro a.email span.name {
color: #8e6152; color: #8e6152;
} }
a.post_no:hover { a.post_no:hover {

View File

@ -55,11 +55,11 @@ form table tr th {
padding: 0px 5px; padding: 0px 5px;
} }
p.intro span.name { .intro span.name {
color: #C5C8C6; color: #C5C8C6;
} }
p.intro span.subject { .intro span.subject {
color: #CC1105; color: #CC1105;
font-weight: bold; font-weight: bold;
} }
@ -90,11 +90,11 @@ div.post.reply.highlighted {
background: #4A4C4F; background: #4A4C4F;
} }
p.intro a.email span.name { .intro a.email span.name {
color: rgb(129, 162, 190); color: rgb(129, 162, 190);
} }
p.intro a.email:hover span.name { .intro a.email:hover span.name {
color: rgb(95, 137, 172); color: rgb(95, 137, 172);
} }

View File

@ -23,7 +23,7 @@ div.title, h1 {
div.title p { div.title p {
font-size: 10px; font-size: 10px;
} }
a:link, a:visited, p.intro a.email span.name { a:link, a:visited, .intro a.email span.name {
color: #CCCCCC; color: #CCCCCC;
text-decoration: none; text-decoration: none;
font-family: sans-serif; font-family: sans-serif;
@ -61,21 +61,21 @@ div.post.reply div.body a:link, div.post.reply div.body a:visited {
div.post.reply div.body a:link:hover, div.post.reply div.body a:visited:hover { div.post.reply div.body a:link:hover, div.post.reply div.body a:visited:hover {
color: #32DD72; color: #32DD72;
} }
p.intro span.subject { .intro span.subject {
font-size: 12px; font-size: 12px;
font-family: sans-serif; font-family: sans-serif;
color: #446655; color: #446655;
font-weight: 800; font-weight: 800;
} }
p.intro span.name { .intro span.name {
color: #32DD72; color: #32DD72;
font-weight: 800; font-weight: 800;
} }
p.intro a.capcode, p.intro a.nametag { .intro a.capcode, p.intro a.nametag {
color: magenta; color: magenta;
margin-left: 0; margin-left: 0;
} }
p.intro a.email, p.intro a.email span.name, p.intro a.email:hover, p.intro a.email:hover span.name { .intro a.email, p.intro a.email span.name, p.intro a.email:hover, p.intro a.email:hover span.name {
color: #32ddaf; color: #32ddaf;
} }
input[type="text"], textarea, select { input[type="text"], textarea, select {

View File

@ -20,7 +20,7 @@ a, a:visited {
text-decoration: none; text-decoration: none;
color: #9999CC; color: #9999CC;
} }
a:hover, p.intro a.post_no:hover { a:hover, .intro a.post_no:hover {
color: #996699 color: #996699
} }
a.post_no { a.post_no {
@ -28,19 +28,19 @@ a.post_no {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
p.intro a.post_no { .intro a.post_no {
color: inherit; color: inherit;
} }
p.intro a.post_no, p.intro a.email { .intro a.post_no, p.intro a.email {
margin: 0; margin: 0;
} }
p.intro a.email span.name { .intro a.email span.name {
color: #666699; color: #666699;
} }
p.intro a.email:hover span.name { .intro a.email:hover span.name {
color: #663366; color: #663366;
} }
p.intro label { .intro label {
display: inline; display: inline;
} }
h2 { h2 {
@ -163,7 +163,7 @@ div.post.op {
div.post.op hr { div.post.op hr {
border-color: #000000; border-color: #000000;
} }
p.intro { .intro {
margin: 0.5em 0; margin: 0.5em 0;
padding: 0; padding: 0;
padding-bottom: 0.2em; padding-bottom: 0.2em;
@ -172,19 +172,19 @@ input.delete {
float: left; float: left;
margin: 1px 6px 0 0; margin: 1px 6px 0 0;
} }
p.intro span.subject { .intro span.subject {
color: #336699; color: #336699;
font-weight: bold; font-weight: bold;
} }
p.intro span.name { .intro span.name {
color: #336600; color: #336600;
font-weight: bold; font-weight: bold;
} }
p.intro span.capcode, p.intro a.capcode, p.intro a.nametag { .intro span.capcode, p.intro a.capcode, p.intro a.nametag {
color: #CC0000; color: #CC0000;
margin-left: 0; margin-left: 0;
} }
p.intro a { .intro a {
margin-left: 8px; margin-left: 8px;
} }
div.delete { div.delete {
@ -456,7 +456,7 @@ table.mod.config-editor input[type="text"] {
background-color: #333333; background-color: #333333;
opacity: 0.8; opacity: 0.8;
} }
p.intro.thread-hidden { .intro.thread-hidden {
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
} }

View File

@ -46,7 +46,7 @@ form table tr th {
color: #FFF; color: #FFF;
} }
p.intro span.name { .intro span.name {
font-family: serif; font-family: serif;
} }
@ -81,7 +81,7 @@ div[id^="thread_"].highlighted {
background: #B5FFDD; background: #B5FFDD;
} }
p.intro a.email span.name { .intro a.email span.name {
color: #345456; color: #345456;
} }

View File

@ -16,7 +16,7 @@ div.title, h1 {
div.title p { div.title p {
font-size: 13px; font-size: 13px;
} }
a:link, a:visited, p.intro a.email span.name { a:link, a:visited, .intro a.email span.name {
color: #16C816; color: #16C816;
text-decoration: underline; text-decoration: underline;
font-family: monospace; font-family: monospace;
@ -51,21 +51,21 @@ div.post.reply div.body a:link, div.post.reply div.body a:visited {
div.post.reply div.body a:link:hover, div.post.reply div.body a:visited:hover { div.post.reply div.body a:link:hover, div.post.reply div.body a:visited:hover {
color: #00FF00; color: #00FF00;
} }
p.intro span.subject { .intro span.subject {
font-size: 12px; font-size: 12px;
font-family: monospace; font-family: monospace;
color: #446655; color: #446655;
font-weight: 800; font-weight: 800;
} }
p.intro span.name { .intro span.name {
color: #008200; color: #008200;
font-weight: 900; font-weight: 900;
} }
p.intro a.capcode, p.intro a.nametag { .intro a.capcode, p.intro a.nametag {
color: magenta; color: magenta;
margin-left: 0; margin-left: 0;
} }
p.intro a.email, p.intro a.email span.name, p.intro a.email:hover, p.intro a.email:hover span.name { .intro a.email, p.intro a.email span.name, p.intro a.email:hover, p.intro a.email:hover span.name {
color: #00CC64; color: #00CC64;
font-family: monospace; font-family: monospace;
} }

View File

@ -15,7 +15,7 @@ div.title p {
div.pages { div.pages {
font-size: 13px !important; font-size: 13px !important;
} }
a:link, a:visited, p.intro a.email span.name { a:link, a:visited, .intro a.email span.name {
color: #0000ff; color: #0000ff;
font-size: inherit; font-size: inherit;
text-decoration: inherit; text-decoration: inherit;
@ -41,7 +41,7 @@ div.post.reply.highlighted {
div.post.reply div.body a { div.post.reply div.body a {
color: navy; color: navy;
} }
p.intro span.subject { .intro span.subject {
color: #d00; color: #d00;
} }
form table tr th { form table tr th {

View File

@ -15,7 +15,7 @@ div.title p {
div.pages { div.pages {
font-size: 13px !important; font-size: 13px !important;
} }
a:link, a:visited, p.intro a.email span.name { a:link, a:visited, .intro a.email span.name {
color: #A32615; color: #A32615;
font-size: inherit; font-size: inherit;
text-decoration: inherit; text-decoration: inherit;
@ -42,7 +42,7 @@ div.post.reply.highlighted {
div.post.reply div.body a { div.post.reply div.body a {
color: rgb(190, 79, 43); color: rgb(190, 79, 43);
} }
p.intro span.subject { .intro span.subject {
color: #AA4848; color: #AA4848;
} }
form table tr th { form table tr th {

View File

@ -10,7 +10,7 @@ div.title h1 {
div.title p { div.title p {
font-size: 10px; font-size: 10px;
} }
a:link, a:visited, p.intro a.email span.name { a:link, a:visited, .intro a.email span.name {
color: #0000ff; color: #0000ff;
} }
a:link:hover { a:link:hover {
@ -30,7 +30,7 @@ div.post.reply.highlighted {
div.post.reply div.body a { div.post.reply div.body a {
color: navy; color: navy;
} }
p.intro span.subject { .intro span.subject {
color: #d00; color: #d00;
} }
form table tr th { form table tr th {

View File

@ -2,7 +2,7 @@ body {
background: #0E0E0E url(data:image/gif;base64,R0lGODlhGAAMAKEEAOXl5ebm5vDw8PHx8SH+EUNyZWF0ZWQgd2l0aCBHSU1QACwAAAAAGAAMAAACRpQiY6cLa146MyY1EJQKjG81lNGRUPOIkgMJHtquBgIO7xwvpbrpduUSuXq8ntEC0bBEylYitdDAdM1ViaobkgKgZwyDLAAAOw==) repeat 0 0!important; background: #0E0E0E url(data:image/gif;base64,R0lGODlhGAAMAKEEAOXl5ebm5vDw8PHx8SH+EUNyZWF0ZWQgd2l0aCBHSU1QACwAAAAAGAAMAAACRpQiY6cLa146MyY1EJQKjG81lNGRUPOIkgMJHtquBgIO7xwvpbrpduUSuXq8ntEC0bBEylYitdDAdM1ViaobkgKgZwyDLAAAOw==) repeat 0 0!important;
color: #000; color: #000;
} }
a:link, a:visited, p.intro a.email span.name { a:link, a:visited, .intro a.email span.name {
-webkit-transition: all ease-in 0.3s; -webkit-transition: all ease-in 0.3s;
-moz-transition: all ease-in 0.3s; -moz-transition: all ease-in 0.3s;
color: rgba(0, 0, 0, 0.6); color: rgba(0, 0, 0, 0.6);
@ -33,7 +33,7 @@ div.post.reply.highlighted {
div.post.reply p.body a { div.post.reply p.body a {
color: navy; color: navy;
} }
p.intro span.subject { .intro span.subject {
color: #000; color: #000;
} }
form table tr th { form table tr th {

View File

@ -66,7 +66,7 @@ box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.35);
div.post.reply div.body a { div.post.reply div.body a {
color: #00E; color: #00E;
} }
p.intro span.subject { .intro span.subject {
color: #d00; color: #d00;
} }
form table tr th { form table tr th {
@ -118,7 +118,7 @@ table.modlog tr th {
background: #EA8; background: #EA8;
} }
p.intro span.name { .intro span.name {
color: maroon; color: maroon;
font-weight: 600; font-weight: 600;
} }

View File

@ -22,7 +22,7 @@ a, a:selected {
text-decoration: bold; text-decoration: bold;
color: #ffffff; color: #ffffff;
} }
a:hover, p.intro a.post_no:hover { a:hover, .intro a.post_no:hover {
color: #ffffff; color: #ffffff;
} }
a.post_no { a.post_no {
@ -30,19 +30,19 @@ a.post_no {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
p.intro a.post_no { .intro a.post_no {
color: inherit; color: inherit;
} }
p.intro a.post_no, p.intro a.email { .intro a.post_no, p.intro a.email {
margin: 0; margin: 0;
} }
p.intro a.email span.name { .intro a.email span.name {
color: #0091ff; color: #0091ff;
} }
p.intro a.email:hover span.name { .intro a.email:hover span.name {
color: #ffffff; color: #ffffff;
} }
p.intro label { .intro label {
display: inline; display: inline;
} }
h2 { h2 {
@ -165,7 +165,7 @@ div.post.op {
div.post.op hr { div.post.op hr {
border-color: #040934; border-color: #040934;
} }
p.intro { .intro {
margin: 0.5em 0; margin: 0.5em 0;
padding: 0; padding: 0;
padding-bottom: 0.2em; padding-bottom: 0.2em;
@ -174,19 +174,19 @@ input.delete {
float: left; float: left;
margin: 1px 6px 0 0; margin: 1px 6px 0 0;
} }
p.intro span.subject { .intro span.subject {
color: #CCCCEE; color: #CCCCEE;
font-weight: bold; font-weight: bold;
} }
p.intro span.name { .intro span.name {
color: #BBBBDD; color: #BBBBDD;
font-weight: bold; font-weight: bold;
} }
p.intro span.capcode, p.intro a.capcode, p.intro a.nametag { .intro span.capcode, p.intro a.capcode, p.intro a.nametag {
color: #CCCCEE; color: #CCCCEE;
margin-left: 0; margin-left: 0;
} }
p.intro a { .intro a {
margin-left: 8px; margin-left: 8px;
} }
div.delete { div.delete {

View File

@ -19,11 +19,11 @@ a.post_no {
color: #000033; color: #000033;
} }
p.intro a.email span.name { .intro a.email span.name {
color: #0093AB; color: #0093AB;
} }
p.intro a.email:hover span.name { .intro a.email:hover span.name {
color: #DD0000; color: #DD0000;
} }
@ -43,12 +43,12 @@ div.post.op hr {
border-color: #B7C9D5; border-color: #B7C9D5;
} }
p.intro span.subject { .intro span.subject {
color: #117743; color: #117743;
font-weight: 800; font-weight: 800;
} }
p.intro span.name { .intro span.name {
color: #117743; color: #117743;
font-weight: 800; font-weight: 800;
} }

View File

@ -52,7 +52,7 @@ input[type="text"], input[type="password"], textarea, input[type="submit"], inpu
border: 1px solid #202020; border: 1px solid #202020;
} }
p.intro span.name { .intro span.name {
font-size: 11pt; font-size: 11pt;
color: #505050; color: #505050;
font-weight: bold; font-weight: bold;
@ -88,16 +88,16 @@ div.post.reply.highlighted {
background: #111111; background: #111111;
} }
p.intro a.email span.name { .intro a.email span.name {
color: #FFFFFF; color: #FFFFFF;
} }
p.intro a.email:hover span.name { .intro a.email:hover span.name {
color: #A0A0A0; color: #A0A0A0;
text-decoration: underline; text-decoration: underline;
} }
p.intro span.subject { .intro span.subject {
color: #606060; color: #606060;
} }

View File

@ -20,11 +20,11 @@ a.post_no {
color: #000033; color: #000033;
} }
p.intro a.email span.name { .intro a.email span.name {
color: #608673; color: #608673;
} }
p.intro a.email:hover span.name { .intro a.email:hover span.name {
color: #DD0000; color: #DD0000;
} }
@ -44,12 +44,12 @@ div.post.op hr {
border-color: #608673; border-color: #608673;
} }
p.intro span.subject { .intro span.subject {
color: #8a2e2e; color: #8a2e2e;
font-weight: 800; font-weight: 800;
} }
p.intro span.name { .intro span.name {
color: #117743; color: #117743;
font-weight: 800; font-weight: 800;
} }

View File

@ -65,7 +65,7 @@ form[name="postcontrols"] {
margin: 20px auto; margin: 20px auto;
} }
p.intro span.name { .intro span.name {
color: #800000; color: #800000;
font-weight: 800; font-weight: 800;
} }
@ -104,11 +104,11 @@ div.post.reply.highlighted {
background-image: url('img/jungle_td_dark.png');; background-image: url('img/jungle_td_dark.png');;
} }
p.intro a.email span.name { .intro a.email span.name {
color: #0000EE; color: #0000EE;
} }
p.intro a.email:hover span.name { .intro a.email:hover span.name {
color: #00990B; color: #00990B;
} }

View File

@ -41,7 +41,7 @@ a.email span.name {
color: #5A8C99 !important; color: #5A8C99 !important;
} }
p.intro span.capcode, p.intro a.capcode, p.intro a.nametag { .intro span.capcode, p.intro a.capcode, p.intro a.nametag {
color: #6E0877; color: #6E0877;
} }
@ -157,7 +157,7 @@ div.banner, .replymode, .catalogmode {
font-weight:800; font-weight:800;
} }
p.intro span.subject { .intro span.subject {
color: #4D2C80; color: #4D2C80;
font-weight: bold; font-weight: bold;
} }

View File

@ -190,7 +190,7 @@ blockquote {
.de-refmap { .de-refmap {
color: #4C505E !important; color: #4C505E !important;
} }
p.intro a.email span.name { .intro a.email span.name {
text-decoration: underline; text-decoration: underline;
} }
.quote { .quote {

View File

@ -13,7 +13,7 @@ a,a:visited {
color: #34345C; color: #34345C;
} }
a:hover,p.intro a.post_no:hover { a:hover,.intro a.post_no:hover {
color: #ff0000; color: #ff0000;
} }
@ -23,27 +23,27 @@ a.post_no {
padding: 0; padding: 0;
} }
p.intro a.post_no { .intro a.post_no {
color: inherit; color: inherit;
} }
p.intro a.post_no,p.intro a.email,p.intro a.post_anchor { .intro a.post_no,p.intro a.email,p.intro a.post_anchor {
margin: 0; margin: 0;
} }
p.intro a.email span.name { .intro a.email span.name {
color: #34345C; color: #34345C;
} }
p.intro a.email:hover span.name { .intro a.email:hover span.name {
color: #ff0000; color: #ff0000;
} }
p.intro label { .intro label {
display: inline; display: inline;
} }
p.intro time,p.intro a.ip-link,p.intro a.capcode { .intro time,p.intro a.ip-link,p.intro a.capcode {
direction: ltr; direction: ltr;
unicode-bidi: embed; unicode-bidi: embed;
} }
@ -219,7 +219,7 @@ div.post.op hr {
border-color: #D9BFB7; border-color: #D9BFB7;
} }
p.intro { .intro {
margin: 0.5em 0; margin: 0.5em 0;
padding: 0; padding: 0;
padding-bottom: 0.2em; padding-bottom: 0.2em;
@ -230,22 +230,22 @@ input.delete {
margin: 1px 6px 0 0; margin: 1px 6px 0 0;
} }
p.intro span.subject { .intro span.subject {
color: #0F0C5D; color: #0F0C5D;
font-weight: bold; font-weight: bold;
} }
p.intro span.name { .intro span.name {
color: #117743; color: #117743;
font-weight: bold; font-weight: bold;
} }
p.intro span.capcode,p.intro a.capcode,p.intro a.nametag { .intro span.capcode,p.intro a.capcode,p.intro a.nametag {
color: #F00000; color: #F00000;
margin-left: 0; margin-left: 0;
} }
p.intro a { .intro a {
margin-left: 8px; margin-left: 8px;
} }
@ -604,7 +604,7 @@ table.mod.config-editor input[type="text"] {
background-color: rgba(100%,100%,100%,0.2); background-color: rgba(100%,100%,100%,0.2);
} }
p.intro.thread-hidden { .intro.thread-hidden {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
@ -931,7 +931,7 @@ span.pln {
@media screen and (min-width: 768px) { @media screen and (min-width: 768px) {
p.intro { .intro {
clear: none; clear: none;
} }
@ -1051,3 +1051,12 @@ span.pln {
margin-left: 10px; margin-left: 10px;
margin-right: 10px; margin-right: 10px;
} }
/* Fileboard */
table.fileboard th, table.fileboard td {
padding: 2px;
text-align: center;
}
table.fileboard .intro a {
margin-left: 0px;
}

View File

@ -20,7 +20,7 @@ background-repeat: repeat;
background-color: #200000; background-color: #200000;
} }
p.intro span.capcode, p.intro a.capcode, p.intro a.nametag { .intro span.capcode, p.intro a.capcode, p.intro a.nametag {
color: #26899C; color: #26899C;
} }
@ -154,7 +154,7 @@ div.banner, .replymode, .catalogmode {
font-weight:800; font-weight:800;
} }
p.intro span.subject { .intro span.subject {
color: #771018; color: #771018;
font-weight: bold; font-weight: bold;
} }

View File

@ -16,7 +16,7 @@ div.title, h1 {
div.title p { div.title p {
font-size: 10px; font-size: 10px;
} }
a:link, a:visited, p.intro a.email span.name { a:link, a:visited, .intro a.email span.name {
color: #00FF00; color: #00FF00;
text-decoration: underline; text-decoration: underline;
font-family: sans-serif; font-family: sans-serif;
@ -50,21 +50,21 @@ div.post.reply div.body a:link, div.post.reply div.body a:visited {
div.post.reply div.body a:link:hover, div.post.reply div.body a:visited:hover { div.post.reply div.body a:link:hover, div.post.reply div.body a:visited:hover {
color: #00FF00; color: #00FF00;
} }
p.intro span.subject { .intro span.subject {
font-size: 12px; font-size: 12px;
font-family: sans-serif; font-family: sans-serif;
color: #446655; color: #446655;
font-weight: 800; font-weight: 800;
} }
p.intro span.name { .intro span.name {
color: #00FF00; color: #00FF00;
font-weight: 800; font-weight: 800;
} }
p.intro a.capcode, p.intro a.nametag { .intro a.capcode, p.intro a.nametag {
color: #00FF00; color: #00FF00;
margin-left: 0; margin-left: 0;
} }
p.intro a.email, p.intro a.email span.name, p.intro a.email:hover, p.intro a.email:hover span.name { .intro a.email, p.intro a.email span.name, p.intro a.email:hover, p.intro a.email:hover span.name {
color: #00FF00; color: #00FF00;
} }
input[type="text"], textarea, select { input[type="text"], textarea, select {

View File

@ -202,7 +202,7 @@ div.boardlist.bottom {
background-color: rgba(0%, 0%, 0%, 0.45); background-color: rgba(0%, 0%, 0%, 0.45);
} }
p.intro span.subject { .intro span.subject {
color:#ee8100; color:#ee8100;
} }

View File

@ -136,7 +136,7 @@ form table tr th{
background: #fec !important; background: #fec !important;
} }
p.intro.thread-hidden{ .intro.thread-hidden{
padding-bottom: 1em !important; padding-bottom: 1em !important;
} }

View File

@ -27,16 +27,16 @@ a.post_no {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
p.intro a.post_no, p.intro a.email { .intro a.post_no, p.intro a.email {
margin: 0; margin: 0;
} }
p.intro a.email span.name { .intro a.email span.name {
color: #34345C; color: #34345C;
} }
p.intro a.email:hover span.name { .intro a.email:hover span.name {
color: #ff0000; color: #ff0000;
} }
p.intro label { .intro label {
display: inline; display: inline;
} }
h2 { h2 {
@ -155,7 +155,7 @@ div.post.op {
div.post.op hr { div.post.op hr {
border-color: #D9BFB7; border-color: #D9BFB7;
} }
p.intro { .intro {
margin: 0.5em 0; margin: 0.5em 0;
padding: 0; padding: 0;
padding-bottom: 0.2em; padding-bottom: 0.2em;
@ -164,19 +164,19 @@ input.delete {
float: left; float: left;
margin: 1px 6px 0 0; margin: 1px 6px 0 0;
} }
p.intro span.subject { .intro span.subject {
color: #0F0C5D; color: #0F0C5D;
font-weight: bold; font-weight: bold;
} }
p.intro span.name { .intro span.name {
color: #117743; color: #117743;
font-weight: bold; font-weight: bold;
} }
p.intro a.capcode, p.intro a.nametag { .intro a.capcode, p.intro a.nametag {
color: #F00000; color: #F00000;
margin-left: 0; margin-left: 0;
} }
p.intro a { .intro a {
margin-left: 8px; margin-left: 8px;
} }
div.delete { div.delete {

View File

@ -2,7 +2,7 @@ body {
background: #ffe url('img/fade-yotsuba.png') repeat-x 50% 0%; background: #ffe url('img/fade-yotsuba.png') repeat-x 50% 0%;
color: #800000; color: #800000;
} }
a:link, a:visited, p.intro a.email span.name { a:link, a:visited, .intro a.email span.name {
color: #0000ff; color: #0000ff;
} }
a:link:hover { a:link:hover {
@ -22,7 +22,7 @@ div.post.reply.highlighted {
div.post.reply div.body a { div.post.reply div.body a {
color: navy; color: navy;
} }
p.intro span.subject { .intro span.subject {
color: #d00; color: #d00;
} }
form table tr th { form table tr th {

15
templates/fileboard.html Normal file
View File

@ -0,0 +1,15 @@
<table class='fileboard'>
<tr>
<th>&nbsp; <!-- checkbox -->
<th>{% trans %}No.{% endtrans %}
<th>{% trans %}Name{% endtrans %}
<th>{% trans %}File{% endtrans %}
<th>{% trans %}Tag{% endtrans %}
<th>{% trans %}Subject{% endtrans %}
<th>{% trans %}Size{% endtrans %}
<th>{% trans %}Date{% endtrans %}
<th>{% trans %}Replies{% endtrans %}
<th>&nbsp; <!-- reply -->
</tr>
{{ body }}
</table>

View File

@ -92,6 +92,18 @@
</td> </td>
</tr> </tr>
{% endif %} {% endif %}
{% if config.allowed_tags and not id %}
<tr>
<th>{% trans %}Tag{% endtrans %}</th>
<td>
<select name="tag">
{% for id, tag in config.allowed_tags %}
<option value="{{ id }}">{{ tag }}</option>
{% endfor %}
</select>
</td>
</tr>
{% endif %}
<tr id="upload"> <tr id="upload">
<th> <th>
{% trans %}File{% endtrans %} {% trans %}File{% endtrans %}

View File

@ -0,0 +1,42 @@
{% filter remove_whitespace %}
{# tabs and new lines will be ignored #}
{# we are intentionally breaking the thread_ID convention: the jses need to handle this case differently #}
<tr id="filethread_{{ post.id }}" class="intro" data-board="{{ board.uri }}">
<td><input type="checkbox" class="delete" name="delete_{{ post.id }}" id="delete_{{ post.id }}" />
<td><a class="post_no" onclick="citeReply({{ post.id }})" href="{{ post.link('q') }}">{{ post.id }}</a>
<td>{% include 'post/name.html' %}
{% include 'post/flag.html' %}
<td>[<a href="{{ config.uri_img }}{{ post.files[0].file }}">{{ post.files[0].filename|e|bidi_cleanup }}</a>]
<td>{% if post.modifiers['tag'] %}[{{ post.modifiers['tag'] }}]{% endif %}
<td>{% include 'post/subject.html' %}
{% if post.sticky %}
{% if config.font_awesome %}
<i class="fa fa-thumb-tack"></i>
{% else %}
<img class="icon" title="Sticky" src="{{ config.image_sticky }}" alt="Sticky" />
{% endif %}
{% endif %}
{% if post.locked %}
{% if config.font_awesome %}
<i class="fa fa-lock"></i>
{% else %}
<img class="icon" title="Locked" src="{{ config.image_locked }}" alt="Locked" />
{% endif %}
{% endif %}
{% if post.bumplocked and (config.mod.view_bumplock < 0 or (post.mod and post.mod|hasPermission(config.mod.view_bumplock, board.uri))) %}
{% if config.font_awesome %}
<i class="fa fa-anchor"></i>
{% else %}
<img class="icon" title="Bumplocked" src="{{ config.image_bumplocked }}" alt="Bumplocked" />
{% endif %}
{% endif %}
<td>{{ post.files[0].size|filesize }}
<td>{% include 'post/time.html' %}
<td>{{ post.omitted }}
<td>{% include 'post/post_controls.html' %}
<a href="{{ post.root }}{{ board.dir }}{{ config.dir.res }}{{ link_for(post) }}">[{% trans %}Reply{% endtrans %}]</a>
</tr>
{% endfilter %}