code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: GNU social\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-02-02 17:47+0100\n"
"PO-Revision-Date: 2015-02-06 16:15+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Burmese (http://www.transifex.com/projects/p/gnu-social/language/my/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: my\n"
"Plural-Forms: nplurals=1; plural=0;\n"

#. TRANS: Subject for e-mail.
#: lib/useremailsummaryhandler.php:125
#, php-format
msgid "Your latest updates from %s"
msgstr ""

#. TRANS: Text in e-mail summary.
#. TRANS: %1$s is the StatusNet sitename, %2$s is the recipient's profile
#. name.
#: lib/useremailsummaryhandler.php:140
#, php-format
msgid "Recent updates from %1$s for %2$s:"
msgstr ""

#. TRANS: Link text for link to conversation view.
#: lib/useremailsummaryhandler.php:188
msgid "in context"
msgstr ""

#. TRANS: Link text for link to e-mail settings.
#. TRANS: %1$s is a link to the e-mail settings, %2$s is the StatusNet
#. sitename.
#: lib/useremailsummaryhandler.php:198
#, php-format
msgid "change your email settings for %2$s"
msgstr ""

#. TRANS: Plugin description.
#: EmailSummaryPlugin.php:77
msgid "Send an email summary of the inbox to users."
msgstr ""

#. TRANS: Checkbox label in e-mail preferences form.
#: EmailSummaryPlugin.php:108
msgid "Send me a periodic summary of updates from my network"
msgstr ""


code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: GNU social\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-02-02 17:47+0100\n"
"PO-Revision-Date: 2015-02-06 16:15+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Norwegian Bokmål (http://www.transifex.com/projects/p/gnu-social/language/nb/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: nb\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Subject for e-mail.
#: lib/useremailsummaryhandler.php:125
#, php-format
msgid "Your latest updates from %s"
msgstr ""

#. TRANS: Text in e-mail summary.
#. TRANS: %1$s is the StatusNet sitename, %2$s is the recipient's profile
#. name.
#: lib/useremailsummaryhandler.php:140
#, php-format
msgid "Recent updates from %1$s for %2$s:"
msgstr ""

#. TRANS: Link text for link to conversation view.
#: lib/useremailsummaryhandler.php:188
msgid "in context"
msgstr ""

#. TRANS: Link text for link to e-mail settings.
#. TRANS: %1$s is a link to the e-mail settings, %2$s is the StatusNet
#. sitename.
#: lib/useremailsummaryhandler.php:198
#, php-format
msgid "change your email settings for %2$s"
msgstr ""

#. TRANS: Plugin description.
#: EmailSummaryPlugin.php:77
msgid "Send an email summary of the inbox to users."
msgstr ""

#. TRANS: Checkbox label in e-mail preferences form.
#: EmailSummaryPlugin.php:108
msgid "Send me a periodic summary of updates from my network"
msgstr ""

repo_name: piratas/tortuga

license: mit


code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: GNU social\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-02-02 17:47+0100\n"
"PO-Revision-Date: 2015-02-07 09:30+0000\n"
"Last-Translator: digitaldreamer <digitaldreamer@email.cz>\n"
"Language-Team: Nepali (http://www.transifex.com/projects/p/gnu-social/language/ne/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ne\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Subject for e-mail.
#: lib/useremailsummaryhandler.php:125
#, php-format
msgid "Your latest updates from %s"
msgstr ""

#. TRANS: Text in e-mail summary.
#. TRANS: %1$s is the StatusNet sitename, %2$s is the recipient's profile
#. name.
#: lib/useremailsummaryhandler.php:140
#, php-format
msgid "Recent updates from %1$s for %2$s:"
msgstr ""

#. TRANS: Link text for link to conversation view.
#: lib/useremailsummaryhandler.php:188
msgid "in context"
msgstr ""

#. TRANS: Link text for link to e-mail settings.
#. TRANS: %1$s is a link to the e-mail settings, %2$s is the StatusNet
#. sitename.
#: lib/useremailsummaryhandler.php:198
#, php-format
msgid "change your email settings for %2$s"
msgstr ""

#. TRANS: Plugin description.
#: EmailSummaryPlugin.php:77
msgid "Send an email summary of the inbox to users."
msgstr ""

#. TRANS: Checkbox label in e-mail preferences form.
#: EmailSummaryPlugin.php:108
msgid "Send me a periodic summary of updates from my network"
msgstr ""


code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: GNU social\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-02-02 17:47+0100\n"
"PO-Revision-Date: 2015-02-06 16:26+0000\n"
"Last-Translator: digitaldreamer <digitaldreamer@email.cz>\n"
"Language-Team: Dutch (http://www.transifex.com/projects/p/gnu-social/language/nl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: nl\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Subject for e-mail.
#: lib/useremailsummaryhandler.php:125
#, php-format
msgid "Your latest updates from %s"
msgstr "Uw recentste updates van %s"

#. TRANS: Text in e-mail summary.
#. TRANS: %1$s is the StatusNet sitename, %2$s is the recipient's profile
#. name.
#: lib/useremailsummaryhandler.php:140
#, php-format
msgid "Recent updates from %1$s for %2$s:"
msgstr "Recente updates van %1$s voor %2$s:"

#. TRANS: Link text for link to conversation view.
#: lib/useremailsummaryhandler.php:188
msgid "in context"
msgstr "in context"

#. TRANS: Link text for link to e-mail settings.
#. TRANS: %1$s is a link to the e-mail settings, %2$s is the StatusNet
#. sitename.
#: lib/useremailsummaryhandler.php:198
#, php-format
msgid "change your email settings for %2$s"
msgstr "wijzig uw e-mailinstellingen voor %2$s"

#. TRANS: Plugin description.
#: EmailSummaryPlugin.php:77
msgid "Send an email summary of the inbox to users."
msgstr "E-mailsamenvatting verzenden naar het Postvak IN van gebruikers."

#. TRANS: Checkbox label in e-mail preferences form.
#: EmailSummaryPlugin.php:108
msgid "Send me a periodic summary of updates from my network"
msgstr "Stuur mij periodiek een samenvatting van de updates in mijn netwerk"


code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: GNU social\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-02-02 17:47+0100\n"
"PO-Revision-Date: 2015-02-06 16:15+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Norwegian Nynorsk (http://www.transifex.com/projects/p/gnu-social/language/nn/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: nn\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Subject for e-mail.
#: lib/useremailsummaryhandler.php:125
#, php-format
msgid "Your latest updates from %s"
msgstr ""

#. TRANS: Text in e-mail summary.
#. TRANS: %1$s is the StatusNet sitename, %2$s is the recipient's profile
#. name.
#: lib/useremailsummaryhandler.php:140
#, php-format
msgid "Recent updates from %1$s for %2$s:"
msgstr ""

#. TRANS: Link text for link to conversation view.
#: lib/useremailsummaryhandler.php:188
msgid "in context"
msgstr ""

#. TRANS: Link text for link to e-mail settings.
#. TRANS: %1$s is a link to the e-mail settings, %2$s is the StatusNet
#. sitename.
#: lib/useremailsummaryhandler.php:198
#, php-format
msgid "change your email settings for %2$s"
msgstr ""

#. TRANS: Plugin description.
#: EmailSummaryPlugin.php:77
msgid "Send an email summary of the inbox to users."
msgstr ""

#. TRANS: Checkbox label in e-mail preferences form.
#: EmailSummaryPlugin.php:108
msgid "Send me a periodic summary of updates from my network"
msgstr ""


code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: GNU social\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-02-02 17:47+0100\n"
"PO-Revision-Date: 2015-02-06 16:15+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Polish (http://www.transifex.com/projects/p/gnu-social/language/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: pl\n"
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"

#. TRANS: Subject for e-mail.
#: lib/useremailsummaryhandler.php:125
#, php-format
msgid "Your latest updates from %s"
msgstr ""

#. TRANS: Text in e-mail summary.
#. TRANS: %1$s is the StatusNet sitename, %2$s is the recipient's profile
#. name.
#: lib/useremailsummaryhandler.php:140
#, php-format
msgid "Recent updates from %1$s for %2$s:"
msgstr ""

#. TRANS: Link text for link to conversation view.
#: lib/useremailsummaryhandler.php:188
msgid "in context"
msgstr ""

#. TRANS: Link text for link to e-mail settings.
#. TRANS: %1$s is a link to the e-mail settings, %2$s is the StatusNet
#. sitename.
#: lib/useremailsummaryhandler.php:198
#, php-format
msgid "change your email settings for %2$s"
msgstr ""

#. TRANS: Plugin description.
#: EmailSummaryPlugin.php:77
msgid "Send an email summary of the inbox to users."
msgstr ""

#. TRANS: Checkbox label in e-mail preferences form.
#: EmailSummaryPlugin.php:108
msgid "Send me a periodic summary of updates from my network"
msgstr ""


code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: GNU social\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-02-02 17:47+0100\n"
"PO-Revision-Date: 2015-02-06 16:26+0000\n"
"Last-Translator: digitaldreamer <digitaldreamer@email.cz>\n"
"Language-Team: Portuguese (http://www.transifex.com/projects/p/gnu-social/language/pt/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: pt\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Subject for e-mail.
#: lib/useremailsummaryhandler.php:125
#, php-format
msgid "Your latest updates from %s"
msgstr ""

#. TRANS: Text in e-mail summary.
#. TRANS: %1$s is the StatusNet sitename, %2$s is the recipient's profile
#. name.
#: lib/useremailsummaryhandler.php:140
#, php-format
msgid "Recent updates from %1$s for %2$s:"
msgstr ""

#. TRANS: Link text for link to conversation view.
#: lib/useremailsummaryhandler.php:188
msgid "in context"
msgstr ""

#. TRANS: Link text for link to e-mail settings.
#. TRANS: %1$s is a link to the e-mail settings, %2$s is the StatusNet
#. sitename.
#: lib/useremailsummaryhandler.php:198
#, php-format
msgid "change your email settings for %2$s"
msgstr ""

#. TRANS: Plugin description.
#: EmailSummaryPlugin.php:77
msgid "Send an email summary of the inbox to users."
msgstr "Enviar por email um resumo da caixa de entrada aos utilizadores."

#. TRANS: Checkbox label in e-mail preferences form.
#: EmailSummaryPlugin.php:108
msgid "Send me a periodic summary of updates from my network"
msgstr ""


code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Matheus Henrique Silva <hennsilvam@gmail.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: GNU social\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-02-02 17:47+0100\n"
"PO-Revision-Date: 2015-02-25 08:09+0000\n"
"Last-Translator: Matheus Henrique Silva <hennsilvam@gmail.com>\n"
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/gnu-social/language/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: pt_BR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#. TRANS: Subject for e-mail.
#: lib/useremailsummaryhandler.php:125
#, php-format
msgid "Your latest updates from %s"
msgstr "Suas últimas atualizações de %s"

#. TRANS: Text in e-mail summary.
#. TRANS: %1$s is the StatusNet sitename, %2$s is the recipient's profile
#. name.
#: lib/useremailsummaryhandler.php:140
#, php-format
msgid "Recent updates from %1$s for %2$s:"
msgstr "Suas recentes atualizações de %1$s para %2$s:"

#. TRANS: Link text for link to conversation view.
#: lib/useremailsummaryhandler.php:188
msgid "in context"
msgstr "Dentro do contexto."

#. TRANS: Link text for link to e-mail settings.
#. TRANS: %1$s is a link to the e-mail settings, %2$s is the StatusNet
#. sitename.
#: lib/useremailsummaryhandler.php:198
#, php-format
msgid "change your email settings for %2$s"
msgstr "a href=\"%1$s\">altere as configurações de seu email para %2$s"

#. TRANS: Plugin description.
#: EmailSummaryPlugin.php:77
msgid "Send an email summary of the inbox to users."
msgstr "Envie qualquer síntense de email de sua caixa para outros usuários."

#. TRANS: Checkbox label in e-mail preferences form.
#: EmailSummaryPlugin.php:108
msgid "Send me a periodic summary of updates from my network"
msgstr "Me envie uma síntese periódica relativa as atualizações de minha rede."


code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: GNU social\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-02-02 17:47+0100\n"
"PO-Revision-Date: 2015-02-06 16:26+0000\n"
"Last-Translator: digitaldreamer <digitaldreamer@email.cz>\n"
"Language-Team: Russian (http://www.transifex.com/projects/p/gnu-social/language/ru/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\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: Subject for e-mail.
#: lib/useremailsummaryhandler.php:125
#, php-format
msgid "Your latest updates from %s"
msgstr ""

#. TRANS: Text in e-mail summary.
#. TRANS: %1$s is the StatusNet sitename, %2$s is the recipient's profile
#. name.
#: lib/useremailsummaryhandler.php:140
#, php-format
msgid "Recent updates from %1$s for %2$s:"
msgstr ""

#. TRANS: Link text for link to conversation view.
#: lib/useremailsummaryhandler.php:188
msgid "in context"
msgstr ""

#. TRANS: Link text for link to e-mail settings.
#. TRANS: %1$s is a link to the e-mail settings, %2$s is the StatusNet
#. sitename.
#: lib/useremailsummaryhandler.php:198
#, php-format
msgid "change your email settings for %2$s"
msgstr ""

#. TRANS: Plugin description.
#: EmailSummaryPlugin.php:77
msgid "Send an email summary of the inbox to users."
msgstr "Отправляет обзор входящих сообщений на электронную почту пользователей."

#. TRANS: Checkbox label in e-mail preferences form.
#: EmailSummaryPlugin.php:108
msgid "Send me a periodic summary of updates from my network"
msgstr ""


code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: GNU social\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-02-02 17:47+0100\n"
"PO-Revision-Date: 2015-02-06 16:15+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Serbian (http://www.transifex.com/projects/p/gnu-social/language/sr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: sr\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: Subject for e-mail.
#: lib/useremailsummaryhandler.php:125
#, php-format
msgid "Your latest updates from %s"
msgstr ""

#. TRANS: Text in e-mail summary.
#. TRANS: %1$s is the StatusNet sitename, %2$s is the recipient's profile
#. name.
#: lib/useremailsummaryhandler.php:140
#, php-format
msgid "Recent updates from %1$s for %2$s:"
msgstr ""

#. TRANS: Link text for link to conversation view.
#: lib/useremailsummaryhandler.php:188
msgid "in context"
msgstr ""

#. TRANS: Link text for link to e-mail settings.
#. TRANS: %1$s is a link to the e-mail settings, %2$s is the StatusNet
#. sitename.
#: lib/useremailsummaryhandler.php:198
#, php-format
msgid "change your email settings for %2$s"
msgstr ""

#. TRANS: Plugin description.
#: EmailSummaryPlugin.php:77
msgid "Send an email summary of the inbox to users."
msgstr ""

#. TRANS: Checkbox label in e-mail preferences form.
#: EmailSummaryPlugin.php:108
msgid "Send me a periodic summary of updates from my network"
msgstr ""


code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Kristoffer Grundström <kristoffer.grundstrom1983@gmail.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: GNU social\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-02-02 17:47+0100\n"
"PO-Revision-Date: 2015-02-26 14:55+0000\n"
"Last-Translator: Kristoffer Grundström <kristoffer.grundstrom1983@gmail.com>\n"
"Language-Team: Swedish (http://www.transifex.com/projects/p/gnu-social/language/sv/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: sv\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Subject for e-mail.
#: lib/useremailsummaryhandler.php:125
#, php-format
msgid "Your latest updates from %s"
msgstr "Dina senaste uppdateringar från %s"

#. TRANS: Text in e-mail summary.
#. TRANS: %1$s is the StatusNet sitename, %2$s is the recipient's profile
#. name.
#: lib/useremailsummaryhandler.php:140
#, php-format
msgid "Recent updates from %1$s for %2$s:"
msgstr ""

#. TRANS: Link text for link to conversation view.
#: lib/useremailsummaryhandler.php:188
msgid "in context"
msgstr "I sammanhanget"

#. TRANS: Link text for link to e-mail settings.
#. TRANS: %1$s is a link to the e-mail settings, %2$s is the StatusNet
#. sitename.
#: lib/useremailsummaryhandler.php:198
#, php-format
msgid "change your email settings for %2$s"
msgstr ""

#. TRANS: Plugin description.
#: EmailSummaryPlugin.php:77
msgid "Send an email summary of the inbox to users."
msgstr ""

#. TRANS: Checkbox label in e-mail preferences form.
#: EmailSummaryPlugin.php:108
msgid "Send me a periodic summary of updates from my network"
msgstr ""


code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: GNU social\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-02-02 17:47+0100\n"
"PO-Revision-Date: 2015-02-07 08:48+0000\n"
"Last-Translator: digitaldreamer <digitaldreamer@email.cz>\n"
"Language-Team: Tamil (http://www.transifex.com/projects/p/gnu-social/language/ta/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ta\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Subject for e-mail.
#: lib/useremailsummaryhandler.php:125
#, php-format
msgid "Your latest updates from %s"
msgstr ""

#. TRANS: Text in e-mail summary.
#. TRANS: %1$s is the StatusNet sitename, %2$s is the recipient's profile
#. name.
#: lib/useremailsummaryhandler.php:140
#, php-format
msgid "Recent updates from %1$s for %2$s:"
msgstr ""

#. TRANS: Link text for link to conversation view.
#: lib/useremailsummaryhandler.php:188
msgid "in context"
msgstr ""

#. TRANS: Link text for link to e-mail settings.
#. TRANS: %1$s is a link to the e-mail settings, %2$s is the StatusNet
#. sitename.
#: lib/useremailsummaryhandler.php:198
#, php-format
msgid "change your email settings for %2$s"
msgstr ""

