Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 11:10 am EST
Geeklog Forums
"printable page" option with staticpages?
Status: offline
racooper
Forum User
Junior
Registered: 03/13/04
Posts: 24
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!
Any help would be appreciated! Thanks!
6
10
Quote
Status: offline
jannetta
Forum User
Chatty
Registered: 01/22/03
Posts: 44
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.
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.
6
5
Quote
Status: offline
Robin
Forum User
Full Member
Registered: 02/15/02
Posts: 725
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?
Geeklog Polish Support Team
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?
Geeklog Polish Support Team
10
8
Quote
Fixed
I had to alter this bit
to this
Works like a charm now. Thanx again Jannetta for this one.
Geeklog Polish Support Team
I had to alter this bit
Text Formatted Code
$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
Text Formatted Code
$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.
Geeklog Polish Support Team
8
7
Quote
Status: offline
racooper
Forum User
Junior
Registered: 03/13/04
Posts: 24
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!
15
7
Quote
All times are EST. The time is now 11:10 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content