From cb81e46f9eebf51f9418d8bd9e2f5f1600ec36fc Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 26 Oct 2020 08:46:00 -0500 Subject: [PATCH] Changing images to posts --- ext/featured/info.php | 6 +++--- ext/featured/main.php | 2 +- ext/featured/test.php | 4 ++-- ext/featured/theme.php | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ext/featured/info.php b/ext/featured/info.php index 23e42a90..dc3e8bad 100644 --- a/ext/featured/info.php +++ b/ext/featured/info.php @@ -5,7 +5,7 @@ class FeaturedInfo extends ExtensionInfo public const KEY = "featured"; public $key = self::KEY; - public $name = "Featured Image"; + public $name = "Featured Post"; public $url = self::SHIMMIE_URL; public $authors = self::SHISH_AUTHOR; public $license = self::LICENSE_GPLV2; @@ -15,9 +15,9 @@ class FeaturedInfo extends ExtensionInfo to the other image 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 image +

Viewing a featured post
Visit /featured_image/view -

Downloading a featured image +

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 can set your desktop wallpaper to be the download URL, refreshed diff --git a/ext/featured/main.php b/ext/featured/main.php index 8e427c7f..f0227766 100644 --- a/ext/featured/main.php +++ b/ext/featured/main.php @@ -20,7 +20,7 @@ class Featured extends Extension $id = int_escape($_POST['image_id']); if ($id > 0) { $config->set_int("featured_id", $id); - log_info("featured", "Featured image set to >>$id", "Featured image set"); + log_info("featured", "Featured post set to >>$id", "Featured post set"); $page->set_mode(PageMode::REDIRECT); $page->set_redirect(make_link("post/view/$id")); } diff --git a/ext/featured/test.php b/ext/featured/test.php index bd3a7c1f..66de698e 100644 --- a/ext/featured/test.php +++ b/ext/featured/test.php @@ -18,7 +18,7 @@ class FeaturedTest extends ShimmiePHPUnitTestCase $config->set_int("featured_id", $image_id); $this->get_page("post/list"); - $this->assert_text("Featured Image"); + $this->assert_text("Featured Post"); # FIXME: test changing from one feature to another @@ -31,6 +31,6 @@ class FeaturedTest extends ShimmiePHPUnitTestCase // after deletion, there should be no feature $this->delete_image($image_id); $this->get_page("post/list"); - $this->assert_no_text("Featured Image"); + $this->assert_no_text("Featured Post"); } } diff --git a/ext/featured/theme.php b/ext/featured/theme.php index d82c1a32..8d94d3fc 100644 --- a/ext/featured/theme.php +++ b/ext/featured/theme.php @@ -8,7 +8,7 @@ class FeaturedTheme extends Themelet { public function display_featured(Page $page, Image $image): void { - $page->add_block(new Block("Featured Image", $this->build_featured_html($image), "left", 3)); + $page->add_block(new Block("Featured Post", $this->build_featured_html($image), "left", 3)); } public function get_buttons_html(int $image_id): string