MyBB Community Forums

Full Version: [All Versions] Add a very simple Image Uploader [No Plugin]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
in this Tutorial you will learn to add a very simple image uploading feature on new thread page of your MyBB Broad.

There are 2 Types of this Uploader that you can add according to your choice.

#1. Popup Based
[Image: 14296000875de2267.PNG]
#2. Iframe Based
[Image: 142960182608926e2.PNG]


How To Add The Popup Based uploader

Step #1. Go to Templates And Style >> Templates >> Your Theme Templates >> New Thread Templates >> newthread
Step #2. Find {$smilieinserter}
Step #3. Add This Code Exactly After {$smilieinserter}

<SCRIPT LANGUAGE="JavaScript">
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=300');");
}
</script>
<form>
<center><input type=button value="Upload Images" onClick="javascript:popUp('http://supr.ga/imageuploader.php')"></center>
</form>

Step #4. Save And See changes on new Thread page.


How To Add The Iframe Based uploader


Step #1. Go to Templates And Syle >> Templates >> Your Theme Templates >> New Thread Templates >> newthread
Step #2. Find {$multiquote_external}
Step #3. Add This Code Exactly After {$multiquote_external}

<h3>Upload Images To Add In Your Thread</h3>
<iframe src="http://supr.ga/imageuploader.php" name="imageuploader" scrolling="yes" frameborder="no" align="center" height = "250px" width = "600px">
</iframe>
Step #4. Save And See changes on new Thread page.


FAQ.


Q. What about image resizing?
A. users can use MyBB code editor to set the display size of the image.
its pretty simple, user just have to enter anyone value (width or height) and other value will be generated according to expect ratio.
[Image: 14296049794bcf947.PNG]

Q. Where the image will be saved?
A. images will be saved at http://supr.ga/i/

Q. Adult Images?
A. Allowed

Q. Allowed formats and max size?
A. Formats: png, jpg, gif. Max. Size: 5mb

Support : Post here or on my forum.


Note : I am NOT a professional coder, i am learning the basics now.

CAN SOMEONE MAKE ME A PLUGIN FOR THIS?