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.

First page Previous page 1 2 Next page Last page  View All


taurentius
Novice

May 2, 2003, 4:50 AM

Post #26 of 44 (13783 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 (13629 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 (13626 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 (13537 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 (13513 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 (13508 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 (13479 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 (13437 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 (13417 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 (13396 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 (13079 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 (13069 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 (12794 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 (12753 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 (12751 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 (12519 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 (12498 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 (12364 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 (12247 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; ");


First page Previous page 1 2 Next page Last page  View All
 
 


Search for (options)