code:
# Translation of StatusNet - ModPlus to French (français)
# Exported from translatewiki.net
#
# Author: Crochet.david
# Author: McDutchie
# Author: Od1n
# Author: Peter17
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - ModPlus\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:16+0000\n"
"Language-Team: French <https://translatewiki.net/wiki/Portal:fr>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2012-01-02 10:11:36+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: fr\n"
"X-Message-Group: #out-statusnet-plugin-modplus\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#. TRANS: Error message displayed when referring to a user without a profile.
msgid "User has no profile."
msgstr "L’utilisateur n’a pas de profil."

#. TRANS: Remote profile action page title.
#. TRANS: %1$s is a username, %2$s is a hostname.
#, php-format
msgid "%1$s on %2$s"
msgstr "%1$s sur %2$s"

#. TRANS: Message on remote profile page.
#. TRANS: This message contains Markdown links in the form [description](link).
#. TRANS: %1$s is a profile nickname, %2$s is a hostname, %3$s is a URL.
#, php-format
msgid ""
"This remote profile is registered on another site; see [%1$s's original "
"profile page on %2$s](%3$s)."
msgstr ""
"Ce profil distant est enregistré sur un autre site ; voir [la page de profil "
"originale de %1$s sur %2$s](%3$s)."

#. TRANS: Message on blocked remote profile page.
msgid ""
"Site moderators have silenced this profile, which prevents delivery of new "
"messages to any users on this site."
msgstr ""
"Les modérateurs du site ont réduit ce profil au silence, ce qui empêche "
"l’envoi de nouveaux messages aux utilisateurs de ce site."

#. TRANS: Plugin description.
msgid "UI extension for profile moderation actions."
msgstr ""
"Extensions d’interface utilisateur pour les actions de modération des "
"profils."

#. TRANS: Label for access to remote profile options.
msgid "Remote profile options..."
msgstr "Options de profil distant..."


code:
# Translation of StatusNet - ModPlus to Galician (galego)
# Exported from translatewiki.net
#
# Author: Toliño
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - ModPlus\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:16+0000\n"
"Language-Team: Galician <https://translatewiki.net/wiki/Portal:gl>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2012-01-02 10:11:36+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: gl\n"
"X-Message-Group: #out-statusnet-plugin-modplus\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Error message displayed when referring to a user without a profile.
msgid "User has no profile."
msgstr "O usuario non ten perfil."

#. TRANS: Remote profile action page title.
#. TRANS: %1$s is a username, %2$s is a hostname.
#, php-format
msgid "%1$s on %2$s"
msgstr "%1$s en %2$s"

#. TRANS: Message on remote profile page.
#. TRANS: This message contains Markdown links in the form [description](link).
#. TRANS: %1$s is a profile nickname, %2$s is a hostname, %3$s is a URL.
#, php-format
msgid ""
"This remote profile is registered on another site; see [%1$s's original "
"profile page on %2$s](%3$s)."
msgstr ""
"Este perfil remoto está rexistrado noutro sitio; bote unha ollada ao [perfil "
"orixinal de %1$s en %2$s](%3$s)."

#. TRANS: Message on blocked remote profile page.
msgid ""
"Site moderators have silenced this profile, which prevents delivery of new "
"messages to any users on this site."
msgstr ""
"Os moderadores do sitio silenciaron este perfil, o que impide o envío de "
"novas mensaxes a calquera usuario neste sitio."

#. TRANS: Plugin description.
msgid "UI extension for profile moderation actions."
msgstr ""
"Extensións de interface de usuario para as accións de moderación dos perfís."

#. TRANS: Label for access to remote profile options.
msgid "Remote profile options..."
msgstr "Opcións de perfil remoto..."

license: mit


code:
# Translation of StatusNet - ModPlus to Interlingua (interlingua)
# Exported from translatewiki.net
#
# Author: McDutchie
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - ModPlus\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:16+0000\n"
"Language-Team: Interlingua <https://translatewiki.net/wiki/Portal:ia>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2012-01-02 10:11:36+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: ia\n"
"X-Message-Group: #out-statusnet-plugin-modplus\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Error message displayed when referring to a user without a profile.
msgid "User has no profile."
msgstr "Le usator non ha un profilo."

#. TRANS: Remote profile action page title.
#. TRANS: %1$s is a username, %2$s is a hostname.
#, php-format
msgid "%1$s on %2$s"
msgstr "%1$s in %2$s"

#. TRANS: Message on remote profile page.
#. TRANS: This message contains Markdown links in the form [description](link).
#. TRANS: %1$s is a profile nickname, %2$s is a hostname, %3$s is a URL.
#, php-format
msgid ""
"This remote profile is registered on another site; see [%1$s's original "
"profile page on %2$s](%3$s)."
msgstr ""
"Iste profilo remote es registrate in un altere sito; vide [le pagina de "
"profilo original de %1$s in %2$s](%3$s)."

#. TRANS: Message on blocked remote profile page.
msgid ""
"Site moderators have silenced this profile, which prevents delivery of new "
"messages to any users on this site."
msgstr ""
"Le moderatores del sito ha silentiate iste profilo, impediente le livration "
"de nove messages al usatores de iste sito."

#. TRANS: Plugin description.
msgid "UI extension for profile moderation actions."
msgstr ""
"Extension del interfacie de usator pro actiones de moderation de profilos."

#. TRANS: Label for access to remote profile options.
msgid "Remote profile options..."
msgstr "Optiones de profilo remote..."


code:
# Translation of StatusNet - ModPlus to Italian (italiano)
# Exported from translatewiki.net
#
# Author: GreenFox
# Author: Ximo17
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - ModPlus\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:16+0000\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2012-01-02 10:11:36+0000\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Error message displayed when referring to a user without a profile.
msgid "User has no profile."
msgstr "L'utente non ha un profilo."

#. TRANS: Remote profile action page title.
#. TRANS: %1$s is a username, %2$s is a hostname.
#, php-format
msgid "%1$s on %2$s"
msgstr "%1$s su %2$s"

#. TRANS: Message on remote profile page.
#. TRANS: This message contains Markdown links in the form [description](link).
#. TRANS: %1$s is a profile nickname, %2$s is a hostname, %3$s is a URL.
#, php-format
msgid ""
"This remote profile is registered on another site; see [%1$s's original "
"profile page on %2$s](%3$s)."
msgstr ""
"Questo profilo remoto è registrato su un altro sito, visualizza [la pagina "
"del profilo originale di %1$s su %2$s] (%3$s)."

#. TRANS: Message on blocked remote profile page.
msgid ""
"Site moderators have silenced this profile, which prevents delivery of new "
"messages to any users on this site."
msgstr ""
"I moderatori del sito hanno ridotto al silenzio questo profilo, questo "
"impedisce la spedizione di nuovi messaggi verso gli utilizzatori di questo "
"sito."

#. TRANS: Plugin description.
msgid "UI extension for profile moderation actions."
msgstr ""
"Estensione dell'interfaccia utente per le azioni di moderazione del profilo."

#. TRANS: Label for access to remote profile options.
msgid "Remote profile options..."
msgstr "Opzioni di profilo remoto..."


code:
# Translation of StatusNet - ModPlus to Macedonian (македонски)
# Exported from translatewiki.net
#
# Author: Bjankuloski06
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - ModPlus\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:16+0000\n"
"Language-Team: Macedonian <https://translatewiki.net/wiki/Portal:mk>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2012-01-02 10:11:36+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: mk\n"
"X-Message-Group: #out-statusnet-plugin-modplus\n"
"Plural-Forms: nplurals=2; plural=(n == 1 || n%10 == 1) ? 0 : 1;\n"

#. TRANS: Error message displayed when referring to a user without a profile.
msgid "User has no profile."
msgstr "Корисникот нема профил."

#. TRANS: Remote profile action page title.
#. TRANS: %1$s is a username, %2$s is a hostname.
#, php-format
msgid "%1$s on %2$s"
msgstr "%1$s на %2$s"

#. TRANS: Message on remote profile page.
#. TRANS: This message contains Markdown links in the form [description](link).
#. TRANS: %1$s is a profile nickname, %2$s is a hostname, %3$s is a URL.
#, php-format
msgid ""
"This remote profile is registered on another site; see [%1$s's original "
"profile page on %2$s](%3$s)."
msgstr ""
"Овој далечински профил е регистриран на друго мреж. место. Погледајте ја "
"[изворната профилна страница на %1$s на %2$s](%3$s)."

#. TRANS: Message on blocked remote profile page.
msgid ""
"Site moderators have silenced this profile, which prevents delivery of new "
"messages to any users on this site."
msgstr ""
"Администраторите го замолчиле овој профил, што оневозможува праќање нови "
"пораки на било кој корисник на мрежното место."

#. TRANS: Plugin description.
msgid "UI extension for profile moderation actions."
msgstr ""
"Додатоци за кориснички посредник наменети за постапки за модерација на "
"профили."

#. TRANS: Label for access to remote profile options.
msgid "Remote profile options..."
msgstr "Нагодувања на далечински профил..."


code:
# Translation of StatusNet - ModPlus to Dutch (Nederlands)
# Exported from translatewiki.net
#
# Author: McDutchie
# Author: Siebrand
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - ModPlus\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:16+0000\n"
"Language-Team: Dutch <https://translatewiki.net/wiki/Portal:nl>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2012-01-02 10:11:36+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: nl\n"
"X-Message-Group: #out-statusnet-plugin-modplus\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Error message displayed when referring to a user without a profile.
msgid "User has no profile."
msgstr "Deze gebruiker heeft geen profiel."

#. TRANS: Remote profile action page title.
#. TRANS: %1$s is a username, %2$s is a hostname.
#, php-format
msgid "%1$s on %2$s"
msgstr "%1$s op %2$s"

