Gossamer Forum
Quote Reply
Print Page Script
I'm looking for a cgi script that will display the current page without
the graphics to allow the viewer to print the page. Maybe set to include
a banner ad graphic though.

To be used with Links SQL.

Thanks.

Quote Reply
Re: Print Page Script In reply to
Pretty easy to do....

You can do one of the following option:

1) Add a parameter to your page.cgi links:

Code:

&print=1


Like the following:

Code:

page.cgi?d=&print=1


Then define the print variable in your page.cgi script....

Then use the following tags in your category.html and home.html and other template files than link.html:

Code:

<%ifnot print%>
<%include header.txt%>
<%endif%>


2) You could also hack the build script and SiteHTML.pm module file to include another set of templates that only include text....

Then create links to these "mirrored" text only template pages.

I have the first option working in one of my Links SQL sites:

http://anthrotech.com/...gi?ID=10&print=1

versus

http://anthrotech.com/.../bibdetail.cgi?ID=10

Regards,

Eliot Lee
Quote Reply
Re: Print Page Script In reply to
You can get a print page script (free) at http://willmaster.com/master/pfp/index.shtml

This uses "tag blocks" so you can choose which parts of a page inc graphics etc to display as a printer friendly page.


Quote Reply
Re: Print Page Script In reply to
Good suggestion...but not really a good integrated solution for Links SQL.

Regards,

Eliot Lee
Quote Reply
Re: Print Page Script In reply to
Thanks all.

Considering the options now.

- Eraser.