]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch '0.8.x' of git://gitorious.org/~brion/statusnet/brion-fixes into 0.8.x
authorBrion Vibber <brion@pobox.com>
Mon, 12 Oct 2009 21:01:34 +0000 (21:01 +0000)
committerBrion Vibber <brion@pobox.com>
Mon, 12 Oct 2009 21:01:34 +0000 (21:01 +0000)
78 files changed:
README
actions/api.php
actions/avatarsettings.php
actions/editgroup.php
actions/emailsettings.php
actions/foaf.php
actions/grouplogo.php
actions/groupsearch.php
actions/invite.php
actions/login.php
actions/newnotice.php
actions/noticesearch.php
actions/openidlogin.php
actions/openidsettings.php
actions/othersettings.php
actions/passwordsettings.php
actions/peoplesearch.php
actions/profilesettings.php
actions/register.php
actions/requesttoken.php
actions/showstream.php
actions/smssettings.php
actions/subscriptions.php
classes/File.php
classes/User.php
db/sms_carrier.sql
doc-src/bookmarklet
doc-src/contact
doc-src/im
extlib/Auth/OpenID/BigMath.php
extlib/Auth/Yadis/XML.php
extlib/OAuth.php
extlib/PEAR.php
extlib/Services/oEmbed.php
index.php
install.php
lib/action.php
lib/command.php
lib/commandinterpreter.php
lib/common.php
lib/designsettings.php
lib/galleryaction.php
lib/htmloutputter.php
lib/mail.php
lib/noticeform.php
lib/noticelist.php
lib/omb.php
lib/router.php
lib/util.php
plugins/Autocomplete/Autocomplete.js
plugins/Autocomplete/AutocompletePlugin.php
plugins/Autocomplete/autocomplete.php [new file with mode: 0644]
plugins/Autocomplete/readme.txt
plugins/InfiniteScroll/InfiniteScrollPlugin.php
plugins/InfiniteScroll/infinitescroll.js
plugins/InfiniteScroll/jquery.infinitescroll.js
plugins/LinkbackPlugin.php
plugins/Meteor/meteorupdater.js
plugins/PiwikAnalyticsPlugin.php
plugins/Realtime/RealtimePlugin.php
plugins/Realtime/icon_external.gif [new file with mode: 0644]
plugins/Realtime/jquery.getUrlParam.js [new file with mode: 0644]
plugins/Realtime/realtimeupdate.js
plugins/recaptcha/README
scripts/synctwitterfriends.php
scripts/twitterqueuehandler.php
scripts/twitterstatusfetcher.php
tests/URLDetectionTest.php
theme/base/css/display.css
theme/biz/css/base.css
theme/biz/css/display.css
theme/biz/logo.png
theme/cloudy/css/display.css
theme/cloudy/logo.png
theme/default/css/display.css
theme/h4ck3r/logo.png
theme/identica/css/display.css
theme/pigeonthoughts/logo.png

diff --git a/README b/README
index 3dd365e1f8218039fae8652ebcb855eda2df8789..75621998111fa1c3f38fe8e30c03d0cdffdc02f2 100644 (file)
--- a/README
+++ b/README
@@ -146,6 +146,7 @@ Your PHP installation must include the following PHP extensions:
 - GD. For scaling down avatar images.
 - mbstring. For handling Unicode (UTF-8) encoded strings.
 - gettext. For multiple languages. Default on many PHP installs.
+- tidy. Used to clean up HTML/URLs for the URL shortener to consume.
 
 For some functionality, you will also need the following extensions:
 
index f425a8dcd7866acf3929fcfbd086fedf7e6c2692..c236378bcb4f2a0fcd454c74a223580785fb8641 100644 (file)
@@ -27,6 +27,8 @@ class ApiAction extends Action
     var $api_arg;
     var $api_method;
     var $api_action;
+    var $auth_user;
+    var $auth_pw;
 
     function handle($args)
     {
@@ -35,6 +37,7 @@ class ApiAction extends Action
         $this->api_action = $this->arg('apiaction');
         $method = $this->arg('method');
         $argument = $this->arg('argument');
+       $this->basic_auth_process_header();
 
         if (isset($argument)) {
             $cmdext = explode('.', $argument);
@@ -50,7 +53,7 @@ class ApiAction extends Action
         }
 
         if ($this->requires_auth()) {
-            if (!isset($_SERVER['PHP_AUTH_USER'])) {
+            if (!isset($this->auth_user)) {
 
                 # This header makes basic auth go
                 header('WWW-Authenticate: Basic realm="StatusNet API"');
@@ -58,8 +61,8 @@ class ApiAction extends Action
                 # If the user hits cancel -- bam!
                 $this->show_basic_auth_error();
             } else {
-                $nickname = $_SERVER['PHP_AUTH_USER'];
-                $password = $_SERVER['PHP_AUTH_PW'];
+                $nickname = $this->auth_user;
+                $password = $this->auth_pw;
                 $user = common_check_user($nickname, $password);
 
                 if ($user) {
@@ -76,8 +79,8 @@ class ApiAction extends Action
         } else {
 
             // Caller might give us a username even if not required
-            if (isset($_SERVER['PHP_AUTH_USER'])) {
-                $user = User::staticGet('nickname', $_SERVER['PHP_AUTH_USER']);
+            if (isset($this->auth_user)) {
+                $user = User::staticGet('nickname', $this->auth_user);
                 if ($user) {
                     $this->user = $user;
                 }
@@ -203,6 +206,39 @@ class ApiAction extends Action
         }
     }
 
+    function basic_auth_process_header()
+    {
+       if(isset($_SERVER['AUTHORIZATION']) || isset($_SERVER['HTTP_AUTHORIZATION']))
+       {
+               $authorization_header = isset($_SERVER['HTTP_AUTHORIZATION'])?$_SERVER['HTTP_AUTHORIZATION']:$_SERVER['AUTHORIZATION'];
+       }
+
+       if(isset($_SERVER['PHP_AUTH_USER']))
+       {
+               $this->auth_user = $_SERVER['PHP_AUTH_USER'];
+               $this->auth_pw = $_SERVER['PHP_AUTH_PW'];
+       }
+       elseif ( isset($authorization_header) && strstr(substr($authorization_header, 0,5),'Basic')  )
+       {
+               // decode the HTTP_AUTHORIZATION header on php-cgi server self
+               // on fcgid server the header name is AUTHORIZATION
+
+               $auth_hash = base64_decode( substr($authorization_header, 6) );
+               list($this->auth_user, $this->auth_pw) = explode(':', $auth_hash);
+
+               // set all to NULL on a empty basic auth request
+               if($this->auth_user == "") {
+                       $this->auth_user = NULL;
+                       $this->auth_pw = NULL;
+               }
+       }
+       else
+       {
+               $this->auth_user = NULL;
+               $this->auth_pw = NULL;
+       }
+    }
+
     function show_basic_auth_error()
     {
         header('HTTP/1.1 401 Unauthorized');
index 0bc439ff122a944f653ca8bd7978e38ec77d691a..ded419dd797a7c88d012a2b9b4a6ca6d0d4a9e25 100644 (file)
@@ -362,13 +362,13 @@ class AvatarsettingsAction extends AccountSettingsAction
         $profile = $user->getProfile();
         
         $avatar = $profile->getOriginalAvatar();
-        $avatar->delete();
+        if($avatar) $avatar->delete();
         $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
-        $avatar->delete();
+        if($avatar) $avatar->delete();
         $avatar = $profile->getAvatar(AVATAR_STREAM_SIZE);
-        $avatar->delete();
+        if($avatar) $avatar->delete();
         $avatar = $profile->getAvatar(AVATAR_MINI_SIZE);
-        $avatar->delete();
+        if($avatar) $avatar->delete();
 
         $this->showForm(_('Avatar deleted.'), true);
     }
@@ -399,5 +399,7 @@ class AvatarsettingsAction extends AccountSettingsAction
             $this->script('js/jcrop/jquery.Jcrop.min.js');
             $this->script('js/jcrop/jquery.Jcrop.go.js');
         }
+
+        $this->autofocus('avatarfile');
     }
 }
index cac910e9bc56d96ca17580ed3a2494ee343ad19a..e7ba836a0153dfe79531c46fcb926d2655c6dc3a 100644 (file)
@@ -160,6 +160,12 @@ class EditgroupAction extends GroupDesignAction
         }
     }
 
+    function showScripts()
+    {
+        parent::showScripts();
+        $this->autofocus('nickname');
+    }
+
     function trySave()
     {
         $cur = common_current_user();
index af528a892ef877556b02dc05b173a1171f612d2e..6eff06c0d667b66fc6056ed706a83a7141efb89a 100644 (file)
@@ -71,6 +71,12 @@ class EmailsettingsAction extends AccountSettingsAction
         return _('Manage how you get email from %%site.name%%.');
     }
 
+    function showScripts()
+    {
+        parent::showScripts();
+        $this->autofocus('email');
+    }
+
     /**
      * Content area of the page
      *
index 4dae9dfc19aeae6dafc73236ea2068556920e333..356393304ed5abbc0a243bcd68e8974d395aa05b 100644 (file)
@@ -146,8 +146,10 @@ class FoafAction extends Action
             while ($sub->fetch()) {
                 if ($sub->token) {
                     $other = Remote_profile::staticGet('id', $sub->subscriber);
+                    $profile = Profile::staticGet('id', $sub->subscriber);
                 } else {
                     $other = User::staticGet('id', $sub->subscriber);
+                    $profile = Profile::staticGet('id', $sub->subscriber);
                 }
                 if (!$other) {
                     common_debug('Got a bad subscription: '.print_r($sub,true));
@@ -158,12 +160,15 @@ class FoafAction extends Action
                 } else {
                     $person[$other->uri] = array(LISTENER,
                                                  $other->id,
-                                                 $other->nickname,
+                                                 $profile->nickname,
                                                  (empty($sub->token)) ? 'User' : 'Remote_profile');
                 }
                 $other->free();
                 $other = null;
                 unset($other);
+                $profile->free();
+                $profile = null;
+                unset($profile);
             }
         }
 
@@ -254,8 +259,10 @@ class FoafAction extends Action
                 while ($sub->fetch()) {
                     if (!empty($sub->token)) {
                         $other = Remote_profile::staticGet('id', $sub->subscribed);
+                        $profile = Profile::staticGet('id', $sub->subscribed);
                     } else {
                         $other = User::staticGet('id', $sub->subscribed);
+                        $profile = Profile::staticGet('id', $sub->subscribed);
                     }
                     if (empty($other)) {
                         common_debug('Got a bad subscription: '.print_r($sub,true));
@@ -264,11 +271,14 @@ class FoafAction extends Action
                     $this->element('sioc:follows', array('rdf:resource' => $other->uri.'#acct'));
                     $person[$other->uri] = array(LISTENEE,
                                                  $other->id,
-                                                 $other->nickname,
+                                                 $profile->nickname,
                                                  (empty($sub->token)) ? 'User' : 'Remote_profile');
                     $other->free();
                     $other = null;
                     unset($other);
+                    $profile->free();
+                    $profile = null;
+                    unset($profile);
                 }
             }
 
index c6f376915ef2e44ef2c0696c2fe549c59da30bc1..63ba769c7a61feb5a2e5eb71d513859496123cdf 100644 (file)
@@ -445,6 +445,8 @@ class GrouplogoAction extends GroupDesignAction
             $this->script('js/jcrop/jquery.Jcrop.min.js');
             $this->script('js/jcrop/jquery.Jcrop.go.js');
         }
+
+        $this->autofocus('avatarfile');
     }
 
     function showLocalNav()
index bbd4c3a74aa89a471be744cf1331701aba11856c..be15efc47cea5c0be163b3095db9264b53328840 100644 (file)
@@ -91,6 +91,12 @@ class GroupsearchAction extends SearchAction
             $user_group->free();
         }
     }
+
+    function showScripts()
+    {
+        parent::showScripts();
+        $this->autofocus('q');
+    }
 }
 
 class GroupSearchResults extends GroupList
index ab43a2491d581edfb17120d50cbb32f02eb2b65c..9fa6a76f671f471a83b13b590db846401fd6b039 100644 (file)
@@ -98,6 +98,12 @@ class InviteAction extends CurrentUserDesignAction
         $this->showPage();
     }
 
+    function showScripts()
+    {
+        parent::showScripts();
+        $this->autofocus('addresses');
+    }
+
     function title()
     {
         if ($this->mode == 'sent') {
index 37f3c54ffb95b770195cc94033a482ddaa65e46d..ac8c40c3e5f60e97cf98393204ff96ca79fc6fef 100644 (file)
@@ -22,6 +22,7 @@
  * @category  Login
  * @package   StatusNet
  * @author    Evan Prodromou <evan@status.net>
+ * @author    Sarven Capadisli <csarven@status.net>
  * @copyright 2008-2009 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/
@@ -37,6 +38,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
  * @category Personal
  * @package  StatusNet
  * @author   Evan Prodromou <evan@status.net>
+ * @author   Sarven Capadisli <csarven@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/
  */
@@ -162,6 +164,12 @@ class LoginAction extends Action
         $this->showPage();
     }
 
+    function showScripts()
+    {
+        parent::showScripts();
+        $this->autofocus('nickname');
+    }
+
     /**
      * Title of the page
      *
index 00a822860e5065a442eb40431b62fa87fec72c0f..6e3720e09ecee566d1a95d0f3feed8a07c6582ef 100644 (file)
@@ -431,13 +431,14 @@ class NewnoticeAction extends Action
         $content = $this->trimmed('status_textarea');
         if (!$content) {
             $replyto = $this->trimmed('replyto');
+            $inreplyto = $this->trimmed('inreplyto');
             $profile = Profile::staticGet('nickname', $replyto);
             if ($profile) {
                 $content = '@' . $profile->nickname . ' ';
             }
         }
 
-        $notice_form = new NoticeForm($this, '', $content);
+        $notice_form = new NoticeForm($this, '', $content, null, $inreplyto);
         $notice_form->show();
     }
 
index 1188e7e10fb3f881876e5e9eb37bcf0a9c230800..69dcd1a46c08d815f988d04e2eb1feed0409f61d 100644 (file)
@@ -137,6 +137,12 @@ class NoticesearchAction extends SearchAction
         $this->pagination($page > 1, $cnt > NOTICES_PER_PAGE,
                           $page, 'noticesearch', array('q' => $q));
     }
+
+    function showScripts()
+    {
+        parent::showScripts();
+        $this->autofocus('q');
+    }
 }
 
 class SearchNoticeList extends NoticeList {
@@ -192,7 +198,7 @@ class SearchNoticeListItem extends NoticeListItem {
         $result  = preg_replace($pattern, '<strong>\\1</strong>', $text);
 
         /* Remove highlighting from inside links, loop incase multiple highlights in links */
-        $pattern = '/(href="[^"]*)<strong>('.$options.')<\/strong>([^"]*")/iU';
+        $pattern = '/(\w+="[^"]*)<strong>('.$options.')<\/strong>([^"]*")/iU';
         do {
             $result = preg_replace($pattern, '\\1\\2\\3', $result, -1, $count);
         } while ($count);
index 4b53386943044c3d01b37d11cf9c0df0f86408d6..9b7deefb6366f7548035f78c405e8606c28e239f 100644 (file)
@@ -86,6 +86,12 @@ class OpenidloginAction extends Action
         }
     }
 
+    function showScripts()
+    {
+        parent::showScripts();
+        $this->autofocus('openid_url');
+    }
+
     function title()
     {
         return _('OpenID Login');
index 13da64a4f650a6663287a1b0e6f4a575f8330b24..30725fc1bff7b6fa847d4619a893816f2de8854c 100644 (file)
@@ -72,6 +72,12 @@ class OpenidsettingsAction extends AccountSettingsAction
                  ' Manage your associated OpenIDs from here.');
     }
 
+    function showScripts()
+    {
+        parent::showScripts();
+        $this->autofocus('openid_url');
+    }
+
     /**
      * Show the form for OpenID management
      *
index 8b674161a89bb1a28408e4e91b158083a5492167..f898e220794e3c2c7bad536df3831f0fe6916681 100644 (file)
@@ -71,6 +71,12 @@ class OthersettingsAction extends AccountSettingsAction
         return _('Manage various other options.');
     }
 
+    function showScripts()
+    {
+        parent::showScripts();
+        $this->autofocus('urlshorteningservice');
+    }
+
     /**
      * Content area of the page
      *
index ec842600f6c1c252206aa7a1a5f117e93140c99f..cd4beac3f2120a9c83a81f4ddc8a4e98c8573777 100644 (file)
@@ -69,6 +69,12 @@ class PasswordsettingsAction extends AccountSettingsAction
         return _('Change your password.');
     }
 
+    function showScripts()
+    {
+        parent::showScripts();
+        $this->autofocus('oldpassword');
+    }
+
     /**
      * Content area of the page
      *
index ba0f71e392165acb4fa9d55d99ab6765ebe2187d..38135ecbdeac6076ad1207e27705c5fab658bcfe 100644 (file)
@@ -85,6 +85,12 @@ class PeoplesearchAction extends SearchAction
             $profile->free();
         }
     }
+
+    function showScripts()
+    {
+        parent::showScripts();
+        $this->autofocus('q');
+    }
 }
 
 /**
index f9c16351d36eb15e4b27566229662a67c261dc6d..2d66e99469cf7692141724185669fdc7f742e027 100644 (file)
@@ -23,6 +23,7 @@
  * @package   StatusNet
  * @author    Evan Prodromou <evan@status.net>
  * @author    Zach Copley <zach@status.net>
+ * @author    Sarven Capadisli <csarven@status.net>
  * @copyright 2008-2009 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/
@@ -41,6 +42,7 @@ require_once INSTALLDIR.'/lib/accountsettingsaction.php';
  * @package  StatusNet
  * @author   Evan Prodromou <evan@status.net>
  * @author   Zach Copley <zach@status.net>
+ * @author   Sarven Capadisli <csarven@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/
  */
@@ -70,6 +72,12 @@ class ProfilesettingsAction extends AccountSettingsAction
                   'so people know more about you.');
     }
 
+    function showScripts()
+    {
+        parent::showScripts();
+        $this->autofocus('nickname');
+    }
+
     /**
      * Content area of the page
      *
index c431aeee3e356fd01002fd70e93f56ef57ecb01b..eefbc340a1f427f5484ff5a3f5978f007edf6e5e 100644 (file)
@@ -140,6 +140,12 @@ class RegisterAction extends Action
         }
     }
 
+    function showScripts()
+    {
+        parent::showScripts();
+        $this->autofocus('nickname');
+    }
+
     /**
      * Try to register a user
      *
index 48fe1db08f1ea13cef4eec9b6ce59b8f68cc9e13..a17efcdd50abaf55dbc5bc21b2f7daf52cd33a0d 100644 (file)
@@ -72,7 +72,7 @@ class RequesttokenAction extends Action
             $req    = OAuthRequest::from_request('POST', common_local_url('requesttoken'));
             $server = omb_oauth_server();
             $token  = $server->fetch_request_token($req);
-            print $token;
+            print $token.'&omb_version='.OMB_VERSION_01;
         } catch (OAuthException $e) {
             $this->serverError($e->getMessage());
         }
index 4d3067eed37275e35144fc2ecd292e956a0c4954..89285b13c7aae1cd4982ce8f7e411f96bbd84f9f 100644 (file)
@@ -380,8 +380,13 @@ class ShowstreamAction extends ProfileAction
             $this->showEmptyListMessage();
         }
 
+        $args = array('nickname' => $this->user->nickname);
+        if (!empty($this->tag))
+        {
+            $args['tag'] = $this->tag;
+        }
         $this->pagination($this->page>1, $cnt>NOTICES_PER_PAGE, $this->page,
-                          'showstream', array('nickname' => $this->user->nickname));
+                          'showstream', $args);
     }
 
     function showAnonymousMessage()
index b956ccebaaa178773fa8c05459535ab91ce03576..672abcef8c15587e0eda8e089578e4bbea496c0a 100644 (file)
@@ -69,6 +69,12 @@ class SmssettingsAction extends ConnectSettingsAction
         return _('You can receive SMS messages through email from %%site.name%%.');
     }
 
+    function showScripts()
+    {
+        parent::showScripts();
+        $this->autofocus('sms');
+    }
+
     /**
      * Content area of the page
      *
index b1c6682283c2ab1473219cfb077d2fb7f43b206c..cc7b38ee461f21d21f44408d6b645a70d086db00 100644 (file)
@@ -107,6 +107,12 @@ class SubscriptionsAction extends GalleryAction
                           array('nickname' => $this->user->nickname));
     }
 
+    function showScripts()
+    {
+        parent::showScripts();
+        $this->autofocus('tag');
+    }
+
     function showEmptyListMessage()
     {
         if (common_logged_in()) {
index f4d0a3a4881c0c365575ff79516d04da781c8f13..308d0a77176a63eb0ec563c8702096663c4d36b1 100644 (file)
@@ -78,7 +78,7 @@ class File extends Memcached_DataObject
         $file_id = $x->insert();
 
         if (isset($redir_data['type'])
-            && ('text/html' === substr($redir_data['type'], 0, 9))
+            && (('text/html' === substr($redir_data['type'], 0, 9) || 'application/xhtml+xml' === substr($redir_data['type'], 0, 21)))
             && ($oembed_data = File_oembed::_getOembed($given_url))) {
                 File_oembed::saveNew($oembed_data, $file_id);
         }
@@ -201,7 +201,7 @@ class File extends Memcached_DataObject
         if(isset($this->filename)){
             return true;
         }
-        $notEnclosureMimeTypes = array('text/html','application/xhtml+xml');
+        $notEnclosureMimeTypes = array('text/html','application/xhtml+xml',null);
         $mimetype = strtolower($this->mimetype);
         $semicolon = strpos($mimetype,';');
         if($semicolon){
index 14d3cf54fac608caf62f386f090b3d24eb77fdf0..8386f1e185bb7e41bbf4191e4a504bb195b9b848 100644 (file)
@@ -120,11 +120,15 @@ class User extends Memcached_DataObject
     function allowed_nickname($nickname)
     {
         // XXX: should already be validated for size, content, etc.
-        static $blacklist = array('rss', 'xrds', 'doc', 'main',
-                                  'settings', 'notice', 'user',
-                                  'search', 'avatar', 'tag', 'tags',
-                                  'api', 'message', 'group', 'groups',
-                                  'local');
+
+        $blacklist = array();
+
+        //all directory and file names should be blacklisted
+        $d = dir(INSTALLDIR);
+        while (false !== ($entry = $d->read())) {
+            $blacklist[]=$entry;
+        }
+        $d->close();
         $merged = array_merge($blacklist, common_config('nickname', 'blacklist'));
         return !in_array($nickname, $merged);
     }
index 055606f58213b59ef71aad70c727c142651102be..0e94df296e4f4dab912b13702f35ceb75712e660 100644 (file)
@@ -61,4 +61,5 @@ VALUES
     (100113, 'T-Mobile Germany', '%s@t-mobile-sms.de', now()),
     (100114, 'Vodafone Germany', '%s@vodafone-sms.de', now()),
     (100115, 'E-Plus', '%s@smsmail.eplus.de', now()),
-    (100116, 'Cellular South', '%s@csouth1.com', now());
+    (100116, 'Cellular South', '%s@csouth1.com', now()),
+    (100117, 'ChinaMobile (139)', '%s@139.com', now());
index 6cd2c08f90e74a73b6d9d7fd22c557624992a1a2..e5ded770234bbbfcc3b2494375ef1622b1d10cb5 100644 (file)
@@ -2,6 +2,4 @@ A bookmarklet is a small piece of javascript code used as a bookmark. This one w
 
 Drag-and-drop the following link to your bookmarks bar or right-click it and add it to your browser favorites to keep it handy.
 
-<MTMarkdownOptions output='raw'>
-<a href="javascript:var%20d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://%%site.server%%/%%site.path%%/index.php?action=newnotice',l=d.location,e=encodeURIComponent,g=f+'&status_textarea=%22'+((e(s))?e(s):e(document.title))+'%22 from '+l.href;function%20a(){if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=800,height=570')){l.href=g;}}a();void(0);">Post to %%site.name%%</a>
-</MTMarkdownOptions>
+<a href="javascript:var%20d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://%%site.server%%/%%site.path%%/index.php?action=newnotice',l=d.location,e=encodeURIComponent,g=f+'&amp;status_textarea=%22'+((e(s))?e(s):e(document.title))+'%22 from '+l.href;function%20a(){if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=800,height=570')){l.href=g;}}a();void(0);">Post to %%site.name%%</a>
index 31f3a4d2b335b9538e77de316f60493f1fb1df3b..c63fcd01ad8be36119a3621429fa5dc92f2892de 100644 (file)
@@ -13,7 +13,7 @@ Bugs
 ----
 
 If you think you've found a bug in the [StatusNet](http://status.net/) software,
-or if there's a new feature you'd like to see, add it into the [StatusNet bug database](http://status.net/PITS/HomePage). Don't forget to check the list of
+or if there's a new feature you'd like to see, add it into the [StatusNet bug database](http://status.net/bugs/). Don't forget to check the list of
 existing bugs to make sure it hasn't already been reported!
 
 Email
index c722a4e2cb8fcbf5ca59a4cdb2710ee05d13ec4b..631f6d9bb7c36212d935e451dc294f6f7c91f20d 100644 (file)
@@ -37,10 +37,10 @@ currently-implemented commands:
 * **help**: Show this help. List available Jabber/XMPP commands
 * **follow &lt;nickname&gt;**: Subscribe to &lt;nickname&gt;
 * **sub &lt;nickname&gt;**: Same as follow
-* **leave &lt;nickname&gt;**: Subscribe to &lt;nickname&gt;
+* **leave &lt;nickname&gt;**: Unsubscribe from &lt;nickname&gt;
 * **unsub &lt;nickname&gt;**: Same as leave
 * **d &lt;nickname&gt; &lt;text&gt;**: Send direct message to &lt;nickname&gt; with message body &lt;text&gt;
 * **get &lt;nickname&gt;**: Get last notice from &lt;nickname&gt;
 * **last &lt;nickname&gt;**: Same as 'get'
 * **whois &lt;nickname&gt;**: Get Profile info on &lt;nickname&gt;
-* **fav &lt;nickname&gt;**: Add user's last notice as a favorite
\ No newline at end of file
+* **fav &lt;nickname&gt;**: Add user's last notice as a favorite
index 45104947d6da44412671f6e319f0dcf817131893..b5fc627a096cee6247daaf495b2d9b1e29d86e61 100644 (file)
@@ -376,7 +376,7 @@ function Auth_OpenID_detectMathLibrary($exts)
         // Try to load dynamic modules.
         if (!$loaded) {
             foreach ($extension['modules'] as $module) {
-                if (@dl($module . "." . PHP_SHLIB_SUFFIX)) {
+                if (function_exists('dl') && ini_get('enable_dl') && !ini_get('safe_mode') && @dl($module . "." . PHP_SHLIB_SUFFIX)) {
                     $loaded = true;
                     break;
                 }
index 4854f12bbcd2e3ca5d4f382a16e9491da0ee611b..7232d6cbdd85dbcfe140b0d70818aecf9645cdd2 100644 (file)
@@ -349,7 +349,7 @@ function &Auth_Yadis_getXMLParser()
     foreach ($extensions as $name => $params) {
         if (!extension_loaded($name)) {
             foreach ($params['libname'] as $libname) {
-                if (@dl($libname)) {
+                if (function_exists('dl') && ini_get('enable_dl') && !ini_get('safe_mode') && @dl($libname)) {
                     $classname = $params['classname'];
                 }
             }
index 029166175c5f4b6ad07fac4bb47ea0502c7b95f9..648627b57637f34ed93ea66d226c9244cc396931 100644 (file)
@@ -199,7 +199,8 @@ class OAuthRequest {/*{{{*/
     } else {
       // collect request parameters from query string (GET) and post-data (POST) if appropriate (note: POST vars have priority)
       $req_parameters = $_GET;
-      if ($http_method == "POST" && @strstr($request_headers["Content-Type"], "application/x-www-form-urlencoded") ) {
+      if ($http_method == "POST" &&
+        ( @strstr($request_headers["Content-Type"], "application/x-www-form-urlencoded") || @strstr($_ENV["CONTENT_TYPE"], "application/x-www-form-urlencoded") )) {
         $req_parameters = array_merge($req_parameters, $_POST);
       }
 
@@ -326,7 +327,7 @@ class OAuthRequest {/*{{{*/
   public function get_normalized_http_url() {/*{{{*/
     $parts = parse_url($this->http_url);
 
-    $port = @$parts['port'];
+    $port = isset($parts['port']) ? $parts['port'] : null;
     $scheme = $parts['scheme'];
     $host = $parts['host'];
     $path = @$parts['path'];
index 4c24c6006a398f8f8ade714a87e67db58b9c7619..fcefa964a3299e5832339ce04fe2e7a1165bbf33 100644 (file)
@@ -746,7 +746,7 @@ class PEAR
     {
         if (!extension_loaded($ext)) {
             // if either returns true dl() will produce a FATAL error, stop that
-            if ((ini_get('enable_dl') != 1) || (ini_get('safe_mode') == 1)) {
+            if ((ini_get('enable_dl') != 1) || (ini_get('safe_mode') == 1) || !function_exists('dl')) {
                 return false;
             }
             if (OS_WINDOWS) {
index 7d507b6f622cea9ada872dbe1cde3c4e020586ba..0dc8f01b2f4580ba3734ec133370ec58cca33628 100644 (file)
@@ -256,7 +256,7 @@ class Services_oEmbed
 
         $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
         if (substr($code, 0, 1) != '2') {
-            throw new Services_oEmbed_Exception('Non-200 code returned');
+            throw new Services_oEmbed_Exception('Non-200 code returned. Got code ' . $code);
         }
 
         curl_close($ch);
@@ -302,8 +302,8 @@ class Services_oEmbed
 
         // Find all <link /> tags that have a valid oembed type set. We then
         // extract the href attribute for each type.
-        $regexp = '#<link([^>]*)type="' . 
-                  '(application/json|text/xml)\+oembed"([^>]*)>#i';
+        $regexp = '#<link([^>]*)type[\s\n]*=[\s\n]*"' . 
+                  '(application/json|text/xml)\+oembed"([^>]*)>#im';
 
         $m = $ret = array();
         if (!preg_match_all($regexp, $body, $m)) {
@@ -314,7 +314,7 @@ class Services_oEmbed
 
         foreach ($m[0] as $i => $link) {
             $h = array();
-            if (preg_match('/href="([^"]+)"/i', $link, $h)) {
+            if (preg_match('/[\s\n]+href[\s\n]*=[\s\n]*"([^"]+)"/im', $link, $h)) {
                 $ret[$m[2][$i]] = $h[1];
             }
         } 
@@ -347,7 +347,7 @@ class Services_oEmbed
 
         $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
         if (substr($code, 0, 1) != '2') {
-            throw new Services_oEmbed_Exception('Non-200 code returned');
+            throw new Services_oEmbed_Exception('Non-200 code returned. Got code ' . $code);
         }
 
         return $result;
index 7669778f64e68a60081da00feb564494e4f78117..362ab3cd37e1bef5cd189703f949063c99c6309c 100644 (file)
--- a/index.php
+++ b/index.php
@@ -32,7 +32,13 @@ function getPath($req)
         && array_key_exists('p', $req)) {
         return $req['p'];
     } else if (array_key_exists('PATH_INFO', $_SERVER)) {
-        return $_SERVER['PATH_INFO'];
+        $path = $_SERVER['PATH_INFO'];
+        $script = $_SERVER['SCRIPT_NAME'];
+        if (substr($path, 0, mb_strlen($script)) == $script) {
+            return substr($path, mb_strlen($script));
+        } else {
+            return $path;
+        }
     } else {
         return null;
     }
index a59b9469de67bef2bbf66596384342ebcbafccdd..30dd34496b6e9d0c5068c47f9be7825af5992701 100644 (file)
@@ -189,9 +189,9 @@ function main()
         return;
     }
     
-    if( $_GET['checklibs'] ){
+    if (isset($_GET['checklibs'])) {
         showLibs();
-    }else{
+    } else {
         if ($_SERVER['REQUEST_METHOD'] == 'POST') {
             handlePost();
         } else {
@@ -202,7 +202,7 @@ function main()
 
 function haveExternalLibrary($external_library)
 {
-    if(isset($external_library['include']) && ! include_once($external_library['include'])){
+    if(isset($external_library['include']) && ! haveIncludeFile($external_library['include'])){
         return false;
     }
     if(isset($external_library['check_function']) && ! function_exists($external_library['check_function'])){
@@ -214,6 +214,15 @@ function haveExternalLibrary($external_library)
     return true;
 }
 
+// Attempt to include a PHP file and report if it worked, while
+// suppressing the annoying warning messages on failure.
+function haveIncludeFile($filename) {
+    $old = error_reporting(error_reporting() & ~E_WARNING);
+    $ok = include_once($filename);
+    error_reporting($old);
+    return $ok;
+}
+
 function checkPrereqs()
 {
        $pass = true;
@@ -230,7 +239,7 @@ function checkPrereqs()
     }
 
     $reqs = array('gd', 'curl',
-                  'xmlwriter', 'mbstring');
+                  'xmlwriter', 'mbstring','tidy');
 
     foreach ($reqs as $req) {
         if (!checkExtension($req)) {
@@ -267,12 +276,19 @@ function checkPrereqs()
 
 function checkExtension($name)
 {
-    if (!extension_loaded($name)) {
-        if (!@dl($name.'.so')) {
-            return false;
-        }
+    if (extension_loaded($name)) {
+        return true;
+    } elseif (function_exists('dl') && ini_get('enable_dl') && !ini_get('safe_mode')) {
+       // dl will throw a fatal error if it's disabled or we're in safe mode.
+       // More fun, it may not even exist under some SAPIs in 5.3.0 or later...
+       $soname = $name . '.' . PHP_SHLIB_SUFFIX;
+       if (PHP_SHLIB_SUFFIX == 'dll') {
+               $soname = "php_" . $soname;
+       }
+       return @dl($soname);
+    } else {
+        return false;
     }
-    return true;
 }
 
 function showLibs()
@@ -301,19 +317,19 @@ E_O_T;
     foreach($absent_libraries as $library)
     {
         echo '<li>';
-        if($library['url']){
+        if(isset($library['url'])){
             echo '<a href=">'.$library['url'].'">'.htmlentities($library['name']).'</a>';
         }else{
             echo htmlentities($library['name']);
         }
         echo '<ul>';
-        if($library['deb']){
+        if(isset($library['deb'])){
             echo '<li class="deb package">deb: <a href="apt:' . urlencode($library['deb']) . '">' . htmlentities($library['deb']) . '</a></li>';
         }
-        if($library['rpm']){
+        if(isset($library['rpm'])){
             echo '<li class="rpm package">rpm: ' . htmlentities($library['rpm']) . '</li>';
         }
-        if($library['pear']){
+        if(isset($library['pear'])){
             echo '<li class="pear package">pear: ' . htmlentities($library['pear']) . '</li>';
         }
         echo '</ul>';
@@ -326,7 +342,7 @@ E_O_T;
     foreach($present_libraries as $library)
     {
         echo '<li>';
-        if($library['url']){
+        if(isset($library['url'])){
             echo '<a href=">'.$library['url'].'">'.htmlentities($library['name']).'</a>';
         }else{
             echo htmlentities($library['name']);
index fafb2c6fc4c131a2340ed2bce2fcef0e22879779..670eb498c1a63375af9c37b882c4a61b87f8af45 100644 (file)
@@ -881,6 +881,7 @@ class Action extends HTMLOutputter // lawsuit
      */
     function handle($argarray=null)
     {
+        header('Vary: Accept-Encoding,Cookie');
         $lm   = $this->lastModified();
         $etag = $this->etag();
         if ($etag) {
index 91a20b81092922abc8769df91b274ff95271dc3f..01b14f83e7a367cbe2a9ab8544a690e7a111f783 100644 (file)
@@ -114,7 +114,6 @@ class StatsCommand extends Command
 
 class FavCommand extends Command
 {
-
     var $other = null;
 
     function __construct($user, $other)
@@ -158,6 +157,108 @@ class FavCommand extends Command
 
         $channel->output($this->user, _('Notice marked as fave.'));
     }
+
+}
+class JoinCommand extends Command
+{
+    var $other = null;
+
+    function __construct($user, $other)
+    {
+        parent::__construct($user);
+        $this->other = $other;
+    }
+
+    function execute($channel)
+    {
+
+        $nickname = common_canonical_nickname($this->other);
+        $group    = User_group::staticGet('nickname', $nickname);
+        $cur      = $this->user;
+
+        if (!$group) {
+            $channel->error($cur, _('No such group.'));
+            return;
+        }
+
+        if ($cur->isMember($group)) {
+            $channel->error($cur, _('You are already a member of that group'));
+            return;
+        }
+        if (Group_block::isBlocked($group, $cur->getProfile())) {
+          $channel->error($cur, _('You have been blocked from that group by the admin.'));
+            return;
+        }
+
+        $member = new Group_member();
+
+        $member->group_id   = $group->id;
+        $member->profile_id = $cur->id;
+        $member->created    = common_sql_now();
+
+        $result = $member->insert();
+        if (!$result) {
+          common_log_db_error($member, 'INSERT', __FILE__);
+          $channel->error($cur, sprintf(_('Could not join user %s to group %s'),
+                                       $cur->nickname, $group->nickname));
+          return;
+        }
+
+        $channel->output($cur, sprintf(_('%s joined group %s'),
+                                              $cur->nickname,
+                                              $group->nickname));
+    }
+
+}
+class DropCommand extends Command
+{
+    var $other = null;
+
+    function __construct($user, $other)
+    {
+        parent::__construct($user);
+        $this->other = $other;
+    }
+
+    function execute($channel)
+    {
+
+        $nickname = common_canonical_nickname($this->other);
+        $group    = User_group::staticGet('nickname', $nickname);
+        $cur      = $this->user;
+
+        if (!$group) {
+            $channel->error($cur, _('No such group.'));
+            return;
+        }
+
+        if (!$cur->isMember($group)) {
+            $channel->error($cur, _('You are not a member of that group.'));
+            return;
+        }
+
+        $member = new Group_member();
+
+        $member->group_id   = $group->id;
+        $member->profile_id = $cur->id;
+
+        if (!$member->find(true)) {
+          $channel->error($cur,_('Could not find membership record.'));
+          return;
+        }
+        $result = $member->delete();
+        if (!$result) {
+          common_log_db_error($member, 'INSERT', __FILE__);
+          $channel->error($cur, sprintf(_('Could not remove user %s to group %s'),
+                                       $cur->nickname, $group->nickname));
+          return;
+        }
+
+        $channel->output($cur, sprintf(_('%s left group %s'),
+                                              $cur->nickname,
+                                              $group->nickname));
+    }
+
 }
 
 class WhoisCommand extends Command
@@ -392,6 +493,8 @@ class HelpCommand extends Command
                            "get <nickname> - get last notice from user\n".
                            "whois <nickname> - get profile info on user\n".
                            "fav <nickname> - add user's last notice as a 'fave'\n".
+                           "join <group> - join group\n".
+                           "drop <group> - leave group\n".
                            "stats - get your stats\n".
                            "stop - same as 'off'\n".
                            "quit - same as 'off'\n".
index ac6bf73c8e6a0a816f363415fa8d24b1e1c7a16e..6e4340e5dcac05529218c6246b2aff02e35a62fa 100644 (file)
@@ -70,6 +70,26 @@ class CommandInterpreter
             } else {
                 return new OffCommand($user);
             }
+         case 'join':
+             if (!$arg) {
+                return null;
+            }
+            list($other, $extra) = explode(' ', $arg, 2);
+            if ($extra) {
+                return null;
+            } else {
+                return new JoinCommand($user, $other);
+            }
+         case 'drop':
+            if (!$arg) {
+                return null;
+            }
+            list($other, $extra) = explode(' ', $arg, 2);
+            if ($extra) {
+                return null;
+            } else {
+                return new DropCommand($user, $other);
+            }
          case 'follow':
          case 'sub':
             if (!$arg) {
index 39d4ffc9b9c3999dd715eea61b8121f8391fcec3..88d77732f4cda50508fe33e94585048baf56454c 100644 (file)
@@ -19,7 +19,7 @@
 
 if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
 
-define('STATUSNET_VERSION', '0.8.1');
+define('STATUSNET_VERSION', '0.8.2dev');
 define('LACONICA_VERSION', STATUSNET_VERSION); // compatibility
 
 define('STATUSNET_CODENAME', 'Second Guessing');
index fe42225974ff8c9d797ac83b7b3c9eb0b2a245a3..820d534f23eadc4d9ecb60d8a3d54e7067c6611e 100644 (file)
@@ -325,8 +325,9 @@ class DesignSettingsAction extends AccountSettingsAction
         parent::showScripts();
 
         $this->script('js/farbtastic/farbtastic.js');
-        $this->script('js/farbtastic/farbtastic.go.js');
         $this->script('js/userdesign.go.js');
+
+        $this->autofocus('design_background-image_file');
     }
 
     /**
index 18cc7b9295ff7d2cd127bf72a8cd132967ca2f0b..31e36803a731f1677a5f84550b92ada1ddd97ed0 100644 (file)
@@ -132,13 +132,16 @@ class GalleryAction extends OwnerDesignAction
             $this->elementEnd('li');
             $this->elementStart('li', array('id'=>'filter_tags_item'));
             $this->elementStart('form', array('name' => 'bytag',
-                                               'id' => 'bytag',
+                                               'id' => 'form_filter_bytag',
                                                'action' => common_path('?action=' . $this->trimmed('action')),
                                                'method' => 'post'));
+            $this->elementStart('fieldset');
+            $this->element('legend', null, _('Select tag to filter'));
             $this->dropdown('tag', _('Tag'), $content,
                             _('Choose a tag to narrow list'), false, $tag);
             $this->hidden('nickname', $this->user->nickname);
             $this->submit('submit', _('Go'));
+            $this->elementEnd('fieldset');
             $this->elementEnd('form');
             $this->elementEnd('li');
             $this->elementEnd('ul');
index 8ad7dc20fa3645e4e731387b96b8014614ba8643..aa01f6b1d9d268e5855864efe428027cf4aa5916 100644 (file)
@@ -412,4 +412,29 @@ class HTMLOutputter extends XMLOutputter
             $this->element('p', 'form_guide', $instructions);
         }
     }
+
+
+    /**
+    * Internal script to autofocus the given element on page onload.
+    *
+    * @param string $id element ID, must refer to an existing element
+    *
+    * @return void
+    *
+    */
+    function autofocus($id)
+    {
+        $this->elementStart('script', array('type' => 'text/javascript'));
+        $this->raw('
+        <!--
+        $(document).ready(function() {
+            var el = $("#' . $id . '");
+            if (el.length) {
+                el.focus();
+            }
+        });
+        -->
+        ');
+        $this->elementEnd('script');
+    }
 }
index df585406cc87f11744e6bd98b81557f9c52689b7..5bf4d7425693e0ce6a59b5559ed3c9254c2e90df 100644 (file)
@@ -551,9 +551,9 @@ function mail_notify_fave($other, $user, $notice)
 
     common_init_locale($other->language);
 
-    $subject = sprintf(_('%s added your notice as a favorite'), $bestname);
+    $subject = sprintf(_('%s (@%s) added your notice as a favorite'), $bestname, $user->nickname);
 
-    $body = sprintf(_("%1\$s just added your notice from %2\$s".
+    $body = sprintf(_("%1\$s (@%7\$s) just added your notice from %2\$s".
                       " as one of their favorites.\n\n" .
                       "The URL of your notice is:\n\n" .
                       "%3\$s\n\n" .
@@ -570,7 +570,8 @@ function mail_notify_fave($other, $user, $notice)
                     $notice->content,
                     common_local_url('showfavorites',
                                      array('nickname' => $user->nickname)),
-                    common_config('site', 'name'));
+                    common_config('site', 'name'),
+                    $user->nickname);
 
     common_init_locale();
     mail_to_user($other, $subject, $body);
@@ -607,9 +608,9 @@ function mail_notify_attn($user, $notice)
                $conversationUrl = null;
        }
        
-    $subject = sprintf(_('%s sent a notice to your attention'), $bestname);
+    $subject = sprintf(_('%s (@%s) sent a notice to your attention'), $bestname, $sender->nickname);
        
-       $body = sprintf(_("%1\$s just sent a notice to your attention (an '@-reply') on %2\$s.\n\n".
+       $body = sprintf(_("%1\$s (@%9\$s) just sent a notice to your attention (an '@-reply') on %2\$s.\n\n".
                       "The notice is here:\n\n".
                       "\t%3\$s\n\n" .
                       "It reads:\n\n".
@@ -629,10 +630,11 @@ function mail_notify_attn($user, $notice)
                     $notice->content,//%4
                                        $conversationUrl,//%5
                     common_local_url('newnotice',
-                                     array('replyto' => $sender->nickname)),//%6
+                                     array('replyto' => $sender->nickname, 'inreplyto' => $notice->id)),//%6
                     common_local_url('replies',
                                      array('nickname' => $user->nickname)),//%7
-                    common_local_url('emailsettings'));//%8
+                    common_local_url('emailsettings'), //%8
+                    $sender->nickname); //%9
        
     common_init_locale();
     mail_to_user($user, $subject, $body);
index 1e3a45142c678d7cdf5fd3a89a47b39303dcf709..350e37db8cc90f78c11843fef7adf80aefd880a9 100644 (file)
@@ -69,6 +69,12 @@ class NoticeForm extends Form
 
     var $user = null;
 
+    /**
+     * The notice being replied to
+     */
+
+    var $inreplyto = null;
+
     /**
      * Constructor
      *
@@ -77,12 +83,13 @@ class NoticeForm extends Form
      * @param string        $content content to pre-fill
      */
 
-    function __construct($out=null, $action=null, $content=null, $user=null)
+    function __construct($out=null, $action=null, $content=null, $user=null, $inreplyto=null)
     {
         parent::__construct($out);
 
         $this->action  = $action;
         $this->content = $content;
+        $this->inreplyto = $inreplyto;
         
         if ($user) {
             $this->user = $user;
@@ -161,7 +168,7 @@ class NoticeForm extends Form
         if ($this->action) {
             $this->out->hidden('notice_return-to', $this->action, 'returnto');
         }
-        $this->out->hidden('notice_in-reply-to', $this->action, 'inreplyto');
+        $this->out->hidden('notice_in-reply-to', $this->inreplyto, 'inreplyto');
     }
 
     /**
index ec85e4a5c1aec5c3448b3650c2dc2b88117f9512..d4cd3ff6e5d21caf08c05e00633f1ded4d00d997 100644 (file)
@@ -261,7 +261,7 @@ class NoticeListItem extends Widget
         $attrs = array('href' => $this->profile->profileurl,
                        'class' => 'url');
         if (!empty($this->profile->fullname)) {
-            $attrs['title'] = $this->profile->fullname . ' (' . $this->profile->nickname . ') ';
+            $attrs['title'] = $this->profile->fullname . ' (' . $this->profile->nickname . ')';
         }
         $this->out->elementStart('a', $attrs);
         $this->showAvatar();
@@ -418,9 +418,17 @@ class NoticeListItem extends Widget
 
     function showContext()
     {
-        // XXX: also show context if there are replies to this notice
-        if (!empty($this->notice->conversation)
-            && $this->notice->conversation != $this->notice->id) {
+        $hasConversation = false;
+        if( !empty($this->notice->conversation)
+            && $this->notice->conversation != $this->notice->id){
+            $hasConversation = true;
+        }else{
+            $conversation = Notice::conversationStream($this->notice->id, 1, 1);
+            if($conversation->N > 0){
+                $hasConversation = true;
+            }
+        }
+        if ($hasConversation){
             $convurl = common_local_url('conversation',
                                          array('id' => $this->notice->conversation));
             $this->out->element('a', array('href' => $convurl.'#notice-'.$this->notice->id,
@@ -442,7 +450,7 @@ class NoticeListItem extends Widget
     {
         if (common_logged_in()) {
             $reply_url = common_local_url('newnotice',
-                                          array('replyto' => $this->profile->nickname));
+                                          array('replyto' => $this->profile->nickname, 'inreplyto' => $this->notice->id));
             $this->out->elementStart('a', array('href' => $reply_url,
                                                 'class' => 'notice_reply',
                                                 'title' => _('Reply to this notice')));
index 0d62445991a4b5a08399217248c3556a1267c4d5..7dca760c6951da3c72e2e71132d7c6c133d12400 100644 (file)
@@ -135,7 +135,7 @@ function omb_broadcast_remote_subscribers($notice)
     $posted = array();
 
     while ($rp->fetch()) {
-        if (!$posted[$rp->postnoticeurl]) {
+        if (!array_key_exists($rp->postnoticeurl, $posted)) {
             common_log(LOG_DEBUG, 'Posting to ' . $rp->postnoticeurl);
             if (omb_post_notice_keys($notice, $rp->postnoticeurl, $rp->token, $rp->secret)) {
                 common_log(LOG_DEBUG, 'Finished to ' . $rp->postnoticeurl);
index 5309fe7530b7c77947646779801c3726422a3e73..5529e60acb82f8a59f71d079823dff6bba6086d7 100644 (file)
@@ -175,6 +175,10 @@ class Router
         $m->connect('notice/new?replyto=:replyto',
                     array('action' => 'newnotice'),
                     array('replyto' => '[A-Za-z0-9_-]+'));
+        $m->connect('notice/new?replyto=:replyto&inreplyto=:inreplyto',
+                    array('action' => 'newnotice'),
+                    array('replyto' => '[A-Za-z0-9_-]+'),
+                    array('inreplyto' => '[0-9]+'));
 
         $m->connect('notice/:notice/file',
             array('action' => 'file'),
index 0b696662c1208f49332b3ca5d681058388f381c2..b831859e993392d14de493f3ae349d9e61e919e2 100644 (file)
@@ -59,7 +59,7 @@ function common_init_language()
     textdomain("statusnet");
     setlocale(LC_CTYPE, 'C');
     if(!$locale_set) {
-        common_log(LOG_INFO,'Language requested:'.$language.' - locale could not be set:',__FILE__);
+        common_log(LOG_INFO, 'Language requested:' . $language . ' - locale could not be set. Perhaps that system locale is not installed.', __FILE__);
     }
 }
 
@@ -421,7 +421,7 @@ function common_replace_urls_callback($text, $callback, $notice_id = null) {
                     '|'.
                     '(?:(?:mailto|aim|tel|xmpp):)'.
                 ')'.
-                '(?:[\pN\pL\-\_\+]+(?::[\pN\pL\-\_\+]+)?\@)?'. //user:pass@
+                '(?:[\pN\pL\-\_\+\%\~]+(?::[\pN\pL\-\_\+\%\~]+)?\@)?'. //user:pass@
                 '(?:'.
                     '(?:'.
                         '\[[\pN\pL\-\_\:\.]+(?<![\.\:])\]'. //[dns]
@@ -432,9 +432,9 @@ function common_replace_urls_callback($text, $callback, $notice_id = null) {
             ')'.
             '|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)'. //IPv4
             '|(?:'. //IPv6
-                '\[?(?:(?:(?:[0-9A-Fa-f]{1,4}:){7}(?:(?:[0-9A-Fa-f]{1,4})|:))|(?:(?:[0-9A-Fa-f]{1,4}:){6}(?::|(?:(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})(?:\.(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})|(?::[0-9A-Fa-f]{1,4})))|(?:(?:[0-9A-Fa-f]{1,4}:){5}(?:(?::(?:(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})(?:\.(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|(?:(?::[0-9A-Fa-f]{1,4}){1,2})))|(?:(?:[0-9A-Fa-f]{1,4}:){4}(?::[0-9A-Fa-f]{1,4}){0,1}(?:(?::(?:(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})(?:\.(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|(?:(?::[0-9A-Fa-f]{1,4}){1,2})))|(?:(?:[0-9A-Fa-f]{1,4}:){3}(?::[0-9A-Fa-f]{1,4}){0,2}(?:(?::(?:(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})(?:\.(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|(?:(?::[0-9A-Fa-f]{1,4}){1,2})))|(?:(?:[0-9A-Fa-f]{1,4}:){2}(?::[0-9A-Fa-f]{1,4}){0,3}(?:(?::(?:(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})(?:\.(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|(?:(?::[0-9A-Fa-f]{1,4}){1,2})))|(?:(?:[0-9A-Fa-f]{1,4}:)(?::[0-9A-Fa-f]{1,4}){0,4}(?:(?::(?:(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})(?:\.(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|(?:(?::[0-9A-Fa-f]{1,4}){1,2})))|(?::(?::[0-9A-Fa-f]{1,4}){0,5}(?:(?::(?:(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})(?:\.(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|(?:(?::[0-9A-Fa-f]{1,4}){1,2})))|(?:(?:(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})(?:\.(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})))\]?'.
+                '\[?(?:(?:(?:[0-9A-Fa-f]{1,4}:){7}(?:(?:[0-9A-Fa-f]{1,4})|:))|(?:(?:[0-9A-Fa-f]{1,4}:){6}(?::|(?:(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})(?:\.(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})|(?::[0-9A-Fa-f]{1,4})))|(?:(?:[0-9A-Fa-f]{1,4}:){5}(?:(?::(?:(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})(?:\.(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|(?:(?::[0-9A-Fa-f]{1,4}){1,2})))|(?:(?:[0-9A-Fa-f]{1,4}:){4}(?::[0-9A-Fa-f]{1,4}){0,1}(?:(?::(?:(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})(?:\.(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|(?:(?::[0-9A-Fa-f]{1,4}){1,2})))|(?:(?:[0-9A-Fa-f]{1,4}:){3}(?::[0-9A-Fa-f]{1,4}){0,2}(?:(?::(?:(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})(?:\.(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|(?:(?::[0-9A-Fa-f]{1,4}){1,2})))|(?:(?:[0-9A-Fa-f]{1,4}:){2}(?::[0-9A-Fa-f]{1,4}){0,3}(?:(?::(?:(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})(?:\.(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|(?:(?::[0-9A-Fa-f]{1,4}){1,2})))|(?:(?:[0-9A-Fa-f]{1,4}:)(?::[0-9A-Fa-f]{1,4}){0,4}(?:(?::(?:(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})(?:\.(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|(?:(?::[0-9A-Fa-f]{1,4}){1,2})))|(?::(?::[0-9A-Fa-f]{1,4}){0,5}(?:(?::(?:(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})(?:\.(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|(?:(?::[0-9A-Fa-f]{1,4}){1,2})))|(?:(?:(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})(?:\.(?:25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})))\]?(?<!:)'.
             ')|(?:'. //DNS
-                '(?:[\pN\pL\-\_\+]+(?:\:[\pN\pL\-\_\+]+)?\@)?'. //user:pass@
+                '(?:[\pN\pL\-\_\+\%\~]+(?:\:[\pN\pL\-\_\+\%\~]+)?\@)?'. //user:pass@
                 '[\pN\pL\-\_]+(?:\.[\pN\pL\-\_]+)*\.'.
                 //tld list from http://data.iana.org/TLD/tlds-alpha-by-domain.txt, also added local, loc, and onion
                 '(?:AC|AD|AE|AERO|AF|AG|AI|AL|AM|AN|AO|AQ|AR|ARPA|AS|ASIA|AT|AU|AW|AX|AZ|BA|BB|BD|BE|BF|BG|BH|BI|BIZ|BJ|BM|BN|BO|BR|BS|BT|BV|BW|BY|BZ|CA|CAT|CC|CD|CF|CG|CH|CI|CK|CL|CM|CN|CO|COM|COOP|CR|CU|CV|CX|CY|CZ|DE|DJ|DK|DM|DO|DZ|EC|EDU|EE|EG|ER|ES|ET|EU|FI|FJ|FK|FM|FO|FR|GA|GB|GD|GE|GF|GG|GH|GI|GL|GM|GN|GOV|GP|GQ|GR|GS|GT|GU|GW|GY|HK|HM|HN|HR|HT|HU|ID|IE|IL|IM|IN|INFO|INT|IO|IQ|IR|IS|IT|JE|JM|JO|JOBS|JP|KE|KG|KH|KI|KM|KN|KP|KR|KW|KY|KZ|LA|LB|LC|LI|LK|LR|LS|LT|LU|LV|LY|MA|MC|MD|ME|MG|MH|MIL|MK|ML|MM|MN|MO|MOBI|MP|MQ|MR|MS|MT|MU|MUSEUM|MV|MW|MX|MY|MZ|NA|NAME|NC|NE|NET|NF|NG|NI|NL|NO|NP|NR|NU|NZ|OM|ORG|PA|PE|PF|PG|PH|PK|PL|PM|PN|PR|PRO|PS|PT|PW|PY|QA|RE|RO|RS|RU|RW|SA|SB|SC|SD|SE|SG|SH|SI|SJ|SK|SL|SM|SN|SO|SR|ST|SU|SV|SY|SZ|TC|TD|TEL|TF|TG|TH|TJ|TK|TL|TM|TN|TO|TP|TR|TRAVEL|TT|TV|TW|TZ|UA|UG|UK|US|UY|UZ|VA|VC|VE|VG|VI|VN|VU|WF|WS|XN--0ZWM56D|测试|XN--11B5BS3A9AJ6G|परीक्षा|XN--80AKHBYKNJ4F|испытание|XN--9T4B11YI5A|테스트|XN--DEBA0AD|טעסט|XN--G6W251D|測試|XN--HGBK6AJ7F53BBA|آزمایشی|XN--HLCJ6AYA9ESC7A|பரிட்சை|XN--JXALPDLP|δοκιμή|XN--KGBECHTV|إختبار|XN--ZCKZAH|テスト|YE|YT|YU|ZA|ZM|ZW|local|loc|onion)'.
@@ -442,13 +442,13 @@ function common_replace_urls_callback($text, $callback, $notice_id = null) {
         ')'.
         '(?:'.
             '(?:\:\d+)?'. //:port
-            '(?:/[\pN\pL$\[\]\,\!\(\)\.\-\_\+\/\=\&\;]*)?'. // /path
-            '(?:\?[\pN\pL\$\[\]\,\!\(\)\.\-\_\+\/\=\&\;\/]*)?'. // ?query string
-            '(?:\#[\pN\pL$\[\]\,\!\(\)\.\-\_\+\/\=\&\;\/\?\#]*)?'. // #fragment
+            '(?:/[\pN\pL$\[\]\,\!\(\)\.\:\-\_\+\/\=\&\;\%\~\*\$\+\'\"@]*)?'. // /path
+            '(?:\?[\pN\pL\$\[\]\,\!\(\)\.\:\-\_\+\/\=\&\;\%\~\*\$\+\'\"@\/]*)?'. // ?query string
+            '(?:\#[\pN\pL$\[\]\,\!\(\)\.\:\-\_\+\/\=\&\;\%\~\*\$\+\'\"\@/\?\#]*)?'. // #fragment
         ')(?<![\?\.\,\#\,])'.
     ')'.
     '#ixu';
-    preg_match_all($regex,$text,$matches);
+    //preg_match_all($regex,$text,$matches);
     //print_r($matches);
     return preg_replace_callback($regex, curry('callback_helper',$callback,$notice_id) ,$text);
 }
@@ -552,12 +552,13 @@ function common_linkify($url) {
     }
 
     if (!empty($f)) {
-        if (isset($f->filename)) {
+        if ($f->isEnclosure()) {
             $is_attachment = true;
             $attachment_id = $f->id;
-        } else { // if it has OEmbed info, it's an attachment, too
+        } else {
             $foe = File_oembed::staticGet('file_id', $f->id);
             if (!empty($foe)) {
+                // if it has OEmbed info, it's an attachment, too
                 $is_attachment = true;
                 $attachment_id = $f->id;
 
index dfadea0045c0887a2078f8f68bb00e7e116a995b..3eff685a8dff5c002e5a161f48de506764992760 100644 (file)
@@ -1,38 +1,37 @@
 $(document).ready(function(){
-    $.getJSON($('address .url')[0].href+'/api/statuses/friends.json?user_id=' + current_user['id'] + '&lite=true&callback=?',
-        function(friends){
-            $('#notice_data-text').autocomplete(friends, {
+            $('#notice_data-text').autocomplete($('address .url')[0].href+'/plugins/Autocomplete/autocomplete.json', {
                 multiple: true,
                 multipleSeparator: " ",
                 minChars: 1,
                 formatItem: function(row, i, max){
-                    return '@' + row.screen_name + ' (' + row.name + ')';
+                    row = eval("(" + row + ")");
+                    switch(row.type)
+                    {
+                        case 'user':
+                            return row.nickname + ' (' + row.fullname + ')';
+                        case 'group':
+                            return row.nickname + ' (' + row.fullname + ')';
+                    }
                 },
                 formatMatch: function(row, i, max){
-                    return '@' + row.screen_name;
+                    row = eval("(" + row + ")");
+                    switch(row.type)
+                    {
+                        case 'user':
+                            return row.nickname;
+                        case 'group':
+                            return row.nickname;
+                    }
                 },
                 formatResult: function(row){
-                    return '@' + row.screen_name;
+                    row = eval("(" + row + ")");
+                    switch(row.type)
+                    {
+                        case 'user':
+                            return '@' + row.nickname;
+                        case 'group':
+                            return '!' + row.nickname;
+                    }
                 }
             });
-        }
-    );
-    $.getJSON($('address .url')[0].href+'/api/statusnet/groups/list.json?user_id=' + current_user['id'] + '&callback=?',
-        function(groups){
-            $('#notice_data-text').autocomplete(groups, {
-                multiple: true,
-                multipleSeparator: " ",
-                minChars: 1,
-                formatItem: function(row, i, max){
-                    return '!' + row.nickname + ' (' + row.fullname + ')';
-                },
-                formatMatch: function(row, i, max){
-                    return '!' + row.nickname;
-                },
-                formatResult: function(row){
-                    return '!' + row.nickname;
-                }
-            });
-        }
-    );
 });
index b7539727030c76d83d309c655e1d0c24fb835eec..baaec73c1672f770e83798946456af1788d3a52d 100644 (file)
@@ -31,6 +31,8 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
+require_once(INSTALLDIR.'/plugins/Autocomplete/autocomplete.php');
+
 class AutocompletePlugin extends Plugin
 {
     function __construct()
@@ -40,13 +42,6 @@ class AutocompletePlugin extends Plugin
 
     function onEndShowScripts($action){
         if (common_logged_in()) {
-            $current_user = common_current_user();
-            $js_string = <<<EOT
-<script type="text/javascript">
-var current_user = { id: '$current_user->id' };
-</script>
-EOT;
-            $action->raw($js_string);
             $action->script('plugins/Autocomplete/jquery-autocomplete/jquery.autocomplete.pack.js');
             $action->script('plugins/Autocomplete/Autocomplete.js');
         }
@@ -59,5 +54,12 @@ EOT;
         }
     }
 
+    function onRouterInitialized($m)
+    {
+        if (common_logged_in()) {
+            $m->connect('plugins/Autocomplete/autocomplete.json', array('action'=>'autocomplete'));
+        }
+    }
+
 }
 ?>
diff --git a/plugins/Autocomplete/autocomplete.php b/plugins/Autocomplete/autocomplete.php
new file mode 100644 (file)
index 0000000..aa57b39
--- /dev/null
@@ -0,0 +1,136 @@
+<?php
+/**
+ * StatusNet, the distributed open-source microblogging tool
+ *
+ * List users for autocompletion
+ *
+ * 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>
+ * @copyright 2008-2009 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/
+ */
+
+if (!defined('STATUSNET') && !defined('LACONICA')) {
+    exit(1);
+}
+
+/**
+ * List users for autocompletion
+ *
+ * This is the form for adding a new g
+ *
+ * @category Plugin
+ * @package  StatusNet
+ * @author   Craig Andrews <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/
+ */
+
+class AutocompleteAction extends Action
+{
+    private $result;
+
+    /**
+     * Last-modified date for page
+     *
+     * When was the content of this page last modified? Based on notice,
+     * profile, avatar.
+     *
+     * @return int last-modified date as unix timestamp
+     */
+    function lastModified()
+    {
+        $max=0;
+        foreach($this->users as $user){
+            $max = max($max,strtotime($user->modified),strtotime($user->profile->modified));
+        }
+        foreach($this->groups as $group){
+            $max = max($max,strtotime($group->modified));
+        }
+        return $max;
+    }
+
+    /**
+     * An entity tag for this page
+     *
+     * Shows the ETag for the page, based on the notice ID and timestamps
+     * for the notice, profile, and avatar. It's weak, since we change
+     * the date text "one hour ago", etc.
+     *
+     * @return string etag
+     */
+    function etag()
+    {
+        return '"' . implode(':', array($this->arg('action'),
+            crc32($this->arg('q')), //the actual string can have funny characters in we don't want showing up in the etag
+            $this->arg('limit'),
+            $this->lastModified())) . '"';
+    }
+
+    function prepare($args)
+    {
+        parent::prepare($args);
+        $this->groups=array();
+        $this->users=array();
+        $q = $this->arg('q');
+        $limit = $this->arg('limit');
+        if($limit > 200) $limit=200; //prevent DOS attacks
+        if(substr($q,0,1)=='@'){
+            //user search
+            $q=substr($q,1);
+            $user = new User();
+            $user->limit($limit);
+            $user->whereAdd('nickname like \'' . trim($user->escape($q), '\'') . '%\'');
+            $user->find();
+            while($user->fetch()) {
+                $profile = Profile::staticGet($user->id);
+                $user->profile=$profile;
+                $this->users[]=$user;
+            }
+        }
+        if(substr($q,0,1)=='!'){
+            //group search
+            $q=substr($q,1);
+            $group = new User_group();
+            $group->limit($limit);
+            $group->whereAdd('nickname like \'' . trim($group->escape($q), '\'') . '%\'');
+            $group->find();
+            while($group->fetch()) {
+                $this->groups[]=$group;
+            }
+        }
+        return true;
+    }
+
+    function handle($args)
+    {
+        parent::handle($args);
+        $results = array();
+        foreach($this->users as $user){
+            $results[]=array('nickname' => $user->nickname, 'fullname'=> $user->profile->fullname, 'type'=>'user');
+        }
+        foreach($this->groups as $group){
+            $results[]=array('nickname' => $group->nickname, 'fullname'=> $group->fullname, 'type'=>'group');
+        }
+        foreach($results as $result) {
+            print json_encode($result) . "\n";
+        }
+    }
+}
index 3272aa1eefb24cf9710b711e43bf525538987948..1db4c65658b256dd1e39def966b8cf633e528e5b 100644 (file)
@@ -1,5 +1,7 @@
 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
index c955298cb934f4d1b9f27c146fa3e03e0e8a28bc..5928c007fe1a3991f8fa64290bace4c496329c2b 100644 (file)
@@ -40,7 +40,7 @@ class InfiniteScrollPlugin extends Plugin
 
     function onEndShowScripts($action)
     {
-        $action->script('plugins/InfiniteScroll/jquery.infinitescroll.min.js');
+        $action->script('plugins/InfiniteScroll/jquery.infinitescroll.js');
         $action->script('plugins/InfiniteScroll/infinitescroll.js');
     }
 }
index 6513072d0655e9e7fe3971402ab846bec8c73fa8..ae4d53d09593fc215e65f9f4353e1b71289dd7d5 100644 (file)
@@ -1,6 +1,7 @@
 jQuery(document).ready(function($){
   $('notices_primary').infinitescroll({
     debug: true,
+    infiniteScroll  : false,
     nextSelector    : "li.nav_next a",
     loadingImg      : $('address .url')[0].href+'plugins/InfiniteScroll/ajax-loader.gif',
     text            : "<em>Loading the next set of posts...</em>",
@@ -12,4 +13,3 @@ jQuery(document).ready(function($){
         NoticeAttachments();
     });
 });
-
index 670686b0e69578aa2989dc92998ad6bd281d5bb5..ec31bb0863af40b06a27f6ab18ef408f7dceab8f 100644 (file)
     
         if (props.isDuringAjax || props.isInvalidPage || props.isDone) return; 
     
-               if ( !isNearBottom(opts,props) ) return; 
+               if ( opts.infiniteScroll && !isNearBottom(opts,props) ) return; 
                  
                // we dont want to fire the ajax multiple times
                props.isDuringAjax = true; 
                
                // show the loading message and hide the previous/next links
                props.loadingMsg.appendTo( opts.contentSelector ).show();
-               $( opts.navSelector ).hide(); 
+               if(opts.infiniteScroll) $( opts.navSelector ).hide(); 
                
                // increment the URL bit. e.g. /page/3/
                props.currPage++;
       } 
     });
     
-    // bind scroll handler to element (if its a local scroll) or window  
-    $(opts.localMode ? this : window)
-      .bind('scroll.infscr', function(){ infscrSetup(path,opts,props,callback); } )
-      .trigger('scroll.infscr'); // trigger the event, in case it's a short page
+    if(opts.infiniteScroll){
+      // bind scroll handler to element (if its a local scroll) or window  
+      $(opts.localMode ? this : window)
+        .bind('scroll.infscr', function(){ infscrSetup(path,opts,props,callback); } )
+        .trigger('scroll.infscr'); // trigger the event, in case it's a short page
+    }else{
+      $(opts.nextSelector).click(
+        function(){
+          infscrSetup(path,opts,props,callback);
+          return false;
+        }
+      );
+    }
     
     
     return this;
   $.infinitescroll = {     
         defaults      : {
                           debug           : false,
+                          infiniteScroll  : true,
                           preload         : false,
                           nextSelector    : "div.navigation a:first",
                           loadingImg      : "http://www.infinite-scroll.com/loading.gif",
index c49f70de0d54d0598e71d735233bfc51c86cfe59..60f7a60c797f60e80b9914f20a1403eefdeb4aaa 100644 (file)
@@ -75,6 +75,8 @@ class LinkbackPlugin extends Plugin
 
     function linkbackUrl($url)
     {
+        common_log(LOG_DEBUG,"Attempting linkback for " . $url);
+
         $orig = $url;
         $url = htmlspecialchars_decode($orig);
         $scheme = parse_url($url, PHP_URL_SCHEME);
@@ -134,15 +136,20 @@ class LinkbackPlugin extends Plugin
                                                                "User-Agent: " . $this->userAgent(),
                                                                'content' => $request)));
         $file = file_get_contents($endpoint, false, $context);
-        $response = xmlrpc_decode($file);
-        if (xmlrpc_is_fault($response)) {
+        if (!$file) {
             common_log(LOG_WARNING,
+                      "Pingback request failed for '$url' ($endpoint)");
+        } else {
+            $response = xmlrpc_decode($file);
+            if (xmlrpc_is_fault($response)) {
+                common_log(LOG_WARNING,
                        "Pingback error for '$url' ($endpoint): ".
                        "$response[faultString] ($response[faultCode])");
-        } else {
-            common_log(LOG_INFO,
+            } else {
+                common_log(LOG_INFO,
                        "Pingback success for '$url' ($endpoint): ".
                        "'$response'");
+            }
         }
     }
 
index 2e688336f1d19624590d47ddeac6f65117907e2f..9ce68775bf8ba1ebd89efc05f90605a753487231 100644 (file)
@@ -1,5 +1,6 @@
-// update the local timeline from a Meteor server
-//
+// Update the local timeline from a Meteor server
+// XXX: If @a is subscribed to @b, @a should get @b's notices in @a's Personal timeline.
+//      Do Replies timeline.
 
 var MeteorUpdater = function()
 {
index e36bd1c5c341c16fbe22bc3e91183a255d1e1617..54faa0bdbefee085216495efbef62a1e825dcf33 100644 (file)
@@ -38,22 +38,16 @@ if (!defined('STATUSNET')) {
  * This plugin will spoot out the correct JavaScript spell to invoke
  * Piwik Analytics on a page.
  *
- * To use this plugin please add the following three lines to your config.php
+ * To use this plugin add the following to your config.php
  *
- *     require_once('plugins/PiwikAnalyticsPlugin.php');
- *     $pa = new PiwikAnalyticsPlugin("example.com/piwik/","id");
+ *  addPlugin('PiwikAnalytics', array('piwikroot' => 'example.com/piwik/',
+ *                                    'piwikId' => 'id'));
  *
- * exchange example.com/piwik/ with the url to your piwik installation and
- * make sure you don't forget the final /
- * exchange id with the ID your statusnet installation has in your Piwik analytics
+ * Replace 'example.com/piwik/' with the URL to your Piwik installation and
+ * make sure you don't forget the final /.
+ * Replace 'id' with the ID your statusnet installation has in your Piwik
+ * analytics setup - for example '8'.
  *
- * @category Plugin
- * @package  StatusNet
- * @author   Tobias Diekershoff <tobias.diekershoff@gmx.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      Event
  */
 
 class PiwikAnalyticsPlugin extends Plugin
@@ -73,7 +67,7 @@ class PiwikAnalyticsPlugin extends Plugin
     function __construct($root=null, $id=null)
     {
         $this->piwikroot = $root;
-        $this->piwikid   = $id;
+        $this->piwikId   = $id;
         parent::__construct();
     }
 
index 82eca3d08c0d1cd67700ee69394563af534d5a73..e30c4115676b3740205af9caec39936a7b1c03eb 100644 (file)
@@ -50,6 +50,11 @@ class RealtimePlugin extends Plugin
     protected $favorurl = null;
     protected $deleteurl = null;
 
+    /**
+     * When it's time to initialize the plugin, calculate and
+     * pass the URLs we need.
+     */
+
     function onInitializePlugin()
     {
         $this->replyurl = common_local_url('newnotice');
@@ -57,29 +62,26 @@ class RealtimePlugin extends Plugin
         // FIXME: need to find a better way to pass this pattern in
         $this->deleteurl = common_local_url('deletenotice',
                                             array('notice' => '0000000000'));
+        return true;
     }
 
     function onEndShowScripts($action)
     {
-        $path = null;
+        $timeline = $this->_getTimeline($action);
 
-        switch ($action->trimmed('action')) {
-         case 'public':
-            $path = array('public');
-            break;
-         case 'tag':
-            $tag = $action->trimmed('tag');
-            if (!empty($tag)) {
-                $path = array('tag', $tag);
-            } else {
-                return true;
-            }
-            break;
-         default:
+        // If there's not a timeline on this page,
+        // just return true
+
+        if (empty($timeline)) {
             return true;
         }
 
-        $timeline = $this->_pathToChannel($path);
+        $base = $action->selfUrl();
+        if (mb_strstr($base, '?')) {
+            $url = $base . '&realtime=1';
+        } else {
+            $url = $base . '?realtime=1';
+        }
 
         $scripts = $this->_getScripts();
 
@@ -95,10 +97,22 @@ class RealtimePlugin extends Plugin
             $user_id = 0;
         }
 
+        if ($action->boolean('realtime')) {
+            $realtimeUI = ' RealtimeUpdate.initPopupWindow();';
+        }
+        else {
+            $iconurl = common_path('plugins/Realtime/icon_external.gif');
+            $realtimeUI = ' RealtimeUpdate.addPopup("'.$url.'", "'.$timeline.'", "'. $iconurl .'");';
+        }
+
         $action->elementStart('script', array('type' => 'text/javascript'));
-        $action->raw("$(document).ready(function() { ");
-        $action->raw($this->_updateInitialize($timeline, $user_id));
-        $action->raw(" });");
+
+        $script = ' $(document).ready(function() { '.
+          $realtimeUI.
+          $this->_updateInitialize($timeline, $user_id).
+          '}); ';
+        $action->raw($script);
+
         $action->elementEnd('script');
 
         return true;
@@ -108,13 +122,23 @@ class RealtimePlugin extends Plugin
     {
         $paths = array();
 
-        // XXX: Add other timelines; this is just for the public one
+        // Add to the author's timeline
+
+        $user = User::staticGet('id', $notice->profile_id);
+
+        if (!empty($user)) {
+            $paths[] = array('showstream', $user->nickname);
+        }
+
+        // Add to the public timeline
 
         if ($notice->is_local ||
             ($notice->is_local == 0 && !common_config('public', 'localonly'))) {
             $paths[] = array('public');
         }
 
+        // Add to the tags timeline
+
         $tags = $this->getNoticeTags($notice);
 
         if (!empty($tags)) {
@@ -123,6 +147,46 @@ class RealtimePlugin extends Plugin
             }
         }
 
+        // Add to inbox timelines
+        // XXX: do a join
+
+        $inbox = new Notice_inbox();
+        $inbox->notice_id = $notice->id;
+
+        if ($inbox->find()) {
+            while ($inbox->fetch()) {
+                $user = User::staticGet('id', $inbox->user_id);
+                $paths[] = array('all', $user->nickname);
+            }
+        }
+
+        // Add to the replies timeline
+
+        $reply = new Reply();
+        $reply->notice_id = $notice->id;
+
+        if ($reply->find()) {
+            while ($reply->fetch()) {
+                $user = User::staticGet('id', $reply->profile_id);
+                if (!empty($user)) {
+                    $paths[] = array('replies', $user->nickname);
+                }
+            }
+        }
+
+        // Add to the group timeline
+        // XXX: join
+
+        $gi = new Group_inbox();
+        $gi->notice_id = $notice->id;
+
+        if ($gi->find()) {
+            while ($gi->fetch()) {
+                $ug = User_group::staticGet('id', $gi->group_id);
+                $paths[] = array('showgroup', $ug->nickname);
+            }
+        }
+
         if (count($paths) > 0) {
 
             $json = $this->noticeAsJson($notice);
@@ -140,6 +204,39 @@ class RealtimePlugin extends Plugin
         return true;
     }
 
+    function onStartShowBody($action)
+    {
+        $realtime = $action->boolean('realtime');
+        if (!$realtime) {
+            return true;
+        }
+
+        $action->elementStart('body',
+                              (common_current_user()) ? array('id' => $action->trimmed('action'),
+                                                              'class' => 'user_in')
+                              : array('id' => $action->trimmed('action')));
+
+        $action->elementStart('div', array('id' => 'header'));
+
+        // XXX hack to deal with JS that tries to get the
+        // root url from page output
+
+        $action->elementStart('address');
+        $action->element('a', array('class' => 'url',
+                                  'href' => common_local_url('public')),
+                         '');
+        $action->elementEnd('address');
+
+        if (common_logged_in()) {
+            $action->showNoticeForm();
+        }
+        $action->elementEnd('div');
+
+        $action->showContentBlock();
+        $action->elementEnd('body');
+        return false; // No default processing
+    }
+
     function noticeAsJson($notice)
     {
         // FIXME: this code should be abstracted to a neutral third
@@ -224,4 +321,41 @@ class RealtimePlugin extends Plugin
     {
         return '';
     }
+
+    function _getTimeline($action)
+    {
+        $path = null;
+        $timeline = null;
+
+        $action_name = $action->trimmed('action');
+
+        switch ($action_name) {
+         case 'public':
+            $path = array('public');
+            break;
+         case 'tag':
+            $tag = $action->trimmed('tag');
+            if (!empty($tag)) {
+                $path = array('tag', $tag);
+            }
+            break;
+         case 'showstream':
+         case 'all':
+         case 'replies':
+         case 'showgroup':
+            $nickname = common_canonical_nickname($action->trimmed('nickname'));
+            if (!empty($nickname)) {
+                $path = array($action_name, $nickname);
+            }
+            break;
+         default:
+            break;
+        }
+
+        if (!empty($path)) {
+            $timeline = $this->_pathToChannel($path);
+        }
+
+        return $timeline;
+    }
 }
diff --git a/plugins/Realtime/icon_external.gif b/plugins/Realtime/icon_external.gif
new file mode 100644 (file)
index 0000000..c4118d5
Binary files /dev/null and b/plugins/Realtime/icon_external.gif differ
diff --git a/plugins/Realtime/jquery.getUrlParam.js b/plugins/Realtime/jquery.getUrlParam.js
new file mode 100644 (file)
index 0000000..e8f73eb
--- /dev/null
@@ -0,0 +1,72 @@
+/* Copyright (c) 2006-2007 Mathias Bank (http://www.mathias-bank.de)
+ * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
+ * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
+ * 
+ * Version 2.1
+ * 
+ * Thanks to 
+ * Hinnerk Ruemenapf - http://hinnerk.ruemenapf.de/ for bug reporting and fixing.
+ * Tom Leonard for some improvements
+ * 
+ */
+jQuery.fn.extend({
+/**
+* Returns get parameters.
+*
+* If the desired param does not exist, null will be returned
+*
+* To get the document params:
+* @example value = $(document).getUrlParam("paramName");
+* 
+* To get the params of a html-attribut (uses src attribute)
+* @example value = $('#imgLink').getUrlParam("paramName");
+*/ 
+ getUrlParam: function(strParamName){
+         strParamName = escape(unescape(strParamName));
+         
+         var returnVal = new Array();
+         var qString = null;
+         
+         if ($(this).attr("nodeName")=="#document") {
+               //document-handler
+               
+               if (window.location.search.search(strParamName) > -1 ){
+                       
+                       qString = window.location.search.substr(1,window.location.search.length).split("&");
+               }
+                       
+         } else if ($(this).attr("src")!="undefined") {
+               
+               var strHref = $(this).attr("src")
+               if ( strHref.indexOf("?") > -1 ){
+               var strQueryString = strHref.substr(strHref.indexOf("?")+1);
+                       qString = strQueryString.split("&");
+               }
+         } else if ($(this).attr("href")!="undefined") {
+               
+               var strHref = $(this).attr("href")
+               if ( strHref.indexOf("?") > -1 ){
+               var strQueryString = strHref.substr(strHref.indexOf("?")+1);
+                       qString = strQueryString.split("&");
+               }
+         } else {
+               return null;
+         }
+               
+         
+         if (qString==null) return null;
+         
+         
+         for (var i=0;i<qString.length; i++){
+                       if (escape(unescape(qString[i].split("=")[0])) == strParamName){
+                               returnVal.push(qString[i].split("=")[1]);
+                       }
+                       
+         }
+         
+         
+         if (returnVal.length==0) return null;
+         else if (returnVal.length==1) return returnVal[0];
+         else return returnVal;
+       }
+});
\ No newline at end of file
index d55db585922a10dedb8c83bbbdce9cb946f0d2f9..a31565177fe3f1b04646de996f92904fd0dcbc9b 100644 (file)
@@ -1,8 +1,8 @@
 // add a notice encoded as JSON into the current timeline
 //
+// TODO: i18n
 
 RealtimeUpdate = {
-
      _userid: 0,
      _replyurl: '',
      _favorurl: '',
@@ -10,10 +10,10 @@ RealtimeUpdate = {
 
      init: function(userid, replyurl, favorurl, deleteurl)
      {
-          RealtimeUpdate._userid = userid;
-          RealtimeUpdate._replyurl = replyurl;
-          RealtimeUpdate._favorurl = favorurl;
-          RealtimeUpdate._deleteurl = deleteurl;
+        RealtimeUpdate._userid = userid;
+        RealtimeUpdate._replyurl = replyurl;
+        RealtimeUpdate._favorurl = favorurl;
+        RealtimeUpdate._deleteurl = deleteurl;
      },
 
      receive: function(data)
@@ -21,7 +21,7 @@ RealtimeUpdate = {
           id = data.id;
 
           // Don't add it if it already exists
-
+          //
           if ($("#notice-"+id).length > 0) {
                return;
           }
@@ -50,30 +50,19 @@ RealtimeUpdate = {
                "<p class=\"entry-content\">"+html+"</p>"+
                "</div>"+
                "<div class=\"entry-content\">"+
-               "<dl class=\"timestamp\">"+
-               "<dt>Published</dt>"+
-               "<dd>"+
-               "<a rel=\"bookmark\" href=\""+data['url']+"\" >"+
+               "<a class=\"timestamp\" rel=\"bookmark\" href=\""+data['url']+"\" >"+
                "<abbr class=\"published\" title=\""+data['created_at']+"\">a few seconds ago</abbr>"+
                "</a> "+
-               "</dd>"+
-               "</dl>"+
-               "<dl class=\"device\">"+
-               "<dt>From</dt> "+
-               "<dd>"+source+"</dd>"+ // may have a link, I think
-               "</dl>";
-
+               "<span class=\"source\">"+
+               "from "+
+                "<span class=\"device\">"+source+"</span>"+ // may have a link
+               "</span>";
           if (data['in_reply_to_status_id']) {
-               ni = ni+" <dl class=\"response\">"+
-                    "<dt>To</dt>"+
-                    "<dd>"+
-                    "<a href=\""+data['in_reply_to_status_url']+"\" rel=\"in-reply-to\">in reply to</a>"+
-                    "</dd>"+
-                    "</dl>";
+               ni = ni+" <a class=\"response\" href=\""+data['in_reply_to_status_url']+"\">in context</a>";
           }
 
           ni = ni+"</div>"+
-               "<div class=\"notice-options\">";
+            "<div class=\"notice-options\">";
 
           if (RealtimeUpdate._userid != 0) {
                var input = $("form#form_notice fieldset input#token");
@@ -95,12 +84,12 @@ RealtimeUpdate = {
           var ff;
 
           ff = "<form id=\"favor-"+id+"\" class=\"form_favor\" method=\"post\" action=\""+RealtimeUpdate._favorurl+"\">"+
-               "<fieldset>"+
-               "<legend>Favor this notice</legend>"+ // XXX: i18n
+                "<fieldset>"+
+               "<legend>Favor this notice</legend>"+
                "<input name=\"token-"+id+"\" type=\"hidden\" id=\"token-"+id+"\" value=\""+session_key+"\"/>"+
                "<input name=\"notice\" type=\"hidden\" id=\"notice-n"+id+"\" value=\""+id+"\"/>"+
                "<input type=\"submit\" id=\"favor-submit-"+id+"\" name=\"favor-submit-"+id+"\" class=\"submit\" value=\"Favor\" title=\"Favor this notice\"/>"+
-               "</fieldset>"+
+                "</fieldset>"+
                "</form>";
           return ff;
      },
@@ -108,28 +97,51 @@ RealtimeUpdate = {
      makeReplyLink: function(id, nickname)
      {
           var rl;
-          rl = "<dl class=\"notice_reply\">"+
-               "<dt>Reply to this notice</dt>"+
-               "<dd>"+
-               "<a href=\""+RealtimeUpdate._replyurl+"?replyto="+nickname+"\" title=\"Reply to this notice\">Reply <span class=\"notice_id\">"+id+"</span>"+
-               "</a>"+
-               "</dd>"+
-               "</dl>";
+          rl = "<a class=\"notice_reply\" href=\""+RealtimeUpdate._replyurl+"?replyto="+nickname+"\" title=\"Reply to this notice\">Reply <span class=\"notice_id\">"+id+"</span></a>";
           return rl;
-     },
+        },
 
      makeDeleteLink: function(id)
      {
           var dl, delurl;
           delurl = RealtimeUpdate._deleteurl.replace("0000000000", id);
 
-          dl = "<dl class=\"notice_delete\">"+
-               "<dt>Delete this notice</dt>"+
-               "<dd>"+
-               "<a href=\""+delurl+"\" title=\"Delete this notice\">Delete</a>"+
-               "</dd>"+
-               "</dl>";
+          dl = "<a class=\"notice_delete\" href=\""+delurl+"\" title=\"Delete this notice\">Delete</a>";
 
           return dl;
      },
+
+     addPopup: function(url, timeline, iconurl)
+     {
+         $('#content').prepend('<button id="realtime_timeline" title="Realtime window">Realtime</button>');
+         $('#realtime_timeline').css({
+             'margin':'0 0 18px 0',
+             'background':'transparent url('+ iconurl + ') no-repeat 0% 30%',
+             'padding':'0 0 0 20px',
+             'display':'block',
+             'float':'right',
+             'border':'none',
+             'cursor':'pointer',
+             'color':$("a").css("color"),
+             'font-weight':'bold',
+             'font-size':'1em'
+         });
+         $('#realtime_timeline').click(function() {
+             window.open(url,
+                         timeline,
+                         'toolbar=no,resizable=yes,scrollbars=yes,status=yes');
+             return false;
+         });
+     },
+
+     initPopupWindow: function()
+     {
+         window.resizeTo(575, 640);
+         $('address').hide();
+         $('#content').css({'width':'92%'});
+     }
 }
+
index ce23a269538768b1bb773370a342cb4e2e323e3d..b996f96cc33c911052e283a5f8ecfc6b8bb50d04 100644 (file)
@@ -6,7 +6,7 @@ Use:
 1. Get an API key from http://recaptcha.net
 
 2. In config.php add:
-include_once('plugins/recaptcha.php');
+include_once('plugins/recaptcha/recaptcha.php');
 $captcha = new recaptcha(publickey, privatekey, showErrors);
 
 Changelog
index 2cb7525eaf64ce2d9fea91dc795083a3eb119df0..b30e700a1c4a298a0633701932ebe824d511649e 100755 (executable)
@@ -19,8 +19,6 @@
  */
 
 define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
-define('STATUSNET', true);
-define('LACONICA', true); // compatibility
 
 $shortoptions = 'di::';
 $longoptions = array('id::', 'debug');
index 992141f9de43220189f4c674f5a7d2b7cb1e28cc..ce4d824d0d31938f3445a9058e2706004be89419 100755 (executable)
@@ -19,8 +19,6 @@
  */
 
 define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
-define('STATUSNET', true);
-define('LACONICA', true); // compatibility
 
 $shortoptions = 'i::';
 $longoptions = array('id::');
index 6dca6f75b8902cae2013777a15d7641da6c0a429..3cdf1867a197319c486d61bab7c19d8edf735fd8 100755 (executable)
@@ -19,8 +19,6 @@
  */
 
 define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
-define('STATUSNET', true);
-define('LACONICA', true); // compatibility
 
 // Tune number of processes and how often to poll Twitter
 // XXX: Should these things be in config.php?
index 767f895bbae4c3c1ec8d7af169a19b95910d4066..1c3f7cd96f073d64a8eede2527f61af14ef5aaef 100644 (file)
@@ -25,14 +25,38 @@ class URLDetectionTest extends PHPUnit_Framework_TestCase
     static public function provider()
     {
         return array(
+                     array('not a link :: no way',
+                           'not a link :: no way'),
+                     array('link http://www.somesite.com/xyz/35637563@N00/52803365/ link',
+                           'link <a href="http://www.somesite.com/xyz/35637563@N00/52803365/" rel="external">http://www.somesite.com/xyz/35637563@N00/52803365/</a> link'),
                      array('http://127.0.0.1',
                            '<a href="http://127.0.0.1/" rel="external">http://127.0.0.1</a>'),
                      array('127.0.0.1',
                            '<a href="http://127.0.0.1/" rel="external">127.0.0.1</a>'),
                      array('127.0.0.1:99',
                            '<a href="http://127.0.0.1:99/" rel="external">127.0.0.1:99</a>'),
-                     array('127.0.0.1/test.php',
-                           '<a href="http://127.0.0.1/test.php" rel="external">127.0.0.1/test.php</a>'),
+                     array('127.0.0.1/Name:test.php',
+                           '<a href="http://127.0.0.1/Name:test.php" rel="external">127.0.0.1/Name:test.php</a>'),
+                     array('127.0.0.1/~test',
+                           '<a href="http://127.0.0.1/~test" rel="external">127.0.0.1/~test</a>'),
+                     array('127.0.0.1/+test',
+                           '<a href="http://127.0.0.1/+test" rel="external">127.0.0.1/+test</a>'),
+                     array('127.0.0.1/$test',
+                           '<a href="http://127.0.0.1/$test" rel="external">127.0.0.1/$test</a>'),
+                     array('127.0.0.1/\'test',
+                           '<a href="http://127.0.0.1/\'test" rel="external">127.0.0.1/\'test</a>'),
+                     array('127.0.0.1/"test',
+                           '<a href="http://127.0.0.1/&quot;test" rel="external">127.0.0.1/&quot;test</a>'),
+                     array('127.0.0.1/-test',
+                           '<a href="http://127.0.0.1/-test" rel="external">127.0.0.1/-test</a>'),
+                     array('127.0.0.1/_test',
+                           '<a href="http://127.0.0.1/_test" rel="external">127.0.0.1/_test</a>'),
+                     array('127.0.0.1/!test',
+                           '<a href="http://127.0.0.1/!test" rel="external">127.0.0.1/!test</a>'),
+                     array('127.0.0.1/*test',
+                           '<a href="http://127.0.0.1/*test" rel="external">127.0.0.1/*test</a>'),
+                     array('127.0.0.1/test%20stuff',
+                           '<a href="http://127.0.0.1/test%20stuff" rel="external">127.0.0.1/test%20stuff</a>'),
                      array('http://[::1]:99/test.php',
                            '<a href="http://[::1]:99/test.php" rel="external">http://[::1]:99/test.php</a>'),
                      array('http://::1/test.php',
index 6f1a29f4aa67a1bd950165fe980cfa61c6df9d57..1f37a7637bc8e69ab5fc3ce4a0caad5ab119a0c1 100644 (file)
@@ -156,7 +156,8 @@ font-weight:bold;
 #form_notice_delete legend,
 #form_password_recover legend,
 #form_password_change legend,
-.form_entity_block legend {
+.form_entity_block legend,
+#form_filter_bytag legend {
 display:none;
 }
 
@@ -510,6 +511,7 @@ margin-top:7px;
 margin-bottom:7px;
 margin-left:18px;
 float:left;
+max-width:322px;
 }
 #form_notice .error,
 #form_notice .success {
@@ -1049,36 +1051,37 @@ display:none;
 #filter_tags ul {
 list-style-type:none;
 }
-#filter_tags ul li {
+#filter_tags li {
 float:left;
 margin-left:7px;
 padding-left:7px;
 border-left-width:1px;
 border-left-style:solid;
 }
-#filter_tags ul li.child_1 {
+#filter_tags #filter_tags_all {
 margin-left:0;
 border-left:0;
 padding-left:0;
 }
-#filter_tags ul li#filter_tags_all a {
+#filter_tags_all a {
 font-weight:bold;
 margin-top:7px;
 float:left;
 }
 
-#filter_tags ul li#filter_tags_item label {
+#filter_tags_item label {
 margin-right:7px;
 }
-#filter_tags ul li#filter_tags_item label,
-#filter_tags ul li#filter_tags_item select {
-display:inline;
+#filter_tags_item label,
+#filter_tags_item select {
+float:left;
 }
-#filter_tags ul li#filter_tags_item p {
+#filter_tags_item p {
 float:left;
+clear:both;
 margin-left:38px;
 }
-#filter_tags ul li#filter_tags_item input {
+#filter_tags_item .submit {
 position:relative;
 top:3px;
 left:3px;
index 5245ea5d2ffec57558770a3628a5d3e84598f6a0..6357e55b4e23805fb50376303ec172fe9b105e27 100644 (file)
@@ -849,6 +849,10 @@ float:left;
 font-size:1.025em;
 }
 
+.notice div.entry-content .timestamp {
+display:inline-block;
+}
+
 .notice div.entry-content dl,
 .notice div.entry-content dt,
 .notice div.entry-content dd {
@@ -866,15 +870,12 @@ display:inline-block;
 text-transform:lowercase;
 }
 
-
 .notice-options {
-padding-left:2%;
-float:left;
-width:50%;
 position:relative;
 font-size:0.95em;
-width:12.5%;
+width:90px;
 float:right;
+margin-right:11px;
 }
 
 .notice-options a {
@@ -897,38 +898,28 @@ left:29px;
 .notice-options .notice_delete {
 right:0;
 }
-.notice-options .notice_reply dt {
-display:none;
-}
-
 .notice-options input,
 .notice-options a {
 text-indent:-9999px;
 outline:none;
 }
-
-.notice-options .notice_reply a,
 .notice-options input.submit {
 display:block;
 border:0;
 }
-.notice-options .notice_reply a,
-.notice-options .notice_delete {
+.notice-options .notice_reply,
+.notice-options .notice_delete {
 text-decoration:none;
 padding-left:16px;
 }
-
 .notice-options form input.submit {
 width:16px;
 padding:2px 0;
 }
-
-.notice-options .notice_delete dt,
 .notice-options .form_favor legend,
 .notice-options .form_disfavor legend {
 display:none;
 }
-.notice-options .notice_delete fieldset,
 .notice-options .form_favor fieldset,
 .notice-options .form_disfavor fieldset {
 border:0;
index 240060b104fe4a8cdf3084c58c9df280a5522405..7ea4515769f4d1ec26f767ea75ecbba6a5bff510 100644 (file)
@@ -30,10 +30,10 @@ font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
 }
 input, textarea, select,
 .entity_remote_subscribe {
-border-color:#aaa;
+border-color:#AAAAAA;
 }
 #filter_tags ul li {
-border-color:#ddd;
+border-color:#DDDDDD;
 }
 
 .form_settings input.form_action-primary {
@@ -50,11 +50,14 @@ background-color:#9BB43E;
 input:focus, textarea:focus, select:focus,
 #form_notice.warning #notice_data-text {
 border-color:#9BB43E;
+box-shadow:3px 3px 3px rgba(194, 194, 194, 0.3);
+-moz-box-shadow:3px 3px 3px rgba(194, 194, 194, 0.3);
+-webkit-box-shadow:3px 3px 3px rgba(194, 194, 194, 0.3);
 }
 input.submit,
 .entity_remote_subscribe,
 #site_nav_local_views a {
-color:#fff;
+color:#FFFFFF;
 }
 
 a,
@@ -62,10 +65,13 @@ a,
 div.notice-options input,
 .form_user_block input.submit,
 .form_user_unblock input.submit,
+.form_group_block input.submit,
+.form_group_unblock input.submit,
 .entity_send-a-message a,
 .form_user_nudge input.submit,
 .entity_nudge p,
-.form_settings input.form_action-primary {
+.form_settings input.form_action-primary,
+.form_make_admin input.submit {
 color:#002E6E;
 }
 
@@ -82,13 +88,6 @@ border-top-color:#CEE1E9;
 border-top-color:#87B4C8;
 }
 
-#content .notice p.entry-content a:visited {
-background-color:#fcfcfc;
-}
-#content .notice p.entry-content .vcard a {
-background-color:#fcfffc;
-}
-
 .aside .section {
 background-color:#F1F5F8;
 background-position:100% 0;
@@ -97,10 +96,10 @@ background-repeat:no-repeat;
 }
 
 #notice_text-count {
-color:#333;
+color:#333333;
 }
 #form_notice.warning #notice_text-count {
-color:#000;
+color:#000000;
 }
 #form_notice label[for=notice_data-attach] {
 background:transparent url(../../base/images/icons/twotone/green/clip-01.gif) no-repeat 0 45%;
@@ -109,28 +108,43 @@ background:transparent url(../../base/images/icons/twotone/green/clip-01.gif) no
 opacity:0;
 }
 
-#form_notice.processing #notice_action-submit {
-background:#fff url(../../base/images/icons/icon_processing.gif) no-repeat 47% 47%;
+#wrap form.processing input.submit {
+background:#FFFFFF url(../../base/images/icons/icon_processing.gif) no-repeat 47% 47%;
 cursor:wait;
 text-indent:-9999px;
+outline:none;
 }
 
+#content {
+box-shadow:5px 7px 7px rgba(194, 194, 194, 0.3);
+-moz-box-shadow:5px 7px 7px rgba(194, 194, 194, 0.3);
+-webkit-box-shadow:5px 7px 7px rgba(194, 194, 194, 0.3);
+}
 #content,
 #site_nav_local_views a,
 .aside .section {
-border-color:#fff;
+border-color:#FFFFFF;
 }
 #content,
 #site_nav_local_views .current a {
-background-color:#fff;
+background-color:#FFFFFF;
 }
 
+#site_nav_local_views li {
+box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5);
+-moz-box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5);
+-webkit-box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5);
+}
 #site_nav_local_views a {
-background-color:rgba(135, 180, 200, 0.3);
+background-color:rgba(194, 194, 194, 0.5);
 }
 #site_nav_local_views a:hover {
 background-color:rgba(255, 255, 255, 0.7);
 }
+#site_nav_local_views .current a {
+text-shadow: rgba(194,194,194,0.5) 1px 1px 1px;
+}
+
 
 .error {
 background-color:#F7E8E8;
@@ -140,10 +154,7 @@ background-color:#EFF3DC;
 }
 
 #anon_notice {
-color:#fff;
-}
-
-#showstream #anon_notice {
+color:#FFFFFF;
 }
 
 #export_data li a {
@@ -165,7 +176,10 @@ background-image:url(../../base/images/icons/icon_foaf.gif);
 .form_user_nudge input.submit,
 .form_user_block input.submit,
 .form_user_unblock input.submit,
-.entity_nudge p {
+.form_group_block input.submit,
+.form_group_unblock input.submit,
+.entity_nudge p,
+.form_make_admin input.submit {
 background-position: 0 40%;
 background-repeat: no-repeat;
 background-color:transparent;
@@ -175,7 +189,7 @@ background-color:transparent;
 .form_user_subscribe input.submit,
 .form_user_unsubscribe input.submit {
 background-color:#9BB43E;
-color:#fff;
+color:#FFFFFF;
 }
 .form_user_unsubscribe input.submit,
 .form_group_leave input.submit,
@@ -194,20 +208,23 @@ background-image:url(../../base/images/icons/twotone/green/quote.gif);
 background-image:url(../../base/images/icons/twotone/green/mail.gif);
 }
 .form_user_block input.submit,
-.form_user_unblock input.submit {
+.form_user_unblock input.submit,
+.form_group_block input.submit,
+.form_group_unblock input.submit {
 background-image:url(../../base/images/icons/twotone/green/shield.gif);
 }
+.form_make_admin input.submit {
+background-image:url(../../base/images/icons/twotone/green/admin.gif);
+}
 
 /* NOTICES */
-.notices li.over {
-background-color:#fcfcfc;
+.notice .attachment {
+background:transparent url(../../base/images/icons/twotone/green/clip-02.gif) no-repeat 0 45%;
 }
-
-.notice-options .notice_reply a,
-.notice-options form input.submit {
-background-color:transparent;
+#attachments .attachment {
+background:none;
 }
-.notice-options .notice_reply {
+.notice-options .notice_reply {
 background:transparent url(../../base/images/icons/twotone/green/reply.gif) no-repeat 0 45%;
 }
 .notice-options form.form_favor input.submit {
@@ -216,7 +233,7 @@ background:transparent url(../../base/images/icons/twotone/green/favourite.gif)
 .notice-options form.form_disfavor input.submit {
 background:transparent url(../../base/images/icons/twotone/green/disfavourite.gif) no-repeat 0 45%;
 }
-.notice-options .notice_delete {
+.notice-options .notice_delete {
 background:transparent url(../../base/images/icons/twotone/green/trash.gif) no-repeat 0 45%;
 }
 
@@ -224,19 +241,32 @@ background:transparent url(../../base/images/icons/twotone/green/trash.gif) no-r
 .notices div.notice-options {
 opacity:0.4;
 }
-.notices li.hover div.entry-content,
-.notices li.hover div.notice-options {
+.notices li:hover div.entry-content,
+.notices li:hover div.notice-options {
 opacity:1;
 }
-div.entry-content {
-color:#333;
-}
 div.notice-options a,
 div.notice-options input {
 font-family:sans-serif;
 }
-.notices li.hover {
-background-color:#fcfcfc;
+#content .notices li:hover {
+background-color:rgba(240, 240, 240, 0.2);
+}
+#conversation .notices li:hover {
+background-color:transparent;
+}
+
+.notices .notices {
+background-color:rgba(200, 200, 200, 0.050);
+}
+.notices .notices .notices {
+background-color:rgba(200, 200, 200, 0.100);
+}
+.notices .notices .notices .notices {
+background-color:rgba(200, 200, 200, 0.150);
+}
+.notices .notices .notices .notices .notices {
+background-color:rgba(200, 200, 200, 0.300);
 }
 /*END: NOTICES */
 
index fdead6c4a0a23614552329ee68bb0860b0200a0c..550d373fef4005342c4e1daa7cb2c115db54f46c 100644 (file)
Binary files a/theme/biz/logo.png and b/theme/biz/logo.png differ
index 3851bc057ac02576fd5a7a033c41b6c27b4acb23..3fe05eb3dd6520c4b6b1a489fc65a9d272644bc0 100644 (file)
@@ -120,6 +120,10 @@ float:left;
 margin-left:11px;
 float:left;
 }
+.form_settings .form_data textarea {
+width:325px;
+}
+
 .form_settings .form_data input.submit {
 margin-left:0;
 }
@@ -968,9 +972,6 @@ right:7px;
 top:47px;
 right:7px;
 }
-.notice-options .notice_reply dt {
-display:none;
-}
 
 .notice-options input,
 .notice-options a {
@@ -978,13 +979,13 @@ text-indent:-9999px;
 outline:none;
 }
 
-.notice-options .notice_reply a,
+.notice-options .notice_reply,
 .notice-options input.submit {
 display:block;
 border:0;
 }
-.notice-options .notice_reply a,
-.notice-options .notice_delete {
+.notice-options .notice_reply,
+.notice-options .notice_delete {
 text-decoration:none;
 padding-left:16px;
 }
@@ -1375,6 +1376,12 @@ padding-top:160px;
 #smssettings #form_notice,
 #twittersettings #form_notice,
 #imsettings #form_notice,
+#userdesignsettings #form_notice,
+#groupdesignsettings #form_notice,
+#grouplogo #form_notice,
+#editgroup #form_notice,
+#blockedfromgroup #form_notice,
+#groupmembers #form_notice,
 #doc #form_notice,
 #usergroups #form_notice,
 #invite #form_notice,
@@ -1584,11 +1591,11 @@ background:transparent url(../../base/images/icons/twotone/green/clip-02.gif) no
 background:none;
 }
 
-.notice-options .notice_reply a,
+.notice-options .notice_reply,
 .notice-options form input.submit {
 background-color:transparent;
 }
-.notice-options .notice_reply {
+.notice-options .notice_reply {
 background:transparent url(../images/icons/icon_reply.gif) no-repeat 0 45%;
 }
 .notice-options form.form_favor input.submit {
@@ -1597,7 +1604,7 @@ background:transparent url(../images/icons/icon_favourite.gif) no-repeat 0 45%;
 .notice-options form.form_disfavor input.submit {
 background:transparent url(../images/icons/icon_disfavourite.gif) no-repeat 0 45%;
 }
-.notice-options .notice_delete {
+.notice-options .notice_delete {
 background:transparent url(../images/icons/icon_trash.gif) no-repeat 0 45%;
 }
 
index fdead6c4a0a23614552329ee68bb0860b0200a0c..550d373fef4005342c4e1daa7cb2c115db54f46c 100644 (file)
Binary files a/theme/cloudy/logo.png and b/theme/cloudy/logo.png differ
index a1c4a2171d3bc59cf5e9feb746eb7f9f46432042..86369cb9935d64f82f9757f1bdf81a398e5e8742 100644 (file)
@@ -94,10 +94,11 @@ background:transparent url(../../base/images/icons/twotone/green/clip-01.gif) no
 opacity:0;
 }
 
-#form_notice.processing #notice_action-submit {
+#wrap form.processing input.submit {
 background:#FFFFFF url(../../base/images/icons/icon_processing.gif) no-repeat 47% 47%;
 cursor:wait;
 text-indent:-9999px;
+outline:none;
 }
 
 #content {
@@ -223,10 +224,6 @@ background:transparent url(../../base/images/icons/twotone/green/favourite.gif)
 .notice-options form.form_disfavor input.submit {
 background:transparent url(../../base/images/icons/twotone/green/disfavourite.gif) no-repeat 0 45%;
 }
-.notice-options form.form_favor.processing input.submit,
-.notice-options form.form_disfavor.processing input.submit {
-background:transparent url(../../base/images/icons/icon_processing.gif) no-repeat 0 45%;
-}
 .notice-options .notice_delete {
 background:transparent url(../../base/images/icons/twotone/green/trash.gif) no-repeat 0 45%;
 }
index fdead6c4a0a23614552329ee68bb0860b0200a0c..550d373fef4005342c4e1daa7cb2c115db54f46c 100644 (file)
Binary files a/theme/h4ck3r/logo.png and b/theme/h4ck3r/logo.png differ
index 51286657ec88fae6b1c2500964eb998a82a9050c..9fc97180d4e997cccbac55d70b5237c1bdec1f7f 100644 (file)
@@ -94,10 +94,11 @@ background:transparent url(../../base/images/icons/twotone/green/clip-01.gif) no
 opacity:0;
 }
 
-#form_notice.processing #notice_action-submit {
+#wrap form.processing input.submit {
 background:#FFFFFF url(../../base/images/icons/icon_processing.gif) no-repeat 47% 47%;
 cursor:wait;
 text-indent:-9999px;
+outline:none;
 }
 
 #content {
index fdead6c4a0a23614552329ee68bb0860b0200a0c..550d373fef4005342c4e1daa7cb2c115db54f46c 100644 (file)
Binary files a/theme/pigeonthoughts/logo.png and b/theme/pigeonthoughts/logo.png differ