Re: fckeditor and PDF and pesky users

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux