more documentation, and set some extensions to be hidden from the user docs list

This commit is contained in:
Shish 2010-01-05 13:13:11 +00:00
parent 843e2b2cc9
commit 18c0fa7df8
13 changed files with 22 additions and 6 deletions

View File

@ -3,6 +3,7 @@
* Name: Home Page * Name: Home Page
* Author: Bzchan <bzchan@animemahou.com> * Author: Bzchan <bzchan@animemahou.com>
* License: GPLv2 * License: GPLv2
* Visibility: admin
* Description: Displays a front page with logo, search box and image count * Description: Displays a front page with logo, search box and image count
* Documentation: * Documentation:
* Once enabled, the page will show up at the URL "home", so if you want * Once enabled, the page will show up at the URL "home", so if you want

View File

@ -3,6 +3,7 @@
* Name: Logging (Database) * Name: Logging (Database)
* Author: Shish * Author: Shish
* Description: Keep a record of SCore events * Description: Keep a record of SCore events
* Visibility: admin
*/ */
class LogDatabase extends SimpleExtension { class LogDatabase extends SimpleExtension {

View File

@ -3,6 +3,7 @@
* Name: Site Description * Name: Site Description
* Author: Shish <webmaster@shishnet.org> * Author: Shish <webmaster@shishnet.org>
* License: GPLv2 * License: GPLv2
* Visibility: admin
* Description: A description for search engines * Description: A description for search engines
* Documentation: * Documentation:
* This extension sets the "description" meta tag in the header * This extension sets the "description" meta tag in the header

View File

@ -4,6 +4,8 @@
* Author: Shish <webmaster@shishnet.org> * Author: Shish <webmaster@shishnet.org>
* License: GPLv2 * License: GPLv2
* Description: A simple wiki, for those who don't want the hugeness of mediawiki * Description: A simple wiki, for those who don't want the hugeness of mediawiki
* Documentation:
* Standard formatting APIs are used (This will be BBCode by default)
*/ */
class WikiUpdateEvent extends Event { class WikiUpdateEvent extends Event {

View File

@ -6,8 +6,8 @@
* License: GPLv2 * License: GPLv2
* Description: Edit the alias list * Description: Edit the alias list
* Documentation: * Documentation:
* The list is visible at $site/alias/list; only site admins can edit it, * The list is visible at <a href="$site/alias/list">/alias/list</a>; only
* other people can view and download it * site admins can edit it, other people can view and download it
*/ */
class AddAliasEvent extends Event { class AddAliasEvent extends Event {

View File

@ -6,8 +6,7 @@
* License: GPLv2 * License: GPLv2
* Description: Allow users to make comments on images * Description: Allow users to make comments on images
* Documentation: * Documentation:
* Formatting is done with BBCode, as interpreted by the * Formatting is done with the standard formatting API (normally BBCode)
* BBCode extension
*/ */
require_once "lib/akismet.class.php"; require_once "lib/akismet.class.php";

View File

@ -4,6 +4,7 @@
* Author: Shish <webmaster@shishnet.org> * Author: Shish <webmaster@shishnet.org>
* Link: http://code.shishnet.org/shimmie2/ * Link: http://code.shishnet.org/shimmie2/
* License: GPLv2 * License: GPLv2
* Visibility: admin
* Description: A thing for point & click extension management * Description: A thing for point & click extension management
* Documentation: * Documentation:
* Allows the admin to view a list of all extensions and enable or * Allows the admin to view a list of all extensions and enable or
@ -18,7 +19,8 @@ function __extman_extcmp(ExtensionInfo $a, ExtensionInfo $b) {
/** @private */ /** @private */
class ExtensionInfo { class ExtensionInfo {
var $ext_name, $name, $link, $author, $email, $description, $documentation, $version; var $ext_name, $name, $link, $author, $email;
var $description, $documentation, $version, $visibility;
function ExtensionInfo($main) { function ExtensionInfo($main) {
$matches = array(); $matches = array();
@ -33,6 +35,9 @@ class ExtensionInfo {
if(preg_match("/Name: (.*)/", $line, $matches)) { if(preg_match("/Name: (.*)/", $line, $matches)) {
$this->name = $matches[1]; $this->name = $matches[1];
} }
if(preg_match("/Visibility: (.*)/", $line, $matches)) {
$this->visibility = $matches[1];
}
if(preg_match("/Link: (.*)/", $line, $matches)) { if(preg_match("/Link: (.*)/", $line, $matches)) {
$this->link = $matches[1]; $this->link = $matches[1];
if($this->link[0] == "/") { if($this->link[0] == "/") {
@ -66,6 +71,7 @@ class ExtensionInfo {
$this->documentation .= " ".substr($lines[$i+1], $start_len); $this->documentation .= " ".substr($lines[$i+1], $start_len);
$i++; $i++;
} }
$this->documentation = str_replace('$site', make_http(get_base_href()), $this->documentation);
} }
if(preg_match("/\*\//", $line, $matches)) { if(preg_match("/\*\//", $line, $matches)) {
break; break;

View File

@ -18,6 +18,8 @@ class ExtManagerTheme extends Themelet {
"; ";
$n = 0; $n = 0;
foreach($extensions as $extension) { foreach($extensions as $extension) {
if(!$editable && $extension->visibility == "admin") continue;
$ext_name = $extension->ext_name; $ext_name = $extension->ext_name;
$h_name = empty($extension->name) ? $ext_name : html_escape($extension->name); $h_name = empty($extension->name) ? $ext_name : html_escape($extension->name);
$h_description = html_escape($extension->description); $h_description = html_escape($extension->description);

View File

@ -4,6 +4,7 @@
* Author: Shish <webmaster@shishnet.org> * Author: Shish <webmaster@shishnet.org>
* Link: http://code.shishnet.org/shimmie2/ * Link: http://code.shishnet.org/shimmie2/
* License: GPLv2 * License: GPLv2
* Visibility: admin
* Description: Shows an error message when the user views a page with no content * Description: Shows an error message when the user views a page with no content
*/ */

View File

@ -3,6 +3,7 @@
* Name: Image Manager * Name: Image Manager
* Author: Shish * Author: Shish
* Description: Handle the image database * Description: Handle the image database
* Visibility: admin
*/ */
/* /*

View File

@ -1,6 +1,6 @@
<?php <?php
/** /**
* Name: Post Index * Name: Image List
* Author: Shish <webmaster@shishnet.org> * Author: Shish <webmaster@shishnet.org>
* Link: http://code.shishnet.org/shimmie2/ * Link: http://code.shishnet.org/shimmie2/
* License: GPLv2 * License: GPLv2

View File

@ -2,6 +2,7 @@
/* /*
* Name: Board Config * Name: Board Config
* Author: Shish * Author: Shish
* Visibility: admin
* Description: Allows the site admin to configure the board to his or her taste * Description: Allows the site admin to configure the board to his or her taste
*/ */

View File

@ -3,6 +3,7 @@
* Name: Database Upgrader * Name: Database Upgrader
* Author: Shish * Author: Shish
* Description: Keeps things happy behind the scenes * Description: Keeps things happy behind the scenes
* Visibility: admin
*/ */
class Upgrade implements Extension { class Upgrade implements Extension {