]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Moved group create API into its own action
authorZach Copley <zach@status.net>
Mon, 12 Oct 2009 19:31:14 +0000 (12:31 -0700)
committerZach Copley <zach@status.net>
Mon, 12 Oct 2009 19:31:14 +0000 (12:31 -0700)
Merge branch '0.9.x' into refactor-api

* 0.9.x:
  Implemented create group api
  fix FBConnect so it doesn't muffle EndPrimaryNav
  don't write session if it's unchanged
  Fixed facebook connect primary nav to hide search option when site is private and user is not logged in
  Fixed facebook connect primary nav to obey sms/twitter/openid settings
  Fixed facebook connect login nav to obey openid settings
  Fixed facebook connect nav to obey sms/twitter disabled
  Fixed twitter defaulting to disabled
  Revert "Open tags should have closing tags"
  Don't show search suggestions for private sites
  Fixed E_NOTICE when returnto isn't set
  Fixed E_NOTICE when the "lite" parameter isn't included in the request
  Fixed E_NOTICE - GroupList expects an owner object in the constructor, not an array of search terms
  Returning false seems to fix IE from reclaiming window focus. I think
  Aligning notice attach label from right instead of left
  Fixed IE background image alignment for attach, favour and disfavour
  Fixed nudge and direct message background image alignment
  Using 'CSS sprites' for common icons for the identica theme. Default
  Open tags should have closing tags

Conflicts:
actions/twitapigroups.php
actions/twitapistatuses.php

16 files changed:
actions/apigroupcreate.php [new file with mode: 0644]
actions/groupsearch.php
classes/Session.php
lib/api.php
lib/default.php
lib/router.php
lib/searchaction.php
lib/util.php
plugins/FBConnect/FBCLoginGroupNav.php
plugins/FBConnect/FBCSettingsNav.php
plugins/FBConnect/FBConnectPlugin.php
plugins/Realtime/realtimeupdate.js
theme/base/css/display.css
theme/base/images/icons/icons-01.png [new file with mode: 0644]
theme/identica/css/display.css
theme/identica/css/ie.css

diff --git a/actions/apigroupcreate.php b/actions/apigroupcreate.php
new file mode 100644 (file)
index 0000000..d6340ee
--- /dev/null
@@ -0,0 +1,360 @@
+<?php
+/**
+ * StatusNet, the distributed open-source microblogging tool
+ *
+ * Create a group via the API
+ *
+ * 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  API
+ * @package   StatusNet
+ * @author    Craig Andrews <candrews@integralblue.com>
+ * @author    Zach Copley <zach@status.net>
+ * @copyright 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')) {
+    exit(1);
+}
+
+require_once INSTALLDIR . '/lib/apiauth.php';
+
+/**
+ * Make a new group. Sets the authenticated user as the administrator of the group.
+ *
+ * @category API
+ * @package  StatusNet
+ * @author   Zach Copley <zach@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/
+ */
+
+class ApiGroupCreateAction extends ApiAuthAction
+{
+    var $group       = null;
+    var $nickname    = null;
+    var $fullname    = null;
+    var $homepage    = null;
+    var $description = null;
+    var $location    = null;
+    var $aliasstring = null;
+    var $aliases     = null;
+
+    /**
+     * Take arguments for running
+     *
+     * @param array $args $_REQUEST args
+     *
+     * @return boolean success flag
+     *
+     */
+
+    function prepare($args)
+    {
+        parent::prepare($args);
+
+        $this->user  = $this->auth_user;
+
+        $this->nickname    = $this->arg('nickname');
+        $this->fullname    = $this->arg('full_name');
+        $this->homepage    = $this->arg('homepage');
+        $this->description = $this->arg('description');
+        $this->location    = $this->arg('location');
+        $this->aliasstring = $this->arg('aliases');
+
+        return true;
+    }
+
+    /**
+     * Handle the request
+     *
+     * Save the new group
+     *
+     * @param array $args $_REQUEST data (unused)
+     *
+     * @return void
+     */
+
+    function handle($args)
+    {
+        parent::handle($args);
+
+        if (!common_config('inboxes','enabled')) {
+           $this->serverError(
+               _('Inboxes must be enabled for groups to work'),
+               400,
+               $this->format
+           );
+           return false;
+        }
+
+        if ($_SERVER['REQUEST_METHOD'] != 'POST') {
+            $this->clientError(
+                _('This method requires a POST.'),
+                400,
+                $this->format
+            );
+            return;
+        }
+
+        if (empty($this->user)) {
+            $this->clientError(_('No such user!'), 404, $this->format);
+            return;
+        }
+
+        if ($this->validateParams() == false) {
+            return;
+        }
+
+        $group = new User_group();
+
+        $group->query('BEGIN');
+
+        $group->nickname    = $this->nickname;
+        $group->fullname    = $this->fullname;
+        $group->homepage    = $this->homepage;
+        $group->description = $this->description;
+        $group->location    = $this->location;
+        $group->created     = common_sql_now();
+
+        $result = $group->insert();
+
+        if (!$result) {
+            common_log_db_error($group, 'INSERT', __FILE__);
+            $this->serverError(
+                _('Could not create group.'),
+                500,
+                $this->format
+            );
+            return;
+        }
+
+        $result = $group->setAliases($this->aliases);
+
+        if (!$result) {
+            $this->serverError(
+                _('Could not create aliases.'),
+                500,
+                $this->format
+            );
+            return;
+        }
+
+        $member = new Group_member();
+
+        $member->group_id   = $group->id;
+        $member->profile_id = $this->user->id;
+        $member->is_admin   = 1;
+        $member->created    = $group->created;
+
+        $result = $member->insert();
+
+        if (!$result) {
+            common_log_db_error($member, 'INSERT', __FILE__);
+            $this->serverError(
+                _('Could not set group membership.'),
+                500,
+                $this->format
+            );
+            return;
+        }
+
+        $group->query('COMMIT');
+
+        switch($this->format) {
+        case 'xml':
+            $this->showSingleXmlGroup($group);
+            break;
+        case 'json':
+            $this->showSingleJsonGroup($group);
+            break;
+        default:
+            $this->clientError(
+                _('API method not found!'),
+                404,
+                $this->format
+            );
+            break;
+        }
+
+    }
+
+    /**
+     * Validate params for the new group
+     *
+     * @return void
+     */
+
+    function validateParams()
+    {
+        if (!Validate::string(
+            $this->nickname, array(
+                'min_length' => 1,
+                'max_length' => 64,
+                'format' => NICKNAME_FMT)
+                )
+            )
+        {
+            $this->clientError(
+                _(
+                    'Nickname must have only lowercase letters ' .
+                    'and numbers and no spaces.'
+                ),
+                403,
+                $this->format
+            );
+            return false;
+        } elseif ($this->groupNicknameExists($this->nickname)) {
+            $this->clientError(
+                _('Nickname already in use. Try another one.'),
+                403,
+                $this->format
+            );
+            return false;
+        } else if (!User_group::allowedNickname($this->nickname)) {
+            $this->clientError(
+                _('Not a valid nickname.'),
+                403,
+                $this->format
+            );
+            return false;
+
+        } elseif (!is_null($this->homepage)
+            && strlen($this->homepage) > 0
+            && !Validate::uri(
+                $this->homepage, array(
+                    'allowed_schemes' =>
+                    array('http', 'https')
+                )
+            ))
+        {
+            $this->clientError(
+                _('Homepage is not a valid URL.'),
+                403,
+                $this->format
+            );
+            return false;
+        } elseif (!is_null($this->fullname)
+            && mb_strlen($this->fullname) > 255)
+            {
+                $this->clientError(
+                    _('Full name is too long (max 255 chars).'),
+                    403,
+                    $this->format
+                );
+            return false;
+        } elseif (User_group::descriptionTooLong($this->description)) {
+            $this->clientError(sprintf(
+                _('Description is too long (max %d chars).'),
+                    User_group::maxDescription()),
+                    403,
+                    $this->format
+                );
+            return false;
+        } elseif (!is_null($this->location)
+            && mb_strlen($this->location) > 255)
+            {
+                $this->clientError(
+                    _('Location is too long (max 255 chars).'),
+                    403,
+                    $this->format
+                );
+            return false;
+        }
+
+        if (!empty($this->aliasstring)) {
+            $this->aliases = array_map(
+                'common_canonical_nickname',
+                array_unique(preg_split('/[\s,]+/',
+                $this->aliasstring)
+                )
+            );
+        } else {
+            $this->aliases = array();
+        }
+
+        if (count($this->aliases) > common_config('group', 'maxaliases')) {
+            $this->clientError(
+                sprintf(_('Too many aliases! Maximum %d.'),
+                    common_config('group', 'maxaliases')),
+                    403,
+                    $this->format
+                );
+            return false;
+        }
+
+        foreach ($this->aliases as $alias) {
+            if (!Validate::string($alias, array(
+                'min_length' => 1,
+                'max_length' => 64,
+                'format' => NICKNAME_FMT
+                )
+            ))
+            {
+                $this->clientError(
+                    sprintf(_('Invalid alias: "%s"'), $alias),
+                    403,
+                    $this->format
+                );
+                return false;
+            }
+            if ($this->groupNicknameExists($alias)) {
+                $this->clientError(
+                    sprintf(_('Alias "%s" already in use. Try another one.'),
+                    $alias),
+                    403,
+                    $this->format
+                );
+                return false;
+            }
+
+            // XXX assumes alphanum nicknames
+
+            if (strcmp($alias, $this->nickname) == 0) {
+                $this->clientError(
+                    _('Alias can\'t be the same as nickname.'),
+                    403,
+                    $this->format
+                );
+                return false;
+            }
+        }
+
+        // Evarything looks OK
+
+        return true;
+    }
+
+    function groupNicknameExists($nickname)
+    {
+       $group = User_group::staticGet('nickname', $nickname);
+
+       if (!empty($group)) {
+           return true;
+       }
+
+       $alias = Group_alias::staticGet('alias', $nickname);
+
+       if (!empty($alias)) {
+           return true;
+       }
+
+       return false;
+    }
+
+}
index f0cca715615aa3940b5a145507d2f915467a1a2d..55f4cee625e37b5265ea40ef490945ceceb021da 100644 (file)
@@ -105,7 +105,7 @@ class GroupSearchResults extends GroupList
 
     function __construct($user_group, $terms, $action)
     {
-        parent::__construct($user_group, $terms, $action);
+        parent::__construct($user_group, null, $action);
         $this->terms = array_map('preg_quote',
                                  array_map('htmlspecialchars', $terms));
         $this->pattern = '/('.implode('|',$terms).')/i';
index d641edbbe408af12c87bdcd32a416672429d2eeb..79a69a96ea3dc11b1f93672890f1687f2e263fa0 100644 (file)
@@ -85,9 +85,18 @@ class Session extends Memcached_DataObject
 
             return $session->insert();
         } else {
-            $session->session_data = $session_data;
+            if (strcmp($session->session_data, $session_data) == 0) {
+                self::logdeb("Not writing session '$id'; unchanged");
+                return true;
+            } else {
+                self::logdeb("Session '$id' data changed; updating");
+
+                $orig = clone($session);
+
+                $session->session_data = $session_data;
 
-            return $session->update();
+                return $session->update($orig);
+            }
         }
     }
 
