summaryrefslogtreecommitdiff
path: root/plugins/userinfo
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/userinfo')
-rw-r--r--plugins/userinfo/localization/cs_CZ.inc27
-rw-r--r--plugins/userinfo/localization/da_DK.inc9
-rw-r--r--plugins/userinfo/localization/de_CH.inc9
-rw-r--r--plugins/userinfo/localization/en_US.inc9
-rw-r--r--plugins/userinfo/localization/es_ES.inc9
-rw-r--r--plugins/userinfo/localization/et_EE.inc9
-rw-r--r--plugins/userinfo/localization/ja_JP.inc11
-rw-r--r--plugins/userinfo/localization/pl_PL.inc9
-rw-r--r--plugins/userinfo/localization/pt_PT.inc9
-rw-r--r--plugins/userinfo/localization/ru_RU.inc9
-rw-r--r--plugins/userinfo/localization/sv_SE.inc9
-rw-r--r--plugins/userinfo/localization/zh_TW.inc9
-rw-r--r--plugins/userinfo/userinfo.js16
-rw-r--r--plugins/userinfo/userinfo.php55
14 files changed, 199 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..30f8221c9
--- /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, Roundcube Dev. - Switzerland |
+| 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/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_PT.inc b/plugins/userinfo/localization/pt_PT.inc
new file mode 100644
index 000000000..45009f9f4
--- /dev/null
+++ b/plugins/userinfo/localization/pt_PT.inc
@@ -0,0 +1,9 @@
+<?php
+
+$labels = array();
+$labels['userinfo'] = 'Informação do utilizador';
+$labels['created'] = 'Criado';
+$labels['lastlogin'] = 'Último login';
+$labels['defaultidentity'] = 'Identidade pré-definida';
+
+?>
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/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();
+ }
+
+}