Reply to Re: [PHP] fckeditor and PDF and pesky users

Your name:

Reply:


Posted by "Jason Kovacs" on 10/15/05 02:03

Richard Lynch said the following on Friday, October 14, 2005 3:39 PM:


> So...
>
> Do I:
>
> A) Attempt to hack fckEditor to "allow" a PDF to get uploaded, and
> then display a link to the PDF instead of alink to the fckEditor
> output.
>
> B) Give them a separate, possibly confusing, input to upload files to
> tie in as links to the fckEditor area

I've had success with this, creating a seperate utility to upload documents
to the filesystem and keeping track of them in mysql. I chose to allow
displaying the PDF's and Doc's through links in the FCKEditor content,
because I have never found a way to embed the PDF data into pages.

I added a custom drop-down menu to FCKEditor's Link window that fills
in the URL upon selecting the menu item, but this url consisted of just a
path to a redirect.php script where I set a GET variable to the ID of the
document, then passing through the PDF or DOC data. Though you could
link the full path to the PDF in the URL, I just had my documents stored
behind the web-accessible address. Every time a new document was
uploaded, I decided to write the URL's statically to a file that the
FCKEditor script (changed fck_link.html to fck_link.php) will read into
Javascript arrays, as opposed to accessing the DB every time this Link
window was viewed. I added about 50 lines of Javascript code to
fck_link.php to do what I wanted in setting the URL from the Select list.

I must warn you though, every time that I upgrade FCKEditor, I have to
reapply the changes I've done and there is the possibility that the
FCKEditor scripts may change to cause compatibility problems. Let me
know if you are interested in this route and I can post my alterations to
FCKEditor, but the PDF file management is up to you. I've had many
non-technical users working with this utility just fine for about 6 months,
so it works and though its not the most graceful implementation from a
developer's standpoint, it makes the user interface easiest to work with.

-Jason Kovacs

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация