From 6c4ea0a9cc233b4c556ac53345628d48e72f0896 Mon Sep 17 00:00:00 2001 From: e107steved Date: Wed, 24 Jan 2007 22:34:29 +0000 Subject: [PATCH] Bugtracker #3694 partial fix - show title on printer-friendly news --- print.php | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/print.php b/print.php index b7a922413..50d5e7a01 100644 --- a/print.php +++ b/print.php @@ -11,15 +11,15 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/print.php,v $ -| $Revision: 1.3 $ -| $Date: 2007-01-12 20:39:12 $ +| $Revision: 1.4 $ +| $Date: 2007-01-24 22:34:16 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ require_once("class2.php"); $HEADER=""; $FOOTER=""; -require_once(HEADERF); + $qs = explode(".", e_QUERY); if ($qs[0] == "") { @@ -30,13 +30,15 @@ $source = $qs[0]; $parms = intval($qs[1]); unset($qs); + if(strpos($source,'plugin:') !== FALSE) { $plugin = substr($source,7); if(file_exists(e_PLUGIN.$plugin."/e_emailprint.php")) { include_once(e_PLUGIN.$plugin."/e_emailprint.php"); - $text = print_item($parms); + $print_text = print_item($parms); +// define("e_PAGETITLE", $plugin); } else { @@ -50,6 +52,7 @@ else $sql->db_Select("news", "*", "news_id='{$parms}'"); $row = $sql->db_Fetch(); extract($row); + define("e_PAGETITLE", $news_title); $news_body = $tp->toHTML($news_body, TRUE); $news_extended = $tp->toHTML($news_extended, TRUE); if ($news_author == 0) @@ -65,7 +68,7 @@ else list($a_id, $a_name) = $sql->db_Fetch(); } $news_datestamp = $con->convert_date($news_datestamp, "long"); - $text = " + $print_text = " ".LAN_PRINT_135.": ".$news_title."
(".LAN_PRINT_86." ".$category_name.") @@ -75,27 +78,31 @@ else

". $news_body; - if ($news_extended != ""){ $text .= "

".$news_extended; } - if ($news_source != ""){ $text .= "

".$news_source; } - if ($news_url != ""){ $text .= "
".$news_url; } + if ($news_extended != ""){ $print_text .= "

".$news_extended; } + if ($news_source != ""){ $print_text .= "

".$news_source; } + if ($news_url != ""){ $print_text .= "
".$news_url; } - $text .= "


". + $print_text .= "


". LAN_PRINT_303.SITENAME."
( http://".$_SERVER[HTTP_HOST].e_HTTP."comment.php?comment.news.".$news_id." ) "; } + if(defined("TEXTDIRECTION") && TEXTDIRECTION == "rtl"){ $align = 'right'; }else{ $align = 'left'; } +// Header down here to give us a chance to set a page title +require_once(HEADERF); + echo "
".$tp->parseTemplate("{LOGO}", TRUE)."


-
".$text."


+
".$print_text."


"; require_once(FOOTERF);