Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2014
101
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /**
  3.  * @package     Joomla.Site
  4.  * @subpackage  Templates.protostar
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE.txt
  8.  */
  9.  
  10. defined('_JEXEC') or die;
  11.  
  12. // Getting params from template
  13. $params = JFactory::getApplication()->getTemplate(true)->params;
  14.  
  15. $app = JFactory::getApplication();
  16. $doc = JFactory::getDocument();
  17. $this->language = $doc->language;
  18. $this->direction = $doc->direction;
  19.  
  20. // Detecting Active Variables
  21. $option   = $app->input->getCmd('option', '');
  22. $view     = $app->input->getCmd('view', '');
  23. $layout   = $app->input->getCmd('layout', '');
  24. $task     = $app->input->getCmd('task', '');
  25. $itemid   = $app->input->getCmd('Itemid', '');
  26. $sitename = $app->getCfg('sitename');
  27.  
  28. if($task == "edit" || $layout == "form" )
  29. {
  30.     $fullWidth = 1;
  31. }
  32. else
  33. {
  34.     $fullWidth = 0;
  35. }
  36.  
  37. // Add JavaScript Frameworks
  38. JHtml::_('bootstrap.framework');
  39. $doc->addScript('templates/' .$this->template. '/js/template.js');
  40.  
  41. // Add Stylesheets
  42. $doc->addStyleSheet('templates/'.$this->template.'/css/template.css');
  43.  
  44. // Load optional RTL Bootstrap CSS
  45. JHtml::_('bootstrap.loadCss', false, $this->direction);
  46.  
  47. // Add current user information
  48. $user = JFactory::getUser();
  49.  
  50. // Adjusting content width
  51. if ($this->countModules('position-7') && $this->countModules('position-8'))
  52. {
  53.     $span = "span6";
  54. }
  55. elseif ($this->countModules('position-7') && !$this->countModules('position-8'))
  56. {
  57.     $span = "span9";
  58. }
  59. elseif (!$this->countModules('position-7') && $this->countModules('position-8'))
  60. {
  61.     $span = "span9";
  62. }
  63. else
  64. {
  65.     $span = "span12";
  66. }
  67.  
  68. // Logo file or site title param
  69. if ($this->params->get('logoFile'))
  70. {
  71.     $logo = '<img src="'. JUri::root() . $this->params->get('logoFile') .'" alt="'. $sitename .'" />';
  72. }
  73. elseif ($this->params->get('sitetitle'))
  74. {
  75.     $logo = '<span class="site-title" title="'. $sitename .'">'. htmlspecialchars($this->params->get('sitetitle')) .'</span>';
  76. }
  77. else
  78. {
  79.     $logo = '<span class="site-title" title="'. $sitename .'">'. $sitename .'</span>';
  80. }
  81. ?>
  82. <!DOCTYPE html>
  83. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
  84. <head>
  85.     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  86.     <jdoc:include type="head" />
  87.     <?php
  88.     // Use of Google Font
  89.     if ($this->params->get('googleFont'))
  90.     {
  91.     ?>
  92.         <link href='//fonts.googleapis.com/css?family=<?php echo $this->params->get('googleFontName');?>' rel='stylesheet' type='text/css' />
  93.         <style type="text/css">
  94.             h1,h2,h3,h4,h5,h6,.site-title{
  95.                 font-family: '<?php echo str_replace('+', ' ', $this->params->get('googleFontName'));?>', sans-serif;
  96.             }
  97.         </style>
  98.     <?php
  99.     }
  100.     ?>
  101.     <?php
  102.     // Template color
  103.     if ($this->params->get('templateColor'))
  104.     {
  105.     ?>
  106.     <style type="text/css">
  107.         body.site
  108.         {
  109.             border-top: 3px solid <?php echo $this->params->get('templateColor');?>;
  110.             background-color: <?php echo $this->params->get('templateBackgroundColor');?>
  111.         }
  112.         a
  113.         {
  114.             color: <?php echo $this->params->get('templateColor');?>;
  115.         }
  116.         .navbar-inner, .nav-list > .active > a, .nav-list > .active > a:hover, .dropdown-menu li > a:hover, .dropdown-menu .active > a, .dropdown-menu .active > a:hover, .nav-pills > .active > a, .nav-pills > .active > a:hover,
  117.         .btn-primary
  118.         {
  119.             background: <?php echo $this->params->get('templateColor');?>;
  120.         }
  121.         .navbar-inner
  122.         {
  123.             -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, .25), inset 0 -1px 0 rgba(0, 0, 0, .1), inset 0 30px 10px rgba(0, 0, 0, .2);
  124.             -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, .25), inset 0 -1px 0 rgba(0, 0, 0, .1), inset 0 30px 10px rgba(0, 0, 0, .2);
  125.             box-shadow: 0 1px 3px rgba(0, 0, 0, .25), inset 0 -1px 0 rgba(0, 0, 0, .1), inset 0 30px 10px rgba(0, 0, 0, .2);
  126.         }
  127.     </style>
  128.     <?php
  129.     }
  130.     ?>
  131.     <!--[if lt IE 9]>
  132.         <script src="<?php echo $this->baseurl ?>/media/jui/js/html5.js"></script>
  133.     <![endif]-->
  134. </head>
  135.  
  136. <body class="site <?php echo $option
  137.     . ' view-' . $view
  138.     . ($layout ? ' layout-' . $layout : ' no-layout')
  139.     . ($task ? ' task-' . $task : ' no-task')
  140.     . ($itemid ? ' itemid-' . $itemid : '')
  141.     . ($params->get('fluidContainer') ? ' fluid' : '');
  142. ?>">
  143.  
  144.     <!-- Body -->
  145.     <div class="body">
  146.         <div class="container<?php echo ($params->get('fluidContainer') ? '-fluid' : '');?>">
  147.             <!-- Header -->
  148.             <header class="header" role="banner">
  149.                 <div class="header-inner clearfix">
  150.                     <a class="brand pull-left" href="<?php echo $this->baseurl; ?>">
  151.                         <?php echo $logo;?> <?php if ($this->params->get('sitedescription')) { echo '<div class="site-description">'. htmlspecialchars($this->params->get('sitedescription')) .'</div>'; } ?>
  152.                     </a>
  153.                     <div id="nextlogo">
  154.                         <jdoc:include type="modules" name="position-16" />
  155.                     </div>
  156.                     <div class="header-search pull-right">
  157.                         <jdoc:include type="modules" name="position-0" style="none" />
  158.                     </div>
  159.                 </div>
  160.             </header>
  161.             <?php if ($this->countModules('position-1')) : ?>
  162.             <nav class="navigation" role="navigation">
  163.                 <jdoc:include type="modules" name="position-1" style="none" />
  164.             </nav>
  165.             <?php endif; ?>
  166.             <jdoc:include type="modules" name="banner" style="xhtml" />
  167.             <div class="row-fluid">
  168.                 <?php if ($this->countModules('position-8')) : ?>
  169.                 <!-- Begin Sidebar -->
  170.                 <div id="sidebar" class="span3">
  171.                     <div class="sidebar-nav">
  172.                         <jdoc:include type="modules" name="position-8" style="xhtml" />
  173.                     </div>
  174.                 </div>
  175.                 <!-- End Sidebar -->
  176.                 <?php endif; ?>
  177.                 <main id="content" role="main" class="<?php echo $span;?>">
  178.                     <!-- Begin Content -->
  179.                     <jdoc:include type="modules" name="position-3" style="xhtml" />
  180.                     <jdoc:include type="message" />
  181.                     <jdoc:include type="component" />
  182.                     <jdoc:include type="modules" name="position-2" style="none" />
  183.                     <!-- End Content -->
  184.                 </main>
  185.                 <?php if ($this->countModules('position-7')) : ?>
  186.                 <div id="aside" class="span3">
  187.                     <!-- Begin Right Sidebar -->
  188.                     <jdoc:include type="modules" name="position-7" style="well" />
  189.                     <!-- End Right Sidebar -->
  190.                 </div>
  191.                 <?php endif; ?>
  192.             </div>
  193.         </div>
  194.     </div>
  195.     <!-- Footer -->
  196.     <footer class="footer" role="contentinfo">
  197.         <div class="container<?php echo ($params->get('fluidContainer') ? '-fluid' : '');?>">
  198.             <hr />
  199.             <jdoc:include type="modules" name="footer" style="none" />
  200.             <p class="pull-right">
  201.                 <a href="#top" id="back-top">
  202.                     <?php echo JText::_('TPL_PROTOSTAR_BACKTOTOP'); ?>
  203.                 </a>
  204.             </p>
  205.             <p>
  206.                 &copy; <?php echo date('Y'); ?> <?php echo $sitename; ?>
  207.             </p>
  208.         </div>
  209.     </footer>
  210.     <jdoc:include type="modules" name="debug" style="none" />
  211. </body>
  212. </html>
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement