An improvement on OssnMessages component to allow the user to attach images. Images also appear properly into OssnChat component, but isn't possible (yet) send images through this component.
If FancyBox component is enabled, images can be open in fullscreen mode.
OSSN message system has 2 components. The OssnMessages is used in mobile version and OssnChat is the small chatbox at bottom of the page. At this version, this component only works with OssnMessage. Maybe someone here can help me to develop this part of the component :-)
Screenshot of OssnMessages component
Screenshot of OssnChat component
If you want to help me to make more components, click on the button down bellow and buy me a coffee. It's up to you how much coffee I'll drink :-)
Michael
Thank you for point me mi mystake. I forgot to check the basics :-)
And sorry for make you check the code at 00:30.
Uploading version 1.2 today
At this version, this component only works with OssnMessage. Maybe someone here can help me to develop this part of the component :-)
Honestly I did not understand from the very beginning why there are two almost similar channels in parallel at all? That's why I would rather drop development on one of them completely. :)
aha ...., debugging $_FILES gives
[23-Mar-2022 00:41:07 Europe/Berlin] FILES 27 <pre>Array
(
[uploadImageInMessage] => Array
(
[name] => image-message1.png
[type] => image/png
[tmp_name] => /tmp/phpgSYJUe
[error] => 0
[size] => 7691
)
)
so, it should be
&& $_FILES['uploadImageInMessage']['size'] !== 0
just checked 1.2 from Github:
warning is still there (line 26 now)
happening right after imagesinmessage/attachment call
but it's a little late here ... :) (00:30)
I'll put all replies into one post :-)
@Hugo
Thanks for the feedback, test GIF file support, and the pull request into GitHub with translation to spanish. It will be released in version 1.2.
Added Cancel button suggestion into issues section on GitHub repo too.
@Michael
Thanks for the feedback. I added a <requires> to OssnMessages in ossn_com.xml. Also, I put a test to check if OssnMessage is active.
I put a test to try a solution to the warning in line 23 of ossn_com.php. However, I can't replicate this warning message. Can you make a test with GitHub version? I really appreciate your feedback before release the version 1.2
@Tamás and @Hugo (again, because is basically the same question)
OSSN message system has 2 components. The OssnMessages is used in mobile version and OssnChat is the small chatbox at bottom of the page. At this version, this component only works with OssnMessage. Maybe someone here can help me to develop this part of the component :-)
Hi, just installed v1.1 in a virtual machine for testing, no problems so far. I agree with Tamás, there's no icon in the external chatbox, but this is not a big deal and not important i think.
Also i tested with Gif Support, no errors.
Improvements suggestions:
When selecting an image I get
PHP WARNING: 2022-03-22 08:14:41 (CET): "Undefined array key "file"" in file components/ImagesInMessage/ossn_com.php (line 23)
PHP WARNING: 2022-03-22 08:14:41 (CET): "Trying to access array offset on value of type null" in file components/ImagesInMessage/ossn_com.php (line 23)
When disabling OssnMessages I get
Error: Class "OssnMessages" not found in components/ImagesInMessage/classes/ImagesInMessage.php:12
Stack trace:
0 components/ImagesInMessage/ossn_com.php(16): require_once()
1 classes/OssnComponents.php(229): include_once('...')
2 libraries/ossn.lib.components.php(69): OssnComponents->loadComs()
3 system/start.php(39): include_once('...')
4 index.php(12): require_once('...')
5 {main}
Rafael: OSSN 6.1 white theme. Laptop, Chrome web browser, envelope clicking and no photo upload icon.
When you open menu messages, there is a photo icon.
Rafael: Photo sending is working for now, no text feedback. We test about 200 people today. Thank you very much for this opportunity.
In GitHub I fixed these two issues (cache and path). However I finded in notification a message like [image=ME95bis5L0p instead a friendly message.
I'll try to fix this tomorrow and after that, send a new version.