Page 1 of 1
can't have printer friendly
Posted: Tue Feb 28, 2006 8:58 pm
by tk
I've already installed the event plugin layout printerfriendly. But unfortunetely, I can't see any print (or such) link in entry pages.
My serendipity version is Serendipity 1.0-beta1 and Layout-Plugin: Printerfriendly version is 1.0.
What would be your suggestions?
Re: can't have printer friendly
Posted: Tue Feb 28, 2006 8:59 pm
by garvinhicking
The print stuff it automatically inserted as a printer CSS stylesheet, so as soon as you print it, your browser will apply it to your webpage. So you can use the browser's print function easily.
Best regards,
Garvin
What about a printer friendly page?
Posted: Tue Feb 28, 2006 9:54 pm
by tk
Wow! I've been observing plenty of messages appreciating your response rate, but the experience itself is something different and awesome! Serendipity wouldn't rock as such without you Garv; that's for sure.
Well; what I'd like to have is a printer friendly Web page indeed. I guess there isn't such a plugin for now.
Is there a way to do it; or what would you suggest me to do? (I've got very little knowledge of PHP; I can only hack some templates in Serendipity for now.)
Since most of my authors are poets, they wouldn't like to see their poems with sidebars and links along and around. Believe me I understand and appreciate them.

Re: What about a printer friendly page?
Posted: Wed Mar 01, 2006 10:49 am
by garvinhicking
Thanks for your appreciation!

)
But what concerns you about the current plugin solution? It does offer a printer friendly Webpage when printing!
Best regards,
Garvin
Re: What about a printer friendly page?
Posted: Wed Mar 01, 2006 3:08 pm
by tk
Sorry, I was a little short in describing what I need.
In fact what I need is to display the content in a printer friendly layout, in a Web page, before the printing process.
Just like the ones many sites and CMS display by clicking "printer friendly" or "print this" links.
Guess Serendipity lacks such plugin. Could you suggest me a workaround that I could implement?
Re: What about a printer friendly page?
Posted: Wed Mar 01, 2006 3:19 pm
by garvinhicking
Hm, I actually really dislike the way how CMS'es handle such a "printer friendly" view.
But you could do that as well. All that is needed is a simple javascript-based style switched. You can embed that into your template and let it switch via javascript to the printer stylesheet before printing.
I've never tried that though, because I really favor the way it gets applied without user interaction - but it should work very easily
Best regards,
Garvin
method
Posted: Thu Mar 02, 2006 9:33 pm
by tk
Hi Garvin,
Thanks for the advice.
So, that leaves us with two steps I suppose:
1. Display a "print this" link in every entry (just like e-mail or pdf option): Should I edit entries.tpl file of my template(s)?
1.b What should be the URL for that link?
2. Create a new entry display without sidebars and with variable width: Should I create a file someting like "print.tpl"
or...
should it be done within a plugin approach?
or...
Is there an easier way by applying the print.css?
Re: method
Posted: Fri Mar 03, 2006 11:05 am
by garvinhicking
I would actually edit the index.tpl file and insert a "print this page" link.
It would look somethingl ike:
Code: Select all
<a href="javascript:switchStylesheet('print.css'); document.print()">Print this Page</a>
The javascript to swithc a stylesheet shouldn't be hard, I figure google will have many hits for this. The print.css can be used from the plugin, it basically does some things like:
Code: Select all
#serendipityLeftSideBar, #serendipityRightSideBar {
display: none;
}
So it just disables items on a CSS basis.
HTH,
Garvin