...
 
Commits (148)
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 and TCPDF. 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
dompdf support:
The dompdf tool produces results that are more faithful to the HTML
printer-friendly page.
To print any profile page, change any profile URL from:
1. Download dompdf from http://sourceforge.net/projects/dompdf/
2. Extract the contents of the downloaded package into the print module
directory (usually sites/all/modules/print)
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. Check http://www.digitaljunkies.ca/dompdf/ for further information.
http://www.example.com/profile
TCPDF support:
TCPDF seems to be more actively developed than dompdf, but it's support
for CSS is considerably worse. This module requires TCPDF >= 4.0.000.
to
1. Download TCPDF from http://sourceforge.net/projects/tcpdf/
2. Extract the contents of the downloaded package into the print module
directory (usually sites/all/modules/print). 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.
http://www.example.com/print/profile
UPDATE
------
********************************************************************
CUSTOMIZATION:
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.
- To print the site logo add this line to print.tpl.php:
<img src="<?php print theme_get_setting('logo'); ?>" alt="logo" border="0" />
ROBOTS
------
- 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:
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:
CONFIGURATION
-------------
- Add ability to optionally attach comments to nodes for printing
by calling comment_render().
- There are several settings that can be configured in the following places:
********************************************************************
UPCOMING FEATURES:
Administer > Site building > Modules (admin/build/modules)
Enable or disable the module. (default: disabled)
- None planned
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)
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.
* theme_print_text()
Returns an array of costumized text strings used in the printer-friendly
page.
* 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!
<?php
/**
* @file
* Homepage of the API reference
*/
/** @mainpage Printer, e-mail and PDF versions
* Welcome to the module developer's documentation. The interesting functions for
* themers are those that start with 'theme_'.
*
* - Printer-friendly pages (core)
* - @link print.module Module main file @endlink
* - @link print.admin.inc Settings form @endlink
* - @link print.pages.inc HTML generation @endlink
* - @link print.install (Un)Install routines @endlink
* - @link print.tpl.php Page generation template @endlink
* - Send by e-mail
* - @link print_mail.module Module main file @endlink
* - @link print_mail.admin.inc Settings form @endlink
* - @link print_mail.inc Mail form and send mail routine @endlink
* - @link print_mail.install (Un)Install routines @endlink
* - PDF version
* - @link print_pdf.module Module main file @endlink
* - @link print_pdf.admin.inc Settings form @endlink
* - @link print_pdf.pages.inc PDF generation @endlink
* - @link print_pdf.class.inc Auxiliary PHP5 class @endlink
* - @link print_pdf.class_php4.inc Auxiliary PHP4 class @endlink
* - @link print_pdf.install (Un)Install routines @endlink
*/
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 {
position:relative;
bottom: 0.5em;
float:right;
margin-left: 1em;
}
.print-syslink {
margin-right: 1em;
}
img.print-icon {
vertical-align: middle;
}
img.print-icon-margin {
margin-right: 4px;
}
label.printmail-label {
width: 175px;
float: left;
}
# 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."
name = "Printer-friendly pages (core)"
description = "Adds a printer-friendly version link to content and administrative pages."
package = "Printer, e-mail and PDF versions"
<?php
/**
* @file
* Install file of the print module
*/
/**
* Implementation of hook_install().
*/
function print_install() {
$t = get_t();
drupal_set_message($t('Printer-friendly Page settings are available under !link',
array( '!link' => l('Administer > Site configuration > Printer-friendly Pages ', 'admin/settings/print' ) )
));
}
/**
* Implementation of hook_uninstall().
*/
function print_uninstall() {
variable_del('print_settings');
variable_del('print_display_comment');
variable_del('print_sourceurl_settings');
variable_del('print_robot_settings');
variable_del('print_logo_url');
variable_del('print_logo_options');
variable_del('print_css');
variable_del('print_urls');
variable_del('print_comments');
variable_del('print_newwindow');
variable_del('print_sourceurl_enabled');
variable_del('print_sourceurl_date');
variable_del('print_sourceurl_forcenode');
variable_del('print_html_show_link');
variable_del('print_html_link_pos');
variable_del('print_html_node_link_visibility');
variable_del('print_html_node_link_pages');
variable_del('print_html_link_class');
variable_del('print_html_sys_link_visibility');
variable_del('print_html_sys_link_pages');
variable_del('print_html_book_link');
variable_del('print_html_new_window');
variable_del('print_html_sendtoprinter');
variable_del('print_robots_noindex');
variable_del('print_robots_nofollow');
variable_del('print_robots_noarchive');
$settings = db_query("SELECT name FROM {variable} WHERE name LIKE 'print\_display\_%'");
while ($variable = db_fetch_object($settings)) {
variable_del($variable->name);
}
}
/**
* Update to version 5.x-3.6
*/
function print_update_5300() {
global $conf;
$ret = array();
if (isset($conf['print_settings'])) {
$print_settings = variable_get('print_settings', '');
$print_settings['node_link_visibility'] = 0;
$print_settings['node_link_pages'] = '';
$print_settings['link_class'] = 'print-page';
$print_settings['sys_link_visibility'] = ($print_settings['show_sys_link']) ? 0 : 1;
$print_settings['sys_link_pages'] = '';
$oldwindow = $print_settings['newwindow'];
$print_settings['newwindow'] = 1;
$print_settings['new_window'] = 0;
switch ($oldwindow) {
case 1: // Use HTML target
$print_settings['newwindow'] = 0;
// no break on purpose
case 2: // Use Javascript
$print_settings['new_window'] = 1;
break;
case 3: // Use Greybox Redux
$print_settings['link_class'] .= ' '. variable_get('greybox_class_text', 'greybox');
break;
case 4: // Use Thickbox
$print_settings['link_class'] .= ' thickbox';
break;
}
unset($print_settings['show_sys_link']);
variable_set('print_settings', $print_settings);
}
if (isset($conf['print_robot_settings'])) {
$robots_settings = variable_get('print_robot_settings', '');
unset($robots_settings['nocache']);
variable_set('print_robot_settings', $robots_settings);
}
return $ret;
}
/**
* Update to version 5.x-3.7
*/
function print_update_5301() {
global $conf;
$ret = array();
if (isset($conf['print_settings'])) {
$print_settings = variable_get('print_settings', '');
variable_set('print_logo_options', ($print_settings['logo_url'] ? 2 : 1));
variable_set('print_logo_url', $print_settings['logo_url']);
variable_set('print_css', $print_settings['css']);
variable_set('print_urls', $print_settings['urls']);
variable_set('print_comments', $print_settings['comments']);
variable_set('print_newwindow', $print_settings['newwindow']);
variable_set('print_html_link_pos', array('link' => ($print_settings['show_link'] ? 'link' : 0) ));
variable_set('print_html_show_link', max(1, $print_settings['show_link']));
variable_set('print_html_node_link_visibility', $print_settings['node_link_visibility']);
variable_set('print_html_node_link_pages', $print_settings['node_link_pages']);
variable_set('print_html_link_class', $print_settings['link_class']);
variable_set('print_html_sys_link_visibility', $print_settings['sys_link_visibility']);
variable_set('print_html_sys_link_pages', $print_settings['sys_link_pages']);
variable_set('print_html_book_link', $print_settings['book_link']);
variable_set('print_html_new_window', $print_settings['new_window']);
variable_set('print_html_sendtoprinter', $print_settings['sendtoprinter']);
variable_del('print_settings');
}
if (isset($conf['print_sourceurl_settings'])) {
$print_sourceurl_settings = variable_get('print_sourceurl_settings', '');
variable_set('print_sourceurl_enabled', $print_sourceurl_settings['enabled']);
variable_set('print_sourceurl_date', $print_sourceurl_settings['date']);
variable_set('print_sourceurl_forcenode', $print_sourceurl_settings['forcenode']);
variable_del('print_sourceurl_settings');
}
if (isset($conf['print_robot_settings'])) {
$print_robot_settings = variable_get('print_robot_settings', '');
variable_set('print_robots_noindex', $print_robot_settings['noindex']);
variable_set('print_robots_nofollow', $print_robot_settings['nofollow']);
variable_set('print_robots_noarchive', $print_robot_settings['noarchive']);
variable_del('print_robot_settings');
}
return $ret;
}
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
<!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>
<title><?php print $print['title'] ?></title>
<?php print $print['head'] ?>
<?php print $print['scripts'] ?>
<?php print $print['robots_meta'] ?>
<?php print $print['base_href'] ?>
<?php print $print['favicon'] ?>
<?php print $print['css'] ?>
</head>
<body<?php print $print['sendtoprinter'] ?>>
<?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>
<p />
<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>
<?php
/**
* @file
* Contains the administrative functions of the send by e-mail module.
*
* This file is included by the send by e-mail module, and includes the
* settings form.
*/
/**
* Menu callback for the send by e-mail module settings form.
*
* @ingroup forms
*/
function print_mail_settings() {
$form['settings'] = array(
'#type' => 'fieldset',
'#title' => t('Send by e-mail options'),
);
$form['settings']['print_mail_link_pos'] = array(
'#type' => 'checkboxes',
'#title' => t('Send by e-mail link'),
'#default_value' => variable_get('print_mail_link_pos', array(PRINT_MAIL_LINK_POS_DEFAULT => PRINT_MAIL_LINK_POS_DEFAULT)),
'#options' => array('link' => t('Links area'), 'corner' => t('Content corner')),
'#description' => t('Choose the location of the link(s) to the send by e-mail page. The Links area is usually below the node content, whereas the Content corner is placed in the upper-right corner of the node content. Unselect all options to disable the link. Even if the link is disabled, you can still send a node by e-mail by going to !path/nid where nid is the numeric id of the node.', array('!path' => PRINTMAIL_PATH)),
);
$form['settings']['adv_link'] = array(
'#type' => 'fieldset',
'#title' => t('Advanced link options'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['settings']['adv_link']['print_mail_show_link'] = array(
'#type' => 'radios',
'#title' => t('Link style'),
'#default_value' => variable_get('print_mail_show_link', PRINT_MAIL_SHOW_LINK_DEFAULT),
'#options' => array(1 => t('Text only'), 2 => t('Icon only'), 3 => t('Icon and Text')),
'#description' => t('Select the visual style of the link.'),
);
$form['settings']['adv_link']['print_mail_node_link_visibility'] = array(
'#type' => 'radios',
'#title' => t('Link visibility'),
'#default_value' => variable_get('print_mail_node_link_visibility', PRINT_MAIL_NODE_LINK_VISIBILITY_DEFAULT),
'#options' => array(t('Show on every page except the listed pages.'), t('Show on only the listed pages.')),
);
$form['settings']['adv_link']['print_mail_node_link_pages'] = array(
'#type' => 'textarea',
'#default_value' => variable_get('print_mail_node_link_pages', PRINT_MAIL_NODE_LINK_PAGES_DEFAULT),
'#rows' => 3,
'#description' => t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>')),
);
$form['settings']['adv_link']['print_mail_link_class'] = array(
'#type' => 'textfield',
'#title' => t('Link class'),
'#default_value' => variable_get('print_mail_link_class', PRINT_MAIL_LINK_CLASS_DEFAULT),
'#size' => 60,
'#maxlength' => 250,
'#description' => t('This can be used by themers to change the link style or by jQuery modules to open in a new window (e.g. greybox or thickbox). Multiple classes can be specified, separated by spaces.'),
);
$form['settings']['adv_link']['print_mail_sys_link_visibility'] = array(
'#type' => 'radios',
'#title' => t('Show link in system (non-content) pages'),
'#default_value' => variable_get('print_mail_sys_link_visibility', PRINT_MAIL_SYS_LINK_VISIBILITY_DEFAULT),
'#options' => array(t('Show on every page except the listed pages.'), t('Show on only the listed pages.')),
);
$form['settings']['adv_link']['print_mail_sys_link_pages'] = array(
'#type' => 'textarea',
'#default_value' => variable_get('print_mail_sys_link_pages', PRINT_MAIL_SYS_LINK_PAGES_DEFAULT),
'#rows' => 3,
'#description' => t('Setting this option will add a send by-email link on pages created by Drupal or the enabled modules.') .'<br />'.
t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>')),
);
$form['settings']['adv_link']['print_mail_link_use_alias'] = array(
'#type' => 'checkbox',
'#title' => t('Use URL alias instead of node ID'),
'#default_value' => variable_get('print_mail_link_use_alias', PRINT_MAIL_LINK_USE_ALIAS_DEFAULT),
'#description' => t('Enabling this will create the link using the URL alias instead of the node ID.'),
);
$form['settings']['print_mail_book_link'] = array(
'#type' => 'checkbox',
'#title' => t('Show link in book nodes'),
'#default_value' => variable_get('print_mail_book_link', PRINT_MAIL_BOOK_LINK_DEFAULT),
'#description' => t('Activate this to add a send by e-mail link in book nodes. Requires the (core) book module.'),
);
$form['settings']['print_mail_hourly_threshold'] = array(
'#type' => 'select',
'#title' => t('Hourly threshold'),
'#default_value' => variable_get('print_mail_hourly_threshold', PRINT_MAIL_HOURLY_THRESHOLD),
'#options' => drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50)),
'#description' => t('The maximum number of e-mails a user can send per hour.'),
);
$form['settings']['print_mail_teaser_default'] = array(
'#type' => 'checkbox',
'#title' => t('Send only the teaser'),
'#default_value' => variable_get('print_mail_teaser_default', PRINT_MAIL_TEASER_DEFAULT_DEFAULT),
'#description' => t("If selected, the default choice will be to send only the node's teaser instead of the full content."),
);
$form['settings']['print_mail_teaser_choice'] = array(
'#type' => 'checkbox',
'#title' => t('Enable teaser/full mode choice'),
'#default_value' => variable_get('print_mail_teaser_choice', PRINT_MAIL_TEASER_CHOICE_DEFAULT),
'#description' => t('If checked, the user will be able to choose between sending the full content or only the teaser at send time.'),
);
return system_settings_form($form);
}
<?php
/**
* @file
* Displays and processes the mail send form.
*
* This file is included by the print_mail module and includes the
* mail form display, validation and submit hooks.
*/
require_once(drupal_get_path('module', 'print') .'/print.pages.inc');
/**
* Menu callback for the send by e-mail form.
*
* @ingroup forms
*/
function print_mail_form($form_state) {
global $user;
$print_mail_hourly_threshold = variable_get('print_mail_hourly_threshold', PRINT_MAIL_HOURLY_THRESHOLD);
if (!flood_is_allowed('print_mail', $print_mail_hourly_threshold)) {
$form['flood'] = array(
'#type' => 'markup',
'#value' => '<p>'. t('You cannot send more than %number messages per hour. Please try again later.', array('%number' => $print_mail_hourly_threshold)) .'</p>',
);
return $form;
}
$print_mail_teaser_default = variable_get('print_mail_teaser_default', PRINT_MAIL_TEASER_DEFAULT_DEFAULT);
$print_mail_teaser_choice = variable_get('print_mail_teaser_choice', PRINT_MAIL_TEASER_CHOICE_DEFAULT);
$form = array();
// Remove the printmail/ prefix
$path = explode('/', $_GET['q']);
unset($path[0]);
$path = implode('/', $path);
if (is_numeric($path)) {
$path = 'node/'. $path;
}
$cid = isset($_GET['comment']) ? (int)$_GET['comment'] : NULL;
$form['path'] = array('#type' => 'value', '#value' => $path);
$form['cid'] = array('#type' => 'value', '#value' => $cid);
$form['fld_from_addr'] = array(
'#type' => 'textfield',
'#title' => t('Your e-mail'),
'#size' => 62,
);
$form['fld_from_name'] = array(
'#type' => 'textfield',
'#title' => t('Your name'),
'#size' => 62,
);
$form['txt_to_addrs'] = array(
'#type' => 'textarea',
'#ti