Files
@ f43d1a4680a9
Branch filter:
Location: hot67beta/libraries/joomla/document/html/renderer/head.php - annotation
f43d1a4680a9
4.2 KiB
text/x-php
menubar 0 to 10
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 c7d7e38b2269 | <?php
/**
* @version $Id: head.php 10707 2008-08-21 09:52:47Z eddieajau $
* @package Joomla.Framework
* @subpackage Document
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// Check to ensure this file is within the rest of the framework
defined('JPATH_BASE') or die();
/**
* JDocument head renderer
*
* @package Joomla.Framework
* @subpackage Document
* @since 1.5
*/
class JDocumentRendererHead extends JDocumentRenderer
{
/**
* Renders the document head and returns the results as a string
*
* @access public
* @param string $name (unused)
* @param array $params Associative array of values
* @return string The output of the script
*/
function render( $head = null, $params = array(), $content = null )
{
ob_start();
echo $this->fetchHead($this->_doc);
$contents = ob_get_contents();
ob_end_clean();
return $contents;
}
/**
* Generates the head html and return the results as a string
*
* @access public
* @return string
*/
function fetchHead(&$document)
{
// get line endings
$lnEnd = $document->_getLineEnd();
$tab = $document->_getTab();
$tagEnd = ' />';
$strHtml = '';
// Generate base tag (need to happen first)
$base = $document->getBase();
if(!empty($base)) {
$strHtml .= $tab.'<base href="'.$document->getBase().'" />'.$lnEnd;
}
// Generate META tags (needs to happen as early as possible in the head)
foreach ($document->_metaTags as $type => $tag)
{
foreach ($tag as $name => $content)
{
if ($type == 'http-equiv') {
$strHtml .= $tab.'<meta http-equiv="'.$name.'" content="'.$content.'"'.$tagEnd.$lnEnd;
} elseif ($type == 'standard') {
$strHtml .= $tab.'<meta name="'.$name.'" content="'.$content.'"'.$tagEnd.$lnEnd;
}
}
}
$strHtml .= $tab.'<meta name="description" content="'.$document->getDescription().'" />'.$lnEnd;
$strHtml .= $tab.'<meta name="generator" content="'.$document->getGenerator().'" />'.$lnEnd;
$strHtml .= $tab.'<title>'.htmlspecialchars($document->getTitle()).'</title>'.$lnEnd;
// Generate link declarations
foreach ($document->_links as $link) {
$strHtml .= $tab.$link.$tagEnd.$lnEnd;
}
// Generate stylesheet links
foreach ($document->_styleSheets as $strSrc => $strAttr )
{
$strHtml .= $tab . '<link rel="stylesheet" href="'.$strSrc.'" type="'.$strAttr['mime'].'"';
if (!is_null($strAttr['media'])){
$strHtml .= ' media="'.$strAttr['media'].'" ';
}
if ($temp = JArrayHelper::toString($strAttr['attribs'])) {
$strHtml .= ' '.$temp;;
}
$strHtml .= $tagEnd.$lnEnd;
}
// Generate stylesheet declarations
foreach ($document->_style as $type => $content)
{
$strHtml .= $tab.'<style type="'.$type.'">'.$lnEnd;
// This is for full XHTML support.
if ($document->_mime == 'text/html' ) {
$strHtml .= $tab.$tab.'<!--'.$lnEnd;
} else {
$strHtml .= $tab.$tab.'<![CDATA['.$lnEnd;
}
$strHtml .= $content . $lnEnd;
// See above note
if ($document->_mime == 'text/html' ) {
$strHtml .= $tab.$tab.'-->'.$lnEnd;
} else {
$strHtml .= $tab.$tab.']]>'.$lnEnd;
}
$strHtml .= $tab.'</style>'.$lnEnd;
}
// Generate script file links
foreach ($document->_scripts as $strSrc => $strType) {
$strHtml .= $tab.'<script type="'.$strType.'" src="'.$strSrc.'"></script>'.$lnEnd;
}
// Generate script declarations
foreach ($document->_script as $type => $content)
{
$strHtml .= $tab.'<script type="'.$type.'">'.$lnEnd;
// This is for full XHTML support.
if ($document->_mime != 'text/html' ) {
$strHtml .= $tab.$tab.'<![CDATA['.$lnEnd;
}
$strHtml .= $content.$lnEnd;
// See above note
if ($document->_mime != 'text/html' ) {
$strHtml .= $tab.$tab.'// ]]>'.$lnEnd;
}
$strHtml .= $tab.'</script>'.$lnEnd;
}
foreach($document->_custom as $custom) {
$strHtml .= $tab.$custom.$lnEnd;
}
return $strHtml;
}
}
|