index 0801d282396d55362041621ec28fe754a029e1d3..db2d24fbd5adfbf918100c8ffb8b7b665499e6f9 100644 (file)
@@ -894,7 +894,7 @@ class ApiAction extends Action
         $this->endDocument('json');
     }
 
-    function show_single_xml_group($group)
+    function showSingleXmlGroup($group)
     {
         $this->initDocument('xml');
         $twitter_group = $this->twitterGroupArray($group);
index f9670cb7f96523c1122ff6b7cbc970e6eb50f67c..329b041e9a1928ab079f6fe17f50f5cd7e3dfb07 100644 (file)
@@ -140,16 +140,15 @@ $default =
         array('enabled' => true),
         'sms' =>
         array('enabled' => true),
-        'twitter' =>
-        array('enabled' => true),
         'twitterbridge' =>
         array('enabled' => false),
         'integration' =>
         array('source' => 'StatusNet', # source attribute for Twitter
               'taguri' => $_server.',2009'), # base for tag URIs
        'twitter' =>
-       array('consumer_key'    => null,
-             'consumer_secret' => null),
+       array('enabled'       => true,
+           'consumer_key'    => null,
+           'consumer_secret' => null),
         'memcached' =>
         array('enabled' => false,
               'server' => 'localhost',
index 11f913f6e05c676ec3801c4d329e71d82055946d..b9a45d867f0b3dba00819dc7d1ee2f6b0bb8c0ea 100644 (file)
@@ -569,9 +569,13 @@ class Router
                          'format' => '(xml|json)'));
 
         $m->connect('api/statusnet/groups/membership/:id.:format',
-                     array('action' => 'ApiGroupMembership',
+                    array('action' => 'ApiGroupMembership',
                            'id' => '[a-zA-Z0-9]+',
                            'format' => '(xml|json)'));
+                           
+        $m->connect('api/statusnet/groups/create.:format',
+                    array('action' => 'ApiGroupCreate',
+                          'format' => '(xml|json)'));
         // Tags
         $m->connect('api/statusnet/tags/timeline/:tag.:format',
                     array('action' => 'ApiTimelineTag',
index 0d9f85a8f18a5f623628bfec448b68002ce9390e..130b28ff52d7f5e57cce80ac0fd5ca45ff5ddfdb 100644 (file)
@@ -135,16 +135,21 @@ class SearchAction extends Action
     }
 
     function searchSuggestions($q) {
-        $qe = urlencode($q);
-        $message = sprintf(_(<<<E_O_T
+        $message = _(<<<E_O_T
 * Make sure all words are spelled correctly.
 * Try different keywords.
 * Try more general keywords.
 * Try fewer keywords.
 
+E_O_T
+);
+        if (!common_config('site', 'private')) {
+            $qe = urlencode($q);
+            $message .= sprintf(_(<<<E_O_T
+
 You can also try your search on other engines:
 
-* [Twingly](http://www.twingly.com/search?q=%s&content=microblog&site=identi.ca)
+* [Twingly](http://www.twingly.com/search?q=%s&content=microblog&site=%%%%site.server%%%%)
 * [Tweet scan](http://www.tweetscan.com/indexi.php?s=%s)
 * [Google](http://www.google.com/search?q=site%%3A%%%%site.server%%%%+%s)
 * [Yahoo](http://search.yahoo.com/search?p=site%%3A%%%%site.server%%%%+%s)
@@ -152,6 +157,7 @@ You can also try your search on other engines:
 
 E_O_T
 ), $qe, $qe, $qe, $qe, $qe);
+        }
         $this->elementStart('dl', array('id' => 'help_search', 'class' => 'help'));
         $this->element('dt', null, _('Search help'));
         $this->elementStart('dd', 'instructions');
index d249b154fc7b17bbf5135438c30e93f4ccfcceb3..be10647fcbdde12a04eb76d4411d55e962be84e0 100644 (file)
@@ -998,7 +998,7 @@ function common_set_returnto($url)
 function common_get_returnto()
 {
     common_ensure_session();
-    return $_SESSION['returnto'];
+    return (array_key_exists('returnto', $_SESSION)) ? $_SESSION['returnto'] : null;
 }
 
 function common_timestamp()
index 6e12c20403cc0a9e5a52038d0b2e131672134102..81b2520a4c628e2830b66657878f82252cd8fe4c 100644 (file)
@@ -78,16 +78,20 @@ class FBCLoginGroupNav extends Widget
         // action => array('prompt', 'title')
         $menu = array();
 
-        $menu['login'] = array(_('Login'),
-                         _('Login with a username and password'));
-
-        if (!(common_config('site','closed') || common_config('site','inviteonly'))) {
-            $menu['register'] = array(_('Register'),
-                                _('Sign up for a new account'));
+        if (!common_config('site','openidonly')) {
+            $menu['login'] = array(_('Login'),
+                             _('Login with a username and password'));
+
+            if (!(common_config('site','closed') || common_config('site','inviteonly'))) {
+                $menu['register'] = array(_('Register'),
+                                    _('Sign up for a new account'));
+            }
         }
 
-        $menu['openidlogin'] = array(_('OpenID'),
-                               _('Login or register with OpenID'));
+        if (common_config('openid', 'enabled')) {
+            $menu['openidlogin'] = array(_('OpenID'),
+                                   _('Login or register with OpenID'));
+        }
 
         $menu['FBConnectLogin'] = array(_('Facebook'),
                                _('Login or register using Facebook'));
index 29724d6bdfa6e2227ec28b9fe468d493e148c658..ed02371e2531a12e5ea80602390451f7b3f17a5b 100644 (file)
@@ -77,32 +77,34 @@ class FBCSettingsNav extends Widget
         $this->action->elementStart('dd');
 
         # action => array('prompt', 'title')
-        $menu =
-          array('imsettings' =>
-                array(_('IM'),
-                      _('Updates by instant messenger (IM)')),
-                'smssettings' =>
-                array(_('SMS'),
-                      _('Updates by SMS')),
-                'twittersettings' =>
-                array(_('Twitter'),
-                      _('Twitter integration options')),
-                'FBConnectSettings' =>
-                array(_('Facebook'),
-                      _('Facebook Connect settings')));
+        $menu = array();
+        if (common_config('xmpp', 'enabled')) {
+            $menu['imsettings'] =
+              array(_('IM'),
+                    _('Updates by instant messenger (IM)'));
+        }
+        if (common_config('sms', 'enabled')) {
+            $menu['smssettings'] =
+              array(_('SMS'),
+                    _('Updates by SMS'));
+        }
+        if (common_config('twitter', 'enabled')) {
+            $menu['twittersettings'] =
+              array(_('Twitter'),
+                    _('Twitter integration options'));
+        }
+        $menu['FBConnectSettings'] =
+          array(_('Facebook'),
+                _('Facebook Connect settings'));
 
         $action_name = $this->action->trimmed('action');
         $this->action->elementStart('ul', array('class' => 'nav'));
 
         foreach ($menu as $menuaction => $menudesc) {
-            if ($menuaction == 'imsettings' &&
-                !common_config('xmpp', 'enabled')) {
-                continue;
-            }
             $this->action->menuItem(common_local_url($menuaction),
-                                   $menudesc[0],
-                                   $menudesc[1],
-                                   $action_name === $menuaction);
+                                    $menudesc[0],
+                                    $menudesc[1],
+                                    $action_name === $menuaction);
         }
 
         $this->action->elementEnd('ul');
index 593b49b4ed4810ec391387d0e78ffa909c60cbc6..ff74aade45b9301b1934afc45392dd207fc4151a 100644 (file)
@@ -232,6 +232,14 @@ class FBConnectPlugin extends Plugin
     {
 
         $user = common_current_user();
+        $connect = 'FBConnectSettings';
+        if (common_config('xmpp', 'enabled')) {
+            $connect = 'imsettings';
+        } else if (common_config('sms', 'enabled')) {
+            $connect = 'smssettings';
+        } else if (common_config('twitter', 'enabled')) {
+            $connect = 'twittersettings';
+        }
 
         if (!empty($user)) {
 
@@ -266,13 +274,8 @@ class FBConnectPlugin extends Plugin
                 _('Home'), _('Personal profile and friends timeline'), false, 'nav_home');
             $action->menuItem(common_local_url('profilesettings'),
                 _('Account'), _('Change your email, avatar, password, profile'), false, 'nav_account');
-            if (common_config('xmpp', 'enabled')) {
-                $action->menuItem(common_local_url('imsettings'),
-                    _('Connect'), _('Connect to IM, SMS, Twitter'), false, 'nav_connect');
-            } else {
-             $action->menuItem(common_local_url('smssettings'),
-                 _('Connect'), _('Connect to SMS, Twitter'), false, 'nav_connect');
-            }
+            $action->menuItem(common_local_url($connect),
+                _('Connect'), _('Connect to services'), false, 'nav_connect');
             if (common_config('invite', 'enabled')) {
                 $action->menuItem(common_local_url('invite'),
                     _('Invite'),
@@ -300,18 +303,30 @@ class FBConnectPlugin extends Plugin
              }
          }
          else {
-             if (!common_config('site', 'closed')) {
-                 $action->menuItem(common_local_url('register'),
-                     _('Register'), _('Create an account'), false, 'nav_register');
+             if (!common_config('site', 'openidonly')) {
+                 if (!common_config('site', 'closed')) {
+                     $action->menuItem(common_local_url('register'),
+                         _('Register'), _('Create an account'), false, 'nav_register');
+                 }
+                 $action->menuItem(common_local_url('login'),
+                     _('Login'), _('Login to the site'), false, 'nav_login');
+             } else {
+                 $this->menuItem(common_local_url('openidlogin'),
+                                 _('OpenID'), _('Login with OpenID'), false, 'nav_openid');
              }
-             $action->menuItem(common_local_url('login'),
-                 _('Login'), _('Login to the site'), false, 'nav_login');
          }
 
          $action->menuItem(common_local_url('doc', array('title' => 'help')),
              _('Help'), _('Help me!'), false, 'nav_help');
-         $action->menuItem(common_local_url('peoplesearch'),
-             _('Search'), _('Search for people or text'), false, 'nav_search');
+         if ($user || !common_config('site', 'private')) {
+             $action->menuItem(common_local_url('peoplesearch'),
+                 _('Search'), _('Search for people or text'), false, 'nav_search');
+         }
+
+        // We are replacing the primary nav entirely; give other
+        // plugins a chance to handle it here.
+
+        Event::handle('EndPrimaryNav', array($action));
 
         return false;
     }
index 11e466325ebad553a71c4bdb2c8b373c31289c7e..a75f17d8c55930e946a54fb63d0fb4a6f3590261 100644 (file)
@@ -25,6 +25,8 @@ RealtimeUpdate = {
             'border-top-color':'#AAAAAA',
             'border-top-style':'solid'
           });
+          
+          return false;
         });
      },
 
index 76709113fce9dd61cfa62c29944f2c57fd3f016a..d9dca98156c85d6e11fcc58ebe512d9e79b0daa9 100644 (file)
@@ -468,16 +468,15 @@ margin-bottom:7px;
 #form_notice #notice_data-attach {
 position:absolute;
 top:25px;
+right:10.5%;
 cursor:pointer;
 }
 #form_notice label[for=notice_data-attach] {
 text-indent:-9999px;
-left:86%;
 width:16px;
 height:16px;
 }
 #form_notice #notice_data-attach {
-left:40.6%;
 padding:0;
 height:16px;
 }
diff --git a/theme/base/images/icons/icons-01.png b/theme/base/images/icons/icons-01.png
new file mode 100644 (file)
index 0000000..c4e3713
Binary files /dev/null and b/theme/base/images/icons/icons-01.png differ
index 9fc97180d4e997cccbac55d70b5237c1bdec1f7f..6339c9314e4b6f77b816fb2d03aa7c3f0ec002e2 100644 (file)
@@ -88,7 +88,7 @@ color:#333333;
 color:#000000;
 }
 #form_notice label[for=notice_data-attach] {
-background:transparent url(../../base/images/icons/twotone/green/clip-01.gif) no-repeat 0 45%;
+background:transparent url(../../base/images/icons/icons-01.png) no-repeat 0 -328px;
 }
 #form_notice #notice_data-attach {
 opacity:0;
@@ -150,16 +150,18 @@ background-color:#9BB43E;
 
 #export_data li a {
 background-repeat:no-repeat;
-background-position:0 45%;
 }
 #export_data li a.rss {
-background-image:url(../../base/images/icons/icon_rss.png);
+background-image:url(../../base/images/icons/icons-01.png);
+background-position:0 -130px;
 }
 #export_data li a.atom {
