summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2010-11-22 16:46:34 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2010-11-22 16:46:34 -0500
commit3e322b1c3c07726742309aa451179627592baf37 (patch)
tree4bdedf54c611e7e0327151e42ad4d5aef856caae
parent22702160e6c74460c4937952b9a016d40503c671 (diff)
Miscellaneous plugin fixes/tweaksHEADmaster
From most important to least important: plugins/GNUsocialTemplatePlugin.php: * Modify to play nice with plain-old TemplatePlugin. * Move onPluginVersion() from action class to plugin class * Increment version from 0.1 to 0.1.1 plugins/TemplatePlugin.php: same as GNUsocialTemplatePlugin.php plugindata.php: add some output to help identify misbehaving plugins lib/implugin.php: fix comments: s/authentication/instant messaging/ lib/uapplugin.php: comments: add @see http://www.iab.net/iab_products_and_industry_services/508676/508767/UAP tpl/social.php: clean up formatting (also, use tabs instead of spaces, to be consistant with tpl/index.php)
-rw-r--r--lib/implugin.php2
-rw-r--r--lib/uapplugin.php2
-rw-r--r--plugindata.php2
-rw-r--r--plugins/GNUsocialTemplatePlugin.php31
-rw-r--r--plugins/TemplatePlugin.php27
-rw-r--r--tpl/social.php95
6 files changed, 80 insertions, 79 deletions
diff --git a/lib/implugin.php b/lib/implugin.php
index dafb8a416..dab72c514 100644
--- a/lib/implugin.php
+++ b/lib/implugin.php
@@ -31,7 +31,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
}
/**
- * Superclass for plugins that do authentication
+ * Superclass for plugins that do instant messaging
*
* Implementations will likely want to override onStartIoManagerClasses() so that their
* IO manager is used
diff --git a/lib/uapplugin.php b/lib/uapplugin.php
index ef35bafbf..154ba70c7 100644
--- a/lib/uapplugin.php
+++ b/lib/uapplugin.php
@@ -26,6 +26,7 @@
* @copyright 2010 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
+ * @see http://www.iab.net/iab_products_and_industry_services/508676/508767/UAP
*/
if (!defined('STATUSNET') && !defined('LACONICA')) {
@@ -50,6 +51,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
* @author Evan Prodromou <evan@status.net>
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
+ * @see http://www.iab.net/iab_products_and_industry_services/508676/508767/UAP
*/
abstract class UAPPlugin extends Plugin
diff --git a/plugindata.php b/plugindata.php
index 58c5bacda..c2b3dea22 100644
--- a/plugindata.php
+++ b/plugindata.php
@@ -93,6 +93,8 @@ function loadPlugin($pluginName,$file,&$data) {
foreach ($newData as $pluginInfo) {
$data[$pluginName] = $pluginInfo;
}
+ } else {
+ echo 'ERROR: Class "'.$pluginName."Plugin\" still does not exist\n";
}
}
diff --git a/plugins/GNUsocialTemplatePlugin.php b/plugins/GNUsocialTemplatePlugin.php
index 7db2f73a8..1287727aa 100644
--- a/plugins/GNUsocialTemplatePlugin.php
+++ b/plugins/GNUsocialTemplatePlugin.php
@@ -21,9 +21,9 @@ if (!defined('STATUSNET')) {
exit(1);
}
-define('TEMPLATEPLUGIN_VERSION', '0.1');
+define('GNUSOCIAL_TEMPLATEPLUGIN_VERSION', '0.1.1');
-class TemplatePlugin extends Plugin {
+class GNUsocialTemplatePlugin extends Plugin {
var $blocks = array();
@@ -253,6 +253,17 @@ class TemplatePlugin extends Plugin {
$act->xw->setIndent(true);
}
+ function onPluginVersion(&$versions)
+ {
+ $versions[] = array('name' => 'Template',
+ 'version' => GNUSOCIAL_TEMPLATEPLUGIN_VERSION,
+ 'author' => 'Brian Hendrickson',
+ 'homepage' => 'http://status.net/wiki/Plugin:Template',
+ 'rawdescription' =>
+ _m('Use an HTML template for Web output.'));
+ return true;
+ }
+
}
/**
@@ -269,7 +280,7 @@ class TemplatePlugin extends Plugin {
*
*/
-class TemplateAction extends Action
+class GNUsocialTemplateAction extends Action
{
function prepare($args) {
@@ -324,16 +335,6 @@ class TemplateAction extends Action
}
}
- function onPluginVersion(&$versions)
- {
- $versions[] = array('name' => 'Template',
- 'version' => TEMPLATEPLUGIN_VERSION,
- 'author' => 'Brian Hendrickson',
- 'homepage' => 'http://status.net/wiki/Plugin:Template',
- 'rawdescription' =>
- _m('Use an HTML template for Web output.'));
- return true;
- }
}
@@ -350,10 +351,10 @@ class TemplateAction extends Action
* @link http://megapump.com/
*
*/
-
+if (!function_exists('section')) {
function section($tagname) {
global $tags;
if (isset($tags[$tagname]))
return $tags[$tagname];
}
-
+}
diff --git a/plugins/TemplatePlugin.php b/plugins/TemplatePlugin.php
index 80625c5b7..5595b3c01 100644
--- a/plugins/TemplatePlugin.php
+++ b/plugins/TemplatePlugin.php
@@ -19,7 +19,7 @@ if (!defined('STATUSNET')) {
exit(1);
}
-define('TEMPLATEPLUGIN_VERSION', '0.1');
+define('TEMPLATEPLUGIN_VERSION', '0.1.1');
class TemplatePlugin extends Plugin {
@@ -251,6 +251,17 @@ class TemplatePlugin extends Plugin {
$act->xw->setIndent(true);
}
+ function onPluginVersion(&$versions)
+ {
+ $versions[] = array('name' => 'Template',
+ 'version' => TEMPLATEPLUGIN_VERSION,
+ 'author' => 'Brian Hendrickson',
+ 'homepage' => 'http://status.net/wiki/Plugin:Template',
+ 'rawdescription' =>
+ _m('Use an HTML template for Web output.'));
+ return true;
+ }
+
}
/**
@@ -322,16 +333,6 @@ class TemplateAction extends Action
}
}
- function onPluginVersion(&$versions)
- {
- $versions[] = array('name' => 'Template',
- 'version' => TEMPLATEPLUGIN_VERSION,
- 'author' => 'Brian Hendrickson',
- 'homepage' => 'http://status.net/wiki/Plugin:Template',
- 'rawdescription' =>
- _m('Use an HTML template for Web output.'));
- return true;
- }
}
@@ -348,10 +349,10 @@ class TemplateAction extends Action
* @link http://megapump.com/
*
*/
-
+if (!function_exists('section')) {
function section($tagname) {
global $tags;
if (isset($tags[$tagname]))
return $tags[$tagname];
}
-
+}
diff --git a/tpl/social.php b/tpl/social.php
index b7e876c82..bbfeb1929 100644
--- a/tpl/social.php
+++ b/tpl/social.php
@@ -1,53 +1,48 @@
<!DOCTYPE html>
<html>
- <head>
- <title><?php echo section('title'); ?> &mdash; GNU social</title>
-
-
- <link rel="stylesheet" href="/theme/gnusocial/css/combo.css" type="text/css">
- <link rel="stylesheet" href="/theme/gnusocial/css/social.css" type="text/css">
- <?php echo section('scripts'); ?>
- <?php echo section('search'); ?>
- <?php echo section('feeds'); ?>
- <?php echo section('description'); ?>
- <?php echo section('head'); ?>
- </head>
- <body id="<?php echo section('action'); ?>">
- <div id="custom-doc" class="yui-t2">
- <div id="hd">
- <h1><a href="/">GNU social</a></h1>
- <?php echo section('nav'); ?>
- </div>
- <div id="bd">
- <div id="yui-main">
- <div class="yui-b" id="social">
- <div class="yui-gc">
- <div class="yui-u first">
- <?php echo section('noticeform'); ?>
- <?php echo section('bodytext'); ?>
-
- </div>
-
-
- <div class="yui-u" id="right-nav">
- <div id="aside_primary" class="aside">
- <?php echo section('subscriptions'); ?>
- <?php echo section('subscribers'); ?>
- <?php echo section('groups'); ?>
- <?php echo section('cloud'); ?>
- <?php echo section('popular'); ?>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="yui-b" id="sidebar">
- <?php echo section('localnav'); ?>
- </div>
- </div>
- <div id="ft">
- <p>This is <a href="http://www.gnu.org/software/social">GNU social</a> &mdash; licensed under the <a href="http://www.gnu.org/licenses/agpl-3.0.html">GNU Affero General Public License</a> version 3.0 or later. <a href="http://gitorious.org/+socialites/statusnet/gnu-social">Get the code</a>.</p>
- </div>
- </div>
- </body>
+ <head>
+ <title><?php echo section('title'); ?> &mdash; GNU social</title>
+ <link rel="stylesheet" href="/theme/gnusocial/css/combo.css" type="text/css">
+ <link rel="stylesheet" href="/theme/gnusocial/css/social.css" type="text/css">
+ <?php echo section('scripts'); ?>
+ <?php echo section('search'); ?>
+ <?php echo section('feeds'); ?>
+ <?php echo section('description'); ?>
+ <?php echo section('head'); ?>
+ </head>
+ <body id="<?php echo section('action'); ?>">
+ <div id="custom-doc" class="yui-t2">
+ <div id="hd">
+ <h1><a href="/">GNU social</a></h1>
+ <?php echo section('nav'); ?>
+ </div>
+ <div id="bd">
+ <div id="yui-main">
+ <div class="yui-b" id="social">
+ <div class="yui-gc">
+ <div class="yui-u first">
+ <?php echo section('noticeform'); ?>
+ <?php echo section('bodytext'); ?>
+ </div>
+ <div class="yui-u" id="right-nav">
+ <div id="aside_primary" class="aside">
+ <?php echo section('subscriptions'); ?>
+ <?php echo section('subscribers'); ?>
+ <?php echo section('groups'); ?>
+ <?php echo section('cloud'); ?>
+ <?php echo section('popular'); ?>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="yui-b" id="sidebar">
+ <?php echo section('localnav'); ?>
+ </div>
+ </div>
+ <div id="ft">
+ <p>This is <a href="http://www.gnu.org/software/social">GNU social</a> &mdash; licensed under the <a href="http://www.gnu.org/licenses/agpl-3.0.html">GNU Affero General Public License</a> version 3.0 or later. <a href="http://gitorious.org/+socialites/statusnet/gnu-social">Get the code</a>.</p>
+ </div>
+ </div>
+ </body>
</html>