Re: [PHP] fckeditor and PDF and pesky users

2005-10-19 Thread Torgny Bjers
Jochem Maas wrote:

 and the next site that displays a PDF when I wasn't expecting it
 and I have to spend the next five minutes waiting for the b'std to load
 (with the alternative being to KILL the browser - losing all open pages
 in the process) ... might just make me snap ;-)

I agree, those moments are annoying. That's why one needs to make sure
that the user expects, and is aware, that a PDF is going to open down
there in that little iframe/. I do not see any motivated use for a PDF
in this fashion on a normal site, but, in a document versioning system
or a CMS, sure, that would be awesome. Otherwise I side with Jochem.

This is not an approach that should be used in any normal web page, it
should be utilized with care, where it is needed, and the user has to be
made aware that when clicking on a specific link, a PDF will be loading.
Otherwise, some poor webmaster's going to have to answer to Jochem, and
they don't want that. ;)

Regards,
Torgny

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



Re: [PHP] fckeditor and PDF and pesky users

2005-10-18 Thread Jochem Maas

Richard Lynch wrote:

On Mon, October 17, 2005 3:56 pm, Torgny Bjers wrote:


Also, when using iframe/ you are weeding out those old browsers that



If somebody else wants to weed out old browsers, that's all fine and
good, but that's not me...



Besides, if this is for an editor interface, for a specific client,
one
could reasonably demand that they use at least one of the newer
browsers
such as IE5+ or Mozilla. If not for a specific client, or subset of
clients, but for a general update of an entire application that is
open
sourced, I agree with Jasper, don't touch it. :)



I personally don't think I should demand editors use a specific browser.

I believe in customer choice.


NOAM CHOMPSKY -- Manufactured Consent

just a loose cannon :-)



For that matter, *I* probably don't use a browser that does this
right, being as I'm usually on Linux, almost always on Netscape, and
very very very rarely do PDF and/or Flash work really right for me.

And you know what?

I very very very seldom care badly enough about any of the content I'm
missing and when I do care enough to go get it, I'm disappointed by
the content more often than I'm pleased that I took that effort.


I feel that - most of the all-signing all-dancing 'content' out there
is less substantial as styrofoam and less interesting.

and the next site that displays a PDF when I wasn't expecting it
and I have to spend the next five minutes waiting for the b'std to load
(with the alternative being to KILL the browser - losing all open pages
in the process) ... might just make me snap ;-)



Again, this is obviously MY weird world-view at work here. :-)



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



Re: [PHP] fckeditor and PDF and pesky users

2005-10-18 Thread Richard Lynch
On Tue, October 18, 2005 8:30 am, Jochem Maas wrote:
 and the next site that displays a PDF when I wasn't expecting it
 and I have to spend the next five minutes waiting for the b'std to
 load
 (with the alternative being to KILL the browser - losing all open
 pages
 in the process) ... might just make me snap ;-)

Fire up Acrobat reader and change the preferences to only display
documents OUTSIDE the browser context.

Then you can nuke Acrobat and keep surfin'

I do it all the time.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] fckeditor and PDF and pesky users

2005-10-17 Thread Richard Lynch
On Sat, October 15, 2005 7:26 am, Edward Vermillion wrote:
 Do they want the PDF to display in the page, or is a link to a PDF ok
 for them?

I've already warned them that a PDF embedded into a page is impossible.

That may not be true, technically, for all I know, but I've sure never
seen it, and don't even want to try to go somewhere that so few have
gone.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] fckeditor and PDF and pesky users

2005-10-17 Thread Richard Lynch
On Fri, October 14, 2005 6:03 pm, Jason Kovacs wrote:
 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 don't think PDF embedded into pages exists...

Not saying for sure it doesn't, and sure not saying it SHOULDN'T, but
I've told them it ain't happening for them in the time-frame we've
got. :-)

 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.

Sweet!

 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,

Please do!

 but the PDF file management is up to you.

Oh yeah.  That's for sure.

 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.

It certainly sounds like a very good solution.

Be really nifty if fckEditor folks took a look at it and considered
adding it as a feature.

We can't be the only ones needing this kind of thing.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] fckeditor and PDF and pesky users

2005-10-17 Thread Torgny Bjers
Richard Lynch wrote:

On Sat, October 15, 2005 7:26 am, Edward Vermillion wrote:
  

Do they want the PDF to display in the page, or is a link to a PDF ok
for them?



I've already warned them that a PDF embedded into a page is impossible.

That may not be true, technically, for all I know, but I've sure never
seen it, and don't even want to try to go somewhere that so few have
gone.
  


I think you would be able to use an IFRAME, or even a FRAME, to load the
PDF into like you would open it in any normal browser using the standard
PDF plugin that's used when you click a PDF in your browser. That is,
set the src of the iframe to the path of the PDF. Give it a try and let
us know how it works out. IFRAMEs are smart sometimes, especially when
building application interfaces.

Regards,
Torgny

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



Re: [PHP] fckeditor and PDF and pesky users

2005-10-17 Thread Jasper Bryant-Greene

Richard Lynch wrote:


 On Sat, October 15, 2005 7:26 am, Edward Vermillion wrote:

 Do they want the PDF to display in the page, or is a link to a PDF
 ok for them?


 I've already warned them that a PDF embedded into a page is
 impossible.

 That may not be true, technically, for all I know, but I've sure
 never seen it, and don't even want to try to go somewhere that so few
 have gone.



I would expect that putting the PDF in an iframe would work, but I 
wouldn't trust browsers or the Acrobat plugin to not crash horribly in 
that sort of situation. It's also going to be very confusing for users 
seeing the Acrobat toolbar floating in the middle of their page.


It would be interesting to see some tests of PDF-in-iframe done in 
various different browsers, but unless it just happened to work 
perfectly in every common browser (we can all dream, can't we?) I 
wouldn't touch it.


Jasper

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



Re: [PHP] fckeditor and PDF and pesky users

2005-10-17 Thread Torgny Bjers
Jasper Bryant-Greene wrote:

 Richard Lynch wrote:

  On Sat, October 15, 2005 7:26 am, Edward Vermillion wrote:

  Do they want the PDF to display in the page, or is a link to a PDF
  ok for them?


  I've already warned them that a PDF embedded into a page is
  impossible.

  That may not be true, technically, for all I know, but I've sure
  never seen it, and don't even want to try to go somewhere that so few
  have gone.


 I would expect that putting the PDF in an iframe would work, but I
 wouldn't trust browsers or the Acrobat plugin to not crash horribly in
 that sort of situation. It's also going to be very confusing for users
 seeing the Acrobat toolbar floating in the middle of their page.

 It would be interesting to see some tests of PDF-in-iframe done in
 various different browsers, but unless it just happened to work
 perfectly in every common browser (we can all dream, can't we?) I
 wouldn't touch it.

 Jasper


After some consideration I am pretty sure it works, since an iframe/
is just the same as a frame/, and I am dead certain you can open a PDF
document, or a Word document, or a Flash file, inside a frame without
anything crashing. As for the PDF toolbar, I think that with the proper
CSS styles on the iframe/ element you can make it pretty apparent that
the iframe/ contains a PDF document.

Also, when using iframe/ you are weeding out those old browsers that
wouldn't support even loading an iframe/, which means that you get
relatively new browsers, and those should all support this method.

Besides, if this is for an editor interface, for a specific client, one
could reasonably demand that they use at least one of the newer browsers
such as IE5+ or Mozilla. If not for a specific client, or subset of
clients, but for a general update of an entire application that is open
sourced, I agree with Jasper, don't touch it. :)

Regards,
Torgny

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



Re: [PHP] fckeditor and PDF and pesky users

2005-10-17 Thread Richard Lynch
On Mon, October 17, 2005 3:31 pm, Torgny Bjers wrote:
 I think you would be able to use an IFRAME, or even a FRAME, to load
 the
 PDF into like you would open it in any normal browser using the
 standard
 PDF plugin that's used when you click a PDF in your browser. That is,
 set the src of the iframe to the path of the PDF. Give it a try and
 let
 us know how it works out. IFRAMEs are smart sometimes, especially when
 building application interfaces.

I'm the kind of guy who considers CSS and JavaScript too unreliable
with older browsers to use...

I don't think I'm gonna be testing iFrames out any time soon.

Plus, I *KNOW* that some users (e.g., me) configure Acrobat to *NOT*
put a PDF in my browser, but open a separate application, because
that's invariably the way I want to view it, flipping back-and-forth
to the 'net to cross-ref with both windows open.

So, even if it sort of worked, for users who don't do that, or even if
I could force it to work, and not LET them open up in another window,
I don't think that's a Good Idea for keeping happy users, so that
ain't gonna happen either.

But that's just me.

Somebody else reading this thread might say keen-o and do it.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] fckeditor and PDF and pesky users

2005-10-17 Thread Richard Lynch
On Mon, October 17, 2005 3:56 pm, Torgny Bjers wrote:
 Also, when using iframe/ you are weeding out those old browsers that

If somebody else wants to weed out old browsers, that's all fine and
good, but that's not me...

 Besides, if this is for an editor interface, for a specific client,
 one
 could reasonably demand that they use at least one of the newer
 browsers
 such as IE5+ or Mozilla. If not for a specific client, or subset of
 clients, but for a general update of an entire application that is
 open
 sourced, I agree with Jasper, don't touch it. :)

I personally don't think I should demand editors use a specific browser.

I believe in customer choice.

For that matter, *I* probably don't use a browser that does this
right, being as I'm usually on Linux, almost always on Netscape, and
very very very rarely do PDF and/or Flash work really right for me.

And you know what?

I very very very seldom care badly enough about any of the content I'm
missing and when I do care enough to go get it, I'm disappointed by
the content more often than I'm pleased that I took that effort.

Again, this is obviously MY weird world-view at work here. :-)

-- 
Like Music?
http://l-i-e.com/artists.htm

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



RE: [PHP] fckeditor and PDF and pesky users

2005-10-17 Thread Jason Karns
-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 17, 2005 5:11 PM
To: Torgny Bjers
Cc: php-general@lists.php.net
Subject: Re: [PHP] fckeditor and PDF and pesky users

On Mon, October 17, 2005 3:56 pm, Torgny Bjers wrote:
 Also, when using iframe/ you are weeding out those old browsers that

If somebody else wants to weed out old browsers, that's all fine and good,
but that's not me...

 Besides, if this is for an editor interface, for a specific client, 
 one could reasonably demand that they use at least one of the newer 
 browsers such as IE5+ or Mozilla. If not for a specific client, or 
 subset of clients, but for a general update of an entire application 
 that is open sourced, I agree with Jasper, don't touch it. :)

I personally don't think I should demand editors use a specific browser.

I believe in customer choice.

For that matter, *I* probably don't use a browser that does this right,
being as I'm usually on Linux, almost always on Netscape, and very very very
rarely do PDF and/or Flash work really right for me.

And you know what?

I very very very seldom care badly enough about any of the content I'm
missing and when I do care enough to go get it, I'm disappointed by the
content more often than I'm pleased that I took that effort.

Again, this is obviously MY weird world-view at work here. :-)

--
Like Music?
http://l-i-e.com/artists.htm

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



Not that you'd want to use a deprecated tag, but using an embed tag with a
src value pointing to a PDF file (with appropriate height/width) will render
the entire Adobe plugin with toolbars and all directly in the page, as
demonstrated here:
http://www.cstv.com/auto_pdf/p_hotos/s_chools/osu/sports/m-footbl/auto_pdf/w
eekly-release

Jason Karns

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



Re: [PHP] fckeditor and PDF and pesky users

2005-10-17 Thread Torgny Bjers
Richard Lynch wrote:

On Mon, October 17, 2005 3:56 pm, Torgny Bjers wrote:
  

Also, when using iframe/ you are weeding out those old browsers that



If somebody else wants to weed out old browsers, that's all fine and
good, but that's not me...
  


Didn't say I wanted to. It was a suggestion. :) I personally prefer Lynx
when I am surfing, since then I get rid of everything, including images,
javascript, and plugins -- just me and text. Nah, seriously, I kind of
like Firefox since 80x25 text space in lynx can get a bit annoying when
navigating a site that somebody added a bzillion images to, but let's
not talk about browsers and favorites, since that'd be another long
ardous flame fest. :P

Besides, if this is for an editor interface, for a specific client,
one
could reasonably demand that they use at least one of the newer
browsers
such as IE5+ or Mozilla. If not for a specific client, or subset of
clients, but for a general update of an entire application that is
open
sourced, I agree with Jasper, don't touch it. :)



I personally don't think I should demand editors use a specific browser.

I believe in customer choice.

For that matter, *I* probably don't use a browser that does this
right, being as I'm usually on Linux, almost always on Netscape, and
very very very rarely do PDF and/or Flash work really right for me.

And you know what?

I very very very seldom care badly enough about any of the content I'm
missing and when I do care enough to go get it, I'm disappointed by
the content more often than I'm pleased that I took that effort.