-background-image:url(../../base/images/icons/icon_atom.png);
+background-image:url(../../base/images/icons/icons-01.png);
+background-position:0 -64px;
 }
 #export_data li a.foaf {
-background-image:url(../../base/images/icons/icon_foaf.gif);
+background-image:url(../../base/images/icons/icons-01.png);
+background-position:0 1px;
 }
 
 .entity_edit a,
@@ -171,7 +173,6 @@ background-image:url(../../base/images/icons/icon_foaf.gif);
 .form_group_unblock input.submit,
 .entity_nudge p,
 .form_make_admin input.submit {
-background-position: 0 40%;
 background-repeat: no-repeat;
 background-color:transparent;
 }
@@ -189,43 +190,48 @@ background-color:#87B4C8;
 }
 
 .entity_edit a {
-background-image:url(../../base/images/icons/twotone/green/edit.gif);
+background-image:url(../../base/images/icons/icons-01.png);
+background-position: 0 -718px;
 }
 .entity_send-a-message a {
-background-image:url(../../base/images/icons/twotone/green/quote.gif);
+background-image:url(../../base/images/icons/icons-01.png);
+background-position: 0 -849px;
 }
 .entity_nudge p,
 .form_user_nudge input.submit {
-background-image:url(../../base/images/icons/twotone/green/mail.gif);
+background-image:url(../../base/images/icons/icons-01.png);
+background-position: 0 -785px;
 }
 .form_user_block 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);
