function azuracontactform_sc($atts, $content = "")
 {
     extract(shortcode_atts(array('title' => '', 'introduction' => '', 'receiveemail' => '', 'emailsubject' => '', 'thanksmessage' => '', 'showwebsite' => '', 'sendascopy' => '', 'layout' => ''), $atts));
     $styleArr = shortcode_atts(array('margin_top' => '', 'margin_right' => '', 'margin_bottom' => '', 'margin_left' => '', 'border_top_width' => '', 'border_right_width' => '', 'border_bottom_width' => '', 'border_left_width' => '', 'padding_top' => '', 'padding_right' => '', 'padding_bottom' => '', 'padding_left' => '', 'border_color' => '', 'border_style' => '', 'background_color' => '', 'background_image' => '', 'background_repeat' => '', 'background_attachment' => '', 'background_size' => '', 'additional_style' => '', 'simplified' => ''), $atts);
     $styleTextArr = CthShortcodes::parseStyle($styleArr);
     $contactformstyle = '';
     $styleText = implode(" ", $styleTextArr);
     $styleTextTest = trim($styleText);
     if (!empty($styleTextTest)) {
         $contactformstyle .= trim($styleText);
     }
     if (!empty($contactformstyle)) {
         $contactformstyle = 'style="' . $contactformstyle . '"';
     }
     $animationArgs = shortcode_atts(array('animation' => '0', 'trigger' => 'animate-in', 'animationtype' => '', 'hoveranimationtype' => '', 'infinite' => '0', 'animationdelay' => '0'), $atts);
     $shortcodeTemp = false;
     if (stripos($layout, '_:') !== false) {
         $shortcodeTemp = JPATH_PLUGINS . '/system/cthshortcodes/shortcodes_template/' . substr($layout, 2) . '.php';
     } else {
         if (stripos($layout, ':') !== false) {
             $shortcodeTemp = JPATH_THEMES . '/' . JFactory::getApplication()->getTemplate() . '/html/com_azurapagebuilder/plugin/shortcodes_template/' . substr($layout, stripos($layout, ':') + 1) . '.php';
         } else {
             $shortcodeTemp = CthShortcodes::addShortcodeTemplate('azuracontactform');
         }
     }
     $buffer = ob_get_clean();
     ob_start();
     if ($shortcodeTemp !== false) {
         require $shortcodeTemp;
     }
     $content = ob_get_clean();
     ob_start();
     echo $buffer;
     return $content;
 }
 function azurabxslider_sc($atts, $content = "")
 {
     extract(shortcode_atts(array('id' => '', 'class' => 'bxslider', 'mode' => 'horizontal', 'speed' => '500', 'slidemargin' => '0', 'startslide' => '0', 'randomstart' => '0', 'slideselector' => '', 'infiniteloop' => '1', 'hidecontrolonend' => '0', 'easing' => 'null', 'captions' => '0', 'ticker' => '0', 'tickerhover' => '0', 'adaptiveheight' => '0', 'adaptiveheightspeed' => '500', 'video' => '0', 'responsive' => '1', 'usecss' => '1', 'preloadimages' => 'visible', 'touchenabled' => '1', 'swipethreshold' => '50', 'onetoonetouch' => '1', 'preventdefaultswipex' => '1', 'preventdefaultswipey' => '0', 'pager' => '1', 'pagertype' => 'full', 'pagershortseparator' => '/', 'pagerselector' => '', 'pagercustom' => 'null', 'buildpager' => 'null', 'controls' => '1', 'nexttext' => 'Next', 'prevtext' => 'Prev', 'nextselector' => 'null', 'prevselector' => 'null', 'autocontrols' => '0', 'starttext' => 'Start', 'stoptext' => 'Stop', 'autocontrolscombine' => '0', 'autocontrolsselector' => 'null', 'auto' => '0', 'pause' => '4000', 'autostart' => '1', 'autodirection' => 'next', 'autohover' => '0', 'autodelay' => '0', 'minslides' => '1', 'maxslides' => '1', 'moveslides' => '0', 'slidewidth' => '0', 'layout' => ''), $atts));
     $styleArr = shortcode_atts(array('margin_top' => '', 'margin_right' => '', 'margin_bottom' => '', 'margin_left' => '', 'border_top_width' => '', 'border_right_width' => '', 'border_bottom_width' => '', 'border_left_width' => '', 'padding_top' => '', 'padding_right' => '', 'padding_bottom' => '', 'padding_left' => '', 'border_color' => '', 'border_style' => '', 'background_color' => '', 'background_image' => '', 'background_repeat' => '', 'background_attachment' => '', 'background_size' => '', 'additional_style' => '', 'simplified' => ''), $atts);
     $styleTextArr = CthShortcodes::parseStyle($styleArr);
     $bxsliderstyle = '';
     $styleText = implode(" ", $styleTextArr);
     $styleTextTest = trim($styleText);
     if (!empty($styleTextTest)) {
         $bxsliderstyle .= trim($styleText);
     }
     if (!empty($bxsliderstyle)) {
         $bxsliderstyle = 'style="' . $bxsliderstyle . '"';
     }
     $animationArgs = shortcode_atts(array('animation' => '0', 'trigger' => 'animate-in', 'animationtype' => '', 'hoveranimationtype' => '', 'infinite' => '0', 'animationdelay' => '0'), $atts);
     $shortcodeTemp = false;
     if (stripos($layout, '_:') !== false) {
         $shortcodeTemp = JPATH_PLUGINS . '/system/cthshortcodes/shortcodes_template/' . substr($layout, 2) . '.php';
     } else {
         if (stripos($layout, ':') !== false) {
             $shortcodeTemp = JPATH_THEMES . '/' . JFactory::getApplication()->getTemplate() . '/html/com_azurapagebuilder/plugin/shortcodes_template/' . substr($layout, stripos($layout, ':') + 1) . '.php';
         } else {
             $shortcodeTemp = CthShortcodes::addShortcodeTemplate('azurabxslider');
         }
     }
     $buffer = ob_get_clean();
     ob_start();
     if ($shortcodeTemp !== false) {
         require $shortcodeTemp;
     }
     $content = ob_get_clean();
     ob_start();
     echo $buffer;
     return $content;
 }
 function onAfterRender()
 {
     $app = JFactory::getApplication();
     $doc = JFactory::getDocument();
     if ($app->getName() != 'site' || $doc->getType() !== 'html') {
         return true;
     }
     $data = $app->getBody();
     if ($this->params->get('useAnywhere', '0') == '1') {
         $data = do_shortcode($data);
     }
     $headerStyles = CthShortcodes::getInstance()->_headerStyles;
     $headerScripts = CthShortcodes::getInstance()->_headerScripts;
     $footerScripts = CthShortcodes::getInstance()->_footerScripts;
     $footerScriptsScript = CthShortcodes::getInstance()->_footerScriptsScript;
     $headerStyles = array_unique($headerStyles);
     $headerScripts = array_unique($headerScripts);
     $footerScripts = array_unique($footerScripts);
     $header_styles_scripts = '';
     foreach ($headerStyles as $style) {
         $header_styles_scripts .= '<link rel="stylesheet" href="' . $style . '" />' . "\n";
     }
     foreach ($headerScripts as $script) {
         $header_styles_scripts .= '<script type="text/javascript" src="' . $script . '"></script>' . "\n";
     }
     $data = str_replace('</head>', $header_styles_scripts . "\n</head>", $data);
     $footer_scripts = '';
     foreach ($footerScripts as $script) {
         $footer_scripts .= '<script type="text/javascript" src="' . $script . '"></script>' . "\n";
     }
     $footer_scripts .= '<script type="text/javascript">' . $footerScriptsScript . '</script>';
     $data = str_replace('</body>', $footer_scripts . "\n</body>", $data);
     $app->setBody($data);
 }
Exemple #4
0
 function azuragmap_sc($atts, $content = "")
 {
     extract(shortcode_atts(array('id' => '', 'class' => '', 'gmaplat' => '', 'gmaplog' => '', 'gmappancontrol' => '', 'gmapzoomcontrol' => '', 'gmaptypecontrol' => '', 'gmapstreetviewcontrol' => '', 'gmapscrollwheel' => '', 'gmapzoom' => '', 'gmaptypeid' => ''), $atts));
     $styleArr = shortcode_atts(array('margin_top' => '', 'margin_right' => '', 'margin_bottom' => '', 'margin_left' => '', 'border_top_width' => '', 'border_right_width' => '', 'border_bottom_width' => '', 'border_left_width' => '', 'padding_top' => '', 'padding_right' => '', 'padding_bottom' => '', 'padding_left' => '', 'border_color' => '', 'border_style' => '', 'background_color' => '', 'background_image' => '', 'background_repeat' => '', 'background_attachment' => '', 'background_size' => '', 'additional_style' => '', 'simplified' => ''), $atts);
     $styleTextArr = CthShortcodes::parseStyle($styleArr);
     $gmapstyle = '';
     $styleText = implode(" ", $styleTextArr);
     $styleTextTest = trim($styleText);
     if (!empty($styleTextTest)) {
         $gmapstyle .= trim($styleText);
     }
     if (!empty($gmapstyle)) {
         $gmapstyle = 'style="' . $gmapstyle . '"';
     }
     $animationArgs = shortcode_atts(array('animation' => '0', 'trigger' => 'animate-in', 'animationtype' => '', 'hoveranimationtype' => '', 'infinite' => '0', 'animationdelay' => '0'), $atts);
     $shortcodeTemp = false;
     $shortcodeTemp = CthShortcodes::addShortcodeTemplate('azuragmap');
     $buffer = ob_get_clean();
     ob_start();
     if ($shortcodeTemp !== false) {
         require $shortcodeTemp;
     }
     $content = ob_get_clean();
     ob_start();
     echo $buffer;
     return $content;
 }