Again, this is obviously MY weird world-view at work here. :-)
  

I wasn't trying to advocate you doing something you don't want to do. If
you consider the feature worth implementing, weighing the options, you
implement it, or you don't, either way, your choice. I merely stated
that it does work, when using a recent browser.

The iframe/ tag was added in IE3+ which is pretty darn old, and if
you've seen ANYBODY using anything Microsoft-made prior to IE3 in your
server logs of late, let me know. :)

The following major browsers have support for iframe/:

Internet Explorer for Macintosh: 5.2 (not sure about 5.1)
Internet Explorer: 3.0 and above
Mozilla: 1.0 and above
Netscape Navigator: above 4.0 (which should be 6.0)
Opera: 4.0 and above
Safari: 1.0 and above

So, if you use one of these browsers, and considering that you rarely
(I'd say about %1-5) see people using anything below these versions,
you'd be safe adding an iframe/ if you wanted to. If the browser does
not have support for iframe/ it will ignore the tag and it won't break
anything at all.

As Jason Karns showed in the example from cstv, and you could test that
on all your different browsers and see what happens, if they have the
plugin installed, it ought to work...

But, on that note, if it is entirely vital to display the PDF, why not
convert the PDF to HTML instead and display that then? Would work in all
browsers, a little hit on the server performance, which can be avoided
by caching the results of a PDF - HTML conversion. Don't ask me where
to get code for this, as I have no clue, but I am sure it exists somewhere.

Regards,
Torgny

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



Re: [PHP] fckeditor and PDF and pesky users

2005-10-17 Thread Jason Kovacs

Richard Lynch said the following on Monday, October 17, 2005 3:30 PM:

On Fri, October 14, 2005 6:03 pm, Jason Kovacs wrote:

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



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.


Sweet!


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,


Please do!


but the PDF file management is up to you.


Oh yeah.  That's for sure.


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.


It certainly sounds like a very good solution.

Be really nifty if fckEditor folks took a look at it and considered
adding it as a feature.

We can't be the only ones needing this kind of thing.


Here's my changes to FCKEditor, and it works on version 2.0 RC3, but should
work for other later versions too unless drastic changes have been made by
it's developers to the affected scripts.   I tried to clean it up for you as
much as possible and took out my customizations using doc ID's and broadened
it to use string URL's, which you'll need to write along with the doc
entry's Title to a static JS file that gets read by FCKEditor (using php).
The code also handles grouping uploaded documents into 1-level-deep groups,
so this is something you'll have to keep track of in your upload utility.
If that's not something you need or can easily figure out, just take out the
JS code that deals with Option Groups and flatten the document data array.

FCKEditor Customization Notes for linking Documents
---
By Jason Kovacs - 2005-05-04

1. Install the FCKeditor utility to /path/to/public_html/js/FCKeditor/.

2. The directory /path/to/public_html/js/data/ must be created and have
permissions of 777.

3. Set up the Document Upload utility to write static data to the file
/path/to/public_html/js/data/fck_link_docdata.js
  with the following structure:
---
var documentGroups = [Group 1,Group 2];
var documentData =
[
[
 [Doc Title 1,URL],
 [Doc Title 2,URL]
],
[
 [Doc Title 1,URL],
 [Doc Title 2,URL]
]
];
---

4. Rename ./js/FCKeditor/editor/dialog/fck_link.html to fck_link.php and
Edit it to have these changes:

4a. Below meta name=robots content=noindex, nofollow /, insert:
SCRIPT Language=JavaScript!-- 
?

@readfile(/path/to/public_html/js/data/fck_link_docdata.js);
?
//--/SCRIPT

4b. Insert the following two Table rows above the tr for Protocol:
tr
 td nowrap=nowrap colspan=3
  span fckLang=DlgLnkDocumentDocuments/spanbr /
  select style=WIDTH: 100% id=cmbLinkDocument
onchange=SetDocumentUrl(this.value);
option
value=0Select a Document File/option
  /select
 /td
/tr

5. Edit ./js/FCKeditor/editor/dialog/fck_link/fck_link.html to have these
changes:

5a. Add these lines after LoadSelection() ; in the window.onload
function() call:
// Load the Documents select menu with optgroups/options from the included
data arrays.
LoadDocumentData() ;

5b. Before the SetLinkType function, add the following:

function LoadDocumentData()
{
var sUrl = GetE('txtUrl').value;
var docSelectObj = GetE('cmbLinkDocument');
for(var i=0; i  documentGroups.length; i++)
{
 optGroup = document.createElement('optgroup');
 optGroup.label = documentGroups[i];
 docSelectObj.appendChild(optGroup);
 for(var j=0; j  documentData[i].length; j++)
 {
  var objOption = document.createElement(option);
  objOption.innerHTML = documentData[i][j][0];
  objOption.value = documentData[i][j][1];
  if(objOption.value == sUrl) objOption.selected = true;
   optGroup.appendChild(objOption);
 }
}
}

5c. Change the line in the function SetLinkType from:
window.parent.SetTabVisibility( 'Advanced' , (linkType != 'anchor' ||
bHasAnchors) ) ;
   To the line:
window.parent.SetTabVisibility( 'Advanced' , false ) ;

5d. Change the line in the function 

Re: [PHP] fckeditor and PDF and pesky users

2005-10-15 Thread Edward Vermillion

Richard Lynch wrote:


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

C) Dump fckEditor and only allow file upload, requiring them to
compose HTML pages in some external application

