mirror of
https://github.com/ithrts/ImoutoIB.git
synced 2025-04-22 15:12:22 +02:00
mod post in locked + toggleable download button
toggleable download button next to files with option for unix or original filename posting in locked threads for mods+ borrowing a theme to experiment with different text board layouts later when i make more changes to textboards (some things are a bit off still).
This commit is contained in:
parent
fc923d9e1f
commit
ad5d92173a
218
assets/css/Kadena.css
Normal file
218
assets/css/Kadena.css
Normal file
@ -0,0 +1,218 @@
|
||||
@font-face {
|
||||
font-family: 'submona';
|
||||
src: url('fonts/submona.woff') format('woff');
|
||||
}
|
||||
|
||||
/* "borrowed" from kadenamoe to see how it may look with a more modern style */
|
||||
|
||||
html[data-stylesheet="Kadena"] body {
|
||||
background: url('img/kadena-background.jpg');
|
||||
background-color: #484476;
|
||||
font-size: 12pt;
|
||||
color: #fff;
|
||||
background-repeat: no-repeat;
|
||||
background-attachment: fixed;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] div#boardlist {
|
||||
background: #d33682;
|
||||
padding: 6px 0 4px 10px;
|
||||
margin: -10px -8px 10px -8px;
|
||||
font-weight: 700;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] .spoiler {
|
||||
background: #fff;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] .spoiler:hover {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] div#boardlist a, html[data-stylesheet="Kadena"] a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] div.file-info a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] div.file-info.deleted {
|
||||
display: block;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] div#boardlist a:hover, html[data-stylesheet="Kadena"] a:hover, html[data-stylesheet="Kadena"] div.file-info a:hover {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] .link.name {
|
||||
color: #2e2eff;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] .post-number {
|
||||
float:right;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] hr {
|
||||
border-top: 2px solid #000;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] div.container {
|
||||
background: #222;
|
||||
padding: 8px;
|
||||
border: none;
|
||||
max-width: 95%;
|
||||
border-radius: 8px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] div.post.reply {
|
||||
background: #333;
|
||||
border: 1px solid #616161;
|
||||
width: 96%;
|
||||
margin: -1px auto -1px auto;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] .post-arrows {
|
||||
display:none;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] .page-info, html[data-stylesheet="Kadena"] .post-number a {
|
||||
color: #d33682;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] .page-info h1 {
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] .subject {
|
||||
color: red;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] .code {
|
||||
background: #333;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] div#post-form {
|
||||
background: #222;
|
||||
border: none;
|
||||
color: #fff;
|
||||
width: 80%;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] div#post-form form {
|
||||
width: 80%;
|
||||
padding: 20px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] div#post-form form tr td textarea {
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] div#post-form form tr th {
|
||||
background: none;
|
||||
border: none;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] input[type="text"], html[data-stylesheet="Kadena"] input[type="password"], html[data-stylesheet="Kadena"] textarea {
|
||||
background: #333;
|
||||
color: #fff;
|
||||
border: 1px solid #616161;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] input[type="text"]:focus, html[data-stylesheet="Kadena"] input[type="password"]:focus, html[data-stylesheet="Kadena"] textarea:focus {
|
||||
border-color: #d33682;
|
||||
box-shadow: inset 0 1px 1px #333,0 0 8px #d33682;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] input[type="submit"], html[data-stylesheet="Kadena"] button[type="submit"] {
|
||||
cursor: pointer;
|
||||
background-color: #d33682;
|
||||
border-color: #d33682;
|
||||
color: #fff;
|
||||
padding: 8px;
|
||||
border-radius: 6px;
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
letter-spacing: 1px;
|
||||
vertical-align: ;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] input[type="submit"]:hover, html[data-stylesheet="Kadena"] button[type="submit"]:hover {
|
||||
cursor: pointer;
|
||||
background-color: #5a6268;
|
||||
border-color: #545b62;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] .pager form {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] div.main {
|
||||
border: 3px solid #aaa;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] div.main, html[data-stylesheet="Kadena"] div.main h2 {
|
||||
background: #222;
|
||||
border: 3px solid #222;
|
||||
border-radius: 6px;
|
||||
border-bottom: 1px solid #00000020 !important;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] .static.footer li:first-child {
|
||||
border-left: 3px solid #222;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] .static.footer li {
|
||||
background: #222;
|
||||
border-bottom: 3px solid #222;
|
||||
border-right: 3px solid #222;
|
||||
border-radius: 6px;
|
||||
margin: 0 -8px;
|
||||
padding: 4px 20px;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] div.postingmode {
|
||||
background: none;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] div.post details table {
|
||||
background: #222;
|
||||
border: 1px solid #222;
|
||||
box-shadow: 0px 0px 20px 5px #000;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] .pager {
|
||||
background: #222;
|
||||
border: 3px solid #222;
|
||||
border-radius: 8px;
|
||||
padding: 12px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] .box.left, html[data-stylesheet="Kadena"] .box.right {
|
||||
background: #222;
|
||||
color: #fff;
|
||||
border: 3px solid #222;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] .box {
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
html[data-stylesheet="Kadena"] .box h2 {
|
||||
background: #222;
|
||||
color: #fff;
|
||||
border-bottom: 1px solid #00000020 !important;
|
||||
}
|
||||
|
@ -90,6 +90,10 @@ a:hover, .post-number a:hover {
|
||||
color: #d00;
|
||||
}
|
||||
|
||||
a.download, a.download:visited {
|
||||
text-decoration: none!important;
|
||||
}
|
||||
|
||||
div.file-info a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
BIN
assets/css/img/kadena-background.jpg
Normal file
BIN
assets/css/img/kadena-background.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 211 KiB |
@ -35,6 +35,7 @@ $threads_page = 10; //how many threads per page
|
||||
|
||||
$max_filesize = 1024*1000*8; //default 8mb
|
||||
$max_filename = 28; //longer than this will be trimmed visually, absolute max is set to 512 at which point it is trimmed when saved as well. you can see untrimmed below 512 by hovering over name
|
||||
$file_download = 'original'; //Button next to file link. false = disable, 'original' = uploaded filename, 'server' = server filename.
|
||||
|
||||
$thumb_method = 'GD'; //i probably wont implement any others
|
||||
$thumb_ext = '.jpg'; //add support for transparent png, would use webp if apple stops shilling HEIC already and enables webp+webm support
|
||||
@ -108,10 +109,12 @@ $config['css'][] = 'Kind';
|
||||
//text styles
|
||||
$config['css'][] = 'Kareha';
|
||||
$config['css'][] = 'Sankarea';
|
||||
$config['css'][] = 'Kadena';
|
||||
|
||||
//selectable styles on text boards, you may add IB styles if you want?
|
||||
$config['css_text'][] = 'Kareha';
|
||||
$config['css_text'][] = 'Sankarea';
|
||||
$config['css_text'][] = 'Kadena';
|
||||
|
||||
|
||||
$default_theme = 'Yotsuba';
|
||||
@ -144,7 +147,7 @@ $config['mod']['thread_lock'] = "40";
|
||||
$config['mod']['thread_autosage'] = "40";
|
||||
$config['mod']['post_edit'] = "40"; //not coded yet
|
||||
$config['mod']['post_delete'] = "10";
|
||||
$config['mod']['post_in_locked'] = "40"; //not coded yet
|
||||
$config['mod']['post_in_locked'] = "40";
|
||||
$config['mod']['public_mod_level'] = "40"; //type "showlevel" or click show level button to show moderator level to make statments etc.
|
||||
$config['mod']['edit_user'] = "9001"; //create,edit,delete
|
||||
$config['mod']['mod_log'] = "40"; //look at modlog, not coded yet.
|
||||
|
2
post.php
2
post.php
@ -90,7 +90,7 @@ if (($config['mod']['thread_autosage'] <= $mod_level) && isset($_POST['autosage'
|
||||
if (isset($_POST['thread'])) {
|
||||
//get thread info
|
||||
include ($path . '/' . $database_folder . '/boards/' . $post_board . '/' . phpClean($_POST['thread_number']) . "/info.php");
|
||||
if ($info_locked == 1) {
|
||||
if (($info_locked == 1) && ($config['mod']['post_in_locked'] > $mod_level)) {
|
||||
error('This thread is locked...');
|
||||
}
|
||||
if(!isset($_FILES['file']) || $_FILES['file']['error'] == UPLOAD_ERR_NO_FILE) {
|
||||
|
@ -15,7 +15,7 @@
|
||||
if ($forced_anon !== true) {
|
||||
echo '<tr>';
|
||||
echo '<th>Name</th>';
|
||||
if ($info_locked == 1) {
|
||||
if ($info_locked == 1 && $config['mod']['post_in_locked'] > $mod_level) {
|
||||
echo '<td><input type="text" name="name" size="25" maxlength="256" autocomplete="off" placeholder="' . $default_name . '" disabled=""></td>';
|
||||
} else {
|
||||
echo '<td><input type="text" name="name" size="25" maxlength="256" autocomplete="off" placeholder="' . $default_name . '"></td>';
|
||||
@ -27,7 +27,7 @@
|
||||
if ($disable_email !== true) {
|
||||
echo '<tr>';
|
||||
echo '<th>Email</th>';
|
||||
if ($info_locked == 1) {
|
||||
if ($info_locked == 1 && $config['mod']['post_in_locked'] > $mod_level) {
|
||||
echo '<td><input type="text" name="link" size="25" maxlength="256" autocomplete="off" disabled></td>';
|
||||
} else {
|
||||
echo '<td><input type="text" name="link" size="25" maxlength="256" autocomplete="off"></td>';
|
||||
@ -40,8 +40,10 @@
|
||||
<?php
|
||||
echo '<tr>';
|
||||
echo '<th>Subject</th>';
|
||||
if ($info_locked == 1) {
|
||||
if ($info_locked == 1 && $config['mod']['post_in_locked'] > $mod_level) {
|
||||
echo '<td><input type="text" name="subject" size="25" maxlength="256" autocomplete="off" disabled> <input type="submit" name="post" value="Locked" disabled></td>';
|
||||
} elseif ($info_locked == 1 && $config['mod']['post_in_locked'] <= $mod_level) {
|
||||
echo '<td><input type="text" name="subject" size="25" maxlength="256" autocomplete="off"> <input type="submit" name="post" value="Locked"></td>';
|
||||
} else {
|
||||
echo '<td><input type="text" name="subject" size="25" maxlength="256" autocomplete="off"> ';
|
||||
if ($current_page == 'index' || $current_page == 'catalog') {
|
||||
@ -57,14 +59,14 @@
|
||||
<?php
|
||||
echo '<tr>';
|
||||
echo '<th>Comment</th>';
|
||||
if ($info_locked == 1) {
|
||||
if ($info_locked == 1 && $config['mod']['post_in_locked'] > $mod_level) {
|
||||
echo '<td><textarea name="body" id="body" rows="5" cols="30" disabled></textarea></td>';
|
||||
} else {
|
||||
echo '<td><textarea name="body" id="body" rows="5" cols="30"></textarea></td>';
|
||||
}
|
||||
echo '</tr>';
|
||||
?>
|
||||
<?php if ($captcha_required == (true) && ($current_page == ('thread') && ($info_locked != 1) || $current_page == ('index') || $current_page == ('catalog'))) {
|
||||
<?php if ($captcha_required == (true) && ($current_page == ('thread') && ($info_locked != 1 || $config['mod']['post_in_locked'] <= $mod_level) || $current_page == ('index') || $current_page == ('catalog'))) {
|
||||
echo '<tr><th>Verification</th><td><img height="50" width="198" id="captcha" src="' . $prefix_folder . '/captcha.php' .'"/><br><input id="captcha-field" type="text" name="captcha" minlength="6" maxlength="6" autocomplete="off" required></td>
|
||||
';
|
||||
}?>
|
||||
@ -73,7 +75,7 @@
|
||||
if ($allow_files == true) {
|
||||
echo '<tr>';
|
||||
echo '<th>File</th>';
|
||||
if ($info_locked == 1) {
|
||||
if ($info_locked == 1 && $config['mod']['post_in_locked'] > $mod_level) {
|
||||
echo '<td><input type="file" name="file" id="upload" disabled></td>';
|
||||
} else {
|
||||
echo '<td><input type="file" name="file" id="upload"></td>';
|
||||
|
@ -103,6 +103,20 @@
|
||||
echo $reply_file[0][1];
|
||||
echo '</a>';
|
||||
}
|
||||
|
||||
if (isset($file_download)) {
|
||||
switch($file_download) {
|
||||
case 'original':
|
||||
echo ' <a title="Download as ' . $reply_file[0][2] . '" class="download" href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][1] . '" download="' . $reply_file[0][2] . '">🠋</a>';
|
||||
break;
|
||||
case 'server':
|
||||
echo ' <a title="Download as ' . $reply_file[0][1] . '" class="download" href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][1] . '" download="' . $reply_file[0][1] . '">🠋</a>';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($reply_file[0][0] == 'image') {
|
||||
echo ' (' . formatBytes($reply_file[0][4]) . ', ' . $reply_file[0][3] . ')';
|
||||
echo '</div>';
|
||||
|
@ -22,6 +22,20 @@
|
||||
echo $op_file[0][1];
|
||||
echo '</a>';
|
||||
}
|
||||
|
||||
if (isset($file_download)) {
|
||||
switch($file_download) {
|
||||
case 'original':
|
||||
echo ' <a title="Download as ' . $op_file[0][2] . '" class="download" href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][1] . '" download="' . $op_file[0][2] . '">🠋</a>';
|
||||
break;
|
||||
case 'server':
|
||||
echo ' <a title="Download as ' . $op_file[0][1] . '" class="download" href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][1] . '" download="' . $op_file[0][1] . '">🠋</a>';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($op_file[0][0] == 'image') {
|
||||
echo ' (' . formatBytes($op_file[0][4]) . ', ' . $op_file[0][3] . ')';
|
||||
echo '</div>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user