summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--print.pages.inc32
1 files changed, 20 insertions, 12 deletions
diff --git a/print.pages.inc b/print.pages.inc
index 0e986b4..955c15a 100644
--- a/print.pages.inc
+++ b/print.pages.inc
@@ -129,7 +129,8 @@ function _print_var_generator($node, $cid = NULL) {
$print["head"] = drupal_get_html_head();
$print["scripts"] = drupal_get_js();
$print["robots_meta"] = _print_robots_meta_generator();
- $print["base_href"] = "<base href=\"". url($path, array('absolute' => TRUE)) ."\" />\n";
+ $print["url"] = url($path, array('absolute' => TRUE));
+ $print["base_href"] = "<base href=\"". $print["url"] ."\" />\n";
$print["favicon"] = theme_get_setting("toggle_favicon") ? "<link rel=\"shortcut icon\" href=\"". theme_get_setting("favicon") ."\" type=\"image/x-icon\"/>\n" : "";
if (!empty($print_settings['css'])) {
@@ -146,7 +147,7 @@ function _print_var_generator($node, $cid = NULL) {
$print["logo"] = $logo_url ? "<img class=\"print-logo\" src=\"". $logo_url ."\" alt=\"\" />\n" : "";
$published_site = variable_get('site_name', 0);
- if ($published_site_name) {
+ if ($published_site) {
$published = (empty($themed["published"])) ? t('Published on %site_name', array('%site_name' => $published_site)) : ($themed['published'] ." ". $published_site);
$print["site_name"] = $published ." (". l($base_url, $base_url) .")";
}
@@ -157,20 +158,20 @@ function _print_var_generator($node, $cid = NULL) {
if ($print_sourceurl_settings['enabled'] == 1) {
/* Grab and format the src URL */
if (empty($print_sourceurl_settings['forcenode'])) {
- $print["source_url"] = url($path, array('absolute' => TRUE));
+ $url = $print["url"];
}
else {
- $print["source_url"] = $base_url .'/'. (((bool)variable_get('clean_url', '0')) ? '' : '?q=') . $path;
+ $url = $base_url .'/'. (((bool)variable_get('clean_url', '0')) ? '' : '?q=') . $path;
}
if ($cid) {
- $print["source_url"] .= "#comment-$cid";
+ $url .= "#comment-$cid";
}
$retrieved_date = format_date(time(), 'small');
$retrieved = (empty($themed["retrieved"])) ? t('retrieved on %date', array('%date' => $retrieved_date)) : ($themed["retrieved"] ." ". $retrieved_date);
$print["printdate"] = $print_sourceurl_settings['date'] ? " ($retrieved)" : "";
$source_url = (empty($themed["sourceURL"])) ? t('Source URL') : $themed["sourceURL"];
- $print["source_url"] = "<strong>". $source_url . $print["printdate"] .":</strong> ". l($print["source_url"], $print["source_url"]);
+ $print["source_url"] = "<strong>". $source_url . $print["printdate"] .":</strong> ". l($url, $url);
}
else {
$print["source_url"] = "";
@@ -179,13 +180,19 @@ function _print_var_generator($node, $cid = NULL) {
if (isset($node->type)) {
$node_type = $node->type;
- $by_author = ($node->name ? $node->name : variable_get('anonymous', t('Anonymous')));
- $by = (empty($themed["by"])) ? t('By %author', array('%author' => $by_author)) : ($themed["by"] ." ". $by_author);
- $print["submitted"] = theme_get_setting("toggle_node_info_$node_type") ? $by : "";
+ if (theme_get_setting("toggle_node_info_$node_type")) {
+ $by_author = ($node->name ? $node->name : variable_get('anonymous', t('Anonymous')));
+ $by = (empty($themed["by"])) ? t('By %author', array('%author' => $by_author)) : ($themed["by"] ." ". $by_author);
+ $print["submitted"] = $by;
- $created_datetime = format_date($node->created, 'small');
- $created = (empty($themed["created"])) ? t('Created %date', array('%date' => $created_datetime)) : ($themed["created"] ." ". $created_datetime);
- $print["created"] = theme_get_setting("toggle_node_info_$node_type") ? $created : "";
+ $created_datetime = format_date($node->created, 'small');
+ $created = (empty($themed["created"])) ? t('Created %date', array('%date' => $created_datetime)) : ($themed["created"] ." ". $created_datetime);
+ $print["created"] = $created;
+ }
+ else {
+ $print["submitted"] = "";
+ $print["created"] = "";
+ }
$print["type"] = $node->type;
}
@@ -225,6 +232,7 @@ function _print_var_generator($node, $cid = NULL) {
}
$print["content"] = $node->body;
+ $print["node"] = $node;
$print["footer_message"] = filter_xss_admin(variable_get('site_footer', FALSE)) ."\n". theme('blocks', 'footer') ;
return $print;