Posted on: 05/05/04 01:58pm
By: racooper
Is there a hack or other information available to give a "print this page" link for a staticpage? I have a static page that I would like to have available a "print this" format without the side blocks, just like a story.
Any help would be appreciated! Thanks!
"printable page" option with staticpages?
Posted on: 05/27/04 04:28am
By: geKow
...this is a good question, I would be interested in this as well
geKow
"printable page" option with staticpages?
Posted on: 05/27/04 12:42pm
By: jannetta
I noticed a few people would like a print option for static pages, but one hasn't been made available. So I amended the current staticpages plugin to allow for a print option. I have implemented it on my homepage at http://www.jannetta.com and if you would like to use it, you can download it from http://www.jannetta.com/staticprint.zip.
This zip contains a replacement for the existing staticpages/index.php file, a print.gif image and a template file that should go into your theme directory under a new sub-directory called static.
So, extract this zip in the root directory of your geeklog installation, ie the directory above public_html. This will overwrite public_html/staticpages/index.php. It will place print.gif in public_html/staticpages/images. It will create a directory public_html/layout/Blackboard/static/staticprint.thtml. Create a sub-directory called static in your own layout directory and move staticprint.thtml into it.
I have tested this with url rewrite on and off and it seems to work. I won't call it a thorough test, so any comments/feedback would be welcome.
I hope this is of use to someone else.
"printable page" option with staticpages?
Posted on: 06/09/04 05:50am
By: Robin
Hi
First of all thanks for the hack.
I've been experiencing some troubles with it.
1. With url_rewrite on it works however the print icon is not visible.
2. With url_rewrite off it doesn't (i.e. the print link shows duplicated entries and there is an error: access denied) and the print icon is visible.
Any insights how to fix this?
"printable page" option with staticpages?
Posted on: 06/09/04 04:43pm
By: Robin
Fixed
I had to alter this bit
$title = stripslashes ($A['sp_title']) . ' ' . '<a href="'.$_SERVER['REQUEST_URI'].$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'].'&mode=print'.'"><img src="images/print.gif" border=0></a>';
to this
$title = stripslashes ($A['sp_title']) . ' ' . '<a href="'.$_SERVER['REQUEST_URI'].''.'&mode=print'.'"><img src="images/print.gif" border=0></a>';
Works like a charm now. Thanx again Jannetta for this one.
"printable page" option with staticpages?
Posted on: 06/12/04 01:46am
By: racooper
Finally had time to test jannetta's mod. Works great, but it might be noted that you must have "Wrap Static Page in a block" checked in the Static Page Editor. Once I figured that out, no problems at all! Thanks a lot!