+background-image:url(../../base/images/icons/icons-01.png);
+background-position: 0 -918px;
 }
 .form_make_admin input.submit {
-background-image:url(../../base/images/icons/twotone/green/admin.gif);
+background-image:url(../../base/images/icons/icons-01.png);
+background-position: 0 -983px;
 }
 
 /* NOTICES */
 .notice .attachment {
-background:transparent url(../../base/images/icons/twotone/green/clip-02.gif) no-repeat 0 45%;
+background:transparent url(../../base/images/icons/icons-01.png) no-repeat 0 -394px;
 }
 #attachments .attachment {
 background:none;
 }
 .notice-options .notice_reply {
-background:transparent url(../../base/images/icons/twotone/green/reply.gif) no-repeat 0 45%;
+background:transparent url(../../base/images/icons/icons-01.png) no-repeat 0 -589px;
 }
 .notice-options form.form_favor input.submit {
-background:transparent url(../../base/images/icons/twotone/green/favourite.gif) no-repeat 0 45%;
+background:transparent url(../../base/images/icons/icons-01.png) no-repeat 0 -457px;
 }
 .notice-options form.form_disfavor input.submit {
-background:transparent url(../../base/images/icons/twotone/green/disfavourite.gif) no-repeat 0 45%;
+background:transparent url(../../base/images/icons/icons-01.png) no-repeat 0 -523px;
 }
 .notice-options .notice_delete {
-background:transparent url(../../base/images/icons/twotone/green/trash.gif) no-repeat 0 45%;
+background:transparent url(../../base/images/icons/icons-01.png) no-repeat 0 -655px;
 }
 
 .notices div.entry-content,
@@ -262,7 +268,7 @@ background-color:rgba(200, 200, 200, 0.300);
 /*END: NOTICES */
 
 #new_group a {
-background:transparent url(../../base/images/icons/twotone/green/news.gif) no-repeat 0 45%;
+background:transparent url(../../base/images/icons/icons-01.png) no-repeat 0 -1054px;
 }
 
 .pagination .nav_prev a,
@@ -271,10 +277,10 @@ background-repeat:no-repeat;
 border-color:#CEE1E9;
 }
 .pagination .nav_prev a {
-background-image:url(../../base/images/icons/twotone/green/arrow-left.gif);
-background-position:10% 45%;
+background-image:url(../../base/images/icons/icons-01.png);
+background-position:10% -187px;
 }
 .pagination .nav_next a {
-background-image:url(../../base/images/icons/twotone/green/arrow-right.gif);
-background-position:90% 45%;
+background-image:url(../../base/images/icons/icons-01.png);
+background-position:105% -252px;
 }
index 97cabc30a534a505d2b1ea92c6407aedd087493a..044c32ff16b0746742e902369da22a488cae8eaa 100644 (file)
@@ -7,8 +7,14 @@ color:#FFFFFF;
 background-color:#D9DADB;
 }
 #form_notice .form_note + label {
-background:transparent url(../../base/images/icons/twotone/green/clip-01.gif) no-repeat 0 45%;
+background:transparent url(../../base/images/icons/icons-01.png) no-repeat 0 -328px;
 }
 #form_notice #notice_data-attach {
 filter: alpha(opacity=0);
 }
+.notice-options form.form_favor input.submit {
+background-position:0 -460px;
+}
+.notice-options form.form_disfavor input.submit {
+background-position:0 -526px;
+}