From d2d9fb31550d213dedb34829c972fb2533467691 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 11 Oct 2006 02:36:17 +0000 Subject: [PATCH] Merging changes from r667 to the trunk --- printer.css.php | 2 ++ printer.php | 67 ++++++++++++++++++++++++++----------------------- 2 files changed, 38 insertions(+), 31 deletions(-) diff --git a/printer.css.php b/printer.css.php index 9664687..f1640e0 100755 --- a/printer.css.php +++ b/printer.css.php @@ -73,6 +73,8 @@ body color: rgb(96, 106, 90); background-color: rgb(232, 255, 198); + + padding: 15px; } /* Border area around tables and inbetween spacing */ diff --git a/printer.php b/printer.php index 36dff0c..8b5dd07 100644 --- a/printer.php +++ b/printer.php @@ -39,10 +39,6 @@ * box) from being printed * ISSO_PRINTER_NO_NAVIGATION - Do not show the navigation frame from ISSO.Printer.Navigation * -* Hooks: -* $this->page_start_hook - Define function to echo() data after the page header -* has been outputted -* * @author Blue Static * @copyright Copyright ©2002 - [#]year[#], Blue Static * @version $Revision$ @@ -81,13 +77,18 @@ class Printer */ private $page_start_hook = ':=NO METHOD=:'; + /** + * Language information array: ('langcode' =>, 'direction' =>, 'charset' =>) + * @var array + */ + private $language = array('langcode' => 'en_US', 'direction' => 'ltr', 'charset' => 'utf-8'); + /** * Fields array that is used in this module * @var array */ private $fields = array( - 'realm' => array(REQ_YES, null, false), - 'page_start_hook' => array(REQ_NO, null, false) + 'realm' => array(REQ_YES, null, false) ); // ################################################################### @@ -111,6 +112,28 @@ class Printer $this->registry->do_set($name, $value, 'printer'); } + // ################################################################### + /** + * Gets the language array information + * + * @return array Language array + */ + public function getLanguageInformation() + { + return $this->language; + } + + // ################################################################### + /** + * Sets the language array information + * + * @param array Language array + */ + public function setLanguageInformation($lang) + { + $this->language = $lang; + } + // ################################################################### /** * Gets an ISSO field @@ -253,14 +276,10 @@ JS; * * @param string Title of the page * @param string Class of the page to be applied to the body - * @param integer Margin of the
that all content is placed in * @param string Extra HTML to imbed in the tag * @param string onLoad action to imbed - * @param integer Margin of the actual tag - * @param string Relative path where the CSS data is stored - * @param bool Will force re-print the header if it has already been printed */ - public function page_start($actiontitle, $pageclass = ':default:', $pagemargin = 15, $extra = '', $onload = false, $margin = 0, $dotpath = '.', $override = false) + public function page_start($actiontitle, $pageclass = null, $extra = '', $onload = false) { $this->registry->check_isso_fields(get_class($this)); @@ -269,31 +288,21 @@ JS; ob_start(); } - if (defined('ISSO_PRINTER_DONE_HEADER') AND !$override) + if (defined('ISSO_PRINTER_DONE_HEADER') AND constant('ISSO_PRINTER_DONE_HEADER')) { - if (constant('ISSO_PRINTER_DONE_HEADER') AND !$override) - { - return; - } + return; } $title = sprintf($this->registry->modules['localize']->string('%1$s - %2$s - %3$s'), $this->registry->application, $this->realm, $actiontitle); echo "\n"; - echo "\n"; + echo "language['langcode'] . "\" lang=\"" . $this->language['langcode'] . "\" dir=\"" . $this->language['direction'] . "\">\n"; echo "\n\t$title"; - echo "\n\t"; + echo "\n\t"; echo $this->css; echo $this->code; echo ($extra ? "\n$extra" : ''); - echo "\n\n\n"; - - if (is_callable($this->page_start_hook)) - { - call_user_func($this->page_start_hook); - } - - echo "
\n\n\n"; + echo "\n\n\n"; if ($this->registry->is_loaded('printer_navigation') AND (!defined('ISSO_PRINTER_NO_NAVIGATION') OR (defined('ISSO_PRINTER_NO_NAVIGATION') AND constant('ISSO_PRINTER_NO_NAVIGATION') != true))) { @@ -435,13 +444,9 @@ JS; if (!defined('ISSO_PRINTER_HIDE_SETUP')) { - echo "\n\n
\n$copyright"; + echo "\n$copyright"; echo $this->registry->construct_debug_block(false); } - else - { - echo "\n\n
"; - } echo "\n\n\n"; -- 2.43.5