From 5735320a95197d32e588c9943249f01ddf84c129 Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 10 Feb 2024 19:42:28 +0000 Subject: [PATCH] [extensions] have extension categories, remove versions --- core/extension.php | 14 +++++++++++++- ext/admin/info.php | 1 + ext/approval/info.php | 1 + ext/artists/info.php | 1 + ext/auto_tagger/info.php | 1 + ext/ban_words/info.php | 1 + ext/browser_search/info.php | 2 +- ext/bulk_actions/info.php | 1 + ext/bulk_add/info.php | 1 + ext/bulk_add_csv/info.php | 1 + ext/bulk_download/info.php | 1 + ext/bulk_import_export/info.php | 1 + ext/bulk_parent_child/info.php | 1 + ext/comment/info.php | 1 + ext/cron_uploader/info.php | 1 + ext/custom_html_headers/info.php | 3 ++- ext/danbooru_api/info.php | 1 + ext/downtime/info.php | 1 + ext/eokm/info.php | 1 + ext/ext_manager/info.php | 1 + ext/ext_manager/main.php | 9 ++++----- ext/ext_manager/theme.php | 32 ++++++++++++++++++++++++++----- ext/forum/info.php | 1 + ext/google_analytics/info.php | 1 + ext/graphql/info.php | 1 + ext/handle_archive/info.php | 1 + ext/handle_cbz/info.php | 1 + ext/handle_ico/info.php | 1 + ext/handle_mp3/info.php | 1 + ext/handle_pixel/info.php | 1 + ext/handle_svg/info.php | 1 + ext/handle_video/info.php | 1 + ext/holiday/info.php | 1 + ext/image_hash_ban/info.php | 2 +- ext/image_view_counter/info.php | 1 + ext/index/info.php | 1 + ext/ipban/info.php | 1 + ext/livefeed/info.php | 1 + ext/log_console/info.php | 1 + ext/log_db/info.php | 1 + ext/log_logstash/info.php | 1 + ext/log_net/info.php | 1 + ext/nav_timing/info.php | 1 + ext/not_a_tag/info.php | 1 + ext/notes/info.php | 1 + ext/numeric_score/info.php | 1 + ext/ouroboros_api/info.php | 2 +- ext/pm/info.php | 1 + ext/pools/info.php | 3 ++- ext/post_titles/info.php | 1 + ext/private_image/info.php | 1 + ext/rating/info.php | 1 + ext/regen_thumb/info.php | 1 + ext/relationships/info.php | 1 + ext/replace_file/info.php | 1 + ext/report_image/info.php | 2 +- ext/res_limit/info.php | 1 + ext/resize/info.php | 2 +- ext/reverse_search_links/info.php | 1 + ext/rotate/info.php | 1 + ext/rss_comments/info.php | 1 + ext/rss_comments/main.php | 2 +- ext/rss_images/info.php | 1 + ext/s3/info.php | 1 + ext/site_description/info.php | 1 + ext/sitemap/info.php | 1 + ext/source_history/info.php | 1 + ext/statsd/info.php | 1 + ext/tag_categories/info.php | 1 + ext/tag_edit/info.php | 1 + ext/tag_editcloud/info.php | 1 + ext/tag_history/info.php | 1 + ext/tag_list/info.php | 1 + ext/tag_tools/info.php | 1 + ext/transcode/info.php | 1 + ext/transcode_video/info.php | 1 + ext/trash/info.php | 1 + ext/update/info.php | 4 +++- ext/varnish/info.php | 1 + ext/wiki/info.php | 3 ++- ext/word_filter/info.php | 1 + 81 files changed, 127 insertions(+), 21 deletions(-) diff --git a/core/extension.php b/core/extension.php index 5b1bfe2e..c97e8dab 100644 --- a/core/extension.php +++ b/core/extension.php @@ -129,6 +129,18 @@ enum ExtensionVisibility case HIDDEN; } +enum ExtensionCategory: string +{ + case GENERAL = "General"; + case ADMIN = "Admin"; + case MODERATION = "Moderation"; + case FILE_HANDLING = "File Handling"; + case OBSERVABILITY = "Observability"; + case INTEGRATION = "Integration"; + case FEATURE = "Feature"; + case METADATA = "Metadata"; +} + abstract class ExtensionInfo { // Every credit you get costs us RAM. It stops now. @@ -156,8 +168,8 @@ abstract class ExtensionInfo /** @var string[] */ public array $conflicts = []; public ExtensionVisibility $visibility = ExtensionVisibility::DEFAULT; + public ExtensionCategory $category = ExtensionCategory::GENERAL; public ?string $link = null; - public ?string $version = null; public ?string $documentation = null; /** @var DatabaseDriverID[] which DBs this ext supports (blank for 'all') */ diff --git a/ext/admin/info.php b/ext/admin/info.php index 806d37d9..ea06c867 100644 --- a/ext/admin/info.php +++ b/ext/admin/info.php @@ -16,4 +16,5 @@ class AdminPageInfo extends ExtensionInfo public string $description = "Provides a base for various small admin functions"; public bool $core = true; public ExtensionVisibility $visibility = ExtensionVisibility::HIDDEN; + public ExtensionCategory $category = ExtensionCategory::ADMIN; } diff --git a/ext/approval/info.php b/ext/approval/info.php index b5f51db2..23da07de 100644 --- a/ext/approval/info.php +++ b/ext/approval/info.php @@ -12,5 +12,6 @@ class ApprovalInfo extends ExtensionInfo public string $name = "Approval"; public array $authors = ["Matthew Barbour" => "matthew@darkholme.net"]; public string $license = self::LICENSE_WTFPL; + public ExtensionCategory $category = ExtensionCategory::MODERATION; public string $description = "Adds an approval step to the upload/import process."; } diff --git a/ext/artists/info.php b/ext/artists/info.php index 870ece6d..f39c22cf 100644 --- a/ext/artists/info.php +++ b/ext/artists/info.php @@ -13,6 +13,7 @@ class ArtistsInfo extends ExtensionInfo public string $url = self::SHIMMIE_URL; public array $authors = ["Sein Kraft" => "mail@seinkraft.info","Alpha" => "alpha@furries.com.ar"]; public string $license = self::LICENSE_GPLV2; + public ExtensionCategory $category = ExtensionCategory::METADATA; public string $description = "Simple artists extension"; public bool $beta = true; } diff --git a/ext/auto_tagger/info.php b/ext/auto_tagger/info.php index a1c8697d..62f89a0f 100644 --- a/ext/auto_tagger/info.php +++ b/ext/auto_tagger/info.php @@ -12,5 +12,6 @@ class AutoTaggerInfo extends ExtensionInfo public string $name = "Auto-Tagger"; public array $authors = ["Matthew Barbour" => "matthew@darkholme.net"]; public string $license = self::LICENSE_WTFPL; + public ExtensionCategory $category = ExtensionCategory::METADATA; public string $description = "Provides several automatic tagging functions"; } diff --git a/ext/ban_words/info.php b/ext/ban_words/info.php index 247ab304..0c9f549e 100644 --- a/ext/ban_words/info.php +++ b/ext/ban_words/info.php @@ -27,4 +27,5 @@ to block comments with four (or more) links in. matched, eg banning \"sex\" would block the comment \"get free sex call this number\", but allow \"This is a photo of Bob from Essex\""; + public ExtensionCategory $category = ExtensionCategory::MODERATION; } diff --git a/ext/browser_search/info.php b/ext/browser_search/info.php index b5fa37c4..b5a3b30b 100644 --- a/ext/browser_search/info.php +++ b/ext/browser_search/info.php @@ -13,7 +13,7 @@ class BrowserSearchInfo extends ExtensionInfo public string $url = "http://atravelinggeek.com/"; public array $authors = ["ATravelingGeek" => "atg@atravelinggeek.com"]; public string $license = self::LICENSE_GPLV2; - public ?string $version = "0.1c, October 26, 2007"; + public ExtensionCategory $category = ExtensionCategory::INTEGRATION; public string $description = "Allows the user to add a browser 'plugin' to search the site with real-time suggestions"; public ?string $documentation = "Once installed, users with an opensearch compatible browser should see their search box light up with whatever \"click here to add a search engine\" notification they have diff --git a/ext/bulk_actions/info.php b/ext/bulk_actions/info.php index 1c4dd33f..7418f17c 100644 --- a/ext/bulk_actions/info.php +++ b/ext/bulk_actions/info.php @@ -35,4 +35,5 @@ class BulkActionsInfo extends ExtensionInfo
Sets the source of all selected posts.

"; + public ExtensionCategory $category = ExtensionCategory::MODERATION; } diff --git a/ext/bulk_add/info.php b/ext/bulk_add/info.php index 149c1b8e..e5bbed56 100644 --- a/ext/bulk_add/info.php +++ b/ext/bulk_add/info.php @@ -23,4 +23,5 @@ class BulkAddInfo extends ExtensionInfo tagged \"holiday 2008\")

Note: requires the \"admin\" extension to be enabled "; + public ExtensionCategory $category = ExtensionCategory::FILE_HANDLING; } diff --git a/ext/bulk_add_csv/info.php b/ext/bulk_add_csv/info.php index 772e3f7f..41634412 100644 --- a/ext/bulk_add_csv/info.php +++ b/ext/bulk_add_csv/info.php @@ -27,4 +27,5 @@ Any value but the first may be omitted, but there must be five values per line. Useful for importing tagged posts without having to do database manipulation.

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

"; + public ExtensionCategory $category = ExtensionCategory::FILE_HANDLING; } diff --git a/ext/bulk_download/info.php b/ext/bulk_download/info.php index 14e1b731..5200c8b4 100644 --- a/ext/bulk_download/info.php +++ b/ext/bulk_download/info.php @@ -12,6 +12,7 @@ class BulkDownloadInfo extends ExtensionInfo public string $name = "Bulk Download"; public array $authors = ["Matthew Barbour" => "matthew@darkholme.net"]; public string $license = self::LICENSE_WTFPL; + public ExtensionCategory $category = ExtensionCategory::FILE_HANDLING; public string $description = "Allows bulk downloading images."; public array $dependencies = [BulkActionsInfo::KEY]; } diff --git a/ext/bulk_import_export/info.php b/ext/bulk_import_export/info.php index c36a416e..bb046706 100644 --- a/ext/bulk_import_export/info.php +++ b/ext/bulk_import_export/info.php @@ -14,6 +14,7 @@ class BulkImportExportInfo extends ExtensionInfo public string $name = "Bulk Import/Export"; public array $authors = ["Matthew Barbour" => "matthew@darkholme.net"]; public string $license = self::LICENSE_WTFPL; + public ExtensionCategory $category = ExtensionCategory::FILE_HANDLING; public string $description = "Allows bulk exporting/importing of images and associated data."; public array $dependencies = [BulkActionsInfo::KEY]; } diff --git a/ext/bulk_parent_child/info.php b/ext/bulk_parent_child/info.php index b01ea6e7..77abd764 100644 --- a/ext/bulk_parent_child/info.php +++ b/ext/bulk_parent_child/info.php @@ -14,4 +14,5 @@ class BulkParentChildInfo extends ExtensionInfo public string $license = self::LICENSE_WTFPL; public string $description = "Allows bulk setting of parent-child relationships, in order of manual selection"; public array $dependencies = [BulkActionsInfo::KEY]; + public ExtensionCategory $category = ExtensionCategory::METADATA; } diff --git a/ext/comment/info.php b/ext/comment/info.php index 840aae94..8db5cff8 100644 --- a/ext/comment/info.php +++ b/ext/comment/info.php @@ -13,6 +13,7 @@ class CommentListInfo extends ExtensionInfo public string $url = self::SHIMMIE_URL; public array $authors = self::SHISH_AUTHOR; public string $license = self::LICENSE_GPLV2; + public ExtensionCategory $category = ExtensionCategory::FEATURE; public string $description = "Allow users to make comments on images"; public ?string $documentation = "Formatting is done with the standard formatting API (normally BBCode)"; public bool $core = true; diff --git a/ext/cron_uploader/info.php b/ext/cron_uploader/info.php index 3fdefddb..b8df6b32 100644 --- a/ext/cron_uploader/info.php +++ b/ext/cron_uploader/info.php @@ -22,6 +22,7 @@ class CronUploaderInfo extends ExtensionInfo public string $url = self::SHIMMIE_URL; public array $authors = ["YaoiFox" => "admin@yaoifox.com", "Matthew Barbour" => "matthew@darkholme.net"]; public string $license = self::LICENSE_GPLV2; + public ExtensionCategory $category = ExtensionCategory::FILE_HANDLING; public string $description = "Uploads images automatically using Cron Jobs"; public function __construct() diff --git a/ext/custom_html_headers/info.php b/ext/custom_html_headers/info.php index df49d48b..cddad4f4 100644 --- a/ext/custom_html_headers/info.php +++ b/ext/custom_html_headers/info.php @@ -13,7 +13,8 @@ class CustomHtmlHeadersInfo extends ExtensionInfo public string $url = "http://www.drudexsoftware.com"; public array $authors = ["Drudex Software" => "support@drudexsoftware.com"]; public string $license = self::LICENSE_GPLV2; - public string $description = "Allows admins to modify & set custom <head> content"; + public ExtensionCategory $category = ExtensionCategory::ADMIN; + public string $description = "Allows admins to modify & set custom content"; public ?string $documentation = "When you go to board config you can find a block named Custom HTML Headers.
In that block you can simply place any thing you can place within <head></head> diff --git a/ext/danbooru_api/info.php b/ext/danbooru_api/info.php index 2c2f9e71..2025923c 100644 --- a/ext/danbooru_api/info.php +++ b/ext/danbooru_api/info.php @@ -12,6 +12,7 @@ class DanbooruApiInfo extends ExtensionInfo public string $name = "Danbooru Client API"; public array $authors = ["JJS" => "jsutinen@gmail.com"]; public string $description = "Allow Danbooru apps like Danbooru Uploader for Firefox to communicate with Shimmie"; + public ExtensionCategory $category = ExtensionCategory::INTEGRATION; public ?string $documentation = "Notes:
danbooru API based on documentation from danbooru 1.0 - diff --git a/ext/downtime/info.php b/ext/downtime/info.php index c02ce4a7..8aae676a 100644 --- a/ext/downtime/info.php +++ b/ext/downtime/info.php @@ -13,6 +13,7 @@ class DowntimeInfo extends ExtensionInfo public string $url = self::SHIMMIE_URL; public array $authors = self::SHISH_AUTHOR; public string $license = self::LICENSE_GPLV2; + public ExtensionCategory $category = ExtensionCategory::ADMIN; public string $description = "Show a \"down for maintenance\" page"; public ?string $documentation = "Once installed there will be some more options on the config page -- diff --git a/ext/eokm/info.php b/ext/eokm/info.php index 673415b6..f5f06484 100644 --- a/ext/eokm/info.php +++ b/ext/eokm/info.php @@ -14,4 +14,5 @@ class EokmInfo extends ExtensionInfo public array $authors = self::SHISH_AUTHOR; public string $license = self::LICENSE_GPLV2; public string $description = "Check uploads against the EOKM blocklist"; + public ExtensionCategory $category = ExtensionCategory::MODERATION; } diff --git a/ext/ext_manager/info.php b/ext/ext_manager/info.php index 78ffba3a..f31e8102 100644 --- a/ext/ext_manager/info.php +++ b/ext/ext_manager/info.php @@ -14,6 +14,7 @@ class ExtManagerInfo extends ExtensionInfo public array $authors = self::SHISH_AUTHOR; public string $license = self::LICENSE_GPLV2; public ExtensionVisibility $visibility = ExtensionVisibility::ADMIN; + public ExtensionCategory $category = ExtensionCategory::ADMIN; public string $description = "A thing for point & click extension management"; public ?string $documentation = "Allows the admin to view a list of all extensions and enable or disable them; also allows users to view the list of activated extensions and read their documentation"; public bool $core = true; diff --git a/ext/ext_manager/main.php b/ext/ext_manager/main.php index 74bc5459..09036ee6 100644 --- a/ext/ext_manager/main.php +++ b/ext/ext_manager/main.php @@ -104,13 +104,12 @@ class ExtManager extends Extension $extensions = array_filter($extensions, fn ($x) => Extension::is_enabled($x->key)); } usort($extensions, function ($a, $b) { - if ($a->beta === true && $b->beta === false) { - return 1; + if($a->category->name !== $b->category->name) { + return $a->category->name <=> $b->category->name; } - if ($a->beta === false && $b->beta === true) { - return -1; + if ($a->beta !== $b->beta) { + return $a->beta <=> $b->beta; } - return strcmp($a->name, $b->name); }); return $extensions; diff --git a/ext/ext_manager/theme.php b/ext/ext_manager/theme.php index 8d368390..5a035004 100644 --- a/ext/ext_manager/theme.php +++ b/ext/ext_manager/theme.php @@ -7,6 +7,7 @@ namespace Shimmie2; use function MicroHTML\LABEL; use function MicroHTML\A; use function MicroHTML\B; +use function MicroHTML\BR; use function MicroHTML\IMG; use function MicroHTML\TABLE; use function MicroHTML\THEAD; @@ -18,7 +19,6 @@ use function MicroHTML\TD; use function MicroHTML\INPUT; use function MicroHTML\DIV; use function MicroHTML\P; -use function MicroHTML\BR; use function MicroHTML\emptyHTML; use function MicroHTML\rawHTML; @@ -46,12 +46,27 @@ class ExtManagerTheme extends Themelet ) ); + $categories = []; + $last_cat = null; foreach ($extensions as $extension) { - if ((!$editable && $extension->visibility === ExtensionVisibility::ADMIN) - || $extension->visibility === ExtensionVisibility::HIDDEN) { + if ( + (!$editable && $extension->visibility === ExtensionVisibility::ADMIN) + || $extension->visibility === ExtensionVisibility::HIDDEN + ) { continue; } + if($extension->category !== $last_cat) { + $last_cat = $extension->category; + $categories[] = $last_cat; + $tbody->appendChild( + TR( + ["class" => 'category', "id" => $extension->category->value], + TH(["colspan" => '5'], BR(), $last_cat->value) + ) + ); + } + $tbody->appendChild(TR( ["data-ext" => $extension->name], $editable ? TD(INPUT([ @@ -98,9 +113,17 @@ class ExtManagerTheme extends Themelet } } + $cat_html = [ + A(["href" => make_link()], "Index"), + BR(), + ]; + foreach ($categories as $cat) { + $cat_html[] = A(["href" => "#".$cat->value], $cat->value); + } + $page->set_title("Extensions"); $page->set_heading("Extensions"); - $page->add_block(new NavBlock()); + $page->add_block(new Block("Navigation", \MicroHTML\joinHTML(BR(), $cat_html), "left", 0)); $page->add_block(new Block("Extension Manager", $form)); } @@ -123,7 +146,6 @@ class ExtManagerTheme extends Themelet $html = DIV( ["style" => 'margin: auto; text-align: left; width: 512px;'], $author, - ($info->version ? emptyHTML(BR(), B("Version: "), $info->version) : null), ($info->link ? emptyHTML(BR(), B("Home Page"), A(["href" => $info->link], "Link")) : null), P(rawHTML($info->documentation ?? "(This extension has no documentation)")), //