Exemple #5
0
 function azurahtml_sc($atts, $content = "")
 {
     $styleArr = shortcode_atts(array('margin_top' => '', 'margin_right' => '', 'margin_bottom' => '', 'margin_left' => '', 'border_top_width' => '', 'border_right_width' => '', 'border_bottom_width' => '', 'border_left_width' => '', 'padding_top' => '', 'padding_right' => '', 'padding_bottom' => '', 'padding_left' => '', 'border_color' => '', 'border_style' => '', 'background_color' => '', 'background_image' => '', 'background_repeat' => '', 'background_attachment' => '', 'background_size' => '', 'additional_style' => '', 'simplified' => ''), $atts);
     $styleTextArr = CthShortcodes::parseStyle($styleArr);
     $htmlstyle = '';
     $styleText = implode(" ", $styleTextArr);
     $styleTextTest = trim($styleText);
     if (!empty($styleTextTest)) {
         $htmlstyle .= trim($styleText);
     }
     if (!empty($htmlstyle)) {
         $htmlstyle = 'style="' . $htmlstyle . '"';
     }
     $animationArgs = shortcode_atts(array('animation' => '0', 'trigger' => 'animate-in', 'animationtype' => '', 'hoveranimationtype' => '', 'infinite' => '0', 'animationdelay' => '0'), $atts);
     $animationData = '';
     if ($animationArgs['animation'] == '1') {
         if ($animationArgs['trigger'] == 'animate-in') {
             $class = $animationArgs['trigger'];
             $animationData = 'data-anim-type="' . $animationArgs['animationtype'] . '" data-anim-delay="' . $animationArgs['animationdelay'] . '"';
         } else {
             $classes = $animationArgs['trigger'] . '-' . $animationArgs['hoveranimationtype'];
             if ($animationArgs['infinite'] != '0') {
                 $class .= ' infinite';
             }
         }
     }
     if (!empty($class)) {
         $class = 'class="' . $class . '"';
     }
     if (empty($htmlstyle) && empty($class) && empty($animationData)) {
         return do_shortcode($content);
     } else {
         return '<div ' . $class . ' ' . $htmlstyle . ' ' . $animationData . '>' . do_shortcode($content) . '</div>';
     }
 }
 function azurabscarousel_item_sc($atts, $content = "")
 {
     global $bsCarouselItemArray;
     global $bsCarouselItem;
     extract(shortcode_atts(array('id' => '', 'class' => '', 'image' => '', 'layout' => ''), $atts));
     $bsCarouselItemArray[] = array('id' => $id, 'class' => $class, 'image' => $image, 'layout' => $layout, 'content' => $content);
     if (!isset($bsCarouselItem)) {
         $bsCarouselItem = 0;
     }
     $shortcodeTemp = false;
     if (stripos($layout, '_:') !== false) {
         $shortcodeTemp = JPATH_PLUGINS . '/system/cthshortcodes/shortcodes_template/' . substr($layout, 2) . '.php';
     } else {
         if (stripos($layout, ':') !== false) {
             $shortcodeTemp = CthShortcodes::templatePath() . '/html/com_azurapagebuilder/plugin/shortcodes_template/' . substr($layout, stripos($layout, ':') + 1) . '.php';
         } else {
             $shortcodeTemp = CthShortcodes::addShortcodeTemplate('azurabscarouselitem');
         }
     }
     $buffer = ob_get_clean();
     ob_start();
     if ($shortcodeTemp !== false) {
         require $shortcodeTemp;
     }
     $content = ob_get_clean();
     ob_start();
     echo $buffer;
     $bsCarouselItem++;
     return $content;
 }
 function azurabscarousel_sc($atts, $content = "")
 {
     global $bsCarouselItemArray;
     global $bsCarouselItem;
     extract(shortcode_atts(array('id' => '', 'class' => '', 'interval' => '5000', 'pause' => 'hover', 'wrap' => '1', 'navigation' => '1', 'pagination' => '1', 'layout' => ''), $atts));
     $shortcodeTemp = false;
     if (stripos($layout, '_:') !== false) {
         $shortcodeTemp = JPATH_PLUGINS . '/system/cthshortcodes/shortcodes_template/' . substr($layout, 2) . '.php';
     } else {
         if (stripos($layout, ':') !== false) {
             $shortcodeTemp = CthShortcodes::templatePath() . '/html/com_azurapagebuilder/plugin/shortcodes_template/' . substr($layout, stripos($layout, ':') + 1) . '.php';
         } else {
             $shortcodeTemp = CthShortcodes::addShortcodeTemplate('azurabscarousel');
         }
     }
     $buffer = ob_get_clean();
     ob_start();
     if ($shortcodeTemp !== false) {
         require $shortcodeTemp;
     }
     $content = ob_get_clean();
     ob_start();
     echo $buffer;
     $bsCarouselItemArray = array();
     $bsCarouselItem = null;
     return $content;
 }
 function azuraflexslider_sc($atts, $content = "")
 {
     extract(shortcode_atts(array('id' => '', 'class' => '', 'namespace' => 'flex-', 'selector' => '.slides > li', 'animation' => 'fade', 'easing' => 'swing', 'direction' => 'horizontal', 'reverse' => '0', 'animationloop' => '1', 'smoothheight' => '0', 'startat' => '0', 'slideshow' => '1', 'slideshowspeed' => '7000', 'animationspeed' => '600', 'initdelay' => '0', 'randomize' => '0', 'pauseonaction' => '1', 'pauseonhover' => '0', 'usecss' => '1', 'touch' => '1', 'video' => '0', 'controlnav' => '1', 'directionnav' => '1', 'prevtext' => 'Previous', 'nexttext' => 'Next', 'keyboard' => '1', 'multiplekeyboard' => '0', 'mousewheel' => '0', 'pauseplay' => '0', 'pausetext' => 'Pause', 'playtext' => 'Play', 'sync' => '', 'asnavfor' => '', 'itemwidth' => '0', 'itemmargin' => '0', 'minitems' => '0', 'maxitems' => '0', 'move' => '0', 'usejsplugin' => '0', 'layout' => ''), $atts));
     $styleArr = shortcode_atts(array('margin_top' => '', 'margin_right' => '', 'margin_bottom' => '', 'margin_left' => '', 'border_top_width' => '', 'border_right_width' => '', 'border_bottom_width' => '', 'border_left_width' => '', 'padding_top' => '', 'padding_right' => '', 'padding_bottom' => '', 'padding_left' => '', 'border_color' => '', 'border_style' => '', 'background_color' => '', 'background_image' => '', 'background_repeat' => '', 'background_attachment' => '', 'background_size' => '', 'additional_style' => '', 'simplified' => ''), $atts);
     $styleTextArr = CthShortcodes::parseStyle($styleArr);
     $flexsliderstyle = '';
     $styleText = implode(" ", $styleTextArr);
     $styleTextTest = trim($styleText);
     if (!empty($styleTextTest)) {
         $flexsliderstyle .= trim($styleText);
     }
     if (!empty($flexsliderstyle)) {
         $flexsliderstyle = 'style="' . $flexsliderstyle . '"';
     }
     $animationArgs = shortcode_atts(array('animation' => '0', 'trigger' => 'animate', 'animationtype' => '', 'animationdelay' => ''), $atts);
     $shortcodeTemp = false;
     if (stripos($layout, '_:') !== false) {
         $shortcodeTemp = JPATH_PLUGINS . '/system/cthshortcodes/shortcodes_template/' . substr($layout, 2) . '.php';
     } else {
         if (stripos($layout, ':') !== false) {
             $shortcodeTemp = CthShortcodes::templatePath() . '/html/com_azurapagebuilder/plugin/shortcodes_template/' . substr($layout, stripos($layout, ':') + 1) . '.php';
         } else {
             $shortcodeTemp = CthShortcodes::addShortcodeTemplate('azuraflexslider');
         }
     }
     $buffer = ob_get_clean();
     ob_start();
     if ($shortcodeTemp !== false) {
         require $shortcodeTemp;
     }
     $content = ob_get_clean();
     ob_start();
     echo $buffer;
     return $content;
 }
 function azuracarouselslider_sc($atts, $content = "")
 {
     extract(shortcode_atts(array('id' => '', 'class' => '', 'transtyle' => '', 'sliderspeed' => '', 'rewindspeed' => '', 'slideperview' => '', 'itemscustom' => '', 'autoplay' => '', 'pagination' => '', 'paginationspeed' => '', 'navigation' => '', 'autoheight' => '', 'mousedrag' => '', 'touchdrag' => '', 'layout' => ''), $atts));
     $styleArr = shortcode_atts(array('margin_top' => '', 'margin_right' => '', 'margin_bottom' => '', 'margin_left' => '', 'border_top_width' => '', 'border_right_width' => '', 'border_bottom_width' => '', 'border_left_width' => '', 'padding_top' => '', 'padding_right' => '', 'padding_bottom' => '', 'padding_left' => '', 'border_color' => '', 'border_style' => '', 'background_color' => '', 'background_image' => '', 'background_repeat' => '', 'background_attachment' => '', 'background_size' => '', 'additional_style' => '', 'simplified' => ''), $atts);
     $styleTextArr = CthShortcodes::parseStyle($styleArr);
     $carouselsliderstyle = '';
     $styleText = implode(" ", $styleTextArr);
     $styleTextTest = trim($styleText);
     if (!empty($styleTextTest)) {
         $carouselsliderstyle .= trim($styleText);
     }
     if (!empty($carouselsliderstyle)) {
         $carouselsliderstyle = 'style="' . $carouselsliderstyle . '"';
     }
     $animationArgs = shortcode_atts(array('animation' => '0', 'trigger' => 'animate-in', 'animationtype' => '', 'hoveranimationtype' => '', 'infinite' => '0', 'animationdelay' => '0'), $atts);
     $shortcodeTemp = false;
     if (stripos($layout, '_:') !== false) {
         $shortcodeTemp = JPATH_PLUGINS . '/system/cthshortcodes/shortcodes_template/' . substr($layout, 2) . '.php';
     } else {
         if (stripos($layout, ':') !== false) {
             $shortcodeTemp = JPATH_THEMES . '/' . JFactory::getApplication()->getTemplate() . '/html/com_azurapagebuilder/plugin/shortcodes_template/' . substr($layout, stripos($layout, ':') + 1) . '.php';
         } else {
             $shortcodeTemp = CthShortcodes::addShortcodeTemplate('azuracarouselslider');
         }
     }
     $buffer = ob_get_clean();
     ob_start();
     if ($shortcodeTemp !== false) {
         require $shortcodeTemp;
     }
     $content = ob_get_clean();
     ob_start();
     echo $buffer;
     return $content;
 }
 function azurabxslider_item_sc($atts, $content = "")
 {
     extract(shortcode_atts(array('id' => '', 'class' => '', 'slideimage' => '', 'layout' => ''), $atts));
     $styleArr = shortcode_atts(array('margin_top' => '', 'margin_right' => '', 'margin_bottom' => '', 'margin_left' => '', 'border_top_width' => '', 'border_right_width' => '', 'border_bottom_width' => '', 'border_left_width' => '', 'padding_top' => '', 'padding_right' => '', 'padding_bottom' => '', 'padding_left' => '', 'border_color' => '', 'border_style' => '', 'background_color' => '', 'background_image' => '', 'background_repeat' => '', 'background_attachment' => '', 'background_size' => '', 'additional_style' => '', 'simplified' => ''), $atts);
     $styleTextArr = CthShortcodes::parseStyle($styleArr);
     $bxslideritemstyle = '';
     $styleText = implode(" ", $styleTextArr);
     $styleTextTest = trim($styleText);
     if (!empty($styleTextTest)) {
         $bxslideritemstyle .= trim($styleText);
     }
     if (!empty($bxslideritemstyle)) {
         $bxslideritemstyle = 'style="' . $bxslideritemstyle . '"';
     }
     $shortcodeTemp = false;
     if (stripos($layout, '_:') !== false) {
         $shortcodeTemp = JPATH_PLUGINS . '/system/cthshortcodes/shortcodes_template/' . substr($layout, 2) . '.php';
     } else {
         if (stripos($layout, ':') !== false) {
             $shortcodeTemp = JPATH_THEMES . '/' . JFactory::getApplication()->getTemplate() . '/html/com_azurapagebuilder/plugin/shortcodes_template/' . substr($layout, stripos($layout, ':') + 1) . '.php';
         } else {
             $shortcodeTemp = CthShortcodes::addShortcodeTemplate('azurabxslideritem');
         }
     }
     $buffer = ob_get_clean();
     ob_start();
     if ($shortcodeTemp !== false) {
         require $shortcodeTemp;
     }
     $content = ob_get_clean();
     ob_start();
     echo $buffer;
     return $content;
 }
Exemple #11
0
 function azuramodule_sc($atts, $content = "")
 {
     extract(shortcode_atts(array('id' => '', 'class' => '', 'moduleid' => '', 'showtitle' => '', 'style' => 'none', 'layout' => ''), $atts));
     if ($moduleid == '0' || $moduleid == '') {
         return false;
     }
     $module = CthShortcodes::loadModule($moduleid, $style);
     $shortcodeTemp = false;
     if (stripos($layout, '_:') !== false) {
         $shortcodeTemp = JPATH_PLUGINS . '/system/cthshortcodes/shortcodes_template/' . substr($layout, 2) . '.php';
     } else {
         if (stripos($layout, ':') !== false) {
             $shortcodeTemp = CthShortcodes::templatePath() . '/html/com_azurapagebuilder/plugin/shortcodes_template/' . substr($layout, stripos($layout, ':') + 1) . '.php';
         } else {
             $shortcodeTemp = CthShortcodes::addShortcodeTemplate('azuramodule');
         }
     }
     $buffer = ob_get_clean();
     ob_start();
     if ($shortcodeTemp !== false) {
         require $shortcodeTemp;
     }
     $content = ob_get_clean();
     ob_start();
     echo $buffer;
     return $content;
 }
 function azuratestimonial_sc($atts, $content = "")
 {
     extract(shortcode_atts(array('id' => '', 'class' => 'pesbox', 'name' => '', 'email' => '', 'avatar' => '', 'position' => '', 'review' => '5', 'layout' => ''), $atts));
     $styleArr = shortcode_atts(array('margin_top' => '', 'margin_right' => '', 'margin_bottom' => '', 'margin_left' => '', 'border_top_width' => '', 'border_right_width' => '', 'border_bottom_width' => '', 'border_left_width' => '', 'padding_top' => '', 'padding_right' => '', 'padding_bottom' => '', 'padding_left' => '', 'border_color' => '', 'border_style' => '', 'background_color' => '', 'background_image' => '', 'background_repeat' => '', 'background_attachment' => '', 'background_size' => '', 'additional_style' => '', 'simplified' => ''), $atts);
     $styleTextArr = CthShortcodes::parseStyle($styleArr);
     $testimonialstyle = '';
     $styleText = implode(" ", $styleTextArr);
     $styleTextTest = trim($styleText);
     if (!empty($styleTextTest)) {
         $testimonialstyle .= trim($styleText);
     }
     if (!empty($testimonialstyle)) {
         $testimonialstyle = 'style="' . $testimonialstyle . '"';
     }
     $animationArgs = shortcode_atts(array('animation' => '0', 'trigger' => 'animate', 'animationtype' => '', 'animationdelay' => ''), $atts);
     $shortcodeTemp = false;
     if (stripos($layout, '_:') !== false) {
         $shortcodeTemp = JPATH_PLUGINS . '/system/cthshortcodes/shortcodes_template/' . substr($layout, 2) . '.php';
     } else {
         if (stripos($layout, ':') !== false) {
             $shortcodeTemp = CthShortcodes::templatePath() . '/html/com_azurapagebuilder/plugin/shortcodes_template/' . substr($layout, stripos($layout, ':') + 1) . '.php';
         } else {
             $shortcodeTemp = CthShortcodes::addShortcodeTemplate('azuratestimonial');
         }
     }
     $buffer = ob_get_clean();
     ob_start();
     if ($shortcodeTemp !== false) {
         require $shortcodeTemp;
     }
     $content = ob_get_clean();
     ob_start();
     echo $buffer;
     return $content;
 }
Exemple #13
0
 public static final function getInstance()
 {
     if (!self::$_instance) {
         self::$_instance = new self();
         //self::getInstance()->getDocument();
         //self::getInstance()->getDocument()->cthshortcodes = self::getInstance();
     }
     return self::$_instance;
 }
Exemple #14
0
 function azuravideo_sc($atts, $content = "")
 {
     extract(shortcode_atts(array('id' => '', 'class' => '', 'autoplay' => '', 'loop' => '', 'width' => '', 'height' => '', 'layout' => ''), $atts));
     $styleArr = shortcode_atts(array('margin_top' => '', 'margin_right' => '', 'margin_bottom' => '', 'margin_left' => '', 'border_top_width' => '', 'border_right_width' => '', 'border_bottom_width' => '', 'border_left_width' => '', 'padding_top' => '', 'padding_right' => '', 'padding_bottom' => '', 'padding_left' => '', 'border_color' => '', 'border_style' => '', 'background_color' => '', 'background_image' => '', 'background_repeat' => '', 'background_attachment' => '', 'background_size' => '', 'additional_style' => '', 'simplified' => ''), $atts);
     $styleTextArr = CthShortcodes::parseStyle($styleArr);
     $videostyle = '';
     $styleText = implode(" ", $styleTextArr);
     $styleTextTest = trim($styleText);
     if (!empty($styleTextTest)) {
         $videostyle .= trim($styleText);
     }
     if (!empty($videostyle)) {
         $videostyle = 'style="' . $videostyle . '"';
     }
     $animationArgs = shortcode_atts(array('animation' => '0', 'trigger' => 'animate-in', 'animationtype' => '', 'hoveranimationtype' => '', 'infinite' => '0', 'animationdelay' => '0'), $atts);
     $video = parse_url($content);
     switch ($video['host']) {
         case 'youtu.be':
             $id = trim($video['path'], '/');
             $src = 'https://www.youtube.com/embed/' . $id;
             break;
         case 'www.youtube.com':
         case 'youtube.com':
             parse_str($video['query'], $query);
             $id = $query['v'];
             $src = 'https://www.youtube.com/embed/' . $id;
             break;
         case 'vimeo.com':
         case 'www.vimeo.com':
             $id = trim($video['path'], '/');
             $src = "http://player.vimeo.com/video/{$id}";
     }
     $shortcodeTemp = false;
     if (stripos($layout, '_:') !== false) {
         $shortcodeTemp = JPATH_PLUGINS . '/system/cthshortcodes/shortcodes_template/' . substr($layout, 2) . '.php';
     } else {
         if (stripos($layout, ':') !== false) {
             $shortcodeTemp = JPATH_THEMES . '/' . JFactory::getApplication()->getTemplate() . '/html/com_azurapagebuilder/plugin/shortcodes_template/' . substr($layout, stripos($layout, ':') + 1) . '.php';
         } else {
             $shortcodeTemp = CthShortcodes::addShortcodeTemplate('azuravideo');
         }
     }
     $buffer = ob_get_clean();
     ob_start();
     if ($shortcodeTemp !== false) {
         require $shortcodeTemp;
     }
     $content = ob_get_clean();
     ob_start();
     echo $buffer;
     return $content;
 }
 function azuracarouselslider_item_sc($atts, $content = "")
 {
     extract(shortcode_atts(array('id' => '', 'class' => '', 'slideimage' => ''), $atts));
     $shortcodeTemp = false;
     $shortcodeTemp = CthShortcodes::addShortcodeTemplate('azuracarouselslideritem');
     $buffer = ob_get_clean();
     ob_start();
     if ($shortcodeTemp !== false) {
         require $shortcodeTemp;
     }
     $content = ob_get_clean();
     ob_start();
     echo $buffer;
     return $content;
 }
 function azurateammember_sc($atts, $content = "")
 {
     extract(shortcode_atts(array('id' => '', 'class' => '', 'name' => '', 'position' => '', 'photo' => '', 'introduction' => '', 'twitter' => '', 'facebook' => '', 'dribbble' => '', 'linkedin' => '', 'googleplus' => ''), $atts));
     $shortcodeTemp = false;
     $shortcodeTemp = CthShortcodes::addShortcodeTemplate('azurateammember');
     $buffer = ob_get_clean();
     ob_start();
     if ($shortcodeTemp != false) {
         require $shortcodeTemp;
     }
     $content = ob_get_clean();
     ob_start();
     echo $buffer;
     return $content;
 }
