diff --git a/e107_core/templates/print_template.php b/e107_core/templates/print_template.php new file mode 100644 index 000000000..0dec5b9d5 --- /dev/null +++ b/e107_core/templates/print_template.php @@ -0,0 +1,10 @@ + +
{LOGO: h=100}
+
+
{TEXT}
+
{BUTTON}
+ '; + diff --git a/e107_handlers/plugin_class.php b/e107_handlers/plugin_class.php index 5ec8517ec..4b17e004e 100644 --- a/e107_handlers/plugin_class.php +++ b/e107_handlers/plugin_class.php @@ -46,8 +46,8 @@ class e_plugin 'e_linkgen', 'e_list', - 'e_meta', // @Deprecated - 'e_emailprint', + 'e_meta', // @deprecated + 'e_emailprint', /* @deprecated - see e_print */ 'e_print', // new v2.2 'e_frontpage', 'e_latest', /* @deprecated - see e_dashboard */ @@ -71,6 +71,7 @@ class e_plugin 'e_tohtml', /* @deprecated - use e_parse */ 'e_featurebox', 'e_parse', + 'e_print', // new v2.3.1 'e_related', 'e_rss', 'e_upload', diff --git a/e107_plugins/forum/e_print.php b/e107_plugins/forum/e_print.php new file mode 100644 index 000000000..06d6c2031 --- /dev/null +++ b/e107_plugins/forum/e_print.php @@ -0,0 +1,15 @@ +toText($row['news_title']); - define('e_PAGETITLE', '[print] '. $title); + $title = e107::getParser()->toText($row['news_title']); + // define('e_PAGETITLE', '[print] '. $title); + e107::title('[print] '. $title); e107::meta('robots', 'noindex'); $template = $tmp['item']; @@ -106,35 +111,43 @@ else
".$newsUrl." "; - - + + } -if(defined("TEXTDIRECTION") && TEXTDIRECTION == "rtl"){ +if(defined("TEXTDIRECTION") && TEXTDIRECTION === "rtl") +{ $align = 'right'; -}else{ +} +else +{ $align = 'left'; } // Header down here to give us a chance to set a page title require_once(HEADERF); -//temporary solution - object of future cahges -if(is_readable(THEME.'print_template.php')) + +if(is_readable(THEME.'print_template.php')) // legacy location. { $PRINT_TEMPLATE = ''; include_once(THEME.'print_template.php'); - echo $tp->parseTemplate($PRINT_TEMPLATE); + echo e107::getParser()->parseTemplate($PRINT_TEMPLATE); } -else +else // v2.3.1+ { - echo " -
-
".$tp->parseTemplate("{LOGO: h=100}", TRUE)."

-
".$print_text."


-
"; + $PRINT_TEMPLATE = e107::getCoreTemplate('print', 'default'); + + $vars = array( + 'TEXT' => $print_text, + 'ALIGN' => $align, + 'BUTTON' => "" + ); + + echo e107::getParser()->parseTemplate($PRINT_TEMPLATE, true, $vars); + } require_once(FOOTERF);