Posts: 1,108
Threads: 70
Joined: Aug 2009
Hi,
I've released a plugin to intergrate the KCFinder File Manager into Getsimple.
It adds the browse button to CKeditor as well as a seperate tab for the browser itself so you can use it as a
replacement for the internal file manager.
Just download the files, unzip and place in your plugins folder.
I've tested successfully on both Apache and Windows server and all seems to work fine.
Download the current version 1.2 plugin from here:
http://www.digimute.com/index.php?id=blo...der-plugin
Download includes a slightly modified version 1.7 of KCFinder.
Post here any problems.
More details about KCFInder can be found here: http://kcfinder.sunhater.com/
Enjoy,
Mike.
Posts: 1,928
Threads: 88
Joined: Apr 2010
2010-06-22, 22:14:41
(This post was last modified: 2015-02-20, 22:53:11 by Oleg06.)
somehow prompts you to download pictures from another folder
and the button is sometimes not visible
admin/admin
Posts: 54
Threads: 7
Joined: May 2010
I can see the file manager on the plugins page, but there is no browse option when editing a page and opening the insert image dialog. Using GetSimple from SVN.
-- Sam
Posts: 1,108
Threads: 70
Joined: Aug 2009
Yeah seems to be a problem with the timing , removing the original Ckeditor and then reapplying settings.
Seems the first one is not always destroyed before the new one in initiated.
Some browsers are better than others.
Will have to rethink....
Unless anyone knows of a way to apply CKeditor settings on the fly....
Mike...
Posts: 54
Threads: 7
Joined: May 2010
It's actually quite simple after all... just do:
Code: function kcfinder_show() {
echo '
<div id="kcdemo">
<div id="kcbrowser">
<iframe name="kcfinder" id="kcframe" src="../plugins/kcfinder-1.7/browse.php" frameborder="0" width="100%" height="500px" marginwidth="0" marginheight="0" scrolling="yes" >
</iframe>
</div>
</div> ';
}
function kcfinder_editor(){
echo "
<script type=\"text/javascript\">
if(editor) {
editor.config.filebrowserBrowseUrl = \"../plugins/kcfinder-1.7/browse.php\";
editor.config.filebrowserWindowWidth = \"640\";
editor.config.filebrowserWindowHeight = \"480\";
}
</script>";
}
However, I found that after selecting an image (e.g. by double clicking) the path is wrong (/uploads/image.jpg).
-- Sam
Posts: 1
Threads: 0
Joined: Jun 2010
2010-06-28, 21:26:59
(This post was last modified: 2010-06-28, 21:30:11 by Bhantora.)
Well, a quick fix for the image path (2 lines in 2 files needed to be changed):
class/class_browser.php line 63 change to:
Code: $this->config['uploadURL'] = 'data';
and
tpl/tpl__header.php line 36 to:
Code: browser.uploadURL = "<?php echo helper::js_value($this->config['uploadURL']) ?>";
Posts: 54
Threads: 7
Joined: May 2010
Close to what worked for me.
I took out $this->config['uploadDir'] and $this->config['uploadURL'] (lines 62 + 63) from class/class_browser.php since they are set in config.php and you shouldn't really alter files from a third party a library if you can help it.
Set config.php $_CONFIG array item: 'uploadURL' => "/site/data/" (because not in root of site). As a result, did not need to change tpl/tpl__header.php.
-- Sam
Posts: 54
Threads: 7
Joined: May 2010
This may also work in config.php:
Code: 'uploadURL' => "../../data",
-- Sam
Posts: 27
Threads: 7
Joined: Mar 2010
2010-06-30, 00:00:22
(This post was last modified: 2010-06-30, 00:01:05 by pieksi.)
Great plugin! It works ok. But maybe a theme for the kcfinder would be nice so it stays in the Get Simple Ambience/Vibe. I think the power of get simple is that the backend has a certain relax ambience and when plugins are implemented but not modified by layout, it takes away the relax workspace.
Greets
Posts: 54
Threads: 7
Joined: May 2010
How this to start with, a theme with a dark background (instead of grey)?
Unzip to plugins\kcfinder-1.7\themes, it should create a folder called 'getsimple' in it, then change 'theme' => "getsimple" in \plugins\kcfinder-1.7\config.php.
Disclaimer: I am more developer than designer, so just changed the colours a bit - icons are the same as the original theme. I'm sure it can be improved on.
-- Sam
Posts: 1,928
Threads: 88
Joined: Apr 2010
And now, please, bring it all together, pack and is available for download
Posts: 1,108
Threads: 70
Joined: Aug 2009
Thanks for all the input guys.
been mad busy with my 'real' work the last few days so couldn't update...
i'll get these updates done this evening and post up the revised edition.
Also working at integrating KCFinder into the core.
Mike...
Posts: 1,108
Threads: 70
Joined: Aug 2009
Version 1.2 of the plugin is now available for download at http://www.digimute.com/index.php?id=blo...der-plugin
In order to get the plugin working on both windows and Unix I've had to make 2 small changes to the KCFinder code.
o - Added a baseUrl Option to the config file
o - changed template file to reflect this.
Getsimple theme is the default and just changes the butoon colors to match GS.
Again thanks to all for input.
I'm currently testing version 2.0 of KCFinder for inclusion in the core, once its stable I'll add it to the SVN.
Enjoy..
Mike...
Posts: 1,928
Threads: 88
Joined: Apr 2010
2010-07-01, 16:12:46
(This post was last modified: 2010-07-01, 16:22:20 by jhondavis.)
Thanks, it works....but the picture does not appear in the editor window
and editing 'news-manager' references no, but it is editing 'vudu_news'
Posts: 1,108
Threads: 70
Joined: Aug 2009
Oleg, your site is in a subfolder "0" so you'll need to change the baseUrl in the
KCFinder-1.7\config.php to
"0\data" for it to work.
Mike.
Posts: 1,928
Threads: 88
Joined: Apr 2010
Posts: 52
Threads: 5
Joined: May 2010
cant see the uploader in ckeditor, how come??????
Posts: 54
Threads: 7
Joined: May 2010
2010-07-02, 20:10:03
(This post was last modified: 2010-07-02, 20:17:56 by thazer.)
Got KCFinder 2 working for me, all I needed to change was uploadURL in kcfinder-2.0\config.php and create an .htaccess file in the kcfinder-2.0 directory.
Download v2 of KCFinder http://kcfinder.sunhater.com/#download, extract to plugins directory.
Plugin code attached, not sure what all the extra JavaScript was for (window.KCFinder.change) and window.onload not needed (since it runs after the rich text editor has loaded), so removed
-- Sam
Posts: 20
Threads: 5
Joined: Sep 2009
Is there any way to get this to auto populate the image height and width fields, so its a case of just pressing ok to insert the image.
As of now, (on my install anyway), when you browse for the image, double click it and press ok it shows nothing in the text preview of the page, but it is all there in the source code.
Posts: 1,928
Threads: 88
Joined: Apr 2010
but have you tried to right click?
Posts: 290
Threads: 26
Joined: Oct 2010
2010-11-27, 04:18:23
(This post was last modified: 2010-11-27, 04:18:40 by Chastin3.)
Hi- Thanks for the plugin!
To get it to work I had to change line 64:
Code: if ($_GET['id']!=''){
to:
Code: if ((!isset($_GET['id'])) || ((isset($_GET['id'])) && ($_GET['id']!=''))){
as my server generates an error on _GET for a variable that doesn't exist.
-Rob A>
Posts: 3,491
Threads: 106
Joined: Mar 2010
The download link for this plugin is broken.
Is it available somewhere else?
Posts: 1,108
Threads: 70
Joined: Aug 2009
thought I had this up on extend...
I'll redo it for GS3.1 and put it up there.
KCFinder itself has had a lot of updates since I wrote this so I'll update to that version too...
Posts: 3,491
Threads: 106
Joined: Mar 2010
n00dles101 Wrote:thought I had this up on extend...
I'll redo it for GS3.1 and put it up there.
That's great, Mike!
For sure it will be very useful for those who want multi-file selection, deletion, etc.
|