summaryrefslogtreecommitdiff
path: root/plugins/markasjunk
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2010-11-27 14:09:03 +0000
committerthomascube <thomas@roundcube.net>2010-11-27 14:09:03 +0000
commit5fec6de4216883e625d7e166f862985d00c99d4a (patch)
treea5a1aec807bcbd2e7f03bd2a0155867339b47d04 /plugins/markasjunk
parent26ea6f9ceb79a78b8b804897d863654bac46d01a (diff)
Copy plugins to release branch
Diffstat (limited to 'plugins/markasjunk')
-rw-r--r--plugins/markasjunk/localization/cs_CZ.inc24
-rw-r--r--plugins/markasjunk/localization/da_DK.inc7
-rw-r--r--plugins/markasjunk/localization/de_DE.inc6
-rw-r--r--plugins/markasjunk/localization/en_US.inc7
-rw-r--r--plugins/markasjunk/localization/es_AR.inc7
-rw-r--r--plugins/markasjunk/localization/es_ES.inc7
-rw-r--r--plugins/markasjunk/localization/et_EE.inc7
-rw-r--r--plugins/markasjunk/localization/ja_JP.inc9
-rw-r--r--plugins/markasjunk/localization/pl_PL.inc7
-rw-r--r--plugins/markasjunk/localization/ru_RU.inc7
-rw-r--r--plugins/markasjunk/localization/sk_SK.inc15
-rw-r--r--plugins/markasjunk/localization/sv_SE.inc7
-rw-r--r--plugins/markasjunk/localization/zh_TW.inc7
-rw-r--r--plugins/markasjunk/markasjunk.js28
-rw-r--r--plugins/markasjunk/markasjunk.php56
-rw-r--r--plugins/markasjunk/package.xml66
-rw-r--r--plugins/markasjunk/skins/default/junk_act.pngbin0 -> 1995 bytes
-rw-r--r--plugins/markasjunk/skins/default/junk_pas.pngbin0 -> 1988 bytes
18 files changed, 267 insertions, 0 deletions
diff --git a/plugins/markasjunk/localization/cs_CZ.inc b/plugins/markasjunk/localization/cs_CZ.inc
new file mode 100644
index 000000000..c547e5a44
--- /dev/null
+++ b/plugins/markasjunk/localization/cs_CZ.inc
@@ -0,0 +1,24 @@
+<?php
+
+/*
+
++-----------------------------------------------------------------------+
+| language/cs_CZ/labels.inc |
+| |
+| Language file of the Roundcube markasjunk 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['buttontitle'] = 'Označit jako Spam';
+$labels['reportedasjunk'] = 'Úspěšně nahlášeno jako Spam';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk/localization/da_DK.inc b/plugins/markasjunk/localization/da_DK.inc
new file mode 100644
index 000000000..e351b0f61
--- /dev/null
+++ b/plugins/markasjunk/localization/da_DK.inc
@@ -0,0 +1,7 @@
+<?php
+
+$labels = array();
+$labels['buttontitle'] = 'Marker som junk mail';
+$labels['reportedasjunk'] = 'Successfuldt rapporteret som junk mail';
+
+?>
diff --git a/plugins/markasjunk/localization/de_DE.inc b/plugins/markasjunk/localization/de_DE.inc
new file mode 100644
index 000000000..f21edf7cd
--- /dev/null
+++ b/plugins/markasjunk/localization/de_DE.inc
@@ -0,0 +1,6 @@
+<?php
+// translation done by Ulli Heist - http://heist.hobby-site.org/
+$labels = array();
+$labels['buttontitle'] = 'als SPAM markieren';
+$labels['reportedasjunk'] = 'Erfolgreich als SPAM gemeldet';
+?> \ No newline at end of file
diff --git a/plugins/markasjunk/localization/en_US.inc b/plugins/markasjunk/localization/en_US.inc
new file mode 100644
index 000000000..6f63e161a
--- /dev/null
+++ b/plugins/markasjunk/localization/en_US.inc
@@ -0,0 +1,7 @@
+<?php
+
+$labels = array();
+$labels['buttontitle'] = 'Mark as Junk';
+$labels['reportedasjunk'] = 'Successfully reported as Junk';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk/localization/es_AR.inc b/plugins/markasjunk/localization/es_AR.inc
new file mode 100644
index 000000000..decdde2a8
--- /dev/null
+++ b/plugins/markasjunk/localization/es_AR.inc
@@ -0,0 +1,7 @@
+<?php
+
+$labels = array();
+$labels['buttontitle'] = 'Marcar como SPAM';
+$labels['reportedasjunk'] = 'Mensaje reportado como SPAM';
+
+?>
diff --git a/plugins/markasjunk/localization/es_ES.inc b/plugins/markasjunk/localization/es_ES.inc
new file mode 100644
index 000000000..8e5ca492d
--- /dev/null
+++ b/plugins/markasjunk/localization/es_ES.inc
@@ -0,0 +1,7 @@
+<?php
+
+$labels = array();
+$labels['buttontitle'] = 'Marcar como SPAM';
+$labels['reportedasjunk'] = 'Mensaje informado como SPAM';
+
+?>
diff --git a/plugins/markasjunk/localization/et_EE.inc b/plugins/markasjunk/localization/et_EE.inc
new file mode 100644
index 000000000..daf140512
--- /dev/null
+++ b/plugins/markasjunk/localization/et_EE.inc
@@ -0,0 +1,7 @@
+<?php
+
+$labels = array();
+$labels['buttontitle'] = 'Märgista Rämpsuks';
+$labels['reportedasjunk'] = 'Edukalt Rämpsuks märgitud';
+
+?>
diff --git a/plugins/markasjunk/localization/ja_JP.inc b/plugins/markasjunk/localization/ja_JP.inc
new file mode 100644
index 000000000..bd5b8b203
--- /dev/null
+++ b/plugins/markasjunk/localization/ja_JP.inc
@@ -0,0 +1,9 @@
+<?php
+
+// EN-Revision: 3891
+
+$labels = array();
+$labels['buttontitle'] = '迷惑メールとして設定';
+$labels['reportedasjunk'] = '迷惑メールとして報告することに成功しました。';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk/localization/pl_PL.inc b/plugins/markasjunk/localization/pl_PL.inc
new file mode 100644
index 000000000..a98f0aab3
--- /dev/null
+++ b/plugins/markasjunk/localization/pl_PL.inc
@@ -0,0 +1,7 @@
+<?php
+
+$labels = array();
+$labels['buttontitle'] = 'Oznacz jako SPAM';
+$labels['reportedasjunk'] = 'Pomyślnie oznaczono jako SPAM';
+
+?>
diff --git a/plugins/markasjunk/localization/ru_RU.inc b/plugins/markasjunk/localization/ru_RU.inc
new file mode 100644
index 000000000..32d00c2df
--- /dev/null
+++ b/plugins/markasjunk/localization/ru_RU.inc
@@ -0,0 +1,7 @@
+<?php
+
+$labels = array();
+$labels['buttontitle'] = 'Переместить в "СПАМ"';
+$labels['reportedasjunk'] = 'Перемещено в "СПАМ"';
+
+?>
diff --git a/plugins/markasjunk/localization/sk_SK.inc b/plugins/markasjunk/localization/sk_SK.inc
new file mode 100644
index 000000000..b56ac46af
--- /dev/null
+++ b/plugins/markasjunk/localization/sk_SK.inc
@@ -0,0 +1,15 @@
+<?php
+
+/**
+ * Slovak translation for Roundcube markasjunk plugin
+ *
+ * @version 1.0 (2010-10-18)
+ * @author panda <admin@whistler.sk>
+ *
+ */
+
+$labels = array();
+$labels['buttontitle'] = 'Označiť ako Spam';
+$labels['reportedasjunk'] = 'Úspešne nahlásené ako Spam';
+
+?>
diff --git a/plugins/markasjunk/localization/sv_SE.inc b/plugins/markasjunk/localization/sv_SE.inc
new file mode 100644
index 000000000..f4c5959b9
--- /dev/null
+++ b/plugins/markasjunk/localization/sv_SE.inc
@@ -0,0 +1,7 @@
+<?php
+
+$labels = array();
+$labels['buttontitle'] = 'Märk som skräp';
+$labels['reportedasjunk'] = 'Framgångsrikt rapporterat som skräp';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk/localization/zh_TW.inc b/plugins/markasjunk/localization/zh_TW.inc
new file mode 100644
index 000000000..7b0b22162
--- /dev/null
+++ b/plugins/markasjunk/localization/zh_TW.inc
@@ -0,0 +1,7 @@
+<?php
+
+$labels = array();
+$labels['buttontitle'] = '標示為垃圾信';
+$labels['reportedasjunk'] = '成功回報垃圾信';
+
+?>
diff --git a/plugins/markasjunk/markasjunk.js b/plugins/markasjunk/markasjunk.js
new file mode 100644
index 000000000..0e30fb8f2
--- /dev/null
+++ b/plugins/markasjunk/markasjunk.js
@@ -0,0 +1,28 @@
+/* Mark-as-Junk plugin script */
+
+function rcmail_markasjunk(prop)
+{
+ if (!rcmail.env.uid && (!rcmail.message_list || !rcmail.message_list.get_selection().length))
+ return;
+
+ var uids = rcmail.env.uid ? rcmail.env.uid : rcmail.message_list.get_selection().join(','),
+ lock = rcmail.set_busy(true, 'loading');
+
+ rcmail.http_post('plugin.markasjunk', '_uid='+uids+'&_mbox='+urlencode(rcmail.env.mailbox), lock);
+}
+
+// callback for app-onload event
+if (window.rcmail) {
+ rcmail.addEventListener('init', function(evt) {
+
+ // register command (directly enable in message view mode)
+ rcmail.register_command('plugin.markasjunk', rcmail_markasjunk, rcmail.env.uid);
+
+ // add event-listener to message list
+ if (rcmail.message_list)
+ rcmail.message_list.addEventListener('select', function(list){
+ rcmail.enable_command('plugin.markasjunk', list.get_selection().length > 0);
+ });
+ })
+}
+
diff --git a/plugins/markasjunk/markasjunk.php b/plugins/markasjunk/markasjunk.php
new file mode 100644
index 000000000..4c15a270f
--- /dev/null
+++ b/plugins/markasjunk/markasjunk.php
@@ -0,0 +1,56 @@
+<?php
+
+/**
+ * Mark as Junk
+ *
+ * Sample plugin that adds a new button to the mailbox toolbar
+ * to mark the selected messages as Junk and move them to the Junk folder
+ *
+ * @version @package_version@
+ * @author Thomas Bruederli
+ */
+class markasjunk extends rcube_plugin
+{
+ public $task = 'mail';
+
+ function init()
+ {
+ $rcmail = rcmail::get_instance();
+
+ $this->register_action('plugin.markasjunk', array($this, 'request_action'));
+
+ if ($rcmail->action == '' || $rcmail->action == 'show') {
+ $skin_path = $this->local_skin_path();
+ $this->include_script('markasjunk.js');
+ $this->add_texts('localization', true);
+ $this->add_button(array(
+ 'command' => 'plugin.markasjunk',
+ 'imagepas' => $skin_path.'/junk_pas.png',
+ 'imageact' => $skin_path.'/junk_act.png',
+ 'title' => 'markasjunk.buttontitle'), 'toolbar');
+ }
+ }
+
+ function request_action()
+ {
+ $this->add_texts('localization');
+
+ $GLOBALS['IMAP_FLAGS']['JUNK'] = 'Junk';
+ $GLOBALS['IMAP_FLAGS']['NONJUNK'] = 'NonJunk';
+
+ $uids = get_input_value('_uid', RCUBE_INPUT_POST);
+ $mbox = get_input_value('_mbox', RCUBE_INPUT_POST);
+
+ $rcmail = rcmail::get_instance();
+ $rcmail->imap->unset_flag($uids, 'NONJUNK');
+ $rcmail->imap->set_flag($uids, 'JUNK');
+
+ if (($junk_mbox = $rcmail->config->get('junk_mbox')) && $mbox != $junk_mbox) {
+ $rcmail->output->command('move_messages', $junk_mbox);
+ }
+
+ $rcmail->output->command('display_message', $this->gettext('reportedasjunk'), 'confirmation');
+ $rcmail->output->send();
+ }
+
+}
diff --git a/plugins/markasjunk/package.xml b/plugins/markasjunk/package.xml
new file mode 100644
index 000000000..8ca7b18de
--- /dev/null
+++ b/plugins/markasjunk/package.xml
@@ -0,0 +1,66 @@
+<?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>markasjunk</name>
+ <channel>pear.roundcube.net</channel>
+ <summary>Mark messages as Junk</summary>
+ <description>Adds a new button to the mailbox toolbar to mark the selected messages as Junk and move them to the configured Junk folder.</description>
+ <lead>
+ <name>Thomas Bruederli</name>
+ <user>thomasb</user>
+ <email>roundcube@gmail.com</email>
+ <active>yes</active>
+ </lead>
+ <date>2010-03-29</date>
+ <time>13:20:00</time>
+ <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-2.0.html">GNU GPLv2</license>
+ <notes>-</notes>
+ <contents>
+ <dir baseinstalldir="/" name="/">
+ <file name="markasjunk.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="markasjunk.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_DE.inc" role="data"></file>
+ <file name="localization/en_US.inc" role="data"></file>
+ <file name="localization/es_AR.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/ja_JP.inc" role="data"></file>
+ <file name="localization/pl_PL.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>
+ <file name="skins/default/junk_act.png" role="data"></file>
+ <file name="skins/default/junk_pas.png" 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/markasjunk/skins/default/junk_act.png b/plugins/markasjunk/skins/default/junk_act.png
new file mode 100644
index 000000000..b5a84f604
--- /dev/null
+++ b/plugins/markasjunk/skins/default/junk_act.png
Binary files differ
diff --git a/plugins/markasjunk/skins/default/junk_pas.png b/plugins/markasjunk/skins/default/junk_pas.png
new file mode 100644
index 000000000..b88a561a4
--- /dev/null
+++ b/plugins/markasjunk/skins/default/junk_pas.png
Binary files differ