htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 2: htmlArea 2 & 3 archive (read only): htmlArea v2.0 - Add-Ons:
"Image Manager"-like file manager


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.



taurentius
Novice

Apr 10, 2003, 6:59 PM

Post #1 of 44 (12064 views)
Shortcut
"Image Manager"-like file manager Can't Post

Dear all,

I was wondering whether some people have a developed a file manager, similar to the PHP image manager. I saw some posts about it, but they are pretty old.
If no one has, it might be a nice new add-on?

--t


(This post was edited by taurentius on Apr 10, 2003, 7:33 PM)


barry-hunter
Novice

Apr 10, 2003, 7:52 PM

Post #2 of 44 (12047 views)
Shortcut
Re: [taurentius] "Image Manager"-like file manager [In reply to] Can't Post

I am currently working on just that, I am adapting the Image manager basiclly.

If i get it to work I'll post it here!



Best regards,

Barry


taurentius
Novice

Apr 11, 2003, 12:47 AM

Post #3 of 44 (12031 views)
Shortcut
Re: [taurentius] "Image Manager"-like file manager [In reply to] Can't Post

Dear all,

I felt kind of active tonight and worked my way through adapting the image manager so that it supports the display and insertion of any file type. It lets you browse for an uploaded file you want to link to. Admitted, it's only a modest adaptation of the original script, but it might be of use for more people than just me.
Suggestions or comments are welcome, as long as they're constructive of course Tongue

--t


(This post was edited by taurentius on Apr 11, 2003, 8:24 AM)
Attachments: fileManager.zip (35.4 KB)
  screenshot.jpg (34.3 KB)


wei
User

Apr 11, 2003, 9:13 PM

Post #4 of 44 (11967 views)
Shortcut
Re: [taurentius] "Image Manager"-like file manager [In reply to] Can't Post

Dear taurentius

Wow, execellent, I was starting to do the file manager. But you have already done it :) Great work.



wei


taurentius
Novice

Apr 12, 2003, 5:32 AM

Post #5 of 44 (11956 views)
Shortcut
Re: [wei] "Image Manager"-like file manager [In reply to] Can't Post

dear wei,

thanks for the compliment, but it's really your work :) I just made some minor adaptations... I also made a dialog based on the image manager where you can browser for another page that is in a database. Useful if you want to provide a CMS for a dynamic, database-driven website. The implementation is, however, greatly dependent on the way you have structured your database, so I don't think it's useful if I post the code here. If someone is interested, I can of course always add it later. (Basically I just have a "content" table and a "category" table and each content entry belongs to a certain category; categories are only one level deep, but in principle could be extended to multiple levels...) See the screenshot for what it looks like...

--t


(This post was edited by taurentius on Oct 22, 2003, 7:07 AM)
Attachments: internal_screenshot.jpg (28.4 KB)
  internal_screenshot2.jpg (30.8 KB)


mbourque
Novice

Apr 12, 2003, 7:48 AM

Post #6 of 44 (11942 views)
Shortcut
Re: [taurentius] "Image Manager"-like file manager [In reply to] Can't Post

I cannt seem to get this to work. Where exactly do I add the code?


Code
   

else if (cmdID.toLowerCase() == 'linktofile') {
var fileLink = showModalDialog(_editor_url + "popups/file/insert_file.php",
editdoc,
"resizable: no; help: no; status: no; scroll: no; ");
if (fileLink) { editor_insertHTML(objname, unescape( fileLink) ); }



taurentius
Novice

Apr 12, 2003, 8:20 AM

Post #7 of 44 (11927 views)
Shortcut
Re: [mbourque] "Image Manager"-like file manager [In reply to] Can't Post

Remember that this is code for htmlArea 2.x, not 3.0a. It should work if you put the code in the function editor_action in editor.js. I put the code below the part where "insertlink" is handled.

Also, don't forget to add the button and the button-producing code:

Code
 "linktofile": ['linktofile', 'Link to a File', 'editor_action(this.id)', 'ed_linktofile.gif'],

further up in the file. (I attached an icon you can use :P)

What might be causing an error is that I assume that a window name "editdoc" has already been defined. You can change that into 'insertlinkdialog' or something else.

Let me know if it works.

--t


(This post was edited by taurentius on Apr 12, 2003, 8:21 AM)
Attachments: ed_linktofile.gif (0.91 KB)


Luis
Veteran

Apr 12, 2003, 4:57 PM

Post #8 of 44 (11871 views)
Shortcut
Re: [mbourque] "Image Manager"-like file manager [In reply to] Can't Post

Make a search in editor.js for
// CUSTOM BUTTONS START HERE
and put the code the line above.


Don't give up!!
http://webstationone.com/test/htmlarea


AlRashid
Novice

Apr 12, 2003, 6:52 PM

Post #9 of 44 (11861 views)
Shortcut
Re: [taurentius] "Image Manager"-like file manager [In reply to] Can't Post

Good work!
I'm working on some additional features for image & link_to_file managers ( detailed view that displays filename, size, extension, date/time modified with sorting capabilities. View the screenshot.)
However I don't know how to pass parameters from the main window (Directory, Up, New, View buttons) to the files.php script showed in the iframe bellow? I'd like to pass the type of view ( eg. List, Details, Thumbnails) to files.php, and this value should be preserved while browsing in the iframe window. How can I do that?
Attachments: linktofile-details.jpg (39.0 KB)


taurentius
Novice

Apr 12, 2003, 8:32 PM

Post #10 of 44 (11844 views)
Shortcut
Re: [AlRashid] "Image Manager"-like file manager [In reply to] Can't Post

Hi AlRashid,

Your screenshot looks very nice! Did you base it on the image manager or the file manager or did you make it yourself? Actually, at first I misread your question and thought you wanted to pass variables from the files.php to the insert_file.php form elements (which is very basic). As you want it the other way round, things are probably a bit more complicated.

Much depends on what you want to construe. If a user changes the "view", do you want it to load a "different" page (e.g. files.php?view=thumbnails)? Or something else? In the first case, you could address the issue by calling a javascript whenever the selected view changes. For example, on change:


Code
  imgManager.location='files.php?view=thumbnails'

Passing on values to other elements in the iframe can be done by addressing the correct element id (e.g. imgManager.form[0].bla).

As you probably want to ensure that the user stays on the same page, only changing the view, you might have to make a two-stage rocket: first, trigger a "changeView" javascript, which triggers a javascript "giveLocation" in the files.php, which returns the current location/dirParam of the iframe as an attribute to a javscript "changeIframe" in insert_file.php (which on turn changes the location of the iframe).

Perhaps it is also possible to just get the current location of the iframe (e.g. imgManager.location();) and build from there...

Preserving the view value while browsing should be possible if you parse and store the $_GET["view"] variable and concatenate that to each link.

Good luck and if I can help, let me know :)

--t


(This post was edited by taurentius on Apr 12, 2003, 8:35 PM)


mixmuis
User

Apr 13, 2003, 3:10 PM

Post #11 of 44 (11742 views)
Shortcut
Re: [mbourque] "Image Manager"-like file manager [In reply to] Can't Post

i had the problem to

place a } under the code and it works, the readme file has a'typo' on this.



// CUSTOM BUTTONS START HERE

else if (cmdID.toLowerCase() == 'linktofile') {
var fileLink = showModalDialog(_editor_url + "popups/filemanager/insert_file.php",
editdoc,
"resizable: no; help: no; status: no; scroll: no; ");
if (fileLink) { editor_insertHTML(objname, unescape( fileLink) ); }
}


(This post was edited by mixmuis on Apr 13, 2003, 3:13 PM)


taurentius
Novice

Apr 13, 2003, 3:36 PM

Post #12 of 44 (11733 views)
Shortcut
Re: [mixmuis] "Image Manager"-like file manager [In reply to] Can't Post

yup, type-o. sorry 'bout that Crazy
hope it works out for mbourque now
maybe if it works, you can delete your editor.js post?

--t


mixmuis
User

Apr 13, 2003, 3:38 PM

Post #13 of 44 (11731 views)
Shortcut
Re: [taurentius] "Image Manager"-like file manager [In reply to] Can't Post

when i press the file in the manager i see //filename.rar
and the link contains also // in the url.. can i fixe this ?


taurentius
Novice

Apr 13, 2003, 4:50 PM

Post #14 of 44 (11718 views)
Shortcut
Re: [mixmuis] "Image Manager"-like file manager [In reply to] Can't Post

the double "//" is indeed a small bug, but I think it only occurs if you want to link to a file in the root directory. I'll have a look at it at a later point, I'm afraid don't have time to look at it right now Unsure

--t


mixmuis
User

Apr 13, 2003, 4:52 PM

Post #15 of 44 (11715 views)
Shortcut
Re: [taurentius] "Image Manager"-like file manager [In reply to] Can't Post

i modded the config file, problems solved so far,

now working on a not working delete function of the dir :(


taurentius
Novice

Apr 13, 2003, 5:02 PM

Post #16 of 44 (11714 views)
Shortcut
Re: [mixmuis] "Image Manager"-like file manager [In reply to] Can't Post

good that it works for you :) I don't have any problems deleting (empty) folders though? when does it occur? anyway, there's lots of room for improvement for the script, so knock yourself out Cool

--t


mixmuis
User

Apr 13, 2003, 5:06 PM

Post #17 of 44 (11712 views)
Shortcut
Re: [taurentius] "Image Manager"-like file manager [In reply to] Can't Post

<a href="files.php?dir=<? echo $path; ?>" onClick="changeLoadingStatus('load')">
<img src="images/folder.gif" width="80" height="80" border=0 alt="<? echo $dir; ?>">


there was a BASE_URL before $path, (http link)
with the unlink it is not working, stil lhaving probs with deleting dir, but solution is here in my mind, withg the beer :)


mixmuis
User

Apr 13, 2003, 5:08 PM

Post #18 of 44 (11710 views)
Shortcut
Re: [mixmuis] "Image Manager"-like file manager [In reply to] Can't Post

done,

changed the url in files.php just like posted before
and changed the line

$del_folder = dir_name($BASE_DIR).$folder;

in

$del_folder = dir_name($BASE_DIR)."/".$folder;

in files.php


AlRashid
Novice

Apr 14, 2003, 6:05 AM

Post #19 of 44 (11674 views)
Shortcut
Re: [mixmuis] "Image Manager"-like file manager [In reply to] Can't Post

Thanx Taurentius for your help.
Finally I get it work, but it's a mixture of javascript and php i'm not very proud of. I modified your version of filemanager, I tried to do only minimal changes, so that eventually wei could re-read his code. But I had to remove the delete folder function (rm_all_dir($dir)) which did not work for me and the small piece of file sorting code at the end of files.php.


(This post was edited by AlRashid on Apr 14, 2003, 3:47 PM)
Attachments: filemanager-details.gif (16.9 KB)
  htmlarea-filemanager.zip (50.6 KB)


mixmuis
User

Apr 14, 2003, 6:27 AM

Post #20 of 44 (11667 views)
Shortcut
Re: [AlRashid] "Image Manager"-like file manager [In reply to] Can't Post

very nice piece of work! i love it this way!

thnx!


mixmuis
User

Apr 14, 2003, 6:59 AM

Post #21 of 44 (11663 views)
Shortcut
Re: [AlRashid] "Image Manager"-like file manager [In reply to] Can't Post


In Reply To
Thanx Taurentius for your help.
Finally I get it work, but it's a mixture of javascript and php i'm not very proud of. I modified your version of filemanager, I tried to do only minimal changes, so that eventually wei could re-read his code. But I had to remove the delete folder function (rm_all_dir($dir)) which did not work for me and the small piece of file sorting code at the end of files.php. Download here.


is there a option to set the listing default to DETAILS ?


DreamWork
New User

Apr 24, 2003, 4:24 AM

Post #22 of 44 (11221 views)
Shortcut
Re: [taurentius] "Image Manager"-like file manager [In reply to] Can't Post