, diff --git a/ext/forum/info.php b/ext/forum/info.php index b4e5f97c..f8c6cf7b 100644 --- a/ext/forum/info.php +++ b/ext/forum/info.php @@ -12,5 +12,6 @@ class ForumInfo extends ExtensionInfo public string $name = "Forum"; public array $authors = ["Sein Kraft" => "mail@seinkraft.info","Alpha" => "alpha@furries.com.ar"]; public string $license = self::LICENSE_GPLV2; + public ExtensionCategory $category = ExtensionCategory::FEATURE; public string $description = "Rough forum extension"; } diff --git a/ext/google_analytics/info.php b/ext/google_analytics/info.php index 5f9b6fdf..b9d2eaa0 100644 --- a/ext/google_analytics/info.php +++ b/ext/google_analytics/info.php @@ -16,4 +16,5 @@ class GoogleAnalyticsInfo extends ExtensionInfo public string $description = "Integrates Google Analytics tracking"; public ?string $documentation = "User has to enter their Google Analytics ID in the Board Config to use this extension."; + public ExtensionCategory $category = ExtensionCategory::OBSERVABILITY; } diff --git a/ext/graphql/info.php b/ext/graphql/info.php index c6bfce05..b6ec9eeb 100644 --- a/ext/graphql/info.php +++ b/ext/graphql/info.php @@ -13,5 +13,6 @@ class GraphQLInfo extends ExtensionInfo public string $url = self::SHIMMIE_URL; public array $authors = self::SHISH_AUTHOR; public string $license = self::LICENSE_GPLV2; + public ExtensionCategory $category = ExtensionCategory::INTEGRATION; public string $description = "Add a graphql API"; } diff --git a/ext/handle_archive/info.php b/ext/handle_archive/info.php index b5c315da..5fa960ff 100644 --- a/ext/handle_archive/info.php +++ b/ext/handle_archive/info.php @@ -13,6 +13,7 @@ class ArchiveFileHandlerInfo extends ExtensionInfo public string $url = self::SHIMMIE_URL; public array $authors = self::SHISH_AUTHOR; public string $description = "Allow users to upload archives (zip, etc)"; + public ExtensionCategory $category = ExtensionCategory::FILE_HANDLING; public ?string $documentation = "Note: requires exec() access and an external unzip command

Any command line unzipper should work, some examples: diff --git a/ext/handle_cbz/info.php b/ext/handle_cbz/info.php index 2ffb4fb8..d5a61b6b 100644 --- a/ext/handle_cbz/info.php +++ b/ext/handle_cbz/info.php @@ -12,5 +12,6 @@ class CBZFileHandlerInfo extends ExtensionInfo public string $name = "Handle CBZ"; public string $url = self::SHIMMIE_URL; public array $authors = self::SHISH_AUTHOR; + public ExtensionCategory $category = ExtensionCategory::FILE_HANDLING; public string $description = "Handle CBZ Comic Archives."; } diff --git a/ext/handle_ico/info.php b/ext/handle_ico/info.php index 874c0895..856c86d9 100644 --- a/ext/handle_ico/info.php +++ b/ext/handle_ico/info.php @@ -12,5 +12,6 @@ class IcoFileHandlerInfo extends ExtensionInfo public string $name = "Handle ICO"; public string $url = self::SHIMMIE_URL; public array $authors = self::SHISH_AUTHOR; + public ExtensionCategory $category = ExtensionCategory::FILE_HANDLING; public string $description = "Handle windows icons"; } diff --git a/ext/handle_mp3/info.php b/ext/handle_mp3/info.php index bd664103..c8e0b49c 100644 --- a/ext/handle_mp3/info.php +++ b/ext/handle_mp3/info.php @@ -12,5 +12,6 @@ class MP3FileHandlerInfo extends ExtensionInfo public string $name = "Handle MP3"; public string $url = self::SHIMMIE_URL; public array $authors = self::SHISH_AUTHOR; + public ExtensionCategory $category = ExtensionCategory::FILE_HANDLING; public string $description = "Handle MP3 files"; } diff --git a/ext/handle_pixel/info.php b/ext/handle_pixel/info.php index 7be05f6d..2f79ad8e 100644 --- a/ext/handle_pixel/info.php +++ b/ext/handle_pixel/info.php @@ -12,6 +12,7 @@ class PixelFileHandlerInfo extends ExtensionInfo public string $name = "Handle Pixel"; public string $url = self::SHIMMIE_URL; public array $authors = self::SHISH_AUTHOR; + public ExtensionCategory $category = ExtensionCategory::FILE_HANDLING; public string $description = "Handle JPEG, PNG, GIF, WEBP, etc files"; public bool $core = true; } diff --git a/ext/handle_svg/info.php b/ext/handle_svg/info.php index 8d3bdffa..0c4b5b63 100644 --- a/ext/handle_svg/info.php +++ b/ext/handle_svg/info.php @@ -12,5 +12,6 @@ class SVGFileHandlerInfo extends ExtensionInfo public string $name = "Handle SVG"; public string $url = self::SHIMMIE_URL; public array $authors = self::SHISH_AUTHOR; + public ExtensionCategory $category = ExtensionCategory::FILE_HANDLING; public string $description = "Handle static SVG files."; } diff --git a/ext/handle_video/info.php b/ext/handle_video/info.php index 3385d212..ee618fd4 100644 --- a/ext/handle_video/info.php +++ b/ext/handle_video/info.php @@ -12,6 +12,7 @@ class VideoFileHandlerInfo extends ExtensionInfo public string $name = "Handle Video"; public array $authors = ["velocity37" => "velocity37@gmail.com",self::SHISH_NAME => self::SHISH_EMAIL, "jgen" => "jeffgenovy@gmail.com", "im-mi" => "im.mi.mail.mi@gmail.com"]; public string $license = self::LICENSE_GPLV2; + public ExtensionCategory $category = ExtensionCategory::FILE_HANDLING; public string $description = "Handle FLV, MP4, OGV and WEBM video files."; public ?string $documentation = "Based heavily on \"Handle MP3\" by Shish.

diff --git a/ext/holiday/info.php b/ext/holiday/info.php index c6092af7..aa8d2f77 100644 --- a/ext/holiday/info.php +++ b/ext/holiday/info.php @@ -13,5 +13,6 @@ class HolidayInfo extends ExtensionInfo public string $url = "http://www.codeanimu.net"; public array $authors = ["DakuTree" => "thedakutree@codeanimu.net"]; public string $license = self::LICENSE_GPLV2; + public ExtensionCategory $category = ExtensionCategory::ADMIN; public string $description = "Use an additional stylesheet on certain holidays"; } diff --git a/ext/image_hash_ban/info.php b/ext/image_hash_ban/info.php index 1feefb55..384d409f 100644 --- a/ext/image_hash_ban/info.php +++ b/ext/image_hash_ban/info.php @@ -13,8 +13,8 @@ class ImageBanInfo extends ExtensionInfo public string $url = "http://atravelinggeek.com/"; public array $authors = ["ATravelingGeek" => "atg@atravelinggeek.com"]; public string $license = self::LICENSE_GPLV2; + public ExtensionCategory $category = ExtensionCategory::MODERATION; public string $description = "Ban images based on their hash"; - public ?string $version = "0.1, October 21, 2007"; public ?string $documentation = "Based on the ResolutionLimit and IPban extensions by Shish"; } diff --git a/ext/image_view_counter/info.php b/ext/image_view_counter/info.php index 48558ac3..d3b4ca52 100644 --- a/ext/image_view_counter/info.php +++ b/ext/image_view_counter/info.php @@ -13,6 +13,7 @@ class ImageViewCounterInfo extends ExtensionInfo public string $url = "http://www.drudexsoftware.com/"; public array $authors = ["Drudex Software" => "support@drudexsoftware.com"]; public string $license = self::LICENSE_GPLV2; + public ExtensionCategory $category = ExtensionCategory::METADATA; public string $description = "Tracks & displays how many times a post is viewed"; public ?string $documentation = "Whenever anyone views a post, a view will be added to that image. diff --git a/ext/index/info.php b/ext/index/info.php index 39df843d..7380491a 100644 --- a/ext/index/info.php +++ b/ext/index/info.php @@ -13,6 +13,7 @@ class IndexInfo extends ExtensionInfo public string $url = self::SHIMMIE_URL; public array $authors = self::SHISH_AUTHOR; public string $license = self::LICENSE_GPLV2; + public ExtensionCategory $category = ExtensionCategory::FEATURE; public string $description = "Show a list of uploaded posts"; public bool $core = true; public ?string $documentation = " etc. diff --git a/ext/ipban/info.php b/ext/ipban/info.php index 740e3915..1384d1cd 100644 --- a/ext/ipban/info.php +++ b/ext/ipban/info.php @@ -13,6 +13,7 @@ class IPBanInfo extends ExtensionInfo public string $url = self::SHIMMIE_URL; public array $authors = self::SHISH_AUTHOR; public string $license = self::LICENSE_GPLV2; + public ExtensionCategory $category = ExtensionCategory::MODERATION; public string $description = "Ban IP addresses"; public ?string $documentation = "Adding a Ban diff --git a/ext/livefeed/info.php b/ext/livefeed/info.php index 2d52939c..27de354d 100644 --- a/ext/livefeed/info.php +++ b/ext/livefeed/info.php @@ -13,5 +13,6 @@ class LiveFeedInfo extends ExtensionInfo public array $authors = self::SHISH_AUTHOR; public string $license = self::LICENSE_GPLV2; public ExtensionVisibility $visibility = ExtensionVisibility::ADMIN; + public ExtensionCategory $category = ExtensionCategory::OBSERVABILITY; public string $description = "Logs user-safe (no IPs) data to a UDP socket, eg IRCCat"; } diff --git a/ext/log_console/info.php b/ext/log_console/info.php index 204915e2..46fd19b5 100644 --- a/ext/log_console/info.php +++ b/ext/log_console/info.php @@ -12,6 +12,7 @@ class LogConsoleInfo extends ExtensionInfo public string $name = "Logging (Console)"; public string $url = self::SHIMMIE_URL; public array $authors = self::SHISH_AUTHOR; + public ExtensionCategory $category = ExtensionCategory::OBSERVABILITY; public string $description = "Send log events to the command line console."; public ExtensionVisibility $visibility = ExtensionVisibility::ADMIN; } diff --git a/ext/log_db/info.php b/ext/log_db/info.php index 0b0eeeb2..0d94cac2 100644 --- a/ext/log_db/info.php +++ b/ext/log_db/info.php @@ -12,6 +12,7 @@ class LogDatabaseInfo extends ExtensionInfo public string $name = "Logging (Database)"; public string $url = self::SHIMMIE_URL; public array $authors = self::SHISH_AUTHOR; + public ExtensionCategory $category = ExtensionCategory::OBSERVABILITY; public string $description = "Keep a record of SCore events (in the database)."; public ExtensionVisibility $visibility = ExtensionVisibility::ADMIN; } diff --git a/ext/log_logstash/info.php b/ext/log_logstash/info.php index e71d9c35..a5ca479e 100644 --- a/ext/log_logstash/info.php +++ b/ext/log_logstash/info.php @@ -14,4 +14,5 @@ class LogLogstashInfo extends ExtensionInfo public array $authors = self::SHISH_AUTHOR; public string $description = "Send log events to a network port."; public ExtensionVisibility $visibility = ExtensionVisibility::ADMIN; + public ExtensionCategory $category = ExtensionCategory::OBSERVABILITY; } diff --git a/ext/log_net/info.php b/ext/log_net/info.php index dca447e3..cd3502b2 100644 --- a/ext/log_net/info.php +++ b/ext/log_net/info.php @@ -14,4 +14,5 @@ class LogNetInfo extends ExtensionInfo public array $authors = self::SHISH_AUTHOR; public string $description = "Send log events to a network port."; public ExtensionVisibility $visibility = ExtensionVisibility::ADMIN; + public ExtensionCategory $category = ExtensionCategory::OBSERVABILITY; } diff --git a/ext/nav_timing/info.php b/ext/nav_timing/info.php index a4bb46ea..297a9de1 100644 --- a/ext/nav_timing/info.php +++ b/ext/nav_timing/info.php @@ -13,4 +13,5 @@ class NavTimingInfo extends ExtensionInfo public array $authors = self::SHISH_AUTHOR; public string $license = self::LICENSE_GPLV2; public string $description = "Log navigation timing data"; + public ExtensionCategory $category = ExtensionCategory::OBSERVABILITY; } diff --git a/ext/not_a_tag/info.php b/ext/not_a_tag/info.php index c2a35a58..544f04e3 100644 --- a/ext/not_a_tag/info.php +++ b/ext/not_a_tag/info.php @@ -13,5 +13,6 @@ class NotATagInfo extends ExtensionInfo public string $url = self::SHIMMIE_URL; public array $authors = self::SHISH_AUTHOR; public string $license = self::LICENSE_GPLV2; + public ExtensionCategory $category = ExtensionCategory::MODERATION; public string $description = "Redirect users to the rules if they use bad tags"; } diff --git a/ext/notes/info.php b/ext/notes/info.php index 3d6b125b..fa7f4067 100644 --- a/ext/notes/info.php +++ b/ext/notes/info.php @@ -12,5 +12,6 @@ class NotesInfo extends ExtensionInfo public string $name = "Notes"; public array $authors = ["Sein Kraft" => "mail@seinkraft.info"]; public string $license = self::LICENSE_GPLV2; + public ExtensionCategory $category = ExtensionCategory::METADATA; public string $description = "Annotate images"; } diff --git a/ext/numeric_score/info.php b/ext/numeric_score/info.php index 8c16b993..08718899 100644 --- a/ext/numeric_score/info.php +++ b/ext/numeric_score/info.php @@ -13,6 +13,7 @@ class NumericScoreInfo extends ExtensionInfo public string $url = self::SHIMMIE_URL; public array $authors = self::SHISH_AUTHOR; public string $license = self::LICENSE_GPLV2; + public ExtensionCategory $category = ExtensionCategory::METADATA; public string $description = "Allow users to score images"; public ?string $documentation = "Each registered user may vote a post +1 or -1, the image's score is the sum of all votes."; } diff --git a/ext/ouroboros_api/info.php b/ext/ouroboros_api/info.php index f63ea7d1..3998ac10 100644 --- a/ext/ouroboros_api/info.php +++ b/ext/ouroboros_api/info.php @@ -12,7 +12,7 @@ class OuroborosAPIInfo extends ExtensionInfo public string $name = "Ouroboros API"; public array $authors = ["Diftraku" => "diftraku[at]derpy.me"]; public string $description = "Ouroboros-like API for Shimmie"; - public ?string $version = "0.2"; + public ExtensionCategory $category = ExtensionCategory::INTEGRATION; public ?string $documentation = "Currently working features