Page 1 of 1

Print this post

Posted: Mon May 31, 2004 7:07 am
by ned
A "print this post" button would be nice. Any ideas how?

Re: Print this post

Posted: Mon May 31, 2004 12:54 pm
by garvinhicking
[quote="ned"]A "print this post" button would be nice. Any ideas how?[/quote
]

How about this: Inside an embedded blog (where you have control over header/footer and META-Tags) you define an alternate print-stylesheet. This sets all right/leftbars and other unneccessary items to 'display:none'.

When a user now prints a page, he only sees the entry body(ies).

An improved way would be to use the Plugin API to create an event plugin which listens to the 'entry_display' hook and inserts a print button. Similar to the Karma-Vote plugin currently in CVS. This sets a button with javascript to set the active stylesheet to the print one, cals the print dialog and then re-switches to the original stylesheet.

Regards,
Garvin.