From dbb90c7a9923085177b2ead3114fb7a2e8d83f94 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:08:58 -0500 Subject: [PATCH 01/61] Updated copyright notice to media-neutral language --- core/basepage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/basepage.php b/core/basepage.php index e3fb982c..b9f223c7 100644 --- a/core/basepage.php +++ b/core/basepage.php @@ -560,7 +560,7 @@ EOD; $contact = empty($contact_link) ? "" : "
Contact"; return " - Images © their respective owners, + Media © their respective owners, Shimmie © Shish & The Team From e7b109a7f25cce7c3f32f3a4c59e123dbe4ac55a Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:10:00 -0500 Subject: [PATCH 02/61] Image to Post - Some core files --- core/extension.php | 8 ++++---- core/imageboard/image.php | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/extension.php b/core/extension.php index eb15c56a..c471e748 100644 --- a/core/extension.php +++ b/core/extension.php @@ -313,17 +313,17 @@ abstract class DataHandlerExtension extends Extension $existing = Image::by_id($event->replace_id); if (is_null($existing)) { - throw new UploadException("Image to replace does not exist!"); + throw new UploadException("Post to replace does not exist!"); } if ($existing->hash === $event->metadata['hash']) { - throw new UploadException("The uploaded image is the same as the one to replace."); + throw new UploadException("The uploaded post is the same as the one to replace."); } // even more hax.. $event->metadata['tags'] = $existing->get_tag_list(); $image = $this->create_image_from_data(warehouse_path(Image::IMAGE_DIR, $event->metadata['hash']), $event->metadata); if (is_null($image)) { - throw new UploadException("Data handler failed to create image object from data"); + throw new UploadException("Data handler failed to create post object from data"); } if (empty($image->get_mime())) { throw new UploadException("Unable to determine MIME for ". $event->tmpname); @@ -339,7 +339,7 @@ abstract class DataHandlerExtension extends Extension } else { $image = $this->create_image_from_data(warehouse_path(Image::IMAGE_DIR, $event->hash), $event->metadata); if (is_null($image)) { - throw new UploadException("Data handler failed to create image object from data"); + throw new UploadException("Data handler failed to create post object from data"); } if (empty($image->get_mime())) { throw new UploadException("Unable to determine MIME for ". $event->tmpname); diff --git a/core/imageboard/image.php b/core/imageboard/image.php index e5f2b156..e6a5c547 100644 --- a/core/imageboard/image.php +++ b/core/imageboard/image.php @@ -395,7 +395,7 @@ class Image SET owner_id=:owner_id WHERE id=:id ", ["owner_id"=>$owner->id, "id"=>$this->id]); - log_info("core_image", "Owner for Image #{$this->id} set to {$owner->name}"); + log_info("core_image", "Owner for Post #{$this->id} set to {$owner->name}"); } } @@ -647,7 +647,7 @@ class Image } if ($new_source != $old_source) { $database->execute("UPDATE images SET source=:source WHERE id=:id", ["source"=>$new_source, "id"=>$this->id]); - log_info("core_image", "Source for Image #{$this->id} set to: $new_source (was $old_source)"); + log_info("core_image", "Source for Post #{$this->id} set to: $new_source (was $old_source)"); } } @@ -668,7 +668,7 @@ class Image $sln = str_replace('"', "", $sln); if (bool_escape($sln) !== $this->locked) { $database->execute("UPDATE images SET locked=:yn WHERE id=:id", ["yn"=>$sln, "id"=>$this->id]); - log_info("core_image", "Setting Image #{$this->id} lock to: $ln"); + log_info("core_image", "Setting Post #{$this->id} lock to: $ln"); } } @@ -785,7 +785,7 @@ class Image ); } - log_info("core_image", "Tags for Image #{$this->id} set to: ".Tag::implode($tags)); + log_info("core_image", "Tags for Post #{$this->id} set to: ".Tag::implode($tags)); $cache->delete("image-{$this->id}-tags"); } } @@ -798,7 +798,7 @@ class Image global $database; $this->delete_tags_from_image(); $database->execute("DELETE FROM images WHERE id=:id", ["id"=>$this->id]); - log_info("core_image", 'Deleted Image #'.$this->id.' ('.$this->hash.')'); + log_info("core_image", 'Deleted Post #'.$this->id.' ('.$this->hash.')'); unlink($this->get_image_filename()); unlink($this->get_thumb_filename()); @@ -810,7 +810,7 @@ class Image */ public function remove_image_only(): void { - log_info("core_image", 'Removed Image File ('.$this->hash.')'); + log_info("core_image", 'Removed Post File ('.$this->hash.')'); @unlink($this->get_image_filename()); @unlink($this->get_thumb_filename()); } From 769fbecbb0c01e884f934d0343a374eeb50b7921 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:13:47 -0500 Subject: [PATCH 03/61] Image to Post - View --- ext/view/info.php | 4 ++-- ext/view/main.php | 10 +++++----- ext/view/test.php | 6 +++--- ext/view/theme.php | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ext/view/info.php b/ext/view/info.php index 69846117..8e8dd0ae 100644 --- a/ext/view/info.php +++ b/ext/view/info.php @@ -5,10 +5,10 @@ class ViewImageInfo extends ExtensionInfo public const KEY = "view"; public $key = self::KEY; - public $name = "Image Viewer"; + public $name = "Post Viewer"; public $url = self::SHIMMIE_URL; public $authors = self::SHISH_AUTHOR; - public $description = "Allows users to see uploaded images"; + public $description = "Allows users to see uploaded posts"; public $core = true; public $visibility = self::VISIBLE_HIDDEN; } diff --git a/ext/view/main.php b/ext/view/main.php index 3431574d..e6a4f79a 100644 --- a/ext/view/main.php +++ b/ext/view/main.php @@ -31,7 +31,7 @@ class ViewImage extends Extension $image = Image::by_id($image_id); if (is_null($image)) { - $this->theme->display_error(404, "Image not found", "Image $image_id could not be found"); + $this->theme->display_error(404, "Post not found", "Post $image_id could not be found"); return; } @@ -42,7 +42,7 @@ class ViewImage extends Extension } if (is_null($image)) { - $this->theme->display_error(404, "Image not found", "No more images"); + $this->theme->display_error(404, "Post not found", "No more posts"); return; } @@ -54,7 +54,7 @@ class ViewImage extends Extension // who follows up every request to '/post/view/123' with // '/post/view/12300000000000Image 123: tags' which spams the // database log with 'integer out of range' - $this->theme->display_error(404, "Image not found", "Invalid image ID"); + $this->theme->display_error(404, "Post not found", "Invalid post ID"); return; } @@ -65,7 +65,7 @@ class ViewImage extends Extension if (!is_null($image)) { send_event(new DisplayingImageEvent($image)); } else { - $this->theme->display_error(404, "Image not found", "No image in the database has the ID #$image_id"); + $this->theme->display_error(404, "Post not found", "No post in the database has the ID #$image_id"); } } elseif ($event->page_matches("post/set")) { if (!isset($_POST['image_id'])) { @@ -79,7 +79,7 @@ class ViewImage extends Extension $page->set_mode(PageMode::REDIRECT); $page->set_redirect(make_link("post/view/$image_id", url_escape(@$_POST['query']))); } else { - $this->theme->display_error(403, "Image Locked", "An admin has locked this image"); + $this->theme->display_error(403, "Post Locked", "An admin has locked this post"); } } } diff --git a/ext/view/test.php b/ext/view/test.php index a0f18c75..f34c28e9 100644 --- a/ext/view/test.php +++ b/ext/view/test.php @@ -13,7 +13,7 @@ class ViewImageTest extends ShimmiePHPUnitTestCase $image_id_1 = $this->post_image("tests/pbx_screenshot.jpg", "test"); $this->get_page("post/view/$image_id_1"); - $this->assert_title("Image $image_id_1: test"); + $this->assert_title("Post $image_id_1: test"); } public function testViewInfo() @@ -65,9 +65,9 @@ class ViewImageTest extends ShimmiePHPUnitTestCase $idp1 = $image_id_1 + 1; $this->get_page("post/view/$idp1"); - $this->assert_title('Image not found'); + $this->assert_title('Post not found'); $this->get_page('post/view/-1'); - $this->assert_title('Image not found'); + $this->assert_title('Post not found'); } } diff --git a/ext/view/theme.php b/ext/view/theme.php index d02338ae..41e5715f 100644 --- a/ext/view/theme.php +++ b/ext/view/theme.php @@ -20,7 +20,7 @@ class ViewImageTheme extends Themelet public function display_page(Image $image, $editor_parts) { global $page; - $page->set_title("Image {$image->id}: ".$image->get_tag_list()); + $page->set_title("Post {$image->id}: ".$image->get_tag_list()); $page->set_heading(html_escape($image->get_tag_list())); $page->add_block(new Block("Navigation", $this->build_navigation($image), "left", 0)); $page->add_block(new Block(null, $this->build_info($image, $editor_parts), "main", 20)); @@ -34,7 +34,7 @@ class ViewImageTheme extends Themelet public function display_admin_block(Page $page, $parts) { if (count($parts) > 0) { - $page->add_block(new Block("Image Controls", join("
", $parts), "left", 50)); + $page->add_block(new Block("Post Controls", join("
", $parts), "left", 50)); } } @@ -77,7 +77,7 @@ class ViewImageTheme extends Themelet global $user; if (count($editor_parts) == 0) { - return ($image->is_locked() ? "
[Image Locked]" : ""); + return ($image->is_locked() ? "
[Post Locked]" : ""); } $html = make_form(make_link("post/set"))." From 7e0349164a8c8d6db6877e09f9abfc86921d68bf Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:14:36 -0500 Subject: [PATCH 04/61] Image to Post - log_db --- ext/log_db/main.php | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/log_db/main.php b/ext/log_db/main.php index c25e8bde..f290fc5a 100644 --- a/ext/log_db/main.php +++ b/ext/log_db/main.php @@ -170,6 +170,7 @@ class MessageColumn extends Column protected function scan_entities(string $line) { $line = preg_replace_callback("/Image #(\d+)/s", [$this, "link_image"], $line); + $line = preg_replace_callback("/Post #(\d+)/s", [$this, "link_image"], $line); $line = preg_replace_callback("/>>(\d+)/s", [$this, "link_image"], $line); return $line; } From 52bce9ffd0ce208e0a19f5b3c71c36ef9e404091 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:14:50 -0500 Subject: [PATCH 05/61] Image to Post - media --- ext/media/theme.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/media/theme.php b/ext/media/theme.php index f950361c..6f1fe2b7 100644 --- a/ext/media/theme.php +++ b/ext/media/theme.php @@ -20,16 +20,16 @@ class MediaTheme extends Themelet public function get_help_html() { - return '

Search for items based on the type of media.

+ return '

Search for posts based on the type of media.

content:audio
-

Returns items that contain audio, including videos and audio files.

+

Returns posts that contain audio, including videos and audio files.

content:video
-

Returns items that contain video, including animated GIFs.

+

Returns posts that contain video, including animated GIFs.

-

These search terms depend on the items being scanned for media content. Automatic scanning was implemented in mid-2019, so items uploaded before, or items uploaded on a system without ffmpeg, will require additional scanning before this will work.

+

These search terms depend on the posts being scanned for media content. Automatic scanning was implemented in mid-2019, so posts uploaded before, or posts uploaded on a system without ffmpeg, will require additional scanning before this will work.

'; } } From 27b2988bd8b74df3d6e47f1cc57c54256d7dcdd0 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:15:20 -0500 Subject: [PATCH 06/61] Image to Post - Image --- ext/image/info.php | 2 +- ext/image/main.php | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ext/image/info.php b/ext/image/info.php index e416c829..abf55984 100644 --- a/ext/image/info.php +++ b/ext/image/info.php @@ -5,7 +5,7 @@ class ImageIOInfo extends ExtensionInfo public const KEY = "image"; public $key = self::KEY; - public $name = "Image Manager"; + public $name = "Post Manager"; public $url = self::SHIMMIE_URL; public $authors = [self::SHISH_NAME=> self::SHISH_EMAIL, "jgen"=>"jgen.tech@gmail.com"]; public $license = self::LICENSE_GPLV2; diff --git a/ext/image/main.php b/ext/image/main.php index c5b0902b..0c568c65 100644 --- a/ext/image/main.php +++ b/ext/image/main.php @@ -17,7 +17,7 @@ class ImageIO extends Extension const ON_DELETE_OPTIONS = [ 'Return to post list'=>ImageConfig::ON_DELETE_LIST, - 'Go to next image'=>ImageConfig::ON_DELETE_NEXT + 'Go to next post'=>ImageConfig::ON_DELETE_NEXT ]; const EXIF_READ_FUNCTION = "exif_read_data"; @@ -100,7 +100,7 @@ class ImageIO extends Extension $page->set_redirect(make_link('upload/replace/'.$image->id)); } else { /* Invalid image ID */ - throw new ImageReplaceException("Image to replace does not exist."); + throw new ImageReplaceException("Post to replace does not exist."); } } } elseif ($event->page_matches("image")) { @@ -158,7 +158,7 @@ class ImageIO extends Extension $event->image = Image::by_id($existing->id); return; } else { - $error = "Image {$existing->id} ". + $error = "Post {$existing->id} ". "already has hash {$image->hash}:

".$this->theme->build_thumb_html($existing); throw new ImageAdditionException($error); } @@ -205,12 +205,12 @@ class ImageIO extends Extension $existing = Image::by_id($id); if (is_null($existing)) { - throw new ImageReplaceException("Image to replace does not exist!"); + throw new ImageReplaceException("Post to replace does not exist!"); } $duplicate = Image::by_hash($image->hash); if (!is_null($duplicate) && $duplicate->id!=$id) { - $error = "Image {$duplicate->id} " . + $error = "Post {$duplicate->id} " . "already has hash {$image->hash}:

" . $this->theme->build_thumb_html($duplicate); throw new ImageReplaceException($error); } @@ -249,21 +249,21 @@ class ImageIO extends Extension $i_days_old = ((time() - strtotime($event->display_user->join_date)) / 86400) + 1; $h_image_rate = sprintf("%.1f", ($i_image_count / $i_days_old)); $images_link = make_link("post/list/user=$u_name/1"); - $event->add_stats("Images uploaded: $i_image_count, $h_image_rate per day"); + $event->add_stats("Posts uploaded: $i_image_count, $h_image_rate per day"); } public function onSetupBuilding(SetupBuildingEvent $event) { global $config; - $sb = new SetupBlock("Image Options"); + $sb = new SetupBlock("Post Options"); $sb->start_table(); $sb->position = 30; // advanced only //$sb->add_text_option(ImageConfig::ILINK, "Image link: "); //$sb->add_text_option(ImageConfig::TLINK, "
Thumbnail link: "); - $sb->add_text_option(ImageConfig::TIP, "Image tooltip", true); - $sb->add_text_option(ImageConfig::INFO, "Image info", true); + $sb->add_text_option(ImageConfig::TIP, "Post tooltip", true); + $sb->add_text_option(ImageConfig::INFO, "Post info", true); $sb->add_choice_option(ImageConfig::UPLOAD_COLLISION_HANDLER, self::COLLISION_OPTIONS, "Upload collision handler", true); $sb->add_choice_option(ImageConfig::ON_DELETE, self::ON_DELETE_OPTIONS, "On Delete", true); if (function_exists(self::EXIF_READ_FUNCTION)) { @@ -369,7 +369,7 @@ class ImageIO extends Extension $page->set_heading("Not Found"); $page->add_block(new Block("Navigation", "Index", "left", 0)); $page->add_block(new Block( - "Image not in database", + "Post not in database", "The requested image was not found in the database" )); } From 82e88969d6c0cc06081ad26641f802d146d6c4f7 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:15:51 -0500 Subject: [PATCH 07/61] Image to Post - favorites --- ext/favorites/info.php | 2 +- ext/favorites/main.php | 2 +- ext/favorites/test.php | 8 ++++---- ext/favorites/theme.php | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ext/favorites/info.php b/ext/favorites/info.php index baab8e90..5a6e2591 100644 --- a/ext/favorites/info.php +++ b/ext/favorites/info.php @@ -13,5 +13,5 @@ class FavoritesInfo extends ExtensionInfo "Gives users a \"favorite this image\" button that they can press

Favorites for a user can then be retrieved by searching for \"favorited_by=UserName\"

Popular images can be searched for by eg. \"favorites>5\" -

Favorite info can be added to an image's filename or tooltip using the \$favorites placeholder"; +

Favorite info can be added to a post's filename or tooltip using the \$favorites placeholder"; } diff --git a/ext/favorites/main.php b/ext/favorites/main.php index f19311b6..e1c66a1f 100644 --- a/ext/favorites/main.php +++ b/ext/favorites/main.php @@ -75,7 +75,7 @@ class Favorites extends Extension $i_days_old = ((time() - strtotime($event->display_user->join_date)) / 86400) + 1; $h_favorites_rate = sprintf("%.1f", ($i_favorites_count / $i_days_old)); $favorites_link = make_link("post/list/favorited_by={$event->display_user->name}/1"); - $event->add_stats("Images favorited: $i_favorites_count, $h_favorites_rate per day"); + $event->add_stats("Posts favorited: $i_favorites_count, $h_favorites_rate per day"); } public function onImageInfoSet(ImageInfoSetEvent $event) diff --git a/ext/favorites/test.php b/ext/favorites/test.php index 7df3e0eb..933180eb 100644 --- a/ext/favorites/test.php +++ b/ext/favorites/test.php @@ -9,7 +9,7 @@ class FavoritesTest extends ShimmiePHPUnitTestCase # No favourites $this->get_page("post/view/$image_id"); - $this->assert_title("Image $image_id: test"); + $this->assert_title("Post $image_id: test"); $this->assert_no_text("Favorited By"); # Add a favourite @@ -17,7 +17,7 @@ class FavoritesTest extends ShimmiePHPUnitTestCase # Favourite shown on page $this->get_page("post/view/$image_id"); - $this->assert_title("Image $image_id: test"); + $this->assert_title("Post $image_id: test"); $this->assert_text("Favorited By"); # Favourite shown on index @@ -26,14 +26,14 @@ class FavoritesTest extends ShimmiePHPUnitTestCase # Favourite shown on user page $this->get_page("user/test"); - $this->assert_text("Images favorited: 1"); + $this->assert_text("Posts favorited: 1"); # Delete a favourite send_event(new FavoriteSetEvent($image_id, $user, false)); # No favourites $this->get_page("post/view/$image_id"); - $this->assert_title("Image $image_id: test"); + $this->assert_title("Post $image_id: test"); $this->assert_no_text("Favorited By"); } } diff --git a/ext/favorites/theme.php b/ext/favorites/theme.php index b2c3ca23..b6e06e5a 100644 --- a/ext/favorites/theme.php +++ b/ext/favorites/theme.php @@ -34,23 +34,23 @@ class FavoritesTheme extends Themelet public function get_help_html() { - return '

Search for images that have been favorited a certain number of times, or favorited by a particular individual.

+ return '

Search for posts that have been favorited a certain number of times, or favorited by a particular individual.

favorites=1
-

Returns images that have been favorited once.

+

Returns posts that have been favorited once.

favorites>0
-

Returns images that have been favorited 1 or more times

+

Returns posts that have been favorited 1 or more times

Can use <, <=, >, >=, or =.

favorited_by:username
-

Returns images that have been favorited by "username".

+

Returns posts that have been favorited by "username".

favorited_by_userno:123
-

Returns images that have been favorited by user 123.

+

Returns posts that have been favorited by user 123.

'; } From 840e661a42da61ab1408a7bc199ae94460cc866a Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:23:13 -0500 Subject: [PATCH 08/61] Image to Post - featured --- ext/featured/info.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/featured/info.php b/ext/featured/info.php index dc3e8bad..cbe3dd94 100644 --- a/ext/featured/info.php +++ b/ext/featured/info.php @@ -12,14 +12,14 @@ class FeaturedInfo extends ExtensionInfo public $description = "Bring a specific image to the users' attentions"; public $documentation = "Once enabled, a new \"feature this\" button will appear next -to the other image control buttons (delete, rotate, etc). +to the other post control buttons (delete, rotate, etc). Clicking it will set the image as the site's current feature, which will be shown in the side bar of the post list.

Viewing a featured post
Visit /featured_image/view

Downloading a featured post
Link to /featured_image/download. This will give -the raw data for an image (no HTML). This is useful so that you +the raw data for a post (no HTML). This is useful so that you can set your desktop wallpaper to be the download URL, refreshed every couple of hours."; } From 77ea8617d7b297dafe8a044b1a35e4f34bed5e08 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:12:07 -0500 Subject: [PATCH 09/61] Image to Post - Admin extension --- ext/admin/info.php | 6 +++--- ext/admin/test.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/admin/info.php b/ext/admin/info.php index 4a396aa9..55cea22d 100644 --- a/ext/admin/info.php +++ b/ext/admin/info.php @@ -15,9 +15,9 @@ class AdminPageInfo extends ExtensionInfo

Lowercase all tags:
Set all tags to lowercase for consistency

Recount tag use: -
If the counts of images per tag get messed up somehow, this will reset them, and remove any unused tags +
If the counts of posts per tag get messed up somehow, this will reset them, and remove any unused tags

Database dump:
Download the contents of the database in plain text format, useful for backups. -

Image dump: -
Download all the images as a .zip file (Requires ZipArchive)"; +

Post dump: +
Download all the posts as a .zip file (Requires ZipArchive)"; } diff --git a/ext/admin/test.php b/ext/admin/test.php index 0e4852bf..e0f5b919 100644 --- a/ext/admin/test.php +++ b/ext/admin/test.php @@ -28,14 +28,14 @@ class AdminPageTest extends ShimmiePHPUnitTestCase // Validate problem $page = $this->get_page("post/view/$image_id_1"); - $this->assertEquals("Image $image_id_1: TeStCase$ts", $page->title); + $this->assertEquals("Post $image_id_1: TeStCase$ts", $page->title); // Fix send_event(new AdminActionEvent('lowercase_all_tags')); // Validate fix $this->get_page("post/view/$image_id_1"); - $this->assert_title("Image $image_id_1: testcase$ts"); + $this->assert_title("Post $image_id_1: testcase$ts"); // Change $_POST["tag"] = "TestCase$ts"; @@ -43,7 +43,7 @@ class AdminPageTest extends ShimmiePHPUnitTestCase // Validate change $this->get_page("post/view/$image_id_1"); - $this->assert_title("Image $image_id_1: TestCase$ts"); + $this->assert_title("Post $image_id_1: TestCase$ts"); } # FIXME: make sure the admin tools actually work From 773be88994cf1af7c6faeeafe080567ffa4ea7fb Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:12:23 -0500 Subject: [PATCH 10/61] Image to Post - bulk actions --- ext/bulk_actions/info.php | 2 +- ext/bulk_actions/theme.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/bulk_actions/info.php b/ext/bulk_actions/info.php index fc25998d..bb49ea82 100644 --- a/ext/bulk_actions/info.php +++ b/ext/bulk_actions/info.php @@ -9,5 +9,5 @@ class BulkActionsInfo extends ExtensionInfo public $authors = ["Matthew Barbour"=>"matthew@darkholme.net"]; public $license = self::LICENSE_WTFPL; public $description = "Provides query and selection-based bulk action support"; - public $documentation = "Provides bulk action section in list view. Allows performing actions against a set of images based on query or manual selection. Based on Mass Tagger by Christian Walde , contributions by Shish and Agasa."; + public $documentation = "Provides bulk action section in list view. Allows performing actions against a set of posts based on query or manual selection. Based on Mass Tagger by Christian Walde , contributions by Shish and Agasa."; } diff --git a/ext/bulk_actions/theme.php b/ext/bulk_actions/theme.php index 52b3f24c..68a66bcb 100644 --- a/ext/bulk_actions/theme.php +++ b/ext/bulk_actions/theme.php @@ -8,7 +8,7 @@ class BulkActionsTheme extends Themelet

"; } - $page->add_block(new Block("Image Score", $html, "left", 20)); + $page->add_block(new Block("Post Score", $html, "left", 20)); } public function get_nuller(User $duser) @@ -96,32 +96,32 @@ class NumericScoreTheme extends Themelet public function get_help_html() { - return '

Search for images that have received numeric scores by the score or by the scorer.

+ return '

Search for posts that have received numeric scores by the score or by the scorer.

score=1
-

Returns images with a score of 1.

+

Returns posts with a score of 1.

score>0
-

Returns images with a score of 1 or more.

+

Returns posts with a score of 1 or more.

Can use <, <=, >, >=, or =.

upvoted_by=username
-

Returns images upvoted by "username".

+

Returns posts upvoted by "username".

upvoted_by_id=123
-

Returns images upvoted by user 123.

+

Returns posts upvoted by user 123.

downvoted_by=username
-

Returns images downvoted by "username".

+

Returns posts downvoted by "username".

downvoted_by_id=123
-

Returns images downvoted by user 123.

+

Returns posts downvoted by user 123.

From 0db32f2cccfbb7f287de0b2c795699203e1785c8 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:17:15 -0500 Subject: [PATCH 21/61] Image to Post - random --- ext/random_image/info.php | 16 ++++++++-------- ext/random_image/main.php | 6 +++--- ext/random_image/test.php | 12 ++++++------ ext/random_image/theme.php | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/ext/random_image/info.php b/ext/random_image/info.php index 4b01c327..bc6ac3a1 100644 --- a/ext/random_image/info.php +++ b/ext/random_image/info.php @@ -5,22 +5,22 @@ class RandomImageInfo extends ExtensionInfo public const KEY = "random_image"; public $key = self::KEY; - public $name = "Random Image"; + public $name = "Random Post"; public $url = self::SHIMMIE_URL; public $authors = self::SHISH_AUTHOR; public $license = self::LICENSE_GPLV2; - public $description = "Do things with a random image"; + public $description = "Do things with a random post"; public $documentation = -"Viewing a random image +"Viewing a random post
Visit /random_image/view -

Downloading a random image +

Downloading a random post
Link to /random_image/download. This will give -the raw data for an image (no HTML). This is useful so that you +the raw data for a post (no HTML). This is useful so that you can set your desktop wallpaper to be the download URL, refreshed every couple of hours. -

Getting a random image from a subset -
Adding a slash and some search terms will get a random image +

Getting a random post from a subset +
Adding a slash and some search terms will get a random post from those results. This can be useful if you want a specific size -of random image, or from a category. You could link to +of random post, or from a category. You could link to /random_image/download/size=1024x768+cute"; } diff --git a/ext/random_image/main.php b/ext/random_image/main.php index a7fa55b5..e0e59355 100644 --- a/ext/random_image/main.php +++ b/ext/random_image/main.php @@ -22,7 +22,7 @@ class RandomImage extends Extension $image = Image::by_random($search_terms); if (!$image) { throw new SCoreException( - "Couldn't find any images randomly", + "Couldn't find any posts randomly", Tag::implode($search_terms) ); } @@ -43,7 +43,7 @@ class RandomImage extends Extension public function onSetupBuilding(SetupBuildingEvent $event) { - $sb = new SetupBlock("Random Image"); + $sb = new SetupBlock("Random Post"); $sb->add_bool_option("show_random_block", "Show Random Block: "); $event->panel->add_block($sb); } @@ -62,7 +62,7 @@ class RandomImage extends Extension public function onPageSubNavBuilding(PageSubNavBuildingEvent $event) { if ($event->parent=="posts") { - $event->add_nav_link("posts_random", new Link('random_image/view'), "Random Image"); + $event->add_nav_link("posts_random", new Link('random_image/view'), "Random Post"); } } } diff --git a/ext/random_image/test.php b/ext/random_image/test.php index b9af4950..0e185836 100644 --- a/ext/random_image/test.php +++ b/ext/random_image/test.php @@ -8,10 +8,10 @@ class RandomImageTest extends ShimmiePHPUnitTestCase $this->log_out(); $page = $this->get_page("random_image/view"); - $this->assertEquals("Image $image_id: test", $page->title); + $this->assertEquals("Post $image_id: test", $page->title); $page = $this->get_page("random_image/view/test"); - $this->assertEquals("Image $image_id: test", $page->title); + $this->assertEquals("Post $image_id: test", $page->title); $page = $this->get_page("random_image/download"); $this->assertNotNull($page->data); @@ -27,21 +27,21 @@ class RandomImageTest extends ShimmiePHPUnitTestCase # enabled, no image = no text $config->set_bool("show_random_block", true); $page = $this->get_page("post/list"); - $this->assertNull($page->find_block("Random Image")); + $this->assertNull($page->find_block("Random Post")); # enabled, image = text $image_id = $this->post_image("tests/pbx_screenshot.jpg", "test"); $page = $this->get_page("post/list"); - $this->assertNotNull($page->find_block("Random Image")); + $this->assertNotNull($page->find_block("Random Post")); # disabled, image = no text $config->set_bool("show_random_block", false); $page = $this->get_page("post/list"); - $this->assertNull($page->find_block("Random Image")); + $this->assertNull($page->find_block("Random Post")); # disabled, no image = no image $this->delete_image($image_id); $page = $this->get_page("post/list"); - $this->assertNull($page->find_block("Random Image")); + $this->assertNull($page->find_block("Random Post")); } } diff --git a/ext/random_image/theme.php b/ext/random_image/theme.php index dc17d0af..38606619 100644 --- a/ext/random_image/theme.php +++ b/ext/random_image/theme.php @@ -7,7 +7,7 @@ class RandomImageTheme extends Themelet { public function display_random(Page $page, Image $image) { - $page->add_block(new Block("Random Image", $this->build_random_html($image), "left", 8)); + $page->add_block(new Block("Random Post", $this->build_random_html($image), "left", 8)); } public function build_random_html(Image $image, ?string $query = null): string From 9d7b0db3d31d14e7f6a0d25bf83476269326b741 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:17:29 -0500 Subject: [PATCH 22/61] Image to Post - pm triggers --- ext/pm_triggers/info.php | 2 +- ext/pm_triggers/main.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/pm_triggers/info.php b/ext/pm_triggers/info.php index b4226c9a..97ffec1d 100644 --- a/ext/pm_triggers/info.php +++ b/ext/pm_triggers/info.php @@ -9,6 +9,6 @@ class PMTriggerInfo extends ExtensionInfo public $url = self::SHIMMIE_URL; public $authors = self::SHISH_AUTHOR; public $license = self::LICENSE_GPLV2; - public $description = "Send PMs in response to certain events (eg image deletion)"; + public $description = "Send PMs in response to certain events (eg post deletion)"; public $beta = true; } diff --git a/ext/pm_triggers/main.php b/ext/pm_triggers/main.php index ad1039f3..f8cae750 100644 --- a/ext/pm_triggers/main.php +++ b/ext/pm_triggers/main.php @@ -6,8 +6,8 @@ class PMTrigger extends Extension { $this->send( $event->image->owner_id, - "[System] An image you uploaded has been deleted", - "Image le gone~ (#{$event->image->id}, {$event->image->get_tag_list()})" + "[System] A post you uploaded has been deleted", + "Post le gone~ (#{$event->image->id}, {$event->image->get_tag_list()})" ); } From 5371669e5412f6227e7bc9a85c6e10193e3507c7 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:17:47 -0500 Subject: [PATCH 23/61] Image to Post - private --- ext/private_image/info.php | 2 +- ext/private_image/main.php | 10 +++++----- ext/private_image/theme.php | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ext/private_image/info.php b/ext/private_image/info.php index 65ca5279..c46a8864 100644 --- a/ext/private_image/info.php +++ b/ext/private_image/info.php @@ -5,7 +5,7 @@ class PrivateImageInfo extends ExtensionInfo public const KEY = "private_image"; public $key = self::KEY; - public $name = "Private Image"; + public $name = "Private Post"; public $authors = ["Matthew Barbour"=>"matthew@darkholme.net"]; public $license = self::LICENSE_WTFPL; public $description = "Allows users to mark images as private, which prevents other users from seeing them."; diff --git a/ext/private_image/main.php b/ext/private_image/main.php index 5865aaa5..e0a5ec91 100644 --- a/ext/private_image/main.php +++ b/ext/private_image/main.php @@ -49,11 +49,11 @@ class PrivateImage extends Extension $image_id = isset($_POST['image_id']) ? $_POST['image_id'] : null; } if (empty($image_id)) { - throw new SCoreException("Can not make image private: No valid Image ID given."); + throw new SCoreException("Can not make image private: No valid Post ID given."); } $image = Image::by_id($image_id); if ($image==null) { - throw new SCoreException("Image not found."); + throw new SCoreException("Post not found."); } if ($image->owner_id!=$user->can(Permissions::SET_OTHERS_PRIVATE_IMAGES)) { throw new SCoreException("Cannot set another user's image to private."); @@ -71,11 +71,11 @@ class PrivateImage extends Extension $image_id = isset($_POST['image_id']) ? $_POST['image_id'] : null; } if (empty($image_id)) { - throw new SCoreException("Can not make image public: No valid Image ID given."); + throw new SCoreException("Can not make image public: No valid Post ID given."); } $image = Image::by_id($image_id); if ($image==null) { - throw new SCoreException("Image not found."); + throw new SCoreException("Post not found."); } if ($image->owner_id!=$user->can(Permissions::SET_OTHERS_PRIVATE_IMAGES)) { throw new SCoreException("Cannot set another user's image to private."); @@ -182,7 +182,7 @@ class PrivateImage extends Extension { if ($event->key===HelpPages::SEARCH) { $block = new Block(); - $block->header = "Private Images"; + $block->header = "Private Posts"; $block->body = $this->theme->get_help_html(); $event->add_block($block); } diff --git a/ext/private_image/theme.php b/ext/private_image/theme.php index ebf5fd1b..263503ca 100644 --- a/ext/private_image/theme.php +++ b/ext/private_image/theme.php @@ -27,14 +27,14 @@ class PrivateImageTheme extends Themelet public function get_help_html() { - return '

Search for images that are private/public.

+ return '

Search for posts that are private/public.

private:yes
-

Returns images that are private, restricted to yourself if you are not an admin.

+

Returns posts that are private, restricted to yourself if you are not an admin.

private:no
-

Returns images that are public.

+

Returns posts that are public.

'; } From f49709448295160bfa1667de46c250c7b4a72d95 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:17:59 -0500 Subject: [PATCH 24/61] Image to Post - rating --- ext/rating/info.php | 2 +- ext/rating/main.php | 2 +- ext/rating/theme.php | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/rating/info.php b/ext/rating/info.php index c7836f29..39490b41 100644 --- a/ext/rating/info.php +++ b/ext/rating/info.php @@ -5,7 +5,7 @@ class RatingsInfo extends ExtensionInfo public const KEY = "rating"; public $key = self::KEY; - public $name = "Image Ratings"; + public $name = "Post Ratings"; public $url = self::SHIMMIE_URL; public $authors = self::SHISH_AUTHOR; public $license = self::LICENSE_GPLV2; diff --git a/ext/rating/main.php b/ext/rating/main.php index b2c8216d..661831e2 100644 --- a/ext/rating/main.php +++ b/ext/rating/main.php @@ -165,7 +165,7 @@ class Ratings extends Extension $options[$rating->name] = $rating->code; } - $sb = new SetupBlock("Image Ratings"); + $sb = new SetupBlock("Post Ratings"); $sb->start_table(); foreach (array_keys($_shm_user_classes) as $key) { if ($key == "base" || $key == "hellbanned") { diff --git a/ext/rating/theme.php b/ext/rating/theme.php index a8d74452..52317ea1 100644 --- a/ext/rating/theme.php +++ b/ext/rating/theme.php @@ -63,20 +63,20 @@ class RatingsTheme extends Themelet public function get_help_html(array $ratings) { - $output = '

Search for images with one or more possible ratings.

+ $output = '

Search for posts with one or more possible ratings.

rating:'.$ratings[0]->search_term.'
-

Returns images with the '.$ratings[0]->name.' rating.

+

Returns posts with the '.$ratings[0]->name.' rating.

Ratings can be abbreviated to a single letter as well

rating:'.$ratings[0]->code.'
-

Returns images with the '.$ratings[0]->name.' rating.

+

Returns posts with the '.$ratings[0]->name.' rating.

If abbreviations are used, multiple ratings can be searched for.

rating:'.$ratings[0]->code.$ratings[1]->code.'
-

Returns images with the '.$ratings[0]->name.' or '.$ratings[1]->name.' rating.

+

Returns posts with the '.$ratings[0]->name.' or '.$ratings[1]->name.' rating.

Available ratings:

From 456176ac117e7cc35904bc17db271e99190d211c Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:18:13 -0500 Subject: [PATCH 25/61] Image to Post - random list --- ext/random_list/info.php | 4 ++-- ext/random_list/main.php | 6 +++--- ext/random_list/theme.php | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ext/random_list/info.php b/ext/random_list/info.php index fab27994..76d9c161 100644 --- a/ext/random_list/info.php +++ b/ext/random_list/info.php @@ -9,8 +9,8 @@ class RandomListInfo extends ExtensionInfo public $url = "http://www.drudexsoftware.com"; public $authors = ["Drudex Software"=>"support@drudexsoftware.com"]; public $license = self::LICENSE_GPLV2; - public $description = "Allows displaying a page with random images"; + public $description = "Allows displaying a page with random posts"; public $documentation = -"Random image list can be accessed through www.yoursite.com/random +"Random post list can be accessed through www.yoursite.com/random It is recommended that you create a link to this page so users know it exists."; } diff --git a/ext/random_list/main.php b/ext/random_list/main.php index dbef258a..95a43ee0 100644 --- a/ext/random_list/main.php +++ b/ext/random_list/main.php @@ -35,7 +35,7 @@ class RandomList extends Extension $images_per_page = $config->get_int("random_images_list_count", 12); $random_images = []; - // generate random images + // generate random posts for ($i = 0; $i < $images_per_page; $i++) { $random_image = Image::by_random($search_terms); if (!$random_image) { @@ -57,12 +57,12 @@ class RandomList extends Extension public function onSetupBuilding(SetupBuildingEvent $event) { - $sb = new SetupBlock("Random Images List"); + $sb = new SetupBlock("Random Posts List"); // custom headers $sb->add_int_option( "random_images_list_count", - "Amount of Random images to display " + "Amount of Random posts to display " ); $event->panel->add_block($sb); diff --git a/ext/random_list/theme.php b/ext/random_list/theme.php index 3714d3ad..cf45bb63 100644 --- a/ext/random_list/theme.php +++ b/ext/random_list/theme.php @@ -17,9 +17,9 @@ class RandomListTheme extends Themelet */ public function display_page(Page $page, array $images) { - $page->title = "Random Images"; + $page->title = "Random Posts"; - $html = "Refresh the page to view more images"; + $html = "Refresh the page to view more posts"; if (count($images)) { $html .= "
"; @@ -29,10 +29,10 @@ class RandomListTheme extends Themelet $html .= "
"; } else { - $html .= "

No images were found to match the search criteria"; + $html .= "

No posts were found to match the search criteria"; } - $page->add_block(new Block("Random Images", $html)); + $page->add_block(new Block("Random Posts", $html)); $nav = $this->build_navigation($this->search_terms); $page->add_block(new Block("Navigation", $nav, "left", 0)); From 61250bd3a3745b90b20f228827d387bfbf516be4 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:18:23 -0500 Subject: [PATCH 26/61] Image to Post - report --- ext/report_image/test.php | 6 +++--- ext/report_image/theme.php | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ext/report_image/test.php b/ext/report_image/test.php index b831da50..0899582b 100644 --- a/ext/report_image/test.php +++ b/ext/report_image/test.php @@ -15,12 +15,12 @@ class ReportImageTest extends ShimmiePHPUnitTestCase // Check that the report exists $config->set_bool("report_image_show_thumbs", true); $this->get_page("image_report/list"); - $this->assert_title("Reported Images"); + $this->assert_title("Reported Posts"); $this->assert_text("report details"); $config->set_bool("report_image_show_thumbs", false); $this->get_page("image_report/list"); - $this->assert_title("Reported Images"); + $this->assert_title("Reported Posts"); $this->assert_text("report details"); $this->assert_text("$image_id"); @@ -30,7 +30,7 @@ class ReportImageTest extends ShimmiePHPUnitTestCase // Check that the report is gone $this->get_page("image_report/list"); - $this->assert_title("Reported Images"); + $this->assert_title("Reported Posts"); $this->assert_no_text("report details"); # FIXME: test delete image from report screen diff --git a/ext/report_image/theme.php b/ext/report_image/theme.php index 2de8df5d..fdc9f17b 100644 --- a/ext/report_image/theme.php +++ b/ext/report_image/theme.php @@ -40,15 +40,15 @@ class ReportImageTheme extends Themelet $thumb_width = $config->get_int(ImageConfig::THUMB_WIDTH); $html = "
- + $h_reportedimages
ImageReasonAction
PostReasonAction
"; - $page->set_title("Reported Images"); - $page->set_heading("Reported Images"); + $page->set_title("Reported Posts"); + $page->set_heading("Reported Posts"); $page->add_block(new NavBlock()); - $page->add_block(new Block("Reported Images", $html)); + $page->add_block(new Block("Reported Posts", $html)); } /** @@ -84,7 +84,7 @@ class ReportImageTheme extends Themelet "; - $page->add_block(new Block("Report Image", $html, "left")); + $page->add_block(new Block("Report Post", $html, "left")); } public function get_nuller(User $duser) From 21f48456a2833a66b820599ec45435a33206f568 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:18:37 -0500 Subject: [PATCH 27/61] Image to Post - res limit --- ext/res_limit/main.php | 10 +++++----- ext/res_limit/test.php | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ext/res_limit/main.php b/ext/res_limit/main.php index 14c746cf..e5df6be9 100644 --- a/ext/res_limit/main.php +++ b/ext/res_limit/main.php @@ -19,16 +19,16 @@ class ResolutionLimit extends Extension $image = $event->image; if ($min_w > 0 && $image->width < $min_w) { - throw new UploadException("Image too small"); + throw new UploadException("Post too small"); } if ($min_h > 0 && $image->height < $min_h) { - throw new UploadException("Image too small"); + throw new UploadException("Post too small"); } if ($max_w > 0 && $image->width > $max_w) { - throw new UploadException("Image too large"); + throw new UploadException("Post too large"); } if ($max_h > 0 && $image->height > $max_h) { - throw new UploadException("Image too large"); + throw new UploadException("Post too large"); } if (count($ratios) > 0) { @@ -49,7 +49,7 @@ class ResolutionLimit extends Extension } if ($valids > 0 && !$ok) { throw new UploadException( - "Image needs to be in one of these ratios: ". + "Post needs to be in one of these ratios: ". html_escape($config->get_string("upload_ratios", "")) ); } diff --git a/ext/res_limit/test.php b/ext/res_limit/test.php index ecf25159..b8a21fbf 100644 --- a/ext/res_limit/test.php +++ b/ext/res_limit/test.php @@ -13,8 +13,8 @@ class ResolutionLimitTest extends ShimmiePHPUnitTestCase $this->log_in_as_user(); $this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot"); //$this->assert_response(302); - $this->assert_no_text("Image too large"); - $this->assert_no_text("Image too small"); + $this->assert_no_text("Post too large"); + $this->assert_no_text("Post too small"); $this->assert_no_text("ratio"); } @@ -32,7 +32,7 @@ class ResolutionLimitTest extends ShimmiePHPUnitTestCase $this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot"); $this->assertTrue(false, "Invalid-size image was allowed"); } catch (UploadException $e) { - $this->assertEquals("Image too small", $e->getMessage()); + $this->assertEquals("Post too small", $e->getMessage()); } } @@ -49,7 +49,7 @@ class ResolutionLimitTest extends ShimmiePHPUnitTestCase $this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot"); $this->assertTrue(false, "Invalid-size image was allowed"); } catch (UploadException $e) { - $this->assertEquals("Image too large", $e->getMessage()); + $this->assertEquals("Post too large", $e->getMessage()); } } @@ -66,7 +66,7 @@ class ResolutionLimitTest extends ShimmiePHPUnitTestCase $this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot"); $this->assertTrue(false, "Invalid-size image was allowed"); } catch (UploadException $e) { - $this->assertEquals("Image needs to be in one of these ratios: 16:9", $e->getMessage()); + $this->assertEquals("Post needs to be in one of these ratios: 16:9", $e->getMessage()); } } From 886d7cfd99032e35ef6c7ed5183de5d02f5c6f27 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:18:51 -0500 Subject: [PATCH 28/61] Image to Post - tag edit --- ext/tag_edit/info.php | 2 +- ext/tag_edit/test.php | 6 +++--- ext/tag_edit/theme.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/tag_edit/info.php b/ext/tag_edit/info.php index 87af3743..c3396597 100644 --- a/ext/tag_edit/info.php +++ b/ext/tag_edit/info.php @@ -26,7 +26,7 @@ class TagEditInfo extends ExtensionInfo
  • Numeric Score
      -
    • vote=(up, down, remove) -- vote, or remove your vote on an image +
    • vote=(up, down, remove) -- vote, or remove your vote on a post
  • Pools
      diff --git a/ext/tag_edit/test.php b/ext/tag_edit/test.php index 31112a6f..b055c098 100644 --- a/ext/tag_edit/test.php +++ b/ext/tag_edit/test.php @@ -9,12 +9,12 @@ class TagEditTest extends ShimmiePHPUnitTestCase // Original $this->get_page("post/view/$image_id"); - $this->assert_title("Image $image_id: pbx"); + $this->assert_title("Post $image_id: pbx"); // Modified send_event(new TagSetEvent($image, ["new"])); $this->get_page("post/view/$image_id"); - $this->assert_title("Image $image_id: new"); + $this->assert_title("Post $image_id: new"); } public function testInvalidChange() @@ -36,7 +36,7 @@ class TagEditTest extends ShimmiePHPUnitTestCase $this->log_in_as_user(); $image_id = $this->post_image("tests/pbx_screenshot.jpg", str_repeat("a", 500)); $this->get_page("post/view/$image_id"); - $this->assert_title("Image $image_id: tagme"); + $this->assert_title("Post $image_id: tagme"); } public function testSourceEdit() diff --git a/ext/tag_edit/theme.php b/ext/tag_edit/theme.php index 4283507d..954faf74 100644 --- a/ext/tag_edit/theme.php +++ b/ext/tag_edit/theme.php @@ -68,7 +68,7 @@ class TagEditTheme extends Themelet $h_owner = html_escape($image->get_owner()->name); $h_av = $image->get_owner()->get_avatar_html(); $h_date = autodate($image->posted); - $h_ip = $user->can(Permissions::VIEW_IP) ? " (".show_ip($image->owner_ip, "Image posted {$image->posted}").")" : ""; + $h_ip = $user->can(Permissions::VIEW_IP) ? " (".show_ip($image->owner_ip, "Post posted {$image->posted}").")" : ""; return " Uploader From 3aa1926f7259e014539f5001c75b221f389606ba Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:19:02 -0500 Subject: [PATCH 29/61] Image to Post - upload --- ext/upload/main.php | 8 ++++---- ext/upload/theme.php | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ext/upload/main.php b/ext/upload/main.php index ab693109..a7715752 100644 --- a/ext/upload/main.php +++ b/ext/upload/main.php @@ -194,7 +194,7 @@ class Upload extends Extension $this->theme->display_permission_denied(); } else { if ($this->is_full) { - throw new UploadException("Can not replace Image: disk nearly full"); + throw new UploadException("Can not replace Post: disk nearly full"); } // Try to get the image ID @@ -203,12 +203,12 @@ class Upload extends Extension } elseif (isset($_POST['image_id'])) { $image_id = int_escape($_POST['image_id']); } else { - throw new UploadException("Can not replace Image: No valid Image ID given."); + throw new UploadException("Can not replace Post: No valid Post ID given."); } $image_old = Image::by_id($image_id); if (is_null($image_old)) { - throw new UploadException("Can not replace Image: No image with ID $image_id"); + throw new UploadException("Can not replace Post: No post with ID $image_id"); } $source = $_POST['source'] ?? null; @@ -370,7 +370,7 @@ class Upload extends Extension if ($event->image_id == -1) { throw new UploadException("MIME type not supported: " . $metadata['mime']); } - $page->add_http_header("X-Shimmie-Image-ID: " . $event->image_id); + $page->add_http_header("X-Shimmie-Post-ID: " . $event->image_id); } catch (UploadException $ex) { $this->theme->display_upload_error( $page, diff --git a/ext/upload/theme.php b/ext/upload/theme.php index 8f476bd1..b2c9fb33 100644 --- a/ext/upload/theme.php +++ b/ext/upload/theme.php @@ -56,7 +56,7 @@ class UploadTheme extends Themelet Files URLs - Image-Specific Tags + Post-Specific Tags "; @@ -73,7 +73,7 @@ class UploadTheme extends Themelet $upload_list .= " Files - Image-Specific Tags + Post-Specific Tags "; @@ -122,7 +122,7 @@ class UploadTheme extends Themelet } )();'; $html .= 'Upload to '.$title.''; - $html .= ' (Drag & drop onto your bookmarks toolbar, then click when looking at an image)'; + $html .= ' (Drag & drop onto your bookmarks toolbar, then click when looking at a post)'; // Bookmarklet checks if shimmie supports ext. If not, won't upload to site/shows alert saying not supported. $supported_ext = join(" ", DataHandlerExtension::get_all_supported_exts()); @@ -135,7 +135,7 @@ class UploadTheme extends Themelet var maxsize="'.$max_kb.'"; var CA=0; void(document.body.appendChild(document.createElement("script")).src="'.make_http(get_base_href())."/ext/upload/bookmarklet.js".'") - ">'. $title . ' (Click when looking at an image page. Works on sites running Shimmie / Danbooru / Gelbooru. (This also grabs the tags / rating / source!))'; + ">'. $title . ' (Click when looking at a post page. Works on sites running Shimmie / Danbooru / Gelbooru. (This also grabs the tags / rating / source!))'; return $html; } @@ -171,7 +171,7 @@ class UploadTheme extends Themelet $thumbnail = $this->build_thumb_html($image); $html = " -

      Replacing Image ID ".$image_id."
      Please note: You will have to refresh the image page, or empty your browser cache.

      " +

      Replacing Post ID ".$image_id."
      Please note: You will have to refresh the post page, or empty your browser cache.

      " .$thumbnail."
      " .make_form(make_link("upload/replace/".$image_id), "POST", $multipart=true)." @@ -184,10 +184,10 @@ class UploadTheme extends Themelet (Max file size is $max_kb) "; - $page->set_title("Replace Image"); - $page->set_heading("Replace Image"); + $page->set_title("Replace Post"); + $page->set_heading("Replace Post"); $page->add_block(new NavBlock()); - $page->add_block(new Block("Upload Replacement Image", $html, "main", 20)); + $page->add_block(new Block("Upload Replacement Post", $html, "main", 20)); } public function display_upload_status(Page $page, bool $ok) From e4ab2e5d398a854eaa0497780fc28850cba1bfed Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:19:14 -0500 Subject: [PATCH 30/61] Image to Post - alias editor --- ext/alias_editor/test.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/alias_editor/test.php b/ext/alias_editor/test.php index 9829cec3..23cad165 100644 --- a/ext/alias_editor/test.php +++ b/ext/alias_editor/test.php @@ -36,7 +36,7 @@ class AliasEditorTest extends ShimmiePHPUnitTestCase $image_id = $this->post_image("tests/pbx_screenshot.jpg", "test1"); $this->get_page("post/view/$image_id"); # check that the tag has been replaced - $this->assert_title("Image $image_id: test2"); + $this->assert_title("Post $image_id: test2"); $this->get_page("post/list/test1/1"); # searching for an alias should find the master tag $this->assert_response(302); $this->get_page("post/list/test2/1"); # check that searching for the main tag still works @@ -67,13 +67,13 @@ class AliasEditorTest extends ShimmiePHPUnitTestCase $image_id_2 = $this->post_image("tests/bedroom_workshop.jpg", "onetag"); $this->get_page("post/list/onetag/1"); # searching for an aliased tag should find its aliases $this->assert_title("multi tag"); - $this->assert_no_text("No Images Found"); + $this->assert_no_text("No Posts Found"); $this->get_page("post/list/multi/1"); $this->assert_title("multi"); - $this->assert_no_text("No Images Found"); + $this->assert_no_text("No Posts Found"); $this->get_page("post/list/multi tag/1"); $this->assert_title("multi tag"); - $this->assert_no_text("No Images Found"); + $this->assert_no_text("No Posts Found"); $this->delete_image($image_id_1); $this->delete_image($image_id_2); From e6e4e4c962c3034c6c0db5dd41a2edb23b69ec3b Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:20:29 -0500 Subject: [PATCH 31/61] Image to Post - trash --- ext/trash/main.php | 2 +- ext/trash/theme.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/trash/main.php b/ext/trash/main.php index 812cfd69..1bbea8e2 100644 --- a/ext/trash/main.php +++ b/ext/trash/main.php @@ -32,7 +32,7 @@ class Trash extends Extension } elseif (isset($_POST['image_id'])) { $image_id = $_POST['image_id']; } else { - throw new SCoreException("Can not restore image: No valid Image ID given."); + throw new SCoreException("Can not restore post: No valid Post ID given."); } self::set_trash($image_id, false); diff --git a/ext/trash/theme.php b/ext/trash/theme.php index 21733295..74c9bf96 100644 --- a/ext/trash/theme.php +++ b/ext/trash/theme.php @@ -15,10 +15,10 @@ class TrashTheme extends Themelet public function get_help_html() { - return '

      Search for images in the trash.

      + return '

      Search for posts in the trash.

      in:trash
      -

      Returns images that are in the trash.

      +

      Returns posts that are in the trash.

      '; } From eecb7375015ad15ffec749911d611399eb535320 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:20:40 -0500 Subject: [PATCH 32/61] Image to Post - transcode --- ext/transcode/main.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/transcode/main.php b/ext/transcode/main.php index 7fb9b92d..1b0f427f 100644 --- a/ext/transcode/main.php +++ b/ext/transcode/main.php @@ -201,11 +201,11 @@ class TranscodeImage extends Extension } elseif (isset($_POST['image_id'])) { $image_id = int_escape($_POST['image_id']); } else { - throw new ImageTranscodeException("Can not resize Image: No valid Image ID given."); + throw new ImageTranscodeException("Can not resize Image: No valid Post ID given."); } $image_obj = Image::by_id($image_id); if (is_null($image_obj)) { - $this->theme->display_error(404, "Image not found", "No image in the database has the ID #$image_id"); + $this->theme->display_error(404, "Post not found", "No image in the database has the ID #$image_id"); } else { if (isset($_POST['transcode_mime'])) { try { From df4f2821b230931c6720021363aefd7c797be298 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:20:49 -0500 Subject: [PATCH 33/61] Image to Post - tips --- ext/tips/test.php | 18 +++++++++--------- ext/tips/theme.php | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ext/tips/test.php b/ext/tips/test.php index 1feaceb5..40529e08 100644 --- a/ext/tips/test.php +++ b/ext/tips/test.php @@ -17,14 +17,14 @@ class TipsTest extends ShimmiePHPUnitTestCase $this->get_page("tips/list"); $this->assert_title("Tips List"); - send_event(new CreateTipEvent(true, "", "an imageless tip")); + send_event(new CreateTipEvent(true, "", "a postless tip")); $this->get_page("post/list"); - $this->assert_text("an imageless tip"); + $this->assert_text("a postless tip"); $tip_id = (int)$database->get_one("SELECT id FROM tips"); send_event(new DeleteTipEvent($tip_id)); $this->get_page("post/list"); - $this->assert_no_text("an imageless tip"); + $this->assert_no_text("a postless tip"); } public function testImaged() @@ -35,14 +35,14 @@ class TipsTest extends ShimmiePHPUnitTestCase $this->get_page("tips/list"); $this->assert_title("Tips List"); - send_event(new CreateTipEvent(true, "coins.png", "an imageless tip")); + send_event(new CreateTipEvent(true, "coins.png", "a postless tip")); $this->get_page("post/list"); - $this->assert_text("an imageless tip"); + $this->assert_text("a postless tip"); $tip_id = (int)$database->get_one("SELECT id FROM tips"); send_event(new DeleteTipEvent($tip_id)); $this->get_page("post/list"); - $this->assert_no_text("an imageless tip"); + $this->assert_no_text("a postless tip"); } public function testDisabled() @@ -53,13 +53,13 @@ class TipsTest extends ShimmiePHPUnitTestCase $this->get_page("tips/list"); $this->assert_title("Tips List"); - send_event(new CreateTipEvent(false, "", "an imageless tip")); + send_event(new CreateTipEvent(false, "", "a postless tip")); $this->get_page("post/list"); - $this->assert_no_text("an imageless tip"); + $this->assert_no_text("a postless tip"); $tip_id = (int)$database->get_one("SELECT id FROM tips"); send_event(new DeleteTipEvent($tip_id)); $this->get_page("post/list"); - $this->assert_no_text("an imageless tip"); + $this->assert_no_text("a postless tip"); } } diff --git a/ext/tips/theme.php b/ext/tips/theme.php index 7c49a9d9..8f70030d 100644 --- a/ext/tips/theme.php +++ b/ext/tips/theme.php @@ -4,7 +4,7 @@ class TipsTheme extends Themelet public function manageTips($url, $images) { global $page; - $select = ""; foreach ($images as $image) { $select .= "\n"; @@ -20,7 +20,7 @@ class TipsTheme extends Themelet - Image: + Post: {$select} @@ -60,7 +60,7 @@ class TipsTheme extends Themelet "". "ID". "Enabled". - "Image". + "Post". "Text"; if ($user->can(Permissions::TIPS_ADMIN)) { From 1520e6cfe32071e8d666d81163dc50c6a878e1e9 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:20:59 -0500 Subject: [PATCH 34/61] Image to Post - tag list --- ext/tag_list/config.php | 2 +- ext/tag_list/main.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/tag_list/config.php b/ext/tag_list/config.php index 8a80cdbd..dc4560d6 100644 --- a/ext/tag_list/config.php +++ b/ext/tag_list/config.php @@ -17,7 +17,7 @@ class TagListConfig public const TYPE_TAGS= "tags"; public const TYPE_CHOICES = [ - "Image's tags only" => TagListConfig::TYPE_TAGS, + "Post's tags only" => TagListConfig::TYPE_TAGS, "Show related" => TagListConfig::TYPE_RELATED ]; diff --git a/ext/tag_list/main.php b/ext/tag_list/main.php index 7ff990c5..06b4b463 100644 --- a/ext/tag_list/main.php +++ b/ext/tag_list/main.php @@ -143,7 +143,7 @@ class TagList extends Extension $sb->add_choice_option( TagListConfig::IMAGE_TYPE, TagListConfig::TYPE_CHOICES, - "Image tag list", + "Post tag list", true ); $sb->add_choice_option( From badfaa640088820f8e5178624dff72d49ebc8220 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:21:08 -0500 Subject: [PATCH 35/61] Image to Post - rss --- ext/rss_images/info.php | 2 +- ext/rss_images/main.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/rss_images/info.php b/ext/rss_images/info.php index c01dfbb8..11af74cc 100644 --- a/ext/rss_images/info.php +++ b/ext/rss_images/info.php @@ -5,7 +5,7 @@ class RSSImagesInfo extends ExtensionInfo public const KEY = "rss_images"; public $key = self::KEY; - public $name = "RSS for Images"; + public $name = "RSS for Posts"; public $url = self::SHIMMIE_URL; public $authors = self::SHISH_AUTHOR; public $license = self::LICENSE_GPLV2; diff --git a/ext/rss_images/main.php b/ext/rss_images/main.php index e99c6fae..7cba6b3a 100644 --- a/ext/rss_images/main.php +++ b/ext/rss_images/main.php @@ -11,10 +11,10 @@ class RSSImages extends Extension if (count($event->search_terms) > 0) { $search = url_escape(Tag::caret(Tag::implode($event->search_terms))); $page->add_html_header(""); + "title=\"$title - Posts with tags: $search\" href=\"".make_link("rss/images/$search/1")."\" />"); } else { $page->add_html_header(""); + "title=\"$title - Posts\" href=\"".make_link("rss/images/1")."\" />"); } } From 3fe9774158ba465170deaa51c3991b82d659fd88 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:21:17 -0500 Subject: [PATCH 36/61] Image to Post - rotate --- ext/rotate/main.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/rotate/main.php b/ext/rotate/main.php index 81d53f06..b947ce0d 100644 --- a/ext/rotate/main.php +++ b/ext/rotate/main.php @@ -57,12 +57,12 @@ class RotateImage extends Extension $image_id = isset($_POST['image_id']) ? $_POST['image_id'] : null; } if (empty($image_id)) { - throw new ImageRotateException("Can not rotate Image: No valid Image ID given."); + throw new ImageRotateException("Can not rotate Image: No valid Post ID given."); } $image = Image::by_id($image_id); if (is_null($image)) { - $this->theme->display_error(404, "Image not found", "No image in the database has the ID #$image_id"); + $this->theme->display_error(404, "Post not found", "No image in the database has the ID #$image_id"); } else { /* Check if options were given to rotate an image. */ @@ -104,7 +104,7 @@ class RotateImage extends Extension $image_obj = Image::by_id($image_id); $hash = $image_obj->hash; if (is_null($hash)) { - throw new ImageRotateException("Image does not have a hash associated with it."); + throw new ImageRotateException("Post does not have a hash associated with it."); } $image_filename = warehouse_path(Image::IMAGE_DIR, $hash); From 13ad9d3b6df8d49b10587a75839d265419202d78 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:21:25 -0500 Subject: [PATCH 37/61] Image to Post - resize --- ext/resize/info.php | 2 +- ext/resize/main.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/resize/info.php b/ext/resize/info.php index b5d7057a..477d79ca 100644 --- a/ext/resize/info.php +++ b/ext/resize/info.php @@ -11,7 +11,7 @@ class ResizeImageInfo extends ExtensionInfo public const KEY = "resize"; public $key = self::KEY; - public $name = "Resize Image"; + public $name = "Resize Post"; public $authors = ["jgen"=>"jgen.tech@gmail.com"]; public $license = self::LICENSE_GPLV2; public $description = "This extension allows admins to resize images."; diff --git a/ext/resize/main.php b/ext/resize/main.php index 0b2a371b..de1a95e1 100644 --- a/ext/resize/main.php +++ b/ext/resize/main.php @@ -126,12 +126,12 @@ class ResizeImage extends Extension $image_id = isset($_POST['image_id']) ? int_escape($_POST['image_id']) : null; } if (empty($image_id)) { - throw new ImageResizeException("Can not resize Image: No valid Image ID given."); + throw new ImageResizeException("Can not resize Image: No valid Post ID given."); } $image = Image::by_id($image_id); if (is_null($image)) { - $this->theme->display_error(404, "Image not found", "No image in the database has the ID #$image_id"); + $this->theme->display_error(404, "Post not found", "No image in the database has the ID #$image_id"); } else { /* Check if options were given to resize an image. */ From 93259db601e1c1207a2c11956393172f91bf35d1 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:21:35 -0500 Subject: [PATCH 38/61] Image to Post - report --- ext/report_image/info.php | 4 ++-- ext/report_image/main.php | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ext/report_image/info.php b/ext/report_image/info.php index 290b4c0c..54771baa 100644 --- a/ext/report_image/info.php +++ b/ext/report_image/info.php @@ -5,10 +5,10 @@ class ReportImageInfo extends ExtensionInfo public const KEY = "report_image"; public $key = self::KEY; - public $name = "Report Images"; + public $name = "Report Posts"; public $url = "http://atravelinggeek.com/"; public $authors = ["ATravelingGeek"=>"atg@atravelinggeek.com"]; public $license = self::LICENSE_GPLV2; - public $description = "Report images as dupes/illegal/etc"; + public $description = "Report posts as dupes/illegal/etc"; public $version = "0.3a"; } diff --git a/ext/report_image/main.php b/ext/report_image/main.php index 3ccf6be3..65580cbf 100644 --- a/ext/report_image/main.php +++ b/ext/report_image/main.php @@ -57,7 +57,7 @@ class ReportImage extends Extension $page->set_mode(PageMode::REDIRECT); $page->set_redirect(make_link("post/view/$image_id")); } else { - $this->theme->display_error(500, "Missing input", "Missing image ID or report reason"); + $this->theme->display_error(500, "Missing input", "Missing post ID or report reason"); } } elseif ($event->get_arg(0) == "remove") { if (!empty($_POST['id'])) { @@ -67,7 +67,7 @@ class ReportImage extends Extension $page->set_redirect(make_link("image_report/list")); } } else { - $this->theme->display_error(500, "Missing input", "Missing image ID"); + $this->theme->display_error(500, "Missing input", "Missing post ID"); } } elseif ($event->get_arg(0) == "remove_reports_by" && $user->check_auth_token()) { if ($user->can(Permissions::VIEW_IMAGE_REPORT)) { @@ -128,7 +128,7 @@ class ReportImage extends Extension $count = $this->count_reported_images(); $h_count = $count > 0 ? " ($count)" : ""; - $event->add_nav_link("image_report", new Link('image_report/list'), "Reported Images$h_count"); + $event->add_nav_link("image_report", new Link('image_report/list'), "Reported Posts$h_count"); } } } @@ -139,7 +139,7 @@ class ReportImage extends Extension if ($user->can(Permissions::VIEW_IMAGE_REPORT)) { $count = $this->count_reported_images(); $h_count = $count > 0 ? " ($count)" : ""; - $event->add_link("Reported Images$h_count", make_link("image_report/list")); + $event->add_link("Reported Posts$h_count", make_link("image_report/list")); } } @@ -157,7 +157,7 @@ class ReportImage extends Extension public function onSetupBuilding(SetupBuildingEvent $event) { - $sb = new SetupBlock("Image Reports"); + $sb = new SetupBlock("Post Reports"); $opts = [ "Reporter Only" => "user", From fa2a982303afd9099e21510f9bde5acdd825235f Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:21:45 -0500 Subject: [PATCH 39/61] Image to Post - regen thumb --- ext/regen_thumb/info.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/regen_thumb/info.php b/ext/regen_thumb/info.php index 7f0a8ab5..b4736aea 100644 --- a/ext/regen_thumb/info.php +++ b/ext/regen_thumb/info.php @@ -11,7 +11,7 @@ class RegenThumbInfo extends ExtensionInfo public $license = self::LICENSE_GPLV2; public $description = "Regenerate a thumbnail image"; public $documentation = -"This adds a button in the image control section on an image's view page, which allows an admin to regenerate -an image's thumbnail; useful for instance if the first attempt failed due to lack of memory, and memory has +"This adds a button in the post control section on a post's view page, which allows an admin to regenerate +a post's thumbnail; useful for instance if the first attempt failed due to lack of memory, and memory has since been increased."; } From a1fc842af62c9e3f6e7c02b6ecb2d0de4b8d144b Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:21:55 -0500 Subject: [PATCH 40/61] Image to Post - qr code --- ext/qr_code/info.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/qr_code/info.php b/ext/qr_code/info.php index bdb0b914..684f1531 100644 --- a/ext/qr_code/info.php +++ b/ext/qr_code/info.php @@ -11,7 +11,7 @@ class QRImageInfo extends ExtensionInfo public $license = self::LICENSE_GPLV2; public $description = "Turns BBCode into HTML"; public $documentation = -"Shows a QR Code for downloading an image to cell phones. -Based on Artanis's Link to Image Extension +"Shows a QR Code for downloading a post to cell phones. +Based on Artanis's Link to Post Extension Further modified by Shish to remove the 7MB local QR generator and replace it with a link to google chart APIs"; } From 3ac5d05a2547ac5cc29b3d1be50d10427975ea46 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:22:03 -0500 Subject: [PATCH 41/61] Image to Post - notes --- ext/notes/theme.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/notes/theme.php b/ext/notes/theme.php index abc18993..c6a2c6aa 100644 --- a/ext/notes/theme.php +++ b/ext/notes/theme.php @@ -186,7 +186,7 @@ class NotesTheme extends Themelet $html = "". "". - "". + "". "". "". "". @@ -250,23 +250,23 @@ class NotesTheme extends Themelet public function get_help_html() { - return '

      Search for images with notes.

      + return '

      Search for posts with notes.

      note=noted
      -

      Returns images with a note matching "noted".

      +

      Returns posts with a note matching "noted".

      notes>0
      -

      Returns images with 1 or more notes.

      +

      Returns posts with 1 or more notes.

      Can use <, <=, >, >=, or =.

      notes_by=username
      -

      Returns images with note(s) by "username".

      +

      Returns posts with note(s) by "username".

      notes_by_user_id=123
      -

      Returns images with note(s) by user 123.

      +

      Returns posts with note(s) by user 123.

      '; } From fb4a1391df622c585625afb40b316d1423661d70 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:22:13 -0500 Subject: [PATCH 42/61] Image to Post - pools --- ext/pools/main.php | 2 +- ext/pools/theme.php | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ext/pools/main.php b/ext/pools/main.php index 6ff64e2c..13c93de6 100644 --- a/ext/pools/main.php +++ b/ext/pools/main.php @@ -175,7 +175,7 @@ class Pools extends Extension { $sb = new SetupBlock("Pools"); $sb->add_int_option(PoolsConfig::MAX_IMPORT_RESULTS, "Max results on import: "); - $sb->add_int_option(PoolsConfig::IMAGES_PER_PAGE, "
      Images per page: "); + $sb->add_int_option(PoolsConfig::IMAGES_PER_PAGE, "
      Posts per page: "); $sb->add_int_option(PoolsConfig::LISTS_PER_PAGE, "
      Index list items per page: "); $sb->add_int_option(PoolsConfig::UPDATED_PER_PAGE, "
      Updated list items per page: "); $sb->add_bool_option(PoolsConfig::INFO_ON_VIEW_IMAGE, "
      Show pool info on image: "); diff --git a/ext/pools/theme.php b/ext/pools/theme.php index 63940d16..6f5aea3b 100644 --- a/ext/pools/theme.php +++ b/ext/pools/theme.php @@ -45,7 +45,7 @@ class PoolsTheme extends Themelet $h - + "; } @@ -396,26 +396,26 @@ class PoolsTheme extends Themelet public function get_help_html() { - return '

      Search for images that are in a pool.

      + return '

      Search for posts that are in a pool.

      pool=1
      -

      Returns images in pool #1.

      +

      Returns posts in pool #1.

      pool=any
      -

      Returns images in any pool.

      +

      Returns posts in any pool.

      pool=none
      -

      Returns images not in any pool.

      +

      Returns posts not in any pool.

      pool_by_name=swimming
      -

      Returns images in the "swimming" pool.

      +

      Returns posts in the "swimming" pool.

      pool_by_name=swimming_pool
      -

      Returns images in the "swimming pool" pool. Note that the underscore becomes a space

      +

      Returns posts in the "swimming pool" pool. Note that the underscore becomes a space

      '; } From cc8f32a65e191cdfeb32dd41dfbbf5bf04073fe5 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:22:30 -0500 Subject: [PATCH 43/61] Image to Post - bulk import export --- ext/bulk_import_export/main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/bulk_import_export/main.php b/ext/bulk_import_export/main.php index afe30984..f5f76374 100644 --- a/ext/bulk_import_export/main.php +++ b/ext/bulk_import_export/main.php @@ -36,7 +36,7 @@ class BulkImportExport extends DataHandlerExtension $image = Image::by_hash($item->hash); if ($image!=null) { $skipped++; - log_info(BulkImportExportInfo::KEY, "Image $item->hash already present, skipping"); + log_info(BulkImportExportInfo::KEY, "Post $item->hash already present, skipping"); $database->commit(); continue; } From 497df530dde6bdaafbfed16d37419a94185e17d6 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:22:38 -0500 Subject: [PATCH 44/61] Image to Post - autotagger --- ext/auto_tagger/test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/auto_tagger/test.php b/ext/auto_tagger/test.php index 9d1e096d..d4e9a6eb 100644 --- a/ext/auto_tagger/test.php +++ b/ext/auto_tagger/test.php @@ -37,14 +37,14 @@ class AutoTaggerTest extends ShimmiePHPUnitTestCase $image_id = $this->post_image("tests/pbx_screenshot.jpg", "test1"); $this->get_page("post/view/$image_id"); # check that the tag has been replaced - $this->assert_title("Image $image_id: test1 test2"); + $this->assert_title("Post $image_id: test1 test2"); $this->delete_image($image_id); send_event(new AddAutoTagEvent("test2", "test3")); $image_id = $this->post_image("tests/pbx_screenshot.jpg", "test1"); $this->get_page("post/view/$image_id"); # check that the tag has been replaced - $this->assert_title("Image $image_id: test1 test2 test3"); + $this->assert_title("Post $image_id: test1 test2 test3"); $this->delete_image($image_id); send_event(new DeleteAutoTagEvent("test1")); From 08d28a2513b332e101697d92ac3f0f73977087eb Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:22:48 -0500 Subject: [PATCH 45/61] Image to Post - bbcode --- ext/bbcode/info.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/bbcode/info.php b/ext/bbcode/info.php index d01ac5b5..5ee10f5a 100644 --- a/ext/bbcode/info.php +++ b/ext/bbcode/info.php @@ -27,6 +27,6 @@ class BBCodeInfo extends ExtensionInfo
    • [[wiki article|with some text]]
    • [quote]text[/quote]
    • [quote=Username]text[/quote] -
    • >>123 (link to image #123) +
    • >>123 (link to post #123) "; } From 13582d842f43d441c5ad638255a810cd949d3e21 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:22:58 -0500 Subject: [PATCH 46/61] Image to Post - eokm --- ext/eokm/main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/eokm/main.php b/ext/eokm/main.php index 2cde369f..83e43633 100644 --- a/ext/eokm/main.php +++ b/ext/eokm/main.php @@ -29,7 +29,7 @@ class Eokm extends Extension // all ok } elseif ($return == "true") { log_warning("eokm", "User tried to upload banned image {$event->image->hash}"); - throw new UploadException("Image banned"); + throw new UploadException("Post banned"); } else { log_warning("eokm", "Unexpected return from EOKM: $return"); } From 1dcb694f3de8e46e1eef97bc08e0385aef0b6e8f Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:23:22 -0500 Subject: [PATCH 47/61] Image to Post - not a tag --- ext/not_a_tag/main.php | 2 +- ext/not_a_tag/test.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/not_a_tag/main.php b/ext/not_a_tag/main.php index be1c3e22..2658fb71 100644 --- a/ext/not_a_tag/main.php +++ b/ext/not_a_tag/main.php @@ -147,7 +147,7 @@ class NotATag extends Extension "DELETE FROM untags WHERE LOWER(tag) = LOWER(:tag)", ["tag"=>$input['d_tag']] ); - $page->flash("Image ban removed"); + $page->flash("Post ban removed"); $page->set_mode(PageMode::REDIRECT); $page->set_redirect(referer_or(make_link())); } elseif ($event->get_arg(0) == "list") { diff --git a/ext/not_a_tag/test.php b/ext/not_a_tag/test.php index a75f0a77..64495acf 100644 --- a/ext/not_a_tag/test.php +++ b/ext/not_a_tag/test.php @@ -13,12 +13,12 @@ class NotATagTest extends ShimmiePHPUnitTestCase // Original $this->get_page("post/view/$image_id"); - $this->assert_title("Image $image_id: pbx"); + $this->assert_title("Post $image_id: pbx"); // Modified OK send_event(new TagSetEvent($image, ["two"])); $this->get_page("post/view/$image_id"); - $this->assert_title("Image $image_id: two"); + $this->assert_title("Post $image_id: two"); // Modified Bad as user - redirect try { @@ -28,12 +28,12 @@ class NotATagTest extends ShimmiePHPUnitTestCase $this->assertTrue(true); } $this->get_page("post/view/$image_id"); - $this->assert_title("Image $image_id: two"); + $this->assert_title("Post $image_id: two"); // Modified Bad as admin - ignore (should warn?) $this->log_in_as_admin(); send_event(new TagSetEvent($image, ["four", "face"])); $this->get_page("post/view/$image_id"); - $this->assert_title("Image $image_id: four"); + $this->assert_title("Post $image_id: four"); } } From 8910de48c1f71711684ca29875309714a8b97668 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:23:32 -0500 Subject: [PATCH 48/61] Image to Post - relationships --- ext/relationships/theme.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/ext/relationships/theme.php b/ext/relationships/theme.php index 4cd63984..8b484fa6 100644 --- a/ext/relationships/theme.php +++ b/ext/relationships/theme.php @@ -50,27 +50,27 @@ class RelationshipsTheme extends Themelet public function get_help_html() { - return '

      Search for images that have parent/child relationships.

      + return '

      Search for posts that have parent/child relationships.

      parent=any
      -

      Returns images that have a parent.

      -
      +

      Returns posts that have a parent.

      +
      parent=none
      -

      Returns images that have no parent.

      -
      +

      Returns posts that have no parent.

      +
      parent=123
      -

      Returns images that have image 123 set as parent.

      -
      +

      Returns posts that have image 123 set as parent.

      +
      child=any
      -

      Returns images that have at least 1 child.

      -
      +

      Returns posts that have at least 1 child.

      +
      child=none
      -

      Returns images that have no children.

      -
      +

      Returns posts that have no children.

      + '; } } From 8d2fe223582bca07a6c827b596518d6cc628f8cb Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:23:41 -0500 Subject: [PATCH 49/61] Image to Post - rule34 --- ext/rule34/main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/rule34/main.php b/ext/rule34/main.php index ffb466e9..311f915e 100644 --- a/ext/rule34/main.php +++ b/ext/rule34/main.php @@ -39,7 +39,7 @@ class Rule34 extends Extension $html = (string)TR( TH("Links"), TD( - A(["href"=>$url0], "Image Only"), + A(["href"=>$url0], "File Only"), " (", A(["href"=>$url1], "Backup Server"), ")" From 4e2faa97f9e80edad54ab016529bf1784c4d9f0a Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:23:49 -0500 Subject: [PATCH 50/61] Image to Post - source history --- ext/source_history/theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/source_history/theme.php b/ext/source_history/theme.php index 052655aa..649eda76 100644 --- a/ext/source_history/theme.php +++ b/ext/source_history/theme.php @@ -19,7 +19,7 @@ class SourceHistoryTheme extends Themelet { $history_html = $this->history_list($history, true); - $page->set_title('Image '.$image_id.' Source History'); + $page->set_title('Post '.$image_id.' Source History'); $page->set_heading('Source History: '.$image_id); $page->add_block(new NavBlock()); $page->add_block(new Block("Source History", $history_html, "main", 10)); From 2aa4634ef18e99125622fb35fb891e6c851cff76 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:23:57 -0500 Subject: [PATCH 51/61] Image to Post - tag categories --- ext/tag_categories/theme.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/tag_categories/theme.php b/ext/tag_categories/theme.php index f862198a..79d4f6a3 100644 --- a/ext/tag_categories/theme.php +++ b/ext/tag_categories/theme.php @@ -101,14 +101,14 @@ class TagCategoriesTheme extends Themelet public function get_help_html() { - return '

      Search for images containing a certain number of tags with the specified tag category.

      + return '

      Search for posts containing a certain number of tags with the specified tag category.

      persontags=1
      -

      Returns images with exactly 1 tag with the tag category "person".

      +

      Returns posts with exactly 1 tag with the tag category "person".

      cattags>0
      -

      Returns images with 1 or more tags with the tag category "cat".

      +

      Returns posts with 1 or more tags with the tag category "cat".

      Can use <, <=, >, >=, or =.

      Category name is not case sensitive, category must exist for search to work.

      From d6a2b3840c08f696681b27bfa6b716743115333d Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:24:05 -0500 Subject: [PATCH 52/61] Image to Post - tag history --- ext/tag_history/test.php | 2 +- ext/tag_history/theme.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/tag_history/test.php b/ext/tag_history/test.php index fc441aff..7786a9f3 100644 --- a/ext/tag_history/test.php +++ b/ext/tag_history/test.php @@ -9,7 +9,7 @@ class TagHistoryTest extends ShimmiePHPUnitTestCase // Original $this->get_page("post/view/$image_id"); - $this->assert_title("Image $image_id: old_tag"); + $this->assert_title("Post $image_id: old_tag"); // Modified send_event(new TagSetEvent($image, ["new_tag"])); diff --git a/ext/tag_history/theme.php b/ext/tag_history/theme.php index df3bef0c..892f19e7 100644 --- a/ext/tag_history/theme.php +++ b/ext/tag_history/theme.php @@ -19,7 +19,7 @@ class TagHistoryTheme extends Themelet { $history_html = $this->history_list($history, true); - $page->set_title('Image '.$image_id.' Tag History'); + $page->set_title('Post '.$image_id.' Tag History'); $page->set_heading('Tag History: '.$image_id); $page->add_block(new NavBlock()); $page->add_block(new Block("Tag History", $history_html, "main", 10)); From ee30c6d06e01fe8c5c9ec4e811aa0ec380adeb41 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:24:44 -0500 Subject: [PATCH 53/61] Image to Post - artists --- ext/artists/theme.php | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/ext/artists/theme.php b/ext/artists/theme.php index 0041d495..f3a52d24 100644 --- a/ext/artists/theme.php +++ b/ext/artists/theme.php @@ -27,19 +27,19 @@ class ArtistsTheme extends Themelet "; } - + if ($mode == "editor") { $html = "
      ".$user->get_auth_html()." - +
      ".$user->get_auth_html()." "; - + if ($is_admin) { $html .= "
      ".$user->get_auth_html()." @@ -47,19 +47,19 @@ class ArtistsTheme extends Themelet "; } - + $html .= "
      ".$user->get_auth_html()." - +
      ".$user->get_auth_html()." - +
      ".$user->get_auth_html()." @@ -131,7 +131,7 @@ class ArtistsTheme extends Themelet global $page; $page->add_block(new Block("Edit artist", $html, "main", 10)); } - + public function new_artist_composer() { global $page, $user; @@ -152,7 +152,7 @@ class ArtistsTheme extends Themelet $page->set_heading("Artists"); $page->add_block(new Block("Artists", $html, "main", 10)); } - + public function list_artists($artists, $pageNumber, $totalPages) { global $user, $page; @@ -167,7 +167,7 @@ class ArtistsTheme extends Themelet if (!$user->is_anonymous()) { $html .= "
    • "; } // space for edit link - + $html .= ""; $deletionLinkActionArray = [ @@ -244,7 +244,7 @@ class ArtistsTheme extends Themelet
      ImagePostNoteBodyUpdater Action
      - + '; global $page; @@ -354,7 +354,7 @@ class ArtistsTheme extends Themelet "; - + if ($userIsLogged) { $html .= ""; } @@ -402,13 +402,13 @@ class ArtistsTheme extends Themelet $artist_images = ""; foreach ($images as $image) { $thumb_html = $this->build_thumb_html($image); - + $artist_images .= ''. ''.$thumb_html.''. ''; } - - $page->add_block(new Block("Artist Images", $artist_images, "main", 20)); + + $page->add_block(new Block("Artist Posts", $artist_images, "main", 20)); } private function render_aliases(array $aliases, bool $userIsLogged, bool $userIsAdmin): string @@ -548,11 +548,11 @@ class ArtistsTheme extends Themelet public function get_help_html() { - return '

      Search for images with a particular artist.

      + return '

      Search for posts with a particular artist.

      artist=leonardo
      -

      Returns images with the artist "leonardo".

      -
      +

      Returns posts with the artist "leonardo".

      +
'; } } From cef07afcbd0ebfeba3ef05b5774aae42d6f4ce48 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:25:27 -0500 Subject: [PATCH 54/61] Image to Post - bulk add csv --- ext/bulk_add_csv/info.php | 10 +++++----- ext/bulk_add_csv/theme.php | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ext/bulk_add_csv/info.php b/ext/bulk_add_csv/info.php index 35f72e1f..71230903 100644 --- a/ext/bulk_add_csv/info.php +++ b/ext/bulk_add_csv/info.php @@ -9,16 +9,16 @@ class BulkAddCSVInfo extends ExtensionInfo public $url = self::SHIMMIE_URL; public $authors = ["velocity37"=>"velocity37@gmail.com"]; public $license = self::LICENSE_GPLV2; - public $description = "Bulk add server-side images with metadata from CSV file"; + public $description = "Bulk add server-side posts with metadata from CSV file"; public $documentation = "Modification of \"Bulk Add\" by Shish.

-Adds images from a CSV with the five following values:
+Adds posts from a CSV with the five following values:
\"/path/to/image.jpg\",\"spaced tags\",\"source\",\"rating s/q/e\",\"/path/thumbnail.jpg\"
e.g. \"/tmp/cat.png\",\"shish oekaki\",\"shimmie.shishnet.org\",\"s\",\"tmp/custom.jpg\"

Any value but the first may be omitted, but there must be five values per line.
e.g. \"/why/not/try/bulk_add.jpg\",\"\",\"\",\"\",\"\"

-Image thumbnails will be displayed at the AR of the full image. Thumbnails that are +Post thumbnails will be displayed at the AR of the full post. Thumbnails that are normally static (e.g. SWF) will be displayed at the board's max thumbnail size

-Useful for importing tagged images without having to do database manipulation.
-

Note: requires \"Admin Controls\" and optionally \"Image Ratings\" to be enabled

"; +Useful for importing tagged posts without having to do database manipulation.
+

Note: requires \"Admin Controls\" and optionally \"Post Ratings\" to be enabled

"; } diff --git a/ext/bulk_add_csv/theme.php b/ext/bulk_add_csv/theme.php index b552b07d..f001bfea 100644 --- a/ext/bulk_add_csv/theme.php +++ b/ext/bulk_add_csv/theme.php @@ -9,8 +9,8 @@ class BulkAddCSVTheme extends Themelet */ public function display_upload_results(Page $page) { - $page->set_title("Adding images from csv"); - $page->set_heading("Adding images from csv"); + $page->set_title("Adding posts from csv"); + $page->set_heading("Adding posts from csv"); $page->add_block(new NavBlock()); foreach ($this->messages as $block) { $page->add_block($block); @@ -26,8 +26,8 @@ class BulkAddCSVTheme extends Themelet { global $page; $html = " - Add images from a csv. Images will be tagged and have their - source and rating set (if \"Image Ratings\" is enabled) + Add posts from a csv. Posts will be tagged and have their + source and rating set (if \"Post Ratings\" is enabled)
Specify the absolute or relative path to a local .csv file. Check here for the expected format.

".make_form(make_link("bulk_add_csv"))." From 15c9cf453b7050e6ff73f021aa5e8fd663aef4c6 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:26:23 -0500 Subject: [PATCH 55/61] Image to Post - rule34 theme --- themes/rule34v2/index.theme.php | 2 +- themes/rule34v2/themelet.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/rule34v2/index.theme.php b/themes/rule34v2/index.theme.php index 04aab4fe..cae9dafa 100644 --- a/themes/rule34v2/index.theme.php +++ b/themes/rule34v2/index.theme.php @@ -31,7 +31,7 @@ class CustomIndexTheme extends IndexTheme } else { $this->display_error( 404, - "No Images Found", + "No Posts Found", "No images were found to match the search criteria. Try looking up a character/series/artist by another name if they go by more than one. Remember to use underscores in place of spaces and not to use commas. If you came to this page by following a link, try using the search box directly instead. See the FAQ for more information." ); } diff --git a/themes/rule34v2/themelet.class.php b/themes/rule34v2/themelet.class.php index e8a5efc6..345b015a 100644 --- a/themes/rule34v2/themelet.class.php +++ b/themes/rule34v2/themelet.class.php @@ -27,7 +27,7 @@ class Themelet extends BaseThemelet $html = "

". ''.$h_tip.''. - '
Image Only'. + '
File Only'. " - Ban". "
\n"; From de084d2c5587fcae0947543c2e128e4453b1198c Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:26:33 -0500 Subject: [PATCH 56/61] Image to Post - material theme --- themes/material/view.theme.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/material/view.theme.php b/themes/material/view.theme.php index f81b56e0..f82ababc 100644 --- a/themes/material/view.theme.php +++ b/themes/material/view.theme.php @@ -16,7 +16,7 @@ class CustomViewImageTheme extends ViewImageTheme public function display_admin_block(Page $page, $parts) { if (count($parts) > 0) { - $page->add_block(new Block("Image Controls", join("
", $parts), "drawer", 50)); + $page->add_block(new Block("Post Controls", join("
", $parts), "drawer", 50)); } } @@ -41,7 +41,7 @@ class CustomViewImageTheme extends ViewImageTheme global $user; if (count($editor_parts) == 0) { - return ($image->is_locked() ? "
[Image Locked]" : ""); + return ($image->is_locked() ? "
[Post Locked]" : ""); } $html = make_form(make_link("post/set"))." From 992d97d2781b99164471310a1963d5d222d7cde4 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:26:43 -0500 Subject: [PATCH 57/61] Image to Post - lite theme --- themes/lite/view.theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/lite/view.theme.php b/themes/lite/view.theme.php index 6b417887..1ab5f27d 100644 --- a/themes/lite/view.theme.php +++ b/themes/lite/view.theme.php @@ -5,7 +5,7 @@ class CustomViewImageTheme extends ViewImageTheme public function display_page(Image $image, $editor_parts) { global $page; - $page->set_title("Image {$image->id}: ".$image->get_tag_list()); + $page->set_title("Post {$image->id}: ".$image->get_tag_list()); $page->set_heading(html_escape($image->get_tag_list())); $page->add_block(new Block("Navigation", $this->build_navigation($image), "left", 0)); $page->add_block(new Block("Statistics", $this->build_stats($image), "left", 15)); From f869eaefcd137a64effd44ef3cde184cd201d7c6 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:26:55 -0500 Subject: [PATCH 58/61] Image to Post - danbooru2 theme --- themes/danbooru2/index.theme.php | 2 +- themes/danbooru2/page.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/danbooru2/index.theme.php b/themes/danbooru2/index.theme.php index 73a2da10..72d7aa57 100644 --- a/themes/danbooru2/index.theme.php +++ b/themes/danbooru2/index.theme.php @@ -17,7 +17,7 @@ class CustomIndexTheme extends IndexTheme if (count($images) > 0) { $this->display_page_images($page, $images); } else { - $this->display_error(404, "No Images Found", "No images were found to match the search criteria"); + $this->display_error(404, "No Posts Found", "No images were found to match the search criteria"); } } diff --git a/themes/danbooru2/page.class.php b/themes/danbooru2/page.class.php index 32e96a39..26eec382 100644 --- a/themes/danbooru2/page.class.php +++ b/themes/danbooru2/page.class.php @@ -73,7 +73,7 @@ class Page extends BasePage $sub_block_html .= $block->body; // $this->block_to_html($block, true); break; case "main": - if ($block->header == "Images") { + if ($block->header == "Posts") { $block->header = " "; } $main_block_html .= $block->get_html(false); From c18c7347bf36b9aa658439b3ed2b55db907761c7 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:27:04 -0500 Subject: [PATCH 59/61] Image to Post - danbooru theme --- themes/danbooru/index.theme.php | 6 +++--- themes/danbooru/page.class.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/themes/danbooru/index.theme.php b/themes/danbooru/index.theme.php index 7b72857b..65855620 100644 --- a/themes/danbooru/index.theme.php +++ b/themes/danbooru/index.theme.php @@ -26,14 +26,14 @@ class CustomIndexTheme extends IndexTheme $page->add_block(new Block("Search", $nav, "left", 0)); if (count($images) > 0) { if ($query) { - $page->add_block(new Block("Images", $this->build_table($images, "search=$query"), "main", 10)); + $page->add_block(new Block("Posts", $this->build_table($images, "search=$query"), "main", 10)); $this->display_paginator($page, "post/list/$query", null, $this->page_number, $this->total_pages); } else { - $page->add_block(new Block("Images", $this->build_table($images, null), "main", 10)); + $page->add_block(new Block("Posts", $this->build_table($images, null), "main", 10)); $this->display_paginator($page, "post/list", null, $this->page_number, $this->total_pages); } } else { - $page->add_block(new Block("No Images Found", "No images were found to match the search criteria")); + $page->add_block(new Block("No Posts Found", "No images were found to match the search criteria")); } } diff --git a/themes/danbooru/page.class.php b/themes/danbooru/page.class.php index beb9ca93..5b593d63 100644 --- a/themes/danbooru/page.class.php +++ b/themes/danbooru/page.class.php @@ -74,7 +74,7 @@ class Page extends BasePage $sub_block_html .= $block->body; // $this->block_to_html($block, true); break; case "main": - if ($block->header == "Images") { + if ($block->header == "Posts") { $block->header = " "; } $main_block_html .= $block->get_html(false); From b4169821ed40d09954fde7566b7c1ddebad4529c Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:27:26 -0500 Subject: [PATCH 60/61] Image to Post - transcode video --- ext/transcode_video/main.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/transcode_video/main.php b/ext/transcode_video/main.php index 57faef4b..9cd2a717 100644 --- a/ext/transcode_video/main.php +++ b/ext/transcode_video/main.php @@ -111,7 +111,7 @@ class TranscodeVideo extends Extension } $image_obj = Image::by_id($image_id); if (is_null($image_obj)) { - $this->theme->display_error(404, "Image not found", "No image in the database has the ID #$image_id"); + $this->theme->display_error(404, "Post not found", "No post in the database has the ID #$image_id"); } else { if (isset($_POST['transcode_format'])) { try { @@ -231,7 +231,7 @@ class TranscodeVideo extends Extension /* Move the new image into the main storage location */ $target = warehouse_path(Image::IMAGE_DIR, $new_image->hash); if (!@copy($tmp_filename, $target)) { - throw new VideoTranscodeException("Failed to copy new image file from temporary location ({$tmp_filename}) to archive ($target)"); + throw new VideoTranscodeException("Failed to copy new post file from temporary location ({$tmp_filename}) to archive ($target)"); } send_event(new ImageReplaceEvent($image->id, $new_image)); From ba982e44517402b5010e5667f49ee8e121546e28 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 10:28:12 -0500 Subject: [PATCH 61/61] Image to Post - cron upload --- ext/cron_uploader/main.php | 14 +++++++------- ext/cron_uploader/theme.php | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ext/cron_uploader/main.php b/ext/cron_uploader/main.php index be707e4c..f8bce0a1 100644 --- a/ext/cron_uploader/main.php +++ b/ext/cron_uploader/main.php @@ -419,10 +419,10 @@ class CronUploader extends Extension if ($corrupt) { // Move to corrupt dir $newDir = join_path($this->get_failed_dir(), $output_subdir, $relativeDir); - $info = "ERROR: Image was not uploaded. "; + $info = "ERROR: Post was not uploaded. "; } else { $newDir = join_path($this->get_uploaded_dir(), $output_subdir, $relativeDir); - $info = "Image successfully uploaded. "; + $info = "Post successfully uploaded. "; } $newDir = str_replace(DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, $newDir); @@ -434,7 +434,7 @@ class CronUploader extends Extension // move file to correct dir rename($path, $newFile); - $this->log_message(SCORE_LOG_INFO, $info . "Image \"$filename\" moved from queue to \"$newDir\"."); + $this->log_message(SCORE_LOG_INFO, $info . "Post \"$filename\" moved from queue to \"$newDir\"."); } /** @@ -462,14 +462,14 @@ class CronUploader extends Extension // Generate info message if ($event->image_id == -1) { - if(array_key_exists("mime",$event->metadata)) { + if (array_key_exists("mime", $event->metadata)) { throw new UploadException("File type not recognised (".$event->metadata["mime"]."). Filename: {$filename}"); } throw new UploadException("File type not recognised. Filename: {$filename}"); } elseif ($event->merged === true) { - $infomsg = "Image merged. ID: {$event->image_id} - Filename: {$filename}"; + $infomsg = "Post merged. ID: {$event->image_id} - Filename: {$filename}"; } else { - $infomsg = "Image uploaded. ID: {$event->image_id} - Filename: {$filename}"; + $infomsg = "Post uploaded. ID: {$event->image_id} - Filename: {$filename}"; } $this->log_message(SCORE_LOG_INFO, $infomsg); @@ -511,7 +511,7 @@ class CronUploader extends Extension $base = $this->get_queue_dir(); if (!is_dir($base)) { - $this->log_message(SCORE_LOG_WARNING, "Image Queue Directory could not be found at \"$base\"."); + $this->log_message(SCORE_LOG_WARNING, "Post Queue Directory could not be found at \"$base\"."); return; } diff --git a/ext/cron_uploader/theme.php b/ext/cron_uploader/theme.php index e3a1a43c..a829781a 100644 --- a/ext/cron_uploader/theme.php +++ b/ext/cron_uploader/theme.php @@ -54,7 +54,7 @@ class CronUploaderTheme extends Themelet
  • Create a cron job or something else that can open a url on specified times.
    cron is a service that runs commands over and over again on a a schedule. You can set up cron (or any similar tool) to run the command above to trigger the import on whatever schedule you desire.
    If you're not sure how to do this, you can give the command to your web host and you can ask them to create the cron job for you. -
    When you create the cron job, you choose when to upload new images.
  • +
    When you create the cron job, you choose when to upload new posts. ";