Merge branch 'image2post'
This commit is contained in:
commit
ecafd4e131
112 changed files with 377 additions and 376 deletions
|
@ -560,7 +560,7 @@ EOD;
|
|||
$contact = empty($contact_link) ? "" : "<br><a href='$contact_link'>Contact</a>";
|
||||
|
||||
return "
|
||||
Images © their respective owners,
|
||||
Media © their respective owners,
|
||||
<a href=\"https://code.shishnet.org/shimmie2/\">Shimmie</a> ©
|
||||
<a href=\"https://www.shishnet.org/\">Shish</a> &
|
||||
<a href=\"https://github.com/shish/shimmie2/graphs/contributors\">The Team</a>
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -396,7 +396,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}");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -648,7 +648,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)");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -665,7 +665,7 @@ class Image
|
|||
global $database;
|
||||
if ($locked !== $this->locked) {
|
||||
$database->execute("UPDATE images SET locked=:yn WHERE id=:id", ["yn"=>$locked, "id"=>$this->id]);
|
||||
log_info("core_image", "Setting Image #{$this->id} lock to: $locked");
|
||||
log_info("core_image", "Setting Post #{$this->id} lock to: $locked");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -782,7 +782,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");
|
||||
}
|
||||
}
|
||||
|
@ -795,7 +795,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());
|
||||
|
@ -807,7 +807,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());
|
||||
}
|
||||
|
|
|
@ -15,9 +15,9 @@ class AdminPageInfo extends ExtensionInfo
|
|||
<p>Lowercase all tags:
|
||||
<br>Set all tags to lowercase for consistency
|
||||
<p>Recount tag use:
|
||||
<br>If the counts of images per tag get messed up somehow, this will reset them, and remove any unused tags
|
||||
<br>If the counts of posts per tag get messed up somehow, this will reset them, and remove any unused tags
|
||||
<p>Database dump:
|
||||
<br>Download the contents of the database in plain text format, useful for backups.
|
||||
<p>Image dump:
|
||||
<br>Download all the images as a .zip file (Requires ZipArchive)";
|
||||
<p>Post dump:
|
||||
<br>Download all the posts as a .zip file (Requires ZipArchive)";
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ class Approval extends Extension
|
|||
$image_id = isset($_POST['image_id']) ? $_POST['image_id'] : null;
|
||||
}
|
||||
if (empty($image_id)) {
|
||||
throw new SCoreException("Can not approve image: No valid Image ID given.");
|
||||
throw new SCoreException("Can not approve post: No valid Post ID given.");
|
||||
}
|
||||
|
||||
self::approve_image($image_id);
|
||||
|
@ -48,7 +48,7 @@ class Approval extends Extension
|
|||
$image_id = isset($_POST['image_id']) ? $_POST['image_id'] : null;
|
||||
}
|
||||
if (empty($image_id)) {
|
||||
throw new SCoreException("Can not disapprove image: No valid Image ID given.");
|
||||
throw new SCoreException("Can not disapprove image: No valid Post ID given.");
|
||||
}
|
||||
|
||||
self::disapprove_image($image_id);
|
||||
|
|
|
@ -27,14 +27,14 @@ class ApprovalTheme extends Themelet
|
|||
|
||||
public function get_help_html()
|
||||
{
|
||||
return '<p>Search for images that are approved/not approved.</p>
|
||||
return '<p>Search for posts that are approved/not approved.</p>
|
||||
<div class="command_example">
|
||||
<pre>approved:yes</pre>
|
||||
<p>Returns images that have been approved.</p>
|
||||
<p>Returns posts that have been approved.</p>
|
||||
</div>
|
||||
<div class="command_example">
|
||||
<pre>approved:no</pre>
|
||||
<p>Returns images that have not been approved.</p>
|
||||
<p>Returns posts that have not been approved.</p>
|
||||
</div>
|
||||
';
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ class ApprovalTheme extends Themelet
|
|||
public function display_admin_block(SetupBuildingEvent $event)
|
||||
{
|
||||
$sb = new SetupBlock("Approval");
|
||||
$sb->add_bool_option(ApprovalConfig::IMAGES, "Images: ");
|
||||
$sb->add_bool_option(ApprovalConfig::IMAGES, "Posts: ");
|
||||
$event->panel->add_block($sb);
|
||||
}
|
||||
|
||||
|
@ -52,9 +52,9 @@ class ApprovalTheme extends Themelet
|
|||
|
||||
$html = (string)SHM_SIMPLE_FORM(
|
||||
"admin/approval",
|
||||
BUTTON(["name"=>'approval_action', "value"=>'approve_all'], "Approve All Images"),
|
||||
BUTTON(["name"=>'approval_action', "value"=>'approve_all'], "Approve All Posts"),
|
||||
BR(),
|
||||
BUTTON(["name"=>'approval_action', "value"=>'disapprove_all'], "Disapprove All Images"),
|
||||
BUTTON(["name"=>'approval_action', "value"=>'disapprove_all'], "Disapprove All Posts"),
|
||||
);
|
||||
$page->add_block(new Block("Approval", $html));
|
||||
}
|
||||
|
|
|
@ -27,19 +27,19 @@ class ArtistsTheme extends Themelet
|
|||
<input type='submit' name='edit' id='edit' value='New Artist'/>
|
||||
</form>";
|
||||
}
|
||||
|
||||
|
||||
if ($mode == "editor") {
|
||||
$html = "<form method='post' action='".make_link("artist/new_artist")."'>
|
||||
".$user->get_auth_html()."
|
||||
<input type='submit' name='edit' value='New Artist'/>
|
||||
</form>
|
||||
|
||||
|
||||
<form method='post' action='".make_link("artist/edit_artist")."'>
|
||||
".$user->get_auth_html()."
|
||||
<input type='submit' name='edit' value='Edit Artist'/>
|
||||
<input type='hidden' name='artist_id' value='".$artistID."'>
|
||||
</form>";
|
||||
|
||||
|
||||
if ($is_admin) {
|
||||
$html .= "<form method='post' action='".make_link("artist/nuke_artist")."'>
|
||||
".$user->get_auth_html()."
|
||||
|
@ -47,19 +47,19 @@ class ArtistsTheme extends Themelet
|
|||
<input type='hidden' name='artist_id' value='".$artistID."'>
|
||||
</form>";
|
||||
}
|
||||
|
||||
|
||||
$html .= "<form method='post' action='".make_link("artist/add_alias")."'>
|
||||
".$user->get_auth_html()."
|
||||
<input type='submit' name='edit' value='Add Alias'/>
|
||||
<input type='hidden' name='artist_id' value='".$artistID."'>
|
||||
</form>
|
||||
|
||||
|
||||
<form method='post' action='".make_link("artist/add_member")."'>
|
||||
".$user->get_auth_html()."
|
||||
<input type='submit' name='edit' value='Add Member'/>
|
||||
<input type='hidden' name='artist_id' value='".$artistID."'>
|
||||
</form>
|
||||
|
||||
|
||||
<form method='post' action='".make_link("artist/add_url")."'>
|
||||
".$user->get_auth_html()."
|
||||
<input type='submit' name='edit' value='Add Url'/>
|
||||
|
@ -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 .= "<th colspan='2'>Action</th>";
|
||||
} // space for edit link
|
||||
|
||||
|
||||
$html .= "</tr></thead>";
|
||||
|
||||
$deletionLinkActionArray = [
|
||||
|
@ -244,7 +244,7 @@ class ArtistsTheme extends Themelet
|
|||
<input type="hidden" name="artistID" value='.$artistID.' /></td></tr>
|
||||
<tr><td colspan="2"><input type="submit" value="Submit" /></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</form>
|
||||
';
|
||||
|
||||
global $page;
|
||||
|
@ -354,7 +354,7 @@ class ArtistsTheme extends Themelet
|
|||
<tr>
|
||||
<th></th>
|
||||
<th></th>";
|
||||
|
||||
|
||||
if ($userIsLogged) {
|
||||
$html .= "<th></th>";
|
||||
}
|
||||
|
@ -402,13 +402,13 @@ class ArtistsTheme extends Themelet
|
|||
$artist_images = "";
|
||||
foreach ($images as $image) {
|
||||
$thumb_html = $this->build_thumb_html($image);
|
||||
|
||||
|
||||
$artist_images .= '<span class="thumb">'.
|
||||
'<a href="$image_link">'.$thumb_html.'</a>'.
|
||||
'</span>';
|
||||
}
|
||||
|
||||
$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 '<p>Search for images with a particular artist.</p>
|
||||
return '<p>Search for posts with a particular artist.</p>
|
||||
<div class="command_example">
|
||||
<pre>artist=leonardo</pre>
|
||||
<p>Returns images with the artist "leonardo".</p>
|
||||
</div>
|
||||
<p>Returns posts with the artist "leonardo".</p>
|
||||
</div>
|
||||
';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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"));
|
||||
|
|
|
@ -27,6 +27,6 @@ class BBCodeInfo extends ExtensionInfo
|
|||
<li>[[wiki article|with some text]]
|
||||
<li>[quote]text[/quote]
|
||||
<li>[quote=Username]text[/quote]
|
||||
<li>>>123 (link to image #123)
|
||||
<li>>>123 (link to post #123)
|
||||
</ul>";
|
||||
}
|
||||
|
|
|
@ -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 <walde.christian@googlemail.com>, 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 <walde.christian@googlemail.com>, contributions by Shish and Agasa.";
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ class BulkActionsTheme extends Themelet
|
|||
<input id='bulk_selector_activate' type='button' onclick='activate_bulk_selector();' value='Activate (M)anual Select' accesskey='m'/>
|
||||
<div id='bulk_selector_controls' style='display: none;'>
|
||||
<input id='bulk_selector_deactivate' type='button' onclick='deactivate_bulk_selector();' value='Deactivate (M)anual Select' accesskey='m'/>
|
||||
Click on images to mark them.
|
||||
Click on posts to mark them.
|
||||
<br />
|
||||
<table><tr><td>
|
||||
<input id='bulk_selector_select_all' type='button'
|
||||
|
|
|
@ -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.<br><br>
|
||||
Adds images from a CSV with the five following values: <br>
|
||||
Adds posts from a CSV with the five following values: <br>
|
||||
\"/path/to/image.jpg\",\"spaced tags\",\"source\",\"rating s/q/e\",\"/path/thumbnail.jpg\" <br>
|
||||
<b>e.g.</b> \"/tmp/cat.png\",\"shish oekaki\",\"shimmie.shishnet.org\",\"s\",\"tmp/custom.jpg\" <br><br>
|
||||
Any value but the first may be omitted, but there must be five values per line.<br>
|
||||
<b>e.g.</b> \"/why/not/try/bulk_add.jpg\",\"\",\"\",\"\",\"\"<br><br>
|
||||
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<br><br>
|
||||
Useful for importing tagged images without having to do database manipulation.<br>
|
||||
<p><b>Note:</b> requires \"Admin Controls\" and optionally \"Image Ratings\" to be enabled<br><br>";
|
||||
Useful for importing tagged posts without having to do database manipulation.<br>
|
||||
<p><b>Note:</b> requires \"Admin Controls\" and optionally \"Post Ratings\" to be enabled<br><br>";
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
<br>Specify the absolute or relative path to a local .csv file. Check <a href=\"" . make_link("ext_doc/bulk_add_csv") . "\">here</a> for the expected format.
|
||||
|
||||
<p>".make_form(make_link("bulk_add_csv"))."
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ class CommentListInfo extends ExtensionInfo
|
|||
public const KEY = "comment";
|
||||
|
||||
public $key = self::KEY;
|
||||
public $name = "Image Comments";
|
||||
public $name = "Post Comments";
|
||||
public $url = self::SHIMMIE_URL;
|
||||
public $authors = self::SHISH_AUTHOR;
|
||||
public $license = self::LICENSE_GPLV2;
|
||||
|
|
|
@ -289,23 +289,23 @@ class CommentListTheme extends Themelet
|
|||
|
||||
public function get_help_html()
|
||||
{
|
||||
return '<p>Search for images containing a certain number of comments, or comments by a particular individual.</p>
|
||||
return '<p>Search for posts containing a certain number of comments, or comments by a particular individual.</p>
|
||||
<div class="command_example">
|
||||
<pre>comments=1</pre>
|
||||
<p>Returns images with exactly 1 comment.</p>
|
||||
<p>Returns posts with exactly 1 comment.</p>
|
||||
</div>
|
||||
<div class="command_example">
|
||||
<pre>comments>0</pre>
|
||||
<p>Returns images with 1 or more comments. </p>
|
||||
<p>Returns posts with 1 or more comments. </p>
|
||||
</div>
|
||||
<p>Can use <, <=, >, >=, or =.</p>
|
||||
<div class="command_example">
|
||||
<pre>commented_by:username</pre>
|
||||
<p>Returns images that have been commented on by "username". </p>
|
||||
<p>Returns posts that have been commented on by "username". </p>
|
||||
</div>
|
||||
<div class="command_example">
|
||||
<pre>commented_by_userno:123</pre>
|
||||
<p>Returns images that have been commented on by user 123. </p>
|
||||
<p>Returns posts that have been commented on by user 123. </p>
|
||||
</div>
|
||||
';
|
||||
}
|
||||
|
|
|
@ -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\".");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -467,9 +467,9 @@ class CronUploader extends Extension
|
|||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ class CronUploaderTheme extends Themelet
|
|||
<li>Create a cron job or something else that can open a url on specified times.
|
||||
<br/>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.
|
||||
<br />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.
|
||||
<br />When you create the cron job, you choose when to upload new images.</li>
|
||||
<br />When you create the cron job, you choose when to upload new posts.</li>
|
||||
</ol>";
|
||||
|
||||
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -13,5 +13,5 @@ class FavoritesInfo extends ExtensionInfo
|
|||
"Gives users a \"favorite this image\" button that they can press
|
||||
<p>Favorites for a user can then be retrieved by searching for \"favorited_by=UserName\"
|
||||
<p>Popular images can be searched for by eg. \"favorites>5\"
|
||||
<p>Favorite info can be added to an image's filename or tooltip using the \$favorites placeholder";
|
||||
<p>Favorite info can be added to a post's filename or tooltip using the \$favorites placeholder";
|
||||
}
|
||||
|
|
|
@ -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("<a href='$favorites_link'>Images favorited</a>: $i_favorites_count, $h_favorites_rate per day");
|
||||
$event->add_stats("<a href='$favorites_link'>Posts favorited</a>: $i_favorites_count, $h_favorites_rate per day");
|
||||
}
|
||||
|
||||
public function onImageInfoSet(ImageInfoSetEvent $event)
|
||||
|
|
|
@ -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</a>: 1");
|
||||
$this->assert_text("Posts favorited</a>: 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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,23 +34,23 @@ class FavoritesTheme extends Themelet
|
|||
|
||||
public function get_help_html()
|
||||
{
|
||||
return '<p>Search for images that have been favorited a certain number of times, or favorited by a particular individual.</p>
|
||||
return '<p>Search for posts that have been favorited a certain number of times, or favorited by a particular individual.</p>
|
||||
<div class="command_example">
|
||||
<pre>favorites=1</pre>
|
||||
<p>Returns images that have been favorited once.</p>
|
||||
<p>Returns posts that have been favorited once.</p>
|
||||
</div>
|
||||
<div class="command_example">
|
||||
<pre>favorites>0</pre>
|
||||
<p>Returns images that have been favorited 1 or more times</p>
|
||||
<p>Returns posts that have been favorited 1 or more times</p>
|
||||
</div>
|
||||
<p>Can use <, <=, >, >=, or =.</p>
|
||||
<div class="command_example">
|
||||
<pre>favorited_by:username</pre>
|
||||
<p>Returns images that have been favorited by "username". </p>
|
||||
<p>Returns posts that have been favorited by "username". </p>
|
||||
</div>
|
||||
<div class="command_example">
|
||||
<pre>favorited_by_userno:123</pre>
|
||||
<p>Returns images that have been favorited by user 123. </p>
|
||||
<p>Returns posts that have been favorited by user 123. </p>
|
||||
</div>
|
||||
';
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
<p><b>Viewing a featured post</b>
|
||||
<br>Visit <code>/featured_image/view</code>
|
||||
<p><b>Downloading a featured post</b>
|
||||
<br>Link to <code>/featured_image/download</code>. 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.";
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ class HomeInfo extends ExtensionInfo
|
|||
public $authors =["Bzchan"=>"bzchan@animemahou.com"];
|
||||
public $license = self::LICENSE_GPLV2;
|
||||
public $visibility = self::VISIBLE_ADMIN;
|
||||
public $description = "Displays a front page with logo, search box and image count";
|
||||
public $description = "Displays a front page with logo, search box and post count";
|
||||
public $documentation =
|
||||
"Once enabled, the page will show up at the URL \"home\", so if you want
|
||||
this to be the front page of your site, you should go to \"Board Config\"
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 <a href='".make_link("post/view/{$existing->id}")."'>{$existing->id}</a> ".
|
||||
$error = "Post <a href='".make_link("post/view/{$existing->id}")."'>{$existing->id}</a> ".
|
||||
"already has hash {$image->hash}:<p>".$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 <a href='" . make_link("post/view/{$duplicate->id}") . "'>{$duplicate->id}</a> " .
|
||||
$error = "Post <a href='" . make_link("post/view/{$duplicate->id}") . "'>{$duplicate->id}</a> " .
|
||||
"already has hash {$image->hash}:<p>" . $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("<a href='$images_link'>Images uploaded</a>: $i_image_count, $h_image_rate per day");
|
||||
$event->add_stats("<a href='$images_link'>Posts uploaded</a>: $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, "<br>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", "<a href='" . make_link() . "'>Index</a>", "left", 0));
|
||||
$page->add_block(new Block(
|
||||
"Image not in database",
|
||||
"Post not in database",
|
||||
"The requested image was not found in the database"
|
||||
));
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ class ImageBanInfo extends ExtensionInfo
|
|||
public const KEY = "image_hash_ban";
|
||||
|
||||
public $key = self::KEY;
|
||||
public $name = "Image Hash Ban";
|
||||
public $name = "Post Hash Ban";
|
||||
public $url = "http://atravelinggeek.com/";
|
||||
public $authors = ["ATravelingGeek"=>"atg@atravelinggeek.com"];
|
||||
public $license = self::LICENSE_GPLV2;
|
||||
|
|
|
@ -78,7 +78,7 @@ class ImageBan extends Extension
|
|||
$row = $database->get_row("SELECT * FROM image_bans WHERE hash = :hash", ["hash"=>$event->hash]);
|
||||
if ($row) {
|
||||
log_info("image_hash_ban", "Attempted to upload a blocked image ({$event->hash} - {$row['reason']})");
|
||||
throw new UploadException("Image ".html_escape($row["hash"])." has been banned, reason: ".format_text($row["reason"]));
|
||||
throw new UploadException("Post ".html_escape($row["hash"])." has been banned, reason: ".format_text($row["reason"]));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,11 +97,11 @@ class ImageBan extends Extension
|
|||
|
||||
if ($hash) {
|
||||
send_event(new AddImageHashBanEvent($hash, $reason));
|
||||
$page->flash("Image ban added");
|
||||
$page->flash("Post ban added");
|
||||
|
||||
if ($image) {
|
||||
send_event(new ImageDeletionEvent($image));
|
||||
$page->flash("Image deleted");
|
||||
$page->flash("Post deleted");
|
||||
}
|
||||
|
||||
$page->set_mode(PageMode::REDIRECT);
|
||||
|
@ -111,7 +111,7 @@ class ImageBan extends Extension
|
|||
$user->ensure_authed();
|
||||
$input = validate_input(["d_hash"=>"string"]);
|
||||
send_event(new RemoveImageHashBanEvent($input['d_hash']));
|
||||
$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") {
|
||||
|
@ -129,7 +129,7 @@ class ImageBan extends Extension
|
|||
global $user;
|
||||
if ($event->parent==="system") {
|
||||
if ($user->can(Permissions::BAN_IMAGE)) {
|
||||
$event->add_nav_link("image_bans", new Link('image_hash_ban/list/1'), "Image Bans", NavLink::is_active(["image_hash_ban"]));
|
||||
$event->add_nav_link("image_bans", new Link('image_hash_ban/list/1'), "Post Bans", NavLink::is_active(["image_hash_ban"]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ class ImageBan extends Extension
|
|||
{
|
||||
global $user;
|
||||
if ($user->can(Permissions::BAN_IMAGE)) {
|
||||
$event->add_link("Image Bans", make_link("image_hash_ban/list/1"));
|
||||
$event->add_link("Post Bans", make_link("image_hash_ban/list/1"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,10 +8,10 @@ class ImageBanTheme extends Themelet
|
|||
*/
|
||||
public function display_bans(Page $page, $table, $paginator)
|
||||
{
|
||||
$page->set_title("Image Bans");
|
||||
$page->set_heading("Image Bans");
|
||||
$page->set_title("Post Bans");
|
||||
$page->set_heading("Post Bans");
|
||||
$page->add_block(new NavBlock());
|
||||
$page->add_block(new Block("Edit Image Bans", $table . $paginator));
|
||||
$page->add_block(new Block("Edit Post Bans", $table . $paginator));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -24,7 +24,7 @@ class ImageBanTheme extends Themelet
|
|||
INPUT(["type"=>'hidden', "name"=>'c_hash', "value"=>$image->hash]),
|
||||
INPUT(["type"=>'hidden', "name"=>'c_image_id', "value"=>$image->id]),
|
||||
INPUT(["type"=>'text', "name"=>'c_reason']),
|
||||
INPUT(["type"=>'submit', "value"=>'Ban Hash and Delete Image']),
|
||||
INPUT(["type"=>'submit', "value"=>'Ban Hash and Delete Post']),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,13 +5,13 @@ class ImageViewCounterInfo extends ExtensionInfo
|
|||
public const KEY = "image_view_counter";
|
||||
|
||||
public $key = self::KEY;
|
||||
public $name = "Image View Counter";
|
||||
public $name = "Post View Counter";
|
||||
public $url = "http://www.drudexsoftware.com/";
|
||||
public $authors = ["Drudex Software"=>"support@drudexsoftware.com"];
|
||||
public $license = self::LICENSE_GPLV2;
|
||||
public $description = "Tracks & displays how many times an image is viewed";
|
||||
public $description = "Tracks & displays how many times a post is viewed";
|
||||
public $documentation =
|
||||
"Whenever anyone views an image, a view will be added to that image.
|
||||
"Whenever anyone views a post, a view will be added to that image.
|
||||
This extension will also track any username & the IP address.
|
||||
This is done to prevent duplicate views.
|
||||
A person can only count as a view again 1 hour after viewing the image initially.";
|
||||
|
|
|
@ -102,7 +102,7 @@ class ImageViewCounter extends Extension
|
|||
public function onPageSubNavBuilding(PageSubNavBuildingEvent $event)
|
||||
{
|
||||
if ($event->parent=="posts") {
|
||||
$event->add_nav_link("sort_by_visits", new Link('popular_images'), "Popular Images");
|
||||
$event->add_nav_link("sort_by_visits", new Link('popular_images'), "Popular Posts");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,6 +19,6 @@ class ImageViewCounterTheme extends Themelet
|
|||
|
||||
public function get_help_html()
|
||||
{
|
||||
return '<p>Search for images that have received views by users.</p>';
|
||||
return '<p>Search for posts that have received views by users.</p>';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,11 +5,11 @@ class IndexInfo extends ExtensionInfo
|
|||
public const KEY = "index";
|
||||
|
||||
public $key = self::KEY;
|
||||
public $name = "Image List";
|
||||
public $name = "Post List";
|
||||
public $url = self::SHIMMIE_URL;
|
||||
public $authors = self::SHISH_AUTHOR;
|
||||
public $license = self::LICENSE_GPLV2;
|
||||
public $description = "Show a list of uploaded images";
|
||||
public $description = "Show a list of uploaded posts";
|
||||
public $core = true;
|
||||
public $documentation = "Here is a list of the search methods available out of the box;
|
||||
Shimmie extensions may provide other filters:
|
||||
|
@ -24,40 +24,40 @@ Shimmie extensions may provide other filters:
|
|||
<li>size (=, <, >, <=, >=) width x height, eg
|
||||
<ul>
|
||||
<li>size=1024x768 -- a specific wallpaper size
|
||||
<li>size>=500x500 -- no small images
|
||||
<li>size<1000x1000 -- no large images
|
||||
<li>size>=500x500 -- no small posts
|
||||
<li>size<1000x1000 -- no large posts
|
||||
</ul>
|
||||
</li>
|
||||
<li>width (=, <, >, <=, >=) width, eg
|
||||
<ul>
|
||||
<li>width=1024 -- find images with 1024 width
|
||||
<li>width>2000 -- find images bigger than 2000 width
|
||||
<li>width=1024 -- find posts with 1024 width
|
||||
<li>width>2000 -- find posts bigger than 2000 width
|
||||
</ul>
|
||||
</li>
|
||||
<li>height (=, <, >, <=, >=) height, eg
|
||||
<ul>
|
||||
<li>height=768 -- find images with 768 height
|
||||
<li>height>1000 -- find images bigger than 1000 height
|
||||
<li>height=768 -- find posts with 768 height
|
||||
<li>height>1000 -- find posts bigger than 1000 height
|
||||
</ul>
|
||||
</li>
|
||||
<li>ratio (=, <, >, <=, >=) width : height, eg
|
||||
<ul>
|
||||
<li>ratio=4:3, ratio=16:9 -- standard wallpaper
|
||||
<li>ratio=1:1 -- square images
|
||||
<li>ratio<1:1 -- tall images
|
||||
<li>ratio>1:1 -- wide images
|
||||
<li>ratio=1:1 -- square posts
|
||||
<li>ratio<1:1 -- tall posts
|
||||
<li>ratio>1:1 -- wide posts
|
||||
</ul>
|
||||
</li>
|
||||
<li>filesize (=, <, >, <=, >=) size, eg
|
||||
<ul>
|
||||
<li>filesize>1024 -- no images under 1KB
|
||||
<li>filesize>1024 -- no posts under 1KB
|
||||
<li>filesize<=3MB -- shorthand filesizes are supported too
|
||||
</ul>
|
||||
</li>
|
||||
<li>id (=, <, >, <=, >=) number, eg
|
||||
<ul>
|
||||
<li>id<20 -- search only the first few images
|
||||
<li>id>=500 -- search later images
|
||||
<li>id<20 -- search only the first few posts
|
||||
<li>id>=500 -- search later posts
|
||||
</ul>
|
||||
</li>
|
||||
<li>user=Username & poster=Username, eg
|
||||
|
@ -74,48 +74,48 @@ Shimmie extensions may provide other filters:
|
|||
</li>
|
||||
<li>hash=md5sum & md5=md5sum, eg
|
||||
<ul>
|
||||
<li>hash=bf5b59173f16b6937a4021713dbfaa72 -- find the \"Taiga want up!\" image
|
||||
<li>hash=bf5b59173f16b6937a4021713dbfaa72 -- find the \"Taiga want up!\" post
|
||||
<li>md5=bf5b59173f16b6937a4021713dbfaa72 -- same as above
|
||||
</ul>
|
||||
</li>
|
||||
<li>filename=blah & name=blah, eg
|
||||
<ul>
|
||||
<li>filename=kitten -- find all images with \"kitten\" in the original filename
|
||||
<li>filename=kitten -- find all posts with \"kitten\" in the original filename
|
||||
<li>name=kitten -- same as above
|
||||
</ul>
|
||||
</li>
|
||||
<li>posted (=, <, >, <=, >=) date, eg
|
||||
<ul>
|
||||
<li>posted>=2009-12-25 posted<=2010-01-01 -- find images posted between christmas and new year
|
||||
<li>posted>=2009-12-25 posted<=2010-01-01 -- find posts posted between christmas and new year
|
||||
</ul>
|
||||
</li>
|
||||
<li>tags (=, <, >, <=, >=) count, eg
|
||||
<ul>
|
||||
<li>tags=1 -- search for images with only 1 tag
|
||||
<li>tags>=10 -- search for images with 10 or more tags
|
||||
<li>tags<25 -- search for images with less than 25 tags
|
||||
<li>tags=1 -- search for posts with only 1 tag
|
||||
<li>tags>=10 -- search for posts with 10 or more tags
|
||||
<li>tags<25 -- search for posts with less than 25 tags
|
||||
</ul>
|
||||
</li>
|
||||
<li>source=(URL, any, none) eg
|
||||
<ul>
|
||||
<li>source=http://example.com -- find all images with \"http://example.com\" in the source
|
||||
<li>source=any -- find all images with a source
|
||||
<li>source=none -- find all images without a source
|
||||
<li>source=http://example.com -- find all posts with \"http://example.com\" in the source
|
||||
<li>source=any -- find all posts with a source
|
||||
<li>source=none -- find all posts without a source
|
||||
</ul>
|
||||
</li>
|
||||
<li>order=(id, width, height, filesize, filename)_(ASC, DESC), eg
|
||||
<ul>
|
||||
<li>order=width -- find all images sorted from highest > lowest width
|
||||
<li>order=filesize_asc -- find all images sorted from lowest > highest filesize
|
||||
<li>order=width -- find all posts sorted from highest > lowest width
|
||||
<li>order=filesize_asc -- find all posts sorted from lowest > highest filesize
|
||||
</ul>
|
||||
</li>
|
||||
<li>order=random_####, eg
|
||||
<ul>
|
||||
<li>order=random_8547 -- find all images sorted randomly using 8547 as a seed
|
||||
<li>order=random_8547 -- find all posts sorted randomly using 8547 as a seed
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Search items can be combined to search for images which match both,
|
||||
<p>Search items can be combined to search for posts which match both,
|
||||
or you can stick \"-\" in front of an item to search for things that don't
|
||||
match it.
|
||||
<p>Metatags can be followed by \":\" rather than \"=\" if you prefer.
|
||||
|
@ -129,43 +129,43 @@ match it.
|
|||
<li>downvoted_by=Username -- search for a user's dislikes
|
||||
<li>upvoted_by_id=UserID -- search for a user's likes by user ID
|
||||
<li>downvoted_by_id=UserID -- search for a user's dislikes by user ID
|
||||
<li>order=score_(ASC, DESC) -- find all images sorted from by score
|
||||
<li>order=score_(ASC, DESC) -- find all posts sorted from by score
|
||||
</ul>
|
||||
<li>Image Rating
|
||||
<li>Post Rating
|
||||
<ul>
|
||||
<li>rating=se -- find safe and explicit images, ignore questionable and unknown
|
||||
<li>rating=se -- find safe and explicit posts, ignore questionable and unknown
|
||||
</ul>
|
||||
<li>Favorites
|
||||
<ul>
|
||||
<li>favorites (=, <, >, <=, >=) number -- search for images favourited a certain number of times
|
||||
<li>favorites (=, <, >, <=, >=) number -- search for posts favourited a certain number of times
|
||||
<li>favourited_by=Username -- search for a user's choices by username
|
||||
<li>favorited_by_userno=UserID -- search for a user's choice by userID
|
||||
</ul>
|
||||
<li>Notes
|
||||
<ul>
|
||||
<li>notes (=, <, >, <=, >=) number -- search by the number of notes an image has
|
||||
<li>notes_by=Username -- search for images containing notes created by username
|
||||
<li>notes_by_userno=UserID -- search for images containing notes created by userID
|
||||
<li>notes (=, <, >, <=, >=) number -- search by the number of notes a post has
|
||||
<li>notes_by=Username -- search for posts containing notes created by username
|
||||
<li>notes_by_userno=UserID -- search for posts containing notes created by userID
|
||||
</ul>
|
||||
<li>Artists
|
||||
<ul>
|
||||
<li>author=ArtistName -- search for images by artist
|
||||
<li>author=ArtistName -- search for posts by artist
|
||||
</ul>
|
||||
<li>Image Comments
|
||||
<li>Post Comments
|
||||
<ul>
|
||||
<li>comments (=, <, >, <=, >=) number -- search for images by number of comments
|
||||
<li>commented_by=Username -- search for images containing user's comments by username
|
||||
<li>commented_by_userno=UserID -- search for images containing user's comments by userID
|
||||
<li>comments (=, <, >, <=, >=) number -- search for posts by number of comments
|
||||
<li>commented_by=Username -- search for posts containing user's comments by username
|
||||
<li>commented_by_userno=UserID -- search for posts containing user's comments by userID
|
||||
</ul>
|
||||
<li>Pools
|
||||
<ul>
|
||||
<li>pool=(PoolID, any, none) -- search for images in a pool by PoolID.
|
||||
<li>pool_by_name=PoolName -- search for images in a pool by PoolName. underscores are replaced with spaces
|
||||
<li>pool=(PoolID, any, none) -- search for posts in a pool by PoolID.
|
||||
<li>pool_by_name=PoolName -- search for posts in a pool by PoolName. underscores are replaced with spaces
|
||||
</ul>
|
||||
<li>Post Relationships
|
||||
<ul>
|
||||
<li>parent=(parentID, any, none) -- search for images by parentID / if they have, do not have a parent
|
||||
<li>child=(any, none) -- search for images which have, or do not have children
|
||||
<li>parent=(parentID, any, none) -- search for posts by parentID / if they have, do not have a parent
|
||||
<li>child=(any, none) -- search for posts which have, or do not have children
|
||||
</ul>
|
||||
</ul>
|
||||
";
|
||||
|
|
|
@ -171,10 +171,10 @@ and of course start organising your images :-)
|
|||
$page->add_html_header('<meta name="robots" content="noindex, nofollow">');
|
||||
}
|
||||
$query = url_escape(Tag::caret(Tag::implode($this->search_terms)));
|
||||
$page->add_block(new Block("Images", $this->build_table($images, "#search=$query"), "main", 10, "image-list"));
|
||||
$page->add_block(new Block("Posts", $this->build_table($images, "#search=$query"), "main", 10, "image-list"));
|
||||
$this->display_paginator($page, "post/list/$query", null, $this->page_number, $this->total_pages, true);
|
||||
} else {
|
||||
$page->add_block(new Block("Images", $this->build_table($images, null), "main", 10, "image-list"));
|
||||
$page->add_block(new Block("Posts", $this->build_table($images, null), "main", 10, "image-list"));
|
||||
$this->display_paginator($page, "post/list", null, $this->page_number, $this->total_pages, true);
|
||||
}
|
||||
}
|
||||
|
@ -272,7 +272,7 @@ and of course start organising your images :-)
|
|||
|
||||
<div class="command_example">
|
||||
<pre>hash=0D3512CAA964B2BA5D7851AF5951F33B</pre>
|
||||
<p>Returns image with an MD5 hash 0D3512CAA964B2BA5D7851AF5951F33B.</p>
|
||||
<p>Returns post with an MD5 hash 0D3512CAA964B2BA5D7851AF5951F33B.</p>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
|
|
@ -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.";
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -20,16 +20,16 @@ class MediaTheme extends Themelet
|
|||
|
||||
public function get_help_html()
|
||||
{
|
||||
return '<p>Search for items based on the type of media.</p>
|
||||
return '<p>Search for posts based on the type of media.</p>
|
||||
<div class="command_example">
|
||||
<pre>content:audio</pre>
|
||||
<p>Returns items that contain audio, including videos and audio files.</p>
|
||||
<p>Returns posts that contain audio, including videos and audio files.</p>
|
||||
</div>
|
||||
<div class="command_example">
|
||||
<pre>content:video</pre>
|
||||
<p>Returns items that contain video, including animated GIFs.</p>
|
||||
<p>Returns posts that contain video, including animated GIFs.</p>
|
||||
</div>
|
||||
<p>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.</p>
|
||||
<p>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.</p>
|
||||
';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,11 +14,11 @@ class MimeSystemTheme extends Themelet
|
|||
sort($exts);
|
||||
$exts = join("</li><li>", $exts);
|
||||
|
||||
return '<p>Search for images by extension</p>
|
||||
return '<p>Search for posts by extension</p>
|
||||
|
||||
<div class="command_example">
|
||||
<pre>ext=jpg</pre>
|
||||
<p>Returns images with the extension "jpg".</p>
|
||||
<p>Returns posts with the extension "jpg".</p>
|
||||
</div>
|
||||
|
||||
These extensions are available in the system:
|
||||
|
@ -26,11 +26,11 @@ class MimeSystemTheme extends Themelet
|
|||
|
||||
<hr/>
|
||||
|
||||
<p>Search for images by MIME type</p>
|
||||
<p>Search for posts by MIME type</p>
|
||||
|
||||
<div class="command_example">
|
||||
<pre>mime=image/jpeg</pre>
|
||||
<p>Returns images that have the MIME type "image/jpeg".</p>
|
||||
<p>Returns posts that have the MIME type "image/jpeg".</p>
|
||||
</div>
|
||||
|
||||
These MIME types are available in the system:
|
||||
|
|
|
@ -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") {
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -186,7 +186,7 @@ class NotesTheme extends Themelet
|
|||
|
||||
$html = "<table id='poolsList' class='zebra'>".
|
||||
"<thead><tr>".
|
||||
"<th>Image</th>".
|
||||
"<th>Post</th>".
|
||||
"<th>Note</th>".
|
||||
"<th>Body</th>".
|
||||
"<th>Updater</th>".
|
||||
|
@ -250,23 +250,23 @@ class NotesTheme extends Themelet
|
|||
|
||||
public function get_help_html()
|
||||
{
|
||||
return '<p>Search for images with notes.</p>
|
||||
return '<p>Search for posts with notes.</p>
|
||||
<div class="command_example">
|
||||
<pre>note=noted</pre>
|
||||
<p>Returns images with a note matching "noted".</p>
|
||||
<p>Returns posts with a note matching "noted".</p>
|
||||
</div>
|
||||
<div class="command_example">
|
||||
<pre>notes>0</pre>
|
||||
<p>Returns images with 1 or more notes.</p>
|
||||
<p>Returns posts with 1 or more notes.</p>
|
||||
</div>
|
||||
<p>Can use <, <=, >, >=, or =.</p>
|
||||
<div class="command_example">
|
||||
<pre>notes_by=username</pre>
|
||||
<p>Returns images with note(s) by "username".</p>
|
||||
<p>Returns posts with note(s) by "username".</p>
|
||||
</div>
|
||||
<div class="command_example">
|
||||
<pre>notes_by_user_id=123</pre>
|
||||
<p>Returns images with note(s) by user 123.</p>
|
||||
<p>Returns posts with note(s) by user 123.</p>
|
||||
</div>
|
||||
';
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@ class NumericScoreInfo extends ExtensionInfo
|
|||
public const KEY = "numeric_score";
|
||||
|
||||
public $key = self::KEY;
|
||||
public $name = "Image Scores (Numeric)";
|
||||
public $name = "Post Scores (Numeric)";
|
||||
public $url = self::SHIMMIE_URL;
|
||||
public $authors = self::SHISH_AUTHOR;
|
||||
public $license = self::LICENSE_GPLV2;
|
||||
public $description = "Allow users to score images";
|
||||
public $documentation ="Each registered user may vote an image +1 or -1, the image's score is the sum of all votes.";
|
||||
public $documentation ="Each registered user may vote a post +1 or -1, the image's score is the sum of all votes.";
|
||||
}
|
||||
|
|
|
@ -162,7 +162,7 @@ class NumericScore extends Extension
|
|||
public function onNumericScoreSet(NumericScoreSetEvent $event)
|
||||
{
|
||||
global $user;
|
||||
log_debug("numeric_score", "Rated >>{$event->image_id} as {$event->score}", "Rated Image");
|
||||
log_debug("numeric_score", "Rated >>{$event->image_id} as {$event->score}", "Rated Post");
|
||||
$this->add_vote($event->image_id, $user->id, $event->score);
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ class NumericScoreTheme extends Themelet
|
|||
</div>
|
||||
";
|
||||
}
|
||||
$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 '<p>Search for images that have received numeric scores by the score or by the scorer.</p>
|
||||
return '<p>Search for posts that have received numeric scores by the score or by the scorer.</p>
|
||||
<div class="command_example">
|
||||
<pre>score=1</pre>
|
||||
<p>Returns images with a score of 1.</p>
|
||||
<p>Returns posts with a score of 1.</p>
|
||||
</div>
|
||||
<div class="command_example">
|
||||
<pre>score>0</pre>
|
||||
<p>Returns images with a score of 1 or more.</p>
|
||||
<p>Returns posts with a score of 1 or more.</p>
|
||||
</div>
|
||||
<p>Can use <, <=, >, >=, or =.</p>
|
||||
|
||||
<div class="command_example">
|
||||
<pre>upvoted_by=username</pre>
|
||||
<p>Returns images upvoted by "username".</p>
|
||||
<p>Returns posts upvoted by "username".</p>
|
||||
</div>
|
||||
<div class="command_example">
|
||||
<pre>upvoted_by_id=123</pre>
|
||||
<p>Returns images upvoted by user 123.</p>
|
||||
<p>Returns posts upvoted by user 123.</p>
|
||||
</div>
|
||||
<div class="command_example">
|
||||
<pre>downvoted_by=username</pre>
|
||||
<p>Returns images downvoted by "username".</p>
|
||||
<p>Returns posts downvoted by "username".</p>
|
||||
</div>
|
||||
<div class="command_example">
|
||||
<pre>downvoted_by_id=123</pre>
|
||||
<p>Returns images downvoted by user 123.</p>
|
||||
<p>Returns posts downvoted by user 123.</p>
|
||||
</div>
|
||||
|
||||
<div class="command_example">
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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()})"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -179,7 +179,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, "<br>Images per page: ");
|
||||
$sb->add_int_option(PoolsConfig::IMAGES_PER_PAGE, "<br>Posts per page: ");
|
||||
$sb->add_int_option(PoolsConfig::LISTS_PER_PAGE, "<br>Index list items per page: ");
|
||||
$sb->add_int_option(PoolsConfig::UPDATED_PER_PAGE, "<br>Updated list items per page: ");
|
||||
$sb->add_bool_option(PoolsConfig::INFO_ON_VIEW_IMAGE, "<br>Show pool info on image: ");
|
||||
|
|
|
@ -45,7 +45,7 @@ class PoolsTheme extends Themelet
|
|||
$h
|
||||
</select>
|
||||
<input type='hidden' name='image_id' value='{$image->id}'>
|
||||
<input type='submit' value='Add Image to Pool'>
|
||||
<input type='submit' value='Add Post to Pool'>
|
||||
</form>
|
||||
";
|
||||
}
|
||||
|
@ -396,26 +396,26 @@ class PoolsTheme extends Themelet
|
|||
|
||||
public function get_help_html()
|
||||
{
|
||||
return '<p>Search for images that are in a pool.</p>
|
||||
return '<p>Search for posts that are in a pool.</p>
|
||||
<div class="command_example">
|
||||
<pre>pool=1</pre>
|
||||
<p>Returns images in pool #1.</p>
|
||||
<p>Returns posts in pool #1.</p>
|
||||
</div>
|
||||
<div class="command_example">
|
||||
<pre>pool=any</pre>
|
||||
<p>Returns images in any pool.</p>
|
||||
<p>Returns posts in any pool.</p>
|
||||
</div>
|
||||
<div class="command_example">
|
||||
<pre>pool=none</pre>
|
||||
<p>Returns images not in any pool.</p>
|
||||
<p>Returns posts not in any pool.</p>
|
||||
</div>
|
||||
<div class="command_example">
|
||||
<pre>pool_by_name=swimming</pre>
|
||||
<p>Returns images in the "swimming" pool.</p>
|
||||
<p>Returns posts in the "swimming" pool.</p>
|
||||
</div>
|
||||
<div class="command_example">
|
||||
<pre>pool_by_name=swimming_pool</pre>
|
||||
<p>Returns images in the "swimming pool" pool. Note that the underscore becomes a space</p>
|
||||
<p>Returns posts in the "swimming pool" pool. Note that the underscore becomes a space</p>
|
||||
</div>
|
||||
';
|
||||
}
|
||||
|
|
|
@ -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.";
|
||||
|
|
|
@ -47,11 +47,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.");
|
||||
|
@ -69,11 +69,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.");
|
||||
|
@ -181,7 +181,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);
|
||||
}
|
||||
|
|
|
@ -27,14 +27,14 @@ class PrivateImageTheme extends Themelet
|
|||
|
||||
public function get_help_html()
|
||||
{
|
||||
return '<p>Search for images that are private/public.</p>
|
||||
return '<p>Search for posts that are private/public.</p>
|
||||
<div class="command_example">
|
||||
<pre>private:yes</pre>
|
||||
<p>Returns images that are private, restricted to yourself if you are not an admin.</p>
|
||||
<p>Returns posts that are private, restricted to yourself if you are not an admin.</p>
|
||||
</div>
|
||||
<div class="command_example">
|
||||
<pre>private:no</pre>
|
||||
<p>Returns images that are public.</p>
|
||||
<p>Returns posts that are public.</p>
|
||||
</div>
|
||||
';
|
||||
}
|
||||
|
|
|
@ -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 <artanis.00@gmail.com>
|
||||
"Shows a QR Code for downloading a post to cell phones.
|
||||
Based on Artanis's Link to Post Extension <artanis.00@gmail.com>
|
||||
Further modified by Shish to remove the 7MB local QR generator and replace it with a link to google chart APIs";
|
||||
}
|
||||
|
|
|
@ -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 =
|
||||
"<b>Viewing a random image</b>
|
||||
"<b>Viewing a random post</b>
|
||||
<br>Visit <code>/random_image/view</code>
|
||||
<p><b>Downloading a random image</b>
|
||||
<p><b>Downloading a random post</b>
|
||||
<br>Link to <code>/random_image/download</code>. 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.
|
||||
<p><b>Getting a random image from a subset</b>
|
||||
<br>Adding a slash and some search terms will get a random image
|
||||
<p><b>Getting a random post from a subset</b>
|
||||
<br>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
|
||||
<code>/random_image/download/size=1024x768+cute</code>";
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.";
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 = "<b>Refresh the page to view more images</b>";
|
||||
$html = "<b>Refresh the page to view more posts</b>";
|
||||
if (count($images)) {
|
||||
$html .= "<div class='shm-image-list'>";
|
||||
|
||||
|
@ -29,10 +29,10 @@ class RandomListTheme extends Themelet
|
|||
|
||||
$html .= "</div>";
|
||||
} else {
|
||||
$html .= "<br/><br/>No images were found to match the search criteria";
|
||||
$html .= "<br/><br/>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));
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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") {
|
||||
|
|
|
@ -63,20 +63,20 @@ class RatingsTheme extends Themelet
|
|||
|
||||
public function get_help_html(array $ratings)
|
||||
{
|
||||
$output = '<p>Search for images with one or more possible ratings.</p>
|
||||
$output = '<p>Search for posts with one or more possible ratings.</p>
|
||||
<div class="command_example">
|
||||
<pre>rating:'.$ratings[0]->search_term.'</pre>
|
||||
<p>Returns images with the '.$ratings[0]->name.' rating.</p>
|
||||
<p>Returns posts with the '.$ratings[0]->name.' rating.</p>
|
||||
</div>
|
||||
<p>Ratings can be abbreviated to a single letter as well</p>
|
||||
<div class="command_example">
|
||||
<pre>rating:'.$ratings[0]->code.'</pre>
|
||||
<p>Returns images with the '.$ratings[0]->name.' rating.</p>
|
||||
<p>Returns posts with the '.$ratings[0]->name.' rating.</p>
|
||||
</div>
|
||||
<p>If abbreviations are used, multiple ratings can be searched for.</p>
|
||||
<div class="command_example">
|
||||
<pre>rating:'.$ratings[0]->code.$ratings[1]->code.'</pre>
|
||||
<p>Returns images with the '.$ratings[0]->name.' or '.$ratings[1]->name.' rating.</p>
|
||||
<p>Returns posts with the '.$ratings[0]->name.' or '.$ratings[1]->name.' rating.</p>
|
||||
</div>
|
||||
<p>Available ratings:</p>
|
||||
<table>
|
||||
|
|
|
@ -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.";
|
||||
}
|
||||
|
|
|
@ -50,27 +50,27 @@ class RelationshipsTheme extends Themelet
|
|||
|
||||
public function get_help_html()
|
||||
{
|
||||
return '<p>Search for images that have parent/child relationships.</p>
|
||||
return '<p>Search for posts that have parent/child relationships.</p>
|
||||
<div class="command_example">
|
||||
<pre>parent=any</pre>
|
||||
<p>Returns images that have a parent.</p>
|
||||
</div>
|
||||
<p>Returns posts that have a parent.</p>
|
||||
</div>
|
||||
<div class="command_example">
|
||||
<pre>parent=none</pre>
|
||||
<p>Returns images that have no parent.</p>
|
||||
</div>
|
||||
<p>Returns posts that have no parent.</p>
|
||||
</div>
|
||||
<div class="command_example">
|
||||
<pre>parent=123</pre>
|
||||
<p>Returns images that have image 123 set as parent.</p>
|
||||
</div>
|
||||
<p>Returns posts that have image 123 set as parent.</p>
|
||||
</div>
|
||||
<div class="command_example">
|
||||
<pre>child=any</pre>
|
||||
<p>Returns images that have at least 1 child.</p>
|
||||
</div>
|
||||
<p>Returns posts that have at least 1 child.</p>
|
||||
</div>
|
||||
<div class="command_example">
|
||||
<pre>child=none</pre>
|
||||
<p>Returns images that have no children.</p>
|
||||
</div>
|
||||
<p>Returns posts that have no children.</p>
|
||||
</div>
|
||||
';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -40,15 +40,15 @@ class ReportImageTheme extends Themelet
|
|||
$thumb_width = $config->get_int(ImageConfig::THUMB_WIDTH);
|
||||
$html = "
|
||||
<table id='reportedimage' class='zebra'>
|
||||
<thead><td width='$thumb_width'>Image</td><td>Reason</td><td width='128'>Action</td></thead>
|
||||
<thead><td width='$thumb_width'>Post</td><td>Reason</td><td width='128'>Action</td></thead>
|
||||
$h_reportedimages
|
||||
</table>
|
||||
";
|
||||
|
||||
$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
|
|||
<input type='submit' value='Report'>
|
||||
</form>
|
||||
";
|
||||
$page->add_block(new Block("Report Image", $html, "left"));
|
||||
$page->add_block(new Block("Report Post", $html, "left"));
|
||||
}
|
||||
|
||||
public function get_nuller(User $duser)
|
||||
|
|
|
@ -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", ""))
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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.";
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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("<link id=\"images\" rel=\"alternate\" type=\"application/rss+xml\" ".
|
||||
"title=\"$title - Images with tags: $search\" href=\"".make_link("rss/images/$search/1")."\" />");
|
||||
"title=\"$title - Posts with tags: $search\" href=\"".make_link("rss/images/$search/1")."\" />");
|
||||
} else {
|
||||
$page->add_html_header("<link id=\"images\" rel=\"alternate\" type=\"application/rss+xml\" ".
|
||||
"title=\"$title - Images\" href=\"".make_link("rss/images/1")."\" />");
|
||||
"title=\"$title - Posts\" href=\"".make_link("rss/images/1")."\" />");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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"),
|
||||
")"
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -101,14 +101,14 @@ class TagCategoriesTheme extends Themelet
|
|||
|
||||
public function get_help_html()
|
||||
{
|
||||
return '<p>Search for images containing a certain number of tags with the specified tag category.</p>
|
||||
return '<p>Search for posts containing a certain number of tags with the specified tag category.</p>
|
||||
<div class="command_example">
|
||||
<pre>persontags=1</pre>
|
||||
<p>Returns images with exactly 1 tag with the tag category "person".</p>
|
||||
<p>Returns posts with exactly 1 tag with the tag category "person".</p>
|
||||
</div>
|
||||
<div class="command_example">
|
||||
<pre>cattags>0</pre>
|
||||
<p>Returns images with 1 or more tags with the tag category "cat". </p>
|
||||
<p>Returns posts with 1 or more tags with the tag category "cat". </p>
|
||||
</div>
|
||||
<p>Can use <, <=, >, >=, or =.</p>
|
||||
<p>Category name is not case sensitive, category must exist for search to work.</p>
|
||||
|
|
|
@ -26,7 +26,7 @@ class TagEditInfo extends ExtensionInfo
|
|||
<ul>
|
||||
<li>Numeric Score
|
||||
<ul>
|
||||
<li>vote=(up, down, remove) -- vote, or remove your vote on an image
|
||||
<li>vote=(up, down, remove) -- vote, or remove your vote on a post
|
||||
</ul>
|
||||
<li>Pools
|
||||
<ul>
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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 "
|
||||
<tr>
|
||||
<th>Uploader</th>
|
||||
|
|
|
@ -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"]));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ class TipsTheme extends Themelet
|
|||
public function manageTips($url, $images)
|
||||
{
|
||||
global $page;
|
||||
$select = "<select name='image'><option value=''>- Select Image -</option>";
|
||||
$select = "<select name='image'><option value=''>- Select Post -</option>";
|
||||
|
||||
foreach ($images as $image) {
|
||||
$select .= "<option style='background-image:url(".$url.$image."); background-repeat:no-repeat; padding-left:20px;' value=\"".$image."\">".$image."</option>\n";
|
||||
|
@ -20,7 +20,7 @@ class TipsTheme extends Themelet
|
|||
<td><input name='enable' type='checkbox' value='Y' checked/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Image:</td>
|
||||
<td>Post:</td>
|
||||
<td>{$select}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -60,7 +60,7 @@ class TipsTheme extends Themelet
|
|||
"<thead><tr>".
|
||||
"<th>ID</th>".
|
||||
"<th>Enabled</th>".
|
||||
"<th>Image</th>".
|
||||
"<th>Post</th>".
|
||||
"<th>Text</th>";
|
||||
|
||||
if ($user->can(Permissions::TIPS_ADMIN)) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -15,10 +15,10 @@ class TrashTheme extends Themelet
|
|||
|
||||
public function get_help_html()
|
||||
{
|
||||
return '<p>Search for images in the trash.</p>
|
||||
return '<p>Search for posts in the trash.</p>
|
||||
<div class="command_example">
|
||||
<pre>in:trash</pre>
|
||||
<p>Returns images that are in the trash.</p>
|
||||
<p>Returns posts that are in the trash.</p>
|
||||
</div>
|
||||
';
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -56,7 +56,7 @@ class UploadTheme extends Themelet
|
|||
<tr>
|
||||
<td colspan='2'>Files</td>
|
||||
<td colspan='2'>URLs</td>
|
||||
<td colspan='2'>Image-Specific Tags</td>
|
||||
<td colspan='2'>Post-Specific Tags</td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
|
@ -73,7 +73,7 @@ class UploadTheme extends Themelet
|
|||
$upload_list .= "
|
||||
<tr>
|
||||
<td colspan='4'>Files</td>
|
||||
<td colspan='2'>Image-Specific Tags</td>
|
||||
<td colspan='2'>Post-Specific Tags</td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
|
@ -122,7 +122,7 @@ class UploadTheme extends Themelet
|
|||
}
|
||||
)();';
|
||||
$html .= '<a href=\''.$js.'\'>Upload to '.$title.'</a>';
|
||||
$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 . '</a> (Click when looking at an image page. Works on sites running Shimmie / Danbooru / Gelbooru. (This also grabs the tags / rating / source!))';
|
||||
">'. $title . '</a> (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 = "
|
||||
<p>Replacing Image ID ".$image_id."<br>Please note: You will have to refresh the image page, or empty your browser cache.</p>"
|
||||
<p>Replacing Post ID ".$image_id."<br>Please note: You will have to refresh the post page, or empty your browser cache.</p>"
|
||||
.$thumbnail."<br>"
|
||||
.make_form(make_link("upload/replace/".$image_id), "POST", $multipart=true)."
|
||||
<input type='hidden' name='image_id' value='$image_id'>
|
||||
|
@ -184,10 +184,10 @@ class UploadTheme extends Themelet
|
|||
<small>(Max file size is $max_kb)</small>
|
||||
";
|
||||
|
||||
$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)
|
||||
|
|
|
@ -320,20 +320,20 @@ class UserPageTheme extends Themelet
|
|||
public function get_help_html()
|
||||
{
|
||||
global $user;
|
||||
$output = emptyHTML(P("Search for images posted by particular individuals."));
|
||||
$output = emptyHTML(P("Search for posts posted by particular individuals."));
|
||||
$output->appendChild(SHM_COMMAND_EXAMPLE(
|
||||
"poster=username",
|
||||
'Returns images posted by "username".'
|
||||
'Returns posts posted by "username".'
|
||||
));
|
||||
$output->appendChild(SHM_COMMAND_EXAMPLE(
|
||||
"poster_id=123",
|
||||
'Returns images posted by user 123.'
|
||||
'Returns posts posted by user 123.'
|
||||
));
|
||||
|
||||
if ($user->can(Permissions::VIEW_IP)) {
|
||||
$output->appendChild(SHM_COMMAND_EXAMPLE(
|
||||
"poster_ip=127.0.0.1",
|
||||
"Returns images posted from IP 127.0.0.1."
|
||||
"Returns posts posted from IP 127.0.0.1."
|
||||
));
|
||||
}
|
||||
return $output;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue