diff --git a/e107_plugins/calendar_menu/e_search.php b/e107_plugins/calendar_menu/e_search.php index 0e3212c80..c0da2bc66 100644 --- a/e107_plugins/calendar_menu/e_search.php +++ b/e107_plugins/calendar_menu/e_search.php @@ -1,11 +1,21 @@ e_PLUGIN.'calendar_menu/search/search_parser.php', 'qtype' => CM_SCH_LAN_1, 'refpage' => 'calendar.php'); -?> \ No newline at end of file diff --git a/e107_plugins/calendar_menu/ec_pf_page.php b/e107_plugins/calendar_menu/ec_pf_page.php index 0ffc2c01b..830659bae 100644 --- a/e107_plugins/calendar_menu/ec_pf_page.php +++ b/e107_plugins/calendar_menu/ec_pf_page.php @@ -9,9 +9,9 @@ * * * $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/ec_pf_page.php,v $ - * $Revision: 1.5 $ - * $Date: 2009-11-18 01:05:23 $ - * $Author: e107coders $ + * $Revision: 1.6 $ + * $Date: 2009-11-19 10:09:58 $ + * $Author: marj_nl_fr $ */ /* | @@ -307,33 +307,48 @@ else $cal_text.= EC_LAN_148; } - -switch ($ec_output_type) +switch($ec_output_type) { - case 'display': - $ns->tablerender(EC_LAN_80, $cal_text, 'ec_pf_page'); - require_once(FOOTERF); - break; - case 'print' : - echo $cal_text; + case 'display': + $ns->tablerender(EC_LAN_80, $cal_text, 'ec_pf_page'); + require_once (FOOTERF); break; - case 'pdf' : - $lan_file = e_PLUGIN."pdf/languages/".e_LANGUAGE.".php"; - include_once(file_exists($lan_file) ? $lan_file : e_PLUGIN."pdf/languages/English.php"); - define('FPDF_FONTPATH', 'font/'); - require_once(e_PLUGIN."pdf/ufpdf.php"); //require the ufpdf class - require_once(e_PLUGIN."pdf/e107pdf.php"); //require the e107pdf class - if ($ec_pdf_options == "") - $pdf = new e107PDF(); - else - $pdf = new e107PDF($ec_pdf_options); -// $text = array($text, $creator, $author, $title, $subject, $keywords, $url); - $text = array($cal_text,'', '', EC_LAN_163,'','',e_SELF.e_QUERY); - $pdf->makePDF($text); + + case 'print': + echo $cal_text; break; + + case 'pdf': + //TODO use a better way to pass info to pdf + include_lan(e_PLUGIN.'pdf/languages/'.e_LANGUAGE.'.php'); + define('FPDF_FONTPATH', 'font/'); + //require the ufpdf class + require_once (e_PLUGIN.'pdf/ufpdf.php'); + //require the e107pdf class + require_once (e_PLUGIN.'pdf/e107pdf.php'); + if('' == $ec_pdf_options) + { + $pdf = new e107PDF(); + } + else + { + $pdf = new e107PDF($ec_pdf_options); + } + // $text = array($text, $creator, $author, $title, $subject, $keywords, $url); + $text = array($cal_text, + '', + '', + EC_LAN_163, + '', + '', + e_SELF.e_QUERY); + $pdf->makePDF($text); + break; + } + // We're assuming $date_string is a string of digits // Which could begin with 'now' or 'now+' function decode_date($date_string, $last_day = FALSE) diff --git a/e107_plugins/clock_menu/clock_menu.php b/e107_plugins/clock_menu/clock_menu.php index 25ba0f682..aa26a8645 100644 --- a/e107_plugins/clock_menu/clock_menu.php +++ b/e107_plugins/clock_menu/clock_menu.php @@ -17,13 +17,14 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/clock_menu/clock_menu.php,v $ -| $Revision: 1.1.1.1 $ -| $Date: 2006-12-02 04:34:52 $ -| $Author: mcfly_e107 $ +| $Revision: 1.2 $ +| $Date: 2009-11-19 10:10:54 $ +| $Author: marj_nl_fr $ +---------------------------------------------------------------+ */ - -if (!defined('e107_INIT')) { exit; } +//FIXME looks pretty much to be 0.6 compatible +if (!defined('e107_INIT')) { exit(); } +include_lan(e_PLUGIN.'/clock_menu/languages/'.e_LANGUAGE.'.php'); global $menu_pref; $indexArray = array('clock_dateprefix','clock_format','clock_datesuffix1','clock_datesuffix2','clock_datesuffix3','clock_datesuffix4'); @@ -36,11 +37,7 @@ foreach($indexArray as $ind) } $ec_dir = e_PLUGIN."clock_menu/"; -$lan_file = $ec_dir."languages/".e_LANGUAGE.".php"; -e107_include_once(file_exists($lan_file) ? $lan_file : e_PLUGIN."clock_menu/languages/English.php"); -if (!defined("e_HTTP")) { - exit; -} + $text = "\n\n\n
 
\n"; if (!isset($clock_flat) || !$clock_flat) { $ns->tablerender($menu_pref['clock_caption'], "
".$text."
", 'clock');