Jump to content
WebFlake

Add Imgur upload button in the editor


Protesqu

Recommended Posts

How to add an Imgur upload button in the editor

*This is my original tutorial. You may share it freely, but(!) consider mentioning who wrote it.

1.

Create an Imgur account, and then register an application here: https://api.imgur.com/oauth2/addclient

Now you have a client ID, which is to be used in the Imgur plugin we add to the editor.

 

2.

Download the Imgur plugin from http://ckeditor.com/addon/imgur

Go to your ACP-> Customization-> Editor--> Toolbars-> "Add Button". Upload the plugin file(zip) for installation.

By now you can drag the button to the toolbar for it to show, but it won't function just yet.

 

3.

Connect to your FTP-> Edit file: applications/core/interface/ckeditor/ckeditor/config.js

Add the settings in the end of the file (remember to use your Client ID number):

CKEDITOR.editorConfig = function( config ) {
    config.extraPlugins = 'imgur';
    config.imgurClientId = '123535ae12372d4';
};

Save & upload, done.

I hope this tutorial helped you!:grin:

Result:

LOkpRrr.png

Edited by Protesqu
line break
  • Upvote 4
Link to comment
Share on other sites

42 minutes ago, Little Monsters said:

When creating the app what should I put as the callback URL?

N5Aolax.png

1st option means images will be uploaded to your imgur account directly + callback url

2nd option is just without a callback url

3rd option means images will be uploaded anonymously to imgur, not to your account directly

callback url is just your site url.

 

Edited by Protesqu
  • Upvote 1
Link to comment
Share on other sites

1 hour ago, Jason Xtreme said:

I tried to put that config like that.

nR5A7Ip.png?1

And when i want to post/reply, I getting this.

vPi8kvo.png

 

 

*Sorry my bad english*

You only need one line to specify extra plugins. example:

config.extraPlugins = 'imgur,dropler';

config.imgurClientId = '12345';

config.droplerConfig= {

............

 

 

 

 

27 minutes ago, ansube said:

I have the same problem

If you also have more than 1 extraPlugin - check my last comment. Otherwise, you should specify a little more.

Link to comment
Share on other sites

Well...no clue man, my config works:

/*
 Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.editorConfig=function(a){a.toolbarGroups=[{name:"document",groups:["mode","document","doctools"]},{name:"clipboard",groups:["clipboard","undo"]},{name:"editing",groups:["find","selection","spellchecker"]},{name:"forms"},{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"paragraph",groups:["list","indent","blocks","align","bidi"]},{name:"links"},{name:"insert"},{name:"styles"},{name:"colors"},{name:"tools"},{name:"others"},{name:"about"}];a.removeButtons="Cut,Copy,Paste,Undo,Redo,Anchor,Underline,Strike,Subscript,Superscript";
a.removeDialogTabs="link:advanced"};
CKEDITOR.editorConfig = function( config ) {
    config.extraPlugins = 'imgur';
    config.imgurClientId = '123....';
};

 

What version of IPS are you using?

Edited by Protesqu
  • Like 1
Link to comment
Share on other sites

4 minutes ago, Protesqu said:

Well...no clue man, my config works:


/*
 Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.editorConfig=function(a){a.toolbarGroups=[{name:"document",groups:["mode","document","doctools"]},{name:"clipboard",groups:["clipboard","undo"]},{name:"editing",groups:["find","selection","spellchecker"]},{name:"forms"},{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"paragraph",groups:["list","indent","blocks","align","bidi"]},{name:"links"},{name:"insert"},{name:"styles"},{name:"colors"},{name:"tools"},{name:"others"},{name:"about"}];a.removeButtons="Cut,Copy,Paste,Undo,Redo,Anchor,Underline,Strike,Subscript,Superscript";
a.removeDialogTabs="link:advanced"};
CKEDITOR.editorConfig = function( config ) {
    config.extraPlugins = 'imgur';
    config.imgurClientId = '123....';
};

 

What version of IPS are you using?

 

4.17.1, but finally it works :) 

PUudtXA.png

 

Thx @Protesqu for ur help :)

  • Like 1
Link to comment
Share on other sites

@Protesqu I still get the same error. Here is my configuration:

/home/#/public_html/applications/core/interface/ckeditor/ckeditor/config.js

/*
 Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.editorConfig=function(a){a.toolbarGroups=[{name:"document",groups:["mode","document","doctools"]},{name:"clipboard",groups:["clipboard","undo"]},{name:"editing",groups:["find","selection","spellchecker"]},{name:"forms"},{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"paragraph",groups:["list","indent","blocks","align","bidi"]},{name:"links"},{name:"insert"},{name:"styles"},{name:"colors"},{name:"tools"},{name:"others"},{name:"about"}];a.removeButtons="Cut,Copy,Paste,Undo,Redo,Anchor,Underline,Strike,Subscript,Superscript";
a.removeDialogTabs="link:advanced"};

CKEDITOR.editorConfig = function( config ) {
    config.extraPlugins = 'imgur,dropler';
    config.imgurClientId = 'b730c68...';
};

I'm missing a line to add?

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...