1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

Bugtracker #3694 partial fix - show title on printer-friendly news

This commit is contained in:
e107steved 2007-01-24 22:34:29 +00:00
parent af0e0f51d2
commit 6c4ea0a9cc

View File

@ -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 = "<font style=\"font-size: 11px; color: black; font-family: tahoma, verdana, arial, helvetica; text-decoration: none\">
$print_text = "<font style=\"font-size: 11px; color: black; font-family: tahoma, verdana, arial, helvetica; text-decoration: none\">
<b>".LAN_PRINT_135.": ".$news_title."</b>
<br />
(".LAN_PRINT_86." ".$category_name.")
@ -75,27 +78,31 @@ else
<br /><br />".
$news_body;
if ($news_extended != ""){ $text .= "<br /><br />".$news_extended; }
if ($news_source != ""){ $text .= "<br /><br />".$news_source; }
if ($news_url != ""){ $text .= "<br />".$news_url; }
if ($news_extended != ""){ $print_text .= "<br /><br />".$news_extended; }
if ($news_source != ""){ $print_text .= "<br /><br />".$news_source; }
if ($news_url != ""){ $print_text .= "<br />".$news_url; }
$text .= "<br /><br /></font><hr />".
$print_text .= "<br /><br /></font><hr />".
LAN_PRINT_303.SITENAME."
<br />
( 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 "
<div style='background:white'>
<div style='text-align:".$align."'>".$tp->parseTemplate("{LOGO}", TRUE)."</div><hr /><br />
<div style='text-align:".$align."'>".$text."</div><br /><br />
<div style='text-align:".$align."'>".$print_text."</div><br /><br />
<div style='text-align:".$align."'><form action=''><input type='button' value='".LAN_PRINT_307."' onClick='window.print()' /></form></div></div>";
require_once(FOOTERF);