Exemple #17
0
 function azuratext_sc($atts, $content = "")
 {
     extract(shortcode_atts(array('id' => '', 'class' => '', 'wrapper' => ''), $atts));
     $styleArr = shortcode_atts(array('margin_top' => '', 'margin_right' => '', 'margin_bottom' => '', 'margin_left' => '', 'border_top_width' => '', 'border_right_width' => '', 'border_bottom_width' => '', 'border_left_width' => '', 'padding_top' => '', 'padding_right' => '', 'padding_bottom' => '', 'padding_left' => '', 'border_color' => '', 'border_style' => '', 'background_color' => '', 'background_image' => '', 'background_repeat' => '', 'background_attachment' => '', 'background_size' => '', 'additional_style' => '', 'simplified' => ''), $atts);
     $styleTextArr = CthShortcodes::parseStyle($styleArr);
     $textstyle = '';
     $styleText = implode(" ", $styleTextArr);
     $styleTextTest = trim($styleText);
     if (!empty($styleTextTest)) {
         $textstyle .= trim($styleText);
     }
     if (!empty($textstyle)) {
         $textstyle = 'style="' . $textstyle . '"';
     }
     $animationArgs = shortcode_atts(array('animation' => '0', 'trigger' => 'animate-in', 'animationtype' => '', 'hoveranimationtype' => '', 'infinite' => '0', 'animationdelay' => '0'), $atts);
     $classes = 'azp_font_edit';
     $animationData = '';
     if ($animationArgs['animation'] == '1') {
         if ($animationArgs['trigger'] == 'animate-in') {
             $classes .= ' ' . $animationArgs['trigger'];
             $animationData = 'data-anim-type="' . $animationArgs['animationtype'] . '" data-anim-delay="' . $animationArgs['animationdelay'] . '"';
         } else {
             $classes .= ' ' . $animationArgs['trigger'] . '-' . $animationArgs['hoveranimationtype'];
             if ($animationArgs['infinite'] != '0') {
                 $classes .= ' infinite';
             }
         }
     }
     if (!empty($class)) {
         $classes .= ' ' . $class;
     }
     if (!empty($classes)) {
         $classes = 'class="' . $classes . '"';
     }
     $html = '';
     if (!empty($wrapper)) {
         $html .= '<' . $wrapper . ' ' . $textstyle . ' ' . $classes . ' ' . $animationData;
         if (!empty($id)) {
             $html .= ' id="' . $id . '"';
         }
         $html .= '>';
     }
     $html .= do_shortcode($content);
     if (!empty($wrapper)) {
         $html .= '</' . $wrapper . '>';
     }
     return $html;
 }
 function azuratabtoggle_item_sc($atts, $content = "")
 {
     global $azuraTabToggleArray;
     global $azuraTabItem;
     //$azuraTabToggleArray[] = array('id'=>(!empty($atts['id'])? $atts['id'] : ''), 'class'=>(!empty($atts['class'])? $atts['class'] : ''),'title'=>(!empty($atts['title'])? $atts['title'] : ''), 'iconclass'=>(!empty($atts['iconclass'])? $atts['iconclass'] : ''), 'content'=>$content);
     extract(shortcode_atts(array('id' => '', 'class' => '', 'title' => 'First Tab', 'iconclass' => '', 'layout' => ''), $atts));
     $styleArr = shortcode_atts(array('margin_top' => '', 'margin_right' => '', 'margin_bottom' => '', 'margin_left' => '', 'border_top_width' => '', 'border_right_width' => '', 'border_bottom_width' => '', 'border_left_width' => '', 'padding_top' => '', 'padding_right' => '', 'padding_bottom' => '', 'padding_left' => '', 'border_color' => '', 'border_style' => '', 'background_color' => '', 'background_image' => '', 'background_repeat' => '', 'background_attachment' => '', 'background_size' => '', 'additional_style' => '', 'simplified' => ''), $atts);
     $styleTextArr = CthShortcodes::parseStyle($styleArr);
     $tabtoggleitemstyle = '';
     $styleText = implode(" ", $styleTextArr);
     $styleTextTest = trim($styleText);
     if (!empty($styleTextTest)) {
         $tabtoggleitemstyle .= trim($styleText);
     }
     if (!empty($tabtoggleitemstyle)) {
         $tabtoggleitemstyle = 'style="' . $tabtoggleitemstyle . '"';
     }
     $animationArgs = shortcode_atts(array('animation' => '0', 'trigger' => 'animate', 'animationtype' => '', 'animationdelay' => ''), $atts);
     if (!isset($azuraTabItem)) {
         $azuraTabItem = 0;
     }
     if (empty($id)) {
         $id = uniqid('TabItem');
     }
     $azuraTabToggleArray[] = array('id' => $id, 'class' => $class, 'title' => $title, 'iconclass' => $iconclass, 'animationargs' => $animationArgs, 'content' => $content);
     $shortcodeTemp = false;
     if (stripos($layout, '_:') !== false) {
         $shortcodeTemp = JPATH_PLUGINS . '/system/cthshortcodes/shortcodes_template/' . substr($layout, 2) . '.php';
     } else {
         if (stripos($layout, ':') !== false) {
             $shortcodeTemp = CthShortcodes::templatePath() . '/html/com_azurapagebuilder/plugin/shortcodes_template/' . substr($layout, stripos($layout, ':') + 1) . '.php';
         } else {
             $shortcodeTemp = CthShortcodes::addShortcodeTemplate('azuratabtoggleitem');
         }
     }
     $buffer = ob_get_clean();
     ob_start();
     if ($shortcodeTemp !== false) {
         require $shortcodeTemp;
     }
     $content = ob_get_clean();
     ob_start();
     echo $buffer;
     $azuraTabItem++;
     return $content;
 }
 function azuraaccordionitem_sc($atts, $content = "")
 {
     global $accordionGroupID;
     global $accordionItem;
     extract(shortcode_atts(array('id' => '', 'class' => '', 'title' => '', 'subtitle' => '', 'layout' => ''), $atts));
     $styleArr = shortcode_atts(array('margin_top' => '', 'margin_right' => '', 'margin_bottom' => '', 'margin_left' => '', 'border_top_width' => '', 'border_right_width' => '', 'border_bottom_width' => '', 'border_left_width' => '', 'padding_top' => '', 'padding_right' => '', 'padding_bottom' => '', 'padding_left' => '', 'border_color' => '', 'border_style' => '', 'background_color' => '', 'background_image' => '', 'background_repeat' => '', 'background_attachment' => '', 'background_size' => '', 'additional_style' => '', 'simplified' => ''), $atts);
     $styleTextArr = CthShortcodes::parseStyle($styleArr);
     $accordionitemstyle = '';
     $styleText = implode(" ", $styleTextArr);
     $styleTextTest = trim($styleText);
     if (!empty($styleTextTest)) {
         $accordionitemstyle .= trim($styleText);
     }
     if (!empty($accordionitemstyle)) {
         $accordionitemstyle = 'style="' . $accordionitemstyle . '"';
     }
     $animationArgs = shortcode_atts(array('animation' => '0', 'trigger' => 'animate-in', 'animationtype' => '', 'hoveranimationtype' => '', 'infinite' => '0', 'animationdelay' => '0'), $atts);
     if (!isset($accordionGroupID)) {
         $accordionGroupID = uniqid('AccordionGroupID');
     }
     if (!isset($accordionItem)) {
         $accordionItem = 0;
     }
     $shortcodeTemp = false;
     if (stripos($layout, '_:') !== false) {
         $shortcodeTemp = JPATH_PLUGINS . '/system/cthshortcodes/shortcodes_template/' . substr($layout, 2) . '.php';
     } else {
         if (stripos($layout, ':') !== false) {
             $shortcodeTemp = JPATH_THEMES . '/' . JFactory::getApplication()->getTemplate() . '/html/com_azurapagebuilder/plugin/shortcodes_template/' . substr($layout, stripos($layout, ':') + 1) . '.php';
         } else {
             $shortcodeTemp = CthShortcodes::addShortcodeTemplate('azuraaccordionitem');
         }
     }
     $buffer = ob_get_clean();
     ob_start();
     if ($shortcodeTemp !== false) {
         require $shortcodeTemp;
     }
     $content = ob_get_clean();
     ob_start();
     echo $buffer;
     $accordionItem++;
     return $content;
 }
 function azurak2category_sc($atts, $content = "")
 {
     extract(shortcode_atts(array('id' => '', 'class' => '', 'category' => '', 'order' => 'created', 'orderdir' => 'ASC', 'limit' => 'All', 'showfilter' => '1', 'fetchchild' => '0', 'layout' => ''), $atts));
     $styleArr = shortcode_atts(array('margin_top' => '', 'margin_right' => '', 'margin_bottom' => '', 'margin_left' => '', 'border_top_width' => '', 'border_right_width' => '', 'border_bottom_width' => '', 'border_left_width' => '', 'padding_top' => '', 'padding_right' => '', 'padding_bottom' => '', 'padding_left' => '', 'border_color' => '', 'border_style' => '', 'background_color' => '', 'background_image' => '', 'background_repeat' => '', 'background_attachment' => '', 'background_size' => '', 'additional_style' => '', 'simplified' => ''), $atts);
     $styleTextArr = CthShortcodes::parseStyle($styleArr);
     $k2categorystyle = '';
     $styleText = implode(" ", $styleTextArr);
     $styleTextTest = trim($styleText);
     if (!empty($styleTextTest)) {
         $k2categorystyle .= trim($styleText);
     }
     if (!empty($k2categorystyle)) {
         $k2categorystyle = 'style="' . $k2categorystyle . '"';
     }
     $animationArgs = shortcode_atts(array('animation' => '0', 'trigger' => 'animate-in', 'animationtype' => '', 'hoveranimationtype' => '', 'infinite' => '0', 'animationdelay' => '0'), $atts);
     if ($category == '0' || $category == '') {
         return false;
     }
     $items = CthShortcodes::getK2Items($category, $limit, $order, $orderdir, '', $fetchchild);
     if ($showfilter == '1') {
         $tagsFilter = CthShortcodes::getK2TagsFilter($items);
     }
     $shortcodeTemp = false;
     if (stripos($layout, '_:') !== false) {
         $shortcodeTemp = JPATH_PLUGINS . '/system/cthshortcodes/shortcodes_template/' . substr($layout, 2) . '.php';
     } else {
         if (stripos($layout, ':') !== false) {
             $shortcodeTemp = JPATH_THEMES . '/' . JFactory::getApplication()->getTemplate() . '/html/com_azurapagebuilder/plugin/shortcodes_template/' . substr($layout, stripos($layout, ':') + 1) . '.php';
         } else {
             $shortcodeTemp = CthShortcodes::addShortcodeTemplate('azurak2category');
         }
     }
     $buffer = ob_get_clean();
     ob_start();
     if ($shortcodeTemp !== false) {
         require $shortcodeTemp;
     }
     $content = ob_get_clean();
     ob_start();
     echo $buffer;
     return $content;
 }
 function azurabxslider_item_sc($atts, $content = "")
 {
     extract(shortcode_atts(array('id' => '', 'class' => '', 'slideimage' => '', 'layout' => ''), $atts));
     $shortcodeTemp = false;
     if (stripos($layout, '_:') !== false) {
         $shortcodeTemp = JPATH_PLUGINS . '/system/cthshortcodes/shortcodes_template/' . substr($layout, 2) . '.php';
     } else {
         if (stripos($layout, ':') !== false) {
             $shortcodeTemp = CthShortcodes::templatePath() . '/html/com_azurapagebuilder/plugin/shortcodes_template/' . substr($layout, stripos($layout, ':') + 1) . '.php';
         } else {
             $shortcodeTemp = CthShortcodes::addShortcodeTemplate('azurabxslideritem');
         }
     }
     $buffer = ob_get_clean();
     ob_start();
     if ($shortcodeTemp !== false) {
         require $shortcodeTemp;
     }
     $content = ob_get_clean();
     ob_start();
     echo $buffer;
     return $content;
 }
 function azuracarouselslider_sc($atts, $content = "")
 {
     extract(shortcode_atts(array('id' => '', 'class' => '', 'transtyle' => '', 'sliderspeed' => '', 'rewindspeed' => '', 'slideperview' => '', 'itemscustom' => '', 'autoplay' => '', 'pagination' => '', 'paginationspeed' => '', 'navigation' => '', 'autoheight' => '', 'mousedrag' => '', 'touchdrag' => '', 'layout' => ''), $atts));
     $shortcodeTemp = false;
     if (stripos($layout, '_:') !== false) {
         $shortcodeTemp = JPATH_PLUGINS . '/system/cthshortcodes/shortcodes_template/' . substr($layout, 2) . '.php';
     } else {
         if (stripos($layout, ':') !== false) {
             $shortcodeTemp = CthShortcodes::templatePath() . '/html/com_azurapagebuilder/plugin/shortcodes_template/' . substr($layout, stripos($layout, ':') + 1) . '.php';
         } else {
             $shortcodeTemp = CthShortcodes::addShortcodeTemplate('azuracarouselslider');
         }
     }
     $buffer = ob_get_clean();
     ob_start();
     if ($shortcodeTemp !== false) {
         require $shortcodeTemp;
     }
     $content = ob_get_clean();
     ob_start();
     echo $buffer;
     return $content;
 }
Exemple #23
0
 function azurabxslider_sc($atts, $content = "")
 {
     extract(shortcode_atts(array('id' => '', 'class' => 'bxslider', 'mode' => 'horizontal', 'speed' => '500', 'slidemargin' => '0', 'startslide' => '0', 'randomstart' => '0', 'slideselector' => '', 'infiniteloop' => '1', 'hidecontrolonend' => '0', 'easing' => 'null', 'captions' => '0', 'ticker' => '0', 'tickerhover' => '0', 'adaptiveheight' => '0', 'adaptiveheightspeed' => '500', 'video' => '0', 'responsive' => '1', 'usecss' => '1', 'preloadimages' => 'visible', 'touchenabled' => '1', 'swipethreshold' => '50', 'onetoonetouch' => '1', 'preventdefaultswipex' => '1', 'preventdefaultswipey' => '0', 'pager' => '1', 'pagertype' => 'full', 'pagershortseparator' => '/', 'pagerselector' => '', 'pagercustom' => 'null', 'buildpager' => 'null', 'controls' => '1', 'nexttext' => 'Next', 'prevtext' => 'Prev', 'nextselector' => 'null', 'prevselector' => 'null', 'autocontrols' => '0', 'starttext' => 'Start', 'stoptext' => 'Stop', 'autocontrolscombine' => '0', 'autocontrolsselector' => 'null', 'auto' => '0', 'pause' => '4000', 'autostart' => '1', 'autodirection' => 'next', 'autohover' => '0', 'autodelay' => '0', 'minslides' => '1', 'maxslides' => '1', 'moveslides' => '0', 'slidewidth' => '0', 'layout' => ''), $atts));
     $shortcodeTemp = false;
     if (stripos($layout, '_:') !== false) {
         $shortcodeTemp = JPATH_PLUGINS . '/system/cthshortcodes/shortcodes_template/' . substr($layout, 2) . '.php';
     } else {
         if (stripos($layout, ':') !== false) {
             $shortcodeTemp = CthShortcodes::templatePath() . '/html/com_azurapagebuilder/plugin/shortcodes_template/' . substr($layout, stripos($layout, ':') + 1) . '.php';
         } else {
             $shortcodeTemp = CthShortcodes::addShortcodeTemplate('azurabxslider');
         }
     }
     $buffer = ob_get_clean();
     ob_start();
     if ($shortcodeTemp !== false) {
         require $shortcodeTemp;
     }
     $content = ob_get_clean();
     ob_start();
     echo $buffer;
     return $content;
 }
 function azuratabtoggle_sc($atts, $content = "")
 {
     global $azuraTabToggleArray;
     extract(shortcode_atts(array('id' => '', 'class' => '', 'style' => 'tab', 'fade' => '0', 'defaultactive' => '0', 'layout' => ''), $atts));
     $styleArr = shortcode_atts(array('margin_top' => '', 'margin_right' => '', 'margin_bottom' => '', 'margin_left' => '', 'border_top_width' => '', 'border_right_width' => '', 'border_bottom_width' => '', 'border_left_width' => '', 'padding_top' => '', 'padding_right' => '', 'padding_bottom' => '', 'padding_left' => '', 'border_color' => '', 'border_style' => '', 'background_color' => '', 'background_image' => '', 'background_repeat' => '', 'background_attachment' => '', 'background_size' => '', 'additional_style' => '', 'simplified' => ''), $atts);
     $styleTextArr = CthShortcodes::parseStyle($styleArr);
     $tabtogglestyle = '';
     $styleText = implode(" ", $styleTextArr);
     $styleTextTest = trim($styleText);
     if (!empty($styleTextTest)) {
         $tabtogglestyle .= trim($styleText);
     }
     if (!empty($tabtogglestyle)) {
         $tabtogglestyle = 'style="' . $tabtogglestyle . '"';
     }
     $shortcodeTemp = false;
     if (stripos($layout, '_:') !== false) {
         $shortcodeTemp = JPATH_PLUGINS . '/system/cthshortcodes/shortcodes_template/' . substr($layout, 2) . '.php';
     } else {
         if (stripos($layout, ':') !== false) {
             $shortcodeTemp = CthShortcodes::templatePath() . '/html/com_azurapagebuilder/plugin/shortcodes_template/' . substr($layout, stripos($layout, ':') + 1) . '.php';
         } else {
             $shortcodeTemp = CthShortcodes::addShortcodeTemplate('azuratabtoggle');
         }
     }
     $buffer = ob_get_clean();
     ob_start();
     if ($shortcodeTemp !== false) {
         require $shortcodeTemp;
     }
     $content = ob_get_clean();
     ob_start();
     echo $buffer;
     $azuraTabToggleArray = array();
     return $content;
 }
