With this plugin you can add a “printer friendly version” link at the end of your posts.
-
Upload all the files to your plugins directory.
Install the plugin and edit the options. Be _SURE_ to set to use the correct
template to display the
item
Put <%Print%> somewhere in your
template.
Files at NP_Print.zip:
NP_Print.php: this file calls the plugin from the
template.
/print/print.php: the main plugin file.
/print/print.css: defines the layout of the printer friendly webpage itself.
/print/print2.css: stylesheet with special instructions to the printed page - this file removes the box with the print link and the font selector from the printed page.
/print/easydynfont.js: javascript file for the font selector box (optional).
/print/header.inc: header file (optional).
/print/footer.inc: footer file (optional).
You can have an image link, instead of text. Just replace the “Printer friendly version” text by an img tag in the plugin options.
Remember to choose a proper
template in the plugin options. All styles used in the
template must be defined in print.css - but beware: defining fonts in print.css classes can make the font selector be stuck with static definitions.
For people who want a special layout for the printer friendly page, I suggest to use a special
template for this plugin. I use the same
template in NP_Print and NP_MailToAFriend. Start duplicating your detailed
template and call it “print”. Change your
item layout in the “print”
template (define new stylesheet classes in print.css and use them) and then choose the new
template in the plugin options. But beware: defining fonts in print.css classes can make the font selector be stuck with static definitions.
The only stylesheets called by the plugin are: #menu (for the toolbox), .printitem (for the main
item) and .copyright (for the copyright box).
You don't need to change anything in print2.css, since the only purpose of this file is to remove the toolbox from the printed page;
Leave header and footer options blank if you don't want to include the files. The plugin won't call them if the options are blank, so you can delete it;
If you decide not to use the font selector, you can also delete easydynfont.js;
I don't know if the font selector works in every browser. Is the page printed correctly, with the selected font and font size? In IE 6.0 it works fine. Has anybody already tested it with other browsers?
If you have problems with this plugin, please drop some words here at the Nucleus forum.
Can you help us with this?
warn when the plugin try to access an
item that doesn't exist;
-
v.0.1 (02-26-2003 ): initial version;
v.0.2 (02-27-2003): added a cool font selector in the printer version page; added personalized messages in plugin options;
v.0.5 (03-01-2003): corrected an error at the “click here to print” javascript link (it wasn't opening the print dialog box. duh!);
v. 0.6 (03-02-2003): code cleaning: NP_MailToAFriend useless code was removed;
v. 0.8 (03-02-2003): font selector can be disabled in options; “smaller” and “bigger” buttons used in the font selector can now be translated in options; added copyright notice (verbal jam's suggestion); styleeshet changes: “Mailfrienditem” stylesheet class was renamed to “printitem”; added copyright stylesheet class; default.css call was removed (font selector doesn't work properly with static font definitions); other minor layout changes;
v. 0.9 (03-03-2003): added option for opening the printer friendly version in the same window; added header and footer files (optional); removed the copyright option (footer file can do this job); removed javascript call from the body tag if the font selector is disabled;
v. 1.0 (09-26-2004): added support for table prefix;
v. 1.0a (10-8-2004, admun): fixed incorrect sql_table
NP_Print version 1.0 works with Nucleus CMS 3.31 - 2007-10-29 admun