From c758b1b1d40d5534e0fc63818bc7d9cf8350de96 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Sat, 9 Jan 2010 18:58:40 -0500 Subject: Add version information to a bunch of plugins --- plugins/APCPlugin.php | 11 +++++++++++ plugins/Autocomplete/AutocompletePlugin.php | 11 +++++++++++ plugins/Autocomplete/README | 8 ++++++++ plugins/Autocomplete/readme.txt | 8 -------- plugins/CasAuthentication/CasAuthenticationPlugin.php | 11 +++++++++++ plugins/EmailAuthentication/EmailAuthenticationPlugin.php | 11 +++++++++++ plugins/FirePHP/FirePHPPlugin.php | 11 +++++++++++ plugins/FirePHP/README | 2 +- plugins/Gravatar/GravatarPlugin.php | 12 ++++++++++++ plugins/Imap/ImapPlugin.php | 11 +++++++++++ plugins/InfiniteScroll/InfiniteScrollPlugin.php | 11 +++++++++++ plugins/InfiniteScroll/README | 6 ++++++ plugins/InfiniteScroll/readme.txt | 6 ------ plugins/LdapAuthentication/LdapAuthenticationPlugin.php | 11 +++++++++++ plugins/LdapAuthorization/LdapAuthorizationPlugin.php | 11 +++++++++++ plugins/Minify/MinifyPlugin.php | 11 +++++++++++ plugins/PubSubHubBub/PubSubHubBubPlugin.php | 12 ++++++++++++ .../RequireValidatedEmail/RequireValidatedEmailPlugin.php | 11 +++++++++++ .../ReverseUsernameAuthenticationPlugin.php | 11 +++++++++++ plugins/XCachePlugin.php | 11 +++++++++++ 20 files changed, 182 insertions(+), 15 deletions(-) create mode 100644 plugins/Autocomplete/README delete mode 100644 plugins/Autocomplete/readme.txt create mode 100644 plugins/InfiniteScroll/README delete mode 100644 plugins/InfiniteScroll/readme.txt diff --git a/plugins/APCPlugin.php b/plugins/APCPlugin.php index 18409e29e..666f64b14 100644 --- a/plugins/APCPlugin.php +++ b/plugins/APCPlugin.php @@ -104,5 +104,16 @@ class APCPlugin extends Plugin Event::handle('EndCacheDelete', array($key)); return false; } + + function onPluginVersion(&$versions) + { + $versions[] = array('name' => 'APC', + 'version' => STATUSNET_VERSION, + 'author' => 'Evan Prodromou', + 'homepage' => 'http://status.net/wiki/Plugin:APC', + 'rawdescription' => + _m('Use the APC variable cache to cache query results.')); + return true; + } } diff --git a/plugins/Autocomplete/AutocompletePlugin.php b/plugins/Autocomplete/AutocompletePlugin.php index baaec73c1..d586631a4 100644 --- a/plugins/Autocomplete/AutocompletePlugin.php +++ b/plugins/Autocomplete/AutocompletePlugin.php @@ -61,5 +61,16 @@ class AutocompletePlugin extends Plugin } } + function onPluginVersion(&$versions) + { + $versions[] = array('name' => 'Autocomplete', + 'version' => STATUSNET_VERSION, + 'author' => 'Craig Andrews', + 'homepage' => 'http://status.net/wiki/Plugin:Autocomplete', + 'rawdescription' => + _m('The autocomplete plugin allows users to autocomplete screen names in @ replies. When an "@" is typed into the notice text area, an autocomplete box is displayed populated with the user\'s friend\' screen names.')); + return true; + } + } ?> diff --git a/plugins/Autocomplete/README b/plugins/Autocomplete/README new file mode 100644 index 000000000..1db4c6565 --- /dev/null +++ b/plugins/Autocomplete/README @@ -0,0 +1,8 @@ +Autocomplete allows users to autocomplete screen names in @ replies. When an "@" is typed into the notice text area, an autocomplete box is displayed populated with the user's friends' screen names. + +Note: This plugin doesn't work if the site is in Private mode, i.e. when $config['site']['private'] is set to true. + +Installation +============ +Add "addPlugin('Autocomplete');" to the bottom of your config.php +That's it! diff --git a/plugins/Autocomplete/readme.txt b/plugins/Autocomplete/readme.txt deleted file mode 100644 index 1db4c6565..000000000 --- a/plugins/Autocomplete/readme.txt +++ /dev/null @@ -1,8 +0,0 @@ -Autocomplete allows users to autocomplete screen names in @ replies. When an "@" is typed into the notice text area, an autocomplete box is displayed populated with the user's friends' screen names. - -Note: This plugin doesn't work if the site is in Private mode, i.e. when $config['site']['private'] is set to true. - -Installation -============ -Add "addPlugin('Autocomplete');" to the bottom of your config.php -That's it! diff --git a/plugins/CasAuthentication/CasAuthenticationPlugin.php b/plugins/CasAuthentication/CasAuthenticationPlugin.php index 818a11f77..483b060ab 100644 --- a/plugins/CasAuthentication/CasAuthenticationPlugin.php +++ b/plugins/CasAuthentication/CasAuthenticationPlugin.php @@ -138,4 +138,15 @@ class CasAuthenticationPlugin extends AuthenticationPlugin $casSettings['port']=$this->port; $casSettings['path']=$this->path; } + + function onPluginVersion(&$versions) + { + $versions[] = array('name' => 'CAS Authentication', + 'version' => STATUSNET_VERSION, + 'author' => 'Craig Andrews', + 'homepage' => 'http://status.net/wiki/Plugin:CasAuthentication', + 'rawdescription' => + _m('The CAS Authentication plugin allows for StatusNet to handle authentication through CAS (Central Authentication Service).')); + return true; + } } diff --git a/plugins/EmailAuthentication/EmailAuthenticationPlugin.php b/plugins/EmailAuthentication/EmailAuthenticationPlugin.php index 25e537735..406c00073 100644 --- a/plugins/EmailAuthentication/EmailAuthenticationPlugin.php +++ b/plugins/EmailAuthentication/EmailAuthenticationPlugin.php @@ -50,5 +50,16 @@ class EmailAuthenticationPlugin extends Plugin } } } + + function onPluginVersion(&$versions) + { + $versions[] = array('name' => 'Email Authentication', + 'version' => STATUSNET_VERSION, + 'author' => 'Craig Andrews', + 'homepage' => 'http://status.net/wiki/Plugin:EmailAuthentication', + 'rawdescription' => + _m('The Email Authentication plugin allows users to login using their email address.')); + return true; + } } diff --git a/plugins/FirePHP/FirePHPPlugin.php b/plugins/FirePHP/FirePHPPlugin.php index 37b397796..452f79024 100644 --- a/plugins/FirePHP/FirePHPPlugin.php +++ b/plugins/FirePHP/FirePHPPlugin.php @@ -55,5 +55,16 @@ class FirePHPPlugin extends Plugin $priority = $firephp_priorities[$priority]; $this->firephp->fb($msg, $priority); } + + function onPluginVersion(&$versions) + { + $versions[] = array('name' => 'FirePHP', + 'version' => STATUSNET_VERSION, + 'author' => 'Craig Andrews', + 'homepage' => 'http://status.net/wiki/Plugin:FirePHP', + 'rawdescription' => + _m('The FirePHP plugin writes StatusNet\'s log output to FirePHP.')); + return true; + } } diff --git a/plugins/FirePHP/README b/plugins/FirePHP/README index ee22794d5..22ed1e9be 100644 --- a/plugins/FirePHP/README +++ b/plugins/FirePHP/README @@ -1,4 +1,4 @@ -The FirePHP writes StatusNet's log output to FirePHP. +The FirePHP plugin writes StatusNet's log output to FirePHP. Using FirePHP on production sites can expose sensitive information. You must protect the security of your application by disabling FirePHP diff --git a/plugins/Gravatar/GravatarPlugin.php b/plugins/Gravatar/GravatarPlugin.php index 3c61a682e..580852072 100644 --- a/plugins/Gravatar/GravatarPlugin.php +++ b/plugins/Gravatar/GravatarPlugin.php @@ -185,4 +185,16 @@ class GravatarPlugin extends Plugin "&size=".$size; return $url; } + + function onPluginVersion(&$versions) + { + $versions[] = array('name' => 'Gravatar', + 'version' => STATUSNET_VERSION, + 'author' => 'Eric Helgeson', + 'homepage' => 'http://status.net/wiki/Plugin:Gravatar', + 'rawdescription' => + _m('The Gravatar plugin allows users to use their Gravatar with StatusNet.')); + + return true; + } } diff --git a/plugins/Imap/ImapPlugin.php b/plugins/Imap/ImapPlugin.php index 034444222..d9768b680 100644 --- a/plugins/Imap/ImapPlugin.php +++ b/plugins/Imap/ImapPlugin.php @@ -82,4 +82,15 @@ class ImapPlugin extends Plugin } return true; } + + function onPluginVersion(&$versions) + { + $versions[] = array('name' => 'IMAP', + 'version' => STATUSNET_VERSION, + 'author' => 'Craig Andrews', + 'homepage' => 'http://status.net/wiki/Plugin:IMAP', + 'rawdescription' => + _m('The IMAP plugin allows for StatusNet to check a POP or IMAP mailbox for incoming mail containing user posts.')); + return true; + } } diff --git a/plugins/InfiniteScroll/InfiniteScrollPlugin.php b/plugins/InfiniteScroll/InfiniteScrollPlugin.php index 5928c007f..a4d1a5d05 100644 --- a/plugins/InfiniteScroll/InfiniteScrollPlugin.php +++ b/plugins/InfiniteScroll/InfiniteScrollPlugin.php @@ -43,4 +43,15 @@ class InfiniteScrollPlugin extends Plugin $action->script('plugins/InfiniteScroll/jquery.infinitescroll.js'); $action->script('plugins/InfiniteScroll/infinitescroll.js'); } + + function onPluginVersion(&$versions) + { + $versions[] = array('name' => 'InfiniteScroll', + 'version' => STATUSNET_VERSION, + 'author' => 'Craig Andrews', + 'homepage' => 'http://status.net/wiki/Plugin:InfiniteScroll', + 'rawdescription' => + _m('Infinite Scroll adds the following functionality to your StatusNet installation: When a user scrolls towards the bottom of the page, the next page of notices is automatically retrieved and appended. This means they never need to click "Next Page", which dramatically increases stickiness.')); + return true; + } } diff --git a/plugins/InfiniteScroll/README b/plugins/InfiniteScroll/README new file mode 100644 index 000000000..2428cc69a --- /dev/null +++ b/plugins/InfiniteScroll/README @@ -0,0 +1,6 @@ +Infinite Scroll adds the following functionality to your StatusNet installation: When a user scrolls towards the bottom of the page, the next page of notices is automatically retrieved and appended. This means they never need to click "Next Page", which dramatically increases stickiness. + +Installation +============ +Add "addPlugin('InfiniteScroll');" to the bottom of your config.php +That's it! diff --git a/plugins/InfiniteScroll/readme.txt b/plugins/InfiniteScroll/readme.txt deleted file mode 100644 index 2428cc69a..000000000 --- a/plugins/InfiniteScroll/readme.txt +++ /dev/null @@ -1,6 +0,0 @@ -Infinite Scroll adds the following functionality to your StatusNet installation: When a user scrolls towards the bottom of the page, the next page of notices is automatically retrieved and appended. This means they never need to click "Next Page", which dramatically increases stickiness. - -Installation -============ -Add "addPlugin('InfiniteScroll');" to the bottom of your config.php -That's it! diff --git a/plugins/LdapAuthentication/LdapAuthenticationPlugin.php b/plugins/LdapAuthentication/LdapAuthenticationPlugin.php index c14fa21a9..eb3a05117 100644 --- a/plugins/LdapAuthentication/LdapAuthenticationPlugin.php +++ b/plugins/LdapAuthentication/LdapAuthenticationPlugin.php @@ -346,4 +346,15 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin return $str; } + + function onPluginVersion(&$versions) + { + $versions[] = array('name' => 'LDAP Authentication', + 'version' => STATUSNET_VERSION, + 'author' => 'Craig Andrews', + 'homepage' => 'http://status.net/wiki/Plugin:LdapAuthentication', + 'rawdescription' => + _m('The LDAP Authentication plugin allows for StatusNet to handle authentication through LDAP.')); + return true; + } } diff --git a/plugins/LdapAuthorization/LdapAuthorizationPlugin.php b/plugins/LdapAuthorization/LdapAuthorizationPlugin.php index e5e22c0dd..7f48ce5e1 100644 --- a/plugins/LdapAuthorization/LdapAuthorizationPlugin.php +++ b/plugins/LdapAuthorization/LdapAuthorizationPlugin.php @@ -206,4 +206,15 @@ class LdapAuthorizationPlugin extends AuthorizationPlugin return false; } } + + function onPluginVersion(&$versions) + { + $versions[] = array('name' => 'LDAP Authorization', + 'version' => STATUSNET_VERSION, + 'author' => 'Craig Andrews', + 'homepage' => 'http://status.net/wiki/Plugin:LdapAuthorization', + 'rawdescription' => + _m('The LDAP Authorization plugin allows for StatusNet to handle authorization through LDAP.')); + return true; + } } diff --git a/plugins/Minify/MinifyPlugin.php b/plugins/Minify/MinifyPlugin.php index 718bfd163..b49b6a4ba 100644 --- a/plugins/Minify/MinifyPlugin.php +++ b/plugins/Minify/MinifyPlugin.php @@ -164,5 +164,16 @@ class MinifyPlugin extends Plugin require_once('Minify/CSS.php'); return Minify_CSS::minify($code,$options); } + + function onPluginVersion(&$versions) + { + $versions[] = array('name' => 'Minify', + 'version' => STATUSNET_VERSION, + 'author' => 'Craig Andrews', + 'homepage' => 'http://status.net/wiki/Plugin:Minify', + 'rawdescription' => + _m('The Minify plugin minifies your CSS and Javascript, removing whitespace and comments.')); + return true; + } } diff --git a/plugins/PubSubHubBub/PubSubHubBubPlugin.php b/plugins/PubSubHubBub/PubSubHubBubPlugin.php index d15a869cb..c40d906a5 100644 --- a/plugins/PubSubHubBub/PubSubHubBubPlugin.php +++ b/plugins/PubSubHubBub/PubSubHubBubPlugin.php @@ -118,4 +118,16 @@ class PubSubHubBubPlugin extends Plugin } } } + + function onPluginVersion(&$versions) + { + $versions[] = array('name' => 'PubSubHubBub', + 'version' => STATUSNET_VERSION, + 'author' => 'Craig Andrews', + 'homepage' => 'http://status.net/wiki/Plugin:PubSubHubBub', + 'rawdescription' => + _m('The PubSubHubBub plugin pushes RSS/Atom updates to a PubSubHubBub hub.')); + + return true; + } } diff --git a/plugins/RequireValidatedEmail/RequireValidatedEmailPlugin.php b/plugins/RequireValidatedEmail/RequireValidatedEmailPlugin.php index 04adbf00e..3581f1de9 100644 --- a/plugins/RequireValidatedEmail/RequireValidatedEmailPlugin.php +++ b/plugins/RequireValidatedEmail/RequireValidatedEmailPlugin.php @@ -96,5 +96,16 @@ class RequireValidatedEmailPlugin extends Plugin } return false; } + + function onPluginVersion(&$versions) + { + $versions[] = array('name' => 'Require Validated Email', + 'version' => STATUSNET_VERSION, + 'author' => 'Craig Andrews, Evan Prodromou, Brion Vibber', + 'homepage' => 'http://status.net/wiki/Plugin:RequireValidatedEmail', + 'rawdescription' => + _m('The Require Validated Email plugin disables posting for accounts that do not have a validated email address.')); + return true; + } } diff --git a/plugins/ReverseUsernameAuthentication/ReverseUsernameAuthenticationPlugin.php b/plugins/ReverseUsernameAuthentication/ReverseUsernameAuthenticationPlugin.php index d157ea067..d9d2137f8 100644 --- a/plugins/ReverseUsernameAuthentication/ReverseUsernameAuthenticationPlugin.php +++ b/plugins/ReverseUsernameAuthentication/ReverseUsernameAuthenticationPlugin.php @@ -53,4 +53,15 @@ class ReverseUsernameAuthenticationPlugin extends AuthenticationPlugin $registration_data['nickname'] = $username ; return User::register($registration_data); } + + function onPluginVersion(&$versions) + { + $versions[] = array('name' => 'Reverse Username Authentication', + 'version' => STATUSNET_VERSION, + 'author' => 'Craig Andrews', + 'homepage' => 'http://status.net/wiki/Plugin:ReverseUsernameAuthentication', + 'rawdescription' => + _m('The Reverse Username Authentication plugin allows for StatusNet to handle authentication by checking if the provided password is the same as the reverse of the username.')); + return true; + } } diff --git a/plugins/XCachePlugin.php b/plugins/XCachePlugin.php index 03cb0c06e..2baa290ed 100644 --- a/plugins/XCachePlugin.php +++ b/plugins/XCachePlugin.php @@ -109,5 +109,16 @@ class XCachePlugin extends Plugin Event::handle('EndCacheDelete', array($key)); return false; } + + function onPluginVersion(&$versions) + { + $versions[] = array('name' => 'XCache', + 'version' => STATUSNET_VERSION, + 'author' => 'Craig Andrews', + 'homepage' => 'http://status.net/wiki/Plugin:XCache', + 'rawdescription' => + _m('Use the XCache variable cache to cache query results.')); + return true; + } } -- cgit v1.2.3-54-g00ecf From 7dde17862a2feeaed63298f250b07e73e1c98a82 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Sat, 9 Jan 2010 19:01:48 -0500 Subject: i18n work in the mail handler --- lib/mailhandler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mailhandler.php b/lib/mailhandler.php index 32a8cd9bc..85be89f18 100644 --- a/lib/mailhandler.php +++ b/lib/mailhandler.php @@ -139,7 +139,7 @@ class MailHandler $headers['From'] = $to; $headers['To'] = $from; - $headers['Subject'] = "Command complete"; + $headers['Subject'] = _('Command complete'); return mail_send(array($from), $headers, $response); } @@ -225,7 +225,7 @@ class MailHandler function unsupported_type($type) { - $this->error(null, "Unsupported message type: " . $type); + $this->error(null, sprintf(_('Unsupported message type: %s'), $type)); } function cleanup_msg($msg) -- cgit v1.2.3-54-g00ecf From a07d8dab256d7841c3695267bdfe7540a0ced4d7 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Sat, 9 Jan 2010 19:04:01 -0500 Subject: i18n in the imap plugin --- plugins/Imap/imapdaemon.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Imap/imapdaemon.php b/plugins/Imap/imapdaemon.php index a45c603ce..7e60e1376 100755 --- a/plugins/Imap/imapdaemon.php +++ b/plugins/Imap/imapdaemon.php @@ -117,7 +117,7 @@ class IMAPMailHandler extends MailHandler { $this->log(LOG_INFO, "Error: $from $msg"); $headers['To'] = $from; - $headers['Subject'] = "Error"; + $headers['Subject'] = _m('Error'); return mail_send(array($from), $headers, $msg); } -- cgit v1.2.3-54-g00ecf