Add an extra button to upload pics or data

Support area for phpBB's mChat extension
Post Reply
User avatar
jan_2017
Distinguished Donor
Posts: 109
Joined: 13 May 2017, 18:07

Add an extra button to upload pics or data

#1

Post by jan_2017 » 25 Aug 2018, 15:02

Hello.

How can I add an additional button next to the text field in mchat to upload pictures?

I also use the forum from my smartphone.I press the button and create an image with the camera and it is uploaded to the chat.

Would that work?

User avatar
kasimi
mChat developer
Posts: 699
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: Add an extra button to upload pics or data

#2

Post by kasimi » 25 Aug 2018, 18:25

Where do you want the pictures or files to be uploaded?

Your own server? In this case what you're looking for is attachments for mChat which is an add-on extension I've been working on but it's far from being stable. It's a complex task and still needs a lot of work. Don't hold your breath.

Some external image hosting service? Have a look at these extension: https://www.phpbb.com/customise/db/auth ... tributions If any of those are what you're looking for, maybe there's a way to integrate them into mChat?

User avatar
jan_2017
Distinguished Donor
Posts: 109
Joined: 13 May 2017, 18:07

Re: Add an extra button to upload pics or data

#3

Post by jan_2017 » 25 Aug 2018, 19:26

Yes on my own server. like dmzx extension Image upload.

No problem, take your time with it.

i think it would be an interesting feature if you have an image in the chat window with a few clicks

:D :wave: :beer:

by the way....i mean no hosting service....

terry2
Donor
Posts: 145
Joined: 22 Oct 2016, 18:22
Location: My castle

Re: Add an extra button to upload pics or data

#4

Post by terry2 » 25 Aug 2018, 21:43

Like the buttons you seen on mine ?
Selection_033.png
Selection_033.png (16.69 KiB) Viewed 55 times
Selection_033.png
Selection_033.png (16.69 KiB) Viewed 55 times
its an event file added into mchat.

/ext/dmzx/imageupload/styles/prosilver/template/event
make the event file dmzx_mchat_buttons_before.html

add this code into it

Code: Select all

{% if IMAGEUPLOAD_USE_UPLOAD %}
<button  class="button" class="button2" onclick="window.location.href =('./imageupload');" value="{{ lang('IMAGES_TITLE') }}" title="{{ lang('IMAGES') }}" />
<i class="icon fa fa-image" aria-hidden="true"></i><span class="sr-only">{{ lang('IMAGES') }}</span>
</button>
{% endif %}
{% if FILEUPLOAD_USE_UPLOAD %}
<button  class="button" class="button2" onclick="window.location.href =('./fileupload');" value="{{ lang('FILES_TITLE') }}" title="{{ lang('FILES') }}" />
<i class="icon fa fa-files-o" aria-hidden="true"></i><span class="sr-only">{{ lang('FILES') }}</span>
</button>
{% endif %}
Note this event and code will be my my updated cssmagic ext when i release latest version.

User avatar
jan_2017
Distinguished Donor
Posts: 109
Joined: 13 May 2017, 18:07

Re: Add an extra button to upload pics or data

#5

Post by jan_2017 » 26 Aug 2018, 07:13

Thank you terry2. Great tutorial. But this requires the extension Image upload to be installed, right?

terry2
Donor
Posts: 145
Joined: 22 Oct 2016, 18:22
Location: My castle

Re: Add an extra button to upload pics or data

#6

Post by terry2 » 26 Aug 2018, 10:20

Correct i use image upload and file upload it does just what your asking also you have acp controls for both exts.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest