From 6645846ad30ed0689d5e2848f9ae337bf8f28219 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Mon, 20 Jul 2015 02:04:51 -0700 Subject: [PATCH 1/7] allow per-connection content filter to specify a detected language to include/exclude (in addition to text, tags, and regexes) --- include/items.php | 6 ++++++ version.inc | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/items.php b/include/items.php index 054008d58..a460c8fd2 100755 --- a/include/items.php +++ b/include/items.php @@ -3381,6 +3381,8 @@ function post_is_importable($item,$abook) { $text = prepare_text($item['body'],$item['mimetype']); $text = html2plain($text); + $lang = detect_language($text); + $tags = ((count($item['term'])) ? $item['term'] : false); // exclude always has priority @@ -3397,6 +3399,8 @@ function post_is_importable($item,$abook) { } elseif((strpos($word,'/') === 0) && preg_match($word,$body)) return false; + elseif((strpos($word,'lang=') === 0) && ($lang) && (stricmp($lang,trim(substr($word,5))) == 0)) + return false; elseif(stristr($text,$word) !== false) return false; } @@ -3414,6 +3418,8 @@ function post_is_importable($item,$abook) { } elseif((strpos($word,'/') === 0) && preg_match($word,$body)) return true; + elseif((strpos($word,'lang=') === 0) && ($lang) && (stricmp($lang,trim(substr($word,5))) == 0)) + return true; elseif(stristr($text,$word) !== false) return true; } diff --git a/version.inc b/version.inc index 249734f42..3548f0180 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2015-07-19.1098 +2015-07-20.1099 From 464625cd9107a82785bca40eb771a5c1149d8f2d Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 20 Jul 2015 15:03:55 +0200 Subject: [PATCH 2/7] show icons instead of disabled checkboxes --- view/tpl/field_acheckbox.tpl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/view/tpl/field_acheckbox.tpl b/view/tpl/field_acheckbox.tpl index f96fd5fd6..e99128bbb 100755 --- a/view/tpl/field_acheckbox.tpl +++ b/view/tpl/field_acheckbox.tpl @@ -5,11 +5,16 @@ {{if $notself}} - + {{if $field.2}}{{else}}{{/if}} {{/if}} - + {{if $self || !$field.5}} + + {{/if}} + {{if $notself && $field.5}} + {{if $field.3}}{{else}}{{/if}} + {{/if}} {{if $field.5}}{{$inherited}}{{if $self}}{{if $field.7}} {{else}} {{/if}}{{/if}}{{/if}} From 4d45bc9da185c4c8f558b07f8020dce8171fb957 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 20 Jul 2015 21:01:11 +0200 Subject: [PATCH 3/7] Fixes regarding the new default profile photo size. The default profile photos are just renamed. People which provided the originals are invited to reproduce them in the new 300 by 300 px format. --- .../alpha/{175.png => 300.png} | Bin .../black_avatar_1/{175.png => 300.png} | Bin .../black_avatar_2/{175.png => 300.png} | Bin .../blank/{175.jpg => 300.jpg} | Bin .../blank/{175.png => 300.png} | Bin .../rainbow_man/{175.jpg => 300.jpg} | Bin .../rainbow_man/{175.png => 300.png} | Bin .../rainbow_man_trans/{175.png => 300.png} | Bin .../red_avatar/{175.png => 300.png} | Bin .../red_koala/{175.jpg => 300.jpg} | Bin .../red_koala/{175.png => 300.png} | Bin .../red_koala_trans/{175.png => 300.png} | Bin .../redmatrix_logo_smiley/{175.png => 300.png} | Bin include/identity.php | 4 ++-- include/network.php | 4 ++-- include/photo/photo_driver.php | 8 ++++---- view/tpl/profile_vcard.tpl | 2 +- 17 files changed, 9 insertions(+), 9 deletions(-) rename images/default_profile_photos/alpha/{175.png => 300.png} (100%) rename images/default_profile_photos/black_avatar_1/{175.png => 300.png} (100%) rename images/default_profile_photos/black_avatar_2/{175.png => 300.png} (100%) rename images/default_profile_photos/blank/{175.jpg => 300.jpg} (100%) rename images/default_profile_photos/blank/{175.png => 300.png} (100%) rename images/default_profile_photos/rainbow_man/{175.jpg => 300.jpg} (100%) rename images/default_profile_photos/rainbow_man/{175.png => 300.png} (100%) rename images/default_profile_photos/rainbow_man_trans/{175.png => 300.png} (100%) rename images/default_profile_photos/red_avatar/{175.png => 300.png} (100%) rename images/default_profile_photos/red_koala/{175.jpg => 300.jpg} (100%) rename images/default_profile_photos/red_koala/{175.png => 300.png} (100%) rename images/default_profile_photos/red_koala_trans/{175.png => 300.png} (100%) rename images/default_profile_photos/redmatrix_logo_smiley/{175.png => 300.png} (100%) diff --git a/images/default_profile_photos/alpha/175.png b/images/default_profile_photos/alpha/300.png similarity index 100% rename from images/default_profile_photos/alpha/175.png rename to images/default_profile_photos/alpha/300.png diff --git a/images/default_profile_photos/black_avatar_1/175.png b/images/default_profile_photos/black_avatar_1/300.png similarity index 100% rename from images/default_profile_photos/black_avatar_1/175.png rename to images/default_profile_photos/black_avatar_1/300.png diff --git a/images/default_profile_photos/black_avatar_2/175.png b/images/default_profile_photos/black_avatar_2/300.png similarity index 100% rename from images/default_profile_photos/black_avatar_2/175.png rename to images/default_profile_photos/black_avatar_2/300.png diff --git a/images/default_profile_photos/blank/175.jpg b/images/default_profile_photos/blank/300.jpg similarity index 100% rename from images/default_profile_photos/blank/175.jpg rename to images/default_profile_photos/blank/300.jpg diff --git a/images/default_profile_photos/blank/175.png b/images/default_profile_photos/blank/300.png similarity index 100% rename from images/default_profile_photos/blank/175.png rename to images/default_profile_photos/blank/300.png diff --git a/images/default_profile_photos/rainbow_man/175.jpg b/images/default_profile_photos/rainbow_man/300.jpg similarity index 100% rename from images/default_profile_photos/rainbow_man/175.jpg rename to images/default_profile_photos/rainbow_man/300.jpg diff --git a/images/default_profile_photos/rainbow_man/175.png b/images/default_profile_photos/rainbow_man/300.png similarity index 100% rename from images/default_profile_photos/rainbow_man/175.png rename to images/default_profile_photos/rainbow_man/300.png diff --git a/images/default_profile_photos/rainbow_man_trans/175.png b/images/default_profile_photos/rainbow_man_trans/300.png similarity index 100% rename from images/default_profile_photos/rainbow_man_trans/175.png rename to images/default_profile_photos/rainbow_man_trans/300.png diff --git a/images/default_profile_photos/red_avatar/175.png b/images/default_profile_photos/red_avatar/300.png similarity index 100% rename from images/default_profile_photos/red_avatar/175.png rename to images/default_profile_photos/red_avatar/300.png diff --git a/images/default_profile_photos/red_koala/175.jpg b/images/default_profile_photos/red_koala/300.jpg similarity index 100% rename from images/default_profile_photos/red_koala/175.jpg rename to images/default_profile_photos/red_koala/300.jpg diff --git a/images/default_profile_photos/red_koala/175.png b/images/default_profile_photos/red_koala/300.png similarity index 100% rename from images/default_profile_photos/red_koala/175.png rename to images/default_profile_photos/red_koala/300.png diff --git a/images/default_profile_photos/red_koala_trans/175.png b/images/default_profile_photos/red_koala_trans/300.png similarity index 100% rename from images/default_profile_photos/red_koala_trans/175.png rename to images/default_profile_photos/red_koala_trans/300.png diff --git a/images/default_profile_photos/redmatrix_logo_smiley/175.png b/images/default_profile_photos/redmatrix_logo_smiley/300.png similarity index 100% rename from images/default_profile_photos/redmatrix_logo_smiley/175.png rename to images/default_profile_photos/redmatrix_logo_smiley/300.png diff --git a/include/identity.php b/include/identity.php index 3925c3537..5a3861b31 100644 --- a/include/identity.php +++ b/include/identity.php @@ -1393,10 +1393,10 @@ function get_theme_uid() { * with the specified size. * * @param int $size -* one of (175, 80, 48) +* one of (300, 80, 48) * @returns string */ -function get_default_profile_photo($size = 175) { +function get_default_profile_photo($size = 300) { $scheme = get_config('system','default_profile_photo'); if(! $scheme) $scheme = 'rainbow_man'; diff --git a/include/network.php b/include/network.php index 3abb1b40e..d9546a074 100644 --- a/include/network.php +++ b/include/network.php @@ -531,7 +531,7 @@ function avatar_img($email) { $avatar = array(); $a = get_app(); - $avatar['size'] = 175; + $avatar['size'] = 300; $avatar['email'] = $email; $avatar['url'] = ''; $avatar['success'] = false; @@ -1658,4 +1658,4 @@ function format_and_send_email($sender,$xchan,$item) { -} \ No newline at end of file +} diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php index 6f508bf72..5d61556ab 100644 --- a/include/photo/photo_driver.php +++ b/include/photo/photo_driver.php @@ -606,16 +606,16 @@ function import_profile_photo($photo,$xchan,$thing = false) { if(($width / $height) > 1.2) { // crop out the sides $margin = $width - $height; - $img->cropImage(175,($margin / 2),0,$height,$height); + $img->cropImage(300,($margin / 2),0,$height,$height); } elseif(($height / $width) > 1.2) { // crop out the bottom $margin = $height - $width; - $img->cropImage(175,0,0,$width,$width); + $img->cropImage(300,0,0,$width,$width); } else { - $img->scaleImageSquare(175); + $img->scaleImageSquare(300); } } @@ -682,7 +682,7 @@ function import_channel_photo($photo,$type,$aid,$uid) { $img = photo_factory($photo, $type); if($img->is_valid()) { - $img->scaleImageSquare(175); + $img->scaleImageSquare(300); $p = array('aid' => $aid, 'uid' => $uid, 'resource_id' => $hash, 'filename' => $filename, 'album' => t('Profile Photos'), 'photo_flags' => PHOTO_PROFILE, 'scale' => 4); diff --git a/view/tpl/profile_vcard.tpl b/view/tpl/profile_vcard.tpl index 9eac48c6d..bea0d894f 100755 --- a/view/tpl/profile_vcard.tpl +++ b/view/tpl/profile_vcard.tpl @@ -1,5 +1,5 @@
-
{{$profile.name}}
+
{{$profile.name}}
{{if $profile.edit}}