Commit 7e748d74 authored by jcnventura's avatar jcnventura
parent edc1018a
********************************************************************
D R U P A L M O D U L E
********************************************************************
Name: Print module
Name: Printer-friendly Pages module
Maintainer: Joao Ventura <joao at venturas dot org>
Author: Matt Westgate <drupal at asitis dot org>
********************************************************************
......
********************************************************************
D R U P A L M O D U L E
********************************************************************
Name: Print module
Name: Printer-friendly Pages module
Maintainer: Joao Ventura <joao at venturas dot org>
Author: Matt Westgate <drupal at asitis dot org>
Last update: (See CHANGELOG.txt for details)
......
......@@ -37,7 +37,6 @@ function print_main_settings() {
$form['print_settings']['urls'] = array(
'#type' => 'checkbox',
'#title' => t('Printer-friendly URLs list'),
'#return_value' => 1,
'#default_value' => $print_settings['urls'],
'#description' => t('If set, a list of the destination URLs for the page links will be displayed at the bottom of the page.'),
);
......@@ -45,7 +44,6 @@ function print_main_settings() {
$form['print_settings']['comments'] = array(
'#type' => 'checkbox',
'#title' => t('Include comments in printer-friendly version'),
'#return_value' => 1,
'#default_value' => $print_settings['comments'],
'#description' => t('When this option is active, user comments are also included in the printer-friendly version. Requires the comment module.'),
);
......@@ -63,15 +61,14 @@ function print_main_settings() {
$form['print_sourceurl_settings'] = array(
'#type' => 'fieldset',
'#title' => t('Source URL'),
'#collapsible' => true,
'#collapsed' => true,
'#tree' => true,
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#tree' => TRUE,
);
$form['print_sourceurl_settings']['enabled'] = array(
'#type' => 'checkbox',
'#title' => t('Display source URL'),
'#return_value' => 1,
'#default_value' => $print_sourceurl_settings['enabled'],
'#description' => t('When this option is selected, the URL for the original page will be displayed at the bottom of the printer-friendly version.'),
);
......@@ -79,7 +76,6 @@ function print_main_settings() {
$form['print_sourceurl_settings']['date'] = array(
'#type' => 'checkbox',
'#title' => t('Add current time/date to the source URL'),
'#return_value' => 1,
'#default_value' => $print_sourceurl_settings['date'],
'#description' => t('Display the current date and time in the Source URL line.'),
);
......@@ -87,7 +83,6 @@ function print_main_settings() {
$form['print_sourceurl_settings']['forcenode'] = array(
'#type' => 'checkbox',
'#title' => t('Force use of node ID in source URL'),
'#return_value' => 1,
'#default_value' => $print_sourceurl_settings['forcenode'],
'#description' => t('Drupal will attempt to use the page\'s defined alias in case there is one. To force the use of the fixed URL, activate this option.'),
);
......@@ -114,7 +109,6 @@ function print_html_settings() {
$form['print_html_settings']['show_sys_link'] = array(
'#type' => 'checkbox',
'#title' => t('Show link in system (non-content) pages'),
'#return_value' => 1,
'#default_value' => $print_html_settings['show_sys_link'],
'#description' => t('Setting this option will add a printer-friendly version page link on pages created by Drupal or the enabled modules.'),
);
......@@ -122,7 +116,6 @@ function print_html_settings() {
$form['print_html_settings']['book_link'] = array(
'#type' => 'checkbox',
'#title' => t('Take control of the book module printer-friendly link'),
'#return_value' => 1,
'#default_value' => $print_html_settings['book_link'],
'#description' => t('Activate this to have the printer-friendly link in book nodes handled by this module. Requires the (core) book module.'),
);
......@@ -130,7 +123,6 @@ function print_html_settings() {
$form['print_html_settings']['sendtoprinter'] = array(
'#type' => 'checkbox',
'#title' => t('Send to printer'),
'#return_value' => 1,
'#default_value' => $print_html_settings['sendtoprinter'],
'#description' => t('Automatically calls the browser\'s print function when the printer-friendly version is displayed.'),
);
......@@ -140,41 +132,37 @@ function print_html_settings() {
$form['print_robot_settings'] = array(
'#type' => 'fieldset',
'#title' => t('Robots META tags'),
'#collapsible' => true,
'#collapsed' => false,
'#collapsible' => TRUE,
'#collapsed' => FALSE,
'#tree' => TRUE,
);
$form['print_robot_settings']['noindex'] = array(
'#type' => 'checkbox',
'#title' => t('Add noindex'),
'#return_value' => 1,
'#default_value' => $print_robot_settings['noindex'],
'#description' => t('Instruct robots to not index printer-friendly pages. Recommended for good search engine karma.')
'#description' => t('Instruct robots to not index printer-friendly pages. Recommended for good search engine karma.'),
);
$form['print_robot_settings']['nofollow'] = array(
'#type' => 'checkbox',
'#title' => t('Add nofollow'),
'#return_value' => 1,
'#default_value' => $print_robot_settings['nofollow'],
'#description' => t('Instruct robots to not follow outgoing links on printer-friendly pages.')
'#description' => t('Instruct robots to not follow outgoing links on printer-friendly pages.'),
);
$form['print_robot_settings']['noarchive'] = array(
'#type' => 'checkbox',
'#title' => t('Add noarchive'),
'#return_value' => 1,
'#default_value' => $print_robot_settings['noarchive'],
'#description' => t('Non-standard tag to instruct search engines to not show a "Cached" link for your printer-friendly pages. Recognized by Googlebot.')
'#description' => t('Non-standard tag to instruct search engines to not show a "Cached" link for your printer-friendly pages. Recognized by Googlebot.'),
);
$form['print_robot_settings']['nocache'] = array(
'#type' => 'checkbox',
'#title' => t('Add nocache'),
'#return_value' => 1,
'#default_value' => $print_robot_settings['nocache'],
'#description' => t('Non-standard tag to instruct search engines to not show a "Cached" link for your printer-friendly pages')
'#description' => t('Non-standard tag to instruct search engines to not show a "Cached" link for your printer-friendly pages'),
);
return system_settings_form($form);
......
body {margin:1em;background-color:#fff;font-family:sans-serif}
th {text-align: left;color: #006;border-bottom: 1px solid #ccc;}
body {
margin: 1em;
background-color: #fff;
font-family: sans-serif;
}
th {
text-align: left;
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;}
.print-logo {border:0;}
a:hover {color: #00f;}
a:link img, a:visited img {border: 0;}
.print-footnote {font-size: xx-small;}
.print-logo {border: 0;}
.print-site_name {}
.print-breadcrumb {font-size:x-small}
.print-title {font-size:200%;font-weight: bold;margin:0.67em 0 0.22em 0}
.print-submitted {font-size:small}
.print-created {font-size:small}
.print-taxonomy ul {margin:0;padding:0px;}
.print-taxonomy li {display:inline;}
.print-breadcrumb {font-size: x-small;}
.print-title {
font-size: 200%;
font-weight: bold;
margin: 0.67em 0 0.22em 0;
}
.print-submitted {font-size: small;}
.print-created {font-size: small;}
.print-taxonomy ul {
margin: 0;
padding: 0px;
}
.print-taxonomy li {display: inline;}
.print-content {}
.print-hr {border:0;height:1px;width:100%;color:#9E9E9E;background-color:#9E9E9E;}
.print-source_url {font-size:small;}
.print-links {font-size:small;}
.print-footer {text-align:center;}
.print-hr {
border: 0;
height: 1px;
width: 100%;
color: #9E9E9E;
background-color: #9E9E9E;
}
.print-source_url {font-size: small;}
.print-links {font-size: small;}
.print-footer {text-align: center;}
; $Id$
name = "Printer-friendly pages (core)"
description = "Adds a printer-friendly version link to node pages."
description = "Adds a printer-friendly version link to content and administrative pages."
core=6.x
package = "Printer-friendly pages"
......@@ -50,14 +50,14 @@ function print_robot_settings_default() {
//*******************************************************************
/**
* Implementation of hook_perm()
* Implementation of hook_perm().
*/
function print_perm() {
return array('access print', 'administer print');
}
/**
* Implementation of hook_theme()
* Implementation of hook_theme().
*/
function print_theme() {
return array(
......@@ -71,7 +71,7 @@ function print_theme() {
}
/**
* Implementation of hook_menu()
* Implementation of hook_menu().
*/
function print_menu() {
$items = array();
......@@ -84,8 +84,8 @@ function print_menu() {
'file' => 'print.pages.inc',
);
$items['admin/settings/print'] = array(
'title' => 'Printer-friendly',
'description' => 'Adds a printer-friendly version link to node pages.',
'title' => 'Printer-friendly Pages',
'description' => 'Adds a printer-friendly version link to content and administrative pages.',
'page callback' => 'drupal_get_form',
'page arguments' => array('print_html_settings'),
'access arguments' => array('administer print'),
......@@ -117,14 +117,21 @@ function print_link($type, $node = NULL, $teaser = FALSE) {
static $print_display_comment = FALSE;
if ($print_display == FALSE) {
$nodetype = isset($node->type) ? $node->type : '';
$print_display_comment = variable_get('print_display_comment_'. $nodetype, '0');
$print_display = variable_get('print_display_'. $nodetype, '1');
if (isset($node->type)) {
$node_type = $node->type;
$print_display_comment = variable_get('print_display_comment_'. $node->type, 0);
$print_display = variable_get('print_display_'. $node->type, 1);
}
else {
$node_type = '';
$print_display_comment = 0;
$print_display = 1;
}
}
$print_html_settings = variable_get('print_html_settings', print_html_settings_default());
// No link is shown for several motives...
if ( !($teaser) && (isset($node->type) && ($node->type != 'book')) && (!isset($node->book)) &&
if ( !($teaser) && ($node_type != 'book') && (!isset($node->book)) &&
($print_html_settings['show_link']) && user_access('access print') &&
(($type == 'comment' && $print_display_comment) ||
($type == 'node' && $print_display))) {
......@@ -132,17 +139,18 @@ function print_link($type, $node = NULL, $teaser = FALSE) {
$format = theme('print_format_link');
$queryArr = $_GET;
$query_arr = $_GET;
if ($type == 'comment') {
$queryArr['comment'] = $node->cid;
$query_arr['comment'] = $node->cid;
}
$query = drupal_query_string_encode($queryArr, array('q'));
$query = drupal_query_string_encode($query_arr, array('q'));
$links['print'] = array('href' => PRINT_PATH ."/". $node->nid,
'title' => $format['text'],
'attributes' => $format['attributes'],
'html' => $format['html'],
'query' => $query);
'query' => $query,
);
return $links;
}
......@@ -155,8 +163,8 @@ function print_link($type, $node = NULL, $teaser = FALSE) {
* Implementation of hook_link_alter().
*/
function print_link_alter(&$links, $node) {
foreach ($links AS $module => $link) {
if (strstr($module, 'book_printer')) {
foreach ($links as $module => $link) {
if (strpos($module, 'book_printer') !== FALSE) {
$print_html_settings = variable_get('print_html_settings', print_html_settings_default());
if ($print_html_settings['book_link']) {
......@@ -171,7 +179,7 @@ function print_link_alter(&$links, $node) {
}
/**
* Implementation of hook_help()
* Implementation of hook_help().
*/
function print_help($path, $arg) {
$print_html_settings = variable_get('print_html_settings', print_html_settings_default());
......@@ -189,23 +197,21 @@ function print_help($path, $arg) {
}
/**
* Implementation of hook_form_alter()
* Implementation of hook_form_alter().
*/
function print_form_alter(&$form, $form_state, $form_id) {
// Add the node-type settings option to activate the printer-friendly version link
if ('node_type_form' == $form_id) {
if ($form_id == 'node_type_form') {
$form['workflow']['print_display'] = array(
'#type' => 'checkbox',
'#title' => t('Show printer-friendly version link'),
'#return_value' => 1,
'#default_value' => variable_get('print_display_'. $form['#node_type']->type, '1'),
'#default_value' => variable_get('print_display_'. $form['#node_type']->type, 1),
'#description' => t('Displays the link to a printer-friendly version of the content. Further configuration is available on the !settings.', array('!settings' => l(t('settings page'), 'admin/settings/print' ))),
);
$form['comment']['print_display_comment'] = array(
'#type' => 'checkbox',
'#title' => t('Show printer-friendly version link in individual comments'),
'#return_value' => 1,
'#default_value' => variable_get('print_display_comment_'. $form['#node_type']->type, '0'),
'#default_value' => variable_get('print_display_comment_'. $form['#node_type']->type, 0),
'#description' => t('Displays the link to a printer-friendly version of the comment. Further configuration is available on the !settings.', array('!settings' => l(t('settings page'), 'admin/settings/print' ))),
);
}
......@@ -221,7 +227,8 @@ function _print_format_link_aux($type = 0, $text = '', $img = '', $title = '', $
$robots_settings = variable_get('print_robot_settings', print_robot_settings_default());
$attributes = array('title' => $title,
'class' => $class);
'class' => $class,
);
switch ($print_settings['newwindow']) {
case 1:
$attributes['target'] = '_blank';
......@@ -258,22 +265,22 @@ function _print_format_link_aux($type = 0, $text = '', $img = '', $title = '', $
return array('text' => $text,
'html' => $html,
'attributes' => $attributes);
'attributes' => $attributes,
);
}
function theme_print_format_link() {
global $base_path;
$print_html_settings = variable_get('print_html_settings', print_html_settings_default());
$text = t('Printer-friendly version');
$img = $base_path . drupal_get_path('module', 'print') .'/icons/print_icon.gif';
$img = base_path() . drupal_get_path('module', 'print') .'/icons/print_icon.gif';
$title = t('Display a printer-friendly version of this page.');
$class = 'print-page';
$format = _print_format_link_aux($print_html_settings['show_link'], $text, $img, $title, $class);
return array('text' => $format['text'],
'html' => $format['html'],
'attributes' => $format['attributes']);
'attributes' => $format['attributes'],
);
}
function theme_print_text() {
......@@ -282,7 +289,8 @@ function theme_print_text() {
'published' => t('Published on'),
'by' => t('By'),
'created' => t('Created'),
'links' => t('Links:'));
'links' => t('Links:'),
);
}
/**
......
......@@ -73,9 +73,9 @@ function _print_robots_meta_generator() {
$robots_meta[] = 'nocache';
}
if (sizeof($robots_meta) > 0) {
$robots_meta = isset($robots_meta[1]) ? implode(', ', $robots_meta) : $robots_meta[0];
$robots_meta = '<meta name="robots" content="'. $robots_meta ."\" />\n";
if (count($robots_meta) > 0) {
$robots_meta = implode(', ', $robots_meta);
$robots_meta = "<meta name=\"robots\" content=\"". $robots_meta ."\" />\n";
}
else {
$robots_meta = '';
......@@ -113,7 +113,7 @@ function _print_var_generator($node, $cid = NULL) {
$css_file = $print_settings['css'];
}
else {
$css_file = $base_url ."/". drupal_get_path('module', 'print') ."/print.css";
$css_file = base_path() . drupal_get_path('module', 'print') ."/print.css";
}
$print["css"] = "<style type=\"text/css\" media=\"all\">@import url(\"". $css_file ."\");</style>\n";
......@@ -140,11 +140,19 @@ function _print_var_generator($node, $cid = NULL) {
$print["source_url"] = "";
}
$nodetype = isset($node->type) ? $node->type : '';
if (isset($node->type)) {
$node_type = $node->type;
$print["submitted"] = theme_get_setting("toggle_node_info_$node_type") ? $themed['by'] ." ". ($node->name ? $node->name : variable_get('anonymous', t('Anonymous'))) : "";
$print["created"] = theme_get_setting("toggle_node_info_$node_type") ? $themed['created'] ." ". format_date($node->created, 'small') : "";
$print["type"] = $node->type;
}
else {
$print["submitted"] = "";
$print["created"] = "";
$print["type"] = '';
}
$print["site_name"] = variable_get('site_name', 0) ? ($themed['published'] ." ". variable_get('site_name', 0) ." (". l($base_url, $base_url) .")") : "";
$print["submitted"] = theme_get_setting("toggle_node_info_$nodetype") ? $themed['by'] ." ". ($node->name ? $node->name : variable_get('anonymous', t('Anonymous'))) : "";
$print["created"] = theme_get_setting("toggle_node_info_$nodetype") ? $themed['created'] ." ". format_date($node->created, 'small') : "";
$print["footer_message"] = filter_xss_admin(variable_get('site_footer', FALSE)) ."\n". theme('blocks', 'footer') ;
menu_set_active_item($path);
......@@ -176,7 +184,6 @@ function _print_var_generator($node, $cid = NULL) {
$print["taxonomy"] = theme('links', $terms);
}
$print["type"] = $nodetype;
$print["content"] = $node->body;
return $print;
......@@ -196,7 +203,7 @@ function _print_rewrite_urls($matches) {
$pfurls = (!empty($print_settings['urls']));
//Temporarily convert spaces to %20 so that it isn't split below
$in_string = false;
$in_string = FALSE;
for ($i=0; $i < strlen($matches[1]); $i++) {
if ($matches[1][$i] == '"') {
$in_string = !$in_string;
......@@ -332,8 +339,6 @@ function _print_get_template($type = NULL) {
* Outputs a printer-friendly page. Used for content types
*/
function _print_generate_node($nid, $cid = NULL) {
global $base_url;
// We can take a node id
$node = node_load(array('nid' => $nid));
if (!node_access('view', $node)) {
......@@ -343,7 +348,7 @@ function _print_generate_node($nid, $cid = NULL) {
drupal_set_title($node->title);
//alert other modules that we are generating a printer-friendly page, so they can choose to show/hide info
$node->printing = true;
$node->printing = TRUE;
// Turn off Pagination by the Paging module
unset($node->pages);
unset($node->page_count);
......@@ -353,7 +358,7 @@ function _print_generate_node($nid, $cid = NULL) {
if ($cid === NULL) {
// Adapted (simplified) version of node_view for Drupal 5.x
//Render the node content
$node = node_build_content($node, false, true);
$node = node_build_content($node, FALSE, TRUE);
// Disable fivestar widget output
unset($node->content["fivestar_widget"]);
// Disable service links module output
......@@ -388,7 +393,7 @@ function _print_generate_node($nid, $cid = NULL) {
$node->body .= $comments;
}
node_invoke_nodeapi($node, 'alter', false, true);
node_invoke_nodeapi($node, 'alter', FALSE, TRUE);
// Convert the a href elements
$pattern = "@<(a\s[^>]*?)>(.*?)(</a>)@is";
......@@ -405,8 +410,6 @@ function _print_generate_node($nid, $cid = NULL) {
* Outputs a printer-friendly page. Used for drupal core pages.
*/
function _print_generate_path($path) {
global $base_url;
$path = drupal_get_normal_path($path);
menu_set_active_item($path);
......@@ -449,8 +452,6 @@ function _print_generate_path($path) {
* Outputs a printer-friendly page. Used for book pages
*/
function _print_generate_book($nid) {
global $base_url;
$node = node_load(array('nid' => $nid));
if (!node_access('view', $node) || (!user_access('access printer-friendly version'))) {
// Access is denied
......
......@@ -60,7 +60,7 @@ function _print_pdf_tcpdf($print, $filename) {
$print_pdf_settings = variable_get('print_pdf_settings', print_pdf_settings_default());
require_once($print_pdf_settings['pdf_tool']);
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true);
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, TRUE);
$pdf->Open();
$pdf->SetAuthor($print["submitted"]);
......
......@@ -30,7 +30,6 @@ function print_pdf_settings() {
$form['print_pdf_settings']['show_sys_link'] = array(
'#type' => 'checkbox',
'#title' => t('Show link in system (non-content) pages'),
'#return_value' => 1,
'#default_value' => $print_pdf_settings['show_sys_link'],
'#description' => t('Setting this option will add a PDF version page link on pages created by Drupal or the enabled modules.'),
);
......@@ -38,7 +37,6 @@ function print_pdf_settings() {
$form['print_pdf_settings']['book_link'] = array(
'#type' => 'checkbox',
'#title' => t('Show link in book nodes'),
'#return_value' => 1,
'#default_value' => $print_pdf_settings['book_link'],
'#description' => t('Activate this to add a PDF version link in book nodes. Requires the (core) book module.'),
);
......
......@@ -20,7 +20,7 @@ function print_pdf_settings_default() {
//*******************************************************************
/**
* Implementation of hook_theme()
* Implementation of hook_theme().
*/
function print_pdf_theme() {
return array(
......@@ -31,7 +31,7 @@ function print_pdf_theme() {
}
/**
* Implementation of hook_menu()
* Implementation of hook_menu().
*/
function print_pdf_menu() {
$items = array();
......@@ -64,9 +64,16 @@ function print_pdf_link($type, $node = NULL, $teaser = FALSE) {
static $print_pdf_display_comment = FALSE;
if ($print_pdf_display == FALSE) {
$nodetype = isset($node->type) ? $node->type : '';
$print_pdf_display_comment = variable_get('print_pdf_display_comment_'. $nodetype, '0');
$print_pdf_display = variable_get('print_pdf_display_'. $nodetype, '1');
if (isset($node->type)) {
$node_type = $node->type;
$print_pdf_display_comment = variable_get('print_pdf_display_comment_'. $node->type, 0);
$print_pdf_display = variable_get('print_pdf_display_'. $node->type, 1);
}
else {
$node_type = '';
$print_pdf_display_comment = 0;
$print_pdf_display = 1;
}
}
$print_pdf_settings = variable_get('print_pdf_settings', print_pdf_settings_default());
......@@ -79,17 +86,18 @@ function print_pdf_link($type, $node = NULL, $teaser = FALSE) {
$format = theme('print_pdf_format_link');
$queryArr = $_GET;
$query_arr = $_GET;
if ($type == 'comment') {
$queryArr['comment'] = $node->cid;
$query_arr['comment'] = $node->cid;
}
$query = drupal_query_string_encode($queryArr, array('q'));
$query = drupal_query_string_encode($query_arr, array('q'));
$links['print_pdf'] = array('href' => PRINTPDF_PATH ."/". $node->nid,
'title' => $format['text'],
'attributes' => $format['attributes'],
'html' => $format['html'],
'query' => $query);
'title' => $format['text'],
'attributes' => $format['attributes'],
'html' => $format['html'],
'query' => $query,
);
return $links;
}
......@@ -99,7 +107,7 @@ function print_pdf_link($type, $node = NULL, $teaser = FALSE) {
}
/**
* Implementation of hook_help()
* Implementation of hook_help().
*/
function print_pdf_help($path, $arg) {
$print_pdf_settings = variable_get('print_pdf_settings', print_pdf_settings_default());
......@@ -117,41 +125,38 @@ function print_pdf_help($path, $arg) {
}
/**
* Implementation of hook_form_alter()
* Implementation of hook_form_alter().
*/
function print_pdf_form_alter(&$form, $form_state, $form_id) {
// Add the node-type settings option to activate the PDF version link
if ('node_type_form' == $form_id) {
if ($form_id == 'node_type_form') {
$form['workflow']['print_pdf_display'] = array(
'#type' => 'checkbox',
'#title' => t('Show PDF version link'),
'#return_value' => 1,
'#default_value' => variable_get('print_pdf_display_'. $form['#node_type']->type, '1'),
'#default_value' => variable_get('print_pdf_display_'. $form['#node_type']->type, 1),
'#description' => t('Displays the link to a PDF version of the content. Further configuration is available on the !settings.', array('!settings' => l(t('settings page'), 'admin/settings/print' ))),
);
$form['comment']['print_pdf_display_comment'] = array(
'#type' => 'checkbox',
'#title' => t('Show PDF version link in individual comments'),
'#return_value' => 1,
'#default_value' => variable_get('print_pdf_display_comment_'. $form['#node_type']->type, '0'),
'#default_value' => variable_get('print_pdf_display_comment_'. $form['#node_type']->type, 0),
'#description' => t('Displays the link to a PDF version of the comment. Further configuration is available on the !settings.', array('!settings' => l(t('settings page'), 'admin/settings/print' ))),
);
}
}
function theme_print_pdf_format_link() {
global $base_path;
$print_pdf_settings = variable_get('print_pdf_settings', print_pdf_settings_default());
$text = t('PDF version');
$img = $base_path . drupal_get_path('module', 'print') .'/icons/pdf_icon.gif';
$img = base_path() . drupal_get_path('module', 'print') .'/icons/pdf_icon.gif';
$title = t('Display a PDF version of this page.');
$class = 'print-pdf';
$format = _print_format_link_aux($print_pdf_settings['show_link'], $text, $img, $title, $class);
return array('text' => $format['text'],
'html' => $format['html'],
'attributes' => $format['attributes']);
'attributes' => $format['attributes'],
);
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment