From: friendica Date: Wed, 11 Jan 2012 00:54:47 +0000 (-0800) Subject: blockem update X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7fcc7b9bb000857638466f5e38ee695ea3c67020;p=friendica-addons.git blockem update --- diff --git a/blockem.tgz b/blockem.tgz index b01e8f98..d31c638f 100644 Binary files a/blockem.tgz and b/blockem.tgz differ diff --git a/blockem/blockem.css b/blockem/blockem.css index 72c0bcc3..265b6ba8 100644 --- a/blockem/blockem.css +++ b/blockem/blockem.css @@ -8,6 +8,8 @@ #blockem-words { float: left; margin-top: 10px; + width: 400px; + height: 150px; } #blockem-submit { diff --git a/blockem/blockem.php b/blockem/blockem.php index 4fff2148..f8c30dc6 100644 --- a/blockem/blockem.php +++ b/blockem/blockem.php @@ -11,6 +11,7 @@ function blockem_install() { register_hook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body'); + register_hook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item'); register_hook('plugin_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings'); register_hook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post'); @@ -19,6 +20,7 @@ function blockem_install() { function blockem_uninstall() { unregister_hook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body'); + unregister_hook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item'); unregister_hook('plugin_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings'); unregister_hook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post'); @@ -30,7 +32,6 @@ function blockem_uninstall() { function blockem_addon_settings(&$a,&$s) { - if(! local_user()) return; @@ -47,7 +48,7 @@ function blockem_addon_settings(&$a,&$s) { $s .= '

' . t('"Blockem" Settings') . '

'; $s .= '
'; $s .= ''; - $s .= ''; + $s .= ''; $s .= '
'; $s .= '
'; @@ -97,10 +98,14 @@ function blockem_prepare_body(&$a,&$b) { } } if($found) { - $rnd = random_string(8); - $b['item']['author-avatar'] = $a->get_baseurl() . "/images/default-profile-sm.jpg"; - $b['html'] = -'' . -''; + $rnd = random_string(8); + $b['html'] = ''; } } + + +function blockem_display_item(&$a,&$b) { + if(strstr($b['output'],'id="blockem-wrap-')) + $b['output'] = preg_replace('/\/','get_baseurl() . "/images/default-profile-sm.jpg" . '" class="wall-item-photo$3>',$b['output']); +} +