/**
  * Render modal
  * @return string
  */
 public function render()
 {
     $template = new Zo2Html();
     $template->set('modal', $this->getModal());
     $template->set('buttons', $this->buttons);
     return $template->fetch('zo2/modal.php');
 }
 public function render()
 {
     $html = new Zo2Html();
     $logo['standard'] = Zo2Framework::getParam('standard_logo');
     $logo['retina'] = Zo2Framework::getParam('retina_logo');
     $html->set('logo', $logo);
     $html->set('slogan', Zo2Framework::getParam('site_slogan'));
     return $html->fetch('zo2/headerlogo.php');
 }
 public static function field()
 {
     $args = func_get_args();
     $type = array_shift($args);
     $label = array_shift($args);
     $data = array_shift($args);
     if (!isset($data['value'])) {
         $data['value'] = isset($data['default']) ? $data['default'] : '';
     }
     $html = new Zo2Html();
     $html->set('label', $label);
     $html->set('data', $data);
     return $html->fetch('fields/' . $type . '.php');
 }
 /**
  * Render backend
  */
 public function render()
 {
     if ($this->_isAuthorized()) {
         $this->_ajax->addHtml(Zo2Html::_('admin', 'config'), '#zo2-framework');
         $this->_ajax->addExecute('zo2.admin.reInit();');
     }
     $this->_ajax->response();
 }
 public function render()
 {
     $html = new Zo2Html();
     $html->set('showLogo', Zo2Framework::getParam('footer_logo'));
     $html->set('logoUrl', JUri::root(true) . '/plugins/system/zo2/framework/assets/zo2/images/zo2_logo_32x32.png');
     $html->set('copyright', Zo2Framework::getParam('footer_copyright'));
     $html->set('title', 'Zo2 Framework');
     $html->set('link', 'http://www.zootemplate.com/zo2');
     $html->set('gototop', Zo2Framework::getParam('footer_gototop'));
     return $html->fetch('zo2/copyright.php');
 }
 /**
  * Get the html for input
  *
  * @return string
  */
 public function getInput()
 {
     if (!defined('ZO2_LOADED')) {
         return 'Please enable Zo2 Framework plugin';
     } else {
         $html = Zo2Html::_('admin', $this->element['layout']);
         $html = '<div id="zo2-framework" class="zo2-framwork">' . $html . '</div>';
         return $html;
     }
 }
 /**
  * Admin layout builder
  * @return type
  */
 public function builder()
 {
     $assets = Zo2Assets::getInstance();
     $assets->addScript('vendor/bootbox-3.3.0.min.js');
     $assets->addScript('zo2/js/adminlayout.min.js');
     $assets->addStyleSheet('vendor/bootstrap/core/css/bootstrap.gridsystem.css');
     /**
      * @uses    Anything need prepred for display will put here. Do not put process code insite layout template file
      */
     $html = new Zo2Html();
     $params = Zo2Framework::getInstance()->template->params;
     $profile = Zo2Factory::getProfile();
     if (is_object($profile->layout)) {
         $layoutData = $profile->layout->layout;
     } else {
         $layoutData = $profile->layout;
     }
     $html->set('params', $params);
     $html->set('layoutData', $layoutData);
     return $html->fetch('admin/body/sidebar/builder/layout.php');
 }
    <!-- Heading line H1 font-->
    <?php 
echo Zo2Html::field('font', array('label' => JText::_('ZO2_ADMIN_FONT_H1')), array('name' => 'h1_font', 'id' => 'h1_font', 'value' => Zo2Framework::getParam('h1_font')));
?>

    <!-- Heading line H2 font-->
    <?php 
echo Zo2Html::field('font', array('label' => JText::_('ZO2_ADMIN_FONT_H2')), array('name' => 'h2_font', 'id' => 'h2_font', 'value' => Zo2Framework::getParam('h2_font')));
?>

    <!-- Heading line H3 font-->
    <?php 
echo Zo2Html::field('font', array('label' => JText::_('ZO2_ADMIN_FONT_H3')), array('name' => 'h3_font', 'id' => 'h3_font', 'value' => Zo2Framework::getParam('h3_font')));
?>

    <!-- Heading line H4 font-->
    <?php 
echo Zo2Html::field('font', array('label' => JText::_('ZO2_ADMIN_FONT_H4')), array('name' => 'h4_font', 'id' => 'h4_font', 'value' => Zo2Framework::getParam('h4_font')));
?>

    <!-- Heading line H5 font-->
    <?php 
echo Zo2Html::field('font', array('label' => JText::_('ZO2_ADMIN_FONT_H5')), array('name' => 'h5_font', 'id' => 'h5_font', 'value' => Zo2Framework::getParam('h5_font')));
?>

    <!-- Heading line H6 font-->
    <?php 
echo Zo2Html::field('font', array('label' => JText::_('ZO2_ADMIN_FONT_H6')), array('name' => 'h6_font', 'id' => 'h6_font', 'value' => Zo2Framework::getParam('h6_font')));
?>
</div>
 /**
  * Add notice message
  * @param type $message
  * @param type $type
  * @return \Zo2Ajax
  */
 public function addMessage($message, $header = '', $type = 'info')
 {
     switch ($type) {
         case 'error':
         case 'danger':
         case 'alert':
             $messageType = 'error';
             break;
         case 'warning':
             $messageType = 'warning';
             break;
         case 'success':
         case 'message':
         case '':
             $messageType = 'success';
             break;
         default:
             $messageType = 'info';
             break;
     }
     $template = new Zo2Html();
     $template->set('header', $header);
     $template->set('message', $message);
     $template->set('type', $messageType);
     $data = new stdClass();
     $data->message = $template->fetch('zo2/message.php');
     $this->add($data, 'message');
     return $this;
 }
                <div class="zo2-profiles-description">
                    <span><?php 
echo JText::_('ZO2_ADMIN_BUTTON_PROFILE_DESCRIPTION');
?>
</span>
                </div>
                <div class="pull-left">
                    <!-- Profiles -->
                    <div class="zo2-profiles">                                
                        <div class="navbar-form pull-left">
                            <label class="pull-left zo2-name-profile"><?php 
echo JText::_('ZO2_PROFILE');
?>
</label>
                            <?php 
echo Zo2Html::field('profiles', array('label' => JText::_('ZO2_ADMIN_LABEL_SELECT_PROFILE')), array('profile' => $currentProfile, 'profiles' => Zo2Framework::getInstance()->getProfiles()));
?>
                            <button type="button" class="btn btn-primary pull-left" onClick="zo2.admin.profile.modalSaveAs();
                                    return false;">
                                        <?php 
echo JText::_('ZO2_ADMIN_BUTTON_PROFILE_SAVE_AS');
?>
                            </button>
                            <?php 
if ($currentProfile->authorise('rename')) {
    ?>
                                <button type="button" class="btn btn-default pull-left" onClick="zo2.admin.profile.modalRename();
                                        return false;">
                                            <?php 
    echo JText::_('ZO2_ADMIN_BUTTON_PROFILE_RENAME');
    ?>
                        <div class="zo2_themes_label">
                            <?php 
echo JText::_('ZO2_TEMPLATE_THEME_STYLE_BACKGROUND');
?>
                        </div>
                        <?php 
echo Zo2Html::field('radio', array('label' => JText::_('ZO2_ADMIN_GENERAL_LABEL_CHOOSE_LAYOUT'), 'description' => JText::_('ZO2_ADMIN_GENERAL_DESC_CHOOSE_LAYOUT')), array('id' => 'zo2_boxed_style', 'name' => 'zo2_boxed_style', 'value' => $preset_data['boxed']));
?>
                        <div id="background_image_selector" class="zo2_background_and_pattern" <?php 
if ($preset_data['boxed'] == 0) {
    echo 'style="display:none"';
}
?>
>
                            <?php 
echo Zo2Html::field('image', array('label' => JText::_('ZO2_ADMIN_GENERAL_LABEL_BACKGROUND_IMAGE'), 'description' => JText::_('ZO2_ADMIN_GENERAL_DESC_BACKGROUND_IMAGE'), 'class_wrap' => 'zo2-background-image', 'class' => 'zo2-background-image'), array('id' => 'zo2_background_image', 'name' => 'zo2_background_image', 'value' => $preset_data['bg_image']));
?>
                            <hr />
                            <div class="zo2_themes_label">
                                <?php 
echo JText::_('ZO2_TEMPLATE_THEME_PATTERN_BACKGROUND');
?>
                            </div>
                            <div class="zo2_themes_for">
                                <ul class="options background-select">
                                    <?php 
$zPath = Zo2Path::getInstance();
$backgroundsDir = Zo2Factory::getPath("templates://assets/zo2/images/background-patterns");
$bgPatterns = glob($backgroundsDir . '/*.*');
if (count($bgPatterns) > 0) {
    foreach ($bgPatterns as $pattern) {
                            <?php 
echo JText::_('ZO2_ADMIN_MEGA_MENU_ANIMATION_ZOOM');
?>
</option>                        
                        <option value="elastic"
                                <?php 
echo $menuAnimation == 'elastic' ? 'selected="selected"' : '';
?>
 >
                            <?php 
echo JText::_('ZO2_ADMIN_MEGA_MENU_ANIMATION_ELASTIC');
?>
</option>
                    </select>
                </div>
            </div>

            <!-- Duration -->
            <?php 
echo Zo2Html::field('text', array('label' => JText::_('ZO2_ADMIN_MEGA_MENU_DURATION'), 'description' => JText::_('ZO2_ADMIN_MEGA_MENU_DURATION_DESC')), array('name' => 'jform[params][menu_duration]', 'value' => Zo2Framework::getParam('menu_duration', 300), 'default' => 300));
?>

            <!-- Menu type -->           
            <?php 
$model = new Zo2ModelJoomla();
echo Zo2Html::field('megamenu', array(), array('id' => 'jform_params_menu_type', 'name' => 'jform[params][menu_type]', 'value' => Zo2Framework::getParam('menu_type', 'mainmenu'), 'modules' => $model->getModules()));
?>

        </div>
    </div>
</div>
echo Zo2Html::field('text', array('label' => JText::_('ZO2_ADMIN_GENERAL_LABEL_SLOGAN'), 'description' => JText::_('ZO2_ADMIN_GENERAL_DESC_SLOGAN')), array('name' => 'jform[params][site_slogan]', 'value' => Zo2Framework::getParam('site_slogan'), 'placeholder' => 'Zo2 Framework'));
?>
        <!-- Copyright -->        
        <?php 
/**
 * @todo Use JEditor
 */
echo Zo2Html::field('textarea', array('label' => JText::_('ZO2_ADMIN_GENERAL_LABEL_COPYRIGHT'), 'description' => JText::_('ZO2_ADMIN_GENERAL_DESC_COPYRIGHT')), array('name' => 'jform[params][footer_copyright]', 'rows' => 10, 'cols' => 20, 'value' => Zo2Framework::getParam('footer_copyright')));
?>
                        
        <!-- Standard logo -->        
        <?php 
echo Zo2Html::field('image', array('label' => JText::_('ZO2_ADMIN_GENERAL_LABEL_STANDARD_LOGO'), 'description' => JText::_('ZO2_ADMIN_GENERAL_DESC_STANDARD_LOGO'), 'class_wrap' => 'logo-image', 'class' => 'logo-path'), array('id' => 'jform_params_standard_logo', 'name' => 'jform[params][standard_logo]', 'value' => Zo2Framework::getParam('standard_logo')));
?>
  
        <!-- Retina logo -->       
        <?php 
echo Zo2Html::field('image', array('label' => JText::_('ZO2_ADMIN_GENERAL_LABEL_RETINA_LOGO'), 'description' => JText::_('ZO2_ADMIN_GENERAL_DESC_RETINA_LOGO'), 'class_wrap' => 'logo-retina-image', 'class' => 'logo-path'), array('id' => 'jform_params_retina_logo', 'name' => 'jform[params][retina_logo]', 'value' => Zo2Framework::getParam('retina_logo')));
?>
               
        <div class="zo2-divider"></div>     
        <!-- Show "Go to top" -->
        <?php 
echo Zo2Html::field('radio', array('label' => JText::_('ZO2_ADMIN_GENERAL_LABEL_ENABLE_GOTOTOP'), 'description' => JText::_('ZO2_ADMIN_GENERAL_DESC_ENABLE_GOTOTOP')), array('name' => 'jform[params][footer_gototop]', 'value' => Zo2Framework::getParam('footer_gototop')));
?>
        <!-- Show footer logo -->
        <?php 
echo Zo2Html::field('radio', array('label' => JText::_('ZO2_ADMIN_GENERAL_LABEL_ENABLE_FOOTER_LOGO'), 'description' => JText::_('ZO2_ADMIN_GENERAL_DESC_ENABLE_FOOTER_LOGO')), array('name' => 'jform[params][footer_logo]', 'value' => Zo2Framework::getParam('footer_logo')));
?>
    </div>
</div>
 /**
  * Generate html from a column item
  * @param $item
  * @return string
  */
 private function _generateColumn($item)
 {
     /* Check is allowed to show this jdoc */
     if ($this->_checkShowColumn($item)) {
         $jdoc = $item->get('jdoc', 'modules');
         if (trim($jdoc) == '') {
             $jdoc = 'modules';
         }
         $html = '';
         $html .= '<!-- build column: ' . trim($item->get('name', 'unknown')) . ' -->' . "\n\r";
         $html .= '<!-- jdoc: ' . $jdoc . ' - position: ' . $item->get('position') . ' -->';
         $class[] = 'col-md-' . $item->get('span');
         $class[] = 'col-sm-' . $item->get('span');
         if ($item->get('offset') != 0) {
             $class[] = ' col-md-offset-' . $item->get('offset');
         }
         $class = array_merge($class, $item->getVisibilityClass());
         $customClass = explode(' ', $item->get('customClass'));
         $class = array_merge($class, $customClass);
         $class = array_unique($class);
         $gridClass = array();
         /* Find grid core class */
         foreach ($class as $key => $value) {
             if (strpos($value, 'col-xs-') !== false || strpos($value, 'col-sm-') !== false || strpos($value, 'col-md-') !== false || strpos($value, 'col-lg-') !== false) {
                 $subs = explode('-', $value);
                 if (count($subs) == 3) {
                     $gridClass[$subs[0] . '-' . $subs[1]] = $subs[2];
                 }
                 unset($class[$key]);
             }
         }
         foreach ($gridClass as $key => $value) {
             $class[] = $key . '-' . $value;
         }
         $class = array_unique($class);
         /* BEGIN COL */
         $id = JFilterOutput::stringURLSafe(strtolower(trim($item->get('name', $item->get('position')))));
         $id = str_replace('_', '-', $id);
         $html .= '<div id="zo2-' . $id . '" class="' . trim(implode(' ', $class)) . '">';
         switch ($jdoc) {
             case 'component':
                 $html .= '<jdoc:include type="component" />';
                 break;
             case 'message':
                 $html .= '<jdoc:include type="message" />';
                 break;
             case 'modules':
                 /**
                  * old code
                  * @todo position only used to define where is element render not what kind of element
                  */
                 if ($item->get('position') == 'component') {
                     $html .= '<jdoc:include type="component" />';
                 } else {
                     if ($item->get('position') == 'message') {
                         $html .= '<jdoc:include type="message" />';
                     } else {
                         $html .= '<jdoc:include type="modules" name="' . $item->get('position') . '"  style="' . $item->get('style') . '" />';
                     }
                 }
                 /**
                  * @todo need move to correct jdoc
                  */
                 $template = new Zo2Template();
                 switch ($item->get('position')) {
                     case 'footer_copyright':
                     case 'footer-copyright':
                         $html .= Zo2Html::_('copyright', 'render');
                         break;
                     case 'header_logo':
                     case 'header-logo':
                         $html .= Zo2Html::_('headerlogo', 'render');
                         break;
                     case 'mega_menu':
                     case 'mega-menu':
                         /* Display frontend megamenu */
                         $framework = Zo2Framework::getInstance();
                         $megamenu = $framework->displayMegaMenu(Zo2Framework::getInstance()->profile->menu_type);
                         $html .= $megamenu;
                         break;
                 }
                 break;
             case 'megamenu':
                 /* Display frontend megamenu */
                 $framework = Zo2Framework::getInstance();
                 $megamenu = $framework->displayMegaMenu(Zo2Framework::getInstance()->profile->menu_type);
                 $html .= $megamenu;
                 break;
             case 'canvasmenu':
                 $this->set('canvasMenu', $item);
                 $html .= '<span class="button-canvas"><i class="fa fa-2x fa-bars" data-toggle="offcanvas"></i></span>';
                 break;
             default:
                 /**
                  * 3rd addons
                  */
                 if (strpos($jdoc, 'addon-') !== false) {
                     $jdoc = str_replace('addon-', '', $jdoc);
                     $addons = Zo2Factory::getFramework()->getRegisteredAddons();
                     if (isset($addons[$jdoc])) {
                         /**
                          * Prevent evil code
                          */
                         $html .= call_user_func($addons[$jdoc]);
                     }
                 } else {
                 }
         }
         foreach ($item->get('children') as $child) {
             $html .= $this->_buildItem($child);
         }
         /* END COLUMN */
         $html .= '</div>';
         return $html;
     }
 }
?>
        <span>Paste your Google Analytics (or other) tracking code here.<br /> This will be added before the closing body tag in the template. <br/> This should be something like<br /> &#60;script&#62;<br />....<br />&#60;/script&#62;</span>
    </div>
    <!-- Optmization Option -->
    <div class="zo2-divider"></div>
    <h2><?php 
echo JText::_('ZO2_ADMIN_OPTIMIZATION_OPTION');
?>
</h2>
    <div class="zo2-divider"></div>    
    <p>Enable compress CSS/JS. These options only available when Development Mode is off</p>
    <!-- Combine css -->
    <?php 
echo Zo2Html::field('radio', array('label' => JText::_('ZO2_ADMIN_COMBINE_CSS'), 'description' => JText::_('ZO2_ADMIN_COMBINE_CSS_DESC')), array('name' => 'jform[params][combine_css]', 'value' => Zo2Framework::getParam('combine_css'), 'options' => array(array('label' => JText::_('ZO2_YES')), array('label' => JText::_('ZO2_NO')))));
?>
    <!-- Combine js -->
    <?php 
echo Zo2Html::field('radio', array('label' => JText::_('ZO2_ADMIN_COMBINE_JS'), 'description' => JText::_('ZO2_ADMIN_COMBINE_JS_DESC')), array('value' => Zo2Framework::getParam('combine_js'), 'name' => 'jform[params][combine_js]', 'options' => array(array('label' => JText::_('ZO2_YES')), array('label' => JText::_('ZO2_NO')))));
?>
   
    <!-- Development mode -->
    <div class="zo2-divider"></div>  
 	<h2><?php 
echo JText::_('ZO2_ADMIN_DEVELOPMENT_OPTION');
?>
</h2>    
 	<div class="zo2-divider"></div>   
    <?php 
echo Zo2Html::field('radio', array('label' => JText::_('ZO2_ADMIN_ADVANCED_LABEL_DEVELOPMENT_MODE'), 'description' => JText::_('ZO2_ADMIN_ADVANCED_DESC_DEVELOPMENT_MODE')), array('name' => 'jform[params][development_mode]', 'value' => Zo2Framework::getParam('development_mode')));
?>
</div>
 * Zo2 (http://www.zootemplate.com/zo2)
 * A powerful Joomla template framework
 *
 * @version     1.4.3
 * @since       1.4.3
 * @uses        For Joomla! 3.x
 * @link        http://www.zootemplate.com/zo2
 * @link        https://github.com/cleversoft/zo2
 * @author      ZooTemplate <http://zootemplate.com>
 * @copyright   Copyright (c) 2014 CleverSoft (http://cleversoft.co/)
 * @license     GPL v2
 */
defined('_JEXEC') or die('Restricted access');
?>
<!------------ Layout Builder -------------->
<div class="tab-pane" id="zo2-layout">
    <h2><?php 
echo JText::_('ZO2_ADMIN_LAYOUT_BUILDER');
?>
</h2>
    <div class="zo2-divider"></div>

    <?php 
echo Zo2Html::field('description', null, array('text' => JText::_('ZO2_ADMIN_DESCRIPTION_LAYOUTS'), 'subtext' => '<a href="http://docs.zootemplate.com/category/zo2/layoutbuilder">Document</a>'));
?>

    <?php 
echo Zo2Html::_('admin', 'builder');
?>
   
</div>