Page 1 of 1

[SOLVED] - Unable to link to pdf files using the WYSIWYG editor

Posted: Fri Jul 18, 2008 11:09 am
by hellsgate
Hey folks,

I'm adding a page which has a list of pdf files which can be downloaded.  I've added all the pdf files using the file manager and they are all where they should be (/up;oads/ directory).  However, these files are not showing in the 'CMSMadeSimple File Selection' dialog box when I try to add them as a link in the WYSIWYG editor.  I can see images I've uploaded in this dialog and can link to them, so I'm not sure what is going on.  Obviously I can add the link in the non-WYSIWYG editor, but this wouldn't be any good for my end user.

I'm using CMS-MS ver 1.3.1 (havana); php ver 5.2.5; MySQL ver 5.0.51a-community-nt; apache ver 2.2.8 and WinXP SP2

Re: Unable to link to pdf files using the WYSIWYG editor

Posted: Mon Jul 21, 2008 2:37 pm
by hellsgate
The problem here was that TinyMCE was looking for only images.  I simply changed the file modules/TinyMCE/filepicker.php to allow .pdf files as well.

Re: [SOLVED] - Unable to link to pdf files using the WYSIWYG editor

Posted: Tue Jul 22, 2008 9:07 pm
by jospanner
Do you find the access for TINY MCE via the file structure or via the cms back end settings? Am having same problems. Thanks.

Re: [SOLVED] - Unable to link to pdf files using the WYSIWYG editor

Posted: Wed Jul 23, 2008 5:56 pm
by sam_butler
He's referring to the file structure. In your root you should have a "modules" folder. From there, navigate to "TinyMCE" and open the file "filepicker.php." I think if you do a search for "png" you should land at the conditional statement where it checks for image file types. I'm not sure what the OP changed but you could play with that.

Re: [SOLVED] - Unable to link to pdf files using the WYSIWYG editor

Posted: Thu Jul 24, 2008 10:54 am
by hellsgate
sam_butler is correct.  The actual line i changed in this file was line 70.  I changed it from this:
if ($file["ext"]!=".jpg" && $file["ext"]!=".gif" && $file["ext"]!=".png") continue;

to this:
if ($file["ext"]!=".jpg" && $file["ext"]!=".gif" && $file["ext"]!=".png" && $file["ext"]!=".pdf") continue;

so that I could see .pdf files

Re: [SOLVED] - Unable to link to pdf files using the WYSIWYG editor

Posted: Thu Jul 24, 2008 3:06 pm
by blaw
Thanks, hellsgate. This one had me scratching my head, too. Your fix took care of it.

Re: [SOLVED] - Unable to link to pdf files using the WYSIWYG editor

Posted: Fri Aug 01, 2008 6:31 am
by l1nda
THANK YOU SOOO MUCH! i was having this prob and it was killing me but your solution was perfect!  ;D

Re: [SOLVED] - Unable to link to pdf files using the WYSIWYG editor

Posted: Fri Aug 01, 2008 8:37 am
by stopsatgreen
Seems to be an error in 2.4.0; I just upgraded to 2.4.2 and it resolved the problem.