#. TRANS: Plugin description.
#: EmailSummaryPlugin.php:77
msgid "Send an email summary of the inbox to users."
msgstr ""

#. TRANS: Checkbox label in e-mail preferences form.
#: EmailSummaryPlugin.php:108
msgid "Send me a periodic summary of updates from my network"
msgstr ""


code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: GNU social\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-02-02 17:47+0100\n"
"PO-Revision-Date: 2015-02-06 16:15+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Telugu (http://www.transifex.com/projects/p/gnu-social/language/te/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: te\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Subject for e-mail.
#: lib/useremailsummaryhandler.php:125
#, php-format
msgid "Your latest updates from %s"
msgstr ""

#. TRANS: Text in e-mail summary.
#. TRANS: %1$s is the StatusNet sitename, %2$s is the recipient's profile
#. name.
#: lib/useremailsummaryhandler.php:140
#, php-format
msgid "Recent updates from %1$s for %2$s:"
msgstr ""

#. TRANS: Link text for link to conversation view.
#: lib/useremailsummaryhandler.php:188
msgid "in context"
msgstr ""

#. TRANS: Link text for link to e-mail settings.
#. TRANS: %1$s is a link to the e-mail settings, %2$s is the StatusNet
#. sitename.
#: lib/useremailsummaryhandler.php:198
#, php-format
msgid "change your email settings for %2$s"
msgstr ""

#. TRANS: Plugin description.
#: EmailSummaryPlugin.php:77
msgid "Send an email summary of the inbox to users."
msgstr ""

#. TRANS: Checkbox label in e-mail preferences form.
#: EmailSummaryPlugin.php:108
msgid "Send me a periodic summary of updates from my network"
msgstr ""


code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: GNU social\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-02-02 17:47+0100\n"
"PO-Revision-Date: 2015-02-06 16:26+0000\n"
"Last-Translator: digitaldreamer <digitaldreamer@email.cz>\n"
"Language-Team: Tagalog (http://www.transifex.com/projects/p/gnu-social/language/tl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: tl\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#. TRANS: Subject for e-mail.
#: lib/useremailsummaryhandler.php:125
#, php-format
msgid "Your latest updates from %s"
msgstr "Pinakahuli mong mga pagsasapanahon mula sa %s"

#. TRANS: Text in e-mail summary.
#. TRANS: %1$s is the StatusNet sitename, %2$s is the recipient's profile
#. name.
#: lib/useremailsummaryhandler.php:140
#, php-format
msgid "Recent updates from %1$s for %2$s:"
msgstr "Kamakailang mga pagsasapanahon magmula sa %1$s para kay %2$s:"

#. TRANS: Link text for link to conversation view.
#: lib/useremailsummaryhandler.php:188
msgid "in context"
msgstr "sa loob ng diwa"

#. TRANS: Link text for link to e-mail settings.
#. TRANS: %1$s is a link to the e-mail settings, %2$s is the StatusNet
#. sitename.
#: lib/useremailsummaryhandler.php:198
#, php-format
msgid "change your email settings for %2$s"
msgstr "baguhin ang mga katakdaan mo ng e-liham para sa %2$s"

#. TRANS: Plugin description.
#: EmailSummaryPlugin.php:77
msgid "Send an email summary of the inbox to users."
msgstr "Magpadala sa mga tagagamit ng isang buod mula sa e-liham ng kahong-tanggapan."

#. TRANS: Checkbox label in e-mail preferences form.
#: EmailSummaryPlugin.php:108
msgid "Send me a periodic summary of updates from my network"
msgstr "Padalhan ako ng isang pana-panahong mga buod ng mga pagsasapanahon mula sa lambatan ko"


code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: GNU social\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-02-02 17:47+0100\n"
"PO-Revision-Date: 2015-02-06 16:15+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Turkish (http://www.transifex.com/projects/p/gnu-social/language/tr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: tr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#. TRANS: Subject for e-mail.
#: lib/useremailsummaryhandler.php:125
#, php-format
msgid "Your latest updates from %s"
msgstr ""

#. TRANS: Text in e-mail summary.
#. TRANS: %1$s is the StatusNet sitename, %2$s is the recipient's profile
#. name.
#: lib/useremailsummaryhandler.php:140
#, php-format
msgid "Recent updates from %1$s for %2$s:"
msgstr ""

#. TRANS: Link text for link to conversation view.
#: lib/useremailsummaryhandler.php:188
msgid "in context"
msgstr ""

#. TRANS: Link text for link to e-mail settings.
#. TRANS: %1$s is a link to the e-mail settings, %2$s is the StatusNet
#. sitename.
#: lib/useremailsummaryhandler.php:198
#, php-format
msgid "change your email settings for %2$s"
msgstr ""

#. TRANS: Plugin description.
#: EmailSummaryPlugin.php:77
msgid "Send an email summary of the inbox to users."
msgstr ""

#. TRANS: Checkbox label in e-mail preferences form.
#: EmailSummaryPlugin.php:108
msgid "Send me a periodic summary of updates from my network"
msgstr ""


code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: GNU social\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-02-02 17:47+0100\n"
"PO-Revision-Date: 2015-02-06 16:26+0000\n"
"Last-Translator: digitaldreamer <digitaldreamer@email.cz>\n"
"Language-Team: Ukrainian (http://www.transifex.com/projects/p/gnu-social/language/uk/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: uk\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: Subject for e-mail.
#: lib/useremailsummaryhandler.php:125
#, php-format
msgid "Your latest updates from %s"
msgstr ""

#. TRANS: Text in e-mail summary.
#. TRANS: %1$s is the StatusNet sitename, %2$s is the recipient's profile
#. name.
#: lib/useremailsummaryhandler.php:140
#, php-format
msgid "Recent updates from %1$s for %2$s:"
msgstr "Поточні оновлення від %1$s для %2$s:"

#. TRANS: Link text for link to conversation view.
#: lib/useremailsummaryhandler.php:188
msgid "in context"
msgstr "у контексті"

#. TRANS: Link text for link to e-mail settings.
#. TRANS: %1$s is a link to the e-mail settings, %2$s is the StatusNet
#. sitename.
#: lib/useremailsummaryhandler.php:198
#, php-format
msgid "change your email settings for %2$s"
msgstr "змінити налаштування електронної пошти для %2$s"

#. TRANS: Plugin description.
#: EmailSummaryPlugin.php:77
msgid "Send an email summary of the inbox to users."
msgstr "Надсилає електронною поштою перелік вхідних приватних повідомлень, адресованих користувачеві."

#. TRANS: Checkbox label in e-mail preferences form.
#: EmailSummaryPlugin.php:108
msgid "Send me a periodic summary of updates from my network"
msgstr "Надсилати мені електронною поштою сумарний перелік оновлень моєї мережі."


code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: GNU social\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-02-02 17:47+0100\n"
"PO-Revision-Date: 2015-02-06 16:15+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Urdu (Pakistan) (http://www.transifex.com/projects/p/gnu-social/language/ur_PK/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ur_PK\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Subject for e-mail.
#: lib/useremailsummaryhandler.php:125
#, php-format
msgid "Your latest updates from %s"
msgstr ""

#. TRANS: Text in e-mail summary.
#. TRANS: %1$s is the StatusNet sitename, %2$s is the recipient's profile
#. name.
#: lib/useremailsummaryhandler.php:140
#, php-format
msgid "Recent updates from %1$s for %2$s:"
msgstr ""

#. TRANS: Link text for link to conversation view.
#: lib/useremailsummaryhandler.php:188
msgid "in context"
msgstr ""

#. TRANS: Link text for link to e-mail settings.
#. TRANS: %1$s is a link to the e-mail settings, %2$s is the StatusNet
#. sitename.
#: lib/useremailsummaryhandler.php:198
#, php-format
msgid "change your email settings for %2$s"
msgstr ""

#. TRANS: Plugin description.
#: EmailSummaryPlugin.php:77
msgid "Send an email summary of the inbox to users."
msgstr ""

#. TRANS: Checkbox label in e-mail preferences form.
#: EmailSummaryPlugin.php:108
msgid "Send me a periodic summary of updates from my network"
msgstr ""


code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: GNU social\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-02-02 17:47+0100\n"
"PO-Revision-Date: 2015-02-06 16:15+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Vietnamese (http://www.transifex.com/projects/p/gnu-social/language/vi/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: vi\n"
"Plural-Forms: nplurals=1; plural=0;\n"

#. TRANS: Subject for e-mail.
#: lib/useremailsummaryhandler.php:125
#, php-format
msgid "Your latest updates from %s"
msgstr ""

#. TRANS: Text in e-mail summary.
#. TRANS: %1$s is the StatusNet sitename, %2$s is the recipient's profile
#. name.
#: lib/useremailsummaryhandler.php:140
#, php-format
msgid "Recent updates from %1$s for %2$s:"
msgstr ""

#. TRANS: Link text for link to conversation view.
#: lib/useremailsummaryhandler.php:188
msgid "in context"
msgstr ""

