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

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
hellsgate
New Member
New Member
Posts: 6
Joined: Thu Jul 17, 2008 1:22 pm

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

Post 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
Last edited by hellsgate on Mon Jul 21, 2008 2:38 pm, edited 1 time in total.
hellsgate
New Member
New Member
Posts: 6
Joined: Thu Jul 17, 2008 1:22 pm

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

Post 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.
jospanner
Forum Members
Forum Members
Posts: 105
Joined: Tue Mar 25, 2008 11:34 pm

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

Post 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.
sam_butler
Forum Members
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

Post 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.
hellsgate
New Member
New Member
Posts: 6
Joined: Thu Jul 17, 2008 1:22 pm

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

Post 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
blaw

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

Post by blaw »

Thanks, hellsgate. This one had me scratching my head, too. Your fix took care of it.
l1nda
Forum Members
Forum Members
Posts: 18
Joined: Mon Jul 28, 2008 5:49 am

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

Post by l1nda »

THANK YOU SOOO MUCH! i was having this prob and it was killing me but your solution was perfect!  ;D
stopsatgreen
Power Poster
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

Post by stopsatgreen »

Seems to be an error in 2.4.0; I just upgraded to 2.4.2 and it resolved the problem.
Post Reply

Return to “CMSMS Core”