* 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$
*/
var $page_start_hook = ':=NO METHOD=:';
+ /**
+ * Language information array: ('langcode' =>, 'direction' =>, 'charset' =>)
+ * @var array
+ * @access private
+ */
+ var $language = array('langcode' => 'en_US', 'direction' => 'ltr', 'charset' => 'utf-8');
+
/**
* Fields array that is used in this module
* @var array
* @access private
*/
var $fields = array(
- 'realm' => array(REQ_YES, null, false),
- 'page_start_hook' => array(REQ_NO, null, false)
+ 'realm' => array(REQ_YES, null, false)
);
// ###################################################################
$this->registry->do_set($name, $value, 'printer');
}
+ // ###################################################################
+ /**
+ * Gets the language array information
+ *
+ * @access public
+ *
+ * @return array Language array
+ */
+ function getLanguageInformation()
+ {
+ return $this->language;
+ }
+
+ // ###################################################################
+ /**
+ * Sets the language array information
+ *
+ * @access public
+ *
+ * @param array Language array
+ */
+ function setLanguageInformation($lang)
+ {
+ $this->language = $lang;
+ }
+
// ###################################################################
/**
* Gets an ISSO field
*
* @param string Title of the page
* @param string Class of the page to be applied to the body
- * @param integer Margin of the <div> that all content is placed in
* @param string Extra HTML to imbed in the <head> tag
* @param string <body> onLoad action to imbed
- * @param integer Margin of the actual <body > 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
*/
- function page_start($actiontitle, $pageclass = ':default:', $pagemargin = 15, $extra = '', $onload = false, $margin = 0, $dotpath = '.', $override = false)
+ function page_start($actiontitle, $pageclass = null, $extra = '', $onload = false)
{
$this->registry->check_isso_fields(get_class($this));
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 "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
- echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>";
+ echo "<html xml:lang=\"" . $this->language['langcode'] . "\" lang=\"" . $this->language['langcode'] . "\" dir=\"" . $this->language['direction'] . "\">\n<head>";
echo "\n\t<title>$title</title>";
- echo "\n\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />";
+ echo "\n\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=" . $this->language['charset'] . "\" />";
echo $this->css;
echo $this->code;
echo ($extra ? "\n$extra" : '');
- echo "\n</head>\n<body style=\"margin: {$margin}px;\"" . (($pageclass !== ':default:') ? " class=\"$pageclass\"" : '') . (($onload) ? " onload=\"$onload\"" : '') . ">\n";
-
- if (is_callable($this->page_start_hook))
- {
- call_user_func($this->page_start_hook);
- }
-
- echo "<div style=\"margin: {$pagemargin}px;\">\n<!-- / page head -->\n\n";
+ echo "\n</head>\n<body" . ($pageclass != null ? " class=\"$pageclass\"" : '') . ($onload ? " onload=\"$onload\"" : '') . ">\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)))
{
if (!defined('ISSO_PRINTER_HIDE_SETUP'))
{
- echo "\n<!-- page end -->\n</div>\n$copyright";
+ echo "\n$copyright";
echo $this->registry->construct_debug_block(false);
}
- else
- {
- echo "\n<!-- page end -->\n</div>";
- }
echo "\n\n</body>\n</html>";