Image to Post - link

This commit is contained in:
Matthew Barbour 2020-10-26 10:16:45 -05:00
parent 708acd461c
commit 64649133e2
4 changed files with 9 additions and 9 deletions

View file

@ -5,7 +5,7 @@ class LinkImageInfo extends ExtensionInfo
public const KEY = "link_image";
public $key = self::KEY;
public $name = "Link to Image";
public $name = "Link to Post";
public $authors = ["Artanis"=>"artanis.00@gmail.com"];
public $description = "Show various forms of link to each image, for copy & paste";
public $license = self::LICENSE_GPLV2;
@ -25,9 +25,9 @@ It takes the following arguments as well as plain text.
|| \$title || The site title as set in Config. ||
</pre>
<p>Link to Image will default this option to '\$title - \$id (\$ext \$size \$filesize)'.
<p>Link to Post will default this option to '\$title - \$id (\$ext \$size \$filesize)'.
<p>To reset to the default, simply clear the current setting. Link to Image
<p>To reset to the default, simply clear the current setting. Link to Post
will then fill in the default value after the save.
<p>To leave the setting blank for any reason, leave a space (' ') in it.";

View file

@ -13,7 +13,7 @@ class LinkImage extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
$sb = new SetupBlock("Link to Image");
$sb = new SetupBlock("Link to Post");
$sb->add_text_option("ext_link-img_text-link_format", "Text Link Format: ");
$event->panel->add_block($sb);
}

View file

@ -11,6 +11,6 @@ class LinkImageTest extends ShimmiePHPUnitTestCase
preg_match("#value='https?://.*/(post/view/[0-9]+)'#", $this->page_to_text(), $matches);
$this->assertTrue(count($matches) > 0);
$page = $this->get_page($matches[1]);
$this->assertEquals("Image $image_id: pie", $page->title);
$this->assertEquals("Post $image_id: pie", $page->title);
}
}

View file

@ -10,7 +10,7 @@ class LinkImageTheme extends Themelet
$page->add_block(new Block(
"Link to Image",
"Link to Post",
"
<table><tr>
@ -20,7 +20,7 @@ class LinkImageTheme extends Themelet
".
$this->link_code("Link", $this->url($post_link, $text_link, "ubb"), "ubb_text-link").
$this->link_code("Thumb", $this->url($post_link, $this->img($thumb_src, "ubb"), "ubb"), "ubb_thumb-link").
$this->link_code("Image", $this->img($image_src, "ubb"), "ubb_full-img").
$this->link_code("File", $this->img($image_src, "ubb"), "ubb_full-img").
"
</table>
</fieldset></td>
@ -31,7 +31,7 @@ class LinkImageTheme extends Themelet
".
$this->link_code("Link", $this->url($post_link, $text_link, "html"), "html_text-link").
$this->link_code("Thumb", $this->url($post_link, $this->img($thumb_src, "html"), "html"), "html_thumb-link").
$this->link_code("Image", $this->img($image_src, "html"), "html_full-image").
$this->link_code("File", $this->img($image_src, "html"), "html_full-image").
"
</table>
</fieldset></td>
@ -42,7 +42,7 @@ class LinkImageTheme extends Themelet
".
$this->link_code("Link", $post_link, "text_post-link").
$this->link_code("Thumb", $thumb_src, "text_thumb-url").
$this->link_code("Image", $image_src, "text_image-src").
$this->link_code("File", $image_src, "text_image-src").
"
</table>
</fieldset></td>