forked from GithubBackups/tinyib
Fix broken catalog thumbnail for posts without a file
This commit is contained in:
parent
c7f99ab25f
commit
ca11abdc3e
10
inc/html.php
10
inc/html.php
@ -602,13 +602,19 @@ EOF;
|
|||||||
|
|
||||||
function buildCatalogPost($post) {
|
function buildCatalogPost($post) {
|
||||||
$maxwidth = max(100, $post['thumb_width']);
|
$maxwidth = max(100, $post['thumb_width']);
|
||||||
|
$thumb = '#' . $post['id'];
|
||||||
|
if ($post['thumb'] != '') {
|
||||||
|
$thumb = <<<EOF
|
||||||
|
<img src="thumb/{$post['thumb']}" alt="{$post['id']}" width="{$post['thumb_width']}" height="{$post['thumb_height']}" border="0">
|
||||||
|
EOF;
|
||||||
|
}
|
||||||
$replies = numRepliesToThreadByID($post['id']);
|
$replies = numRepliesToThreadByID($post['id']);
|
||||||
$subject = trim($post['subject']) != '' ? $post['subject'] : substr(trim(str_ireplace("\n", '', strip_tags($post['message']))), 0, 75);
|
$subject = trim($post['subject']) != '' ? $post['subject'] : substr(trim(str_ireplace("\n", '', strip_tags($post['message']))), 0, 75);
|
||||||
|
|
||||||
return <<<EOF
|
return <<<EOF
|
||||||
<div class="catalogpost" style="max-width: {$maxwidth}px;">
|
<div class="catalogpost" style="max-width: {$maxwidth}px;">
|
||||||
<a href="res/{$post['id']}.html">
|
<a href="res/{$post['id']}.html">
|
||||||
<img src="thumb/{$post["thumb"]}" alt="{$post["id"]}" width="{$post['thumb_width']}" height="{$post['thumb_height']}" border="0">
|
$thumb
|
||||||
</a><br>
|
</a><br>
|
||||||
<b>$replies</b><br>
|
<b>$replies</b><br>
|
||||||
$subject
|
$subject
|
||||||
@ -884,7 +890,7 @@ EOF;
|
|||||||
$post_html = buildPost($post, TINYIB_INDEXPAGE);
|
$post_html = buildPost($post, TINYIB_INDEXPAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$txt_moderating = sprintf(__('Moderating No.%d'), post['id']);
|
$txt_moderating = sprintf(__('Moderating No.%d'), $post['id']);
|
||||||
$txt_action = __('Action');
|
$txt_action = __('Action');
|
||||||
if ($post['parent'] == TINYIB_NEWTHREAD) {
|
if ($post['parent'] == TINYIB_NEWTHREAD) {
|
||||||
$txt_delete = __('Delete thread');
|
$txt_delete = __('Delete thread');
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"POT-Creation-Date: 2020-10-22 09:04-0700\n"
|
"POT-Creation-Date: 2020-10-22 09:12-0700\n"
|
||||||
"PO-Revision-Date: 2020-10-22 09:04-0700\n"
|
"PO-Revision-Date: 2020-10-22 09:12-0700\n"
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"Language: en\n"
|
"Language: en\n"
|
||||||
@ -185,7 +185,7 @@ msgstr ""
|
|||||||
msgid "Form data was lost. Please go back and try again."
|
msgid "Form data was lost. Please go back and try again."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/functions.php:127 inc/html.php:1049
|
#: inc/functions.php:127 inc/html.php:1055
|
||||||
msgid "Anonymous"
|
msgid "Anonymous"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -278,7 +278,7 @@ msgstr ""
|
|||||||
msgid "Supported file types are %1$s and %2$s."
|
msgid "Supported file types are %1$s and %2$s."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:77 inc/html.php:775 inc/html.php:813
|
#: inc/html.php:77 inc/html.php:781 inc/html.php:819
|
||||||
msgid "Submit"
|
msgid "Submit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -412,7 +412,7 @@ msgstr ""
|
|||||||
msgid "Next"
|
msgid "Next"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:552 inc/html.php:554 inc/html.php:695
|
#: inc/html.php:552 inc/html.php:554 inc/html.php:701
|
||||||
msgid "Return"
|
msgid "Return"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -428,7 +428,7 @@ msgstr ""
|
|||||||
msgid "Style"
|
msgid "Style"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:565 inc/html.php:973
|
#: inc/html.php:565 inc/html.php:979
|
||||||
msgid "Delete"
|
msgid "Delete"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -436,257 +436,257 @@ msgstr ""
|
|||||||
msgid "Delete Post"
|
msgid "Delete Post"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:700 inc/html.php:1000
|
#: inc/html.php:706 inc/html.php:1006
|
||||||
msgid "Status"
|
msgid "Status"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:702
|
#: inc/html.php:708
|
||||||
msgid "Bans"
|
msgid "Bans"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:704
|
#: inc/html.php:710
|
||||||
msgid "Moderate Post"
|
msgid "Moderate Post"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:704
|
#: inc/html.php:710
|
||||||
msgid "Raw Post"
|
msgid "Raw Post"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:706
|
#: inc/html.php:712
|
||||||
msgid "Rebuild All"
|
msgid "Rebuild All"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:709
|
#: inc/html.php:715
|
||||||
msgid "Update"
|
msgid "Update"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:712
|
#: inc/html.php:718
|
||||||
msgid "Migrate Database"
|
msgid "Migrate Database"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:714
|
#: inc/html.php:720
|
||||||
msgid "Log Out"
|
msgid "Log Out"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:720
|
#: inc/html.php:726
|
||||||
msgid "Manage mode"
|
msgid "Manage mode"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:752
|
#: inc/html.php:758
|
||||||
msgid "Log In"
|
msgid "Log In"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:753
|
#: inc/html.php:759
|
||||||
msgid "Enter an administrator or moderator password"
|
msgid "Enter an administrator or moderator password"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:769
|
#: inc/html.php:775
|
||||||
msgid "Add a ban"
|
msgid "Add a ban"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:770 inc/html.php:799
|
#: inc/html.php:776 inc/html.php:805
|
||||||
msgid "IP Address"
|
msgid "IP Address"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:771
|
#: inc/html.php:777
|
||||||
msgid "Expire(sec)"
|
msgid "Expire(sec)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:772 inc/html.php:799
|
#: inc/html.php:778 inc/html.php:805
|
||||||
msgid "Reason"
|
msgid "Reason"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:773
|
#: inc/html.php:779
|
||||||
msgid "never"
|
msgid "never"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:774
|
#: inc/html.php:780
|
||||||
msgid "optional"
|
msgid "optional"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:776
|
#: inc/html.php:782
|
||||||
msgid "1 hour"
|
msgid "1 hour"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:777
|
#: inc/html.php:783
|
||||||
msgid "1 day"
|
msgid "1 day"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:778
|
#: inc/html.php:784
|
||||||
msgid "2 days"
|
msgid "2 days"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:779
|
#: inc/html.php:785
|
||||||
msgid "1 week"
|
msgid "1 week"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:780
|
#: inc/html.php:786
|
||||||
msgid "2 weeks"
|
msgid "2 weeks"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:781
|
#: inc/html.php:787
|
||||||
msgid "1 month"
|
msgid "1 month"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:799
|
#: inc/html.php:805
|
||||||
msgid "Set At"
|
msgid "Set At"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:799
|
#: inc/html.php:805
|
||||||
msgid "Expires"
|
msgid "Expires"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:801
|
#: inc/html.php:807
|
||||||
msgid "Does not expire"
|
msgid "Does not expire"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:803
|
#: inc/html.php:809
|
||||||
msgid "lift"
|
msgid "lift"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:811
|
#: inc/html.php:817
|
||||||
msgid "Moderate a post"
|
msgid "Moderate a post"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:812
|
#: inc/html.php:818
|
||||||
msgid "Post ID"
|
msgid "Post ID"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:814
|
#: inc/html.php:820
|
||||||
msgid "Tip:"
|
msgid "Tip:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:815
|
#: inc/html.php:821
|
||||||
msgid ""
|
msgid ""
|
||||||
"While browsing the image board, you can easily moderate a post if you are "
|
"While browsing the image board, you can easily moderate a post if you are "
|
||||||
"logged in."
|
"logged in."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:816
|
#: inc/html.php:822
|
||||||
msgid ""
|
msgid ""
|
||||||
"Tick the box next to a post and click \"Delete\" at the bottom of the page "
|
"Tick the box next to a post and click \"Delete\" at the bottom of the page "
|
||||||
"with a blank password."
|
"with a blank password."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:835
|
#: inc/html.php:841
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid " A ban record already exists for %s"
|
msgid " A ban record already exists for %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:838
|
#: inc/html.php:844
|
||||||
msgid "Only an administrator may ban an IP address."
|
msgid "Only an administrator may ban an IP address."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:840
|
#: inc/html.php:846
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "IP address: %s"
|
msgid "IP address: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:843
|
#: inc/html.php:849
|
||||||
msgid "This will delete the entire thread below."
|
msgid "This will delete the entire thread below."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:843
|
#: inc/html.php:849
|
||||||
msgid "This will delete the post below."
|
msgid "This will delete the post below."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:844
|
#: inc/html.php:850
|
||||||
msgid "Thread"
|
msgid "Thread"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:844
|
#: inc/html.php:850
|
||||||
msgid "Post"
|
msgid "Post"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:850
|
#: inc/html.php:856
|
||||||
msgid "Un-sticky"
|
msgid "Un-sticky"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:850
|
#: inc/html.php:856
|
||||||
msgid "Sticky"
|
msgid "Sticky"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:851
|
#: inc/html.php:857
|
||||||
msgid "Return this thread to a normal state."
|
msgid "Return this thread to a normal state."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:851
|
#: inc/html.php:857
|
||||||
msgid "Keep this thread at the top of the board."
|
msgid "Keep this thread at the top of the board."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:865
|
#: inc/html.php:871
|
||||||
msgid "Unlock"
|
msgid "Unlock"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:865
|
#: inc/html.php:871
|
||||||
msgid "Lock"
|
msgid "Lock"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:866
|
#: inc/html.php:872
|
||||||
msgid "Allow replying to this thread."
|
msgid "Allow replying to this thread."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:866
|
#: inc/html.php:872
|
||||||
msgid "Disallow replying to this thread."
|
msgid "Disallow replying to this thread."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:887
|
#: inc/html.php:893
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Moderating No.%d"
|
msgid "Moderating No.%d"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:888
|
#: inc/html.php:894
|
||||||
msgid "Action"
|
msgid "Action"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:890
|
#: inc/html.php:896
|
||||||
msgid "Delete thread"
|
msgid "Delete thread"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:892
|
#: inc/html.php:898
|
||||||
msgid "Delete post"
|
msgid "Delete post"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:894
|
#: inc/html.php:900
|
||||||
msgid "Ban poster"
|
msgid "Ban poster"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:945
|
#: inc/html.php:951
|
||||||
msgid "thread"
|
msgid "thread"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:945
|
#: inc/html.php:951
|
||||||
msgid "threads"
|
msgid "threads"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:945
|
#: inc/html.php:951
|
||||||
msgid "ban"
|
msgid "ban"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:945
|
#: inc/html.php:951
|
||||||
msgid "bans"
|
msgid "bans"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:969
|
#: inc/html.php:975
|
||||||
msgid "Approve"
|
msgid "Approve"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:971
|
#: inc/html.php:977
|
||||||
msgid "More Info"
|
msgid "More Info"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:979
|
#: inc/html.php:985
|
||||||
msgid "Pending posts"
|
msgid "Pending posts"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:997
|
#: inc/html.php:1003
|
||||||
msgid "Moderate"
|
msgid "Moderate"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:1001
|
#: inc/html.php:1007
|
||||||
msgid "Info"
|
msgid "Info"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: inc/html.php:1002
|
#: inc/html.php:1008
|
||||||
msgid "Recent posts"
|
msgid "Recent posts"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user