mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-25 11:03:41 +00:00
updates
This commit is contained in:
parent
63764eccb9
commit
1660ab131a
4 changed files with 63 additions and 0 deletions
BIN
blockem.tgz
BIN
blockem.tgz
Binary file not shown.
|
@ -16,6 +16,7 @@ function blockem_install() {
|
||||||
register_hook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
|
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('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start');
|
||||||
register_hook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
|
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('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
|
||||||
unregister_hook('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start');
|
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('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) {
|
function blockem_prepare_body(&$a,&$b) {
|
||||||
|
|
||||||
if(! local_user())
|
if(! local_user())
|
||||||
|
|
BIN
superblock.tgz
BIN
superblock.tgz
Binary file not shown.
|
@ -15,6 +15,8 @@ function superblock_install() {
|
||||||
register_hook('plugin_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post');
|
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('conversation_start', 'addon/superblock/superblock.php', 'superblock_conversation_start');
|
||||||
register_hook('item_photo_menu', 'addon/superblock/superblock.php', 'superblock_item_photo_menu');
|
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('plugin_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post');
|
||||||
unregister_hook('conversation_start', 'addon/superblock/superblock.php', 'superblock_conversation_start');
|
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('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) {
|
function superblock_conversation_start(&$a,&$b) {
|
||||||
|
|
||||||
if(! local_user())
|
if(! local_user())
|
||||||
|
|
Loading…
Reference in a new issue