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' );
}
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' );
}
}
}
+
+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())