...
 
Commits (326)
This diff is collapsed.
This module was made by Matt Westgate <drupal at asitis dot org>
and is currently maintained by Karsten Mueller <kmue at mac dot com>.
Some bug fixes by David Kent Norman on Dec 20, 2005 <deekayen at: deekayen {dot} net>
\ No newline at end of file
This module was created by Matt Westgate <drupal at asitis dot org>
Maintained up to version 4.6 by Karsten Mueller <kmue at mac dot com>
Maintained up to version 4.7 by Peter John Hartman <peterjohnhartman at gmail.com>
Some bug fixes by David Kent Norman on Dec 20, 2005 <deekayen at: deekayen {dot} net>
and is currently maintained by Joao Ventura <joao at venturas dot org>.
********************************************************************
D R U P A L M O D U L E
********************************************************************
Name: Print module
Maintainer: Peter John Hartman <peterjohnhartman at gmail.com>
Author: Matt Westgate <drupal at asitis dot org>
********************************************************************
INSTALLATION:
INSTALLATION
------------
1. Place the entire print directory into your Drupal modules/
directory.
Decompress the print-n.x-n.n.tar.gz file into your Drupal modules
directory (usually sites/all/modules, see http://drupal.org/node/176044 for
more information).
2. Enable via:
administer > modules
Enable the print module: Administer > Site building > Modules
(admin/build/modules)
3. Configure via:
administer > settings > print
PDF TOOL
--------
4. To modify the template of printer friendly pages, simply edit the
print.tpl.php file found in this directory.
The print_pdf module requires the use of an external PDF generation tool.
The currently supported tools are dompdf, TCPDF and wkhtmltopdf. Please
note that any errors/bugs in those tools need to be reported and fixed by
their maintainers. DO NOT report bugs in those tools in the print module's
issue queue at Drupal.org.
********************************************************************
PROFILE PRINTING
supported paths:
* print module lib directory (usually sites/all/modules/print/lib)
* libraries directory (sites/all/libraries)
To print any profile page, change any profile URL from:
dompdf support:
The dompdf tool produces results that are more faithful to the HTML
printer-friendly page. Unicode is not supported (only ISO-8859-1).
This tool is not supported and there are several known bugs that result
from its incomplete implementation.
http://www.example.com/profile
1. Download dompdf from http://code.google.com/p/dompdf/downloads/list
2. Extract the contents of the downloaded package into one of the
supported paths.
3. Check if dompdf_config.inc.php fits your installation. In 99% of cases,
no changes are necessary, so just try to use it and only edit anything if
the PDF generation fails.
4. Grant write access to the lib/fonts directory to your webserver user.
5. If you're using dompdf-0.5.1, delete the dompdf.php file as it contains
a security vulnerability
6. If you're using dompdf-0.6 or later, you can try to enable the Unicode
support, but you'll need to add some Unicode fonts. See
http://groups.google.com/group/dompdf/browse_thread/thread/9f7bc0162b04d5cf
for further info on this.
7. Check http://code.google.com/p/dompdf/ for further information.
to
TCPDF support:
TCPDF seems to be more actively developed than dompdf, but it's support
for CSS is considerably worse. Unicode is supported (use of Unicode fonts
result in HUGE files). Page header and footer are supported. This module
requires TCPDF >= 4.0.000.
http://www.example.com/print/profile
1. Download TCPDF from http://sourceforge.net/projects/tcpdf/
2. Extract the contents of the downloaded package into one of the
supported paths. There is no need to modify the config/tcpdf_config.php
file, as the module self-configures TCPDF.
3. Check http://tcpdf.sourceforge.net/ for further information.
********************************************************************
CUSTOMIZATION:
wkhtmltopdf support:
- To print the site logo add this line to print.tpl.php:
<img src="<?php print theme_get_setting('logo'); ?>" alt="logo" border="0" />
1. Download wkhtmltopdf from
http://code.google.com/p/wkhtmltopdf/downloads/list. You can choose to
download the source and compile it or simply download the static binary,
which doesn't require you to complile anything.
2. Place the wkhtmltopdf executable into one of the supported paths.
(usually sites/all/modules/print/lib). You can also place a symbolic link
to the executable.
3. Check http://code.google.com/p/wkhtmltopdf/ for further information.
- Though it is not recommended to open links in a new window you can change
theme_print_link() in print.module if you really want to force it:
UPDATE
------
When updating from a previous version, just remove the print directory and
follow the instructions above. Make sure that you backup any costumization
to the print.tpl.php and print.css files.
ROBOTS
------
Even though it is possible to set per-page robots settings, the following
can be placed in your robots.txt file after the User-agent line to prevent
search engines from even asking for the page:
Disallow: /print/
Also, for updates from older versions (<=4.7.x-1.0 and <=5.x-1.2) which used
node/nnn/print instead of print/nnn, the following lines can prevent
requests from Google for the obsolete print URLs:
Disallow: /*/print$
Note that pattern matching in robots.txt is a Google extension (see
http://www.google.com/support/webmasters/bin/answer.py?answer=40367 for more
information).
function theme_print_link($node) {
$attributes = array("target"=> "_blank", 'title' => t('Display a printer friendly version of this page.'));
$links = l(t('printer friendly version'), "node/$node->nid/print",$attributes );
return $links;
}
\ No newline at end of file
PRINT MODULE
PJH: Peter John Hartman <peterjohnhartman at gmail.com>
M: Karsten Mueller <kmue at mac dot com>
S: fixes/patches
M: Joao Ventura <joao at venturas dot org>
S: maintained
********************************************************************
D R U P A L M O D U L E
********************************************************************
Name: Print module
Maintainer: Peter John Hartman <peterjohnhartman at gmail.com>
Author: Matt Westgate <drupal at asitis dot org>
Last update: (See CHANGELOG.txt for details)
Requires Drupal 4.7
DESCRIPTION
-----------
********************************************************************
DESCRIPTION:
This module allows you to generate the following printer-friendly versions
of any node:
This module allows you to generate printer friendly versions of
any node by navigating to www.example.com/node/nid/print, where nid
is the node id of content to render.
* Web page printer-friendly version (at www.example.com/print/nid)
* PDF version (at www.example.com/printpdf/nid)
* Send by-email (at www.example.com/printmail/nid)
********************************************************************
INSTALLATION:
where nid is the node id of content to render.
see the INSTALL.txt file in this directory.
A link is inserted in the each node (configurable in the content type
settings), that opens a version of the page with no sidebars, search boxes,
navigation pages, etc.
********************************************************************
TODO:
INSTALLATION
------------
- Add ability to optionally attach comments to nodes for printing
by calling comment_render().
Follow the instructions in the provided INSTALL.txt file.
********************************************************************
UPCOMING FEATURES:
CONFIGURATION
-------------
- None planned
- There are several settings that can be configured in the following places:
Administer > Site building > Modules (admin/build/modules)
Enable or disable the module. (default: disabled)
Administer > User management > Access control (admin/user/access)
Under print module:
access print: Enable access to the PF page and display of the PF link in
other pages. (default: disabled)
administer print: Enable access to the module settings page. (default:
disabled)
Administer > Content management > Content types (admin/content/types)
For each content type it is possible to enable or disable the PF link
via the "Show printer-friendly version link" checkbox. (default:
enabled)
It is also possible to enable or disable the PF link in individual
comments via the "Show printer-friendly version link in individual
comments" checkbox. (default: disabled)
Administer > Site configuration > Printer-friendly (admin/settings/print)
This is where all the module-specific configuration options can be set.
- To modify the template of printer friendly pages, simply edit the
print.tpl.php or the css/print.css files.
- It is possible to set per-content-type and/or theme-specific templates
which are searched for in the following order:
1. print_[format].node-[type].tpl.php in the theme directory
2. print_[format].node-[type].tpl.php in the module directory
3. print_[format].tpl.php in the theme directory
4. print_[format].tpl.php in the module directory
5. print.node-[type].tpl.php in the theme directory
6. print.node-[type].tpl.php in the module directory
7. print.tpl.php in the theme directory
8. print.tpl.php in the module directory (supplied by the module)
format is either html, mail or pdf, and type is Drupal's node type (e.g.
page, story, etc.)
API
---
print_insert_link(), print_mail_insert_link(), print_pdf_insert_link()
The *_insert_link functions are available to content developers that prefer
to place the printer-friendly link in a custom location. It is advisable to
disable the regular Printer-friendly link so that it is not shown in both
locations.
Calling the function like this:
print_insert_link()
will return the HTML for a link pointing to a Printer-friendly version of
the current page.
It is also possible to specify the link to the page yourself:
print_insert_link("print/42")
will return the HTML pointing to the printer-friendly version of node 42.
THEMEABLE FUNCTIONS
-------------------
The following themeable functions are defined:
* theme_print_format_link()
* theme_print_mail_format_link()
* theme_print_pdf_format_link()
Returns an array of formatted attributes for the Printer-friendly
link.
* print_pdf_dompdf_footer($html)
Format the dompdf footer contents
* print_pdf_tcpdf_header($pdf, $html, $font)
Format the TCPDF header
* print_pdf_tcpdf_page($pdf)
Format the TCPDF page settings (margins, etc)
* print_pdf_tcpdf_content($pdf, $html, $font)
Format the TCPDF page content
* print_pdf_tcpdf_footer($pdf, $html, $font)
Format the TCPDF footer contents
* print_pdf_tcpdf_footer2($pdf)
Format the TCPDF footer layout
MORE INFORMATION
----------------
For more information, consult the modules' documentation at
http://drupal.org/node/190171.
ACKNOWLEDGMENTS
---------------
The print, pdf and mail icons are copyright Plone Foundation. Thanks for
letting me use them!
body {
margin: 1em;
background-color: #fff;
font-family: sans-serif;
}
th {
text-align: left; /* LTR */
color: #006;
border-bottom: 1px solid #ccc;
}
tr.odd {
background-color: #ddd;
}
tr.even {
background-color: #fff;
}
td {
padding: 5px;
}
#menu {
visibility: hidden;
}
#main {
margin: 1em;
}
a:link {color: #000;}
a:visited {color: #000;}
a:hover {color: #00f;}
a:link img, a:visited img {border: 0;}
.print-footnote {font-size: xx-small;}
img.print-logo {border: 0;}
.print-site_name {}
.print-breadcrumb {font-size: x-small;}
.print-title {}
.print-submitted {font-size: small;}
.print-created {font-size: small;}
.print-taxonomy {
text-align: right;
}
.print-taxonomy li {display: inline;}
.print-content {}
.print-hr {
border: 0;
height: 1px;
width: 100%;
color: #9E9E9E;
background-color: #9E9E9E;
}
.print-message {
border: medium dotted blue;
padding: 1em;
}
.print-source_url {font-size: small;}
.print-links {font-size: small;}
.print-footer {text-align: center;}
.print-link {
/* Use these for links above the content */
display: block;
text-align: right;
padding-bottom: 0.5em;
/* Use these for links in a corner of the content */
/*
position:relative;
bottom: 0.5em;
float:right;
*/
}
div#block-print-0 span {
display: block;
}
.print_html, .print_mail, .print_pdf {
margin-left: 1em;
}
.print-syslink {
margin-right: 1em;
}
img.print-icon {
vertical-align: middle;
}
img.print-icon-margin {
padding-right: 4px;
}
label.printmail-label {
width: 175px;
float: left;
}
This directory should be used to place the downloaded external libs used by
the print module (such as TCPDF, dompdf, etc.).
# Catalan translation of Drupal (print.module)
# Generated from file: print.module,v 1.5 2005/01/26 13:02:05 km
# Markus Petrux <nospam@phpmix.com>, 2005.
#
msgid ""
msgstr ""
"Project-Id-Version: ca\n"
"POT-Creation-Date: 2005-11-14 17:34-0300\n"
"PO-Revision-Date: 2005-11-14 02:39+0200\n"
"Last-Translator: Markus Petrux <nospam@phpmix.com>\n"
"Language-Team: Catala\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: print.module:14
msgid "Allows users to create printer-friendly pages for nodes."
msgstr "Permet generar una versió de pàgina especial per a imprimir nodes."
#: print.module:28
msgid "printer friendly"
msgstr "versió per a imprimir"
#: print.module:58
msgid "Stylesheet URL"
msgstr "URL de l'estil (CSS)"
#: print.module:58
msgid "The URL to your print cascading stylesheet."
msgstr "URL de l'estil (CSS) especial per impresora."
#: print.module:60
msgid "Printer friendly URLs"
msgstr "URLs per la versió per a imprimir"
#: print.module:61
msgid "Print page elements"
msgstr "Imprimir elements de pàgina"
#: print.module:62
msgid "Printer friendly page link"
msgstr "enllaç a la versió per a imprimir"
#: print.module:62
msgid "Disabled"
msgstr "Desactivat"
#: print.module:62
msgid "Enabled"
msgstr "Activat"
#: print.module:62
msgid ""
"Enable or disable the 'printer friendly page' link for each node. Even if "
"the link is disabled, you can still view the print version of a node by "
"going to 'node/nid/print' where nid is the numeric id of the node."
msgstr "Activar o desactivar l'enllaç a la versió per a imprimir de cada node. Encara que "
"l'enllaç estigui desactivat, es pot veure la versió per a imprimir d'un node "
"visitant l'adreça 'node/nid/print', on nid s l'identificador del node."
#: print.module:149
msgid "printer friendly version"
msgstr "versió per a imprimir"
#: print.module:149
msgid "Display a printer friendly version of this page."
msgstr "Visualitzar versió per a imprimir d'aquesta pàgina."
#: print.module:0
msgid "print"
msgstr "imprimir"
#: print.tpl.php:17
msgid "Published on"
msgstr "Publicat el"
#: print.tpl.php:25
msgid "By"
msgstr "per"
#: print.tpl.php:29
msgid "Created"
msgstr "Creat"
#: print.tpl.php:39
msgid "Source URL:"
msgstr "URL:"
#: print.tpl.php:44
msgid "Links:"
msgstr "Enllaços:"
# Czech translation of Drupal (print.module)
# Generated from file: print.module,v 1.5 2005/01/26 13:02:05 km
#
# Whit <whit@drupal-cz.info>, 2006.
msgid ""
msgstr ""
"Project-Id-Version: de\n"
"POT-Creation-Date: 2005-06-01 17:34-0300\n"
"PO-Revision-Date: 2006-05-10 20:19+0200\n"
"Last-Translator: Whit <whit@drupal-cz.info>\n"
"Language-Team: Czech <cs@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: KBabel 1.11.2\n"
#: print.module:14
msgid "Allows users to create printer-friendly pages for nodes."
msgstr "Dovoluje uživatelům vytvářet tiskové stránky pro jednotlivé uzly."
#: print.module:28
msgid "printer friendly"
msgstr "verze pro tisk"
#: print.module:58
msgid "Stylesheet URL"
msgstr "URL kaskádového stylu"
#: print.module:58
msgid "The URL to your print cascading stylesheet."
msgstr "URL odkazující na váš kaskádový styl pro tisk."
#: print.module:60
msgid "Printer friendly URLs"
msgstr "Adresa verze pro tisk"
#: print.module:61
msgid "Print page elements"
msgstr "Tisknout části stránky"
#: print.module:62
msgid "Printer friendly page link"
msgstr "Odkaz na verzi pro tisk"
#: print.module:62
msgid "Disabled"
msgstr "Neaktivní"
#: print.module:62
msgid "Enabled"
msgstr "Aktivní"
#: print.module:62
msgid ""
"Enable or disable the 'printer friendly page' link for each node. Even if "
"the link is disabled, you can still view the print version of a node by "
"going to 'node/nid/print' where nid is the numeric id of the node."
msgstr "Aktivuje či deaktivuje verzi pro tisk pro každý uzel. I pokud je odkaz neaktivní, stále můžeš zobrazit verzi pro tisk zadáním adresy <code>node/nid/print</code> kde <code>nid</code> je číselné ID uzlu."
#: print.module:149
msgid "printer friendly version"
msgstr "verze pro tisk"
#: print.module:149
msgid "Display a printer friendly version of this page."
msgstr "Zobrazit tiskovou verzi stránky."
#: print.module:0
msgid "print"
msgstr "tisk"
#: print.tpl.php:17
msgid "Published on"
msgstr "Publikováno z:"
#: print.tpl.php:25
msgid "By"
msgstr "od:"
#: print.tpl.php:29
msgid "Created"
msgstr "Vytvořeno:"
#: print.tpl.php:39
msgid "Source URL:"
msgstr "Zdrojové URL:"
#: print.tpl.php:44
msgid "Links:"
msgstr "Odkazy:"
# Translation of de.po to German
# German translation of Drupal (print.module)
# Generated from file: print.module,v 1.5 2005/01/26 13:02:05 km
# Uwe Hermann <uwe@hermann-uwe.de>, 2005.
#
msgid ""
msgstr ""
"Project-Id-Version: de\n"
"POT-Creation-Date: 2005-06-01 17:34-0300\n"
"PO-Revision-Date: 2005-08-24 02:38+0200\n"
"Last-Translator: Uwe Hermann <uwe@hermann-uwe.de>\n"
"Language-Team: German\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: KBabel 1.9.1\n"
#: print.module:14
msgid "Allows users to create printer-friendly pages for nodes."
msgstr "Erzeugt druckerfreundliche Versionen von Seiten."
#: print.module:28
msgid "printer friendly"
msgstr "Druckversion"
#: print.module:58
msgid "Stylesheet URL"
msgstr "Stylesheet URL"
#: print.module:58
msgid "The URL to your print cascading stylesheet."
msgstr "URL zur Drucker-Stylesheet-Datei."
#: print.module:60
msgid "Printer friendly URLs"
msgstr "Druckerfreundliche URLs"
#: print.module:61
msgid "Print page elements"
msgstr "Zeige Seitenelemente"
#: print.module:62
msgid "Printer friendly page link"
msgstr "Link zur Druckversion"
#: print.module:62
msgid "Disabled"
msgstr "Deaktiviert"
#: print.module:62
msgid "Enabled"
msgstr "Aktiviert"
#: print.module:62
msgid ""
"Enable or disable the 'printer friendly page' link for each node. Even if "
"the link is disabled, you can still view the print version of a node by "
"going to 'node/nid/print' where nid is the numeric id of the node."
msgstr "Aktiviert oder deaktiviert den \"Druckversion\" Link für jede Seite. Sogar wenn der Link deaktiviert ist, kann man immer noch die Druckversion einer Seite betrachten, in dem man \"node/nid/print\" besucht, wobei nid die numerische ID der Seite ist."
#: print.module:149
msgid "printer friendly version"
msgstr "Druckversion"
#: print.module:149
msgid "Display a printer friendly version of this page."
msgstr "Zeige eine druckerfreundliche Version dieser Seite."
#: print.module:0
msgid "print"
msgstr "Drucken"
#: print.tpl.php:17
msgid "Published on"
msgstr "Veröffentlicht auf"
#: print.tpl.php:25
msgid "By"
msgstr "von"
#: print.tpl.php:29
msgid "Created"
msgstr "Erstellt"
#: print.tpl.php:39
msgid "Source URL:"
msgstr "URL:"
#: print.tpl.php:44
msgid "Links:"
msgstr "Links:"
# Spanish translation of Drupal (print.module)
# Generated from file: print.module,v 1.5 2005/01/26 13:02:05 km
# Markus Petrux <nospam@phpmix.com>, 2005.
#
msgid ""
msgstr ""
"Project-Id-Version: es\n"
"POT-Creation-Date: 2005-11-14 17:34-0300\n"
"PO-Revision-Date: 2005-11-14 02:39+0200\n"
"Last-Translator: Markus Petrux <nospam@phpmix.com>\n"
"Language-Team: Spanish\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: print.module:14
msgid "Allows users to create printer-friendly pages for nodes."
msgstr "Permite generar una versión de página especial para imprimir nodos."
#: print.module:28
msgid "printer friendly"
msgstr "versión para imprimir"
#: print.module:58
msgid "Stylesheet URL"
msgstr "URL del estilo (CSS)"
#: print.module:58
msgid "The URL to your print cascading stylesheet."
msgstr "URL del estilo (CSS) especial para impresora."
#: print.module:60
msgid "Printer friendly URLs"
msgstr "URLs de la versión para imprimir"
#: print.module:61
msgid "Print page elements"
msgstr "Imprimir elementos de página"
#: print.module:62
msgid "Printer friendly page link"
msgstr "Enlace de la versión para impresora"
#: print.module:62
msgid "Disabled"
msgstr "Desactivado"
#: print.module:62
msgid "Enabled"
msgstr "Activado"
#: print.module:62
msgid ""
"Enable or disable the 'printer friendly page' link for each node. Even if "
"the link is disabled, you can still view the print version of a node by "
"going to 'node/nid/print' where nid is the numeric id of the node."
msgstr "Activar o desactivar el enlace a la versión para impresora de cada nodo. Aunque "
"el enlace esté desactivado, se puede ver la versión para imprimir de un nodo "
"visitando la dirección 'node/nid/print', donde nid es el identificador del nodo."
#: print.module:149
msgid "printer friendly version"
msgstr "versión para impresora"
#: print.module:149
msgid "Display a printer friendly version of this page."
msgstr "Visualizar versión para impresora de esta página."
#: print.module:0
msgid "print"
msgstr "imprimir"
#: print.tpl.php:17
msgid "Published on"
msgstr "Publicado en"
#: print.tpl.php:25
msgid "By"
msgstr "por"
#: print.tpl.php:29
msgid "Created"
msgstr "Creado"
#: print.tpl.php:39
msgid "Source URL:"
msgstr "URL:"
#: print.tpl.php:44
msgid "Links:"
msgstr "Enlaces:"
# French Translation of Drupal
# $Id$
#
msgid ""
msgstr ""
"Project-Id-Version: print.module\n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2006-10-23 15:56+0100\n"
"Last-Translator: Ronan LE LOC'H <rondev@free.fr>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Country: FRANCE\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: modules/print/print.module:19
msgid "Allows users to create printer-friendly pages for nodes and profile pages."
msgstr "Autoriser les utilisateurs à créer des versions imprimables pour les noeuds et les pages de profil."
#: modules/print/print.module:30
#: ;34
msgid "printer friendly"
msgstr "version imprimable"
#: modules/print/print.module:66
msgid "Printer friendly page link"
msgstr "Lien de la version imprimable de la page"
#: modules/print/print.module:69
msgid "Enable or disable the printer friendly page link for each node. Even if the link is disabled, you can still view the print version of a node by going to node/nid/print where nid is the numeric id of the node."
msgstr "Active ou désactive le lien 'version imprimable' pour chaque noeud. Même si le lien est désactivé, vous pouvez toujours voir la version imprimable du noeud en allant à 'node/nid/print' où nid est l'id numérique du noeud."
#: modules/print/print.module:76
msgid "Print settings"
msgstr "Paramètres de Print"
#: modules/print/print.module:82
msgid "Logo URL"
msgstr "URL du logo"
#: modules/print/print.module:86
msgid "An alternative logo to display on the printer friendly version"
msgstr "Logo alternatif à afficher sur la version imprimable"
#: modules/print/print.module:91
msgid "Stylesheet URL"
msgstr "Stylesheet URL"
#: modules/print/print.module:95
msgid "The URL to your print cascading stylesheet."
msgstr "URL vers votre feuille de style pour version imprimable"
#: modules/print/print.module:100
msgid "Printer friendly URLs"
msgstr "URLs des versions imprimable"
#: modules/print/print.module:109
msgid "Robots META tags"
msgstr "META tags de robots"
#: modules/print/print.module:115
msgid "Add noindex"
msgstr "Ajouter noindex"
#: modules/print/print.module:118
msgid "Instruct robots to not index printer friendly pages"
msgstr "Ordonner aux robots de ne pas indexer les versions imprimables"
#: modules/print/print.module:123
msgid "Add nofollow"
msgstr "Ajouter nofollow"
#: modules/print/print.module:126
msgid "Instruct robots to not follow outgoing links on printer friendly pages"
msgstr "Ordonner aux robots de ne pas suivre les liens inclus dans les versions imprimables"
#: modules/print/print.module:131
msgid "Add noarchive"
msgstr "Ajouter noarchive"
#: modules/print/print.module:134
msgid "Non-standard tag to instruct search engines to not show a \"Cached\" link for your printer friendly pages. Recognized by Googlebot."
msgstr "Tag non-standard pour ordonner aux moteurs de recherche de ne pas montrer un lien mis en cache pour les versions imprimables. Reconnu par Googlebot."
#: modules/print/print.module:139
msgid "Add nocache"
msgstr "Ajouter nocache"
#: modules/print/print.module:142
msgid "Non-standard tag to instruct search engines to not show a \"Cached\" link for your printer friendly pages"
msgstr "Tag non-standard pour ordonner aux moteurs de recherche de ne pas montrer un lien mis en cache pour les versions imprimables."
#: modules/print/print.module:380
msgid "Display a printer friendly version of this page."
msgstr "Affiche une version imprimable de cette page"
#: modules/print/print.module:381
msgid "printer friendly version"
msgstr "version imprimable"
#: modules/print/print.module:0
msgid "print"
msgstr "imprimer"
# translation of print-module.po to Nederlands
# LANGUAGE translation of Drupal (print.module)
# $Id$
# Copyright YEAR NAME <EMAIL@ADDRESS>.
# Hendrik Eeckhaut <Hendrik.Eeckhaut@UGent.be>, 2004.
#
msgid ""
msgstr ""
"Project-Id-Version: print-module\n"
"POT-Creation-Date: 2004-11-11 14:13+0100\n"
"PO-Revision-Date: 2004-11-11 14:20+0100\n"
"Last-Translator: Hendrik Eeckhaut <Hendrik.Eeckhaut@UGent.be>\n"
"Language-Team: Nederlands <nl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: KBabel 1.9.1\n"
#: print.module:14
msgid "Allows users to create printer-friendly pages for nodes."
msgstr "Laat gebruikers toe om printervriendelijke pagina's te maken van nodes."
#: print.module:28;145
msgid "printer friendly page"
msgstr "Printervriendelijke pagina"
#: print.module:54
msgid "Stylesheet URL"
msgstr "URL-adres stijlbestand"
#: print.module:54
msgid "The URL to your print cascading stylesheet."
msgstr "Het URL-aders van uw print-stijlbestand (css: cascading stylesheet)."
#: print.module:56
msgid "Printer friendly URLs"
msgstr "Printervriendelijke URL-adressen"
#: print.module:57
msgid "Print page elements"
msgstr "Print pagina elementen"
#: print.module:58
msgid "Printer friendly page link"
msgstr "Printervriendelijke pagina-links"
#: print.module:58
msgid "Disabled"
msgstr "Uitgeschakeld"
#: print.module:58
msgid "Enabled"
msgstr "Ingeschakeld"
#: print.module:58
msgid "Enable or disable the 'printer friendly page' link for each node. Even if the link is disabled, you can still view the print version of a node by going to 'node/nid/print' where nid is the numeric id of the node."
msgstr "Schakelt de 'printervriendelijke pagina'-link in of uit voor elke node. Zelfs indien een link uitgeschakeld is, kan u nog steeds een printervriendelijke versie te zien krijgen door naar 'node/nid/print' te gaan; waarbij nid de nummer id is van de node."
#: print.module:0
msgid "print"
msgstr "printen"
# LANGUAGE translation of Drupal (print.module)
# Copyright YEAR NAME <EMAIL@ADDRESS>
# Generated from file: print.module,v 1.5 2005/01/26 13:02:05 km
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"POT-Creation-Date: 2005-06-01 17:34-0300\n"
"PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n"
"Last-Translator: NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
#: print.module:14
msgid "Allows users to create printer-friendly pages for nodes."
msgstr ""
#: print.module:28
msgid "printer friendly"
msgstr ""
#: print.module:58
msgid "Stylesheet URL"
msgstr ""
#: print.module:58
msgid "The URL to your print cascading stylesheet."
msgstr ""
#: print.module:60
msgid "Printer friendly URLs"
msgstr ""
#: print.module:61
msgid "Print page elements"
msgstr ""
#: print.module:62
msgid "Printer friendly page link"
msgstr ""
#: print.module:62
msgid "Disabled"
msgstr ""
#: print.module:62
msgid "Enabled"
msgstr ""
#: print.module:62
msgid "Enable or disable the 'printer friendly page' link for each node. Even if the link is disabled, you can still view the print version of a node by going to 'node/nid/print' where nid is the numeric id of the node."
msgstr ""
#: print.module:149
msgid "printer friendly version"
msgstr ""
#: print.module:149
msgid "Display a printer friendly version of this page."
msgstr ""
#: print.module:0
msgid "print"
msgstr ""
#: print.tpl.php:17
msgid "Published on"
msgstr ""
#: print.tpl.php:25
msgid "By"
msgstr ""
#: print.tpl.php:29
msgid "Created"
msgstr ""
#: print.tpl.php:39
msgid "Source URL:"
msgstr ""
#: print.tpl.php:44
msgid "Links:"
msgstr ""
\ No newline at end of file
# Brazilian Portuguese Translation of Drupal
# Copyright (c) 2005 Henrique Recidive <recidive@gmail.com>
# $Id$
#
msgid ""
msgstr ""
"Project-Id-Version: Drupal 4.6\n"
"POT-Creation-Date: 2005-04-15 17:59+0000\n"
"PO-Revision-Date: 2005-06-01 17:36-0300\n"
"Last-Translator: Henrique Recidive Gonçalves <henrique@recidive.com>\n"
"Language-Team: SacraHome.net <sacrahome@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Poedit-Language: Portuguese\n"
"X-Poedit-Country: BRAZIL\n"
#: print.module:14
msgid "Allows users to create printer-friendly pages for nodes."
msgstr "Permite que os usuários criem versões para imprimir."
#: print.module:28
msgid "printer friendly"
msgstr "versão para imprimir"
#: print.module:58
msgid "Stylesheet URL"
msgstr "URL da folha de estilos."
#: print.module:58
msgid "The URL to your print cascading stylesheet."
msgstr "A URL para sua folha de estilos para impressão."
#: print.module:60
msgid "Printer friendly URLs"
msgstr "Imprimir URLs dos links"
#: print.module:61
msgid "Print page elements"
msgstr "Imprimir elementos da página"
#: print.module:62
msgid "Printer friendly page link"
msgstr "Link para a página de versão para imprimir"
#: print.module:62
msgid "Disabled"
msgstr "Desativado"
#: print.module:62
msgid "Enabled"
msgstr "Ativado"
#: print.module:62
msgid "Enable or disable the 'printer friendly page' link for each node. Even if the link is disabled, you can still view the print version of a node by going to 'node/nid/print' where nid is the numeric id of the node."
msgstr "Habilita ou desabilita o link 'versão para imprimir' para cada nódulo. Mesmo que o link estiver desabilitado você poderá acessar a versão para imprimir em 'node/nid/print' onde nid é o identificador numérico para o objeto."
#: print.module:149
msgid "printer friendly version"
msgstr "versão para imprimir"
#: print.module:149
msgid "Display a printer friendly version of this page."
msgstr "Mostra uma versão desta página para imprimir."
#: print.module:0
msgid "print"
msgstr "imprimir"
#: print.tpl.php:17
msgid "Published on"
msgstr "Publicado em"
#: print.tpl.php:25
msgid "By"
msgstr "Por"
#: print.tpl.php:29
msgid "Created"
msgstr "Criado em"
#: print.tpl.php:39
msgid "Source URL:"
msgstr "Fonte:"
#: print.tpl.php:44
msgid "Links:"
msgstr "Links:"
This diff is collapsed.
; $Id$
name = "Printer-friendly pages"
description = "Allows users to create printer-friendly pages for nodes and profile pages."
description = "Adds a printer-friendly version link to content and administrative pages."
package = "Printer, e-mail and PDF versions"
This diff is collapsed.
This diff is collapsed.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $node->language; ?>" xml:lang="<?php print $node->language; ?>">
<head>
<title><?php print $node->title; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php print $robots_meta; ?>
<base href="<?php print $base_url ?>/" />
<style type="text/css">
@import url(<?php print $node->printcss; ?>);
</style>
</head>
<body>
<?php $node->logo ? print '<img src="'.$node->logo.'" alt="logo" border="0" />' : '';?>
<div class="source_url">
<?php variable_get('site_name', 0) && print t('Published on').' '.variable_get('site_name', 0).' ('.l($base_url, $base_url).')'; ?>
</div>
<h2 class="title">
<?php print $node->title; ?>
</h2>
<div class="submitted">
<?php print theme_get_setting("toggle_node_info_$node->type") ? t('By').' '.$node->name : ''; ?>
</div>
<div class="created">
<?php print theme_get_setting("toggle_node_info_$node->type") ? t('Created').' '.format_date($node->created, 'small') : '' ?>
</div>
<div class="content">
<?php print $node->body; ?>
</div>
<hr size="1" noshade />
<div class="source_url">
<?php print '<strong>'.t('Source URL:').'</strong><br /><a href="'.$node->source_url.'">'.$node->source_url.'</a>'?>
</div>
<div class="pfp-links">
<!-- Output printer friendly links -->
<?php $node->pfp_links ? print '<p class="links"><strong>'.t('Links:').'</strong><br />'.$node->pfp_links.'</p>' : ''; ?>
</div>
<div class="footer">
<!-- Add your custom footer here. -->
</div>
</body>
</html>
This diff is collapsed.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $language; ?>" xml:lang="<?php print $language; ?>">
<head>
<title><?php print strip_tags($title); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php print $robots_meta; ?>
<base href="<?php print $base_url ?>/" />
<style type="text/css">
@import url(<?php print $node->printcss; ?>);
</style>
</head>
<body>
<?php theme_get_setting('logo') ? print '<img src="'.theme_get_setting('logo').'" alt="logo" border="0" />' : '';?>
<div class="source_url">
<?php variable_get('site_name', 0) && print t('Published from').' '.variable_get('site_name', 0).' ('.l($base_url,'').')'; ?>
</div>
<h2 class="title"><?php print $title; ?></h2>
<div class="content"><?php print $output; ?></div>
<hr size="1" noshade="noshade" />
<div class="source_url">
<?php print '<strong>'.t('Source URL:').'</strong> <a href="'.$source_url.'>">'.$source_url.'</a>'?>
</div>
<div class="date-printed">
<?php print '<strong>'.t('This page was printed on %date and is updated often.', array('%date' => format_date(time()))). '</strong>'; ?>
</div>
<div class="pfp-links">
<!-- Output printer friendly links -->
<?php $node->pfp_links ? print '<p class="links"><strong>'.t('Links:').'</strong><br />'.$node->pfp_links.'</p>' : ''; ?>
</div>
<div class="footer">
</div>
</body>
</html>
\ No newline at end of file
<?php
/**
* @file
* Default print module template
*
* @ingroup print
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $print['language']; ?>" xml:lang="<?php print $print['language']; ?>">
<head>
<?php print $print['head']; ?>
<?php print $print['base_href']; ?>
<title><?php print $print['title']; ?></title>
<?php print $print['scripts']; ?>
<?php print $print['sendtoprinter']; ?>
<?php print $print['robots_meta']; ?>
<?php print $print['favicon']; ?>
<?php print $print['css']; ?>
</head>
<body>
<?php if (!empty($print['message'])) {
print '<div class="print-message">'. $print['message'] .'</div><p />';
} ?>
<div class="print-logo"><?php print $print['logo']; ?></div>
<div class="print-site_name"><?php print $print['site_name']; ?></div>
<p />
<div class="print-breadcrumb"><?php print $print['breadcrumb']; ?></div>
<hr class="print-hr" />
<h1 class="print-title"><?php print $print['title']; ?></h1>
<div class="print-submitted"><?php print $print['submitted']; ?></div>
<div class="print-created"><?php print $print['created']; ?></div>
<div class="print-content"><?php print $print['content']; ?></div>
<div class="print-taxonomy"><?php print $print['taxonomy']; ?></div>
<div class="print-footer"><?php print $print['footer_message']; ?></div>
<hr class="print-hr" />
<div class="print-source_url"><?php print $print['source_url']; ?></div>
<div class="print-links"><?php print $print['pfp_links']; ?></div>
</body>
</html>
This diff is collapsed.
This diff is collapsed.
name = "Send by e-mail"
description = "Provides the capability to send the web page by e-mail"
dependencies = print
package = "Printer, e-mail and PDF versions"
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?php
/**
* @file
* Extend the TCPDF class to be able to customize the Footer
*
* This file is included by the _print_pdf_tcpdf function
*
* @ingroup print
*/
class PrintTCPDF extends TCPDF {
public $footer;
//Page footer data
public function SetFooterData($arg = '') {
$this->footer = $arg;
}
//Page footer
public function Footer() {
theme('print_pdf_tcpdf_footer2', $this);
}
}
<?php
/**
* @file
* Extend the TCPDF class to be able to customize the Footer (PHP4 version)
*
* This file is included by the _print_pdf_tcpdf function when the current
* PHP_VERSION is less than 5.0.0
*
* @ingroup print
*/
class PrintTCPDF extends TCPDF {
var $footer;
//Page footer data
function SetFooterData($arg = '') {
$this->footer = $arg;
}
//Page footer
function Footer() {
$this = theme('print_pdf_tcpdf_footer2', $this);
}
}
name = "PDF version"
description = "Adds the capability to export pages as PDF."
dependencies = print
package = "Printer, e-mail and PDF versions"
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?php
/**
* @file
* print module simpletest tests
*
* This file includes the defined tests for the print module.
*
* @ingroup print
*/
class PrintBasicTest extends DrupalTestCase {
protected $web_user;
protected $getq;
/**
* Implementation of getInfo().
*/
function get_info() {
return array(
'name' => t('Printer, e-mail and PDF versions tests'),
'description' => t('Unit tests for the print, print_mail and print_pdf modules.'),
'group' => 'Printer, e-mail and PDF versions',
);
}
/**
* Implementation of setUp().
*/
function setUp() {
parent::setUp();
// User to set up print.
// $this->web_user = $this->drupalCreateUserRolePerm(array('administer print'));
// $this->drupalGet('logout');
// $this->drupalLoginUser($this->web_user);
$this->getq = $_GET['q'];
$_GET['q'] = 'print/'. $_GET['q'];
}
/**
* Implementation of tearDown().
*/
function tearDown() {
$_GET['q'] = $this->getq;
parent::tearDown();
}
function testPrintRewriteUrls() {
global $base_url, $base_root, $_print_urls;
//Must require it, since this function gets called via Drupal's dynamic loading
require_once(drupal_get_path('module', 'print') .'/print.pages.inc');
$_print_urls = TRUE;
$pattern = '!<(a\s[^>]*?)>(.*?)(</a>)!is';
$footnote = ' <span class="print-footnote">[1]</span>';
$part1 = '<a class=\'class1 class2\' target=_blank hreflang="en" id="some complicated \"href=lala.com\" text" href="';
$part2 = '">Example</a>';
$url[0] = 'http://www.example.com';
$url[1] = '#here';
$url[2] = '/relative/to/host';
$url[3] = 'relative/to/base';
$url[4] = 'index.php?q=sample/path';
$rel_url[0] = $url[0];
$rel_url[1] = base_path() . $_GET['q'] . $url[1];
$rel_url[2] = $base_root . $url[2];
$rel_url[3] = $base_url .'/'. $url[3];
$rel_url[4] = $base_url .'/'. $url[4];
$abs_url[0] = $url[0];
$abs_url[1] = $base_url .'/'. $this->getq . $url[1];
$abs_url[2] = $base_root . $url[2];
$abs_url[3] = $base_url .'/'. $url[3];
$abs_url[4] = $base_url .'/'. $url[4];
$url[5] = '#here with spaces';
$url[6] = '/relative/to/host with spaces';
$url[7] = 'relative/to/base with spaces';
$url[8] = 'index.php?q=sample/path with spaces';
$rel_url[5] = base_path() . $_GET['q'] . $url[5];
$rel_url[6] = $base_root . $url[6];
$rel_url[7] = $base_url .'/'. $url[7];
$rel_url[8] = $base_url .'/'. $url[8];
$abs_url[5] = $base_url .'/'. $this->getq . $url[5];
$abs_url[6] = $base_root . $url[6];
$abs_url[7] = $base_url .'/'. $url[7];
$abs_url[8] = $base_url .'/'. $url[8];
$url[9] = '&#109;&#97;&#x69;&#x6c;&#x74;&#111;&#58;&#115;&#x75;&#x70;p&#111;&#114;&#x74;&#x40;e&#120;&#97;&#x6d;&#x70;&#x6c;&#101;&#46;&#x63;&#x6f;&#x6d;';
$rel_url[9] = $url[9];
$abs_url[9] = $url[9];
$size = count($url);
for ($i = 0; $i < $size; $i++) {
preg_match($pattern, $part1 . $url[$i] . $part2, $matches);
$ret = _print_rewrite_urls($matches);
$urls = _print_friendly_urls();
$this->assertEqual($ret, $part1 . $rel_url[$i] . $part2 . $footnote, t('Original URL (!url)', array('!url' => $rel_url[$i])));
$this->assertEqual($urls[0], $abs_url[$i], t('Absolute URL (!url)', array('!url' => $abs_url[$i])));
}
}
}