diff --git a/blockem.tgz b/blockem.tgz index 390102e4..396e9747 100755 Binary files a/blockem.tgz and b/blockem.tgz differ diff --git a/blockem/blockem.php b/blockem/blockem.php index 85c7fec6..f0962578 100755 --- a/blockem/blockem.php +++ b/blockem/blockem.php @@ -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()) diff --git a/superblock.tgz b/superblock.tgz index 7d9523cb..ba5849fc 100644 Binary files a/superblock.tgz and b/superblock.tgz differ diff --git a/superblock/superblock.php b/superblock/superblock.php index 420db76c..7363c139 100755 --- a/superblock/superblock.php +++ b/superblock/superblock.php @@ -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())