MyBB Community Forums

Full Version: Add photos in threads
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi everybody,

I was wondering how i can make it possible for users to upload their photos in a thread without them having to go to github or what ever kind of host website. I want them to be able to post the pic without any difficulties. How can i do it? Thanks! Cool
(2024-02-25, 11:27 AM)Benny87 Wrote: [ -> ]Hi everybody,

I was wondering how i can make it possible for users to upload their photos in a thread without them having to go to github or what ever kind of host website. I want them to be able to post the pic without any difficulties. How can i do it? Thanks! Cool

in default users can attahments files , but if in your forum they not have permission , you can give it like this :
Admin CP -> Users & Groups -> Edit usergroup that you want -> Forums and Posts Tab -> check "Can post attachments?" if unchecked

for manage Attachment Types  you can go
 Admin CP -> Configuration -> Attachment Types
(2024-02-25, 11:49 AM)Mostafa.Shiraali Wrote: [ -> ]
(2024-02-25, 11:27 AM)Benny87 Wrote: [ -> ]Hi everybody,

I was wondering how i can make it possible for users to upload their photos in a thread without them having to go to github or what ever kind of host website. I want them to be able to post the pic without any difficulties. How can i do it? Thanks! Cool

Quote:in default users can attahments files , but if in your forum they not have permission , you can give it like this :
Admin CP -> Users & Groups -> Edit usergroup that you want -> Forums and Posts Tab -> check "Can post attachments?" if unchecked

for manage Attachment Types  you can go
 Admin CP -> Configuration -> Attachment Types


Thanks for your quick reply. I have checked the '' can post attachments'' and in my Admin CP i have al kinds of attachment types enabled. But if i go to my forum as a normal user, all i can do is place an image with an url. It is the same in this forum right here. When i click on the icon, i can only insert an url, but not just upload a file. Am i doing something wrong? 
Are you scrolling down and clicking on the 'Drop some files here to upload...' box and nothing's happening, or are you trying to upload through the editor?

[attachment=46696]
(2024-02-25, 12:02 PM)MattyWjeisz Wrote: [ -> ]Are you scrolling down and clicking on the 'Drop some files here to upload...' box and nothing's happening, or are you trying to upload through the editor?
Ah yes now i noticed the drop some files here option. It's kinda far below the writing area, thats why i never noticed it before lol. I wish there would be a button above the text field. Thanks anyway! My bad
This thread and it's outcome may be of interest to you?

https://community.mybb.com/thread-240227.html
Or ... may like to do this as well?
https://community.mybb.com/thread-232121...pid1366038
(2024-02-25, 04:51 PM)effone Wrote: [ -> ]Or ... may like to do this as well?
https://community.mybb.com/thread-232121...pid1366038

That is pretty cool .... thank you.

All works well on 1.8.37 with PHP 8.2.16

And I haven't even got an Imgur ID (I just used the code you gave and it uploads without any changes).

Have been trying to alter the function to upload to my server rather than Imgur (or any third party) but no luck yet lol Confused
I did the same with Imgbb as well successfully.
For own server you need to develop backend REST API to handle upload requests...
(2024-02-26, 04:09 PM)effone Wrote: [ -> ]For own server you need to develop backend REST API to handle upload requests...

May I ask why?
I just looked at what I would need to do in order for that REST API .... and .... well .... I am a carpenter (an old one at that) and I think to do that may well be "above my pay grade"!

lol

Why can I not take the way that the "Attachments" upload (if I can find it) and drop that into your code (in place of the function)?
I guess that the "Attachments" don't use a REST API but they upload the images to my server?

Thing is that back in the past webspace cost a bit but now a few hundred gig isn't so much and on my main server I could hold 2 million images at an average of 100kb each, with no problem .... and the forum is only a small forum so we would never get any where near that!

I just wish to have it all "in house" if possible!

The "Attachments" upload directly to the server (I only have the single domain on the main server, the test server has a few) .... there must be a way that I can use that BUT with the functioning of your code??
Pages: 1 2