diff options
Diffstat (limited to 'plugins/userinfo')
-rw-r--r-- | plugins/userinfo/localization/cs_CZ.inc | 27 | ||||
-rw-r--r-- | plugins/userinfo/localization/da_DK.inc | 9 | ||||
-rw-r--r-- | plugins/userinfo/localization/de_CH.inc | 9 | ||||
-rw-r--r-- | plugins/userinfo/localization/en_US.inc | 9 | ||||
-rw-r--r-- | plugins/userinfo/localization/es_ES.inc | 9 | ||||
-rw-r--r-- | plugins/userinfo/localization/et_EE.inc | 9 | ||||
-rwxr-xr-x | plugins/userinfo/localization/fr_FR.inc | 9 | ||||
-rw-r--r-- | plugins/userinfo/localization/gl_ES.inc | 9 | ||||
-rw-r--r-- | plugins/userinfo/localization/ja_JP.inc | 11 | ||||
-rw-r--r-- | plugins/userinfo/localization/pl_PL.inc | 9 | ||||
-rw-r--r-- | plugins/userinfo/localization/pt_BR.inc | 22 | ||||
-rw-r--r-- | plugins/userinfo/localization/pt_PT.inc | 22 | ||||
-rwxr-xr-x | plugins/userinfo/localization/ro_RO.inc | 9 | ||||
-rw-r--r-- | plugins/userinfo/localization/ru_RU.inc | 9 | ||||
-rw-r--r-- | plugins/userinfo/localization/sv_SE.inc | 9 | ||||
-rw-r--r-- | plugins/userinfo/localization/zh_TW.inc | 9 | ||||
-rw-r--r-- | plugins/userinfo/package.xml | 70 | ||||
-rw-r--r-- | plugins/userinfo/userinfo.js | 16 | ||||
-rw-r--r-- | plugins/userinfo/userinfo.php | 55 |
19 files changed, 331 insertions, 0 deletions
diff --git a/plugins/userinfo/localization/cs_CZ.inc b/plugins/userinfo/localization/cs_CZ.inc new file mode 100644 index 000000000..20cd4ae9b --- /dev/null +++ b/plugins/userinfo/localization/cs_CZ.inc @@ -0,0 +1,27 @@ +<?php + +/* + ++-----------------------------------------------------------------------+ +| language/cs_CZ/labels.inc | +| | +| Language file of the Roundcube userinfo plugin | +| Copyright (C) 2005-2009, The Roundcube Dev Team | +| Licensed under the GNU GPL | +| | ++-----------------------------------------------------------------------+ +| Author: Milan Kozak <hodza@hodza.net> | ++-----------------------------------------------------------------------+ + +@version $Id: labels.inc 2993 2009-09-26 18:32:07Z alec $ + +*/ + +$labels = array(); +$labels['infosfor'] = 'Informace pro'; +$labels['userinfo'] = 'Uživatel'; +$labels['created'] = 'Vytvořen'; +$labels['lastlogin'] = 'Naspoledy přihlášen'; +$labels['defaultidentity'] = 'Výchozí identita'; + +?>
\ No newline at end of file diff --git a/plugins/userinfo/localization/da_DK.inc b/plugins/userinfo/localization/da_DK.inc new file mode 100644 index 000000000..0fed30935 --- /dev/null +++ b/plugins/userinfo/localization/da_DK.inc @@ -0,0 +1,9 @@ +<?php + +$labels = array(); +$labels['userinfo'] = 'Bruger info'; +$labels['created'] = 'Oprettet'; +$labels['lastlogin'] = 'Sidste login'; +$labels['defaultidentity'] = 'Standard identitet'; + +?> diff --git a/plugins/userinfo/localization/de_CH.inc b/plugins/userinfo/localization/de_CH.inc new file mode 100644 index 000000000..5f236b66c --- /dev/null +++ b/plugins/userinfo/localization/de_CH.inc @@ -0,0 +1,9 @@ +<?php + +$labels = array(); +$labels['userinfo'] = 'Benutzerinfo'; +$labels['created'] = 'Erstellt'; +$labels['lastlogin'] = 'Letztes Login'; +$labels['defaultidentity'] = 'Standard-Absender'; + +?>
\ No newline at end of file diff --git a/plugins/userinfo/localization/en_US.inc b/plugins/userinfo/localization/en_US.inc new file mode 100644 index 000000000..1a2fd9016 --- /dev/null +++ b/plugins/userinfo/localization/en_US.inc @@ -0,0 +1,9 @@ +<?php + +$labels = array(); +$labels['userinfo'] = 'User info'; +$labels['created'] = 'Created'; +$labels['lastlogin'] = 'Last Login'; +$labels['defaultidentity'] = 'Default Identity'; + +?>
\ No newline at end of file diff --git a/plugins/userinfo/localization/es_ES.inc b/plugins/userinfo/localization/es_ES.inc new file mode 100644 index 000000000..dd6662fc0 --- /dev/null +++ b/plugins/userinfo/localization/es_ES.inc @@ -0,0 +1,9 @@ +<?php + +$labels = array(); +$labels['userinfo'] = 'Información de usuario'; +$labels['created'] = 'Creado'; +$labels['lastlogin'] = 'Última conexión'; +$labels['defaultidentity'] = 'Identidad predeterminada'; + +?>
\ No newline at end of file diff --git a/plugins/userinfo/localization/et_EE.inc b/plugins/userinfo/localization/et_EE.inc new file mode 100644 index 000000000..97830b45c --- /dev/null +++ b/plugins/userinfo/localization/et_EE.inc @@ -0,0 +1,9 @@ +<?php + +$labels = array(); +$labels['userinfo'] = 'Kasutaja info'; +$labels['created'] = 'Loodud'; +$labels['lastlogin'] = 'Viimane logimine'; +$labels['defaultidentity'] = 'Vaikeidentiteet'; + +?> diff --git a/plugins/userinfo/localization/fr_FR.inc b/plugins/userinfo/localization/fr_FR.inc new file mode 100755 index 000000000..ef7b8aacd --- /dev/null +++ b/plugins/userinfo/localization/fr_FR.inc @@ -0,0 +1,9 @@ +<?php + +$labels = array(); +$labels['userinfo'] = 'Info utilisateur'; +$labels['created'] = 'Date de création'; +$labels['lastlogin'] = 'Dernière connexion'; +$labels['defaultidentity'] = 'Identité principale'; + +?> diff --git a/plugins/userinfo/localization/gl_ES.inc b/plugins/userinfo/localization/gl_ES.inc new file mode 100644 index 000000000..bf285d37f --- /dev/null +++ b/plugins/userinfo/localization/gl_ES.inc @@ -0,0 +1,9 @@ +<?php + +$labels = array(); +$labels['userinfo'] = 'Información do usuario'; +$labels['created'] = 'Creado'; +$labels['lastlogin'] = 'Última conexión'; +$labels['defaultidentity'] = 'Identidade predeterminada'; + +?>
\ No newline at end of file diff --git a/plugins/userinfo/localization/ja_JP.inc b/plugins/userinfo/localization/ja_JP.inc new file mode 100644 index 000000000..1fd4eaf51 --- /dev/null +++ b/plugins/userinfo/localization/ja_JP.inc @@ -0,0 +1,11 @@ +<?php + +// EN-Revision: 3891 + +$labels = array(); +$labels['userinfo'] = 'ユーザー情報'; +$labels['created'] = '作成日'; +$labels['lastlogin'] = '最終ログイン'; +$labels['defaultidentity'] = '標準の識別情報'; + +?>
\ No newline at end of file diff --git a/plugins/userinfo/localization/pl_PL.inc b/plugins/userinfo/localization/pl_PL.inc new file mode 100644 index 000000000..6b03c32e7 --- /dev/null +++ b/plugins/userinfo/localization/pl_PL.inc @@ -0,0 +1,9 @@ +<?php + +$labels = array(); +$labels['userinfo'] = 'Informacje'; +$labels['created'] = 'Utworzony'; +$labels['lastlogin'] = 'Ostatnie logowanie'; +$labels['defaultidentity'] = 'Domyślna tożsamość'; + +?> diff --git a/plugins/userinfo/localization/pt_BR.inc b/plugins/userinfo/localization/pt_BR.inc new file mode 100644 index 000000000..acc3fff6f --- /dev/null +++ b/plugins/userinfo/localization/pt_BR.inc @@ -0,0 +1,22 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | localization/pt_BR/labels.inc | + | | + | Language file of the Roundcube Webmail client | + | Copyright (C) 2012, The Roundcube Dev Team | + | Licensed under the GNU General Public License | + | | + +-----------------------------------------------------------------------+ + | Author: Claudio F Filho <Unknown> | + +-----------------------------------------------------------------------+ + @version $Id$ +*/ + +$labels = array(); +$labels['userinfo'] = 'Informações do usuário'; +$labels['created'] = 'Criado'; +$labels['lastlogin'] = 'Último Login'; +$labels['defaultidentity'] = 'Identidade Padrão'; + diff --git a/plugins/userinfo/localization/pt_PT.inc b/plugins/userinfo/localization/pt_PT.inc new file mode 100644 index 000000000..decd03484 --- /dev/null +++ b/plugins/userinfo/localization/pt_PT.inc @@ -0,0 +1,22 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | localization/pt_PT/labels.inc | + | | + | Language file of the Roundcube Webmail client | + | Copyright (C) 2012, The Roundcube Dev Team | + | Licensed under the GNU General Public License | + | | + +-----------------------------------------------------------------------+ + | Author: David <Unknown> | + +-----------------------------------------------------------------------+ + @version $Id$ +*/ + +$labels = array(); +$labels['userinfo'] = 'Informação do utilizador'; +$labels['created'] = 'Criado'; +$labels['lastlogin'] = 'Último acesso'; +$labels['defaultidentity'] = 'Identidade pré-definida'; + diff --git a/plugins/userinfo/localization/ro_RO.inc b/plugins/userinfo/localization/ro_RO.inc new file mode 100755 index 000000000..bf7a47619 --- /dev/null +++ b/plugins/userinfo/localization/ro_RO.inc @@ -0,0 +1,9 @@ +<?php + +$labels = array(); +$labels['userinfo'] = 'Informatii utilisator'; +$labels['created'] = 'Data creatiei'; +$labels['lastlogin'] = 'Ultima conectare'; +$labels['defaultidentity'] = 'Identitate principala'; + +?> diff --git a/plugins/userinfo/localization/ru_RU.inc b/plugins/userinfo/localization/ru_RU.inc new file mode 100644 index 000000000..0e7ed4f8a --- /dev/null +++ b/plugins/userinfo/localization/ru_RU.inc @@ -0,0 +1,9 @@ +<?php + +$labels = array(); +$labels['userinfo'] = 'Информация'; +$labels['created'] = 'Создан'; +$labels['lastlogin'] = 'Последний вход'; +$labels['defaultidentity'] = 'Профиль по умолчанию'; + +?> diff --git a/plugins/userinfo/localization/sv_SE.inc b/plugins/userinfo/localization/sv_SE.inc new file mode 100644 index 000000000..a34923a88 --- /dev/null +++ b/plugins/userinfo/localization/sv_SE.inc @@ -0,0 +1,9 @@ +<?php + +$labels = array(); +$labels['userinfo'] = 'Användarinfo'; +$labels['created'] = 'Skapad'; +$labels['lastlogin'] = 'Senast inloggad'; +$labels['defaultidentity'] = 'Standardprofil'; + +?>
\ No newline at end of file diff --git a/plugins/userinfo/localization/zh_TW.inc b/plugins/userinfo/localization/zh_TW.inc new file mode 100644 index 000000000..d3124459e --- /dev/null +++ b/plugins/userinfo/localization/zh_TW.inc @@ -0,0 +1,9 @@ +<?php + +$labels = array(); +$labels['userinfo'] = '使用者資訊'; +$labels['created'] = '建立時間'; +$labels['lastlogin'] = '上次登入'; +$labels['defaultidentity'] = '預設身份'; + +?> diff --git a/plugins/userinfo/package.xml b/plugins/userinfo/package.xml new file mode 100644 index 000000000..dd25d443b --- /dev/null +++ b/plugins/userinfo/package.xml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8"?> +<package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.9.0" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 + http://pear.php.net/dtd/tasks-1.0.xsd + http://pear.php.net/dtd/package-2.0 + http://pear.php.net/dtd/package-2.0.xsd"> + <name>userinfo</name> + <channel>pear.roundcube.net</channel> + <summary>Information about logged in user</summary> + <description> + Sample plugin that adds a new tab to the settings section + to display some information about the current user. + </description> + <lead> + <name>Thomas Bruederli</name> + <user>thomasb</user> + <email>roundcube@gmail.com</email> + <active>yes</active> + </lead> + <date>2011-11-21</date> + <version> + <release>1.0</release> + <api>1.0</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license> + <notes>-</notes> + <contents> + <dir baseinstalldir="/" name="/"> + <file name="userinfo.php" role="php"> + <tasks:replace from="@name@" to="name" type="package-info"/> + <tasks:replace from="@package_version@" to="version" type="package-info"/> + </file> + <file name="userinfo.js" role="data"> + <tasks:replace from="@name@" to="name" type="package-info"/> + <tasks:replace from="@package_version@" to="version" type="package-info"/> + </file> + <file name="localization/cs_CZ.inc" role="data"></file> + <file name="localization/da_DK.inc" role="data"></file> + <file name="localization/de_CH.inc" role="data"></file> + <file name="localization/en_US.inc" role="data"></file> + <file name="localization/es_ES.inc" role="data"></file> + <file name="localization/et_EE.inc" role="data"></file> + <file name="localization/fr_FR.inc" role="data"></file> + <file name="localization/gl_ES.inc" role="data"></file> + <file name="localization/ja_JP.inc" role="data"></file> + <file name="localization/pl_PL.inc" role="data"></file> + <file name="localization/pt_BR.inc" role="data"></file> + <file name="localization/pt_PT.inc" role="data"></file> + <file name="localization/ro_RO.inc" role="data"></file> + <file name="localization/ru_RU.inc" role="data"></file> + <file name="localization/sv_SE.inc" role="data"></file> + <file name="localization/zh_TW.inc" role="data"></file> + </dir> + <!-- / --> + </contents> + <dependencies> + <required> + <php> + <min>5.2.1</min> + </php> + <pearinstaller> + <min>1.7.0</min> + </pearinstaller> + </required> + </dependencies> + <phprelease/> +</package> diff --git a/plugins/userinfo/userinfo.js b/plugins/userinfo/userinfo.js new file mode 100644 index 000000000..70a5085b3 --- /dev/null +++ b/plugins/userinfo/userinfo.js @@ -0,0 +1,16 @@ +/* Show user-info plugin script */ + +if (window.rcmail) { + rcmail.addEventListener('init', function(evt) { + // <span id="settingstabdefault" class="tablink"><roundcube:button command="preferences" type="link" label="preferences" title="editpreferences" /></span> + var tab = $('<span>').attr('id', 'settingstabpluginuserinfo').addClass('tablink'); + + var button = $('<a>').attr('href', rcmail.env.comm_path+'&_action=plugin.userinfo').html(rcmail.gettext('userinfo', 'userinfo')).appendTo(tab); + button.bind('click', function(e){ return rcmail.command('plugin.userinfo', this) }); + + // add button and register command + rcmail.add_element(tab, 'tabs'); + rcmail.register_command('plugin.userinfo', function(){ rcmail.goto_url('plugin.userinfo') }, true); + }) +} + diff --git a/plugins/userinfo/userinfo.php b/plugins/userinfo/userinfo.php new file mode 100644 index 000000000..efb65f51d --- /dev/null +++ b/plugins/userinfo/userinfo.php @@ -0,0 +1,55 @@ +<?php + +/** + * Sample plugin that adds a new tab to the settings section + * to display some information about the current user + */ +class userinfo extends rcube_plugin +{ + public $task = 'settings'; + public $noajax = true; + public $noframe = true; + + function init() + { + $this->add_texts('localization/', array('userinfo')); + $this->register_action('plugin.userinfo', array($this, 'infostep')); + $this->include_script('userinfo.js'); + } + + function infostep() + { + $this->register_handler('plugin.body', array($this, 'infohtml')); + rcmail::get_instance()->output->send('plugin'); + } + + function infohtml() + { + $rcmail = rcmail::get_instance(); + $user = $rcmail->user; + + $table = new html_table(array('cols' => 2, 'cellpadding' => 3)); + + $table->add('title', 'ID'); + $table->add('', Q($user->ID)); + + $table->add('title', Q($this->gettext('username'))); + $table->add('', Q($user->data['username'])); + + $table->add('title', Q($this->gettext('server'))); + $table->add('', Q($user->data['mail_host'])); + + $table->add('title', Q($this->gettext('created'))); + $table->add('', Q($user->data['created'])); + + $table->add('title', Q($this->gettext('lastlogin'))); + $table->add('', Q($user->data['last_login'])); + + $identity = $user->get_identity(); + $table->add('title', Q($this->gettext('defaultidentity'))); + $table->add('', Q($identity['name'] . ' <' . $identity['email'] . '>')); + + return html::tag('h4', null, Q('Infos for ' . $user->get_username())) . $table->show(); + } + +} |