]> git.mxchange.org Git - friendica-addons.git/commitdiff
oops - forgot the files
authorfriendica <info@friendica.com>
Mon, 29 Apr 2013 04:22:45 +0000 (21:22 -0700)
committerfriendica <info@friendica.com>
Mon, 29 Apr 2013 04:22:45 +0000 (21:22 -0700)
18 files changed:
superblock.tgz [new file with mode: 0644]
superblock/lang/C/messages.po [new file with mode: 0644]
superblock/lang/ca/strings.php [new file with mode: 0644]
superblock/lang/cs/strings.php [new file with mode: 0644]
superblock/lang/de/strings.php [new file with mode: 0644]
superblock/lang/eo/strings.php [new file with mode: 0644]
superblock/lang/es/strings.php [new file with mode: 0644]
superblock/lang/fr/strings.php [new file with mode: 0644]
superblock/lang/is/strings.php [new file with mode: 0644]
superblock/lang/it/strings.php [new file with mode: 0644]
superblock/lang/nb-no/strings.php [new file with mode: 0644]
superblock/lang/pl/strings.php [new file with mode: 0644]
superblock/lang/pt-br/strings.php [new file with mode: 0644]
superblock/lang/ru/strings.php [new file with mode: 0644]
superblock/lang/sv/strings.php [new file with mode: 0644]
superblock/lang/zh-cn/strings.php [new file with mode: 0644]
superblock/superblock.css [new file with mode: 0755]
superblock/superblock.php [new file with mode: 0755]

diff --git a/superblock.tgz b/superblock.tgz
new file mode 100644 (file)
index 0000000..7f5f026
Binary files /dev/null and b/superblock.tgz differ
diff --git a/superblock/lang/C/messages.po b/superblock/lang/C/messages.po
new file mode 100644 (file)
index 0000000..8089438
--- /dev/null
@@ -0,0 +1,51 @@
+# ADDON blockem
+# Copyright (C) 
+# This file is distributed under the same license as the Friendica blockem addon package.
+# 
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-02-27 05:01-0500\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: blockem.php:51
+msgid "\"Blockem\" Settings"
+msgstr ""
+
+#: blockem.php:53
+msgid "Comma separated profile URLS to block"
+msgstr ""
+
+#: blockem.php:57
+msgid "Submit"
+msgstr ""
+
+#: blockem.php:70
+msgid "BLOCKEM Settings saved."
+msgstr ""
+
+#: blockem.php:105
+#, php-format
+msgid "Blocked %s - Click to open/close"
+msgstr ""
+
+#: blockem.php:160
+msgid "Unblock Author"
+msgstr ""
+
+#: blockem.php:162
+msgid "Block Author"
+msgstr ""
+
+#: blockem.php:194
+msgid "blockem settings updated"
+msgstr ""
diff --git a/superblock/lang/ca/strings.php b/superblock/lang/ca/strings.php
new file mode 100644 (file)
index 0000000..5587acd
--- /dev/null
@@ -0,0 +1,10 @@
+<?php\r
+\r
+$a->strings["\"Blockem\" Settings"] = "Configuració de \"Bloqueig\"";\r
+$a->strings["Comma separated profile URLS to block"] = "URLS dels perfils a bloquejar, separats per comes";\r
+$a->strings["Submit"] = "Enviar";\r
+$a->strings["BLOCKEM Settings saved."] = "Guardada la configuració de BLOQUEIG.";\r
+$a->strings["Blocked %s - Click to open/close"] = "Bloquejar %s - Clica per obrir/tancar";\r
+$a->strings["Unblock Author"] = "Desbloquejar Autor";\r
+$a->strings["Block Author"] = "Bloquejar Autor";\r
+$a->strings["blockem settings updated"] = "Actualitzar la Configuració de bloqueig";\r
diff --git a/superblock/lang/cs/strings.php b/superblock/lang/cs/strings.php
new file mode 100644 (file)
index 0000000..174abc6
--- /dev/null
@@ -0,0 +1,10 @@
+<?php\r
+\r
+$a->strings["\"Blockem\" Settings"] = "\"Blockem\" Nastavení";\r
+$a->strings["Comma separated profile URLS to block"] = "Čárkou oddělené URL adresy profilů určených k ignorování";\r
+$a->strings["Submit"] = "Odeslat";\r
+$a->strings["BLOCKEM Settings saved."] = "BLOCKEM nastavení uloženo.";\r
+$a->strings["Blocked %s - Click to open/close"] = "Blokován %s - Klikněte pro otevření/zavření";\r
+$a->strings["Unblock Author"] = "Odblokovat autora";\r
+$a->strings["Block Author"] = "Zablokovat autora";\r
+$a->strings["blockem settings updated"] = "blockem nastavení aktualizováno";\r
diff --git a/superblock/lang/de/strings.php b/superblock/lang/de/strings.php
new file mode 100644 (file)
index 0000000..132b68a
--- /dev/null
@@ -0,0 +1,10 @@
+<?php\r
+\r
+$a->strings["\"Blockem\" Settings"] = "\"Blockem\"-Einstellungen";\r
+$a->strings["Comma separated profile URLS to block"] = "Profil-URLs, die blockiert werden sollen (durch Kommas getrennt)";\r
+$a->strings["Submit"] = "Senden";\r
+$a->strings["BLOCKEM Settings saved."] = "BLOCKEM-Einstellungen gesichert.";\r
+$a->strings["Blocked %s - Click to open/close"] = "%s blockiert - Zum Öffnen/Schließen klicken";\r
+$a->strings["Unblock Author"] = "Autor freischalten";\r
+$a->strings["Block Author"] = "Autor blockieren";\r
+$a->strings["blockem settings updated"] = "blockem Einstellungen aktualisiert";\r
diff --git a/superblock/lang/eo/strings.php b/superblock/lang/eo/strings.php
new file mode 100644 (file)
index 0000000..b611650
--- /dev/null
@@ -0,0 +1,10 @@
+<?php\r
+\r
+$a->strings["\"Blockem\" Settings"] = "\"Blockem\" Agordoj";\r
+$a->strings["Comma separated profile URLS to block"] = "Blokotaj URL adresoj, disigita per komo";\r
+$a->strings["Submit"] = "Sendi";\r
+$a->strings["BLOCKEM Settings saved."] = "Konservis Agordojn de BLOCKEM.";\r
+$a->strings["Blocked %s - Click to open/close"] = "%s blokita - Klaku por malfermi/fermi";\r
+$a->strings["Unblock Author"] = "Malbloki Aŭtoron";\r
+$a->strings["Block Author"] = "Bloki Aŭtoron";\r
+$a->strings["blockem settings updated"] = "Ĝisdatigis la blockem agordojn";\r
diff --git a/superblock/lang/es/strings.php b/superblock/lang/es/strings.php
new file mode 100644 (file)
index 0000000..874d6d7
--- /dev/null
@@ -0,0 +1,10 @@
+<?php\r
+\r
+$a->strings["\"Blockem\" Settings"] = "Configuración de \"Blockem\"";\r
+$a->strings["Comma separated profile URLS to block"] = "Direcciones separadas por coma de los perfiles a bloquear";\r
+$a->strings["Submit"] = "Envíar";\r
+$a->strings["BLOCKEM Settings saved."] = "Configuracion Blockem guardada.";\r
+$a->strings["Blocked %s - Click to open/close"] = "%s bloqueado. Pulsa aquí para mostrar/ocultar";\r
+$a->strings["Unblock Author"] = "Desbloquear Autor";\r
+$a->strings["Block Author"] = "Bloquear Autor";\r
+$a->strings["blockem settings updated"] = "Configuración de Blockem actualizada";\r
diff --git a/superblock/lang/fr/strings.php b/superblock/lang/fr/strings.php
new file mode 100644 (file)
index 0000000..b9f3118
--- /dev/null
@@ -0,0 +1,10 @@
+<?php\r
+\r
+$a->strings["\"Blockem\" Settings"] = "Réglages de Blockem";\r
+$a->strings["Comma separated profile URLS to block"] = "Liste d'URLS de profils à bloquer, séparés par des virgules";\r
+$a->strings["Submit"] = "Envoyer";\r
+$a->strings["BLOCKEM Settings saved."] = "Réglages Blockem sauvés.";\r
+$a->strings["Blocked %s - Click to open/close"] = "Bloqué %s - Cliquez pour ouvrir/fermer";\r
+$a->strings["Unblock Author"] = "Débloquer l'auteur";\r
+$a->strings["Block Author"] = "Bloquer l'auteur";\r
+$a->strings["blockem settings updated"] = "Réglages blockem sauvés";\r
diff --git a/superblock/lang/is/strings.php b/superblock/lang/is/strings.php
new file mode 100644 (file)
index 0000000..3075c45
--- /dev/null
@@ -0,0 +1,10 @@
+<?php\r
+\r
+$a->strings["\"Blockem\" Settings"] = "\"Blockem\" stillingar";\r
+$a->strings["Comma separated profile URLS to block"] = "Banna lista af forsíðum (komma á milli)";\r
+$a->strings["Submit"] = "Senda inn";\r
+$a->strings["BLOCKEM Settings saved."] = "BLOCKEM stillingar vistaðar.";\r
+$a->strings["Blocked %s - Click to open/close"] = "%s sett í straff - Smella til að taka úr/setja á";\r
+$a->strings["Unblock Author"] = "Leyfa notanda";\r
+$a->strings["Block Author"] = "Banna notanda";\r
+$a->strings["blockem settings updated"] = "";\r
diff --git a/superblock/lang/it/strings.php b/superblock/lang/it/strings.php
new file mode 100644 (file)
index 0000000..bcee9d0
--- /dev/null
@@ -0,0 +1,10 @@
+<?php\r
+\r
+$a->strings["\"Blockem\" Settings"] = "Impostazioni \"Blockem\"";\r
+$a->strings["Comma separated profile URLS to block"] = "Lista, separata da virgola, di indirizzi da bloccare";\r
+$a->strings["Submit"] = "Invia";\r
+$a->strings["BLOCKEM Settings saved."] = "Impostazioni salvate.";\r
+$a->strings["Blocked %s - Click to open/close"] = "%s bloccato - Clicca per aprire/chiudere";\r
+$a->strings["Unblock Author"] = "Sblocca autore";\r
+$a->strings["Block Author"] = "Blocca autore";\r
+$a->strings["blockem settings updated"] = "Impostazioni 'blockem' aggiornate.";\r
diff --git a/superblock/lang/nb-no/strings.php b/superblock/lang/nb-no/strings.php
new file mode 100644 (file)
index 0000000..0dd6660
--- /dev/null
@@ -0,0 +1,10 @@
+<?php\r
+\r
+$a->strings["\"Blockem\" Settings"] = "";\r
+$a->strings["Comma separated profile URLS to block"] = "";\r
+$a->strings["Submit"] = "Lagre";\r
+$a->strings["BLOCKEM Settings saved."] = "";\r
+$a->strings["Blocked %s - Click to open/close"] = "";\r
+$a->strings["Unblock Author"] = "";\r
+$a->strings["Block Author"] = "";\r
+$a->strings["blockem settings updated"] = "";\r
diff --git a/superblock/lang/pl/strings.php b/superblock/lang/pl/strings.php
new file mode 100644 (file)
index 0000000..6d7bcf1
--- /dev/null
@@ -0,0 +1,10 @@
+<?php\r
+\r
+$a->strings["\"Blockem\" Settings"] = "";\r
+$a->strings["Comma separated profile URLS to block"] = "";\r
+$a->strings["Submit"] = "Potwierdź";\r
+$a->strings["BLOCKEM Settings saved."] = "";\r
+$a->strings["Blocked %s - Click to open/close"] = "";\r
+$a->strings["Unblock Author"] = "Odblokuj autora";\r
+$a->strings["Block Author"] = "Zablokuj autora";\r
+$a->strings["blockem settings updated"] = "";\r
diff --git a/superblock/lang/pt-br/strings.php b/superblock/lang/pt-br/strings.php
new file mode 100644 (file)
index 0000000..49f69cc
--- /dev/null
@@ -0,0 +1,10 @@
+<?php\r
+\r
+$a->strings["\"Blockem\" Settings"] = "Configurações \"Blockem\"";\r
+$a->strings["Comma separated profile URLS to block"] = "URLS de perfis separados por vírgulas a serem bloqueados";\r
+$a->strings["Submit"] = "Enviar";\r
+$a->strings["BLOCKEM Settings saved."] = "Configurações BLOCKEM armazenadas.";\r
+$a->strings["Blocked %s - Click to open/close"] = "Bloqueado %s - Clique para abrir/fechar";\r
+$a->strings["Unblock Author"] = "Desbloqueie Autor";\r
+$a->strings["Block Author"] = "Bloqueie Autor";\r
+$a->strings["blockem settings updated"] = "configurações blockem atualizadas";\r
diff --git a/superblock/lang/ru/strings.php b/superblock/lang/ru/strings.php
new file mode 100644 (file)
index 0000000..7617b86
--- /dev/null
@@ -0,0 +1,10 @@
+<?php\r
+\r
+$a->strings["\"Blockem\" Settings"] = "\"Blockem\" настройки";\r
+$a->strings["Comma separated profile URLS to block"] = "URLS, которые заблокировать (список через запятую)";\r
+$a->strings["Submit"] = "Подтвердить";\r
+$a->strings["BLOCKEM Settings saved."] = "BLOCKEM-Настройки сохранены.";\r
+$a->strings["Blocked %s - Click to open/close"] = "Заблокированные %s - Нажмите, чтобы открыть/закрыть";\r
+$a->strings["Unblock Author"] = "";\r
+$a->strings["Block Author"] = "Блокировать Автора";\r
+$a->strings["blockem settings updated"] = "\"Blockem\" настройки обновлены";\r
diff --git a/superblock/lang/sv/strings.php b/superblock/lang/sv/strings.php
new file mode 100644 (file)
index 0000000..3ec569a
--- /dev/null
@@ -0,0 +1,3 @@
+<?php\r
+\r
+$a->strings["Submit"] = "Spara";\r
diff --git a/superblock/lang/zh-cn/strings.php b/superblock/lang/zh-cn/strings.php
new file mode 100644 (file)
index 0000000..3a3dfae
--- /dev/null
@@ -0,0 +1,10 @@
+<?php\r
+\r
+$a->strings["\"Blockem\" Settings"] = "「Blockem」配置";\r
+$a->strings["Comma separated profile URLS to block"] = "逗号分简介URL为栏";\r
+$a->strings["Submit"] = "提交";\r
+$a->strings["BLOCKEM Settings saved."] = "「Blockem」配置保存了。";\r
+$a->strings["Blocked %s - Click to open/close"] = "%s拦了-点击为开关";\r
+$a->strings["Unblock Author"] = "不拦作家";\r
+$a->strings["Block Author"] = "拦作家";\r
+$a->strings["blockem settings updated"] = "blockem设置更新了";\r
diff --git a/superblock/superblock.css b/superblock/superblock.css
new file mode 100755 (executable)
index 0000000..368355b
--- /dev/null
@@ -0,0 +1,18 @@
+
+#superblock-label {
+       float: left;
+       width: 300px;
+       margin-top: 10px;
+}
+
+#superblock-words {
+       float: left;
+       margin-top: 10px;
+       width: 400px;
+       height: 150px;
+}
+
+#superblock-submit {
+       margin-top: 15px;
+}
+
diff --git a/superblock/superblock.php b/superblock/superblock.php
new file mode 100755 (executable)
index 0000000..41abb47
--- /dev/null
@@ -0,0 +1,133 @@
+<?php
+
+
+/**
+ * Name: superblock
+ * Description: block people
+ * Version: 1.0
+ * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
+ * 
+ */
+
+function superblock_install() {
+
+       register_hook('plugin_settings', 'addon/superblock/superblock.php', 'superblock_addon_settings');
+       register_hook('plugin_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post');
+       register_hook('conversation_start', 'addon/superblock/superblock.php', 'superblock_conversation_start');
+       register_hook('item_photo_menu', 'addon/superblock/superblock.php', 'superblock_item_photo_menu');
+}
+
+
+function superblock_uninstall() {
+
+       unregister_hook('plugin_settings', 'addon/superblock/superblock.php', 'superblock_addon_settings');
+       unregister_hook('plugin_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post');
+       unregister_hook('conversation_start', 'addon/superblock/superblock.php', 'superblock_conversation_start');
+       unregister_hook('item_photo_menu', 'addon/superblock/superblock.php', 'superblock_item_photo_menu');
+
+}
+
+
+
+
+
+function superblock_addon_settings(&$a,&$s) {
+
+       if(! local_user())
+               return;
+
+    /* Add our stylesheet to the page so we can make our settings look nice */
+
+    $a->page['htmlhead'] .= '<link rel="stylesheet"  type="text/css" href="' . $a->get_baseurl() . '/addon/superblock/superblock.css' . '" media="all" />' . "\r\n";
+
+
+       $words = get_pconfig(local_user(),'system','blocked');
+       if(! $words)
+               $words = '';
+
+    $s .= '<div class="settings-block">';
+    $s .= '<h3>' . t('"Superblock" Settings') . '</h3>';
+    $s .= '<div id="superblock-wrapper">';
+    $s .= '<label id="superblock-label" for="superblock-words">' . t('Comma separated profile URLS to block') . ' </label>';
+    $s .= '<textarea id="superblock-words" type="text" name="superblock-words" >' . htmlspecialchars($words) . '</textarea>';
+    $s .= '</div><div class="clear"></div>';
+
+    $s .= '<div class="settings-submit-wrapper" ><input type="submit" id="superblock-submit" name="superblock-submit" class="settings-submit" value="' . t('Submit') . '" /></div></div>';
+
+       return;
+
+}
+
+function superblock_addon_settings_post(&$a,&$b) {
+
+       if(! local_user())
+               return;
+
+       if($_POST['superblock-submit']) {
+               set_pconfig(local_user(),'system','blocked',trim($_POST['superblock-words']));
+               info( t('SUPERBLOCK Settings saved.') . EOL);
+       }
+}
+
+function superblock_conversation_start(&$a,&$b) {
+
+       if(! local_user())
+               return;
+
+       $words = get_pconfig(local_user(),'system','blocked');
+       if($words) {
+               $a->data['superblock'] = explode(',',$words);
+       }
+       $a->page['htmlhead'] .= <<< EOT
+
+<script>
+function superblockBlock(author) {
+       $.get('superblock?block=' +author, function(data) {
+               location.reload(true);
+       });
+}
+</script>
+
+EOT;
+
+}
+
+function superblock_item_photo_menu(&$a,&$b) {
+
+       if((! local_user()) || ($b['item']['self']))
+               return;
+
+       $blocked = false;
+       $author = $b['item']['author-link'];
+       if(is_array($a->data['superblock'])) {
+               foreach($a->data['superblock'] as $bloke) {
+                       if(link_compare($bloke,$author)) {
+                               $blocked = true;
+                               break;
+                       }
+               }
+       }
+
+       $b['menu'][ t('Block Completely')] = 'javascript:superblockBlock(\'' . $author . '\');';
+}
+
+function superblock_module() {}
+
+
+function superblock_init(&$a) {
+
+       if(! local_user())
+               return;
+
+       $words = get_pconfig(local_user(),'system','blocked');
+
+       if(array_key_exists('block',$_GET) && $_GET['block']) {
+               if(strlen($words))
+                       $words .= ',';
+               $words .= trim($_GET['block']);
+       }
+
+       set_pconfig(local_user(),'system','blocked',$words);
+       info( t('superblock settings updated') . EOL );
+       killme();
+}