Page 1 of 1
Insert File link not working in htmlarea
Posted: Fri Dec 03, 2004 5:53 pm
by Greg
In creating a content page using the 'insert a link' to a file the wrong path is inserted. I have a file uploads/training/document.doc the link created in htmlarea is training/document.doc the uploads part is missing in the link.
Anyone have a fix ?
Forgot to add - I checked the config.php file and the paths to the uploads directory are correct.

Insert File link not working in htmlarea
Posted: Fri Dec 03, 2004 9:42 pm
by Greg
Thanks to rummy posting the other bug (60) I figured it out:
htmlarea/plugins/insertfile/config.php
Line 159
Code: Select all
$MY_LINK_FORMAT = '<SPAN CLASS="filelink"><IMG SRC="_editor_urlplugins/InsertFile/IF_ICON" ALT="IF_URL" BORDER="0"> <A HREF=' .$MY_URL_TO_OPEN_FILE. 'IF_URL>IF_CAPTION</A> </SPAN> ';
I also added the htm extension in lines 61 and 69
Insert File link not working in htmlarea
Posted: Sat Dec 04, 2004 4:30 pm
by Greg
This almost works.
Does not handle files with spaces in the file name
htmlarea is a very frustrating tool!
Insert File link not working in htmlarea
Posted: Sun Dec 05, 2004 3:30 pm
by Greg
Fixed right this time
Simple solution:
Added 'uploads' to line 159 of htmlarea/plugins/insertfile/config.php
$MY_LINK_FORMAT = ' IF_CAPTION IF_SIZE IF_DATE ';
Now filenames with spaces even work !!