Exemple #25
0
 function azuraimage_sc($atts, $content = "")
 {
     extract(shortcode_atts(array('id' => '', 'class' => '', 'title' => ''), $atts));
     $styleArr = shortcode_atts(array('margin_top' => '', 'margin_right' => '', 'margin_bottom' => '', 'margin_left' => '', 'border_top_width' => '', 'border_right_width' => '', 'border_bottom_width' => '', 'border_left_width' => '', 'padding_top' => '', 'padding_right' => '', 'padding_bottom' => '', 'padding_left' => '', 'border_color' => '', 'border_style' => '', 'background_color' => '', 'background_image' => '', 'background_repeat' => '', 'background_attachment' => '', 'background_size' => '', 'additional_style' => '', 'simplified' => ''), $atts);
     $styleTextArr = CthShortcodes::parseStyle($styleArr);
     $imagestyle = '';
     $styleText = implode(" ", $styleTextArr);
     $styleTextTest = trim($styleText);
     if (!empty($styleTextTest)) {
         $imagestyle .= trim($styleText);
     }
     if (!empty($imagestyle)) {
         $imagestyle = 'style="' . $imagestyle . '"';
     }
     $animationArgs = shortcode_atts(array('animation' => '0', 'trigger' => 'animate', 'animationtype' => '', 'animationdelay' => ''), $atts);
     $classes = "azp_image";
     if (!empty($class)) {
         $classes .= ' ' . $class;
     }
     $animationData = '';
     if ($animationArgs['animation'] == '1') {
         $classes .= ' ' . $animationArgs['trigger'];
         if (!empty($animationArgs['animationtype'])) {
             $animationData .= 'data-anim-type="' . $animationArgs['animationtype'] . '"';
         }
         if (!empty($animationArgs['animationdelay'])) {
             $animationData .= ' data-anim-delay="' . $animationArgs['animationdelay'] . '"';
         }
     }
     $classes = 'class="' . $classes . '"';
     if (!empty($id)) {
         $id = 'id="' . $id . '"';
     }
     $html = '<img ' . $id . ' ' . $classes . ' ' . $imagestyle . ' ' . $animationData . ' alt="' . $title . '" title="' . $title . '" src="' . JURI::root(true) . '/' . $content . '">';
     return $html;
 }
        </div>
    </div>
    <?php 
    }
    ?>

    <div class="container_full animate" data-anim-type="fadeInUp">
        <div id="grid-container" class="cbp-l-grid-fullScreen">
            <ul>
                <?php 
    foreach ($items as $key => $item) {
        //echo'<pre>',var_dump($item);die;
        $extraFields = json_decode($item->extra_fields);
        ?>
                <li class="cbp-item <?php 
        echo CthShortcodes::getK2ItemTagsFilter($item);
        ?>
">
                <?php 
        if ($extraFields[0]->value == '1') {
            ?>
                    <a href="<?php 
            echo JURI::root(true) . $extraFields[1]->value;
            ?>
" class="cbp-caption cbp-lightbox" data-title="<?php 
            echo $item->title;
            ?>
<br><?php 
            echo JText::_('TPL_HOXA_BY_TEXT');
            ?>
 <?php 
}
if (!empty($skin) && $skin != 'custom') {
    $classes .= ' ' . $skin;
}
$classes = 'class="' . $classes . '"';
?>
<link href='<?php 
echo CthShortcodes::templateUri();
?>
/js/masterslider/ms-laptop-style.css' rel='stylesheet' type='text/css'>
<script src="<?php 
echo CthShortcodes::templateUri();
?>
/js/masterslider/jquery.easing.min.js"></script>
<script src="<?php 
echo CthShortcodes::templateUri();
?>
/js/masterslider/masterslider.min.js"></script>

<div class="ms-laptop-template">
    <div class="ms-laptop-cont">
        <img src="<?php 
echo JURI::root(true);
?>
/images/sliders/master/laptop.png" class="ms-laptop-bg" alt="" />
        <div class="ms-lt-slider-cont">
            <!-- masterslider -->
            <div <?php 
echo $classes . ' ' . $mastersliderstyle . ' ' . $animationData;
?>
 id="<?php 
Exemple #28
0
    protected function configAzuraimage($data, $dataObject)
    {
        $dataObject->formOption = JForm::getInstance('com_azurapagebuilder.page.optionimage', 'formoptionimage');
        // set content
        $elementContentFields = array("src");
        if (count($elementContentFields) == 1) {
            $content = $elementContentFields[0];
            $value = '';
            if (isset($dataObject->content)) {
                $value = $dataObject->content;
            }
            $dataObject->formOption->setValue("{$content}", "elementContent", $value);
        } elseif (count($elementContentFields) > 1) {
            foreach ($elementContentFields as $key => $content) {
                $value = null;
                if (isset($dataObject->content->{$attr})) {
                    $value = $dataObject->content->{$attr};
                }
                $dataObject->formOption->setValue("{$content}", "elementContent", $value);
            }
        }
        // set attrs
        // $elementAttrsFields = array("title","id","class");
        // foreach ($elementAttrsFields as $key => $attr) {
        // 	$value = null;
        // 	if(isset($dataObject->attrs->{$attr})){
        // 		$value = $dataObject->attrs->{$attr};
        // 	}
        // 	$dataObject->formOption->setValue("{$attr}","elementAttrs", $value);
        // }
        $html = '
			<h2><i class="fa fa-image"></i> Image' . (!empty($dataObject->name) ? ' - ' . $dataObject->name : '') . '</h2>
			<div class="row-fluid" style="padding-top:20px;">
				<div class="span5">
					<div class="input-prepend">
						<span class="add-on">Name</span>
						<input class="inputbox" name="elementName" placeholder="Element name" type="text" value="' . (isset($dataObject->name) ? $dataObject->name : '') . '">
					</div>
				</div>
				<div class="span7">
					<div class="form-horizontal">
						<div class="control-group elementPubLang">
							<div class="control-label">
								<label id="elementPubLang_published-lbl" for="elementPubLang_published">Published</label>
							</div>
							<div class="controls">
								<fieldset id="elementPubLang_published" class="radio btn-group btn-group-yesno">
									<input id="elementPubLang_published1" name="elementPubLang[published]" value="1" ' . (isset($dataObject->published) && $dataObject->published == '1' ? 'checked="checked"' : '') . ' type="radio">
									<label  for="elementPubLang_published1">Yes</label>
									<input id="elementPubLang_published0" name="elementPubLang[published]" value="0" ' . (isset($dataObject->published) && $dataObject->published == '0' ? 'checked="checked"' : '') . ' type="radio">
									<label for="elementPubLang_published0">No</label>
								</fieldset>
							</div>
						</div>
					</div>


				</div>
			</div>
			<!-- /.row-fluid -->

			<div id="azp_tabs">
				 <ul>
					<li><a href="#azp_tab_option">Options</a></li>
					<li><a href="#azp_tab_style">Styles</a></li>
				</ul>
				<div class="row-fluid" id="azp_tab_option">
					<div class="span12">
						<div class="form-horizontal">';
        // content
        foreach ($dataObject->formOption->getFieldsets('elementContent') as $fieldsets => $fieldset) {
            foreach ($dataObject->formOption->getFieldset($fieldset->name) as $field) {
                // $attr = $field->name;
                // if(isset($dataObject->attrs->{$attr})){
                // 	$value = $dataObject->attrs->{$attr};
                // 	$field->setValue($value);
                // }
                if ($field->hidden) {
                    $html .= $field->input;
                } else {
                    //echo'<pre>';var_dump($field->name);
                    $html .= $field->getControlGroup();
                }
            }
        }
        // attrs
        foreach ($dataObject->formOption->getFieldsets('elementAttrs') as $fieldsets => $fieldset) {
            foreach ($dataObject->formOption->getFieldset($fieldset->name) as $field) {
                preg_match('/elementAttrs\\[(.+)\\]/', $field->name, $matches);
                if (count($matches) > 1) {
                    $attr = $matches[1];
                    if (isset($dataObject->attrs->{$attr})) {
                        $value = $dataObject->attrs->{$attr};
                        $field->setValue($value);
                    }
                }
                if ($field->hidden) {
                    $html .= $field->input;
                } else {
                    //echo'<pre>';var_dump($field->name);
                    $html .= $field->getControlGroup();
                }
            }
        }
        $html .= '</div>
						<!-- /.form-horizontal -->
					</div>
					<!-- /.span12 -->

				</div>
				<!-- /.row-fluid -->

				<div class="row-fluid" id="azp_tab_style">
					' . CthShortcodes::renderElementStyle($dataObject->attrs) . '

					

				</div>

				<!-- /.row-fluid -->

			</div>

			<!-- /#azp_Tabs -->
			
			<div class="row-fluid" style="text-align: center;">
				<hr>
				<a href="#" id="azura-setting-btn-save" class="btn btn-primary azura-setting-btn-save">Save</a>
				<a href="#" id="azura-setting-btn-cancel" class="btn btn-default azura-setting-btn-cancel">Cancel</a>
			</div>';
        $html .= '
			<script>
				function jInsertFieldValue(value, id) {
		        		var old_value = jQuery("#" + id).val();
		        		if (old_value != value) {
		        			var $elem = jQuery("#" + id);
		        			$elem.val(value);
		        			$elem.trigger("change");
		        			if (typeof($elem.get(0).onchange) === "function") {
		        				$elem.get(0).onchange();
		        			}
		        		}
		        }

	            jQuery(function($) {
	    			SqueezeBox.initialize({});
	    			SqueezeBox.assign($(\'a.modal_jform_azuramedia\').get(), {
	    				parse: \'rel\'
	    			});
					
					
	                
	                jQuery(\'body\').on(\'change\',\'#elementAttrs_src\', function(event){
	                    event.preventDefault();
	                    var value = event.currentTarget.value;
	                    
	                    jQuery(\'.fancybox-inner\').find(\'#elementAttrs_src\').val(value);
	                });
	    		});
            
            </script>';
        $html .= '
			<script>
				jQuery(function($){
					$( "#azp_tabs" ).tabs();

					$(\'.radio.btn-group label\').addClass(\'btn btn-small\');
					$(\'body\').on(\'click\',\'.btn-group label:not(.active)\',function()
					{
						var label = $(this);
						var input = $(\'#\' + label.attr(\'for\'));

						if (!input.prop(\'checked\')) {
							label.closest(\'.btn-group\').find(\'label\').removeClass(\'active btn-success btn-danger btn-primary\');
							if (input.val() == \'\') {
								label.addClass(\'active btn-primary\');
							} else if (input.val() == 0) {
								label.addClass(\'active btn-danger\');
							} else {
								label.addClass(\'active btn-success\');
							}
							input.prop(\'checked\', \'checked\');
						}
					});
					$(\'.btn-group input[checked=checked]\').each(function()
					{
						if ($(this).val() == \'\') {
							$(\'label[for=\' + $(this).attr(\'id\') + \']\').addClass(\'active btn-primary\');
						} else if ($(this).val() == 0) {
							$(\'label[for=\' + $(this).attr(\'id\') + \']\').addClass(\'active btn-danger\');
						} else {
							$(\'label[for=\' + $(this).attr(\'id\') + \']\').addClass(\'active btn-success\');
						}
					});
				});
            
            </script>';
        return $html;
    }
">
                        <div class="cbp-caption">
                            <div class="cbp-caption-defaultWrap">
                                <img src="<?php 
        echo JURI::root(true) . $extraFields[0]->value;
        ?>
" alt="<?php 
        echo $item->title;
        ?>
" >
                            </div>
                            <div class="cbp-caption-activeWrap">
                                <div class="cbp-l-caption-alignCenter">
                                    <div class="cbp-l-caption-body">
                                        <a href="<?php 
        echo CthShortcodes::getK2ItemLink($item->id, $item->alias, $item->catid, $item->categoryalias);
        ?>
" class="cbp-l-caption-buttonLeft"><?php 
        echo JText::_('TPL_HOXA_MORE_INFO_TEXT');
        ?>
</a>
                                        <a href="<?php 
        echo JURI::root(true) . $extraFields[3]->value;
        ?>
" class="cbp-lightbox cbp-l-caption-buttonRight" data-title="<?php 
        echo $item->title;
        ?>
<br><?php 
        echo JText::_('TPL_HOXA_BY_TEXT');
        ?>
 <?php