Has anybody faced this, and with VERY non-technical users had better
luck one way or another?

Which of these fit in best with PHP, and why?



Do they want the PDF to display in the page, or is a link to a PDF ok 
for them?


Dunno about what's best for PHP, but I'd think about having a separate 
upload box right below the fckEditor box, clearly marked as a PDF upload 
box, and then do some linking magic when you process the form.


You said there were templates involved. Depending on how the content 
from fckEditor is used in the templates, I'd see if I could just put 
some kind of tag in the templates as a marker for the PDF link to go 
into, or maybe some JS to add a tag into the fckEditor box when they 
choose a file to upload. But it all really depends on how the backend is 
handling the form and how it all eventually gets out to the browser as a 
page.


I've got a more complicated thing going in my CMS that seems to be ok 
for the folks to grasp that involves a PDF upload/manager section 
thingie. But I'm not having to tie it in to fckEditor, and all the PDF's 
go to one page anyway right now.


Good luck on however you end up working it out. Showing someone how 
something works before they have a chance to formulate any ideas about 
how they *think* it should work is always a lot easier that retraining 
them after they've been frustrated at the magic box that won't do what 
I want it too.


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



[PHP] fckeditor and PDF and pesky users

2005-10-14 Thread Richard Lynch
This is more of a user education problem than anything, I suspect, but...

Okay, so I'm kind of like a closing pitcher on this project where the
original developer is, errr, surfing in California or something...

Anyway, he's got a bunch of custom back-end CMS pages using fckEditor
(sp?) and I'm pretty much just leaving those alone as a black box --
don't touch :-)

Unfortunately, I've recently received a bug report, to whit:

We can upload GIFs okay, but we get an error message about wrong file
type when we try to upload PDFs

I was at first befuddled about this, as there is no file upload
functionality AT ALL in this project...

So I dunno where they thought they were uploadings GIFs.
[Sure, *you* know it now cuz you got forshadowing about fckEditor in
the first paragraph.  Cheater.]

Eventually, I realized they were talking about what they call the
Microsoft-like editor (which you and I know as fckEditor) and that
they were attempting to cram a PDF file into it.

Since they are often using the fckEditor to cram in a Poster for
theatre productions, this is not as weird as it sounds...

Actually, from the end user perspective, I can completely understand
that they expect to be able to cram a PDF in there, just like they do
Posters in GIF and JPG format.

To them, the end user, it's really all the same thing.

To me, of course, it's so totally not the same thing, I don't even
know how to proceed.

The problem I have now is that they NEED PDF support.  We're talking
here about pre-existing documents such as floor charts for ticket
sales, brochures, Technical Specifications (for potential renters or
theatre production companies) and (some day) Legal Contracts.

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

C) Dump fckEditor and only allow file upload, requiring them to
compose HTML pages in some external application

Has anybody faced this, and with VERY non-technical users had better
luck one way or another?

Which of these fit in best with PHP, and why?

I'm mostly used to educable users who can flex on functionality to get
what they want, but this is more a case of needing to make this WORK
for them their way.

THANKS!

PS
He's also using some kind of template language -- I don't even know
which one, as I'm just copy/pasting the bits of that to make it work,
rather than actually diving into it.  That probably doesn't matter,
but if it does, I'll dig out the template name/version.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] fckeditor and PDF and pesky users

2005-10-14 Thread Jason Kovacs

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