]> git.mxchange.org Git - friendica-addons.git/commitdiff
updates
authorfriendica <info@friendica.com>
Thu, 9 May 2013 08:18:03 +0000 (01:18 -0700)
committerfriendica <info@friendica.com>
Thu, 9 May 2013 08:18:03 +0000 (01:18 -0700)
blockem.tgz
blockem/blockem.php
superblock.tgz
superblock/superblock.php

index 390102e4d69bbabd5da7a470c935095d546abc86..396e97478ab06b0c90ac7774bef825c7973eea35 100755 (executable)
Binary files a/blockem.tgz and b/blockem.tgz differ
index 85c7fec68a32b0d631c538e1d9b0f9ebde33088d..f09625783e57178b7154170d81ae16b49aa7ac40 100755 (executable)
@@ -16,6 +16,7 @@ function blockem_install() {
        register_hook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
        register_hook('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start');
        register_hook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
+       register_hook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store' );
 }
 
 
@@ -26,6 +27,7 @@ function blockem_uninstall() {
        unregister_hook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
        unregister_hook('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start');
        unregister_hook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
+       unregister_hook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store' );
 
 }
 
@@ -71,6 +73,35 @@ function blockem_addon_settings_post(&$a,&$b) {
        }
 }
 
+
+function blockem_enotify_store(&$a,&$b) {
+
+       $words = get_pconfig($b['uid'],'blockem','words');
+       if($words) {
+               $arr = explode(',',$words);
+       }
+       else {
+               return;
+       }
+
+       $found = false;
+       if(count($arr)) {
+               foreach($arr as $word) {
+                       if(! strlen(trim($word))) {
+                               continue;
+                       }
+
+                       if(link_compare($b['url'],$word)) {
+                               $found = true;
+                               break;
+                       }
+               }
+       }
+       if($found) {
+               $b['abort'] = true;
+       }
+}
+
 function blockem_prepare_body(&$a,&$b) {
 
        if(! local_user())
index 7d9523cb740e4cd6f7d45ffc1c4616bbb33d9f67..ba5849fc1a3108dc13a7593cfdf195154adb4702 100644 (file)
Binary files a/superblock.tgz and b/superblock.tgz differ
index 420db76c691b3e5ec7a0f6ffae45738c791db835..7363c1399f6b32b73a2e0509f5107f39681cea20 100755 (executable)
@@ -15,6 +15,8 @@ function superblock_install() {
        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');
+       register_hook('enotify_store', 'addon/superblock/superblock.php', 'superblock_enotify_store');
+
 }
 
 
@@ -24,6 +26,7 @@ function superblock_uninstall() {
        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');
+       unregister_hook('enotify_store', 'addon/superblock/superblock.php', 'superblock_enotify_store');
 
 }
 
@@ -69,6 +72,35 @@ function superblock_addon_settings_post(&$a,&$b) {
        }
 }
 
+function superblock_enotify_store(&$a,&$b) {
+
+       $words = get_pconfig($b['uid'],'system','blocked');
+       if($words) {
+               $arr = explode(',',$words);
+       }
+       else {
+               return;
+       }
+
+       $found = false;
+       if(count($arr)) {
+               foreach($arr as $word) {
+                       if(! strlen(trim($word))) {
+                               continue;
+                       }
+
+                       if(link_compare($b['url'],$word)) {
+                               $found = true;
+                               break;
+                       }
+               }
+       }
+       if($found) {
+               $b['abort'] = true;
+       }
+}
+
+
 function superblock_conversation_start(&$a,&$b) {
 
        if(! local_user())