#. TRANS: Message on remote profile page.
#. TRANS: This message contains Markdown links in the form [description](link).
#. TRANS: %1$s is a profile nickname, %2$s is a hostname, %3$s is a URL.
#, php-format
msgid ""
"This remote profile is registered on another site; see [%1$s's original "
"profile page on %2$s](%3$s)."
msgstr ""
"Dit externe profiel is geregistreerd bij een andere site. Zie [de originele "
"profielpagina van %1$s op %2$s](%3$s)."

#. TRANS: Message on blocked remote profile page.
msgid ""
"Site moderators have silenced this profile, which prevents delivery of new "
"messages to any users on this site."
msgstr ""
"Moderatoren van de site hebben dit profiel het zwijgen opgelegd, waardoor "
"het niet mogelijk is nieuwe berichten aan gebruikers van deze site te "
"verzenden."

#. TRANS: Plugin description.
msgid "UI extension for profile moderation actions."
msgstr "Uitbreiding van de gebruikersinterface voor profielmoderatie."

#. TRANS: Label for access to remote profile options.
msgid "Remote profile options..."
msgstr "Instellingen voor extern profiel..."


code:
# Translation of StatusNet - ModPlus to Tagalog (Tagalog)
# Exported from translatewiki.net
#
# Author: AnakngAraw
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - ModPlus\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:17+0000\n"
"Language-Team: Tagalog <https://translatewiki.net/wiki/Portal:tl>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2012-01-02 10:11:36+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: tl\n"
"X-Message-Group: #out-statusnet-plugin-modplus\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Error message displayed when referring to a user without a profile.
msgid "User has no profile."
msgstr "Walang balangkas ang tagagamit."

#. TRANS: Remote profile action page title.
#. TRANS: %1$s is a username, %2$s is a hostname.
#, php-format
msgid "%1$s on %2$s"
msgstr "%1$s doon sa %2$s"

#. TRANS: Message on remote profile page.
#. TRANS: This message contains Markdown links in the form [description](link).
#. TRANS: %1$s is a profile nickname, %2$s is a hostname, %3$s is a URL.
#, php-format
msgid ""
"This remote profile is registered on another site; see [%1$s's original "
"profile page on %2$s](%3$s)."
msgstr ""
"Ang malayong balangkas na ito ay nagpatala sa ibang sityo; tingnan ang "
"[pahina ng orihinal na balangkas ni %1$s doon sa %2$s](%3$s)."

#. TRANS: Message on blocked remote profile page.
msgid ""
"Site moderators have silenced this profile, which prevents delivery of new "
"messages to any users on this site."
msgstr ""
"Pinatahimik ng mga tagapamagitan ng sityo ang balangkas na ito, na "
"humahadlang sa paghahatid ng bagong mga mensahe sa sinumang mga tagagamit na "
"nasa sityong ito."

#. TRANS: Plugin description.
msgid "UI extension for profile moderation actions."
msgstr "Dugtong ng UI para sa mga galaw ng pagpapatimpi ng balangkas."

#. TRANS: Label for access to remote profile options.
msgid "Remote profile options..."
msgstr "Malayong mga mapagpipilian ng balangkas..."


code:
# Translation of StatusNet - ModPlus to Ukrainian (українська)
# Exported from translatewiki.net
#
# Author: Boogie
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - ModPlus\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:17+0000\n"
"Language-Team: Ukrainian <https://translatewiki.net/wiki/Portal:uk>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2012-01-02 10:11:36+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: uk\n"
"X-Message-Group: #out-statusnet-plugin-modplus\n"
"Plural-Forms: nplurals=3; plural=(n%10 == 1 && n%100 != 11) ? 0 : ( (n%10 >= "
"2 && n%10 <= 4 && (n%100 < 10 || n%100 >= 20)) ? 1 : 2 );\n"

#. TRANS: Error message displayed when referring to a user without a profile.
msgid "User has no profile."
msgstr "Користувач не має профілю."

#. TRANS: Remote profile action page title.
#. TRANS: %1$s is a username, %2$s is a hostname.
#, php-format
msgid "%1$s on %2$s"
msgstr "%1$s на %2$s"

#. TRANS: Message on remote profile page.
#. TRANS: This message contains Markdown links in the form [description](link).
#. TRANS: %1$s is a profile nickname, %2$s is a hostname, %3$s is a URL.
#, php-format
msgid ""
"This remote profile is registered on another site; see [%1$s's original "
"profile page on %2$s](%3$s)."
msgstr ""
"Це віддалений профіль, зареєстрований на іншому сайті; див. [справжній "
"профіль %1$s на сайті %2$s](%3$s)."

#. TRANS: Message on blocked remote profile page.
msgid ""
"Site moderators have silenced this profile, which prevents delivery of new "
"messages to any users on this site."
msgstr ""
"Модератори сайту позбавили права голосу даний профіль, що перешкоджає "
"доставці нових повідомлень для всіх користувачів на цьому сайті."

#. TRANS: Plugin description.
msgid "UI extension for profile moderation actions."
msgstr "Розширення користувацького інтерфейсу для модерування профілю."

#. TRANS: Label for access to remote profile options.
msgid "Remote profile options..."
msgstr "Опції віддаленого профілю..."


code:
<?php
/**
 * Laconica, the distributed open-source microblogging tool
 *
 * Plugin to check submitted notices with Mollom
 *
 * 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/>.
 *
 * Mollom is a bayesian spam checker, wrapped into a webservice
 * This plugin is based on the Drupal Mollom module
 *
 * @category  Plugin
 * @package   Laconica
 * @author    Brenda Wallace <brenda@cpan.org>
 * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
 *
 */

if (!defined('STATUSNET')) {
    exit(1);
}

define('MOLLOMPLUGIN_VERSION', '0.1');
define('MOLLOM_API_VERSION', '1.0');

define('MOLLOM_ANALYSIS_UNKNOWN' , 0);
define('MOLLOM_ANALYSIS_HAM'     , 1);
define('MOLLOM_ANALYSIS_SPAM'    , 2);
define('MOLLOM_ANALYSIS_UNSURE'  , 3);

define('MOLLOM_MODE_DISABLED', 0);
define('MOLLOM_MODE_CAPTCHA' , 1);
define('MOLLOM_MODE_ANALYSIS', 2);

define('MOLLOM_FALLBACK_BLOCK' , 0);
define('MOLLOM_FALLBACK_ACCEPT', 1);

define('MOLLOM_ERROR'   , 1000);
define('MOLLOM_REFRESH' , 1100);
define('MOLLOM_REDIRECT', 1200);

/**
 * Plugin to check submitted notices with Mollom
 *
 * Mollom is a bayesian spam filter provided by webservice.
 *
 * @category Plugin
 * @package  Laconica
 * @author   Brenda Wallace <shiny@cpan.org>
 * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
 *
 * @see      Event
 */
class MollomPlugin extends Plugin
{
    public $public_key;
    public $private_key;
    public $servers;

    function onStartNoticeSave($notice)
    {
      if ( $this->public_key ) {
        //Check spam
        $data = array(
            'post_body'      => $notice->content,
            'author_name'    => $profile->nickname,
            'author_url'     => $profile->homepage,
            'author_id'      => $profile->id,
            'author_ip'      => $this->getClientIp(),
        );
        $response = $this->mollom('mollom.checkContent', $data);
        if ($response['spam'] == MOLLOM_ANALYSIS_SPAM) {
          // TRANS: Client exception thrown when notice content triggers the spam filter.
          throw new ClientException(_m('Spam Detected.'), 400);
        }
        if ($response['spam'] == MOLLOM_ANALYSIS_UNSURE) {
          //if unsure, let through
        }
        if($response['spam'] == MOLLOM_ANALYSIS_HAM) {
          // all good! :-)
        }
      }

      return true;
    }