#. TRANS: Link text for link to e-mail settings.
#. TRANS: %1$s is a link to the e-mail settings, %2$s is the StatusNet
#. sitename.
#: lib/useremailsummaryhandler.php:198
#, php-format
msgid "change your email settings for %2$s"
msgstr ""

#. TRANS: Plugin description.
#: EmailSummaryPlugin.php:77
msgid "Send an email summary of the inbox to users."
msgstr ""

#. TRANS: Checkbox label in e-mail preferences form.
#: EmailSummaryPlugin.php:108
msgid "Send me a periodic summary of updates from my network"
msgstr ""


code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: GNU social\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-02-02 17:47+0100\n"
"PO-Revision-Date: 2015-02-06 16:26+0000\n"
"Last-Translator: digitaldreamer <digitaldreamer@email.cz>\n"
"Language-Team: Chinese (China) (http://www.transifex.com/projects/p/gnu-social/language/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"

#. TRANS: Subject for e-mail.
#: lib/useremailsummaryhandler.php:125
#, php-format
msgid "Your latest updates from %s"
msgstr ""

#. TRANS: Text in e-mail summary.
#. TRANS: %1$s is the StatusNet sitename, %2$s is the recipient's profile
#. name.
#: lib/useremailsummaryhandler.php:140
#, php-format
msgid "Recent updates from %1$s for %2$s:"
msgstr ""

#. TRANS: Link text for link to conversation view.
#: lib/useremailsummaryhandler.php:188
msgid "in context"
msgstr ""

#. TRANS: Link text for link to e-mail settings.
#. TRANS: %1$s is a link to the e-mail settings, %2$s is the StatusNet
#. sitename.
#: lib/useremailsummaryhandler.php:198
#, php-format
msgid "change your email settings for %2$s"
msgstr ""

#. TRANS: Plugin description.
#: EmailSummaryPlugin.php:77
msgid "Send an email summary of the inbox to users."
msgstr "发送到用户的收件箱的电子邮件综述。"

#. TRANS: Checkbox label in e-mail preferences form.
#: EmailSummaryPlugin.php:108
msgid "Send me a periodic summary of updates from my network"
msgstr ""


code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: GNU social\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-02-02 17:47+0100\n"
"PO-Revision-Date: 2015-02-06 16:15+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Chinese (Taiwan) (http://www.transifex.com/projects/p/gnu-social/language/zh_TW/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_TW\n"
"Plural-Forms: nplurals=1; plural=0;\n"

#. TRANS: Subject for e-mail.
#: lib/useremailsummaryhandler.php:125
#, php-format
msgid "Your latest updates from %s"
msgstr ""

#. TRANS: Text in e-mail summary.
#. TRANS: %1$s is the StatusNet sitename, %2$s is the recipient's profile
#. name.
#: lib/useremailsummaryhandler.php:140
#, php-format
msgid "Recent updates from %1$s for %2$s:"
msgstr ""

#. TRANS: Link text for link to conversation view.
#: lib/useremailsummaryhandler.php:188
msgid "in context"
msgstr ""

#. TRANS: Link text for link to e-mail settings.
#. TRANS: %1$s is a link to the e-mail settings, %2$s is the StatusNet
#. sitename.
#: lib/useremailsummaryhandler.php:198
#, php-format
msgid "change your email settings for %2$s"
msgstr ""

#. TRANS: Plugin description.
#: EmailSummaryPlugin.php:77
msgid "Send an email summary of the inbox to users."
msgstr ""

#. TRANS: Checkbox label in e-mail preferences form.
#: EmailSummaryPlugin.php:108
msgid "Send me a periodic summary of updates from my network"
msgstr ""


code:
<?php
/*
 * StatusNet - a 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/>.
 */

define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..'));

$shortoptions = 'i:n:au';
$longoptions = array('id=', 'nickname=', 'all', 'universe');

$helptext = <<<END_OF_SENDEMAILSUMMARY_HELP
sendemailsummary.php [options]
Send an email summary of the inbox to users

 -i --id       ID of user to send summary to
 -n --nickname nickname of the user to send summary to
 -a --all      send summary to all users
 -u --universe send summary to all users on all sites

END_OF_SENDEMAILSUMMARY_HELP;

require_once INSTALLDIR.'/scripts/commandline.inc';

if (have_option('u', 'universe')) {
    $sn = new Status_network();
    if ($sn->find()) {
        while ($sn->fetch()) {
            $server = $sn->getServerName();
            GNUsocial::init($server);
            // Different queue manager, maybe!
            $qm = QueueManager::get();
            $qm->enqueue(1, 'sitesum');
        }
    }
} else {
    $qm = QueueManager::get();
    // enqueue summary for user or all users
    try {
        $user = getUser();
        $qm->enqueue($user->id, 'usersum');
    } catch (NoUserArgumentException $nuae) {
        $qm->enqueue(1, 'sitesum');
    }
}


code:
<?php
/**
 * StatusNet - the distributed open-source microblogging tool
 * Copyright (C) 2011, StatusNet, Inc.
 *
 * Microapp plugin for event invitations and RSVPs
 *
 * 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  Event
 * @package   StatusNet
 * @author    Evan Prodromou <evan@status.net>
 * @copyright 2011 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);
}

/**
 * Event plugin
 *
 * @category  Event
 * @package   StatusNet
 * @author    Evan Prodromou <evan@status.net>
 * @copyright 2011 StatusNet, Inc.
 * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
 * @link      http://status.net/
 */
class EventPlugin extends MicroAppPlugin
{
    /**
     * Set up our tables (event and rsvp)
     *
     * @see Schema
     * @see ColumnDef
     *
     * @return boolean hook value; true means continue processing, false means stop.
     */
    function onCheckSchema()
    {
        $schema = Schema::get();

        $schema->ensureTable('happening', Happening::schemaDef());
        $schema->ensureTable('rsvp', RSVP::schemaDef());

        return true;
    }

    /**
     * Map URLs to actions
     *
     * @param URLMapper $m path-to-action mapper
     *
     * @return boolean hook value; true means continue processing, false means stop.
     */
    public function onRouterInitialized(URLMapper $m)
    {
        $m->connect('main/event/new',
                    array('action' => 'newevent'));
        $m->connect('main/event/rsvp',
                    array('action' => 'newrsvp'));
        $m->connect('main/event/rsvp/cancel',
                    array('action' => 'cancelrsvp'));
        $m->connect('event/:id',
                    array('action' => 'showevent'),
                    array('id' => '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'));
        $m->connect('rsvp/:id',
                    array('action' => 'showrsvp'),
                    array('id' => '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'));
        $m->connect('main/event/updatetimes',
                    array('action' => 'timelist'));
        return true;
    }

    function onPluginVersion(&$versions)
    {
        $versions[] = array('name' => 'Event',
                            'version' => GNUSOCIAL_VERSION,
                            'author' => 'Evan Prodromou',
                            'homepage' => 'http://status.net/wiki/Plugin:Event',
                            'description' =>
                            // TRANS: Plugin description.
                            _m('Event invitations and RSVPs.'));
        return true;
    }

    function appTitle() {
        // TRANS: Title for event application.
        return _m('TITLE','Event');
    }

    function tag() {
        return 'event';
    }

    function types() {
        return array(Happening::OBJECT_TYPE,
                     RSVP::POSITIVE,
                     RSVP::NEGATIVE,
                     RSVP::POSSIBLE);
    }

    /**
     * Given a parsed ActivityStreams activity, save it into a notice
     * and other data structures.
     *
     * @param Activity $activity
     * @param Profile $actor
     * @param array $options=array()
     *
     * @return Notice the resulting notice
     */
    function saveNoticeFromActivity(Activity $activity, Profile $actor, array $options=array())
    {
        if (count($activity->objects) != 1) {
            // TRANS: Exception thrown when there are too many activity objects.
            throw new Exception(_m('Too many activity objects.'));
        }

        $happeningObj = $activity->objects[0];

        if ($happeningObj->type != Happening::OBJECT_TYPE) {
            // TRANS: Exception thrown when event plugin comes across a non-event type object.
            throw new Exception(_m('Wrong type for object.'));
        }

        $notice = null;

        switch ($activity->verb) {
        case ActivityVerb::POST:
        	// FIXME: get startTime, endTime, location and URL
            $notice = Happening::saveNew($actor,
                                         $start_time,
                                         $end_time,
                                         $happeningObj->title,
                                         null,
                                         $happeningObj->summary,
                                         null,
                                         $options);
            break;
        case RSVP::POSITIVE:
        case RSVP::NEGATIVE:
        case RSVP::POSSIBLE:
            $happening = Happening::getKV('uri', $happeningObj->id);
            if (empty($happening)) {
                // FIXME: save the event
                // TRANS: Exception thrown when trying to RSVP for an unknown event.
                throw new Exception(_m('RSVP for unknown event.'));
            }
            $notice = RSVP::saveNew($actor, $happening, $activity->verb, $options);
            break;
        default:
            // TRANS: Exception thrown when event plugin comes across a undefined verb.
            throw new Exception(_m('Unknown verb for events.'));
        }

        return $notice;
    }

