summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Autocomplete/jquery-autocomplete/indicator.gifbin0 -> 673 bytes
-rw-r--r--plugins/Comet/CometPlugin.php2
-rw-r--r--plugins/Facebook/FacebookPlugin.php2
-rw-r--r--plugins/Facebook/facebookaction.php2
-rw-r--r--plugins/Facebook/locale/Facebook.po231
-rw-r--r--plugins/Gravatar/locale/Gravatar.po8
-rw-r--r--plugins/Imap/ImapPlugin.php2
-rw-r--r--plugins/LdapAuthentication/LdapAuthenticationPlugin.php50
-rw-r--r--plugins/LdapAuthentication/README5
-rw-r--r--plugins/LdapAuthorization/LdapAuthorizationPlugin.php5
-rw-r--r--plugins/LdapAuthorization/README5
-rw-r--r--plugins/Mapstraction/locale/Mapstraction.po22
-rw-r--r--plugins/Minify/MinifyPlugin.php6
-rw-r--r--plugins/OStatus/OStatusPlugin.php4
-rw-r--r--plugins/OStatus/locale/OStatus.po22
-rw-r--r--plugins/OpenID/OpenIDPlugin.php11
-rw-r--r--plugins/OpenID/locale/OpenID.po320
-rw-r--r--plugins/Orbited/OrbitedPlugin.php4
-rw-r--r--plugins/PoweredByStatusNet/locale/PoweredByStatusNet.po8
-rw-r--r--plugins/README-plugins21
-rw-r--r--plugins/Realtime/RealtimePlugin.php4
-rw-r--r--plugins/Realtime/realtimeupdate.js2
-rw-r--r--plugins/Recaptcha/RecaptchaPlugin.php14
-rw-r--r--plugins/ReverseUsernameAuthentication/README5
-rw-r--r--plugins/ReverseUsernameAuthentication/ReverseUsernameAuthenticationPlugin.php7
-rw-r--r--plugins/Sample/locale/Sample.po2
-rw-r--r--plugins/TabFocus/TabFocusPlugin.php57
-rw-r--r--plugins/TabFocus/tabfocus.js7
-rw-r--r--plugins/TwitterBridge/locale/TwitterBridge.po114
-rw-r--r--plugins/TwitterBridge/twitter.php9
30 files changed, 584 insertions, 367 deletions
diff --git a/plugins/Autocomplete/jquery-autocomplete/indicator.gif b/plugins/Autocomplete/jquery-autocomplete/indicator.gif
new file mode 100644
index 000000000..d0bce1542
--- /dev/null
+++ b/plugins/Autocomplete/jquery-autocomplete/indicator.gif
Binary files differ
diff --git a/plugins/Comet/CometPlugin.php b/plugins/Comet/CometPlugin.php
index 300d1e9a2..29cb3004b 100644
--- a/plugins/Comet/CometPlugin.php
+++ b/plugins/Comet/CometPlugin.php
@@ -68,7 +68,7 @@ class CometPlugin extends RealtimePlugin
$ours = array('jquery.comet.js', 'cometupdate.js');
foreach ($ours as $script) {
- $scripts[] = common_path('plugins/Comet/'.$script);
+ $scripts[] = 'plugins/Comet/'.$script;
}
return $scripts;
diff --git a/plugins/Facebook/FacebookPlugin.php b/plugins/Facebook/FacebookPlugin.php
index 4266b886d..78c9054e1 100644
--- a/plugins/Facebook/FacebookPlugin.php
+++ b/plugins/Facebook/FacebookPlugin.php
@@ -181,7 +181,7 @@ class FacebookPlugin extends Plugin
if ($this->reqFbScripts($action)) {
$apikey = common_config('facebook', 'apikey');
- $plugin_path = common_path('plugins/Facebook');
+ $plugin_path = 'plugins/Facebook';
$login_url = common_local_url('FBConnectAuth');
$logout_url = common_local_url('logout');
diff --git a/plugins/Facebook/facebookaction.php b/plugins/Facebook/facebookaction.php
index 8437a705a..f65b97c86 100644
--- a/plugins/Facebook/facebookaction.php
+++ b/plugins/Facebook/facebookaction.php
@@ -89,7 +89,7 @@ class FacebookAction extends Action
function showScripts()
{
- $this->script(common_path('plugins/Facebook/facebookapp.js'));
+ $this->script('plugins/Facebook/facebookapp.js');
}
/**
diff --git a/plugins/Facebook/locale/Facebook.po b/plugins/Facebook/locale/Facebook.po
index 5b313c8c5..4bc00248c 100644
--- a/plugins/Facebook/locale/Facebook.po
+++ b/plugins/Facebook/locale/Facebook.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-12-07 20:38-0800\n"
+"POT-Creation-Date: 2010-03-01 14:58-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -59,63 +59,31 @@ msgstr ""
msgid "Lost or forgotten password?"
msgstr ""
-#: facebookaction.php:386 facebookhome.php:248
+#: facebookaction.php:330 facebookhome.php:248
msgid "Pagination"
msgstr ""
-#: facebookaction.php:395 facebookhome.php:257
+#: facebookaction.php:339 facebookhome.php:257
msgid "After"
msgstr ""
-#: facebookaction.php:403 facebookhome.php:265
+#: facebookaction.php:347 facebookhome.php:265
msgid "Before"
msgstr ""
-#: facebookaction.php:421
+#: facebookaction.php:365
msgid "No notice content!"
msgstr ""
-#: facebookaction.php:427
+#: facebookaction.php:371
#, php-format
msgid "That's too long. Max notice size is %d chars."
msgstr ""
-#: facebookaction.php:523
+#: facebookaction.php:430
msgid "Notices"
msgstr ""
-#: facebookutil.php:280
-#, php-format
-msgid "Your %1$s Facebook application access has been disabled."
-msgstr ""
-
-#: facebookutil.php:283
-#, php-format
-msgid ""
-"Hi, %1$s. We're sorry to inform you that we are unable to update your "
-"Facebook status from %2$s, and have disabled the Facebook application for "
-"your account. This may be because you have removed the Facebook "
-"application's authorization, or have deleted your Facebook account. You can "
-"re-enable the Facebook application and automatic status updating by re-"
-"installing the %2$s Facebook application.\n"
-"\n"
-"Regards,\n"
-"\n"
-"%2$s"
-msgstr ""
-
-#: FBConnectLogin.php:33
-msgid "Already logged in."
-msgstr ""
-
-#: FBConnectLogin.php:41
-msgid "Login with your Facebook Account"
-msgstr ""
-
-#: FBConnectLogin.php:55
-msgid "Facebook Login"
-msgstr ""
-
#: facebookhome.php:111
msgid "Server error - couldn't get user!"
msgstr ""
@@ -149,50 +117,6 @@ msgstr ""
msgid "Skip"
msgstr ""
-#: facebooksettings.php:74
-msgid "There was a problem saving your sync preferences!"
-msgstr ""
-
-#: facebooksettings.php:76
-msgid "Sync preferences saved."
-msgstr ""
-
-#: facebooksettings.php:99
-msgid "Automatically update my Facebook status with my notices."
-msgstr ""
-
-#: facebooksettings.php:106
-msgid "Send \"@\" replies to Facebook."
-msgstr ""
-
-#: facebooksettings.php:115
-msgid "Prefix"
-msgstr ""
-
-#: facebooksettings.php:117
-msgid "A string to prefix notices with."
-msgstr ""
-
-#: facebooksettings.php:123
-msgid "Save"
-msgstr ""
-
-#: facebooksettings.php:133
-#, php-format
-msgid ""
-"If you would like %s to automatically update your Facebook status with your "
-"latest notice, you need to give it permission."
-msgstr ""
-
-#: facebooksettings.php:146
-#, php-format
-msgid "Allow %s to update my Facebook status"
-msgstr ""
-
-#: facebooksettings.php:156
-msgid "Sync preferences"
-msgstr ""
-
#: facebookinvite.php:72
#, php-format
msgid "Thanks for inviting your friends to use %s"
@@ -221,61 +145,85 @@ msgstr ""
msgid "Send invitations"
msgstr ""
-#: facebookremove.php:58
-msgid "Couldn't remove Facebook user."
+#: FacebookPlugin.php:413 FacebookPlugin.php:433
+msgid "Facebook"
msgstr ""
-#: FBConnectSettings.php:56 FacebookPlugin.php:430
+#: FacebookPlugin.php:414
+msgid "Login or register using Facebook"
+msgstr ""
+
+#: FacebookPlugin.php:434 FBConnectSettings.php:56
msgid "Facebook Connect Settings"
msgstr ""
-#: FBConnectSettings.php:67
-msgid "Manage how your account connects to Facebook"
+#: FacebookPlugin.php:533
+msgid ""
+"The Facebook plugin allows you to integrate your StatusNet instance with <a "
+"href=\"http://facebook.com/\">Facebook</a> and Facebook Connect."
msgstr ""
-#: FBConnectSettings.php:92
-msgid "There is no Facebook user connected to this account."
+#: facebookremove.php:58
+msgid "Couldn't remove Facebook user."
msgstr ""
-#: FBConnectSettings.php:100
-msgid "Connected Facebook user"
+#: facebooksettings.php:74
+msgid "There was a problem saving your sync preferences!"
msgstr ""
-#: FBConnectSettings.php:119
-msgid "Disconnect my account from Facebook"
+#: facebooksettings.php:76
+msgid "Sync preferences saved."
msgstr ""
-#: FBConnectSettings.php:124
-msgid ""
-"Disconnecting your Faceboook would make it impossible to log in! Please "
+#: facebooksettings.php:99
+msgid "Automatically update my Facebook status with my notices."
msgstr ""
-#: FBConnectSettings.php:128
-msgid "set a password"
+#: facebooksettings.php:106
+msgid "Send \"@\" replies to Facebook."
msgstr ""
-#: FBConnectSettings.php:130
-msgid " first."
+#: facebooksettings.php:115
+msgid "Prefix"
msgstr ""
-#: FBConnectSettings.php:142
-msgid "Disconnect"
+#: facebooksettings.php:117
+msgid "A string to prefix notices with."
msgstr ""
-#: FBConnectSettings.php:164 FBConnectAuth.php:90
-msgid "There was a problem with your session token. Try again, please."
+#: facebooksettings.php:123
+msgid "Save"
msgstr ""
-#: FBConnectSettings.php:178
-msgid "Couldn't delete link to Facebook."
+#: facebooksettings.php:133
+#, php-format
+msgid ""
+"If you would like %s to automatically update your Facebook status with your "
+"latest notice, you need to give it permission."
msgstr ""
-#: FBConnectSettings.php:194
-msgid "You have disconnected from Facebook."
+#: facebooksettings.php:146
+#, php-format
+msgid "Allow %s to update my Facebook status"
msgstr ""
-#: FBConnectSettings.php:197
-msgid "Not sure what you're trying to do."
+#: facebooksettings.php:156
+msgid "Sync preferences"
+msgstr ""
+
+#: facebookutil.php:285
+#, php-format
+msgid ""
+"Hi, %1$s. We're sorry to inform you that we are unable to update your "
+"Facebook status from %2$s, and have disabled the Facebook application for "
+"your account. This may be because you have removed the Facebook "
+"application's authorization, or have deleted your Facebook account. You can "
+"re-enable the Facebook application and automatic status updating by re-"
+"installing the %2$s Facebook application.\n"
+"\n"
+"Regards,\n"
+"\n"
+"%2$s"
msgstr ""
#: FBConnectAuth.php:51
@@ -286,6 +234,10 @@ msgstr ""
msgid "There is already a local user linked with this Facebook."
msgstr ""
+#: FBConnectAuth.php:90 FBConnectSettings.php:164
+msgid "There was a problem with your session token. Try again, please."
+msgstr ""
+
#: FBConnectAuth.php:95
msgid "You can't register if you don't agree to the license."
msgstr ""
@@ -385,10 +337,59 @@ msgstr ""
msgid "Invalid username or password."
msgstr ""
-#: FacebookPlugin.php:409 FacebookPlugin.php:429
-msgid "Facebook"
+#: FBConnectLogin.php:33
+msgid "Already logged in."
msgstr ""
-#: FacebookPlugin.php:410
-msgid "Login or register using Facebook"
+#: FBConnectLogin.php:41
+msgid "Login with your Facebook Account"
+msgstr ""
+
+#: FBConnectLogin.php:55
+msgid "Facebook Login"
+msgstr ""
+
+#: FBConnectSettings.php:67
+msgid "Manage how your account connects to Facebook"
+msgstr ""
+
+#: FBConnectSettings.php:92
+msgid "There is no Facebook user connected to this account."
+msgstr ""
+
+#: FBConnectSettings.php:100
+msgid "Connected Facebook user"
+msgstr ""
+
+#: FBConnectSettings.php:119
+msgid "Disconnect my account from Facebook"
+msgstr ""
+
+#: FBConnectSettings.php:124
+msgid ""
+"Disconnecting your Faceboook would make it impossible to log in! Please "
+msgstr ""
+
+#: FBConnectSettings.php:128
+msgid "set a password"
+msgstr ""
+
+#: FBConnectSettings.php:130
+msgid " first."
+msgstr ""
+
+#: FBConnectSettings.php:142
+msgid "Disconnect"
+msgstr ""
+
+#: FBConnectSettings.php:178
+msgid "Couldn't delete link to Facebook."
+msgstr ""
+
+#: FBConnectSettings.php:194
+msgid "You have disconnected from Facebook."
+msgstr ""
+
+#: FBConnectSettings.php:197
+msgid "Not sure what you're trying to do."
msgstr ""
diff --git a/plugins/Gravatar/locale/Gravatar.po b/plugins/Gravatar/locale/Gravatar.po
index 1df62b666..d7275b929 100644
--- a/plugins/Gravatar/locale/Gravatar.po
+++ b/plugins/Gravatar/locale/Gravatar.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-12-11 16:27-0800\n"
+"POT-Creation-Date: 2010-03-01 14:58-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -59,3 +59,9 @@ msgstr ""
#: GravatarPlugin.php:177
msgid "Gravatar removed."
msgstr ""
+
+#: GravatarPlugin.php:196
+msgid ""
+"The Gravatar plugin allows users to use their <a href=\"http://www.gravatar."
+"com/\">Gravatar</a> with StatusNet."
+msgstr ""
diff --git a/plugins/Imap/ImapPlugin.php b/plugins/Imap/ImapPlugin.php
index 89a775a16..d1e920b00 100644
--- a/plugins/Imap/ImapPlugin.php
+++ b/plugins/Imap/ImapPlugin.php
@@ -86,7 +86,7 @@ class ImapPlugin extends Plugin
}
}
- function onStartIoManagerClasses(&$classes)
+ function onStartQueueDaemonIoManagers(&$classes)
{
$classes[] = new ImapManager($this);
}
diff --git a/plugins/LdapAuthentication/LdapAuthenticationPlugin.php b/plugins/LdapAuthentication/LdapAuthenticationPlugin.php
index eb3a05117..e0fd615dd 100644
--- a/plugins/LdapAuthentication/LdapAuthenticationPlugin.php
+++ b/plugins/LdapAuthentication/LdapAuthenticationPlugin.php
@@ -76,6 +76,32 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin
return false;
}
}
+
+ function onEndShowPageNotice($action)
+ {
+ $name = $action->trimmed('action');
+ $instr = false;
+
+ switch ($name)
+ {
+ case 'register':
+ if($this->autoregistration) {
+ $instr = 'Have an LDAP account? Use your standard username and password.';
+ }
+ break;
+ case 'login':
+ $instr = 'Have an LDAP account? Use your standard username and password.';
+ break;
+ default:
+ return true;
+ }
+
+ if($instr) {
+ $output = common_markup_to_html($instr);
+ $action->raw($output);
+ }
+ return true;
+ }
//---interface implementation---//
@@ -96,8 +122,11 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin
}
}
- function autoRegister($username)
+ function autoRegister($username, $nickname)
{
+ if(is_null($nickname)){
+ $nickname = $username;
+ }
$entry = $this->ldap_get_user($username,$this->attributes);
if($entry){
$registration_data = array();
@@ -107,6 +136,7 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin
if(isset($registration_data['email']) && !empty($registration_data['email'])){
$registration_data['email_confirmed']=true;
}
+ $registration_data['nickname'] = $nickname;
//set the database saved password to a random string.
$registration_data['password']=common_good_rand(16);
return User::register($registration_data);
@@ -153,6 +183,21 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin
return false;
}
+
+ function suggestNicknameForUsername($username)
+ {
+ $entry = $this->ldap_get_user($username, $this->attributes);
+ if(!$entry){
+ //this really shouldn't happen
+ $nickname = $username;
+ }else{
+ $nickname = $entry->getValue($this->attributes['nickname'],'single');
+ if(!$nickname){
+ $nickname = $username;
+ }
+ }
+ return common_nicknamize($nickname);
+ }
//---utility functions---//
function ldap_get_config(){
@@ -179,8 +224,7 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin
$ldap->setErrorHandling(PEAR_ERROR_RETURN);
$err=$ldap->bind();
if (Net_LDAP2::isError($err)) {
- common_log(LOG_WARNING, 'Could not connect to LDAP server: '.$err->getMessage());
- return false;
+ throw new Exception('Could not connect to LDAP server: '.$err->getMessage());
}
if($config == null) $this->default_ldap=$ldap;
diff --git a/plugins/LdapAuthentication/README b/plugins/LdapAuthentication/README
index 0460fb639..c188f2dbc 100644
--- a/plugins/LdapAuthentication/README
+++ b/plugins/LdapAuthentication/README
@@ -9,7 +9,10 @@ to the bottom of your config.php
Settings
========
-provider_name*: a unique name for this authentication provider.
+provider_name*: This is a identifier designated to the connection.
+ It's how StatusNet will refer to the authentication source.
+ For the most part, any name can be used, so long as each authentication source has a different identifier.
+ In most cases there will be only one authentication source used.
authoritative (false): Set to true if LDAP's responses are authoritative
(if authorative and LDAP fails, no other password checking will be done).
autoregistration (false): Set to true if users should be automatically created
diff --git a/plugins/LdapAuthorization/LdapAuthorizationPlugin.php b/plugins/LdapAuthorization/LdapAuthorizationPlugin.php
index 7f48ce5e1..19aff42b8 100644
--- a/plugins/LdapAuthorization/LdapAuthorizationPlugin.php
+++ b/plugins/LdapAuthorization/LdapAuthorizationPlugin.php
@@ -167,7 +167,7 @@ class LdapAuthorizationPlugin extends AuthorizationPlugin
$ldap->setErrorHandling(PEAR_ERROR_RETURN);
$err=$ldap->bind();
if (Net_LDAP2::isError($err)) {
- common_log(LOG_WARNING, 'Could not connect to LDAP server: '.$err->getMessage());
+ throw new Exception('Could not connect to LDAP server: '.$err->getMessage());
return false;
}
if($config == null) $this->default_ldap=$ldap;
@@ -185,6 +185,9 @@ class LdapAuthorizationPlugin extends AuthorizationPlugin
if($ldap==null) {
$ldap = $this->ldap_get_connection();
}
+ if(! $ldap) {
+ throw new Exception("Could not connect to LDAP");
+ }
$filter = Net_LDAP2_Filter::create($this->attributes['username'], 'equals', $username);
$options = array(
'attributes' => $attributes
diff --git a/plugins/LdapAuthorization/README b/plugins/LdapAuthorization/README
index 44239d8e0..3a6d8d25e 100644
--- a/plugins/LdapAuthorization/README
+++ b/plugins/LdapAuthorization/README
@@ -11,7 +11,10 @@ You *cannot* use this plugin without the LDAP Authentication plugin
Settings
========
-provider_name*: name of the LDAP authentication provider that this plugin works with.
+provider_name*: This is a identifier designated to the connection.
+ It's how StatusNet will refer to the authentication source.
+ For the most part, any name can be used, so long as each authentication source has a different identifier.
+ In most cases there will be only one authentication source used.
authoritative (false): should this plugin be authoritative for
authorization?
uniqueMember_attribute ('uniqueMember')*: the attribute of a group
diff --git a/plugins/Mapstraction/locale/Mapstraction.po b/plugins/Mapstraction/locale/Mapstraction.po
index c1c50bf50..1dd5dbbcc 100644
--- a/plugins/Mapstraction/locale/Mapstraction.po
+++ b/plugins/Mapstraction/locale/Mapstraction.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-12-07 20:38-0800\n"
+"POT-Creation-Date: 2010-03-01 14:58-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -34,15 +34,21 @@ msgstr ""
msgid "User has no profile."
msgstr ""
-#: usermap.php:71
-#, php-format
-msgid "%s map, page %d"
-msgstr ""
-
-#: MapstractionPlugin.php:180
+#: MapstractionPlugin.php:182
msgid "Map"
msgstr ""
-#: MapstractionPlugin.php:191
+#: MapstractionPlugin.php:193
msgid "Full size"
msgstr ""
+
+#: MapstractionPlugin.php:205
+msgid ""
+"Show maps of users' and friends' notices with <a href=\"http://www."
+"mapstraction.com/\">Mapstraction</a> JavaScript library."
+msgstr ""
+
+#: usermap.php:71
+#, php-format
+msgid "%s map, page %d"
+msgstr ""
diff --git a/plugins/Minify/MinifyPlugin.php b/plugins/Minify/MinifyPlugin.php
index fe1883ded..69def6064 100644
--- a/plugins/Minify/MinifyPlugin.php
+++ b/plugins/Minify/MinifyPlugin.php
@@ -86,7 +86,11 @@ class MinifyPlugin extends Plugin
$url = parse_url($src);
if( empty($url['scheme']) && empty($url['host']) && empty($url['query']) && empty($url['fragment']))
{
- $src = $this->minifyUrl($src);
+ if (strpos($src, 'plugins/') === 0 || strpos($src, 'local/') === 0) {
+ $src = $this->minifyUrl($src);
+ } else {
+ $src = $this->minifyUrl('js/'.$src);
+ }
}
}
diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php
index 720dedd0a..02282f2f6 100644
--- a/plugins/OStatus/OStatusPlugin.php
+++ b/plugins/OStatus/OStatusPlugin.php
@@ -284,12 +284,12 @@ class OStatusPlugin extends Plugin
}
function onEndShowStatusNetStyles($action) {
- $action->cssLink(common_path('plugins/OStatus/theme/base/css/ostatus.css'));
+ $action->cssLink('plugins/OStatus/theme/base/css/ostatus.css');
return true;
}
function onEndShowStatusNetScripts($action) {
- $action->script(common_path('plugins/OStatus/js/ostatus.js'));
+ $action->script('plugins/OStatus/js/ostatus.js');
return true;
}
diff --git a/plugins/OStatus/locale/OStatus.po b/plugins/OStatus/locale/OStatus.po
index ee19cf3db..7e33a0eed 100644
--- a/plugins/OStatus/locale/OStatus.po
+++ b/plugins/OStatus/locale/OStatus.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-03-01 14:08-0800\n"
+"POT-Creation-Date: 2010-03-01 14:58-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -223,43 +223,43 @@ msgstr ""
msgid "Salmon signature verification failed."
msgstr ""
-#: lib/salmonaction.php:66
+#: lib/salmonaction.php:67
msgid "Salmon post must be an Atom entry."
msgstr ""
-#: lib/salmonaction.php:114
+#: lib/salmonaction.php:115
msgid "Unrecognized activity type."
msgstr ""
-#: lib/salmonaction.php:122
+#: lib/salmonaction.php:123
msgid "This target doesn't understand posts."
msgstr ""
-#: lib/salmonaction.php:127
+#: lib/salmonaction.php:128
msgid "This target doesn't understand follows."
msgstr ""
-#: lib/salmonaction.php:132
+#: lib/salmonaction.php:133
msgid "This target doesn't understand unfollows."
msgstr ""
-#: lib/salmonaction.php:137
+#: lib/salmonaction.php:138
msgid "This target doesn't understand favorites."
msgstr ""
-#: lib/salmonaction.php:142
+#: lib/salmonaction.php:143
msgid "This target doesn't understand unfavorites."
msgstr ""
-#: lib/salmonaction.php:147
+#: lib/salmonaction.php:148
msgid "This target doesn't understand share events."
msgstr ""
-#: lib/salmonaction.php:152
+#: lib/salmonaction.php:153
msgid "This target doesn't understand joins."
msgstr ""
-#: lib/salmonaction.php:157
+#: lib/salmonaction.php:158
msgid "This target doesn't understand leave events."
msgstr ""
diff --git a/plugins/OpenID/OpenIDPlugin.php b/plugins/OpenID/OpenIDPlugin.php
index 248afe3fa..6b35ec3e1 100644
--- a/plugins/OpenID/OpenIDPlugin.php
+++ b/plugins/OpenID/OpenIDPlugin.php
@@ -235,9 +235,14 @@ class OpenIDPlugin extends Plugin
switch ($name)
{
case 'register':
- $instr = '(Have an [OpenID](http://openid.net/)? ' .
- 'Try our [OpenID registration]'.
- '(%%action.openidlogin%%)!)';
+ if (common_logged_in()) {
+ $instr = '(Have an [OpenID](http://openid.net/)? ' .
+ '[Add an OpenID to your account](%%action.openidsettings%%)!';
+ } else {
+ $instr = '(Have an [OpenID](http://openid.net/)? ' .
+ 'Try our [OpenID registration]'.
+ '(%%action.openidlogin%%)!)';
+ }
break;
case 'login':
$instr = '(Have an [OpenID](http://openid.net/)? ' .
diff --git a/plugins/OpenID/locale/OpenID.po b/plugins/OpenID/locale/OpenID.po
index 34738bc75..7ed879835 100644
--- a/plugins/OpenID/locale/OpenID.po
+++ b/plugins/OpenID/locale/OpenID.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-12-07 20:38-0800\n"
+"POT-Creation-Date: 2010-03-01 14:58-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,73 +16,152 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: openidlogin.php:30 finishopenidlogin.php:34
+#: finishaddopenid.php:67
+msgid "Not logged in."
+msgstr ""
+
+#: finishaddopenid.php:88 finishopenidlogin.php:149
+msgid "OpenID authentication cancelled."
+msgstr ""
+
+#: finishaddopenid.php:92 finishopenidlogin.php:153
+#, php-format
+msgid "OpenID authentication failed: %s"
+msgstr ""
+
+#: finishaddopenid.php:112
+msgid "You already have this OpenID!"
+msgstr ""
+
+#: finishaddopenid.php:114
+msgid "Someone else already has this OpenID."
+msgstr ""
+
+#: finishaddopenid.php:126
+msgid "Error connecting user."
+msgstr ""
+
+#: finishaddopenid.php:131
+msgid "Error updating profile"
+msgstr ""
+
+#: finishaddopenid.php:170 openidlogin.php:95
+msgid "OpenID Login"
+msgstr ""
+
+#: finishopenidlogin.php:34 openidlogin.php:30
msgid "Already logged in."
msgstr ""
-#: openidlogin.php:37 openidsettings.php:194 finishopenidlogin.php:38
+#: finishopenidlogin.php:38 openidlogin.php:37 openidsettings.php:194
msgid "There was a problem with your session token. Try again, please."
msgstr ""
-#: openidlogin.php:66
+#: finishopenidlogin.php:43
+msgid "You can't register if you don't agree to the license."
+msgstr ""
+
+#: finishopenidlogin.php:52 openidsettings.php:208
+msgid "Something weird happened."
+msgstr ""
+
+#: finishopenidlogin.php:66
#, php-format
msgid ""
-"For security reasons, please re-login with your [OpenID](%%doc.openid%%) "
-"before changing your settings."
+"This is the first time you've logged into %s so we must connect your OpenID "
+"to a local account. You can either create a new account, or connect with "
+"your existing account, if you have one."
msgstr ""
-#: openidlogin.php:70
-#, php-format
-msgid "Login with an [OpenID](%%doc.openid%%) account."
+#: finishopenidlogin.php:72
+msgid "OpenID Account Setup"
msgstr ""
-#: openidlogin.php:95 finishaddopenid.php:170
-msgid "OpenID Login"
+#: finishopenidlogin.php:97
+msgid "Create new account"
msgstr ""
-#: openidlogin.php:112
-msgid "OpenID login"
+#: finishopenidlogin.php:99
+msgid "Create a new user with this nickname."
msgstr ""
-#: openidlogin.php:117 openidsettings.php:107
-msgid "OpenID URL"
+#: finishopenidlogin.php:102
+msgid "New nickname"
msgstr ""
-#: openidlogin.php:119
-msgid "Your OpenID URL"
+#: finishopenidlogin.php:104
+msgid "1-64 lowercase letters or numbers, no punctuation or spaces"
msgstr ""
-#: openidlogin.php:122
-msgid "Remember me"
+#: finishopenidlogin.php:114
+msgid "My text and files are available under "
msgstr ""
-#: openidlogin.php:123
-msgid "Automatically login in the future; not for shared computers!"
+#: finishopenidlogin.php:117
+msgid ""
+" except this private data: password, email address, IM address, phone number."
msgstr ""
-#: openidlogin.php:127
-msgid "Login"
+#: finishopenidlogin.php:121
+msgid "Create"
msgstr ""
-#: openidserver.php:106
-#, php-format
-msgid "You are not authorized to use the identity %s"
+#: finishopenidlogin.php:126
+msgid "Connect existing account"
msgstr ""
-#: openidserver.php:126
-msgid "Just an OpenID provider. Nothing to see here, move along..."
+#: finishopenidlogin.php:128
+msgid ""
+"If you already have an account, login with your username and password to "
+"connect it to your OpenID."
msgstr ""
-#: OpenIDPlugin.php:123 OpenIDPlugin.php:135
-msgid "OpenID"
+#: finishopenidlogin.php:131
+msgid "Existing nickname"
msgstr ""
-#: OpenIDPlugin.php:124
-msgid "Login or register with OpenID"
+#: finishopenidlogin.php:134
+msgid "Password"
msgstr ""
-#: OpenIDPlugin.php:136
-msgid "Add or remove OpenIDs"
+#: finishopenidlogin.php:137
+msgid "Connect"
+msgstr ""
+
+#: finishopenidlogin.php:215 finishopenidlogin.php:224
+msgid "Registration not allowed."
+msgstr ""
+
+#: finishopenidlogin.php:231
+msgid "Not a valid invitation code."
+msgstr ""
+
+#: finishopenidlogin.php:241
+msgid "Nickname must have only lowercase letters and numbers and no spaces."
+msgstr ""
+
+#: finishopenidlogin.php:246
+msgid "Nickname not allowed."
+msgstr ""
+
+#: finishopenidlogin.php:251
+msgid "Nickname already in use. Try another one."
+msgstr ""
+
+#: finishopenidlogin.php:258 finishopenidlogin.php:338
+msgid "Stored OpenID not found."
+msgstr ""
+
+#: finishopenidlogin.php:267
+msgid "Creating new account for OpenID that already has a user."
+msgstr ""
+
+#: finishopenidlogin.php:327
+msgid "Invalid username or password."
+msgstr ""
+
+#: finishopenidlogin.php:345
+msgid "Error connecting user to OpenID."
msgstr ""
#: openid.php:141
@@ -126,57 +205,65 @@ msgstr ""
msgid "OpenID Auto-Submit"
msgstr ""
-#: openidtrust.php:51
-msgid "OpenID Identity Verification"
-msgstr ""
-
-#: openidtrust.php:69
+#: openidlogin.php:66
+#, php-format
msgid ""
-"This page should only be reached during OpenID processing, not directly."
+"For security reasons, please re-login with your [OpenID](%%doc.openid%%) "
+"before changing your settings."
msgstr ""
-#: openidtrust.php:118
+#: openidlogin.php:70
#, php-format
-msgid ""
-"%s has asked to verify your identity. Click Continue to verify your "
-"identity and login without creating a new password."
+msgid "Login with an [OpenID](%%doc.openid%%) account."
msgstr ""
-#: openidtrust.php:136
-msgid "Continue"
+#: openidlogin.php:112
+msgid "OpenID login"
msgstr ""
-#: openidtrust.php:137
-msgid "Cancel"
+#: openidlogin.php:117 openidsettings.php:107
+msgid "OpenID URL"
msgstr ""
-#: finishaddopenid.php:67
-msgid "Not logged in."
+#: openidlogin.php:119
+msgid "Your OpenID URL"
msgstr ""
-#: finishaddopenid.php:88 finishopenidlogin.php:149
-msgid "OpenID authentication cancelled."
+#: openidlogin.php:122
+msgid "Remember me"
msgstr ""
-#: finishaddopenid.php:92 finishopenidlogin.php:153
-#, php-format
-msgid "OpenID authentication failed: %s"
+#: openidlogin.php:123
+msgid "Automatically login in the future; not for shared computers!"
msgstr ""
-#: finishaddopenid.php:112
-msgid "You already have this OpenID!"
+#: openidlogin.php:127
+msgid "Login"
msgstr ""
-#: finishaddopenid.php:114
-msgid "Someone else already has this OpenID."
+#: OpenIDPlugin.php:123 OpenIDPlugin.php:135
+msgid "OpenID"
msgstr ""
-#: finishaddopenid.php:126
-msgid "Error connecting user."
+#: OpenIDPlugin.php:124
+msgid "Login or register with OpenID"
msgstr ""
-#: finishaddopenid.php:131
-msgid "Error updating profile"
+#: OpenIDPlugin.php:136
+msgid "Add or remove OpenIDs"
+msgstr ""
+
+#: OpenIDPlugin.php:324
+msgid "Use <a href=\"http://openid.net/\">OpenID</a> to login to the site."
+msgstr ""
+
+#: openidserver.php:106
+#, php-format
+msgid "You are not authorized to use the identity %s."
+msgstr ""
+
+#: openidserver.php:126
+msgid "Just an OpenID provider. Nothing to see here, move along..."
msgstr ""
#: openidsettings.php:59
@@ -224,10 +311,6 @@ msgstr ""
msgid "Remove"
msgstr ""
-#: openidsettings.php:208 finishopenidlogin.php:52
-msgid "Something weird happened."
-msgstr ""
-
#: openidsettings.php:228
msgid "No such OpenID."
msgstr ""
@@ -240,105 +323,26 @@ msgstr ""
msgid "OpenID removed."
msgstr ""
-#: finishopenidlogin.php:43
-msgid "You can't register if you don't agree to the license."
-msgstr ""
-
-#: finishopenidlogin.php:66
-#, php-format
-msgid ""
-"This is the first time you've logged into %s so we must connect your OpenID "
-"to a local account. You can either create a new account, or connect with "
-"your existing account, if you have one."
-msgstr ""
-
-#: finishopenidlogin.php:72
-msgid "OpenID Account Setup"
-msgstr ""
-
-#: finishopenidlogin.php:97
-msgid "Create new account"
-msgstr ""
-
-#: finishopenidlogin.php:99
-msgid "Create a new user with this nickname."
-msgstr ""
-
-#: finishopenidlogin.php:102
-msgid "New nickname"
-msgstr ""
-
-#: finishopenidlogin.php:104
-msgid "1-64 lowercase letters or numbers, no punctuation or spaces"
-msgstr ""
-
-#: finishopenidlogin.php:114
-msgid "My text and files are available under "
+#: openidtrust.php:51
+msgid "OpenID Identity Verification"
msgstr ""
-#: finishopenidlogin.php:117
+#: openidtrust.php:69
msgid ""
-" except this private data: password, email address, IM address, phone number."
-msgstr ""
-
-#: finishopenidlogin.php:121
-msgid "Create"
-msgstr ""
-
-#: finishopenidlogin.php:126
-msgid "Connect existing account"
+"This page should only be reached during OpenID processing, not directly."
msgstr ""
-#: finishopenidlogin.php:128
+#: openidtrust.php:118
+#, php-format
msgid ""
-"If you already have an account, login with your username and password to "
-"connect it to your OpenID."
-msgstr ""
-
-#: finishopenidlogin.php:131
-msgid "Existing nickname"
-msgstr ""
-
-#: finishopenidlogin.php:134
-msgid "Password"
-msgstr ""
-
-#: finishopenidlogin.php:137
-msgid "Connect"
-msgstr ""
-
-#: finishopenidlogin.php:215 finishopenidlogin.php:224
-msgid "Registration not allowed."
-msgstr ""
-
-#: finishopenidlogin.php:231
-msgid "Not a valid invitation code."
-msgstr ""
-
-#: finishopenidlogin.php:241
-msgid "Nickname must have only lowercase letters and numbers and no spaces."
-msgstr ""
-
-#: finishopenidlogin.php:246
-msgid "Nickname not allowed."
-msgstr ""
-
-#: finishopenidlogin.php:251
-msgid "Nickname already in use. Try another one."
-msgstr ""
-
-#: finishopenidlogin.php:258 finishopenidlogin.php:338
-msgid "Stored OpenID not found."
-msgstr ""
-
-#: finishopenidlogin.php:267
-msgid "Creating new account for OpenID that already has a user."
+"%s has asked to verify your identity. Click Continue to verify your "
+"identity and login without creating a new password."
msgstr ""
-#: finishopenidlogin.php:327
-msgid "Invalid username or password."
+#: openidtrust.php:136
+msgid "Continue"
msgstr ""
-#: finishopenidlogin.php:345
-msgid "Error connecting user to OpenID."
+#: openidtrust.php:137
+msgid "Cancel"
msgstr ""
diff --git a/plugins/Orbited/OrbitedPlugin.php b/plugins/Orbited/OrbitedPlugin.php
index ba87b266a..8af71af74 100644
--- a/plugins/Orbited/OrbitedPlugin.php
+++ b/plugins/Orbited/OrbitedPlugin.php
@@ -77,9 +77,9 @@ class OrbitedPlugin extends RealtimePlugin
$root = 'http://'.$server.(($port == 80) ? '':':'.$port);
$scripts[] = $root.'/static/Orbited.js';
- $scripts[] = common_path('plugins/Orbited/orbitedextra.js');
+ $scripts[] = 'plugins/Orbited/orbitedextra.js';
$scripts[] = $root.'/static/protocols/stomp/stomp.js';
- $scripts[] = common_path('plugins/Orbited/orbitedupdater.js');
+ $scripts[] = 'plugins/Orbited/orbitedupdater.js';
return $scripts;
}
diff --git a/plugins/PoweredByStatusNet/locale/PoweredByStatusNet.po b/plugins/PoweredByStatusNet/locale/PoweredByStatusNet.po
index bd39124ef..8f8434a85 100644
--- a/plugins/PoweredByStatusNet/locale/PoweredByStatusNet.po
+++ b/plugins/PoweredByStatusNet/locale/PoweredByStatusNet.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-01-22 15:03-0800\n"
+"POT-Creation-Date: 2010-03-01 14:58-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,16 +16,16 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: PoweredByStatusNetPlugin.php:49
+#: PoweredByStatusNetPlugin.php:50
#, php-format
msgid "powered by %s"
msgstr ""
-#: PoweredByStatusNetPlugin.php:51
+#: PoweredByStatusNetPlugin.php:52
msgid "StatusNet"
msgstr ""
-#: PoweredByStatusNetPlugin.php:64
+#: PoweredByStatusNetPlugin.php:65
msgid ""
"Outputs powered by <a href=\"http://status.net/\">StatusNet</a> after site "
"name."
diff --git a/plugins/README-plugins b/plugins/README-plugins
new file mode 100644
index 000000000..cdce7eb18
--- /dev/null
+++ b/plugins/README-plugins
@@ -0,0 +1,21 @@
+Several example plugins are included in the plugins/ directory. You
+can enable a plugin with the following line in config.php:
+
+ addPlugin('Example', array('param1' => 'value1',
+ 'param2' => 'value2'));
+
+This will look for and load files named 'ExamplePlugin.php' or
+'Example/ExamplePlugin.php' either in the plugins/ directory (for
+plugins that ship with StatusNet) or in the local/ directory (for
+plugins you write yourself or that you get from somewhere else) or
+local/plugins/.
+
+Plugins are documented in their own directories.
+
+
+Additional information on using and developing plugins can be found
+on the StatusNet wiki:
+
+http://status.net/wiki/Plugins
+http://status.net/wiki/Plugin_development
+
diff --git a/plugins/Realtime/RealtimePlugin.php b/plugins/Realtime/RealtimePlugin.php
index 2b3cb35f1..b559d80c6 100644
--- a/plugins/Realtime/RealtimePlugin.php
+++ b/plugins/Realtime/RealtimePlugin.php
@@ -117,7 +117,7 @@ class RealtimePlugin extends Plugin
function onEndShowStatusNetStyles($action)
{
- $action->cssLink(common_path('plugins/Realtime/realtimeupdate.css'),
+ $action->cssLink('plugins/Realtime/realtimeupdate.css',
null, 'screen, projection, tv');
return true;
}
@@ -305,7 +305,7 @@ class RealtimePlugin extends Plugin
function _getScripts()
{
- return array(common_path('plugins/Realtime/realtimeupdate.js'));
+ return array('plugins/Realtime/realtimeupdate.js');
}
function _updateInitialize($timeline, $user_id)
diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js
index 2e5851ae5..0f7a680d7 100644
--- a/plugins/Realtime/realtimeupdate.js
+++ b/plugins/Realtime/realtimeupdate.js
@@ -130,7 +130,7 @@ RealtimeUpdate = {
user = data['user'];
html = data['html'].replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&quot;/g,'"').replace(/&amp;/g,'&');
source = data['source'].replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&quot;/g,'"').replace(/&amp;/g,'&');
-
+console.log(data);
ni = "<li class=\"hentry notice\" id=\"notice-"+unique+"\">"+
"<div class=\"entry-title\">"+
"<span class=\"vcard author\">"+
diff --git a/plugins/Recaptcha/RecaptchaPlugin.php b/plugins/Recaptcha/RecaptchaPlugin.php
index 3665214f8..c585da43c 100644
--- a/plugins/Recaptcha/RecaptchaPlugin.php
+++ b/plugins/Recaptcha/RecaptchaPlugin.php
@@ -31,8 +31,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1);
}
-define('RECAPTCHA', '0.2');
-
require_once(INSTALLDIR.'/plugins/Recaptcha/recaptchalib.php');
class RecaptchaPlugin extends Plugin
@@ -88,4 +86,16 @@ class RecaptchaPlugin extends Plugin
return false;
}
}
+
+ function onPluginVersion(&$versions)
+ {
+ $versions[] = array('name' => 'Recaptcha',
+ 'version' => STATUSNET_VERSION,
+ 'author' => 'Eric Helgeson',
+ 'homepage' => 'http://status.net/wiki/Plugin:Recaptcha',
+ 'rawdescription' =>
+ _m('Uses <a href="http://recaptcha.org/">Recaptcha</a> service to add a '.
+ 'captcha to the registration page.'));
+ return true;
+ }
}
diff --git a/plugins/ReverseUsernameAuthentication/README b/plugins/ReverseUsernameAuthentication/README
index e9160ed9b..57b53219e 100644
--- a/plugins/ReverseUsernameAuthentication/README
+++ b/plugins/ReverseUsernameAuthentication/README
@@ -8,7 +8,10 @@ add "addPlugin('reverseUsernameAuthentication', array('setting'=>'value', 'setti
Settings
========
-provider_name*: a unique name for this authentication provider.
+provider_name*: This is a identifier designated to the connection.
+ It's how StatusNet will refer to the authentication source.
+ For the most part, any name can be used, so long as each authentication source has a different identifier.
+ In most cases there will be only one authentication source used.
password_changeable*: must be set to false. This plugin does not support changing passwords.
authoritative (false): Set to true if this plugin's responses are authoritative (meaning if this fails, do check any other plugins or the internal password database).
autoregistration (false): Set to true if users should be automatically created when they attempt to login.
diff --git a/plugins/ReverseUsernameAuthentication/ReverseUsernameAuthenticationPlugin.php b/plugins/ReverseUsernameAuthentication/ReverseUsernameAuthenticationPlugin.php
index d9d2137f8..dac5a1588 100644
--- a/plugins/ReverseUsernameAuthentication/ReverseUsernameAuthenticationPlugin.php
+++ b/plugins/ReverseUsernameAuthentication/ReverseUsernameAuthenticationPlugin.php
@@ -47,10 +47,13 @@ class ReverseUsernameAuthenticationPlugin extends AuthenticationPlugin
return $username == strrev($password);
}
- function autoRegister($username)
+ function autoRegister($username, $nickname)
{
+ if(is_null($nickname)){
+ $nickname = $username;
+ }
$registration_data = array();
- $registration_data['nickname'] = $username ;
+ $registration_data['nickname'] = $nickname ;
return User::register($registration_data);
}
diff --git a/plugins/Sample/locale/Sample.po b/plugins/Sample/locale/Sample.po
index e0d2aa853..a52c4ec01 100644
--- a/plugins/Sample/locale/Sample.po
+++ b/plugins/Sample/locale/Sample.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-02-24 16:33-0800\n"
+"POT-Creation-Date: 2010-03-01 14:58-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/plugins/TabFocus/TabFocusPlugin.php b/plugins/TabFocus/TabFocusPlugin.php
new file mode 100644
index 000000000..bf89c478c
--- /dev/null
+++ b/plugins/TabFocus/TabFocusPlugin.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * StatusNet, the distributed open-source microblogging tool
+ *
+ * Plugin to enable Twitter-like "tab-space" pattern for a user to submit a notice
+ *
+ * PHP version 5
+ *
+ * LICENCE: This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @category Plugin
+ * @package StatusNet
+ * @author Craig Andrews <candrews@integralblue.com>
+ * @author Paul Irish <paul.irish@isobar.net>
+ * @copyright 2009 Craig Andrews http://candrews.integralblue.com
+ * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
+ * @link http://status.net/
+ */
+
+if (!defined('STATUSNET') && !defined('LACONICA')) {
+ exit(1);
+}
+
+class TabFocusPlugin extends Plugin
+{
+ function __construct()
+ {
+ parent::__construct();
+ }
+
+ function onEndShowScripts($action)
+ {
+ $action->script('plugins/TabFocus/tabfocus.js');
+ }
+
+ function onPluginVersion(&$versions)
+ {
+ $versions[] = array('name' => 'TabFocus',
+ 'version' => STATUSNET_VERSION,
+ 'author' => 'Craig Andrews and Paul Irish',
+ 'homepage' => 'http://status.net/wiki/Plugin:TabFocus',
+ 'rawdescription' =>
+ _m('TabFocus changes the notice form behavior so that, while in the text area, pressing the tab key focuses the "Send" button, matching the behavor of Twitter.'));
+ return true;
+ }
+}
diff --git a/plugins/TabFocus/tabfocus.js b/plugins/TabFocus/tabfocus.js
new file mode 100644
index 000000000..e2c1c6521
--- /dev/null
+++ b/plugins/TabFocus/tabfocus.js
@@ -0,0 +1,7 @@
+jQuery(function($){
+ $('#notice_data-text').bind('keydown',function(e){
+ if (e.which==9) {
+ setTimeout(function(){ $('#notice_action-submit').focus(); },15);
+ }
+ });
+});
diff --git a/plugins/TwitterBridge/locale/TwitterBridge.po b/plugins/TwitterBridge/locale/TwitterBridge.po
index 14c30f1c9..eff125579 100644
--- a/plugins/TwitterBridge/locale/TwitterBridge.po
+++ b/plugins/TwitterBridge/locale/TwitterBridge.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-12-07 20:38-0800\n"
+"POT-Creation-Date: 2010-03-01 14:58-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,23 +16,48 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: twitterauthorization.php:81
-msgid "Not logged in."
+#: twitter.php:320
+msgid "Your Twitter bridge has been disabled."
msgstr ""
-#: twitterauthorization.php:131 twitterauthorization.php:150
-#: twitterauthorization.php:170 twitterauthorization.php:217
+#: twitter.php:324
+#, php-format
+msgid ""
+"Hi, %1$s. We're sorry to inform you that your link to Twitter has been "
+"disabled. We no longer seem to have permission to update your Twitter "
+"status. (Did you revoke %3$s's access?)\n"
+"\n"
+"You can re-enable your Twitter bridge by visiting your Twitter settings "
+"page:\n"
+"\n"
+"\t%2$s\n"
+"\n"
+"Regards,\n"
+"%3$s\n"
+msgstr ""
+
+#: twitterauthorization.php:181 twitterauthorization.php:229
msgid "Couldn't link your Twitter account."
msgstr ""
-#: TwitterBridgePlugin.php:89
+#: twitterauthorization.php:201
+msgid "Couldn't link your Twitter account: oauth_token mismatch."
+msgstr ""
+
+#: TwitterBridgePlugin.php:114
msgid "Twitter"
msgstr ""
-#: TwitterBridgePlugin.php:90
+#: TwitterBridgePlugin.php:115
msgid "Twitter integration options"
msgstr ""
+#: TwitterBridgePlugin.php:207
+msgid ""
+"The Twitter \"bridge\" plugin allows you to integrate your StatusNet "
+"instance with <a href=\"http://twitter.com/\">Twitter</a>."
+msgstr ""
+
#: twittersettings.php:59
msgid "Twitter settings"
msgstr ""
@@ -51,78 +76,81 @@ msgstr ""
msgid "Connected Twitter account"
msgstr ""
-#: twittersettings.php:125
-msgid "Remove"
+#: twittersettings.php:128
+msgid "Disconnect my account from Twitter"
+msgstr ""
+
+#: twittersettings.php:133
+msgid "Disconnecting your Twitter could make it impossible to log in! Please "
+msgstr ""
+
+#: twittersettings.php:137
+msgid "set a password"
msgstr ""
-#: twittersettings.php:131
+#: twittersettings.php:139
+msgid " first."
+msgstr ""
+
+#: twittersettings.php:143
+#, php-format
+msgid ""
+"Keep your %1$s account but disconnect from Twitter. You can use your %1$s "
+"password to log in."
+msgstr ""
+
+#: twittersettings.php:151
+msgid "Disconnect"
+msgstr ""
+
+#: twittersettings.php:158
msgid "Preferences"
msgstr ""
-#: twittersettings.php:135
+#: twittersettings.php:162
msgid "Automatically send my notices to Twitter."
msgstr ""
-#: twittersettings.php:142
+#: twittersettings.php:169
msgid "Send local \"@\" replies to Twitter."
msgstr ""
-#: twittersettings.php:149
+#: twittersettings.php:176
msgid "Subscribe to my Twitter friends here."
msgstr ""
-#: twittersettings.php:158
+#: twittersettings.php:185
msgid "Import my Friends Timeline."
msgstr ""
-#: twittersettings.php:174
+#: twittersettings.php:201
msgid "Save"
msgstr ""
-#: twittersettings.php:176
+#: twittersettings.php:203
msgid "Add"
msgstr ""
-#: twittersettings.php:201
+#: twittersettings.php:228
msgid "There was a problem with your session token. Try again, please."
msgstr ""
-#: twittersettings.php:211
+#: twittersettings.php:238
msgid "Unexpected form submission."
msgstr ""
-#: twittersettings.php:230
+#: twittersettings.php:257
msgid "Couldn't remove Twitter user."
msgstr ""
-#: twittersettings.php:234
-msgid "Twitter account removed."
+#: twittersettings.php:261
+msgid "Twitter account disconnected."
msgstr ""
-#: twittersettings.php:255 twittersettings.php:265
+#: twittersettings.php:282 twittersettings.php:292
msgid "Couldn't save Twitter preferences."
msgstr ""
-#: twittersettings.php:269
+#: twittersettings.php:296
msgid "Twitter preferences saved."
msgstr ""
-
-#: twitter.php:333
-msgid "Your Twitter bridge has been disabled."
-msgstr ""
-
-#: twitter.php:337
-#, php-format
-msgid ""
-"Hi, %1$s. We're sorry to inform you that your link to Twitter has been "
-"disabled. We no longer seem to have permission to update your Twitter "
-"status. (Did you revoke %3$s's access?)\n"
-"\n"
-"You can re-enable your Twitter bridge by visiting your Twitter settings "
-"page:\n"
-"\n"
-"\t%2$s\n"
-"\n"
-"Regards,\n"
-"%3$s\n"
-msgstr ""
diff --git a/plugins/TwitterBridge/twitter.php b/plugins/TwitterBridge/twitter.php
index ceb83b037..13e499d65 100644
--- a/plugins/TwitterBridge/twitter.php
+++ b/plugins/TwitterBridge/twitter.php
@@ -252,8 +252,17 @@ function format_status($notice)
$statustxt = preg_replace('/^@/', ' @', $notice->content);
// Convert !groups to #hashes
+
+ // XXX: Make this an optional setting?
+
$statustxt = preg_replace('/(^|\s)!([A-Za-z0-9]{1,64})/', "\\1#\\2", $statustxt);
+ if (mb_strlen($statustxt) > 140) {
+ $noticeUrl = common_shorten_url($notice->uri);
+ $urlLen = mb_strlen($noticeUrl);
+ $statustxt = mb_substr($statustxt, 0, 140 - ($urlLen + 3)) . ' … ' . $noticeUrl;
+ }
+
return $statustxt;
}