function sp_clients_addon($atts, $content) { global $sppbClientsParam; extract(spAddonAtts(array('title' => '', "heading_selector" => 'h3', "title_fontsize" => '', "title_fontweight" => '', "title_text_color" => '', "title_margin_top" => '', "title_margin_bottom" => '', 'count' => '', 'alignment' => '', "class" => ''), $atts)); $sppbClientsParam['col'] = $count; $output = '<div class="sppb-addon sppb-addon-clients ' . $alignment . ' ' . $class . '">'; if ($title) { $title_style = ''; if ($title_margin_top != '') { $title_style .= 'margin-top:' . (int) $title_margin_top . 'px;'; } if ($title_margin_bottom != '') { $title_style .= 'margin-bottom:' . (int) $title_margin_bottom . 'px;'; } if ($title_text_color) { $title_style .= 'color:' . $title_text_color . ';'; } if ($title_fontsize) { $title_style .= 'font-size:' . $title_fontsize . 'px;line-height:' . $title_fontsize . 'px;'; } if ($title_fontweight) { $title_style .= 'font-weight:' . $title_fontweight . ';'; } $output .= '<' . $heading_selector . ' class="sppb-addon-title" style="' . $title_style . '">' . $title . '</' . $heading_selector . '>'; } $output .= '<div class="sppb-addon-content">'; $output .= '<div class="sppb-row">'; $output .= AddonParser::spDoAddon($content); $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; $sppbClientsParam = array(); return $output; }
function sp_carousel_addon($atts, $content) { extract(spAddonAtts(array('autoplay' => '', 'controllers' => '', 'arrows' => '', 'background' => '', 'color' => '', 'alignment' => '', "class" => ''), $atts)); if ($background) { $background = 'background-color:' . $background . ';'; } if ($color) { $color = 'color:' . $color . ';'; } $carousel_autoplay = $autoplay ? 'data-sppb-ride="sppb-carousel"' : ''; $output = '<div style="' . $background . $color . '" class="sppb-carousel sppb-slide ' . $class . '" ' . $carousel_autoplay . '>'; if ($controllers) { $output .= '<ol class="sppb-carousel-indicators">'; $output .= '</ol>'; } $output .= '<div class="sppb-carousel-inner ' . $alignment . '">'; $output .= AddonParser::spDoAddon($content); $output .= '</div>'; if ($arrows) { $output .= '<a style="' . $color . '" class="sppb-carousel-arrow left sppb-carousel-control" role="button" data-slide="prev"><i class="fa fa-chevron-left"></i></a>'; $output .= '<a style="' . $color . '" class="sppb-carousel-arrow right sppb-carousel-control" role="button" data-slide="next"><i class="fa fa-chevron-right"></i></a>'; } $output .= '</div>'; return $output; }
function sp_accordion_addon($atts, $content) { global $sppbAccordionStyle; extract(spAddonAtts(array("title" => '', "heading_selector" => 'h3', "title_fontsize" => '', "title_fontweight" => '', "title_text_color" => '', "title_margin_top" => '', "title_margin_bottom" => '', "style" => 'panel-default', "class" => ''), $atts)); $sppbAccordionStyle = $style; $output = '<div class="sppb-addon sppb-addon-accordion ' . $class . '">'; if ($title) { $title_style = ''; if ($title_margin_top != '') { $title_style .= 'margin-top:' . (int) $title_margin_top . 'px;'; } if ($title_margin_bottom != '') { $title_style .= 'margin-bottom:' . (int) $title_margin_bottom . 'px;'; } if ($title_text_color) { $title_style .= 'color:' . $title_text_color . ';'; } if ($title_fontsize) { $title_style .= 'font-size:' . $title_fontsize . 'px;line-height:' . $title_fontsize . 'px;'; } if ($title_fontweight) { $title_style .= 'font-weight:' . $title_fontweight . ';'; } $output .= '<' . $heading_selector . ' class="sppb-addon-title" style="' . $title_style . '">' . $title . '</' . $heading_selector . '>'; } $output .= '<div class="sppb-addon-content">'; $output .= '<div class="sppb-panel-group ' . $class . '">'; $output .= AddonParser::spDoAddon($content); $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; $sppbAccordionStyle = ''; return $output; }
function sp_gallery_addon($atts, $content) { global $sppbGalleryParam; $doc = JFactory::getDocument(); $doc->addStylesheet(JURI::base(true) . '/components/com_sppagebuilder/assets/css/prettyPhoto.css'); $doc->addStylesheet(JURI::base(true) . '/components/com_sppagebuilder/assets/css/sppb-prettyPhoto.css'); $doc->addScript(JURI::base(true) . '/components/com_sppagebuilder/assets/js/jquery.prettyPhoto.js'); $doc->addScriptdeclaration('jQuery(function($){ $(document).ready(function(){ $("a[rel^=\'prettyPhoto\']").prettyPhoto({ social_tools: false, theme: "sppb_prettyphoto", horizontal_padding: 20, overlay_gallery: false }); }); })'); extract(spAddonAtts(array('title' => '', "heading_selector" => 'h3', "title_fontsize" => '', "title_fontweight" => '', "title_text_color" => '', "title_margin_top" => '', "title_margin_bottom" => '', 'width' => '', 'height' => '', "class" => ''), $atts)); if ($width == '') { $width = 200; } if ($height == '') { $height = 200; } $sppbGalleryParam['width'] = (int) $width; $sppbGalleryParam['height'] = (int) $height; $output = '<div class="sppb-addon sppb-addon-gallery ' . $class . '">'; if ($title) { $title_style = ''; if ($title_margin_top != '') { $title_style .= 'margin-top:' . (int) $title_margin_top . 'px;'; } if ($title_margin_bottom != '') { $title_style .= 'margin-bottom:' . (int) $title_margin_bottom . 'px;'; } if ($title_text_color) { $title_style .= 'color:' . $title_text_color . ';'; } if ($title_fontsize) { $title_style .= 'font-size:' . $title_fontsize . 'px;line-height:' . $title_fontsize . 'px;'; } if ($title_fontweight) { $title_style .= 'font-weight:' . $title_fontweight . ';'; } $output .= '<' . $heading_selector . ' class="sppb-addon-title" style="' . $title_style . '">' . $title . '</' . $heading_selector . '>'; } $output .= '<div class="sppb-addon-content">'; $output .= '<ul class="sppb-gallery clearfix">'; $output .= AddonParser::spDoAddon($content); $output .= '</ul>'; $output .= '</div>'; $output .= '</div>'; $sppbGalleryParam = array(); return $output; }
function sp_button_group_addon($atts, $content) { global $sppbButtonGroup_margin; extract(spAddonAtts(array('alignment' => '', 'margin' => '', 'class' => ''), $atts)); $sppbButtonGroup_margin = $margin; $output = '<div class="sppb-addon sppb-addon-button-group ' . $alignment . ' ' . $class . '">'; $output .= '<div class="sppb-addon-content" style="margin:-' . (int) $margin . 'px;">'; $output .= AddonParser::spDoAddon($content); $output .= '</div>'; $output .= '</div>'; $sppbButtonGroup_margin = ''; return $output; }
function sp_testimonialpro_addon($atts, $content) { extract(spAddonAtts(array('autoplay' => '', 'arrows' => '', "class" => ''), $atts)); $carousel_autoplay = $autoplay ? 'data-sppb-ride="sppb-carousel"' : ''; $output = '<div class="sppb-carousel sppb-testimonial-pro sppb-slide ' . $class . ' sppb-text-center" ' . $carousel_autoplay . '>'; $output .= '<div class="sppb-carousel-inner">'; $output .= AddonParser::spDoAddon($content); $output .= '</div>'; if ($arrows) { $output .= '<a class="left sppb-carousel-control" role="button" data-slide="prev"><i class="fa fa-angle-left"></i></a>'; $output .= '<a class="right sppb-carousel-control" role="button" data-slide="next"><i class="fa fa-angle-right"></i></a>'; } $output .= '</div>'; return $output; }
function sp_tab_addon($atts, $content) { global $sppbTabArray; extract(spAddonAtts(array("title" => '', "heading_selector" => 'h3', "title_fontsize" => '', "title_fontweight" => '', "title_text_color" => '', "title_margin_top" => '', "title_margin_bottom" => '', "style" => '', "class" => ''), $atts)); AddonParser::spDoAddon($content); $output = '<div class="sppb-addon sppb-addon-tab ' . $class . '">'; if ($title) { $title_style = ''; if ($title_margin_top != '') { $title_style .= 'margin-top:' . (int) $title_margin_top . 'px;'; } if ($title_margin_bottom != '') { $title_style .= 'margin-bottom:' . (int) $title_margin_bottom . 'px;'; } if ($title_text_color) { $title_style .= 'color:' . $title_text_color . ';'; } if ($title_fontsize) { $title_style .= 'font-size:' . $title_fontsize . 'px;line-height:' . $title_fontsize . 'px;'; } if ($title_fontweight) { $title_style .= 'font-weight:' . $title_fontweight . ';'; } $output .= '<' . $heading_selector . ' class="sppb-addon-title" style="' . $title_style . '">' . $title . '</' . $heading_selector . '>'; } $output .= '<div class="sppb-addon-content sppb-tab">'; //Tab Title $output .= '<ul class="sppb-nav sppb-nav-' . $style . '">'; foreach ($sppbTabArray as $key => $tab) { $output .= '<li class="' . ($key == 0 ? "active" : "") . '"><a role="tab" data-toggle="sppb-tab">' . $tab['icon'] . ' ' . $tab['title'] . '</a></li>'; } $output .= '</ul>'; //Tab Contnet $output .= '<div class="sppb-tab-content">'; foreach ($sppbTabArray as $key => $tab) { $output .= '<div class="sppb-tab-pane sppb-fade' . ($key == 0 ? " active in" : "") . '">' . $tab['content'] . '</div>'; } $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; $sppbTabArray = array(); return $output; }
<?php /** * @package SP Page Builder * @author JoomShaper http://www.joomshaper.com * @copyright Copyright (c) 2010 - 2015 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ //no direct accees defined('_JEXEC') or die('resticted aceess'); AddonParser::addAddon('sp_audio', 'sp_audio_addon'); function sp_audio_addon($atts, $content) { extract(spAddonAtts(array("title" => '', "heading_selector" => 'h3', "title_fontsize" => '', "title_fontweight" => '', "title_text_color" => '', "title_margin_top" => '', "title_margin_bottom" => '', "mp3_link" => '', "ogg_link" => '', "autoplay" => '', "repeat" => '', "class" => ''), $atts)); $output = '<div class="sppb-addon sppb-addon-audio ' . $class . '">'; if ($title) { $title_style = ''; if ($title_margin_top != '') { $title_style .= 'margin-top:' . (int) $title_margin_top . 'px;'; } if ($title_margin_bottom != '') { $title_style .= 'margin-bottom:' . (int) $title_margin_bottom . 'px;'; } if ($title_text_color) { $title_style .= 'color:' . $title_text_color . ';'; } if ($title_fontsize) { $title_style .= 'font-size:' . $title_fontsize . 'px;line-height:' . $title_fontsize . 'px;'; } if ($title_fontweight) { $title_style .= 'font-weight:' . $title_fontweight . ';';
<?php /** * @package SP Page Builder * @author JoomShaper http://www.joomshaper.com * @copyright Copyright (c) 2010 - 2015 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ //no direct accees defined('_JEXEC') or die('resticted aceess'); AddonParser::addAddon('sp_alert', 'sp_alert_addon'); function sp_alert_addon($atts) { extract(spAddonAtts(array("title" => '', "heading_selector" => 'h3', "title_fontsize" => '', "title_fontweight" => '', "title_text_color" => '', "title_margin_top" => '', "title_margin_bottom" => '', "close" => 'yes', "type" => 'info', "text" => '', "class" => ''), $atts)); $output = '<div class="sppb-addon sppb-addon-alert ' . $class . '">'; if ($title) { $title_style = ''; if ($title_margin_top != '') { $title_style .= 'margin-top:' . (int) $title_margin_top . 'px;'; } if ($title_margin_bottom != '') { $title_style .= 'margin-bottom:' . (int) $title_margin_bottom . 'px;'; } if ($title_text_color) { $title_style .= 'color:' . $title_text_color . ';'; } if ($title_fontsize) { $title_style .= 'font-size:' . $title_fontsize . 'px;line-height:' . $title_fontsize . 'px;'; } if ($title_fontweight) { $title_style .= 'font-weight:' . $title_fontweight . ';';
<?php /** * @package SP Page Builder * @author JoomShaper http://www.joomshaper.com * @copyright Copyright (c) 2010 - 2015 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ //no direct accees defined('_JEXEC') or die('resticted aceess'); AddonParser::addAddon('sp_blocknumber', 'sp_blocknumber_addon'); function sp_blocknumber_addon($atts) { extract(spAddonAtts(array("title" => '', "heading_selector" => 'h3', "title_fontsize" => '', "title_fontweight" => '', "title_text_color" => '', "title_margin_top" => '', "title_margin_bottom" => '', "heading" => '', "text" => '', "number" => '', "size" => '', "background" => '', "color" => '', "border_radius" => '', "alignment" => '', 'class' => ''), $atts)); $style = ''; $block_number = ''; if ($number) { if ($size) { $style .= 'width: ' . (int) $size . 'px; height: ' . (int) $size . 'px; line-height: ' . (int) $size . 'px;'; } if ($background) { $style .= 'background-color: ' . $background . ';'; } if ($color) { $style .= 'color: ' . $color . ';'; } if ($border_radius) { $style .= 'border-radius: ' . (int) $border_radius . 'px;'; } $block_number .= '<span class="sppb-blocknumber-number" style="' . $style . '">' . $number . '</span>'; }
page-<?php echo $page->id; ?> "> <?php if ($showPageHeading) { ?> <div class="page-header"> <h1 itemprop="name"> <?php if ($menuheading) { echo $menuheading; } else { echo $page->title; } ?> </h1> </div> <?php } ?> <div class="page-content"> <?php echo AddonParser::viewAddons($content, $fullwidth); ?> </div> </div> <?php $doc->addScript(JUri::base(true) . '/components/com_sppagebuilder/assets/js/sppagebuilder.js');
<?php /** * @package SP Page Builder * @author JoomShaper http://www.joomshaper.com * @copyright Copyright (c) 2010 - 2015 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ //no direct accees defined('_JEXEC') or die('resticted aceess'); AddonParser::addAddon('sp_image', 'sp_image_addon'); function sp_image_addon($atts) { extract(spAddonAtts(array('title' => '', "heading_selector" => 'h3', "title_fontsize" => '', "title_fontweight" => '', "title_text_color" => '', "title_margin_top" => '', "title_margin_bottom" => '', 'image' => '', 'position' => '', 'link' => '', 'target' => '', 'class' => ''), $atts)); $output = ''; if ($image) { $output .= '<div class="sppb-addon sppb-addon-single-image ' . $position . ' ' . $class . '">'; if ($title) { $title_style = ''; if ($title_margin_top != '') { $title_style .= 'margin-top:' . (int) $title_margin_top . 'px;'; } if ($title_margin_bottom != '') { $title_style .= 'margin-bottom:' . (int) $title_margin_bottom . 'px;'; } if ($title_text_color) { $title_style .= 'color:' . $title_text_color . ';'; } if ($title_fontsize) { $title_style .= 'font-size:' . $title_fontsize . 'px;line-height:' . $title_fontsize . 'px;'; }
<?php /** * @package SP Page Builder * @author JoomShaper http://www.joomshaper.com * @copyright Copyright (c) 2010 - 2015 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ //no direct accees defined('_JEXEC') or die('resticted aceess'); AddonParser::addAddon('sp_dropcap', 'sp_dropcap_addon'); function sp_dropcap_addon($atts) { extract(spAddonAtts(array("title" => '', "heading_selector" => 'h3', "title_fontsize" => '', "title_fontweight" => '', "title_text_color" => '', "title_margin_top" => '', "title_margin_bottom" => '', "text" => '', 'class' => ''), $atts)); if ($text) { $output = '<div class="sppb-addon sppb-addon-dropcap ' . $class . '">'; if ($title) { $title_style = ''; if ($title_margin_top != '') { $title_style .= 'margin-top:' . (int) $title_margin_top . 'px;'; } if ($title_margin_bottom != '') { $title_style .= 'margin-bottom:' . (int) $title_margin_bottom . 'px;'; } if ($title_text_color) { $title_style .= 'color:' . $title_text_color . ';'; } if ($title_fontsize) { $title_style .= 'font-size:' . $title_fontsize . 'px;line-height:' . $title_fontsize . 'px;'; } if ($title_fontweight) {
<?php /** * @package SP Page Builder * @author JoomShaper http://www.joomshaper.com * @copyright Copyright (c) 2010 - 2015 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ //no direct accees defined('_JEXEC') or die('resticted aceess'); AddonParser::addAddon('sp_animated_number', 'sp_animated_number_addon'); function sp_animated_number_addon($atts) { extract(spAddonAtts(array('number' => '', 'duration' => '', 'font_size' => '', 'border_color' => '', 'border_width' => '', 'border_radius' => '', 'color' => '', 'background' => '', 'counter_title' => '', 'title_font_size' => '', 'counter_color' => '', 'alignment' => '', 'class' => ''), $atts)); $style = ''; $number_style = ''; $text_style = ''; if ($background) { $class .= $class . ' sppb-hasbg'; } if ($background) { $style .= 'background-color:' . $background . ';'; } if ($border_color) { $style .= 'border-style:solid;border-color:' . $border_color . ';'; } if ($border_width) { $style .= 'border-width:' . (int) $border_width . 'px;'; } if ($border_radius) { $style .= 'border-radius:' . (int) $border_radius . 'px;';
<?php /** * @package SP Page Builder * @author JoomShaper http://www.joomshaper.com * @copyright Copyright (c) 2010 - 2016 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ //no direct accees defined('_JEXEC') or die('restricted aceess'); AddonParser::addAddon('sp_button', 'sp_button_addon'); function sp_button_addon($atts, $content) { extract(spAddonAtts(array("text" => '', "url" => '', "size" => '', "type" => '', "icon" => '', "target" => '', "margin" => '', "block" => '', "class" => ''), $atts)); if ($icon != '') { $text = '<i class="fa ' . $icon . '"></i> ' . $text; } $style = ''; if ($margin) { $style = ' style="margin:' . $margin . ';"'; } $output = '<a target="' . $target . '" href="' . $url . '" class="sppb-btn sppb-btn-' . $type . ' sppb-btn-' . $size . ' ' . $block . ' ' . $class . '" ' . $style . ' role="button">' . $text . '</a>'; return $output; }
<?php /** * @package SP Page Builder * @author JoomShaper http://www.joomshaper.com * @copyright Copyright (c) 2010 - 2016 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ //no direct accees defined('_JEXEC') or die('restricted aceess'); AddonParser::addAddon('sp_empty_space', 'sp_empty_space_addon'); function sp_empty_space_addon($atts) { extract(spAddonAtts(array('gap' => '20', 'hidden_md' => '', 'hidden_sm' => '', 'hidden_xs' => '', 'class' => ''), $atts)); //Responsive utilities if ($hidden_md) { $class .= $class . ' sppb-hidden-md sppb-hidden-lg'; } if ($hidden_sm) { $class .= $class . ' sppb-hidden-sm'; } if ($hidden_xs) { $class .= $class . ' sppb-hidden-xs'; } return '<div class="sppb-empty-space ' . $class . ' clearfix" style="margin-bottom:' . (int) $gap . 'px;"></div>'; }
<?php /** * @package SP Page Builder * @author JoomShaper http://www.joomshaper.com * @copyright Copyright (c) 2010 - 2015 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ //no direct accees defined('_JEXEC') or die('restricted aceess'); AddonParser::addAddon('sp_module', 'sp_module_addon'); function sp_module_addon($atts) { extract(spAddonAtts(array('id' => '', 'module_type' => 'module', 'position' => '', 'title' => '', "heading_selector" => 'h3', "title_fontsize" => '', "title_fontweight" => '', "title_text_color" => '', "title_margin_top" => '', "title_margin_bottom" => '', 'class' => ''), $atts)); if ($module_type == 'position' && !$position || $module_type == 'module' && !$id) { return; } //Query Module $app = JFactory::getApplication(); $user = JFactory::getUser(); $groups = implode(',', $user->getAuthorisedViewLevels()); $lang = JFactory::getLanguage()->getTag(); $clientId = (int) $app->getClientId(); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('m.id, m.title, m.module, m.position, m.ordering, m.content, m.showtitle, m.params'); $query->from('#__modules AS m'); $query->where('m.published = 1'); if ($module_type == 'position') { $query->where($db->quoteName('m.position') . ' = ' . $db->quote($position)); $query->order('m.ordering ASC');
<?php /** * @package SP Page Builder * @author JoomShaper http://www.joomshaper.com * @copyright Copyright (c) 2010 - 2015 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ //no direct accees defined('_JEXEC') or die('resticted aceess'); AddonParser::addAddon('sp_image_content', 'sp_image_content_addon'); function sp_image_content_addon($atts) { extract(spAddonAtts(array("image" => '', "image_width" => '', "image_alignment" => '', "title" => '', "heading_selector" => 'h3', "title_fontsize" => '', "title_fontweight" => '', "title_text_color" => '', "title_margin_top" => '', "title_margin_bottom" => '', "text" => '', "button_text" => '', "button_url" => '', "button_size" => '', "button_type" => '', "button_icon" => '', "button_block" => '', "button_target" => '', "class" => ''), $atts)); if ($image_alignment == 'left') { $eontent_class = ' sppb-col-sm-offset-6'; } else { $eontent_class = ''; } if ($image && $title) { $output = '<div class="sppb-addon sppb-addon-image-content aligment-' . $image_alignment . ' clearfix ' . $class . '">'; //Image $output .= '<div style="background-image: url(' . JURI::base(true) . '/' . $image . ');" class="sppb-image-holder">'; $output .= '</div>'; //Content $output .= '<div class="sppb-container">'; $output .= '<div class="sppb-row">'; $output .= '<div class="sppb-col-sm-6' . $eontent_class . '">'; $output .= '<div class="sppb-content-holder">'; $title_style = ''; if ($title_margin_top != '') {
<?php /** * @package SP Page Builder * @author JoomShaper http://www.joomshaper.com * @copyright Copyright (c) 2010 - 2015 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ //no direct accees defined('_JEXEC') or die('restricted aceess'); AddonParser::addAddon('sp_video', 'sp_video_addon'); function sp_video_addon($atts) { extract(spAddonAtts(array("title" => '', "heading_selector" => 'h3', "title_fontsize" => '', "title_fontweight" => '', "title_text_color" => '', "title_margin_top" => '', "title_margin_bottom" => '', "url" => '', "class" => ''), $atts)); if ($url) { $video = parse_url($url); switch ($video['host']) { case 'youtu.be': $id = trim($video['path'], '/'); $src = '//www.youtube.com/embed/' . $id; break; case 'www.youtube.com': case 'youtube.com': parse_str($video['query'], $query); $id = $query['v']; $src = '//www.youtube.com/embed/' . $id; break; case 'vimeo.com': case 'www.vimeo.com': $id = trim($video['path'], '/'); $src = "//player.vimeo.com/video/{$id}";
<?php /** * @package SP Page Builder * @author JoomShaper http://www.joomshaper.com * @copyright Copyright (c) 2010 - 2015 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ //no direct accees defined('_JEXEC') or die('resticted aceess'); AddonParser::addAddon('sp_ajax_contact', 'sp_ajax_contact_addon'); function sp_ajax_contact_addon($atts) { extract(spAddonAtts(array("title" => '', "heading_selector" => 'h3', "title_fontsize" => '', "title_fontweight" => '', "title_text_color" => '', "title_margin_top" => '', "title_margin_bottom" => '', "recipient_email" => '*****@*****.**', "formcaptcha" => '', "captcha_question" => '', "captcha_answer" => '', "class" => ''), $atts)); $output = '<div class="sppb-addon sppb-addon-ajax-contact ' . $class . '">'; if ($title) { $title_style = ''; if ($title_margin_top != '') { $title_style .= 'margin-top:' . (int) $title_margin_top . 'px;'; } if ($title_margin_bottom != '') { $title_style .= 'margin-bottom:' . (int) $title_margin_bottom . 'px;'; } if ($title_text_color) { $title_style .= 'color:' . $title_text_color . ';'; } if ($title_fontsize) { $title_style .= 'font-size:' . $title_fontsize . 'px;line-height:' . $title_fontsize . 'px;'; } if ($title_fontweight) { $title_style .= 'font-weight:' . $title_fontweight . ';';
public static function viewAddons($content, $fullwidth = 0) { if (is_array($content)) { $output = ''; foreach ($content as $key => $row) { $fullscreen = 0; if (isset($settings->fullscreen) && $settings->fullscreen) { $fullscreen = 1; } $settings = $row->settings; $row_class = isset($settings->class) ? $settings->class : ''; $row_id = isset($settings->id) ? $settings->id : ''; $style = 'style="'; if (isset($settings->margin) && $settings->margin) { $style .= 'margin:' . $settings->margin . ';'; } if (isset($settings->padding) && $settings->padding) { $style .= 'padding:' . $settings->padding . ';'; } if (isset($settings->color) && $settings->color) { $style .= 'color:' . $settings->color . ';'; } if (isset($settings->background_color) && $settings->background_color) { $style .= 'background-color:' . $settings->background_color . ';'; } if (isset($settings->background_image) && $settings->background_image) { $style .= 'background-image:url(' . JURI::base(true) . '/' . $settings->background_image . ');'; if (isset($settings->background_repeat) && $settings->background_repeat) { $style .= 'background-repeat:' . $settings->background_repeat . ';'; } if (isset($settings->background_size) && $settings->background_size) { $style .= 'background-size:' . $settings->background_size . ';'; } if (isset($settings->background_attachment) && $settings->background_attachment) { $style .= 'background-attachment:' . $settings->background_attachment . ';'; } if (isset($settings->background_position) && $settings->background_position) { $style .= 'background-position:' . $settings->background_position . ';'; } } $style .= '"'; if (isset($settings->fullscreen)) { $fullscreen = $settings->fullscreen; } if (isset($settings->background_video) && $settings->background_video) { $video = JPATH_ROOT . '/' . $settings->background_video; $video_param = ''; if (isset($settings->background_image) && $settings->background_image) { $video_param .= ' data-vide-image="' . JURI::base(true) . '/' . $settings->background_image . '"'; } if (isset($settings->background_video_mp4) && $settings->background_video_mp4) { $video_param .= ' data-vide-mp4="' . $settings->background_video_mp4 . '"'; } if (isset($settings->background_video_ogv) && $settings->background_video_ogv) { $video_param .= ' data-vide-ogv="' . $settings->background_video_ogv . '"'; } $output .= '<section ' . ($row_id ? 'id="' . $row_id . '"' : '') . ' class="sppb-section ' . $row_class . '" ' . $style . $video_param . ' data-vide-bg>'; } else { $output .= '<section ' . ($row_id ? 'id="' . $row_id . '"' : '') . ' class="sppb-section ' . $row_class . '" ' . $style . '>'; } if (!$fullscreen) { if ($fullwidth) { //$output .= '<div class="sppb-row">'; $output .= '<div class="sppb-container">'; } } //Title if (isset($settings->title) && $settings->title || isset($settings->subtitle) && $settings->subtitle) { $title_position = ''; if (isset($settings->title_position) && $settings->title_position) { $title_position = $settings->title_position; } if ($fullscreen) { // Add container to full width row $output .= '<div class="sppb-container">'; } $output .= '<div class="sppb-section-title ' . $title_position . '">'; if ($settings->title) { $heading_selector = 'h2'; $title_style = 'style="'; if (isset($settings->heading_selector)) { if ($settings->heading_selector == '') { $heading_selector = 'h2'; } else { $heading_selector = $settings->heading_selector; } } //Title Font Size if (isset($settings->title_fontsize)) { if ($settings->title_fontsize != '') { $title_style .= 'font-size:' . $settings->title_fontsize . 'px;line-height: ' . $settings->title_fontsize . 'px;'; } } //Title Font Weight if (isset($settings->title_fontweight)) { if ($settings->title_fontweight != '') { $title_style .= 'font-weight:' . $settings->title_fontweight . ';'; } } //Title Text Color if (isset($settings->title_text_color)) { if ($settings->title_text_color != '') { $title_style .= 'color:' . $settings->title_text_color . ';'; } } //Title Margin Top if (isset($settings->title_margin_top)) { if ($settings->title_margin_top != '') { $title_style .= 'margin-top:' . $settings->title_margin_top . 'px;'; } } //Title Margin Bottom if (isset($settings->title_margin_bottom)) { if ($settings->title_margin_bottom != '') { $title_style .= 'margin-bottom:' . $settings->title_margin_bottom . 'px;'; } } $title_style .= '"'; $output .= '<' . $heading_selector . ' class="sppb-title-heading" ' . $title_style . '>' . $settings->title . '</' . $heading_selector . '>'; } if ($settings->subtitle) { $subtitle_fontsize = ''; //Style if (isset($settings->title_fontsize)) { if ($settings->title_fontsize != '') { $subtitle_fontsize = 'style="font-size:' . $settings->subtitle_fontsize . 'px;"'; } } $output .= '<p class="sppb-title-subheading" ' . $subtitle_fontsize . '>' . $settings->subtitle . '</p>'; } $output .= '</div>'; if ($fullscreen) { // Add container to full width row $output .= '</div>'; } } $output .= '<div class="sppb-row">'; foreach ($row->attr as $key => $column) { $col_settings = $column->settings; $col_class = isset($col_settings->class) ? $col_settings->class : ''; $col_style = 'style="'; if (isset($col_settings->color) && $col_settings->color) { $col_style .= 'color:' . $col_settings->color . ';'; } if (isset($col_settings->background) && $col_settings->background) { $col_style .= 'background-color:' . $col_settings->background . ';'; } if (isset($col_settings->padding) && $col_settings->padding) { $col_style .= 'padding:' . $col_settings->padding . ';'; } $col_style .= '"'; $data_attr = ''; if (isset($col_settings->animation) && $col_settings->animation) { $col_class .= ' sppb-wow ' . $col_settings->animation; } if (isset($col_settings->animationduration) && $col_settings->animationduration) { $data_attr .= ' data-sppb-wow-duration="' . $col_settings->animationduration . 'ms"'; } if (isset($col_settings->animationdelay) && $col_settings->animationdelay) { $data_attr .= ' data-sppb-wow-delay="' . $col_settings->animationdelay . 'ms"'; } $column_name = str_replace('column-parent ', '', $column->class_name); $output .= '<div class="sppb-' . str_replace('active-column-parent', '', $column_name) . '">'; $output .= '<div class="sppb-addon-container' . $col_class . '" ' . $col_style . $data_attr . '>'; foreach ($column->attr as $key => $spcode) { $output .= '[sp_' . $spcode->name; if (!empty($spcode->atts)) { foreach ($spcode->atts as $key => $value) { $output .= ' ' . $key . '="' . htmlspecialchars($value) . '"'; } } $output .= ']'; if (is_array($spcode->scontent)) { foreach ($spcode->scontent as $key => $spcode_inner) { $output .= '[' . $spcode_inner->name; foreach ($spcode_inner->atts as $key => $value) { $output .= ' ' . $key . '="' . htmlspecialchars($value) . '"'; } $output .= ']'; } } else { $output .= $spcode->scontent; } $output .= '[/sp_' . $spcode->name . ']'; } $output .= '</div>'; //end column $output .= '</div>'; //end column } $output .= '</div>'; if (!$fullscreen) { if ($fullwidth) { $output .= '</div>'; //end sppb-contaniner //$output .= '</div>';//end spppb-row } } $output .= '</section>'; } return htmlspecialchars_decode(AddonParser::spDoAddon($output)); } else { return '<p>' . $content . '</p>'; } }
<?php /** * @package SP Page Builder * @author JoomShaper http://www.joomshaper.com * @copyright Copyright (c) 2010 - 2015 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ //no direct accees defined('_JEXEC') or die('resticted aceess'); AddonParser::addAddon('sp_tweet', 'sp_tweet_addon'); function sp_tweet_addon($atts) { extract(spAddonAtts(array('title' => '', "heading_selector" => 'h3', "title_fontsize" => '', "title_fontweight" => '', "title_text_color" => '', "title_margin_top" => '', "title_margin_bottom" => '', 'autoplay' => '', 'username' => '', 'consumerkey' => '', 'consumersecret' => '', 'accesstoken' => '', 'accesstokensecret' => '', 'include_rts' => '', 'ignore_replies' => '', 'show_username' => '', 'show_avatar' => '', 'count' => '', 'class' => ''), $atts)); if ($username == '') { $username = '******'; } if ($consumerkey == '') { return '<div class="sppb-alert sppb-alert-danger"><strong>Error</strong><br>Insert consumer key for twitter feed slider addon</div>'; } if ($consumersecret == '') { return '<div class="sppb-alert sppb-alert-danger"><strong>Error</strong><br>Insert consumer secrete key for twitter feed slider addon</div>'; } if ($accesstoken == '') { return '<div class="sppb-alert sppb-alert-danger"><strong>Error</strong><br>Insert access token for twitter feed slider addon</div>'; } if ($accesstokensecret == '') { return '<div class="sppb-alert sppb-alert-danger"><strong>Error</strong><br>Insert access token secrete key for twitter feed slider addon</div>'; } //Twitter helper file require_once JPATH_COMPONENT . '/helpers/tweet/helper.php';
<?php /** * @package SP Page Builder * @author JoomShaper http://www.joomshaper.com * @copyright Copyright (c) 2010 - 2015 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ //no direct accees defined('_JEXEC') or die('resticted aceess'); AddonParser::addAddon('sp_feature', 'sp_feature_addon'); function sp_feature_addon($atts) { extract(spAddonAtts(array("title" => '', "heading_selector" => 'h3', "title_fontsize" => '', "title_fontweight" => '', "title_text_color" => '', "title_url" => '', "title_position" => 'before', "feature_type" => 'icon', "feature_image" => '', 'icon_name' => '', 'icon_color' => '', 'icon_size' => '', 'icon_border_color' => '', 'icon_border_width' => '', 'icon_border_radius' => '', 'icon_style' => '', 'icon_background' => '', 'icon_margin_top' => '', 'icon_margin_bottom' => '', 'icon_padding' => '', 'text' => '', 'alignment' => '', 'class' => ''), $atts)); //Image or icon position if ($title_position == 'before') { $icon_image_position = 'after'; } else { if ($title_position == 'after') { $icon_image_position = 'before'; } else { $icon_image_position = $title_position; } } //Reset Alignment for left and right style if ($icon_image_position == 'left' || $icon_image_position == 'right') { $alignment = 'sppb-text-' . $icon_image_position; } //Icon or Image $media = ''; if ($feature_type == 'icon') {
<?php /** * @package SP Page Builder * @author JoomShaper http://www.joomshaper.com * @copyright Copyright (c) 2010 - 2015 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ //no direct accees defined('_JEXEC') or die('resticted aceess'); AddonParser::addAddon('sp_pricing', 'sp_pricing_addon'); function sp_pricing_addon($atts) { extract(spAddonAtts(array('title' => '', 'price' => '', 'duration' => '', 'pricing_content' => '', 'button_text' => '', 'button_url' => '', 'button_size' => '', 'button_type' => '', 'button_icon' => '', 'button_block' => '', 'alignment' => '', 'background' => '', 'color' => '', 'featured' => '', 'class' => ''), $atts)); $style = ''; if ($background) { $style .= 'background-color:' . $background . ';border-color: ' . $background . ';'; } if ($color) { $style .= 'color:' . $color . ';'; } if ($button_icon != '') { $button_text = '<i class="fa ' . $button_icon . '"></i> ' . $button_text; } $output = '<div class="sppb-addon sppb-addon-pricing-table ' . $alignment . ' ' . $class . '">'; $output .= '<div style="' . $style . '" class="sppb-pricing-box ' . $featured . '">'; $output .= '<div class="sppb-pricing-header">'; if ($title) { $output .= '<div class="sppb-pricing-title">' . $title . '</div>'; } if ($price) {
<?php /** * @package SP Page Builder * @author JoomShaper http://www.joomshaper.com * @copyright Copyright (c) 2010 - 2015 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ //no direct accees defined('_JEXEC') or die('resticted aceess'); AddonParser::addAddon('sp_divider', 'sp_divider_addon'); function sp_divider_addon($atts, $content) { extract(spAddonAtts(array('divider_type' => '', 'margin_top' => '', 'margin_bottom' => '', 'border_color' => '', 'border_style' => '', 'border_width' => '', 'divider_image' => '', 'background_repeat' => '', 'background_position' => '', 'divider_height' => '', 'class' => ''), $atts)); $style = ''; $style1 = ''; $style2 = ''; if ($margin_top) { $style .= 'margin-top:' . (int) $margin_top . 'px;'; } if ($margin_bottom) { $style .= 'margin-bottom:' . (int) $margin_bottom . 'px;'; } if ($border_color) { $style1 .= 'border-bottom-color:' . $border_color . ';'; } if ($border_style) { $style1 .= 'border-bottom-style:' . $border_style . ';'; } if ($border_width) { $style1 .= 'border-bottom-width:' . (int) $border_width . 'px;';
<?php /** * @package SP Page Builder * @author JoomShaper http://www.joomshaper.com * @copyright Copyright (c) 2010 - 2015 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ //no direct accees defined('_JEXEC') or die('resticted aceess'); AddonParser::addAddon('sp_text_block', 'sp_text_block_addon'); function sp_text_block_addon($atts) { extract(spAddonAtts(array("title" => '', "heading_selector" => 'h3', "title_fontsize" => '', "title_text_color" => '', "title_margin_top" => '', "title_margin_bottom" => '', "text" => '', "alignment" => '', 'class' => ''), $atts)); $output = '<div class="sppb-addon sppb-addon-text-block ' . $alignment . ' ' . $class . '">'; if ($title) { $title_style = ''; if ($title_margin_top) { $title_style .= 'margin-top:' . (int) $title_margin_top . 'px;'; } if ($title_margin_bottom) { $title_style .= 'margin-bottom:' . (int) $title_margin_bottom . 'px;'; } if ($title_text_color) { $title_style .= 'color:' . $title_text_color . ';'; } if ($title_fontsize) { $title_style .= 'font-size:' . $title_fontsize . 'px;line-height:' . $title_fontsize . 'px;'; } $output .= '<' . $heading_selector . ' class="sppb-addon-title" style="' . $title_style . '">' . $title . '</' . $heading_selector . '>'; }
<?php defined('_JEXEC') or die('resticted aceess'); AddonParser::addAddon('sp_call_to_action', 'sp_call_to_action_addon'); function sp_call_to_action_addon($atts) { extract(spAddonAtts(array("title" => '', "heading_selector" => 'h3', "title_fontsize" => '', "title_text_color" => '', "title_margin_top" => '', "title_margin_bottom" => '', "subtitle_fontsize" => '', "subtitle" => '', "subtitle_text_color" => '', "text" => '', "background" => '', "color" => '', "padding" => '', "button_text" => '', "button_url" => '', "button_size" => '', "button_type" => '', "button_icon" => '', "button_block" => '', "button_target" => '', "button_position" => '', "class" => ''), $atts)); $style = ''; if ($button_icon) { $button_text = '<i class="fa ' . $button_icon . '"></i> ' . $button_text; } if ($background) { $style .= 'background-color: ' . $background . ';padding:40px 20px;'; } if ($color) { $style .= 'color: ' . $color . ';'; } if ($padding) { $style .= 'padding: ' . (int) $padding . 'px;'; } $button_output = '<a target="' . $button_target . '" href="' . $button_url . '" class="sppb-btn sppb-btn-' . $button_type . ' sppb-btn-' . $button_size . ' ' . $button_block . '" role="button">' . $button_text . '</a>'; $output = '<div class="sppb-addon sppb-addon-cta ' . $class . '" style="' . $style . '">'; if ($button_position == 'right') { $output .= '<div class="sppb-row">'; $output .= '<div class="sppb-col-sm-8">'; if ($title) { $title_style = ''; if ($title_margin_top) { $title_style .= 'margin-top:' . (int) $title_margin_top . 'px;'; } if ($title_margin_bottom) {
<?php /** * @package SP Page Builder * @author JoomShaper http://www.joomshaper.com * @copyright Copyright (c) 2010 - 2015 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ //no direct accees defined('_JEXEC') or die('resticted aceess'); AddonParser::addAddon('sp_progress_bar', 'sp_progress_bar_addon'); function sp_progress_bar_addon($atts, $content) { extract(spAddonAtts(array("type" => '', "progress" => '', "text" => '', "stripped" => '', "active" => '', "class" => ''), $atts)); $output = '<div class="sppb-progress ' . $class . '">'; $output .= '<div class="sppb-progress-bar ' . $type . ' ' . $stripped . ' ' . $active . '" role="progressbar" aria-valuenow="' . (int) $progress . '" aria-valuemin="0" aria-valuemax="100" data-width="' . (int) $progress . '%">'; if ($text) { $output .= $text; } $output .= '</div>'; $output .= '</div>'; return $output; }
<?php /** * @package SP Page Builder * @author JoomShaper http://www.joomshaper.com * @copyright Copyright (c) 2010 - 2015 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ //no direct accees defined('_JEXEC') or die('resticted aceess'); AddonParser::addAddon('sp_testimonial', 'sp_testimonial_addon'); function sp_testimonial_addon($atts, $content) { extract(spAddonAtts(array("title" => '', "heading_selector" => 'h3', "title_fontsize" => '', "title_text_color" => '', "title_margin_top" => '', "title_margin_bottom" => '', "review" => '', "name" => '', "company" => '', "avatar" => '', "avatar_width" => '', "avatar_position" => 'left', "link" => '', "link_target" => '', "class" => ''), $atts)); $output = '<div class="sppb-addon sppb-addon-testimonial ' . $class . '">'; if ($title) { $title_style = ''; if ($title_margin_top) { $title_style .= 'margin-top:' . (int) $title_margin_top . 'px;'; } if ($title_margin_bottom) { $title_style .= 'margin-bottom:' . (int) $title_margin_bottom . 'px;'; } if ($title_text_color) { $title_style .= 'color:' . $title_text_color . ';'; } if ($title_fontsize) { $title_style .= 'font-size:' . $title_fontsize . 'px;line-height:' . $title_fontsize . 'px;'; } $output .= '<' . $heading_selector . ' class="sppb-addon-title" style="' . $title_style . '">' . $title . '</' . $heading_selector . '>'; }
<?php /** * @package SP Page Builder * @author JoomShaper http://www.joomshaper.com * @copyright Copyright (c) 2010 - 2015 JoomShaper * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later */ //no direct accees defined('_JEXEC') or die('resticted aceess'); AddonParser::addAddon('sp_modal', 'sp_modal_addon'); function sp_modal_addon($atts) { extract(spAddonAtts(array('modal_selector' => '', 'button_text' => '', 'button_size' => '', 'button_type' => '', 'button_icon' => '', 'button_block' => '', 'selector_image' => '', 'selector_icon_name' => '', 'selector_icon_size' => '', 'selector_icon_color' => '', 'selector_icon_background' => '', 'selector_icon_border_color' => '', 'selector_icon_border_width' => '', 'selector_icon_border_radius' => '', 'selector_icon_padding' => '', 'selector_margin_top' => '', 'selector_margin_bottom' => '', 'alignment' => '', 'modal_unique_id' => 'mymodal', 'modal_content_type' => 'text', 'modal_content_text' => '', 'modal_content_image' => '', 'modal_content_video_url' => '', 'modal_popup_width' => '', 'modal_popup_height' => '', 'class' => ''), $atts)); $doc = JFactory::getDocument(); $doc->addStylesheet(JURI::base(true) . '/components/com_sppagebuilder/assets/css/prettyPhoto.css'); $doc->addStylesheet(JURI::base(true) . '/components/com_sppagebuilder/assets/css/sppb-prettyphoto.css'); $doc->addScript(JURI::base(true) . '/components/com_sppagebuilder/assets/js/jquery.prettyPhoto.js'); $doc->addScriptdeclaration('jQuery(function($){ $(document).ready(function(){ $("#' . $modal_unique_id . '").prettyPhoto({ social_tools: false, theme: "sppb_prettyphoto", horizontal_padding: 20, allow_resize: true, default_width: ' . $modal_popup_width . ', default_height: ' . $modal_popup_height . ' }); }); })'); $output = '';