Re: Printer friendly pages

Thijs Kinkhorst <[email protected]>
Newsgroups gmane.mail.squirrelmail.devel
Message-ID <[email protected]>
On Tuesday 13 May 2008 11:30, Thierry Godefroy wrote:
> I tested it under both Linux and Windoze, with Firefox 2, Opera 9 and IE7:
> it plain does not work with Javascript enabled: it opens an empty tab, and
> when opening the error console, it says that it did not find PrintThis(): I
> did not investigate, but I think the problem is that default.css is not
> loaded into the new tab/window when the javascript:printThis() link is
> clicked. In any case, it doesn't work as it is in the SVN right now.

Yes, I can reproduce this. I must have broken it somewhere when I implemented 
the non-javascript version, I'll investigate.

> But now my question is: how a plugin is supposed to change the layout of
> the message before it is printed. I.e. what if you don't want the printed
> message to look exactly in the same way it is displayed (what if you want
> less header fields, for example ?...) ?

> I vote strongly against this change, and kindly request to have it reverted.

I genuinely think that would be a step in the wrong direction. This is 
not "just another way to do it", it fully alligns with the goal of separating 
code (what it does) and display (how it looks). Printer friendly is 
definately just a means of presentation, not logic. CSS is the way to go 
here, as it is when developing e.g. a mobile phone equivalent or one for 
people with bad eye sight.

I understand your concerns, but I think the right solution is to find a way to 
embed them within this framework rather than reverting it.

If you want to display some fields differently or not at all, css is your 
friend and will actually make it easier to do that, rather than to hack away 
at the old printer friendly code. In fact, you can completely revamp the 
print.css stylesheet so that printer friendly looks exactly the way you want 
it to be, without intermingling with core code.

If you don't want to edit print.css but want all code to be confined to your 
plugin purely, it is possible to add a custom css to the page header with 
your media=print definitions.

If the current template set doesn't have the right css classes to fully 
express what you want, we can of course see if that can be changed, I don't 
expect much problems there.

All in all, I believe that this is a great improvement, maybe even more for 
custom print friendlies rather than less.


cheers,
Thijs

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

-----
squirrelmail-devel mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [email protected]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel
signature.asc (application/pgp-signature, 481 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUASCloRmz0hbPcukPfAQIrgQf/V9sP4uS5s4NnSN5Z8OfbwKbNA+UYxMWg
pGhIJey6/sLZG9yMoMPTcODslFA+70aM1v/yH2gmn8oPEjCiLdIl+UpxRi6HV1UV
7oSkNmbYTLkOUMTNMlsIK4SRfS6pIR6uf9yKS5Rx3cAw7X5W7gttan1MZuHjoz+k
OGbJ+9J6lW42Wcwfv8FBq8YvFtBn/rPhZG2/uKnhsBOer7ghrG1Wzbix4g6Tum2I
+L7iFIVuC4dVjZA5Y47IiIOruu3bEK2X71oVnXIT+owkGC0XVKF6BZn4ocHaDqDJ
ohVmdZdT6if6UPiTQK2MQakuW0ZNTHM4Trv7oGdqS9cyK+0YXqfwkA==
=8wDD
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.