    /**
     * Turn a Notice into an activity object
     *
     * @param Notice $notice
     *
     * @return ActivityObject
     */
    function activityObjectFromNotice(Notice $notice)
    {
        $happening = null;

        switch ($notice->object_type) {
        case Happening::OBJECT_TYPE:
            $happening = Happening::fromNotice($notice);
            break;
        case RSVP::POSITIVE:
        case RSVP::NEGATIVE:
        case RSVP::POSSIBLE:
            $rsvp  = RSVP::fromNotice($notice);
            $happening = $rsvp->getEvent();
            break;
        }

        if (empty($happening)) {
            // TRANS: Exception thrown when event plugin comes across a unknown object type.
            throw new Exception(_m('Unknown object type.'));
        }

        $notice = $happening->getNotice();

        if (empty($notice)) {
            // TRANS: Exception thrown when referring to a notice that is not an event an in event context.
            throw new Exception(_m('Unknown event notice.'));
        }

        $obj = new ActivityObject();

        $obj->id      = $happening->uri;
        $obj->type    = Happening::OBJECT_TYPE;
        $obj->title   = $happening->title;
        $obj->summary = $happening->description;
        $obj->link    = $notice->getUrl();

        // XXX: how to get this stuff into JSON?!

        $obj->extra[] = array('dtstart',
                              array('xmlns' => 'urn:ietf:params:xml:ns:xcal'),
                              common_date_iso8601($happening->start_time));

        $obj->extra[] = array('dtend',
                              array('xmlns' => 'urn:ietf:params:xml:ns:xcal'),
                              common_date_iso8601($happening->end_time));

		// FIXME: add location
		// FIXME: add URL

        // XXX: probably need other stuff here

        return $obj;
    }

    /**
     * Change the verb on RSVP notices
     *
     * @param Notice $notice
     *
     * @return ActivityObject
     */
    protected function extendActivity(Notice $stored, Activity $act, Profile $scoped=null) {
        switch ($stored->object_type) {
        case RSVP::POSITIVE:
        case RSVP::NEGATIVE:
        case RSVP::POSSIBLE:
            $act->verb = $stored->object_type;
            break;
        }
        return true;
    }

    /**
     * Form for our app
     *
     * @param HTMLOutputter $out
     * @return Widget
     */
    function entryForm($out)
    {
        return new EventForm($out);
    }

    /**
     * When a notice is deleted, clean up related tables.
     *
     * @param Notice $notice
     */
    function deleteRelated(Notice $notice)
    {
        switch ($notice->object_type) {
        case Happening::OBJECT_TYPE:
            common_log(LOG_DEBUG, "Deleting event from notice...");
            $happening = Happening::fromNotice($notice);
            $happening->delete();
            break;
        case RSVP::POSITIVE:
        case RSVP::NEGATIVE:
        case RSVP::POSSIBLE:
            common_log(LOG_DEBUG, "Deleting rsvp from notice...");
            $rsvp = RSVP::fromNotice($notice);
            common_log(LOG_DEBUG, "to delete: $rsvp->id");
            $rsvp->delete();
            break;
        default:
            common_log(LOG_DEBUG, "Not deleting related, wtf...");
        }
    }

    function onEndShowScripts($action)
    {
        $action->script($this->path('js/event.js'));
    }

    function onEndShowStyles($action)
    {
        $action->cssLink($this->path('css/event.css'));
        return true;
    }

    function onStartAddNoticeReply($nli, $parent, $child)
    {
        // Filter out any poll responses
        if (($parent->object_type == Happening::OBJECT_TYPE) &&
            in_array($child->object_type, array(RSVP::POSITIVE, RSVP::NEGATIVE, RSVP::POSSIBLE))) {
            return false;
        }
        return true;
    }

    protected function showNoticeItemNotice(NoticeListItem $nli)
    {
        $nli->showAuthor();
        $nli->showContent();
    }

    protected function showNoticeContent(Notice $stored, HTMLOutputter $out, Profile $scoped=null)
    {
        switch ($stored->object_type) {
        case Happening::OBJECT_TYPE:
            $this->showEvent($stored, $out, $scoped);
            break;
        case RSVP::POSITIVE:
        case RSVP::NEGATIVE:
        case RSVP::POSSIBLE:
            $this->showRSVP($stored, $out, $scoped);
            break;
        }
    }

    protected function showEvent(Notice $stored, HTMLOutputter $out, Profile $scoped=null)
    {
        $profile = $stored->getProfile();
        $event   = Happening::fromNotice($stored);

        if (!$event instanceof Happening) {
            // TRANS: Content for a deleted RSVP list item (RSVP stands for "please respond").
            $out->element('p', null, _m('Deleted.'));
            return;
        }

        $out->elementStart('div', 'h-event');

        $out->elementStart('h3', 'p-summary p-name');

        try {
            $out->element('a', array('href' => $event->getUrl()), $event->title);
        } catch (InvalidUrlException $e) {
            $out->text($event->title);
        }

        $out->elementEnd('h3');

        $now       = new DateTime();
        $startDate = new DateTime($event->start_time);
        $endDate   = new DateTime($event->end_time);
        $userTz    = new DateTimeZone(common_timezone());

        // Localize the time for the observer
        $now->setTimeZone($userTz);
        $startDate->setTimezone($userTz);
        $endDate->setTimezone($userTz);

        $thisYear  = $now->format('Y');
        $startYear = $startDate->format('Y');
        $endYear   = $endDate->format('Y');

        $dateFmt = 'D, F j, '; // e.g.: Mon, Aug 31

        if ($startYear != $thisYear || $endYear != $thisYear) {
            $dateFmt .= 'Y,'; // append year if we need to think about years
        }

        $startDateStr = $startDate->format($dateFmt);
        $endDateStr = $endDate->format($dateFmt);

        $timeFmt = 'g:ia';

        $startTimeStr = $startDate->format($timeFmt);
        $endTimeStr = $endDate->format("{$timeFmt} (T)");

        $out->elementStart('div', 'event-times'); // VEVENT/EVENT-TIMES IN

        // TRANS: Field label for event description.
        $out->element('strong', null, _m('Time:'));

        $out->element('time', array('class' => 'dt-start',
                                    'datetime' => common_date_iso8601($event->start_time)),
                      $startDateStr . ' ' . $startTimeStr);
        $out->text(' – ');
        $out->element('time', array('class' => 'dt-end',
                                    'datetime' => common_date_iso8601($event->end_time)),
                      $startDateStr != $endDateStr
                                    ? "$endDateStr $endTimeStr"
                                    :  $endTimeStr);

        $out->elementEnd('div'); // VEVENT/EVENT-TIMES OUT

        if (!empty($event->location)) {
            $out->elementStart('div', 'event-location');
            // TRANS: Field label for event description.
            $out->element('strong', null, _m('Location:'));
            $out->element('span', 'p-location', $event->location);
            $out->elementEnd('div');
        }

        if (!empty($event->description)) {
            $out->elementStart('div', 'event-description');
            // TRANS: Field label for event description.
            $out->element('strong', null, _m('Description:'));
            $out->element('div', 'p-description', $event->description);
            $out->elementEnd('div');
        }

        $rsvps = $event->getRSVPs();

        $out->elementStart('div', 'event-rsvps');

        // TRANS: Field label for event description.
        $out->element('strong', null, _m('Attending:'));
        $out->elementStart('ul', 'attending-list');

        foreach ($rsvps as $verb => $responses) {
            $out->elementStart('li', 'rsvp-list');
            switch ($verb) {
            case RSVP::POSITIVE:
                $out->text(_('Yes:'));
                break;
            case RSVP::NEGATIVE:
                $out->text(_('No:'));
                break;
            case RSVP::POSSIBLE:
                $out->text(_('Maybe:'));
                break;
            }
            $ids = array();
            foreach ($responses as $response) {
                $ids[] = $response->profile_id;
            }
            $ids = array_slice($ids, 0, ProfileMiniList::MAX_PROFILES + 1);
            $minilist = new ProfileMiniList(Profile::multiGet('id', $ids), $out);
            $minilist->show();

            $out->elementEnd('li');
        }

        $out->elementEnd('ul');
        $out->elementEnd('div');

        if ($scoped instanceof Profile) {
            $rsvp = $event->getRSVP($scoped);

            if (empty($rsvp)) {
                $form = new RSVPForm($event, $out);
            } else {
                $form = new CancelRSVPForm($rsvp, $out);
            }

            $form->show();
        }
        $out->elementEnd('div');
    }

