-
AuthorPosts
-
July 21, 2016 at 10:09 am #952017
Hi,
Unfortunatelly there is still something wrong – new post from fb still upload with poor quality images.
I’ve tried everything:- I’ve installed update- nothing change.
- One again I’ve installed fixed plugin (from previous topic)- nothing change.
- I’ve deleted everything (even social_feed catalog with images) and installed plugin once again- still some images have good quality and others poor.
Any idea?
Regards,
Artur
site: wwr.com.pl
Mo0nlight ModeratorMo0nlight
- Join date:
- September 2014
- Posts:
- 707
- Downloads:
- 38
- Uploads:
- 107
- Thanked:
- 99 times in 97 posts
July 25, 2016 at 7:34 am #952816Hi
You can try this:
Edit the file: /plugins/plg_system_jasocial_feed/jasocial_feed.phpFind for code:
$post['source_images'] = $this->getFacebookImage('<img src="'.$dt->img.'" />',$img_caption, $img_caption);
Add this code above.
if (preg_match('/i.ytimg.com/', $dt->img)) { // img from youtube preg_match('/url=(.*?)$/', $dt->img, $mat); if (!empty($mat[1])) { $dt->img = str_replace(array('&cfs=1', 'maxresdefault'), array('', '0'), urldecode($mat[1])); } }
Regards.
1 user says Thank You to Mo0nlight for this useful post
July 25, 2016 at 10:41 am #952916Hello, Now importing post with link to youtube works fine, but still there is problem with some typical facebook posts (it imports only thumbnails). Examples: http://wwr.com.pl/facebook/1695-facebook-id-10154307564385762 http://wwr.com.pl/facebook/1660-facebook-id-10154092108620762 http://wwr.com.pl/facebook/1659-facebook-id-10154192643445762 Regards, Artur
Luna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
July 29, 2016 at 4:17 am #954972Hi.
for that case.
You can try this.
Edit the file: /plugins/plg_system_jasocial_feed/jasocial_feed.php
Find for.} else { $aImages[$index] = $img; }
Change to:
} else { if (preg_match('/external/', $img)) $aImages[$index] = str_replace(array('w=130', 'h=130'), array('w=476', 'h=249'), $img); else $aImages[$index] = $img; }
Regards.
August 1, 2016 at 7:52 am #955548Hi,
Unfortunatelly, nothing changed.
Regards,
ArturLuna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
August 2, 2016 at 7:31 am #955983This reply has been marked as private.August 4, 2016 at 7:42 am #956881Hi,
I see that you made changes, now it looks perfect. Thank you!
Regards,
ArturMo0nlight ModeratorMo0nlight
- Join date:
- September 2014
- Posts:
- 707
- Downloads:
- 38
- Uploads:
- 107
- Thanked:
- 99 times in 97 posts
August 4, 2016 at 8:23 am #956915Hi
Yes, I made some changes in file /plugins/system/jasocial_feed/jasocial_feed.php
at line : 342-344. add this code.
if (preg_match('/w=130&h=130/', $item->picture) && preg_match('/fbstaging/', $item->picture)) { $item->picture = str_replace('w=130&h=130','w=476&h=249',$item->picture); }
and change the code at line : 1869-1896
foreach ($aImages as $index => $img) { if(strpos($img, 'fbcdn') !== false) { if(preg_match('/url\=http/', $img)) { //eg: https://fbexternal-a.akamaihd.net/safe_image.php?d=AQBr4qx2iuYe6k6f&w=158&h=158&url=https%3A%2F%2Fscontent-a-lax.xx.fbcdn.net%2Fhphotos-xpf1%2Ft31.0-8%2Fs720x720%2F10943719_848687791857700_7419083212834719221_o.jpg $img = preg_replace('/^(.*?)url\=http/', '', $img); // $img = preg_replace('/.*?url\=(http.*)/', '$1', $img); $img = 'http'.rawurldecode($img); $img = preg_replace('/\&cfs\=1(.*?)$/', '', $img); $aImages[$index] = $img; } if(preg_match('#/([0-9]+)_([0-9]+)_([0-9]+)_(o|b)?\.(jpg|png|jpeg|gif|bmp)#i', $img, $matches)) { //is original, big image $aImages[$index] = $img; } else if(preg_match('#/([0-9]+)_([0-9]+)_([0-9]+)(?:_[a-z])?\.(jpg|png|jpeg|gif|bmp)#i', $img, $matches)) { if (!strpos($img, 'hphotos')) // if the image from fb already big size. $img = 'https://graph.facebook.com/'.$matches[2].'/picture'; $aImages[$index] = $img; } else if (preg_match($patternSmallImg, $img)) { $aImages[$index] = preg_replace($patternSmallImg, '_b.$1', $img); } } else { if (preg_match('/external/', $img)) $aImages[$index] = str_replace(array('w=130', 'h=130'), array('w=476', 'h=249'), $img); else $aImages[$index] = $img; } }
Regards
-
AuthorPosts
This topic contains 10 replies, has 3 voices, and was last updated by Mo0nlight 8 years, 4 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum