MyBB Hacks

Full Version: Implement to CKEditor the imgur upload function
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello members i have a small request can someone help me to implement like in the default editor the imgur upload button

For the default editor the working tutorial is this

Upload images to Imgur from Mybb
1 Create your own API https://imgur.com/register/api_anon

2 Upload the files in the root of your MyBB forum

3 Open jscripts / editor.js and find:

4

Code:
{type: 'button', name: 'img', sprite: 'image', insert: 'image', extra: 1, title: this.options.lang.title_image},


5 Add after

Code:
{type: 'button', name: 'imgur', insert: 'imgur', image: 'imgurbut.png', title: 'Upload to Imgur'},


6 Find

Code:
insertIMG: function()    {        image = prompt(this.options.lang.enter_image, "http://");        if(image)        {            this.performInsert("[img]"+image+"[/img]", "", true);        }    },


7 Add after

Code:
insertImgur: function()    {        MyBB.popupWindow('imgur.php', 'imgur', 240, 200);    },


8 Find

Code:
case "image":                this.insertIMG();                break;


Add after

Code:
case "imgur":                this.insertImgur();                break;


Download the  files and upload them on root


Don't forget to add your Client ID key on imgur.php on line 43



Download from here

https://copy.com/HBbKWP4WPHBU

Reference URL's