hi taurentius

what du you mean with this

To run the script, add a button to the toolbar with id "linktofile".

i dont show a new button on my editor ! :(



so long


SolarLunar
New User

Apr 28, 2003, 9:36 AM

Post #23 of 44 (11072 views)
Shortcut
Re: [taurentius] "Image Manager"-like file manager [In reply to] Can't Post

Hi all,



Ive tried to use the filemanager but there are still some little Probs...

I cant create or delete a folder and there is no way to upload or delete a file..
the Manager shows me correctly the files and folders - but only when i upload them with FTP ..
the inserted Link is correct too - the chmod of the file root folder is 777 but no upload possible so far..

maybee there is hack to fix this ..

Thx - sorry for this stupid english .. im a little german user ;o)



SolarLunar - stay funky - play vinyl!!


Tzvook
Novice

Apr 28, 2003, 2:30 PM

Post #24 of 44 (11050 views)
Shortcut
Re: [SolarLunar] "Image Manager"-like file manager [In reply to] Can't Post

Hi taurentius

Have I told you that I like your file addon ?
serve me well !!!
The only thing I need in it is a CHMOD

Sly
================================
But now I see a prob. (after playing a bit)

If I enter a sub-dir I can't go back and the scroll-down on top
gives just a "/" ........ and then if I make a new directory it lets me go up again, and gives the directories again in the scroller....

In code mod the link looks like that: <A href="http://popups/bmp.gif" target=_blank>bmp.gif (935 btyes)</A> which is wrong of course but can be changes easily :-)

I moved the "icong + images" from outside of the popups dir, but that's not likely the problem....... is it happaning to you too ?
maybe a path prob?

Any Idea?

======
Tzvook
======

(This post was edited by Tzvook on Apr 28, 2003, 3:20 PM)


vonbrocklin
Novice

May 1, 2003, 5:22 PM

Post #25 of 44 (10789 views)
Shortcut
Re: [taurentius] "Image Manager"-like file manager [In reply to] Can't Post


In Reply To
the double "//" is indeed a small bug, but I think it only occurs if you want to link to a file in the root directory. I'll have a look at it at a later point, I'm afraid don't have time to look at it right now Unsure

--t




NOTE: There was a problem with reassigning the newPath variable. The pathFix hack below solves this.
I fixed this if anybody is interested. Just go into files.php and find this line from the table that starts at about line 237:


Code
  REPLACE THIS:   
<a href="javascript:;" onClick="fileSelected('<? echo $newPath."/".$file_name; ?>',
'<? echo $file_name." (".parse_size($size).")"; ?>')">
WITH THIS:


<? $pathFix = $newPath;
if ($pathFix = "/") { $pathFix = ""; } ?>


<a href="javascript:;" onClick="fileSelected('<? echo $pathFix."/".$file_name; ?>',
'<? echo $file_name."
(".parse_size($size).")"; ?>')">

I'm sure there is a more logical place to fix this wherever the newPath variable is set but I was in a hurry and this seems to work fine.


(This post was edited by vonbrocklin on May 2, 2003, 12:37 PM)


taurentius
Novice

May 2, 2003, 4:50 AM

Post #26 of 44 (14150 views)
Shortcut
Re: [vonbrocklin] "Image Manager"-like file manager [In reply to] Can't Post

as I mentioned, I made this primarily for me, so I might have made some ad hoc decisions with the file paths etc. (I think I did). it works for me under Windows and my setup anyway. but maybe if you use the code vonbrocklin posted earlier, the path problems will be gone. good luck!

--t


fraptor
New User

Jun 4, 2003, 8:56 AM

Post #27 of 44 (13996 views)
Shortcut
Re: [taurentius] "Image Manager"-like file manager [In reply to] Can't Post

erm, great program, just doesnt really work wel on my localhost. ive changed the config to this






Code
 <?//************************** BEGIN CONFIGURATION *****************************////example, this is the actual file system path 
//of the web server document root. e.g.
// Filesystem == /home/web/www.yourdomain.com
$BASE_DIR = $_SERVER['DOCUMENT_ROOT']; //the path where the browser sees the document root (i.e. http://www.yourdomain.com/)
$BASE_URL = 'http://localhost/ezcontents/';



//this is where the files will be stored relative to the $BASE_DIR (and $BASE_URL)
//this directory MUST be readable AND writable by the web server.
$BASE_ROOT = 'ezcontents/bestanden';



Tzvook
Novice

Jun 4, 2003, 10:25 AM

Post #28 of 44 (13993 views)
Shortcut
Re: [AlRashid] "Image Manager"-like file manager [In reply to] Can't Post

Hello All

A great addon, which was a MUST for me ... but.. I still has 2 problems which are crusial (working on *nix, Apach, php...):
  1. I can't get it to link correctly on my root dir:
    in config.inc.php i write:
    $BASE_URL = 'http://www.whatever.com/';
    $BASE_ROOT = 'demo';
    and all is working fine, but I want it to work for the dir - not for root/demo/ like it's now
    and if I change it to:
    $BASE_URL = 'http://www.whatever.com';
    $BASE_ROOT = '/';
    the links look like http://file.html (which is not quite right)
  2. when dealing with documents, it might be a good idea to let it link a marked words - like the regular "link" popup does. (not so important)


but!!!! it's a great one !!!

======
Tzvook
======


Tzvook
Novice

Jun 10, 2003, 8:59 AM

Post #29 of 44 (13904 views)
Shortcut
Re: [Tzvook] "Image Manager"-like file manager [In reply to] Can't Post

hey folks, did someone solved that issue?

Again - problems in the root dir (also with the fixes above)
it's funny - lots of the files I want to work with, are in my root, but I must config the file manager to work above it otherwise it gives mistakes ===> Pirate

======
Tzvook
======


fraptor
New User

Jun 11, 2003, 3:58 AM

Post #30 of 44 (13880 views)
Shortcut
Re: [vonbrocklin] "Image Manager"-like file manager [In reply to] Can't Post

erm hi, i also have problems placing the filemanager in an site thats in a subdirectroy on my localhost. http://localhost/hjo.



When selecting a file in the root directory, the link has an extra / but when the link is from a directory or subdirectory, then i got a normal link. i already tried that sollution


Code
 <? $pathFix = $newPath;   
if ($pathFix = "/") { $pathFix = ""; } ?>

<a href="javascript:;" onClick="fileSelected('<? echo $pathFix."/".$file_name; ?>',
'<? echo $file_name."
(".parse_size($size).")"; ?>')">





but this didnt work for me. when i click on a file the link is called Array


taurentius
Novice

Jun 11, 2003, 6:59 AM

Post #31 of 44 (13875 views)
Shortcut
Re: [vonbrocklin] "Image Manager"-like file manager [In reply to] Can't Post

don't they say ugly hacks are the best? Tongue nice work...!

reason for the path problems is because I initially made the "add-on" purely for myself and a specific implementation; some remnants of the original implementation are still present in the code. coming period I have a bit more time to spare, so I might just have a look at it again some time soon.

--t


Tzvook
Novice

Jun 12, 2003, 9:25 AM

Post #32 of 44 (13846 views)
Shortcut
Re: [taurentius] "Image Manager"-like file manager [In reply to] Can't Post

Hi taurentius

Please do take a look, It's a really nice piece of code beside this root thing.

======
Tzvook
======


_Sunnyboy_
New User

Jun 17, 2003, 3:45 AM

Post #33 of 44 (13804 views)
Shortcut
Re: [Tzvook] "Image Manager"-like file manager [In reply to] Can't Post

Hi,

I tried this filemanager and installing it and fixing the // with the suggested method worked quite nicely. Recently I ran into the following concering file-uploads though. What if someone bad gets access to you htmlArea he is able to upload files to your server. Whihc doesn't have to be that bad as long as they are restricted to the upload-folder etc. However, they can also upload PHP-FILES, which when called get EXECUTED on your server, causing a severe security leak.

Hence I decided I needed to be able to exclude certain file-extensions (I don't mind if they upload files with another extension than php or phtml cause only these get executed on the server)

This is what I came up with:

Replace


Code
 do_upload($_FILES['upload'], $BASE_DIR.$BASE_ROOT.$dirPathPost.'/');



which can be found around line 70 in files.php, with


Code
  
// added to do file_ext-check: start
$file_ext = strtolower(array_pop(explode('.', basename($_FILES['upload']['name']))));
$legal_ext = array();
$illegal_ext = array("php","phtml");

$ext_error = 0;
if (sizeof($legal_ext)>0) {
if (!in_array($file_ext,$legal_ext)) { $ext_error = 1; }
} else {
if (in_array($file_ext,$illegal_ext)) { $ext_error = 1; }
}
if ($ext_error==0) {
do_upload($_FILES['upload'], $BASE_DIR.$BASE_ROOT.$dirPathPost.'/');
} else {
echo "<script>alert('This filetype is not allowed')</script>";
}



If you put any extensions in the $legal_ext array it will only allow these file-extensions to be uploaded.
If $legal_ext is empty it will compare with the $illegal_ext array.
If both are empty everything is allowed ofcourse.

if an illegal file is being uploaded an alert pops up.

You could move $legal_ext and $illegal_ext to config.inc.php to have all your configuration in one file.


(This post was edited by _Sunnyboy_ on Jun 17, 2003, 3:47 AM)


mcc235
New User

Jun 18, 2003, 6:00 AM

Post #34 of 44 (13784 views)
Shortcut
Re: [fraptor] "Image Manager"-like file manager [In reply to] Can't Post


In Reply To
When selecting a file in the root directory, the link has an extra / but when the link is from a directory or subdirectory, then i got a normal link. i already tried that sollution


Code
  <? $pathFix = $newPath;      
if ($pathFix = "/") { $pathFix = ""; } ?>

<a href="javascript:;" onClick="fileSelected('<? echo $pathFix."/".$file_name; ?>',
'<? echo $file_name."
(".parse_size($size).")"; ?>')">


This may have nothing to do with anything, but the above if statement should have a double equal sign.

Code
if ($pathFix == "/") {$pathFix = ""; } ?>

Hope this helps someone.


(This post was edited by mcc235 on Jun 18, 2003, 6:02 AM)


Tzvook
Novice

Jun 18, 2003, 5:00 PM

Post #35 of 44 (13763 views)
Shortcut
Re: [mcc235] "Image Manager"-like file manager [In reply to] Can't Post

hi mcc235
10x for trying, but it don't help... still an "array" , and the same problem in the server root directory.

So weird - all is good , just when I change the $BASE_URL to the root url - like:

$BASE_URL = 'http://www.myServer.com';
and
$BASE_ROOT = '/';

then the links goes from http://www.myServer.com/file.php into http://file.php

So............ anybody ? Ideas ?

======
Tzvook
======


Bermpje
New User

Sep 3, 2003, 8:30 AM

Post #36 of 44 (13446 views)
Shortcut
Re: [Tzvook] "Image Manager"-like file manager [In reply to] Can't Post

Hi All,

Has anybody converted this add-on for version 3.0?

I am able to upload the files no problem, the thing thats got me all confused is parsing the filename back to the editor. So far Ive come up with this (yep, its a trimmed down version of the image manager code):


Code
  

HTMLArea.prototype._linktofile = function() {

var sel = this._getSelection();

var range = this._createRange(sel);

var editor = this; // for nested functions

this._popupDialog("insert_file.php", function(param) {

if (!param) { // user must have pressed Cancel

return false;

}

editor._execCommand("linktofile", false, param["f_url"]);

var fle = null;

if (HTMLArea.is_ie) {

fle = range.parentElement();

// wonder if this works...

if (fle.tagName.toLowerCase() != "fle") {

fle = fle.previousSibling;

}

} else {

fle = range.startContainer.previousSibling;

}

}, null);

};




needles to say, this doesnt work!



Can anybody help me please!!


bbuchs
New User

Sep 3, 2003, 11:17 AM

Post #37 of 44 (13436 views)
Shortcut
Re: [mcc235] "Image Manager"-like file manager [In reply to] Can't Post

As far as the "//" bug goes, I've gotten better results with this:

Code
 <a href="javascript:;" onClick="fileSelected('<? echo $newPath ?><? if ($newPath != "/") { echo "/";} ?><? echo $name; ?>','<? echo $name." (".$size.")"; ?>')">



Quaoar
Novice

Oct 3, 2003, 9:22 AM

Post #38 of 44 (13161 views)
Shortcut
Re: [taurentius] "Image Manager"-like file manager [In reply to] Can't Post

taurentius, thanks a million for making this! :)


stervina
User

Oct 5, 2003, 6:01 AM

Post #39 of 44 (13120 views)
Shortcut
Re: [taurentius] "Image Manager"-like file manager [In reply to] Can't Post

Hi all, and thanks for this long awaited add-on. (insert link to file)

I have implemented it to my website without any problem at all. But, when browsing through the mentioned root, I get a an error with just one folder. Why so ? , as it works fine with the other folders. Howewer, when I get beyond this error, everything works fine again. I can link to any file in the folder.

error in files.php

line 204
car 29
) expected
code 0

What surprises me is that I get this error only when browsing through one folder, and not when browsing through the others. All folders have the same pattern.

Funny, ain't it

Any idea would be warmly appreciated

Thanks for helping

Stervina

Lannion France


stervina
User

Oct 5, 2003, 6:59 AM

Post #40 of 44 (13118 views)
Shortcut
Re: [stervina] "Image Manager"-like file manager [In reply to] Can't Post

Hi all

In fact I found the bug myself. It has nothing to do with this add-on, but it with the name of a folder which included an apostrophe " venusd'ile". I changed it to "venusdile", an the error message diappeared.

I leave this message in the forum, it might help some French speaking htmlArea addicts

Stervina Lannion France


bitesomedust
New User

Oct 20, 2003, 9:04 AM

Post #41 of 44 (12886 views)
Shortcut
Re: [stervina] "Image Manager"-like file manager [In reply to] Can't Post

Hi all,

To solve this problem, simply replace all "//" signs with the "/" sign.

This will result in the following:

Ad this code before the line if ($viewType == "details") { somewhere on line 260 in files.php

$filepath = $newPath;
if ($newPath != "/") { $filepath .= "/";}
$filepath .= $name;
$filepath = eregi_replace("//","/",$filepath);

Then replace the onclick event somewhere on line 264 and line 280 in files.php with:

onClick="fileSelected('<?echo $filepath;?>','<? echo $name; ?>')"

That should do the trick.

=-=-=-=-=-=

When you want to solve a problem, just look around the corner.


marf
Novice

Oct 20, 2003, 1:39 PM

Post #42 of 44 (12865 views)
Shortcut
Re: [bitesomedust] "Image Manager"-like file manager [In reply to] Can't Post

Hello there,

There where some bugs fixes since the last sourcecode post.
Is it possible that someone post a newer one with the bugs fixed.

Thanks,
Marf


wassimk
New User

Oct 31, 2003, 9:05 PM

Post #43 of 44 (12731 views)
Shortcut
Re: [marf] "Image Manager"-like file manager [In reply to] Can't Post

I would like the latest working version posted if someone is willing, this program looks AWESOME!


mbourque
Novice

Nov 12, 2003, 5:21 AM

Post #44 of 44 (12614 views)
Shortcut
Re: [taurentius] "Image Manager"-like file manager [In reply to] Can't Post

I added this great mod to my site. However, is it supposed to create a url in the editor to the linked file I just selected in the file browser? If so then for me it does not work. Also I have tried all the fixes here to get rid of the the double // and I am not able to remove them. Any clues for both of these issues? Here is the code I use to invoke the dialog.


Code
   // upload 
else if (cmdID.toLowerCase() == 'upload'){
showModalDialog(_editor_url + "popups/file2/insert_file.php?user_id=" + user_id, editdoc, "resizable: no; help: no; status: no; scroll: no; ");


 
 


Search for (options)