    protected function showRSVP(Notice $stored, HTMLOutputter $out, Profile $scoped=null)
    {
        $rsvp = RSVP::fromNotice($stored);

        if (empty($rsvp)) {
            // TRANS: Content for a deleted RSVP list item (RSVP stands for "please respond").
            $out->element('p', null, _m('Deleted.'));
            return;
        }

        $out->elementStart('div', 'rsvp');
        $out->raw($rsvp->asHTML());
        $out->elementEnd('div');
    }
}


code:
<?php
/**
 * StatusNet - the distributed open-source microblogging tool
 * Copyright (C) 2011, StatusNet, Inc.
 *
 * Cancel the RSVP for an event
 *
 * 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  Event
 * @package   StatusNet
 * @author    Evan Prodromou <evan@status.net>
 * @copyright 2011 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);
}

/**
 * RSVP for an event
 *
 * @category  Event
 * @package   StatusNet
 * @author    Evan Prodromou <evan@status.net>
 * @copyright 2011 StatusNet, Inc.
 * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
 * @link      http://status.net/
 */
class CancelrsvpAction extends Action
{
    protected $user  = null;
    protected $rsvp  = null;
    protected $event = null;

    /**
     * Returns the title of the action
     *
     * @return string Action title
     */
    function title()
    {
        // TRANS: Title for RSVP ("please respond") action.
        return _m('TITLE','Cancel RSVP');
    }

    /**
     * For initializing members of the class.
     *
     * @param array $argarray misc. arguments
     *
     * @return boolean true
     */
    function prepare($argarray)
    {
        parent::prepare($argarray);
        if ($this->boolean('ajax')) {
            GNUsocial::setApi(true); // short error results!
        }

        $rsvpId = $this->trimmed('rsvp');

        if (empty($rsvpId)) {
            // TRANS: Client exception thrown when referring to a non-existing RSVP ("please respond") item.
            throw new ClientException(_m('No such RSVP.'));
        }

        $this->rsvp = RSVP::getKV('id', $rsvpId);

        if (empty($this->rsvp)) {
            // TRANS: Client exception thrown when referring to a non-existing RSVP ("please respond") item.
            throw new ClientException(_m('No such RSVP.'));
        }

        $this->event = Happening::getKV('id', $this->rsvp->event_id);

        if (empty($this->event)) {
            // TRANS: Client exception thrown when referring to a non-existing event.
            throw new ClientException(_m('No such event.'));
        }

        $this->user = common_current_user();

        if (empty($this->user)) {
            // TRANS: Client exception thrown when trying tp RSVP ("please respond") while not logged in.
            throw new ClientException(_m('You must be logged in to RSVP for an event.'));
        }

        return true;
    }

    /**
     * Handler method
     *
     * @param array $argarray is ignored since it's now passed in in prepare()
     *
     * @return void
     */
    function handle($argarray=null)
    {
        parent::handle($argarray);

        if ($this->isPost()) {
            $this->cancelRSVP();
        } else {
            $this->showPage();
        }

        return;
    }

    /**
     * Add a new event
     *
     * @return void
     */
    function cancelRSVP()
    {
        try {
            $notice = $this->rsvp->getNotice();
            // NB: this will delete the rsvp, too
            if (!empty($notice)) {
                common_log(LOG_DEBUG, "Deleting notice...");
                $notice->delete();
            } else {
                common_log(LOG_DEBUG, "Deleting RSVP alone...");
                $this->rsvp->delete();
            }
        } catch (ClientException $ce) {
            $this->error = $ce->getMessage();
            $this->showPage();
            return;
        }

        if ($this->boolean('ajax')) {
            $this->startHTML('text/xml;charset=utf-8');
            $this->elementStart('head');
            // TRANS: Page title after sending a notice.
            $this->element('title', null, _m('Event saved'));
            $this->elementEnd('head');
            $this->elementStart('body');
            $form = new RSVPForm($this->event, $this);
            $form->show();
            $this->elementEnd('body');
            $this->endHTML();
        }
    }

    /**
     * Show the event form
     *
     * @return void
     */
    function showContent()
    {
        if (!empty($this->error)) {
            $this->element('p', 'error', $this->error);
        }

        $form = new CancelRSVPForm($this->rsvp, $this);

        $form->show();

        return;
    }

    /**
     * Return true if read only.
     *
     * MAY override
     *
     * @param array $args other arguments
     *
     * @return boolean is read only action?
     */
    function isReadOnly($args)
    {
        if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
            $_SERVER['REQUEST_METHOD'] == 'HEAD') {
            return true;
        } else {
            return false;
        }
    }
}


code:
<?php
/**
 * StatusNet - the distributed open-source microblogging tool
 * Copyright (C) 2011, StatusNet, Inc.
 *
 * Add a new event
 *
 * 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  Event
 * @package   StatusNet
 * @author    Evan Prodromou <evan@status.net>
 * @copyright 2011 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);
}

/**
 * Add a new event
 *
 * @category  Event
 * @package   StatusNet
 * @author    Evan Prodromou <evan@status.net>
 * @copyright 2011 StatusNet, Inc.
 * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
 * @link      http://status.net/
 */
class NeweventAction extends Action
{
    protected $user        = null;
    protected $error       = null;
    protected $complete    = null;
    protected $title       = null;
    protected $location    = null;
    protected $description = null;
    protected $startTime   = null;
    protected $endTime     = null;

    /**
     * Returns the title of the action
     *
     * @return string Action title
     */
    function title()
    {
        // TRANS: Title for new event form.
        return _m('TITLE','New event');
    }

    /**
     * For initializing members of the class.
     *
     * @param array $argarray misc. arguments
     *
     * @return boolean true
     */
    function prepare($argarray)
    {
        parent::prepare($argarray);

        $this->user = common_current_user();

        if (empty($this->user)) {
            // TRANS: Client exception thrown when trying to post an event while not logged in.
            throw new ClientException(_m('Must be logged in to post a event.'),
                                      403);
        }

        if ($this->isPost()) {
            $this->checkSessionToken();
        }

        try {

            $this->title = $this->trimmed('title');

            if (empty($this->title)) {
                // TRANS: Client exception thrown when trying to post an event without providing a title.
                throw new ClientException(_m('Title required.'));
            }

            $this->location    = $this->trimmed('location');
            $this->url         = $this->trimmed('url');
            $this->description = $this->trimmed('description');
            $tz                = $this->trimmed('tz');

            $startDate = $this->trimmed('startdate');

            if (empty($startDate)) {
                // TRANS: Client exception thrown when trying to post an event without providing a start date.
                throw new ClientException(_m('Start date required.'));
            }

            $startTime = $this->trimmed('event-starttime');

            if (empty($startTime)) {
                $startTime = '00:00';
            }

            $endDate   = $this->trimmed('enddate');

            if (empty($endDate)) {
                // TRANS: Client exception thrown when trying to post an event without providing an end date.
                throw new ClientException(_m('End date required.'));
            }

            $endTime   = $this->trimmed('event-endtime');

            if (empty($endTime)) {
                $endTime = '00:00';
            }

            $start = $startDate . ' ' . $startTime . ' ' . $tz;
            $end   = $endDate . ' ' . $endTime . ' ' . $tz;

            $this->startTime = strtotime($start);
            $this->endTime   = strtotime($end);

            if ($this->startTime == 0) {
                // TRANS: Client exception thrown when trying to post an event with a date that cannot be processed.
                // TRANS: %s is the data that could not be processed.
                throw new ClientException(sprintf(_m('Could not parse date "%s".'),
                                            $start));
            }

            if ($this->endTime == 0) {
                // TRANS: Client exception thrown when trying to post an event with a date that cannot be processed.
                // TRANS: %s is the data that could not be processed.
                throw new ClientException(sprintf(_m('Could not parse date "%s".'),
                                            $end));
            }
        } catch (ClientException $ce) {
            if ($this->boolean('ajax')) {
                $this->outputAjaxError($ce->getMessage());
                return false;
            } else {
                $this->error = $ce->getMessage();
                $this->showPage();
                return false;
            }
        }

        return true;
    }

    /**
     * Handler method
     *
     * @param array $argarray is ignored since it's now passed in in prepare()
     *
     * @return void
     */
    function handle($argarray=null)
    {
        parent::handle($argarray);

        if ($this->isPost()) {
            $this->newEvent();
        } else {
            $this->showPage();
        }

        return;
    }

    /**
     * Add a new event
     *
     * @return void
     */
    function newEvent()
    {
        try {

            if (empty($this->title)) {
                // TRANS: Client exception thrown when trying to post an event without providing a title.
                throw new ClientException(_m('Event must have a title.'));
            }

            if (empty($this->startTime)) {
                // TRANS: Client exception thrown when trying to post an event without providing a start time.
                throw new ClientException(_m('Event must have a start time.'));
            }

            if (empty($this->endTime)) {
                // TRANS: Client exception thrown when trying to post an event without providing an end time.
                throw new ClientException(_m('Event must have an end time.'));
            }

            if (!empty($this->url) && Validate::uri($this->url) === false) {
                // TRANS: Client exception thrown when trying to post an event with an invalid URL.
                throw new ClientException(_m('URL must be valid.'));
            }

            $options = array();

            // Does the heavy-lifting for getting "To:" information

            ToSelector::fillOptions($this, $options);

            $profile = $this->user->getProfile();

            $saved = Happening::saveNew($profile,
                                        $this->startTime,
                                        $this->endTime,
                                        $this->title,
                                        $this->location,
                                        $this->description,
                                        $this->url,
                                        $options);

            $event = Happening::fromNotice($saved);

            RSVP::saveNew($profile, $event, RSVP::POSITIVE);

        } catch (ClientException $ce) {
            if ($this->boolean('ajax')) {
                $this->outputAjaxError($ce->getMessage());
                return;
            } else {
                $this->error = $ce->getMessage();
                $this->showPage();
                return;
            }
        }

        if ($this->boolean('ajax')) {
            $this->startHTML('text/xml;charset=utf-8');
            $this->elementStart('head');
            // TRANS: Page title after sending a notice.
            $this->element('title', null, _m('Event saved'));
            $this->elementEnd('head');
            $this->elementStart('body');
            $this->showNotice($saved);
            $this->elementEnd('body');
            $this->endHTML();
        } else {
            common_redirect($saved->getUrl(), 303);
        }
    }

    // @todo factor this out into a base class
    function outputAjaxError($msg)
    {
        $this->startHTML('text/xml;charset=utf-8');
        $this->elementStart('head');
        // TRANS: Page title after an AJAX error occurs
        $this->element('title', null, _('Ajax Error'));
        $this->elementEnd('head');
        $this->elementStart('body');
        $this->element('p', array('id' => 'error'), $msg);
        $this->elementEnd('body');
        $this->endHTML();
        return;
    }

    /**
     * Show the event form
     *
     * @return void
     */
    function showContent()
    {
        if (!empty($this->error)) {
            $this->element('p', 'error', $this->error);
        }

        $form = new EventForm($this);

        $form->show();

        return;
    }

    /**
     * Return true if read only.
     *
     * MAY override
     *
     * @param array $args other arguments
     *
     * @return boolean is read only action?
     */
    function isReadOnly($args)
    {
        if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
            $_SERVER['REQUEST_METHOD'] == 'HEAD') {
            return true;
        } else {
            return false;
        }
    }

    /**
     * Output a notice
     *
     * Used to generate the notice code for Ajax results.
     *
     * @param Notice $notice Notice that was saved
     *
     * @return void
     */
    function showNotice(Notice $notice)
    {
        $nli = new NoticeListItem($notice, $this);
        $nli->show();
    }
}


code:
<?php
/**
 * StatusNet - the distributed open-source microblogging tool
 * Copyright (C) 2011, StatusNet, Inc.
 *
 * RSVP for an event
 *
 * 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  Event
 * @package   StatusNet
 * @author    Evan Prodromou <evan@status.net>
 * @copyright 2011 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);
}

/**
 * RSVP for an event
 *
 * @category  Event
 * @package   StatusNet
 * @author    Evan Prodromou <evan@status.net>
 * @copyright 2011 StatusNet, Inc.
 * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
 * @link      http://status.net/
 */
class NewrsvpAction extends Action
{
    protected $user  = null;
    protected $event = null;
    protected $verb  = null;

    /**
     * Returns the title of the action
     *
     * @return string Action title
     */
    function title()
    {
        // TRANS: Title for RSVP ("please respond") action.
        return _m('TITLE','New RSVP');
    }

    /**
     * For initializing members of the class.
     *
     * @param array $argarray misc. arguments
     *
     * @return boolean true
     */
    function prepare($argarray)
    {
        parent::prepare($argarray);
        if ($this->boolean('ajax')) {
            GNUsocial::setApi(true); // short error results!
        }

        $eventId = $this->trimmed('event');

        if (empty($eventId)) {
            // TRANS: Client exception thrown when referring to a non-existing event.
            throw new ClientException(_m('No such event.'));
        }

        $this->event = Happening::getKV('id', $eventId);

        if (empty($this->event)) {
            // TRANS: Client exception thrown when referring to a non-existing event.
            throw new ClientException(_m('No such event.'));
        }

        $this->user = common_current_user();

        if (empty($this->user)) {
            // TRANS: Client exception thrown when trying to RSVP ("please respond") while not logged in.
            throw new ClientException(_m('You must be logged in to RSVP for an event.'));
        }

        common_debug(print_r($this->args, true));

        switch (strtolower($this->trimmed('submitvalue'))) {
        case 'yes':
            $this->verb = RSVP::POSITIVE;
            break;
        case 'no':
            $this->verb = RSVP::NEGATIVE;
            break;
        case 'maybe':
            $this->verb = RSVP::POSSIBLE;
            break;
        default:
            // TRANS: Client exception thrown when using an invalid value for RSVP ("please respond").
            throw new ClientException(_m('Unknown submit value.'));
        }

        return true;
    }

    /**
     * Handler method
     *
     * @param array $argarray is ignored since it's now passed in in prepare()
     *
     * @return void
     */
    function handle($argarray=null)
    {
        parent::handle($argarray);

        if ($this->isPost()) {
            $this->newRSVP();
        } else {
            $this->showPage();
        }

        return;
    }

    /**
     * Add a new event
     *
     * @return void
     */
    function newRSVP()
    {
        try {
            $saved = RSVP::saveNew($this->user->getProfile(),
                                   $this->event,
                                   $this->verb);
        } catch (ClientException $ce) {
            $this->error = $ce->getMessage();
            $this->showPage();
            return;
        }

        if ($this->boolean('ajax')) {
            $rsvp = RSVP::fromNotice($saved);
            $this->startHTML('text/xml;charset=utf-8');
            $this->elementStart('head');
            // TRANS: Page title after creating an event.
            $this->element('title', null, _m('Event saved'));
            $this->elementEnd('head');
            $this->elementStart('body');
            $cancel = new CancelRSVPForm($rsvp, $this);
            $cancel->show();
            $this->elementEnd('body');
            $this->endHTML();
        } else {
            common_redirect($saved->getUrl(), 303);
        }
    }

    /**
     * Show the event form
     *
     * @return void
     */
    function showContent()
    {
        if (!empty($this->error)) {
            $this->element('p', 'error', $this->error);
        }

        $form = new RSVPForm($this->event, $this);

        $form->show();

        return;
    }

    /**
     * Return true if read only.
     *
     * MAY override
     *
     * @param array $args other arguments
     *
     * @return boolean is read only action?
     */
    function isReadOnly($args)
    {
        if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
            $_SERVER['REQUEST_METHOD'] == 'HEAD') {
            return true;
        } else {
            return false;
        }
    }
}


code:
<?php
/**
 * StatusNet - the distributed open-source microblogging tool
 * Copyright (C) 2011, StatusNet, Inc.
 *
 * Show a single event
 *
 * 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  Event
 * @package   StatusNet
 * @author    Evan Prodromou <evan@status.net>
 * @copyright 2011 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);
}

/**
 * Show a single event, with associated information
 *
 * @category  Event
 * @package   StatusNet
 * @author    Evan Prodromou <evan@status.net>
 * @copyright 2011 StatusNet, Inc.
 * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
 * @link      http://status.net/
 */
class ShoweventAction extends ShownoticeAction
{
    protected $id    = null;
    protected $event = null;

    function getNotice()
    {
        $this->id = $this->trimmed('id');

        $this->event = Happening::getKV('id', $this->id);

        if (empty($this->event)) {
            // TRANS: Client exception thrown when referring to a non-existing event.
            throw new ClientException(_m('No such event.'), 404);
        }

        $notice = $this->event->getNotice();

        if (empty($notice)) {
            // Did we used to have it, and it got deleted?
            // TRANS: Client exception thrown when referring to a non-existing event.
            throw new ClientException(_m('No such event.'), 404);
        }

        return $notice;
    }

    /**
     * Title of the page
     *
     * Used by Action class for layout.
     *
     * @return string page tile
     */
    function title()
    {
        return $this->event->title;
    }
}


code:
<?php
/**
 * StatusNet - the distributed open-source microblogging tool
 * Copyright (C) 2010, StatusNet, Inc.
 *
 * Show a single RSVP
 *
 * 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  RSVP
 * @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);
}

/**
 * Show a single RSVP, with associated information
 *
 * @category  RSVP
 * @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 ShowrsvpAction extends ShownoticeAction
{
    protected $rsvp = null;
    protected $event = null;

    function getNotice()
    {
        $this->id = $this->trimmed('id');

        $this->rsvp = RSVP::getKV('id', $this->id);

        if (empty($this->rsvp)) {
            // TRANS: Client exception thrown when referring to a non-existing RSVP.
            // TRANS: RSVP stands for "Please reply".
            throw new ClientException(_m('No such RSVP.'), 404);
        }

        $this->event = $this->rsvp->getEvent();

        if (empty($this->event)) {
            // TRANS: Client exception thrown when referring to a non-existing event.
            throw new ClientException(_m('No such event.'), 404);
        }

        $notice = $this->rsvp->getNotice();

        if (empty($notice)) {
            // Did we used to have it, and it got deleted?
            // TRANS: Client exception thrown when referring to a non-existing RSVP.
            // TRANS: RSVP stands for "Please reply".
            throw new ClientException(_m('No such RSVP.'), 404);
        }

        return $notice;
    }

    /**
     * Title of the page
     *
     * Used by Action class for layout.
     *
     * @return string page tile
     */
    function title()
    {
        // TRANS: Title for event.
	// TRANS: %1$s is a user nickname, %2$s is an event title.
        return sprintf(_m('%1$s\'s RSVP for "%2$s"'),
                       $this->user->nickname,
                       $this->event->title);
    }
}


code:
<?php
/**
 * StatusNet - the distributed open-source microblogging tool
 * Copyright (C) 2011, 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/>.
 *
 * @category  Event
 * @package   StatusNet
 * @author    Zach Copley <zach@status.net>
 * @copyright 2011 StatusNet, Inc.
 * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
 * @link      http://status.net/
 */

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

/**
 * Callback handler to populate end time dropdown
 */
class TimelistAction extends Action {
    private $start;
    private $duration;

    /**
     * Get ready
     *
     * @param array $args misc. arguments
     *
     * @return boolean true
     */
    function prepare($args) {
        parent::prepare($args);
        $this->start = $this->arg('start');
        $this->duration = $this->boolean('duration', false);
        return true;
    }

    /**
     * Handle input and ouput something
     *
     * @param array $args $_REQUEST arguments
     *
     * @return void
     */
    function handle($args)
    {
        parent::handle($args);

        if (!common_logged_in()) {
            // TRANS: Error message displayed when trying to perform an action that requires a logged in user.
            $this->clientError(_m('Not logged in.'));
        }

        if (!empty($this->start)) {
            $times = EventTimeList::getTimes($this->start, $this->duration);
        } else {
            // TRANS: Client error when submitting a form with unexpected information.
            $this->clientError(_m('Unexpected form submission.'));
        }

        if ($this->boolean('ajax')) {
            header('Content-Type: application/json; charset=utf-8');
            print json_encode($times);
        } else {
            // TRANS: Client error displayed when using an action in a non-AJAX way.
            $this->clientError(_m('This action is AJAX only.'));
        }
    }

    /**
     * Override the regular error handler to show something more
     * ajaxy
     *
     * @param string $msg   error message
     * @param int    $code  error code
     */
    function clientError($msg, $code = 400) {
        if ($this->boolean('ajax')) {
            header('Content-Type: application/json; charset=utf-8');
            print json_encode(
                array(
                    'success' => false,
                    'code'    => $code,
                    'message' => $msg
                )
            );
        } else {
            parent::clientError($msg, $code);
        }
    }
}


code:
<?php
/**
 * Data class for happenings
 *
 * 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) 2011, 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);
}

/**
 * Data class for happenings
 *
 * There's already an Event class in lib/event.php, so we couldn't
 * call this an Event without causing a hole in space-time.
 *
 * "Happening" seemed good enough.
 *
 * @category Event
 * @package  StatusNet
 * @author   Evan Prodromou <evan@status.net>
 * @license  http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
 * @link     http://status.net/
 *
 * @see      Managed_DataObject
 */
class Happening extends Managed_DataObject
{
    const OBJECT_TYPE = 'http://activitystrea.ms/schema/1.0/event';

    public $__table = 'happening'; // table name
    public $id;                    // varchar(36) UUID
    public $uri;                   // varchar(191)   not 255 because utf8mb4 takes more space
    public $profile_id;            // int
    public $start_time;            // datetime
    public $end_time;              // datetime
    public $title;                 // varchar(191)   not 255 because utf8mb4 takes more space
    public $location;              // varchar(191)   not 255 because utf8mb4 takes more space
    public $url;                   // varchar(191)   not 255 because utf8mb4 takes more space
    public $description;           // text
    public $created;               // datetime

    /**
     * The One True Thingy that must be defined and declared.
     */
    public static function schemaDef()
    {
        return array(
            'description' => 'A real-world happening',
            'fields' => array(
                'id' => array('type' => 'char',
                              'length' => 36,
                              'not null' => true,
                              'description' => 'UUID'),
                'uri' => array('type' => 'varchar',
                               'length' => 191,
                               'not null' => true),
                'profile_id' => array('type' => 'int', 'not null' => true),
                'start_time' => array('type' => 'datetime', 'not null' => true),
                'end_time' => array('type' => 'datetime', 'not null' => true),
                'title' => array('type' => 'varchar',
                                 'length' => 191,
                                 'not null' => true),
                'location' => array('type' => 'varchar',
                                    'length' => 191),
                'url' => array('type' => 'varchar',
                               'length' => 191),
                'description' => array('type' => 'text'),
                'created' => array('type' => 'datetime',
                                   'not null' => true),
            ),
            'primary key' => array('id'),
            'unique keys' => array(
                'happening_uri_key' => array('uri'),
            ),
            'foreign keys' => array('happening_profile_id__key' => array('profile', array('profile_id' => 'id'))),
            'indexes' => array('happening_created_idx' => array('created'),
                               'happening_start_end_idx' => array('start_time', 'end_time')),
        );
    }

    static function saveNew($profile, $start_time, $end_time, $title, $location, $description, $url, $options=array())
    {
        if (array_key_exists('uri', $options)) {
            $other = Happening::getKV('uri', $options['uri']);
            if (!empty($other)) {
                // TRANS: Client exception thrown when trying to create an event that already exists.
                throw new ClientException(_m('Event already exists.'));
            }
        }

        $ev = new Happening();

        $ev->id          = UUID::gen();
        $ev->profile_id  = $profile->id;
        $ev->start_time  = common_sql_date($start_time);
        $ev->end_time    = common_sql_date($end_time);
        $ev->title       = $title;
        $ev->location    = $location;
        $ev->description = $description;
        $ev->url         = $url;

        if (array_key_exists('created', $options)) {
            $ev->created = $options['created'];
        } else {
            $ev->created = common_sql_now();
        }

        if (array_key_exists('uri', $options)) {
            $ev->uri = $options['uri'];
        } else {
            $ev->uri = common_local_url('showevent',
                                        array('id' => $ev->id));
        }

        $ev->insert();

        // XXX: does this get truncated?

        // TRANS: Event description. %1$s is a title, %2$s is start time, %3$s is end time,
        // TRANS: %4$s is location, %5$s is a description.
        $content = sprintf(_m('"%1$s" %2$s - %3$s (%4$s): %5$s'),
                           $title,
                           common_exact_date($ev->start_time),
                           common_exact_date($ev->end_time),
                           $location,
                           $description);

        // TRANS: Rendered microformats2 tagged event description.
        // TRANS: %1$s is a title, %2$s is start time, %3$s is start time,
        // TRANS: %4$s is end time, %5$s is end time, %6$s is location, %7$s is description.
        // TRANS: Class names should not be translated.
        $rendered = sprintf(_m('
'.
                              '
%1$s
 '.
                              '<time class="dt-start" datetime="%2$s">%3$s</time> - '.
                              '<time class="dt-end" datetime="%4$s">%5$s</time> '.
                              '(%6$s): '.
                              '
%7$s
 '.
                              '
'),
                            htmlspecialchars($title),
                            htmlspecialchars(common_date_iso8601($ev->start_time)),
                            htmlspecialchars(common_exact_date($ev->start_time)),
                            htmlspecialchars(common_date_iso8601($ev->end_time)),
                            htmlspecialchars(common_exact_date($ev->end_time)),
                            htmlspecialchars($location),
                            htmlspecialchars($description));

        $options = array_merge(array('object_type' => Happening::OBJECT_TYPE),
                               $options);

        if (!array_key_exists('uri', $options)) {
            $options['uri'] = $ev->uri;
        }

        if (!empty($url)) {
            $options['urls'] = array($url);
        }

        $saved = Notice::saveNew($profile->id,
                                 $content,
                                 array_key_exists('source', $options) ?
                                 $options['source'] : 'web',
                                 $options);

        return $saved;
    }

    /**
     * Returns the profile's canonical url, not necessarily a uri/unique id
     *
     * @return string $url
     */
    public function getUrl()
    {
        if (empty($this->url) ||
                !filter_var($this->url, FILTER_VALIDATE_URL)) {
            throw new InvalidUrlException($this->url);
        }
        return $this->url;
    }

    function getNotice()
    {
        return Notice::getKV('uri', $this->uri);
    }

    static function fromNotice($notice)
    {
        return Happening::getKV('uri', $notice->uri);
    }

    function getRSVPs()
    {
        return RSVP::forEvent($this);
    }

    function getRSVP($profile)
    {
        return RSVP::pkeyGet(array('profile_id' => $profile->id,
                                   'event_id' => $this->id));
    }
}