Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2007-02-15 19:18:56

adam2003w
Xinha Community Member
From: Colorado
Registered: 2005-03-01
Posts: 43
Website

ExtendedFileManager Standalone / Independent EFM - delete trash files?

ExtendedFileManager Standalone / Independent EFM - delete trash files?

I'm setting up the EFM Standalone version and noticed a difference between when you are you using it as an image manager vs. a file manager:

image manager: can edit, delete, rename images
file manager: can only edit file if it is an image and can't delete or rename the file

http://rheinaufcms.de/RheinaufCMS/Download/EFM/

I noticed you can delete and rename files in the EFM for Xinha and was wondering, why is that functionality is missing?

By the way, the standalone EFM is awesome and I am working on incorporating it into my sites. Please don't take my questions as being ungrateful. I have no javascript skills, so translating EFM to work independently of Xinha is an awesome grace to extend to the community ( thanks ray ).


site [url]www.paradigmprint.com[/url]

Offline

#2 2007-02-15 19:43:51

adam2003w
Xinha Community Member
From: Colorado
Registered: 2005-03-01
Posts: 43
Website

Re: ExtendedFileManager Standalone / Independent EFM - delete trash files?

I found the problem: three variables in the config.inc.php file need to be added...

$IMConfig['allow_delete'] = true;
$IMConfig['allow_cut_copy_paste'] = true;
$IMConfig['allow_edit_image'] = true;

Also I found that I needed to add the following line to the top config.inc.php file to make it work..

require_once('assets/php-xinha.php');

Thanks again for transitioning to independence an already awesome tool.


site [url]www.paradigmprint.com[/url]

Offline

#3 2007-02-15 20:36:26

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: ExtendedFileManager Standalone / Independent EFM - delete trash files?

Well I have to admit this page is not exactly wordy wink

If you will visit it again you may notice that I have placed some hints to make it at least a bit clearer.

Sorry that at the moment I can neither document i better,nor make the installation more user friendly. This not a priority project of mine. Actually I had even forgotten that I have set up this demo page smile

Offline

#4 2007-02-15 20:49:30

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: ExtendedFileManager Standalone / Independent EFM - delete trash files?

Hey, don't edit the config.inc.php directly, that's uncool smile

Offline

#5 2007-02-16 14:50:32

adam2003w
Xinha Community Member
From: Colorado
Registered: 2005-03-01
Posts: 43
Website

Re: ExtendedFileManager Standalone / Independent EFM - delete trash files?

Hey Ray,

I also noticed with the current code, it is hard to move the "index.php" page (the page where you want your form and EFM pull) to another directory. This doesn't have anything to do with the five places in the index.php file where the path to the "ExtendedFileManager/" needs to be adjusted. I believe this has to do with the "EFMConfig.prototype.backend" variable in the "ExtendedFileManager.js" file.

Once I set this path to a root directory on the domain (ex. "myfiles/plugins/ExtendedFileManager/backend.php ..." instead of just (ExtendedFileManager/backend.php ...") everything started working fine.

Hope I'm not just screwing things up. It's just what I had to do to get it working in multiple places. Thanks - Adam.


site [url]www.paradigmprint.com[/url]

Offline

#6 2007-02-16 16:22:43

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: ExtendedFileManager Standalone / Independent EFM - delete trash files?

Ah, that was dumb of me, defining a variable and then don't use it...

I changed ExtendedFileManager.js accordingly, now you only have to set _efm_url correctly in each page (before loading ExtendedFileManager.js, obviously)

Offline

#7 2007-02-16 16:38:42

adam2003w
Xinha Community Member
From: Colorado
Registered: 2005-03-01
Posts: 43
Website

Re: ExtendedFileManager Standalone / Independent EFM - delete trash files?

Ray, thanks for fixing that. I'll check it out.

Also, I don't know if you've looked into this, but it seems when I try to load the EFM standalone and Xinha editor on the same page, it cancels out the Xinha editor. Of course I'm using an older version of Xinha.

I'm off to find out if using the EFM standalone and the current version of Xinha on the same page still cancels out the Xinha editor.


site [url]www.paradigmprint.com[/url]

Offline

#8 2007-02-16 17:37:11

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: ExtendedFileManager Standalone / Independent EFM - delete trash files?

It will. Because I was lazy. Stand by, I'll fix it just now.

Offline

#9 2007-02-16 17:59:05

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: ExtendedFileManager Standalone / Independent EFM - delete trash files?

So, now it should be able to co-exist with Xinha. Of course, as I have changed names, you have to adapt your page. Just look at the source of the demo page to see what I have changed (ExtendedFileManager->ExtendedFileManagerStandalone, EFMConfig->ExtendedFileManagerStandalone.Config)

PS: If I have produced any bugs in the hurry, just write back smile

Offline

#10 2007-02-16 17:59:57

adam2003w
Xinha Community Member
From: Colorado
Registered: 2005-03-01
Posts: 43
Website

Re: ExtendedFileManager Standalone / Independent EFM - delete trash files?

too cool


site [url]www.paradigmprint.com[/url]

Offline

#11 2007-02-16 19:08:41

adam2003w
Xinha Community Member
From: Colorado
Registered: 2005-03-01
Posts: 43
Website

Re: ExtendedFileManager Standalone / Independent EFM - delete trash files?

i've redownloaded the EFM standalone... while I have to go in and search/replace your terms:

search "ExtendedFileManager" replace "ExtendedFileManagerStandalone"
search "EFMConfig" replace "ExtendedFileManagerStandalone.Config"

... I ask because I uploaded it straight out of the box and used your updated default page and it wasn't working. I'm off to test the replacing method now.


site [url]www.paradigmprint.com[/url]

Offline

#12 2007-02-16 20:13:26

adam2003w
Xinha Community Member
From: Colorado
Registered: 2005-03-01
Posts: 43
Website

Re: ExtendedFileManager Standalone / Independent EFM - delete trash files?

after a couple trial and error search/replace attempts (and a few .js files from your site) I got the EFM working again on my end and am off to test it on the same page as a Xinha editor...

... it works... what a relief. I've got Xinha all over the place and 99% of the pages I needed the EFM standalone had Xinha on them. Thank you very much Ray.

- Adam


site [url]www.paradigmprint.com[/url]

Offline

#13 2007-02-16 20:15:50

adam2003w
Xinha Community Member
From: Colorado
Registered: 2005-03-01
Posts: 43
Website

Re: ExtendedFileManager Standalone / Independent EFM - delete trash files?

Oh, btw... i've learned not to adjust the config file... I just have one include.php where I store all my settings necessary including setting config values in the "$IMConfig = array();" ... then whenever I want to pull up the EFM standalone, I just request that ExtendedFileManager/include.php page.


site [url]www.paradigmprint.com[/url]

Offline

#14 2007-02-19 13:12:16

flemming
New member
Registered: 2007-01-24
Posts: 4

Re: ExtendedFileManager Standalone / Independent EFM - delete trash files?

Ray your efforts have made (almost) my life very much happier! However there's just one thing that I could do with assistance on:


    var callback = function(url)
    {
        document.getElementById("img").src = url;
    }

how can I make the ("img") bit dynamic - so that if i have a bunch of fields using EFM, say 'image1', 'image2' etc etc I dont need to duplicate the block of code above to handle each one ... or am i asking the impossible or talking rubbish?!?!?!

cheers,
Flemming

Offline

#15 2007-02-19 15:57:56

adam2003w
Xinha Community Member
From: Colorado
Registered: 2005-03-01
Posts: 43
Website

Re: ExtendedFileManager Standalone / Independent EFM - delete trash files?

I may be wrong, but all you have to do is change the number after the EFM_input such as...

EFM_input1 (change id in image tag and change the javascript onclick in the related button)
EFM_input2 (change id in image tag and change the javascript onclick in the related button)
EFM_input3 (change id in image tag and change the javascript onclick in the related button)
and so on ...

Is this what you are looking for?

Last edited by adam2003w (2007-02-19 15:59:08)


site [url]www.paradigmprint.com[/url]

Offline

#16 2007-02-20 04:47:30

flemming
New member
Registered: 2007-01-24
Posts: 4

Re: ExtendedFileManager Standalone / Independent EFM - delete trash files?

yeah that's almost it, but there is a hard-coded variable in the javascript:

var callback = function(url)
    {
        document.getElementById("img").src = url;
    }

here it is called "img" which refers to the text field to be populated when the EFM popup closes. So in order to have multiple instances of the EFM, will I need to duplicate that function accordingly? :-|

Offline

#17 2007-02-20 12:11:07

adam2003w
Xinha Community Member
From: Colorado
Registered: 2005-03-01
Posts: 43
Website

Re: ExtendedFileManager Standalone / Independent EFM - delete trash files?

In order to have multiple instances of the EFM standalone on a page,  you won't have to change the code that you mentioned. I have the the EFM standalone with multiple instances on a page and it works fine using the method I stated above.

What I did was include the function code for using the EFM as an image manager ( function efm() ) and the function code for using the EFM as a file manager ( function efm2() ) as ray set up in the default page linked at the top of this thread. Then when  I wanted to call up multiple of either I just used the following code:

<input type="text" name="field1" id="EFM_input1" value=""  />
<input type="button" name="select" value=" Select " onClick="return efm('EFM_input1');"/>
<br/><br/>
<input type="text" name="field2" id="EFM_input2" value=""  />
<input type="button" name="select" value=" Select " onClick="return efm('EFM_input2');"/>
<br/><br/>
<input type="text" name="field3" id="EFM_input3" value=""  />
<input type="button" name="select" value=" Select " onClick="return efm('EFM_input3');"/>
<br/><br/>

the main difference in the code in each instance is the change of the number of the "EFM_input" id and onclick javascript.


Note: I deleted the extra "callback" function in both javascript functions for my own personal preference not to use the automatic image and file appearing like Ray does in his demo. Here's the code for that to replace in each function:

inside each function called up on your html/php page change ....

ExtendedFileManagerStandalone(inputId,config,callback)

... to ...

ExtendedFileManagerStandalone(inputId,config)

Last edited by adam2003w (2007-02-20 12:16:29)


site [url]www.paradigmprint.com[/url]

Offline

#18 2007-02-20 16:13:59

flemming
New member
Registered: 2007-01-24
Posts: 4

Re: ExtendedFileManager Standalone / Independent EFM - delete trash files?

excellent - I shall give this a try and post back if i have any problems! many thanks for your help - much appreciated!!! smile

Offline

#19 2008-02-08 19:08:33

davistv
New member
Registered: 2006-12-18
Posts: 2

Re: ExtendedFileManager Standalone / Independent EFM - delete trash files?

Hi Everyone,

With the new .95 release, is there an easier way to use the EFM in standalone mode without duplicating it and editing a bunch of files? It would be great to use a single code base for this.

Thanks,
Troy

Offline

Board footer

Powered by FluxBB