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:
I need UploadFile & FileManager with PHP


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.

 


nainut
New User

Dec 21, 2003, 10:39 PM

Post #1 of 16 (8274 views)
Shortcut
I need UploadFile & FileManager with PHP Can't Post

I need UploadFile & FileManager with PHP

Please Help Me!!!


genuchten
Novice

Jan 14, 2004, 10:29 AM

Post #2 of 16 (8094 views)
Shortcut
Re: [nainut] I need UploadFile & FileManager with PHP [In reply to] Can't Post

http://www.zhuo.org/htmlarea/


AlRashid
Novice

Jan 14, 2004, 1:49 PM

Post #3 of 16 (8089 views)
Shortcut
Re: [nainut] I need UploadFile & FileManager with PHP [In reply to] Can't Post

try http://alrashid.klokan.sk/insFile/htmlareademo/


(This post was edited by AlRashid on Jan 14, 2004, 6:43 PM)


AlRashid
Novice

Mar 9, 2004, 3:36 AM

Post #4 of 16 (7650 views)
Shortcut
Re: [AlRashid] I need UploadFile & FileManager with PHP [In reply to] Can't Post

I've rewritten my addon for htmlarea2 - Luis modification.
Demo & download for htmlarea2 http://alrashid.klokan.sk/insFile/htmlareademo2/
Demo & download for htmlarea3 http://alrashid.klokan.sk/insFile/htmlareademo/

Sample config:

$MY_DOCUMENT_ROOT = '/home/www/alrashid.klokan.sk/insFile/data';
$MY_BASE_URL = '../data';
$MY_ALLOW_EXTENSIONS = array('html', 'doc', 'xls', 'txt', 'gif', 'jpeg', 'jpg', 'png', 'pdf');
$MY_DENY_EXTENSIONS = array('php', 'php3', 'php4', 'phtml', 'shtml', 'cgi', 'pl');
$MY_LIST_EXTENSIONS = array('html', 'doc', 'xls', 'txt', 'gif', 'jpeg', 'jpg', 'png', 'pdf');
$MY_ALLOW_DELETE_FILE = true;
$MY_ALLOW_UPLOAD_FILE = true;
$MY_MAX_FILE_SIZE = 2*1024*1024;
$MY_URL_TO_OPEN_FILE = 'http://alrashid.klokan.sk/insFile/data';
$MY_ALLOW_DELETE_FOLDER = true;
$MY_ALLOW_CREATE_FOLDER = true;
$MY_LANG = 'en';
$MY_DATETIME_FORMAT = "d.m.Y H:i";

DenyExtensions and AllowExtensions arrays specify which file types can be uploaded. Setting to null skips this check. The scheme is:
1) If DenyExtensions is not null check if it does not contain file extension of the file to be uploaded.
2) If AllowExtensions is not null check if it does contain file extension of the file to be uploaded.
3) Upload file.
ListExtensions array specifies which files are listed in dialog. Setting to null causes that all files are listed.


(This post was edited by AlRashid on Mar 9, 2004, 3:46 AM)


arabold
Novice

Mar 9, 2004, 10:09 AM

Post #5 of 16 (7624 views)
Shortcut
Re: [AlRashid] I need UploadFile & FileManager with PHP [In reply to] Can't Post

Very nice Smile

Small fixes:

files.php, line 300:

Code
function refreshDirs() { 
var islPaths = window.top.docIE = (navigator.appName == "Microsoft Internet Explorer") ? true : false;
var alument.forms[0].path.options;
var fields = ["/" <?php dirs($MY_DOCUMENT_ROOT,'');?>];
var newPath = "<?php echo $MY_PATH; ?>";
for(i=allPaths.length; i > 0; i--) {
allPaths[i-1]=null;
}


[ ... ]
}


Otherwise the directory combobox won't work in FireFox browser. This way it's cross browser compilant.

filedialog.php, line 299:

Code
  <td align="center" style="background:Window;"><div name="manager" class="manager"> 
<iframe src="files.php?dialogname=<?php echo $MY_NAME; ?>&refresh=1"
name="fileManager" id="fileManager" width="550" height="150" marginwidth="0" marginheight="0"
align="top" scrolling="no" frameborder="0" hspace="0" vspace="0" style="background:Window;"></iframe>
</div>
</td>


Then you get a white background for your list not a grey one (works in FireFox and IE).


Thanks for your code,
André


(This post was edited by arabold on Mar 9, 2004, 10:10 AM)


AlRashid
Novice

Mar 9, 2004, 1:49 PM

Post #6 of 16 (7611 views)
Shortcut
Re: [arabold] I need UploadFile & FileManager with PHP [In reply to] Can't Post

Thanks Andre,
it's fixed. Please feel free for further bugs hunting :)


novocaine
Novice

Apr 18, 2004, 1:07 PM

Post #7 of 16 (7179 views)
Shortcut
Re: [AlRashid] I need UploadFile & FileManager with PHP [In reply to] Can't Post

I'm using the file manager for HTMLArea3 and I'm having troubles with Mozilla/Firefox.

The links are generated with this code:

Code


Code
 if (HTMLArea.is_ie) {    
range.pasteHTML(alink.outerHTML);
} else {
editor.insertNodeAtSelection(alink);
}



My problem is when starting to type text after the link, the text get's linked too. How can I fix that?

thanks,
novocaine


ozinm
User

Apr 27, 2004, 10:06 AM

Post #8 of 16 (7091 views)
Shortcut
Re: [AlRashid] I need UploadFile & FileManager with PHP [In reply to] Can't Post

AlRashid,
I've just tried out your add-on. v. impressive.

Could I ask a couple of quick questions?

1. I noticed that in the file picker, when you select a file it displays the absolute URL but when the link is inserted into the editor it uses a relative URL for the address.
is there a quick way to change the functionality so all inseted links to file are inserted into theeditor with an absolute link (eg http://www.myserver.com/uploads/me.jpg instead of ../uploads/me.jpg )?

2. (and this is because I'm just lazy at heart, so if you choose not to answer it I'm sure I'll work it out) do you or anyone else have a walkthrough for incorporating your mods into Article Manager?

Any and all help greatly appreciated Smile


AlRashid
Novice

Apr 27, 2004, 2:21 PM

Post #9 of 16 (7087 views)
Shortcut
Re: [ozinm] I need UploadFile & FileManager with PHP [In reply to] Can't Post

1. Set $MY_BASE_URL in main.php to 'http://www.myserver.com/uploads/'

2. I have no idea.


ozinm
User

Apr 28, 2004, 6:10 AM

Post #10 of 16 (7074 views)
Shortcut
Re: [AlRashid] I need UploadFile & FileManager with PHP [In reply to] Can't Post

I've already tried that (athough I left off the trailing slash) but it's still giving me relative paths.


kwillems
User

Apr 30, 2004, 9:04 AM

Post #11 of 16 (7028 views)
Shortcut
Re: [ozinm] I need UploadFile & FileManager with PHP [In reply to] Can't Post

I'm having the same problem. Can't get absolute paths.


kwillems
User

Apr 30, 2004, 9:19 AM

Post #12 of 16 (7027 views)
Shortcut
Re: [kwillems] I need UploadFile & FileManager with PHP [In reply to] Can't Post

Guess i just found the solution: read this topic: http://www.interactivetools.com/forum/gforum.cgi?post=18329;search_string=this.RelativePaths%3D1;t=search_engine#18329

We should change "this.RelativePaths=1;" into "this.RelativePaths=0;"

I'm still testing if this will disturb any other functions, but until now it works fine for me.


ozinm
User

May 10, 2004, 6:20 AM

Post #13 of 16 (6835 views)
Shortcut
Re: [kwillems] I need UploadFile & FileManager with PHP [In reply to] Can't Post

Sorry I haven't replied.

That look's spot on.

As soon as I get a chance I'll try it out and let you know.



Thanks again Smile


ozinm
User

May 11, 2004, 5:59 AM

Post #14 of 16 (6794 views)
Shortcut
Re: [ozinm] I need UploadFile & FileManager with PHP [In reply to] Can't Post

Yup that fixed it.

Thanks for your help Smile

The only problem I've got now is trying to replace the old version of HTMLArea with this one in InteractiveTools Article Manager.

On the off chance that someone has already done this (and could point me in the right direction Crazy) I've had a quick go renaming images/htmlarea/ to images/htmlarea.old and then sticking the new one into images/htmlarea

The interface seems to load in AM except none of the content is displayed.
I can add new content and it saves fine but when I go to open it again, there's still no content.

I'm guessing that I probably need to bung in a new bit of script into the _art_menus.html & _writer_menus.html interface files.

I'll let you know how I get on.



TTFN


ozinm
User

May 11, 2004, 6:18 AM

Post #15 of 16 (6793 views)
Shortcut
Re: [ozinm] I need UploadFile & FileManager with PHP [In reply to] Can't Post

I've just edited the _art_menus.html template replacing the following lines:


Code
  

<script language="Javascript1.2"><!--
var _editor_url = '$_imageurl_je$htmlarea/';
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera') >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5) {
document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
document.write(' language="Javascript1.2"></scr' + 'ipt>');
}
// --></script>



with this new stuff:



Code
 <script language="Javascript1.2"><!-- // load htmlarea 
_editor_url = '$_imageurl_je$htmlarea/'; // URL to htmlarea files
_editor_field = "";
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera') >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5) {
document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
document.write(' language="Javascript1.2"></scr' + 'ipt>');
} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }
var MyBgColor ='#FFFFFF';
var MyBgImg ='';
// --></script>
<script>
function updateAttributes(){
document.myform.bgcolor.value=MyBgColor;
document.myform.background.value=MyBgImg;
}
</script>



And (fingers crossed) it seems to have fixed the problems so far.


ozinm
User

Jun 9, 2004, 8:28 AM

Post #16 of 16 (6308 views)
Shortcut
Re: [ozinm] I need UploadFile & FileManager with PHP [In reply to] Can't Post

Update:

There was one slight problem - it looks like when I made the alteration I also messed up some of the other coding for _art_menus.html file which stopped the add article as "Uploaded File" from working.

This has now been fixed and I've posted a copy of the fixed version along with the original and broken one if anyone is interested here:

http://www.interactivetools.com/forum/gforum.cgi?post=29789;#29789

All the best

Marc

 
 
 


Search for (options)