    function getClientIP() {
        if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
            // Note: order matters here; use proxy-forwarded stuff first
            foreach (array('HTTP_X_FORWARDED_FOR', 'CLIENT-IP', 'REMOTE_ADDR') as $k) {
                if (isset($_SERVER[$k])) {
                    return $_SERVER[$k];
                }
            }
        }
        return '127.0.0.1';
    }

    /**
     * Call a remote procedure at the Mollom server.  This function will
     * automatically add the information required to authenticate against
     * Mollom.
     */
    function mollom($method, $data = array()) {
        if (!extension_loaded('xmlrpc')) {
            if (!dl('xmlrpc.so')) {
                common_log(LOG_ERR, "Can't pingback; xmlrpc extension not available.");
            }
        }

      // Construct the server URL:
      $public_key = $this->public_key;
      // Retrieve the list of Mollom servers from the database:
      $servers = $this->servers;

      if ($servers == NULL) {
        // Retrieve a list of valid Mollom servers from mollom.com:
        $servers = $this->xmlrpc('http://xmlrpc.mollom.com/'. MOLLOM_API_VERSION, 'mollom.getServerList', $this->authentication());

        // Store the list of servers in the database:
        // TODO!    variable_set('mollom_servers', $servers);
      }

      if (is_array($servers)) {
        // Send the request to the first server, if that fails, try the other servers in the list:
        foreach ($servers as $server) {
          $auth = $this->authentication();
          $data = array_merge($data, $auth);
          $result = $this->xmlrpc($server .'/'. MOLLOM_API_VERSION, $method, $data);

          // Debug output:
          if (isset($data['session_id'])) {
            common_debug("called $method at server $server with session ID '". $data['session_id'] ."'");
          }
          else {
            common_debug("called $method at server $server with no session ID");
          }

          if ($errno = $this->xmlrpc_errno()) {
            common_log(LOG_ERR, sprintf('Error @errno: %s - %s - %s - <pre>%s</pre>', $this->xmlrpc_errno(), $server, $this->xmlrpc_error_msg(), $method, print_r($data, TRUE)));

            if ($errno == MOLLOM_REFRESH) {
              // Retrieve a list of valid Mollom servers from mollom.com:
              $servers = $this->xmlrpc('http://xmlrpc.mollom.com/'. MOLLOM_API_VERSION, 'mollom.getServerList', $this->authentication());

              // Store the updated list of servers in the database:
              //tODO variable_set('mollom_servers', $servers);
            }
            else if ($errno == MOLLOM_ERROR) {
              return $result;
            }
            else if ($errno == MOLLOM_REDIRECT) {
              // Do nothing, we select the next client automatically.
            }

            // Reset the XMLRPC error:
            $this->xmlrpc_error(0);  // FIXME: this is crazy.
          }
          else {
            common_debug("Result = " . print_r($result, TRUE));
            return $result;
          }
        }
      }

      // If none of the servers worked, activate the fallback mechanism:
      common_debug("none of the servers worked");
      //   _mollom_fallback();

      // If everything failed, we reset the server list to force Mollom to request a new list:
      //TODO variable_set('mollom_servers', array());
    }

    /**
     * This function generate an array with all the information required to
     * authenticate against Mollom. To prevent that requests are forged and
     * that you are impersonated, each request is signed with a hash computed
     * based on a private key and a timestamp.
     *
     * Both the client and the server share the secret key that is used to
     * create the authentication hash based on a timestamp.  They both hash
     * the timestamp with the secret key, and if the hashes match, the
     * authenticity of the message has been validated.
     *
     * To avoid that someone can intercept a (hash, timestamp)-pair and
     * use that to impersonate a client, Mollom will reject the request
     * when the timestamp is more than 15 minutes off.
     *
     * Make sure your server's time is synchronized with the world clocks,
     * and that you don't share your private key with anyone else.
     */
    private function authentication() {

      $public_key = $this->public_key;
      $private_key = $this->private_key;

      // Generate a timestamp according to the dateTime format (http://www.w3.org/TR/xmlschema-2/#dateTime):
      $time = gmdate("Y-m-d\TH:i:s.\\0\\0\\0O", time());

      // Calculate a HMAC-SHA1 according to RFC2104 (http://www.ietf.org/rfc/rfc2104.txt):
      $hash =  base64_encode(
      pack("H*", sha1((str_pad($private_key, 64, chr(0x00)) ^ (str_repeat(chr(0x5c), 64))) .
      pack("H*", sha1((str_pad($private_key, 64, chr(0x00)) ^ (str_repeat(chr(0x36), 64))) .
      $time))))
      );

      // Store everything in an array. Elsewhere in the code, we'll add the
      // acutal data before we pass it onto the XML-RPC library:
      $data['public_key'] = $public_key;
      $data['time'] = $time;
      $data['hash'] = $hash;

      return $data;
    }

    function xmlrpc($url) {
      //require_once './includes/xmlrpc.inc';
      $args = func_get_args();
      return call_user_func_array(array('MollomPlugin', '_xmlrpc'), $args);
    }

    /**
     * Recursively turn a data structure into objects with 'data' and 'type' attributes.
     *
     * @param $data
     *   The data structure.
     * @param  $type
     *   Optional type assign to $data.
     * @return
     *   Object.
     */
    function xmlrpc_value($data, $type = FALSE) {
      $xmlrpc_value = new stdClass();
      $xmlrpc_value->data = $data;
      if (!$type) {
        $type = $this->xmlrpc_value_calculate_type($xmlrpc_value);
      }
      $xmlrpc_value->type = $type;
      if ($type == 'struct') {
        // Turn all the values in the array into new xmlrpc_values
        foreach ($xmlrpc_value->data as $key => $value) {
          $xmlrpc_value->data[$key] = $this->xmlrpc_value($value);
        }
      }
      if ($type == 'array') {
        for ($i = 0, $j = count($xmlrpc_value->data); $i < $j; $i++) {
          $xmlrpc_value->data[$i] = $this->xmlrpc_value($xmlrpc_value->data[$i]);
        }
      }
      return $xmlrpc_value;
    }

    /**
     * Map PHP type to XML-RPC type.
     *
     * @param $xmlrpc_value
     *   Variable whose type should be mapped.
     * @return
     *   XML-RPC type as string.
     * @see
     *   http://www.xmlrpc.com/spec#scalars
     */
    function xmlrpc_value_calculate_type(&$xmlrpc_value) {
      // http://www.php.net/gettype: Never use gettype() to test for a certain type [...] Instead, use the is_* functions.
      if (is_bool($xmlrpc_value->data)) {
        return 'boolean';
      }
      if (is_double($xmlrpc_value->data)) {
        return 'double';
      }
      if (is_int($xmlrpc_value->data)) {
          return 'int';
      }
      if (is_array($xmlrpc_value->data)) {
        // empty or integer-indexed arrays are 'array', string-indexed arrays 'struct'
        return empty($xmlrpc_value->data) || range(0, count($xmlrpc_value->data) - 1) === array_keys($xmlrpc_value->data) ? 'array' : 'struct';
      }
      if (is_object($xmlrpc_value->data)) {
        if ($xmlrpc_value->data->is_date) {
          return 'date';
        }
        if ($xmlrpc_value->data->is_base64) {
          return 'base64';
        }
        $xmlrpc_value->data = get_object_vars($xmlrpc_value->data);
        return 'struct';
      }
      // default
      return 'string';
    }

    /**
     * Generate XML representing the given value.
     *
     * @param $xmlrpc_value
     * @return
     *   XML representation of value.
     */
    function xmlrpc_value_get_xml($xmlrpc_value) {
      switch ($xmlrpc_value->type) {
        case 'boolean':
          return '<boolean>'. (($xmlrpc_value->data) ? '1' : '0') .'</boolean>';
          break;
        case 'int':
          return '<int>'. $xmlrpc_value->data .'</int>';
          break;
        case 'double':
          return '<double>'. $xmlrpc_value->data .'</double>';
          break;
        case 'string':
          // Note: we don't escape apostrophes because of the many blogging clients
          // that don't support numerical entities (and XML in general) properly.
          return '<string>'. htmlspecialchars($xmlrpc_value->data) .'</string>';
          break;
        case 'array':
          $return = '<array><data>'."\n";
          foreach ($xmlrpc_value->data as $item) {
            $return .= '  <value>'. $this->xmlrpc_value_get_xml($item) ."</value>\n";
          }
          $return .= '</data></array>';
          return $return;
          break;
        case 'struct':
          $return = '<struct>'."\n";
          foreach ($xmlrpc_value->data as $name => $value) {
            $return .= "  <member><name>". htmlentities($name) ."</name><value>";
            $return .= $this->xmlrpc_value_get_xml($value) ."</value></member>\n";
          }
          $return .= '</struct>';
          return $return;
          break;
        case 'date':
          return $this->xmlrpc_date_get_xml($xmlrpc_value->data);
          break;
        case 'base64':
          return $this->xmlrpc_base64_get_xml($xmlrpc_value->data);
          break;
      }
      return FALSE;
    }

    /**
     * Perform an HTTP request.
     *
     * This is a flexible and powerful HTTP client implementation. Correctly handles
     * GET, POST, PUT or any other HTTP requests. Handles redirects.
     *
     * @param $url
     *   A string containing a fully qualified URI.
     * @param $headers
     *   An array containing an HTTP header => value pair.
     * @param $method
     *   A string defining the HTTP request to use.
     * @param $data
     *   A string containing data to include in the request.
     * @param $retry
     *   An integer representing how many times to retry the request in case of a
     *   redirect.
     * @return
     *   An object containing the HTTP request headers, response code, headers,
     *   data and redirect status.
     */
    function http_request($url, $headers = array(), $method = 'GET', $data = NULL, $retry = 3) {
      global $db_prefix;

      $result = new stdClass();

      // Parse the URL and make sure we can handle the schema.
      $uri = parse_url($url);

      if ($uri == FALSE) {
        $result->error = 'unable to parse URL';
        return $result;
      }

      if (!isset($uri['scheme'])) {
        $result->error = 'missing schema';
        return $result;
      }

      switch ($uri['scheme']) {
        case 'http':
          $port = isset($uri['port']) ? $uri['port'] : 80;
          $host = $uri['host'] . ($port != 80 ? ':'. $port : '');
          $fp = @fsockopen($uri['host'], $port, $errno, $errstr, 15);
          break;
        case 'https':
          // Note: Only works for PHP 4.3 compiled with OpenSSL.
          $port = isset($uri['port']) ? $uri['port'] : 443;
          $host = $uri['host'] . ($port != 443 ? ':'. $port : '');
          $fp = @fsockopen('ssl://'. $uri['host'], $port, $errno, $errstr, 20);
          break;
        default:
          $result->error = 'invalid schema '. $uri['scheme'];
          return $result;
      }

      // Make sure the socket opened properly.
      if (!$fp) {
        // When a network error occurs, we use a negative number so it does not
        // clash with the HTTP status codes.
        $result->code = -$errno;
        $result->error = trim($errstr);

        // Mark that this request failed. This will trigger a check of the web
        // server's ability to make outgoing HTTP requests the next time that
        // requirements checking is performed.
        // @see system_requirements()
        //TODO variable_set('drupal_http_request_fails', TRUE);

        return $result;
      }

      // Construct the path to act on.
      $path = isset($uri['path']) ? $uri['path'] : '/';
      if (isset($uri['query'])) {
        $path .= '?'. $uri['query'];
      }

      // Create HTTP request.
      $defaults = array(
        // RFC 2616: "non-standard ports MUST, default ports MAY be included".
        // We don't add the port to prevent from breaking rewrite rules checking the
        // host that do not take into account the port number.
        'Host' => "Host: $host",
        'User-Agent' => 'User-Agent: Drupal (+http://drupal.org/)',
        'Content-Length' => 'Content-Length: '. strlen($data)
      );

      // If the server url has a user then attempt to use basic authentication
      if (isset($uri['user'])) {
        $defaults['Authorization'] = 'Authorization: Basic '. base64_encode($uri['user'] . (!empty($uri['pass']) ? ":". $uri['pass'] : ''));
      }

      // If the database prefix is being used by SimpleTest to run the tests in a copied
      // database then set the user-agent header to the database prefix so that any
      // calls to other Drupal pages will run the SimpleTest prefixed database. The
      // user-agent is used to ensure that multiple testing sessions running at the
      // same time won't interfere with each other as they would if the database
      // prefix were stored statically in a file or database variable.
      if (is_string($db_prefix) && preg_match("/^simpletest\d+$/", $db_prefix, $matches)) {
        $defaults['User-Agent'] = 'User-Agent: ' . $matches[0];
      }

      foreach ($headers as $header => $value) {
        $defaults[$header] = $header .': '. $value;
      }

      $request = $method .' '. $path ." HTTP/1.0\r\n";
      $request .= implode("\r\n", $defaults);
      $request .= "\r\n\r\n";
      $request .= $data;

      $result->request = $request;

      fwrite($fp, $request);

      // Fetch response.
      $response = '';
      while (!feof($fp) && $chunk = fread($fp, 1024)) {
        $response .= $chunk;
      }
      fclose($fp);

      // Parse response.
      list($split, $result->data) = explode("\r\n\r\n", $response, 2);
      $split = preg_split("/\r\n|\n|\r/", $split);

      list($protocol, $code, $text) = explode(' ', trim(array_shift($split)), 3);
      $result->headers = array();

      // Parse headers.
      while ($line = trim(array_shift($split))) {
        list($header, $value) = explode(':', $line, 2);
        if (isset($result->headers[$header]) && $header == 'Set-Cookie') {
          // RFC 2109: the Set-Cookie response header comprises the token Set-
          // Cookie:, followed by a comma-separated list of one or more cookies.
          $result->headers[$header] .= ','. trim($value);
        }
        else {
          $result->headers[$header] = trim($value);
        }
      }

      $responses = array(
        100 => 'Continue', 101 => 'Switching Protocols',
        200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content',
        300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other', 304 => 'Not Modified', 305 => 'Use Proxy', 307 => 'Temporary Redirect',
        400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Time-out', 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed', 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Large', 415 => 'Unsupported Media Type', 416 => 'Requested range not satisfiable', 417 => 'Expectation Failed',
        500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Time-out', 505 => 'HTTP Version not supported'
      );
      // RFC 2616 states that all unknown HTTP codes must be treated the same as the
      // base code in their class.
      if (!isset($responses[$code])) {
        $code = floor($code / 100) * 100;
      }

      switch ($code) {
        case 200: // OK
        case 304: // Not modified
          break;
        case 301: // Moved permanently
        case 302: // Moved temporarily
        case 307: // Moved temporarily
          $location = $result->headers['Location'];

          if ($retry) {
            $result = drupal_http_request($result->headers['Location'], $headers, $method, $data, --$retry);
            $result->redirect_code = $result->code;
          }
          $result->redirect_url = $location;

          break;
        default:
          $result->error = $text;
      }

      $result->code = $code;
      return $result;
    }

    /**
     * Construct an object representing an XML-RPC message.
     *
     * @param $message
     *   String containing XML as defined at http://www.xmlrpc.com/spec
     * @return
     *   Object
     */
    function xmlrpc_message($message) {
      $xmlrpc_message = new stdClass();
      $xmlrpc_message->array_structs = array();   // The stack used to keep track of the current array/struct
      $xmlrpc_message->array_structs_types = array(); // The stack used to keep track of if things are structs or array
      $xmlrpc_message->current_struct_name = array();  // A stack as well
      $xmlrpc_message->message = $message;
      return $xmlrpc_message;
    }

    /**
     * Parse an XML-RPC message. If parsing fails, the faultCode and faultString
     * will be added to the message object.
     *
     * @param $xmlrpc_message
     *   Object generated by xmlrpc_message()
     * @return
     *   TRUE if parsing succeeded; FALSE otherwise
     */
    function xmlrpc_message_parse(&$xmlrpc_message) {
      // First remove the XML declaration
      $xmlrpc_message->message = preg_replace('/<\?xml(.*)?\?'.'>/', '', $xmlrpc_message->message);
      if (trim($xmlrpc_message->message) == '') {
        return FALSE;
      }
      $xmlrpc_message->_parser = xml_parser_create();
      // Set XML parser to take the case of tags into account.
      xml_parser_set_option($xmlrpc_message->_parser, XML_OPTION_CASE_FOLDING, FALSE);
      // Set XML parser callback functions
      xml_set_element_handler($xmlrpc_message->_parser, array('MollomPlugin', 'xmlrpc_message_tag_open'), array('MollomPlugin', 'xmlrpc_message_tag_close'));
      xml_set_character_data_handler($xmlrpc_message->_parser, array('MollomPlugin', 'xmlrpc_message_cdata'));
      $this->xmlrpc_message_set($xmlrpc_message);
      if (!xml_parse($xmlrpc_message->_parser, $xmlrpc_message->message)) {
        return FALSE;
      }
      xml_parser_free($xmlrpc_message->_parser);
      // Grab the error messages, if any
      $xmlrpc_message = $this->xmlrpc_message_get();
      if ($xmlrpc_message->messagetype == 'fault') {
        $xmlrpc_message->fault_code = $xmlrpc_message->params[0]['faultCode'];
        $xmlrpc_message->fault_string = $xmlrpc_message->params[0]['faultString'];
      }
      return TRUE;
    }

    /**
     * Store a copy of the $xmlrpc_message object temporarily.
     *
     * @param $value
     *   Object
     * @return
     *   The most recently stored $xmlrpc_message
     */
    function xmlrpc_message_set($value = NULL) {
      static $xmlrpc_message;
      if ($value) {
        $xmlrpc_message = $value;
      }
      return $xmlrpc_message;
    }

    function xmlrpc_message_get() {
      return $this->xmlrpc_message_set();
    }

    function xmlrpc_message_tag_open($parser, $tag, $attr) {
      $xmlrpc_message = $this->xmlrpc_message_get();
      $xmlrpc_message->current_tag_contents = '';
      $xmlrpc_message->last_open = $tag;
      switch ($tag) {
        case 'methodCall':
        case 'methodResponse':
        case 'fault':
          $xmlrpc_message->messagetype = $tag;
          break;
        // Deal with stacks of arrays and structs
        case 'data':
          $xmlrpc_message->array_structs_types[] = 'array';
          $xmlrpc_message->array_structs[] = array();
          break;
        case 'struct':
          $xmlrpc_message->array_structs_types[] = 'struct';
          $xmlrpc_message->array_structs[] = array();
          break;
      }
      $this->xmlrpc_message_set($xmlrpc_message);
    }

    function xmlrpc_message_cdata($parser, $cdata) {
      $xmlrpc_message = $this->xmlrpc_message_get();
      $xmlrpc_message->current_tag_contents .= $cdata;
      $this->xmlrpc_message_set($xmlrpc_message);
    }

    function xmlrpc_message_tag_close($parser, $tag) {
      $xmlrpc_message = $this->xmlrpc_message_get();
      $value_flag = FALSE;
      switch ($tag) {
        case 'int':
        case 'i4':
          $value = (int)trim($xmlrpc_message->current_tag_contents);
          $value_flag = TRUE;
          break;
        case 'double':
          $value = (double)trim($xmlrpc_message->current_tag_contents);
          $value_flag = TRUE;
          break;
        case 'string':
          $value = $xmlrpc_message->current_tag_contents;
          $value_flag = TRUE;
          break;
        case 'dateTime.iso8601':
          $value = xmlrpc_date(trim($xmlrpc_message->current_tag_contents));
          // $value = $iso->getTimestamp();
          $value_flag = TRUE;
          break;
        case 'value':
          // If no type is indicated, the type is string
          // We take special care for empty values
          if (trim($xmlrpc_message->current_tag_contents) != '' || (isset($xmlrpc_message->last_open) && ($xmlrpc_message->last_open == 'value'))) {
            $value = (string)$xmlrpc_message->current_tag_contents;
            $value_flag = TRUE;
          }
          unset($xmlrpc_message->last_open);
          break;
        case 'boolean':
          $value = (boolean)trim($xmlrpc_message->current_tag_contents);
          $value_flag = TRUE;
          break;
        case 'base64':
          $value = base64_decode(trim($xmlrpc_message->current_tag_contents));
          $value_flag = TRUE;
          break;
        // Deal with stacks of arrays and structs
        case 'data':
        case 'struct':
          $value = array_pop($xmlrpc_message->array_structs );
          array_pop($xmlrpc_message->array_structs_types);
          $value_flag = TRUE;
          break;
        case 'member':
          array_pop($xmlrpc_message->current_struct_name);
          break;
        case 'name':
          $xmlrpc_message->current_struct_name[] = trim($xmlrpc_message->current_tag_contents);
          break;
        case 'methodName':
          $xmlrpc_message->methodname = trim($xmlrpc_message->current_tag_contents);
          break;
      }

      if ($value_flag) {
        if (count($xmlrpc_message->array_structs ) > 0) {
          // Add value to struct or array
          if ($xmlrpc_message->array_structs_types[count($xmlrpc_message->array_structs_types)-1] == 'struct') {
            // Add to struct
            $xmlrpc_message->array_structs [count($xmlrpc_message->array_structs )-1][$xmlrpc_message->current_struct_name[count($xmlrpc_message->current_struct_name)-1]] = $value;
          }
          else {
            // Add to array
            $xmlrpc_message->array_structs [count($xmlrpc_message->array_structs )-1][] = $value;
          }
        }
        else {
          // Just add as a parameter
          $xmlrpc_message->params[] = $value;
        }
      }
      if (!in_array($tag, array("data", "struct", "member"))) {
        $xmlrpc_message->current_tag_contents = '';
      }
      $this->xmlrpc_message_set($xmlrpc_message);
    }

    /**
     * Construct an object representing an XML-RPC request
     *
     * @param $method
     *   The name of the method to be called
     * @param $args
     *   An array of parameters to send with the method.
     * @return
     *   Object
     */
    function xmlrpc_request($method, $args) {
      $xmlrpc_request = new stdClass();
      $xmlrpc_request->method = $method;
      $xmlrpc_request->args = $args;
      $xmlrpc_request->xml = <<<EOD
    <?xml version="1.0"?>
    <methodCall>
    <methodName>{$xmlrpc_request->method}</methodName>
    <params>

EOD;

      foreach ($xmlrpc_request->args as $arg) {
        $xmlrpc_request->xml .= '<param><value>';
        $v = $this->xmlrpc_value($arg);
        $xmlrpc_request->xml .= $this->xmlrpc_value_get_xml($v);
        $xmlrpc_request->xml .= "</value></param>\n";
      }
      $xmlrpc_request->xml .= '</params></methodCall>';
      return $xmlrpc_request;
    }

    function xmlrpc_error($code = NULL, $message = NULL, $reset = FALSE) {
      static $xmlrpc_error;
      if (isset($code)) {
        $xmlrpc_error = new stdClass();
        $xmlrpc_error->is_error = TRUE;
        $xmlrpc_error->code = $code;
        $xmlrpc_error->message = $message;
      }
      elseif ($reset) {
        $xmlrpc_error = NULL;
      }
      return $xmlrpc_error;
    }

    function xmlrpc_error_get_xml($xmlrpc_error) {
      return <<<EOD
    <methodResponse>
      <fault>
      <value>
        <struct>
        <member>
          <name>faultCode</name>
          <value><int>{$xmlrpc_error->code}</int></value>
        </member>
        <member>
          <name>faultString</name>
          <value><string>{$xmlrpc_error->message}</string></value>
        </member>
        </struct>
      </value>
      </fault>
    </methodResponse>

EOD;
    }

    function xmlrpc_date($time) {
      $xmlrpc_date = new stdClass();
      $xmlrpc_date->is_date = TRUE;
      // $time can be a PHP timestamp or an ISO one
      if (is_numeric($time)) {
        $xmlrpc_date->year = gmdate('Y', $time);
        $xmlrpc_date->month = gmdate('m', $time);
        $xmlrpc_date->day = gmdate('d', $time);
        $xmlrpc_date->hour = gmdate('H', $time);
        $xmlrpc_date->minute = gmdate('i', $time);
        $xmlrpc_date->second = gmdate('s', $time);
        $xmlrpc_date->iso8601 = gmdate('Ymd\TH:i:s', $time);
      }
      else {
        $xmlrpc_date->iso8601 = $time;
        $time = str_replace(array('-', ':'), '', $time);
        $xmlrpc_date->year = substr($time, 0, 4);
        $xmlrpc_date->month = substr($time, 4, 2);
        $xmlrpc_date->day = substr($time, 6, 2);
        $xmlrpc_date->hour = substr($time, 9, 2);
        $xmlrpc_date->minute = substr($time, 11, 2);
        $xmlrpc_date->second = substr($time, 13, 2);
      }
      return $xmlrpc_date;
    }

    function xmlrpc_date_get_xml($xmlrpc_date) {
      return '<dateTime.iso8601>'. $xmlrpc_date->year . $xmlrpc_date->month . $xmlrpc_date->day .'T'. $xmlrpc_date->hour .':'. $xmlrpc_date->minute .':'. $xmlrpc_date->second .'</dateTime.iso8601>';
    }

    function xmlrpc_base64($data) {
      $xmlrpc_base64 = new stdClass();
      $xmlrpc_base64->is_base64 = TRUE;
      $xmlrpc_base64->data = $data;
      return $xmlrpc_base64;
    }

    function xmlrpc_base64_get_xml($xmlrpc_base64) {
      return '<base64>'. base64_encode($xmlrpc_base64->data) .'</base64>';
    }

    /**
    * Execute an XML remote procedural call. This is private function; call xmlrpc()
    * in common.inc instead of this function.
    *
    * @return
    *   A $xmlrpc_message object if the call succeeded; FALSE if the call failed
    */
    function _xmlrpc() {
      $args = func_get_args();
      $url = array_shift($args);
      $this->xmlrpc_clear_error();
      if (is_array($args[0])) {
        $method = 'system.multicall';
        $multicall_args = array();
        foreach ($args[0] as $call) {
          $multicall_args[] = array('methodName' => array_shift($call), 'params' => $call);
        }
        $args = array($multicall_args);
      }
      else {
        $method = array_shift($args);
      }
      $xmlrpc_request = $this->xmlrpc_request($method, $args);
      $result = $this->http_request($url, array("Content-Type" => "text/xml"), 'POST', $xmlrpc_request->xml);
      if ($result->code != 200) {
        $this->xmlrpc_error($result->code, $result->error);
        return FALSE;
      }
      $message = $this->xmlrpc_message($result->data);
      // Now parse what we've got back
      if (!$this->xmlrpc_message_parse($message)) {
        // XML error
        $this->xmlrpc_error(-32700, t('Parse error. Not well formed'));
        return FALSE;
      }
      // Is the message a fault?
      if ($message->messagetype == 'fault') {
        $this->xmlrpc_error($message->fault_code, $message->fault_string);
        return FALSE;
      }
      // Message must be OK
      return $message->params[0];
    }

    /**
     * Returns the last XML-RPC client error number
     */
    function xmlrpc_errno() {
      $error = $this->xmlrpc_error();
      return ($error != NULL ? $error->code : NULL);
    }

    /**
     * Returns the last XML-RPC client error message
     */
    function xmlrpc_error_msg() {
      $error = xmlrpc_error();
      return ($error != NULL ? $error->message : NULL);
    }

    /**
     * Clears any previous error.
     */
    function xmlrpc_clear_error() {
      $this->xmlrpc_error(NULL, NULL, TRUE);
    }
}


code:
The mollom plugin uses mollom.com to filter SN notices for spam.

== Dependencies ==
Your webserver needs to have xmlrpc php extention loaded.
This is called php5-xmlrpc in Debian/Ubuntu

== Installation ==
Add the following to your config.php
<?php
addPlugin('Mollom',
    array(
        'public_key' => '...',
        'private_key' => '...',
        'servers' => array('http://88.151.243.81', 'http://82.103.131.136')
    )
);

replace '...' with your own public and private keys for your site, which you can
get from mollom.com.

If you're using this plugin, i'd love to know about it -- shiny@cpan.org or
shiny on freenode.

path: plugins/Mollom/README


code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

#. TRANS: Client exception thrown when notice content triggers the spam filter.
#: MollomPlugin.php:87
msgid "Spam Detected."
msgstr ""


code:
# Translation of StatusNet - Mollom to Catalan (català)
# Exported from translatewiki.net
#
# Author: Toniher
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Mollom\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:17+0000\n"
"Language-Team: Catalan <https://translatewiki.net/wiki/Portal:ca>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:07+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: ca\n"
"X-Message-Group: #out-statusnet-plugin-mollom\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Client exception thrown when notice content triggers the spam filter.
msgid "Spam Detected."
msgstr "S'ha detectat brossa."


code:
# Translation of StatusNet - Mollom to German (Deutsch)
# Exported from translatewiki.net
#
# Author: Giftpflanze
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Mollom\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:17+0000\n"
"Language-Team: German <https://translatewiki.net/wiki/Portal:de>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:07+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: de\n"
"X-Message-Group: #out-statusnet-plugin-mollom\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Client exception thrown when notice content triggers the spam filter.
msgid "Spam Detected."
msgstr "Spam erkannt."


code:
# Translation of StatusNet - Mollom to Spanish (español)
# Exported from translatewiki.net
#
# Author: Armando-Martin
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Mollom\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:17+0000\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:07+0000\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Client exception thrown when notice content triggers the spam filter.
msgid "Spam Detected."
msgstr "Spam detectado."


code:
# Translation of StatusNet - Mollom to Basque (euskara)
# Exported from translatewiki.net
#
# Author: Artsuaga
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Mollom\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:17+0000\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:07+0000\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Client exception thrown when notice content triggers the spam filter.
msgid "Spam Detected."
msgstr "Spam Antzeman da."


code:
# Translation of StatusNet - Mollom to French (français)
# Exported from translatewiki.net
#
# Author: Iketsi
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Mollom\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:17+0000\n"
"Language-Team: French <https://translatewiki.net/wiki/Portal:fr>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:07+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: fr\n"
"X-Message-Group: #out-statusnet-plugin-mollom\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#. TRANS: Client exception thrown when notice content triggers the spam filter.
msgid "Spam Detected."
msgstr "Spam détecté."


code:
# Translation of StatusNet - Mollom to Galician (galego)
# Exported from translatewiki.net
#
# Author: Toliño
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Mollom\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:17+0000\n"
"Language-Team: Galician <https://translatewiki.net/wiki/Portal:gl>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:07+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: gl\n"
"X-Message-Group: #out-statusnet-plugin-mollom\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Client exception thrown when notice content triggers the spam filter.
msgid "Spam Detected."
msgstr "Spam detectado."


code:
# Translation of StatusNet - Mollom to Hebrew (עברית)
# Exported from translatewiki.net
#
# Author: Amire80
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Mollom\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:17+0000\n"
"Language-Team: Hebrew <https://translatewiki.net/wiki/Portal:he>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:07+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: he\n"
"X-Message-Group: #out-statusnet-plugin-mollom\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Client exception thrown when notice content triggers the spam filter.
msgid "Spam Detected."
msgstr "זוהה זבל."


code:
# Translation of StatusNet - Mollom to Interlingua (interlingua)
# Exported from translatewiki.net
#
# Author: McDutchie
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Mollom\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:17+0000\n"
"Language-Team: Interlingua <https://translatewiki.net/wiki/Portal:ia>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:07+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: ia\n"
"X-Message-Group: #out-statusnet-plugin-mollom\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Client exception thrown when notice content triggers the spam filter.
msgid "Spam Detected."
msgstr "Spam detegite."


code:
# Translation of StatusNet - Mollom to Italian (italiano)
# Exported from translatewiki.net
#
# Author: GreenFox
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Mollom\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:17+0000\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:07+0000\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Client exception thrown when notice content triggers the spam filter.
msgid "Spam Detected."
msgstr "Identificato come Spam."


code:
# Translation of StatusNet - Mollom to Japanese (日本語)
# Exported from translatewiki.net
#
# Author: Shirayuki
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Mollom\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:17+0000\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:07+0000\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"Plural-Forms: nplurals=1; plural=0;\n"

#. TRANS: Client exception thrown when notice content triggers the spam filter.
msgid "Spam Detected."
msgstr "迷惑メールを検出しました。"


code:
# Translation of StatusNet - Mollom to Macedonian (македонски)
# Exported from translatewiki.net
#
# Author: Bjankuloski06
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Mollom\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:18+0000\n"
"Language-Team: Macedonian <https://translatewiki.net/wiki/Portal:mk>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:07+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: mk\n"
"X-Message-Group: #out-statusnet-plugin-mollom\n"
"Plural-Forms: nplurals=2; plural=(n == 1 || n%10 == 1) ? 0 : 1;\n"

#. TRANS: Client exception thrown when notice content triggers the spam filter.
msgid "Spam Detected."
msgstr "Утврден е спам."


code:
# Translation of StatusNet - Mollom to Dutch (Nederlands)
# Exported from translatewiki.net
#
# Author: Siebrand
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Mollom\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:18+0000\n"
"Language-Team: Dutch <https://translatewiki.net/wiki/Portal:nl>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:07+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: nl\n"
"X-Message-Group: #out-statusnet-plugin-mollom\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Client exception thrown when notice content triggers the spam filter.
msgid "Spam Detected."
msgstr "Spam gedetecteerd."


code:
# Translation of StatusNet - Mollom to Swedish (svenska)
# Exported from translatewiki.net
#
# Author: WikiPhoenix
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Mollom\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:18+0000\n"
"Language-Team: Swedish <https://translatewiki.net/wiki/Portal:sv>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:07+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: sv\n"
"X-Message-Group: #out-statusnet-plugin-mollom\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Client exception thrown when notice content triggers the spam filter.
msgid "Spam Detected."
msgstr "Spam upptäcktes."


code:
# Translation of StatusNet - Mollom to Tagalog (Tagalog)
# Exported from translatewiki.net
#
# Author: AnakngAraw
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Mollom\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:18+0000\n"
"Language-Team: Tagalog <https://translatewiki.net/wiki/Portal:tl>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:07+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: tl\n"
"X-Message-Group: #out-statusnet-plugin-mollom\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Client exception thrown when notice content triggers the spam filter.
msgid "Spam Detected."
msgstr "Nakapansin ng Basurang Liham."


code:
# Translation of StatusNet - Mollom to Ukrainian (українська)
# Exported from translatewiki.net
#
# Author: Boogie
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Mollom\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:18+0000\n"
"Language-Team: Ukrainian <https://translatewiki.net/wiki/Portal:uk>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:07+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: uk\n"
"X-Message-Group: #out-statusnet-plugin-mollom\n"
"Plural-Forms: nplurals=3; plural=(n%10 == 1 && n%100 != 11) ? 0 : ( (n%10 >= "
"2 && n%10 <= 4 && (n%100 < 10 || n%100 >= 20)) ? 1 : 2 );\n"

#. TRANS: Client exception thrown when notice content triggers the spam filter.
msgid "Spam Detected."
msgstr "Виявлено спам."


code:
<?php
/**
 * StatusNet - the distributed open-source microblogging tool
 * Copyright (C) 2010, StatusNet, Inc.
 *
 * A plugin to add titles to notices
 *
 * PHP version 5
 *
 * 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  NoticeTitle
 * @package   StatusNet
 * @author    Evan Prodromou <evan@status.net>
 * @copyright 2010 StatusNet, Inc.
 * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
 * @link      http://status.net/
 */

if (!defined('STATUSNET')) {
    // This check helps protect against security problems;
    // your code file can't be executed directly from the web.
    exit(1);
}

define('NOTICE_TITLE_PLUGIN_VERSION', '0.1');

/**
 * NoticeTitle plugin to add an optional title to notices.
 *
 * Stores notice titles in a secondary table, notice_title.
 *
 * @category  NoticeTitle
 * @package   StatusNet
 * @author    Evan Prodromou <evan@status.net>
 * @copyright 2010 StatusNet, Inc.
 * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
 * @link      http://status.net/
 */
class NoticeTitlePlugin extends Plugin
{

    // By default, notice-title widget will be available to all users.
    // With restricted on, only users who have been granted the
    // "richedit" role get it.
    public $restricted = false;

    /**
     * Database schema setup
     *
     * Add the notice_title helper table
     *
     * @see Schema
     * @see ColumnDef
     *
     * @return boolean hook value; true means continue processing, false means stop.
     */
    function onCheckSchema()
    {
        $schema = Schema::get();

        // For storing titles for notices
        $schema->ensureTable('notice_title', Notice_title::schemaDef());
        return true;
    }

    /**
     * Provide plugin version information.
     *
     * This data is used when showing the version page.
     *
     * @param array &$versions array of version data arrays; see EVENTS.txt
     *
     * @return boolean hook value
     */
    function onPluginVersion(&$versions)
    {
        $url = 'http://status.net/wiki/Plugin:NoticeTitle';

        $versions[] = array('name' => 'NoticeTitle',
                            'version' => NOTICE_TITLE_PLUGIN_VERSION,
                            'author' => 'Evan Prodromou',
                            'homepage' => $url,
                            'rawdescription' =>
                            // TRANS: Plugin description.
                            _m('Adds optional titles to notices.'));
        return true;
    }

    /**
     * Show title entry when showing notice form
     *
     * @param Form $form Form being shown
     *
     * @return boolean hook value
     */
    function onStartShowNoticeFormData($form)
    {
        if ($this->isAllowedRichEdit()) {
            $form->out->element('style',
                                null,
                                'label#notice_data-text-label { display: none }');
            $form->out->element('input', array('type' => 'text',
                                               'id' => 'notice_title',
                                               'name' => 'notice_title',
                                               'size' => 40,
                                               'maxlength' => Notice_title::MAXCHARS));
        }
        return true;
    }

    /**
     * Validate notice title before saving
     *
     * @param Action  $action    NewNoticeAction being executed
     * @param integer &$authorId Author ID
     * @param string  &$text     Text of the notice
     * @param array   &$options  Options array
     *
     * @return boolean hook value
     */
    function onStartNoticeSaveWeb($action, &$authorId, &$text, &$options)
    {
        $title = $action->trimmed('notice_title');
        if (!empty($title) && $this->isAllowedRichEdit()) {
            if (mb_strlen($title) > Notice_title::MAXCHARS) {
                // TRANS: Exception thrown when a notice title is too long.
                // TRANS: %d is the maximum number of characters allowed in a title (used for plural).
                throw new Exception(sprintf(_m('The notice title is too long (maximum %d character).',
                                               'The notice title is too long (maximum %d characters).',
                                               Notice_title::MAXCHARS),
                                            Notice_title::MAXCHARS));
            }
        }
        return true;
    }

    /**
     * Save notice title after notice is saved
     *
     * @param Action $action NewNoticeAction being executed
     * @param Notice $notice Notice that was saved
     *
     * @return boolean hook value
     */
    function onEndNoticeSaveWeb($action, $notice)
    {
        if (!empty($notice)) {

            $title = $action->trimmed('notice_title');

            if (!empty($title) && $this->isAllowedRichEdit()) {

                $nt = new Notice_title();

                $nt->notice_id = $notice->id;
                $nt->title     = $title;

                $nt->insert();
            }
        }

        return true;
    }

    /**
     * Show the notice title in lists
     *
     * @param NoticeListItem $nli NoticeListItem being shown
     *
     * @return boolean hook value
     */
    function onStartShowNoticeTitle(NoticeListItem $nli)
    {
        $title = Notice_title::fromNotice($nli->notice);

        if (!empty($title)) {
            $nli->elementStart('h4', array('class' => 'p-name'));
            $nli->element('a', array('href' => $nli->notice->getUrl()), $title);
            $nli->elementEnd('h4');
            return false;
        }

        return true;
    }

    /**
     * Show the notice title in RSS output
     *
     * @param Notice $notice Notice being shown
     * @param array  &$entry array of values used for RSS output
     *
     * @return boolean hook value
     */
    function onEndRssEntryArray($notice, &$entry)
    {
        $title = Notice_title::fromNotice($notice);

        if (!empty($title)) {
            $entry['title'] = $title;
        }

        return true;
    }

    /**
     * Show the notice title in Atom output
     *
     * @param Notice      $notice Notice being shown
     * @param Activity    $act   Activity object to be modified
     * @param Profile     $scoped Currently logged in/scoped profile
     *
     * @return boolean hook value
     */
    function onEndNoticeAsActivity(Notice $stored, Activity $act, Profile $scoped=null)
    {
        $title = Notice_title::fromNotice($stored);

        if (!empty($title)) {
            foreach ($act->objects as $obj) {
                if ($obj->id == $stored->getUri()) {
                    $obj->title = $title;
                    break;
                }
            }
        }

        return true;
    }

    /**
     * Remove title when the notice is deleted
     *
     * @param Notice $notice Notice being deleted
     *
     * @return boolean hook value
     */
    function onNoticeDeleteRelated($notice)
    {
        $nt = Notice_title::getKV('notice_id', $notice->id);

        if (!empty($nt)) {
            $nt->delete();
        }

        return true;
    }

    /**
     * If a notice has a title, show it in the <title> element
     *
     * @param Action $action Action being executed
     *
     * @return boolean hook value
     */
    function onStartShowHeadTitle($action)
    {
        $actionName = $action->trimmed('action');

        if ($actionName == 'shownotice') {
            $title = Notice_title::fromNotice($action->notice);
            if (!empty($title)) {
                $action->element('title', null,
                                 // TRANS: Page title. %1$s is the title, %2$s is the site name.
                                 sprintf(_m("%1\$s - %2\$s"),
                                         $title,
                                         common_config('site', 'name')));
            }
        }

        return true;
    }

    /**
     * If a notice has a title, show it in the <h1> element
     *
     * @param Notice $notice Notice we're getting the title for
     * @param string $title  Reference to the variable which we set to the notice's title
     *
     * @return boolean hook value
     */
    function onGetNoticeTitle(Notice $notice, &$title)
    {
        $title = Notice_title::fromNotice($notice);
        if (!is_null($title)) {
            return false;
        }

        return true;
    }

    /**
     * Does the current user have permission to use the notice-title widget?
     * Always true unless the plugin's "restricted" setting is on, in which
     * case it's limited to users with the "richedit" role.
     *
     * @todo FIXME: make that more sanely configurable :)
     *
     * @return boolean
     */
    private function isAllowedRichEdit()
    {
        if ($this->restricted) {
            $user = common_current_user();
            return !empty($user) && $user->hasRole('richedit');
        } else {
            return true;
        }
    }
}


code:
<?php
/**
 * Data class for notice titles
 *
 * PHP version 5
 *
 * @category Data
 * @package  StatusNet
 * @author   Evan Prodromou <evan@status.net>
 * @license  http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
 * @link     http://status.net/
 *
 * StatusNet - the distributed open-source microblogging tool
 * Copyright (C) 2010, StatusNet, Inc.
 *
 * 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/>.
 */

if (!defined('STATUSNET')) {
    exit(1);
}

require_once INSTALLDIR . '/classes/Memcached_DataObject.php';

/**
 * Data class for notice titles
 *
 * @category Action
 * @package  StatusNet
 * @author   Evan Prodromou <evan@status.net>
 * @license  http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
 * @link     http://status.net/
 *
 * @see      DB_DataObject
 */
class Notice_title extends Managed_DataObject
{
    const MAXCHARS = 255;

    public $__table = 'notice_title'; // table name
    public $notice_id;                         // int(11)  primary_key not_null
    public $title;                             // varchar(255)
    public $created;                           // datetime()   not_null
    public $modified;                          // timestamp()   not_null default_CURRENT_TIMESTAMP

    public static function schemaDef()
    {
        return array(
            'fields' => array(
                'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'notice id this title relates to'),
                'title' => array('type' => 'varchar', 'length' => Notice_title::MAXCHARS, 'description' => 'title to notice'),
                'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
            ),
            'primary key' => array('notice_id'),
            'foreign keys' => array(
                'notice_title_notice_id_fkey' => array('notice', array('notice_id' => 'id')),
            ),
        );
    }

    /**
     * Get a notice title based on the notice
     *
     * @param Notice $notice Notice to fetch a title for
     *
     * @return string title of the notice, or null if none
     */
    static function fromNotice($notice)
    {
        $nt = Notice_title::getKV('notice_id', $notice->id);
        if (empty($nt)) {
            return null;
        } else {
            return $nt->title;
        }
    }
}


code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"

#. TRANS: Plugin description.
#: NoticeTitlePlugin.php:129
msgid "Adds optional titles to notices."
msgstr ""

#. TRANS: Exception thrown when a notice title is too long.
#. TRANS: %d is the maximum number of characters allowed in a title (used for plural).
#: NoticeTitlePlugin.php:172
#, php-format
msgid "The notice title is too long (maximum %d character)."
msgid_plural "The notice title is too long (maximum %d characters)."
msgstr[0] ""
msgstr[1] ""

#. TRANS: Page title. %1$s is the title, %2$s is the site name.
#: NoticeTitlePlugin.php:307
#, php-format
msgid "%1$s - %2$s"
msgstr ""


code:
# Translation of StatusNet - NoticeTitle to Arabic (العربية)
# Exported from translatewiki.net
#
# Author: OsamaK
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - NoticeTitle\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:19+0000\n"
"Language-Team: Arabic <https://translatewiki.net/wiki/Portal:ar>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:09+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: ar\n"
"X-Message-Group: #out-statusnet-plugin-noticetitle\n"
"Plural-Forms: nplurals=6; plural=(n == 0) ? 0 : ( (n == 1) ? 1 : ( (n == "
"2) ? 2 : ( (n%100 >= 3 && n%100 <= 10) ? 3 : ( (n%100 >= 11 && n%100 <= "
"99) ? 4 : 5 ) ) ) );\n"

#. TRANS: Plugin description.
msgid "Adds optional titles to notices."
msgstr "يضيف عناوين اختيارية إلى الإشعارات."

#. TRANS: Exception thrown when a notice title is too long.
#. TRANS: %d is the maximum number of characters allowed in a title (used for plural).
#, php-format
msgid "The notice title is too long (maximum %d character)."
msgid_plural "The notice title is too long (maximum %d characters)."
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
msgstr[3] ""
msgstr[4] ""
msgstr[5] ""

#. TRANS: Page title. %1$s is the title, %2$s is the site name.
#, php-format
msgid "%1$s - %2$s"
msgstr "%1$s - %2$s"


code:
# Translation of StatusNet - NoticeTitle to Breton (brezhoneg)
# Exported from translatewiki.net
#
# Author: Fulup
# Author: Y-M D
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - NoticeTitle\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:19+0000\n"
"Language-Team: Breton <https://translatewiki.net/wiki/Portal:br>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:09+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: br\n"
"X-Message-Group: #out-statusnet-plugin-noticetitle\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#. TRANS: Plugin description.
msgid "Adds optional titles to notices."
msgstr "Ouzhpennañ a ra titloù diret d'ar c'hemennoù."

#. TRANS: Exception thrown when a notice title is too long.
#. TRANS: %d is the maximum number of characters allowed in a title (used for plural).
#, php-format
msgid "The notice title is too long (maximum %d character)."
msgid_plural "The notice title is too long (maximum %d characters)."
msgstr[0] ""
msgstr[1] ""

#. TRANS: Page title. %1$s is the title, %2$s is the site name.
#, php-format
msgid "%1$s - %2$s"
msgstr "%1$s - %2$s"


code:
# Translation of StatusNet - NoticeTitle to Catalan (català)
# Exported from translatewiki.net
#
# Author: Toniher
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - NoticeTitle\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:19+0000\n"
"Language-Team: Catalan <https://translatewiki.net/wiki/Portal:ca>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:09+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: ca\n"
"X-Message-Group: #out-statusnet-plugin-noticetitle\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Plugin description.
msgid "Adds optional titles to notices."
msgstr "Afegeix títols opcionals als avisos"

#. TRANS: Exception thrown when a notice title is too long.
#. TRANS: %d is the maximum number of characters allowed in a title (used for plural).
#, php-format
msgid "The notice title is too long (maximum %d character)."
msgid_plural "The notice title is too long (maximum %d characters)."
msgstr[0] ""
msgstr[1] ""

#. TRANS: Page title. %1$s is the title, %2$s is the site name.
#, php-format
msgid "%1$s - %2$s"
msgstr "%1$s - %2$s"


code:
# Translation of StatusNet - NoticeTitle to German (Deutsch)
# Exported from translatewiki.net
#
# Author: ChrisiPK
# Author: The Evil IP address
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - NoticeTitle\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:19+0000\n"
"Language-Team: German <https://translatewiki.net/wiki/Portal:de>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:09+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: de\n"
"X-Message-Group: #out-statusnet-plugin-noticetitle\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Plugin description.
msgid "Adds optional titles to notices."
msgstr "Fügt Nachrichten optionale Titel hinzu."

#. TRANS: Exception thrown when a notice title is too long.
#. TRANS: %d is the maximum number of characters allowed in a title (used for plural).
#, php-format
msgid "The notice title is too long (maximum %d character)."
msgid_plural "The notice title is too long (maximum %d characters)."
msgstr[0] "Der Nachrichtentitel ist zu lang (maximal %d Zeichen)."
msgstr[1] "Der Nachrichtentitel ist zu lang (maximal %d Zeichen)."

#. TRANS: Page title. %1$s is the title, %2$s is the site name.
#, php-format
msgid "%1$s - %2$s"
msgstr "%1$s – %2$s"


code:
# Translation of StatusNet - NoticeTitle to Spanish (español)
# Exported from translatewiki.net
#
# Author: Armando-Martin
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - NoticeTitle\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:19+0000\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:09+0000\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Plugin description.
msgid "Adds optional titles to notices."
msgstr "Agrega títulos opcionales a las notas."

#. TRANS: Exception thrown when a notice title is too long.
#. TRANS: %d is the maximum number of characters allowed in a title (used for plural).
#, php-format
msgid "The notice title is too long (maximum %d character)."
msgid_plural "The notice title is too long (maximum %d characters)."
msgstr[0] ""
"El título de la nota es demasiado largo (el máximo  es %d  carácter). "
msgstr[1] ""
"El título del aviso es demasiado largo (el máximo son  %d  caracteres)."

#. TRANS: Page title. %1$s is the title, %2$s is the site name.
#, php-format
msgid "%1$s - %2$s"
msgstr "%1$s - %2$s"


code:
# Translation of StatusNet - NoticeTitle to Basque (euskara)
# Exported from translatewiki.net
#
# Author: Artsuaga
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - NoticeTitle\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:20+0000\n"
"Language-Team: Basque <https://translatewiki.net/wiki/Portal:eu>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:09+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: eu\n"
"X-Message-Group: #out-statusnet-plugin-noticetitle\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Plugin description.
msgid "Adds optional titles to notices."
msgstr "Oharrei tituluak gehitzen uzten du."

#. TRANS: Exception thrown when a notice title is too long.
#. TRANS: %d is the maximum number of characters allowed in a title (used for plural).
#, php-format
msgid "The notice title is too long (maximum %d character)."
msgid_plural "The notice title is too long (maximum %d characters)."
msgstr[0] "Oharraren titulua luzeegia da (gehienez ere karaktere %d)."
msgstr[1] "Oharraren titulua luzeegia da (gehienez ere %d karaktere."

#. TRANS: Page title. %1$s is the title, %2$s is the site name.
#, php-format
msgid "%1$s - %2$s"
msgstr "%1$s - %2$s"


code:
# Translation of StatusNet - NoticeTitle to French (français)
# Exported from translatewiki.net
#
# Author: Crochet.david
# Author: Verdy p
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - NoticeTitle\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:20+0000\n"
"Language-Team: French <https://translatewiki.net/wiki/Portal:fr>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:09+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: fr\n"
"X-Message-Group: #out-statusnet-plugin-noticetitle\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#. TRANS: Plugin description.
msgid "Adds optional titles to notices."
msgstr "Ajoute des titres optionnels aux avis."

#. TRANS: Exception thrown when a notice title is too long.
#. TRANS: %d is the maximum number of characters allowed in a title (used for plural).
#, php-format
msgid "The notice title is too long (maximum %d character)."
msgid_plural "The notice title is too long (maximum %d characters)."
msgstr[0] ""
"Le titre de la description est trop longue (limitée à %d caractère maximum)."
msgstr[1] ""
"Le titre de la description est trop longue (limitée à %d caractères maximum)."

#. TRANS: Page title. %1$s is the title, %2$s is the site name.
#, php-format
msgid "%1$s - %2$s"
msgstr "%1$s — %2$s"


code:
# Translation of StatusNet - NoticeTitle to Galician (galego)
# Exported from translatewiki.net
#
# Author: Toliño
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - NoticeTitle\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:20+0000\n"
"Language-Team: Galician <https://translatewiki.net/wiki/Portal:gl>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:09+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: gl\n"
"X-Message-Group: #out-statusnet-plugin-noticetitle\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Plugin description.
msgid "Adds optional titles to notices."
msgstr "Engade títulos opcionais ás notas."

#. TRANS: Exception thrown when a notice title is too long.
#. TRANS: %d is the maximum number of characters allowed in a title (used for plural).
#, php-format
msgid "The notice title is too long (maximum %d character)."
msgid_plural "The notice title is too long (maximum %d characters)."
msgstr[0] "O título da nota é longo de máis (o máximo é %d carácter)."
msgstr[1] "O título da nota é longo de máis (o máximo son %d caracteres)."

#. TRANS: Page title. %1$s is the title, %2$s is the site name.
#, php-format
msgid "%1$s - %2$s"
msgstr "%1$s - %2$s"


code:
# Translation of StatusNet - NoticeTitle to Hebrew (עברית)
# Exported from translatewiki.net
#
# Author: Amire80
# Author: YaronSh
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - NoticeTitle\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:20+0000\n"
"Language-Team: Hebrew <https://translatewiki.net/wiki/Portal:he>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:09+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: he\n"
"X-Message-Group: #out-statusnet-plugin-noticetitle\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Plugin description.
msgid "Adds optional titles to notices."
msgstr "הוספת כותרת (לא הכרחית) לעדכונים."

#. TRANS: Exception thrown when a notice title is too long.
#. TRANS: %d is the maximum number of characters allowed in a title (used for plural).
#, php-format
msgid "The notice title is too long (maximum %d character)."
msgid_plural "The notice title is too long (maximum %d characters)."
msgstr[0] "כותרת העדכון ארוכה מדי (אפשר לכתוב תו אחד לכל היותר)."
msgstr[1] "כותרת העדכון ארוכה מדי (אפשר לכתוב %d תווים לכל היותר)."

#. TRANS: Page title. %1$s is the title, %2$s is the site name.
#, php-format
msgid "%1$s - %2$s"
msgstr "%1$s – %2$s"


code:
# Translation of StatusNet - NoticeTitle to Interlingua (interlingua)
# Exported from translatewiki.net
#
# Author: McDutchie
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - NoticeTitle\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:20+0000\n"
"Language-Team: Interlingua <https://translatewiki.net/wiki/Portal:ia>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:09+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: ia\n"
"X-Message-Group: #out-statusnet-plugin-noticetitle\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Plugin description.
msgid "Adds optional titles to notices."
msgstr "Adde optional titulos a notas."

#. TRANS: Exception thrown when a notice title is too long.
#. TRANS: %d is the maximum number of characters allowed in a title (used for plural).
#, php-format
msgid "The notice title is too long (maximum %d character)."
msgid_plural "The notice title is too long (maximum %d characters)."
msgstr[0] "Le titulo del nota es troppo longe (maximo %d character)."
msgstr[1] "Le titulo del nota es troppo longe (maximo %d characteres)."

#. TRANS: Page title. %1$s is the title, %2$s is the site name.
#, php-format
msgid "%1$s - %2$s"
msgstr "%1$s - %2$s"


code:
# Translation of StatusNet - NoticeTitle to Italian (italiano)
# Exported from translatewiki.net
#
# Author: GreenFox
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - NoticeTitle\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:20+0000\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:09+0000\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Plugin description.
msgid "Adds optional titles to notices."
msgstr "Aggiunge titoli opzionali alle comunicazioni."

#. TRANS: Exception thrown when a notice title is too long.
#. TRANS: %d is the maximum number of characters allowed in a title (used for plural).
#, php-format
msgid "The notice title is too long (maximum %d character)."
msgid_plural "The notice title is too long (maximum %d characters)."
msgstr[0] "Il titolo della descrizione è troppo lungo (massimo %d caratteri)."
msgstr[1] ""
"I titoli della descrizione sono troppo lunghi (massimo %d caratteri)."

#. TRANS: Page title. %1$s is the title, %2$s is the site name.
#, php-format
msgid "%1$s - %2$s"
msgstr "%1$s - %2$s"


code:
# Translation of StatusNet - NoticeTitle to Macedonian (македонски)
# Exported from translatewiki.net
#
# Author: Bjankuloski06
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - NoticeTitle\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:20+0000\n"
"Language-Team: Macedonian <https://translatewiki.net/wiki/Portal:mk>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:09+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: mk\n"
"X-Message-Group: #out-statusnet-plugin-noticetitle\n"
"Plural-Forms: nplurals=2; plural=(n == 1 || n%10 == 1) ? 0 : 1;\n"

#. TRANS: Plugin description.
msgid "Adds optional titles to notices."
msgstr "Додава наслови на забелешките (по избор)."

#. TRANS: Exception thrown when a notice title is too long.
#. TRANS: %d is the maximum number of characters allowed in a title (used for plural).
#, php-format
msgid "The notice title is too long (maximum %d character)."
msgid_plural "The notice title is too long (maximum %d characters)."
msgstr[0] "Насловот на забелешката е предолг (макс. %d знак)."
msgstr[1] "Насловот на забелешката е предолг (малс. %d знаци)."

#. TRANS: Page title. %1$s is the title, %2$s is the site name.
#, php-format
msgid "%1$s - %2$s"
msgstr "%1$s - %2$s"


code:
# Translation of StatusNet - NoticeTitle to Norwegian Bokmål (norsk (bokmål))
# Exported from translatewiki.net
#
# Author: Nghtwlkr
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - NoticeTitle\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:09:20+0000\n"
"Language-Team: Norwegian Bokmål <https://translatewiki.net/wiki/Portal:nb>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:51:09+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: nb\n"
"X-Message-Group: #out-statusnet-plugin-noticetitle\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Plugin description.
msgid "Adds optional titles to notices."
msgstr "Legger valgfrie titler til notiser."

#. TRANS: Exception thrown when a notice title is too long.
#. TRANS: %d is the maximum number of characters allowed in a title (used for plural).
#, php-format
msgid "The notice title is too long (maximum %d character)."
msgid_plural "The notice title is too long (maximum %d characters)."
msgstr[0] ""
msgstr[1] ""

#. TRANS: Page title. %1$s is the title, %2$s is the site name.
#, php-format
msgid "%1$s - %2$s"
msgstr "%1$s - %2$s"