Implement to CKEditor the imgur upload function
Atom Offline
Junior Member
**
Posts: 2
Joined: Dec 2013
Post: #1
Implement to CKEditor the imgur upload function
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

12-22-2013 08:11 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: