From 2ba285a005abecc15e0016dbba4d8eb851281bec Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 15 Jan 2009 21:39:13 -0800 Subject: [PATCH 01/11] allow extension links to link to internal pages --- ext/ext_manager/main.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/ext_manager/main.php b/ext/ext_manager/main.php index 6795e3c2..d1db1ae2 100644 --- a/ext/ext_manager/main.php +++ b/ext/ext_manager/main.php @@ -25,6 +25,9 @@ class ExtensionInfo { // {{{ } if(preg_match("/Link: (.*)/", $line, $matches)) { $this->link = $matches[1]; + if($this->link[0] == "/") { + $this->link = make_link(substr($this->link, 1)); + } } if(preg_match("/Author: (.*) [<\(](.*@.*)[>\)]/", $line, $matches)) { $this->author = $matches[1]; From ab64f4721fb1174edc41ba4ca5e5f855d145c8a9 Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 15 Jan 2009 21:41:59 -0800 Subject: [PATCH 02/11] support for a documentation tag --- ext/ext_manager/main.php | 17 ++++++++++++++++- ext/ext_manager/theme.php | 8 ++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/ext/ext_manager/main.php b/ext/ext_manager/main.php index d1db1ae2..245ca4bc 100644 --- a/ext/ext_manager/main.php +++ b/ext/ext_manager/main.php @@ -8,7 +8,7 @@ */ class ExtensionInfo { // {{{ - var $ext_name, $name, $link, $author, $email, $description; + var $ext_name, $name, $link, $author, $email, $description, $documentation; function ExtensionInfo($main) { $matches = array(); @@ -45,6 +45,15 @@ class ExtensionInfo { // {{{ $i++; } } + if(preg_match("/(.*)Documentation: (.*)/", $line, $matches)) { + $this->documentation = $matches[2]; + $start = $matches[1]." "; + $start_len = strlen($start); + while(substr($lines[$i+1], 0, $start_len) == $start) { + $this->documentation .= substr($lines[$i+1], $start_len); + $i++; + } + } if(preg_match("/\*\//", $line, $matches)) { break; } @@ -84,6 +93,12 @@ class ExtManager implements Extension { } } + if(($event instanceof PageRequestEvent) && $event->page_matches("ext_doc")) { + $ext = $event->get_arg(0); + $info = new ExtensionInfo("contrib/$ext/main.php"); + $this->theme->display_doc($event->page, $info); + } + if($event instanceof UserBlockBuildingEvent) { if($event->user->is_admin()) { $event->add_link("Extension Manager", make_link("ext_manager")); diff --git a/ext/ext_manager/theme.php b/ext/ext_manager/theme.php index f8292c12..303bc41d 100644 --- a/ext/ext_manager/theme.php +++ b/ext/ext_manager/theme.php @@ -43,5 +43,13 @@ class ExtManagerTheme extends Themelet { $page->add_block(new NavBlock()); $page->add_block(new Block("Extension Manager", $html)); } + + public function display_doc(Page $page, ExtensionInfo $info) { + $html = "
".$info->documentation."
"; + $page->set_title("Documentation for ".html_escape($info->name)); + $page->set_heading(html_escape($info->name)); + $page->add_block(new NavBlock()); + $page->add_block(new Block("Documentation", $html)); + } } ?> From 93ef3abbee70a7fbb88ed956ec46485ebb475131 Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 15 Jan 2009 21:43:09 -0800 Subject: [PATCH 03/11] link to the doc by default --- ext/ext_manager/main.php | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/ext_manager/main.php b/ext/ext_manager/main.php index 245ca4bc..011c2504 100644 --- a/ext/ext_manager/main.php +++ b/ext/ext_manager/main.php @@ -17,6 +17,7 @@ class ExtensionInfo { // {{{ $this->ext_name = $matches[1]; $this->name = $this->ext_name; $this->enabled = $this->is_enabled($this->ext_name); + $this->link = make_link("ext_doc/{$this->ext_name}"); for($i=0; $i Date: Thu, 15 Jan 2009 21:57:30 -0800 Subject: [PATCH 04/11] whitespace --- ext/ext_manager/main.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/ext_manager/main.php b/ext/ext_manager/main.php index 011c2504..b634ca41 100644 --- a/ext/ext_manager/main.php +++ b/ext/ext_manager/main.php @@ -42,7 +42,7 @@ class ExtensionInfo { // {{{ $start = $matches[1]." "; $start_len = strlen($start); while(substr($lines[$i+1], 0, $start_len) == $start) { - $this->description .= substr($lines[$i+1], $start_len); + $this->description .= " ".substr($lines[$i+1], $start_len); $i++; } } @@ -51,7 +51,7 @@ class ExtensionInfo { // {{{ $start = $matches[1]." "; $start_len = strlen($start); while(substr($lines[$i+1], 0, $start_len) == $start) { - $this->documentation .= substr($lines[$i+1], $start_len); + $this->documentation .= " ".substr($lines[$i+1], $start_len); $i++; } } From fd38860c9533367fc5a86ba16d9cb86a3716ddd7 Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 15 Jan 2009 21:58:05 -0800 Subject: [PATCH 05/11] layout --- ext/ext_manager/theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ext_manager/theme.php b/ext/ext_manager/theme.php index 303bc41d..187e0000 100644 --- a/ext/ext_manager/theme.php +++ b/ext/ext_manager/theme.php @@ -45,7 +45,7 @@ class ExtManagerTheme extends Themelet { } public function display_doc(Page $page, ExtensionInfo $info) { - $html = "
".$info->documentation."
"; + $html = "
".$info->documentation."
"; $page->set_title("Documentation for ".html_escape($info->name)); $page->set_heading(html_escape($info->name)); $page->add_block(new NavBlock()); From b9284b44d95106bf57dda9bb9a66e53b39c228d1 Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 15 Jan 2009 22:04:50 -0800 Subject: [PATCH 06/11] allow long tags to start on a new line --- ext/ext_manager/main.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/ext_manager/main.php b/ext/ext_manager/main.php index b634ca41..49f75fa1 100644 --- a/ext/ext_manager/main.php +++ b/ext/ext_manager/main.php @@ -37,7 +37,7 @@ class ExtensionInfo { // {{{ else if(preg_match("/Author: (.*)/", $line, $matches)) { $this->author = $matches[1]; } - if(preg_match("/(.*)Description: (.*)/", $line, $matches)) { + if(preg_match("/(.*)Description: ?(.*)/", $line, $matches)) { $this->description = $matches[2]; $start = $matches[1]." "; $start_len = strlen($start); @@ -46,7 +46,7 @@ class ExtensionInfo { // {{{ $i++; } } - if(preg_match("/(.*)Documentation: (.*)/", $line, $matches)) { + if(preg_match("/(.*)Documentation: ?(.*)/", $line, $matches)) { $this->documentation = $matches[2]; $start = $matches[1]." "; $start_len = strlen($start); From 53ff09ece2242384be2ca3fa5de62792b607a011 Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 15 Jan 2009 22:34:03 -0800 Subject: [PATCH 07/11] code style --- themes/default/style.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/themes/default/style.css b/themes/default/style.css index 329c3cac..45d8d28a 100644 --- a/themes/default/style.css +++ b/themes/default/style.css @@ -33,6 +33,10 @@ TD { vertical-align: top; text-align: center; } +CODE { + background: #DEDEDE; + font-size: 0.8em; +} #subtitle { width: 256px; font-size: 0.75em; From 873e3c391123a6db9c7504db639029f8ea622f97 Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 15 Jan 2009 23:01:30 -0800 Subject: [PATCH 08/11] eol --- contrib/link_image/main.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/link_image/main.php b/contrib/link_image/main.php index 919539ef..3137d795 100644 --- a/contrib/link_image/main.php +++ b/contrib/link_image/main.php @@ -10,8 +10,8 @@ class LinkImage implements Extension { public function receive_event(Event $event) { if(is_null($this->theme)) $this->theme = get_theme_object($this); if(($event instanceof DisplayingImageEvent)) { - global $config; - $data_href = get_base_href(); + global $config; + $data_href = get_base_href(); $event->page->add_header("",0); $this->theme->links_block($event->page,$this->data($event->image)); @@ -21,11 +21,11 @@ class LinkImage implements Extension { $sb->add_text_option("ext_link-img_text-link_format", "Text Link Format: "); $event->panel->add_block($sb); } - if($event instanceof InitExtEvent) { - global $config; - //just set default if empty. + if($event instanceof InitExtEvent) { + global $config; + //just set default if empty. $config->set_default_string("ext_link-img_text-link_format", - '$title - $id ($ext $size $filesize)'); + '$title - $id ($ext $size $filesize)'); } } private function data($image) { From b271d9dccb5b3019adf7936cf0d695f0d64a9513 Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 15 Jan 2009 23:02:05 -0800 Subject: [PATCH 09/11] typo --- contrib/news/main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/news/main.php b/contrib/news/main.php index b6262a8d..150ecd49 100644 --- a/contrib/news/main.php +++ b/contrib/news/main.php @@ -3,7 +3,7 @@ * Name: News * Author: Shish * License: GPLv2 - * Description: Show a short amonut of text in a block on the post list + * Description: Show a short amount of text in a block on the post list */ class News implements Extension { From 68159753d4d4adfa2ddbe1a015db72ec6d2727e2 Mon Sep 17 00:00:00 2001 From: Shish Date: Fri, 16 Jan 2009 00:18:15 -0800 Subject: [PATCH 10/11] random image block --- contrib/random_image/main.php | 20 ++++++++++++++++++++ contrib/random_image/theme.php | 8 ++++++++ 2 files changed, 28 insertions(+) create mode 100644 contrib/random_image/theme.php diff --git a/contrib/random_image/main.php b/contrib/random_image/main.php index 03f5682c..b067ba0d 100644 --- a/contrib/random_image/main.php +++ b/contrib/random_image/main.php @@ -8,7 +8,11 @@ */ class RandomImage implements Extension { + var $theme; + public function receive_event(Event $event) { + if(is_null($this->theme)) $this->theme = get_theme_object($this); + if(($event instanceof PageRequestEvent) && $event->page_matches("random_image")) { global $config; global $database; @@ -36,6 +40,22 @@ class RandomImage implements Extension { } } } + + if(($event instanceof SetupBuildingEvent)) { + $sb = new SetupBlock("Random Image"); + $sb->add_bool_option("show_random_block", "Show Random Block: "); + $event->panel->add_block($sb); + } + + if($event instanceof PostListBuildingEvent) { + global $config, $database; + if($config->get_bool("show_random_block")) { + $image = Image::by_random($config, $database, $event->search_terms); + if(!is_null($image)) { + $this->theme->display_random($event->page, $image); + } + } + } } } add_event_listener(new RandomImage()); diff --git a/contrib/random_image/theme.php b/contrib/random_image/theme.php new file mode 100644 index 00000000..a4a7b8b7 --- /dev/null +++ b/contrib/random_image/theme.php @@ -0,0 +1,8 @@ +add_block(new Block("Random Image", $this->build_thumb_html($image), "left", 8)); + } +} +?> From 17ad021ccab4d77b249ce2e56bd870bb1700b4f6 Mon Sep 17 00:00:00 2001 From: Shish Date: Fri, 16 Jan 2009 00:18:41 -0800 Subject: [PATCH 11/11] contrib documentation --- contrib/autocomplete/main.php | 3 +++ contrib/ban_words/main.php | 13 +++++++++++++ contrib/bulk_add/main.php | 7 +++++++ contrib/emoticons/main.php | 8 +++++++- contrib/et/main.php | 8 +++++++- contrib/featured/main.php | 5 +++++ contrib/handle_archive/main.php | 5 +++++ contrib/home/main.php | 14 ++++++++++---- contrib/ipban/main.php | 6 +++++- contrib/news/main.php | 2 ++ contrib/notes/main.php | 2 ++ contrib/numeric_score/main.php | 3 +++ contrib/piclens/main.php | 5 +++++ contrib/pm/main.php | 4 ++++ contrib/random_image/main.php | 14 +++++++++++++- contrib/rating/main.php | 2 +- contrib/regen_thumb/main.php | 6 ++++++ contrib/site_description/main.php | 6 ++++-- contrib/svn_update/main.php | 6 ++++++ contrib/text_score/main.php | 5 +++++ ext/ext_manager/main.php | 4 +++- 21 files changed, 116 insertions(+), 12 deletions(-) diff --git a/contrib/autocomplete/main.php b/contrib/autocomplete/main.php index 461dbd6f..cee08e4e 100644 --- a/contrib/autocomplete/main.php +++ b/contrib/autocomplete/main.php @@ -4,6 +4,9 @@ * Author: Shish * License: GPLv2 * Description: Auto-complete for search and upload tags + * Documentation: + * Just enable and things should start autocompleting as if + * by magic. That is, if this extension actually worked... */ class AutoComplete implements Extension { diff --git a/contrib/ban_words/main.php b/contrib/ban_words/main.php index be86d052..d03ae3be 100644 --- a/contrib/ban_words/main.php +++ b/contrib/ban_words/main.php @@ -4,6 +4,19 @@ * Author: Shish * License: GPLv2 * Description: For stopping spam and other comment abuse + * Documentation: + * Allows an administrator to ban certain words + * from comments. This can be a very simple but effective way + * of stopping spam; just add "viagra", "porn", etc to the + * banned words list. + *

Regex bans are also supported, allowing more complicated + * bans like /http:.*\.cn\// to block links to + * chinese websites, or /.*?http.*?http.*?http.*?http.*?/ + * to block comments with four (or more) links in. + *

Note that for non-regex matches, only whole words are + * matched, eg banning "sex" would block the comment "get free + * sex call this number", but allow "This is a photo of Bob + * from Essex" */ class BanWords implements Extension { diff --git a/contrib/bulk_add/main.php b/contrib/bulk_add/main.php index 283e5938..14640627 100644 --- a/contrib/bulk_add/main.php +++ b/contrib/bulk_add/main.php @@ -4,6 +4,13 @@ * Author: Shish * License: GPLv2 * Description: Bulk add server-side images + * Documentation: + * Upload the images into a new directory via ftp or similar, + * go to shimmie's admin page and put that directory in the + * bulk add box. If there are subdirectories, they get used + * as tags (eg if you upload into /home/bob/uploads/holiday/2008/ + * and point shimmie ad /home/bob/uploads, then images will be + * tagged "holiday 2008") */ class BulkAdd implements Extension { diff --git a/contrib/emoticons/main.php b/contrib/emoticons/main.php index 9cc1d34f..faa7721e 100644 --- a/contrib/emoticons/main.php +++ b/contrib/emoticons/main.php @@ -3,7 +3,13 @@ * Name: Emoticon Filter * Author: Shish * License: GPLv2 - * Description: Turn :smile: into a link to smile.gif + * Description: Lets users use graphical smilies + * Documentation: + * This extension will turn colon-something-colon into a link + * to an image with that something as the name, eg :smile: + * becomes a link to smile.gif + *

Images are stored in /ext/emoticons/default/, and you can + * add more emoticons by uploading images into that folder. */ class Emoticons extends FormatterExtension { diff --git a/contrib/et/main.php b/contrib/et/main.php index 4ca4ef96..02b0a4de 100644 --- a/contrib/et/main.php +++ b/contrib/et/main.php @@ -3,7 +3,13 @@ * Name: System Info * Author: Shish * License: GPLv2 - * Description: Show various bits of system information, for debugging + * Description: Show various bits of system information + * Documentation: + * Knowing the information that this extension shows can be + * very useful for debugging. There's also an option to send + * your stats to my database, so I can get some idea of how + * shimmie is used, which servers I need to support, which + * versions of PHP I should test with, etc. */ class ET implements Extension { diff --git a/contrib/featured/main.php b/contrib/featured/main.php index 089afcbc..6344fea7 100644 --- a/contrib/featured/main.php +++ b/contrib/featured/main.php @@ -4,6 +4,11 @@ * Author: Shish * License: GPLv2 * Description: Bring a specific image to the users' attentions + * Documentation: + * Once enabled, a new "feature this" button will appear next + * to the other image control buttons (delete, rotate, etc). + * Clicking it will set the image as the site's current feature, + * which will be shown in the side bar of the post list. */ class Featured implements Extension { diff --git a/contrib/handle_archive/main.php b/contrib/handle_archive/main.php index 71499a5e..b5baf990 100644 --- a/contrib/handle_archive/main.php +++ b/contrib/handle_archive/main.php @@ -3,6 +3,11 @@ * Name: Archive File Handler * Author: Shish * Description: Allow users to upload archives (zip, etc) + * Documentation: + * Note: requires exec() access and an external unzip command + *

Any command line unzipper should work, some examples: + *

unzip: unzip -d "%d" "%f" + *
7-zip: 7zr x -o"%d" "%f" */ class ArchiveFileHandler implements Extension { diff --git a/contrib/home/main.php b/contrib/home/main.php index 64c291e6..ec03fee5 100644 --- a/contrib/home/main.php +++ b/contrib/home/main.php @@ -1,11 +1,17 @@ * License: GPLv2 -* Description: Extension adds a page "home" containing user specified -* links and a counter showing total number of posts. The -* page is accessed via /home. +* Description: Displays a front page with logo, search box and image count +* 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" +* and set "Front Page" to "home". +*

The images used for the numbers can be changed from the board config +* page. If you want to use your own numbers, upload them into a new folder +* in /ext/home/counters, and they'll become available +* alongside the default choices. */ class Home implements Extension { diff --git a/contrib/ipban/main.php b/contrib/ipban/main.php index 2c804dc8..72f58c96 100644 --- a/contrib/ipban/main.php +++ b/contrib/ipban/main.php @@ -4,7 +4,11 @@ * Author: Shish * License: GPLv2 * Description: Ban IP addresses - * Link: http://trac.shishnet.org/shimmie2/wiki/Contrib/Extensions/IPBan + * Documentation: + * Adding a Ban + *
IP: Can be a single IP (eg. 123.234.210.21), or a CIDR block (eg. 152.23.43.0/24) + *
Reason: Any text, for the admin to remember why the ban was put in place + *
Until: Either a date in YYYY-MM-DD format, or an offset like "3 days" */ // RemoveIPBanEvent {{{ diff --git a/contrib/news/main.php b/contrib/news/main.php index 150ecd49..efa13eaa 100644 --- a/contrib/news/main.php +++ b/contrib/news/main.php @@ -4,6 +4,8 @@ * Author: Shish * License: GPLv2 * Description: Show a short amount of text in a block on the post list + * Documentation: + * Any HTML is allowed */ class News implements Extension { diff --git a/contrib/notes/main.php b/contrib/notes/main.php index 09a8b3d8..dd1483fa 100644 --- a/contrib/notes/main.php +++ b/contrib/notes/main.php @@ -4,6 +4,8 @@ * Author: Shish * License: GPLv2 * Description: Adds notes overlaid on the images + * Documentation: + * This is quite broken :( */ class Notes implements Extension { diff --git a/contrib/numeric_score/main.php b/contrib/numeric_score/main.php index 36e51a9f..41892c81 100644 --- a/contrib/numeric_score/main.php +++ b/contrib/numeric_score/main.php @@ -4,6 +4,9 @@ * Author: Shish * License: GPLv2 * Description: Allow users to score images + * Documentation: + * Each registered user may vote an image +1 or -1, the + * image's score is the sum of all votes. */ class NumericScoreSetEvent extends Event { diff --git a/contrib/piclens/main.php b/contrib/piclens/main.php index c1a2ca32..679ac7a2 100644 --- a/contrib/piclens/main.php +++ b/contrib/piclens/main.php @@ -4,6 +4,11 @@ * Author: Shish * License: GPLv2 * Description: Adds a link to piclensify the gallery + * Documentation: + * This extension only provides a button to the javascript + * version of the gallery; the "RSS for Images" extension + * is piclens-compatible to start with. (And that extension + * must be active for this one to do anything useful) */ class PicLens implements Extension { public function receive_event(Event $event) { diff --git a/contrib/pm/main.php b/contrib/pm/main.php index 20426f73..9ee63db8 100644 --- a/contrib/pm/main.php +++ b/contrib/pm/main.php @@ -4,6 +4,10 @@ * Author: Shish * License: GPLv2 * Description: Allow users to send messages to eachother + * Documentation: + * PMs show up on a user's profile page, readable by that user + * as well as board admins. To send a PM, visit another user's + * profile page and a box will be shown. */ class SendPMEvent extends Event { diff --git a/contrib/random_image/main.php b/contrib/random_image/main.php index b067ba0d..5e78c8b0 100644 --- a/contrib/random_image/main.php +++ b/contrib/random_image/main.php @@ -4,7 +4,19 @@ * Author: Shish * License: GPLv2 * Description: Do things with a random image - * Link: http://trac.shishnet.org/shimmie2/wiki/Contrib/Extensions/RandomImage + * Documentation: + * Viewing a random image + *
Visit /random_image/view + *

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

Getting a random image from a subset + *
Adding a slash and some search terms will get a random image + * from those results. This can be useful if you want a specific size + * of random image, or from a category. You could link to + * /random_image/download/size:1024x768+cute */ class RandomImage implements Extension { diff --git a/contrib/rating/main.php b/contrib/rating/main.php index f879b692..63e4023f 100644 --- a/contrib/rating/main.php +++ b/contrib/rating/main.php @@ -3,7 +3,7 @@ * Name: Image Ratings * Author: Shish * License: GPLv2 - * Description: Allow users to rate images + * Description: Allow users to rate images "safe", "questionable" or "explicit" */ class RatingSetEvent extends Event { diff --git a/contrib/regen_thumb/main.php b/contrib/regen_thumb/main.php index 0b312396..c94f3e4b 100644 --- a/contrib/regen_thumb/main.php +++ b/contrib/regen_thumb/main.php @@ -4,6 +4,12 @@ * Author: Shish * License: GPLv2 * Description: Regenerate a thumbnail image + * 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 + * since been increased. */ class RegenThumb implements Extension { diff --git a/contrib/site_description/main.php b/contrib/site_description/main.php index d76117fb..486e59a2 100644 --- a/contrib/site_description/main.php +++ b/contrib/site_description/main.php @@ -3,8 +3,10 @@ * Name: Site Description * Author: Shish * License: GPLv2 - * Description: Sets the "description" meta-info in the page header, for - * eg search engines to read + * Description: A description for search engines + * Documentation: + * This extension sets the "description" meta tag in the header + * of pages so that search engines can pick it up */ class SiteDescription implements Extension { public function receive_event(Event $event) { diff --git a/contrib/svn_update/main.php b/contrib/svn_update/main.php index 2739851d..f4d02b51 100644 --- a/contrib/svn_update/main.php +++ b/contrib/svn_update/main.php @@ -4,6 +4,12 @@ * Author: Shish * License: GPLv2 * Description: Provides a button to check for updates + * Documentation: + * This is a very risky idea, implemented without safeguards. + * If you've done a clean SVN checkout, then updating will + * normally work fine; but if you've made changes in one way, + * and SVN has changed something in a different way, then there + * will be conflicts and the site will die :( */ class SVNUpdate implements Extension { diff --git a/contrib/text_score/main.php b/contrib/text_score/main.php index 236bc27f..0dd663de 100644 --- a/contrib/text_score/main.php +++ b/contrib/text_score/main.php @@ -4,6 +4,11 @@ * Author: Shish * License: GPLv2 * Description: Allow users to score images + * Documentation: + * Similar to the Image Scores (Numeric) extension, but this one + * uses an average rather than the sum of all votes, which means + * that the score will be [-2 .. +2], and each integer in that + * range has a label attached. */ class TextScoreSetEvent extends Event { diff --git a/ext/ext_manager/main.php b/ext/ext_manager/main.php index 49f75fa1..61156100 100644 --- a/ext/ext_manager/main.php +++ b/ext/ext_manager/main.php @@ -17,7 +17,6 @@ class ExtensionInfo { // {{{ $this->ext_name = $matches[1]; $this->name = $this->ext_name; $this->enabled = $this->is_enabled($this->ext_name); - $this->link = make_link("ext_doc/{$this->ext_name}"); for($i=0; $ilink) && !is_null($this->documentation)) { + $this->link = make_link("ext_doc/{$this->ext_name}"); + } } private function is_enabled($fname) {