Open phxinternational opened 4 years ago
Disable, delete data of extension, enable it
done, did not work, it does not save the file. then it dissapears.
Version Php and version Phpbb?
If you remove this code || !file_exists($this->pg_social_path.'/images/upload/'.$cover) in line 172 controller/helper.php. It works
@Mightymax44 then it breaks the cover photo of the main profile. and the page cover photo. That line has nothing to do with page profile photo.
If you upload a page "PROFILE PHOTO" immediately you wil see the photo appear in the page profile photo circle... as soon as you refresh your page then the photo is gone. php 7.1 / phpbb 3.2.7. chat and all other features are working fine. but the page profile photo is still broken.
@Mightymax44 my apologies.. I had the wrong version of the file.. you are right! Yes it has fixed it. well done!
@PGreca you can label this fixed now.
@phxinternational the fix is not ok for registered user. i tested with an account register and same problem
@Mightymax44 I will test it shortly. are you having a problem with both? pages and profile or just pages?
both with registred account
@Mightymax44 I see what you mean. it seems to be ok on my admin, but when a registered user uploads it fails. well spotted.
@phxinternational I tested (registred user)with photo max 1920x2560 and it works great, probably width and height cause the problem.
With the last version master, the problem and avatar problem is still present (phpbb3.3 and php 7.3.12)
just remove "!" in line 173"if ($cover == '' || file_exists($this->pg_social_path.'upload/'.$cover))" and it's okay.
With the fix is not publish on the wall but if you change line 477 on helper.php $m => $message, by 'message'=> $message, it works great and publish on the wall
In fact the correct would be this:
if ($cover == '' || empty($this->pg_social_path.'upload/'.$cover))
About the message, that's not a good solution, but this is better:
public function pgMessage($message, $type = 'status')
{
$options = 0;
$m = 'message';
$uid = $bitfield = $allow_img = $allow_flash = $allow_quote = $allow_url = $allow_bbcode = '';
if ($message)
{
$allow_bbcode = $this->config['pg_social_bbcode'];
$allow_urls = $this->config['pg_social_url'];
$allow_smilies = $this->config['pg_social_smilies'];
if ($type == 'chat')
{
$allow_bbcode = $this->config['pg_social_chat_message_bbcode_enabled'];
$allow_urls = $this->config['pg_social_chat_message_url_enabled'];
$allow_smilies = $this->config['pg_social_chat_smilies_enabled'];
$m = 'chat_text';
}
generate_text_for_storage($message, $uid, $bitfield, $options, $allow_bbcode, $allow_urls, $allow_smilies, $allow_img, $allow_flash, $allow_quote, $allow_url);
$message = str_replace("'", ''', $message);
}
return array(
$m => $message,
'bbcode_bitfield' => $bitfield,
'bbcode_uid' => $uid,
'bbcode_options' => $options,
);
}```
Needs to be addressed. Images don't save on the page profile picture.