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
[SOLVED] - Unable to link to pdf files using the WYSIWYG editor
[SOLVED] - Unable to link to pdf files using the WYSIWYG editor
Last edited by hellsgate on Mon Jul 21, 2008 2:38 pm, edited 1 time in total.
Re: Unable to link to pdf files using the WYSIWYG editor
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
Do you find the access for TINY MCE via the file structure or via the cms back end settings? Am having same problems. Thanks.
-
- Forum Members
- Posts: 24
- Joined: Sun Jul 20, 2008 3:36 pm
- Location: Manchester, UK
Re: [SOLVED] - Unable to link to pdf files using the WYSIWYG editor
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
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
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
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
THANK YOU SOOO MUCH! i was having this prob and it was killing me but your solution was perfect! 

-
- Power Poster
- Posts: 322
- Joined: Sat Feb 04, 2006 1:24 am
- Location: London, England
Re: [SOLVED] - Unable to link to pdf files using the WYSIWYG editor
Seems to be an error in 2.4.0; I just upgraded to 2.4.2 and it resolved the problem.