Esempio n. 1
0
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 . '>';
    }
    $output .= '<div class="sppb-addon-content">';
    $output .= $text;
    $output .= '</div>';
    $output .= '</div>';
    return $output;
}
Esempio n. 2
0
function sp_soundcloud_addon($atts)
{
    extract(spAddonAtts(array("title" => '', "heading_selector" => 'h3', "title_fontsize" => '', "title_fontweight" => '', "title_text_color" => '', "title_margin_top" => '', "title_margin_bottom" => '', "embed" => '', "class" => ''), $atts));
    if ($embed) {
        $output = '<div class="sppb-addon sppb-addon-soundcloud ' . $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-video-block sppb-embed-responsive sppb-embed-responsive-16by9">';
        $output .= $embed;
        $output .= '</div>';
        $output .= '</div>';
        return $output;
    }
    return;
}
Esempio n. 3
0
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 . ';';
        }
        $output .= '<' . $heading_selector . ' class="sppb-addon-title" style="' . $title_style . '">' . $title . '</' . $heading_selector . '>';
    }
    $output .= '<div class="sppb-addon-content">';
    $output .= '<audio controls ' . $autoplay . ' ' . $repeat . '>';
    $output .= '<source src="' . $mp3_link . '" type="audio/mp3">';
    $output .= '<source src="' . $ogg_link . '" type="audio/ogg">';
    $output .= 'Your browser does not support the audio element.';
    $output .= '</audio>';
    $output .= '</div>';
    $output .= '</div>';
    return $output;
}
Esempio n. 4
0
function sp_flickr_addon($atts)
{
    extract(spAddonAtts(array('title' => '', "heading_selector" => 'h3', "title_fontsize" => '', "title_fontweight" => '', "title_text_color" => '', "title_margin_top" => '', "title_margin_bottom" => '', 'id' => '', 'count' => '', 'class' => ''), $atts));
    if ($id == '') {
        $id = '35591378@N03';
    }
    if ($id) {
        $output = '<div class="sppb-addon sppb-addon-flickr ' . $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-flickr-gallery" data-id="' . $id . '" data-count="' . $count . '"></ul>';
        $output .= '</div>';
        $output .= '</div>';
        return $output;
    }
    return;
}
Esempio n. 5
0
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 . ';';
        }
        $output .= '<' . $heading_selector . ' class="sppb-addon-title" style="' . $title_style . '">' . $title . '</' . $heading_selector . '>';
    }
    $output .= '<div class="sppb-addon-content">';
    $output .= '<div class="sppb-alert sppb-alert-' . $type . ' sppb-fade in" role="alert">';
    if ($close == 'yes') {
        $output .= '<button type="button" class="close" data-dismiss="sppb-alert"><span aria-hidden="true">&times;</span></button>';
    }
    $output .= $text;
    $output .= '</div>';
    $output .= '</div>';
    $output .= '</div>';
    return $output;
}
Esempio n. 6
0
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;';
    }
    if ($divider_height) {
        $style2 .= 'height:' . (int) $divider_height . 'px;';
    }
    if ($divider_image) {
        $style2 .= 'background-image: url(' . JURI::base(true) . '/' . $divider_image . ');background-repeat:' . $background_repeat . ';background-position:50% 50%;';
    }
    if ($divider_type == 'image') {
        $output = '<div class="sppb-divider sppb-divider-' . $divider_type . '" style="' . $style . ' ' . $style2 . '"></div>';
    } else {
        $output = '<div class="sppb-divider sppb-divider-' . $divider_type . '" style="' . $style . ' ' . $style1 . '"></div>';
    }
    return $output;
}
Esempio n. 7
0
function sp_carousel_item_addon($atts)
{
    extract(spAddonAtts(array("title" => '', "bg" => '', 'content' => '', "button_text" => '', "button_url" => '', "button_size" => '', "button_type" => '', "button_icon" => ''), $atts));
    if ($button_icon) {
        $button_text = '<i class="fa ' . $button_icon . '"></i> ' . $button_text;
    }
    $has_bg = '';
    if ($bg) {
        $has_bg = ' sppb-item-has-bg';
    }
    $output = '<div class="sppb-item' . $has_bg . '">';
    if ($bg) {
        $output .= '<img src="' . $bg . '" alt="' . $title . '">';
    }
    $output .= '<div class="sppb-carousel-item-inner">';
    $output .= '<div class="sppb-carousel-caption">';
    $output .= '<div class="sppb-carousel-pro-text">';
    if ($title || $content) {
        if ($title != '') {
            $output .= '<h2>' . $title . '</h2>';
        }
        $output .= '<p>' . $content . '</p>';
        if ($button_text && $button_url) {
            $output .= '<a href="' . $button_url . '" class="sppb-btn sppb-btn-' . $button_type . ' sppb-btn-' . $button_size . '" role="button">' . $button_text . '</a>';
        }
    }
    $output .= '</div>';
    $output .= '</div>';
    $output .= '</div>';
    $output .= '</div>';
    return $output;
}
Esempio n. 8
0
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) {
                $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 .= '<p class="sppb-dropcap">' . $text . '</p>';
        $output .= '</div>';
        $output .= '</div>';
        return $output;
    }
    return;
}
Esempio n. 9
0
function sp_gplus_button_addon($atts)
{
    extract(spAddonAtts(array('size' => '', 'annotation' => '', 'width' => ''), $atts));
    $doc = JFactory::getDocument();
    $doc->addScript('https://apis.google.com/js/plusone.js');
    $output = '<div class="g-plusone" data-href="' . JURI::current() . '" data-size="' . $size . '" data-annotation="' . $annotation . '"></div>';
    return $output;
}
Esempio n. 10
0
function sp_tab_item_addon($atts)
{
    global $sppbTabArray;
    extract(spAddonAtts(array("title" => '', "icon" => '', 'content' => ''), $atts));
    if ($icon != '') {
        $icon = '<i class="fa ' . $icon . '"></i> ';
    }
    $sppbTabArray[] = array('title' => $title, 'icon' => $icon, 'content' => $content);
}
Esempio n. 11
0
function sp_button_group_item_addon($atts)
{
    global $sppbButtonGroup_margin;
    extract(spAddonAtts(array("title" => '', "url" => '', "size" => '', "type" => '', "icon" => '', "target" => '', "class" => ''), $atts));
    if ($icon != '') {
        $title = '<i class="fa ' . $icon . '"></i> ' . $title;
    }
    $output = '<a target="' . $target . '" href="' . $url . '" class="sppb-btn sppb-btn-' . $type . ' sppb-btn-' . $size . $class . '" style="margin:' . (int) $sppbButtonGroup_margin . 'px;" role="button">' . $title . '</a>';
    return $output;
}
Esempio n. 12
0
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;
}
Esempio n. 13
0
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 . ';';
        }
        $output .= '<' . $heading_selector . ' class="sppb-addon-title" style="' . $title_style . '">' . $title . '</' . $heading_selector . '>';
    }
    $output .= '<div class="sppb-addon-content">';
    $output .= '<form class="sppb-ajaxt-contact-form">';
    $output .= '<div class="sppb-form-group col-md-4 contact-left">';
    $output .= '<input type="text" name="name" class="sppb-form-control" placeholder="' . JText::_('Navn') . '" required="required">';
    $output .= '</div>';
    $output .= '<div class="sppb-form-group col-md-4">';
    $output .= '<input type="email" name="email" class="sppb-form-control" placeholder="' . JText::_('COM_SPPAGEBUILDER_ADDON_AJAX_CONTACT_EMAIL') . '" required="required">';
    $output .= '</div>';
    $output .= '<div class="sppb-form-group col-md-4 contact-right">';
    $output .= '<input type="text" name="subject" class="sppb-form-control" placeholder="' . JText::_('Emne') . '" required="required">';
    $output .= '</div>';
    if ($formcaptcha) {
        $output .= '<div class="sppb-form-group">';
        $output .= '<input type="text" name="captcha_question" class="sppb-form-control" placeholder="' . $captcha_question . '" required="required">';
        $output .= '</div>';
    }
    $output .= '<div class="sppb-form-group">';
    $output .= '<textarea type="text" name="message" rows="5" class="sppb-form-control" placeholder="' . JText::_('Besked') . '" required="required"></textarea>';
    $output .= '</div>';
    $output .= '<input type="hidden" name="recipient" value="' . base64_encode($recipient_email) . '">';
    if ($formcaptcha) {
        $output .= '<input type="hidden" name="captcha_answer" value="' . md5($captcha_answer) . '">';
    }
    $output .= '<div class="contact-form-button"> <button type="submit" class="sppb-btn sppb-btn-success  button-style-1"><i class="fa"></i> ' . JText::_('Send besked') . '</button> </div>';
    $output .= '</form>';
    $output .= '<div style="display:none;margin-top:10px;" class="sppb-ajax-contact-status"></div>';
    $output .= '</div>';
    $output .= '</div>';
    return $output;
}
Esempio n. 14
0
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 != '') {
            $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-image-content-title" style="' . $title_style . '">' . $title . '</' . $heading_selector . '>';
        if ($text) {
            $output .= '<p class="sppb-image-content-text">' . $text . '</p>';
        }
        if ($button_icon) {
            $button_text = '<i class="fa ' . $button_icon . '"></i> ' . $button_text;
        }
        if ($button_text) {
            $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>';
        $output .= '</div>';
        $output .= '</div>';
        $output .= '</div>';
        $output .= '</div>';
        return $output;
    }
    return;
}
Esempio n. 15
0
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;
}
Esempio n. 16
0
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}";
        }
        $output = '<div class="sppb-addon sppb-addon-video ' . $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-video-block sppb-embed-responsive sppb-embed-responsive-16by9">';
        $output .= '<iframe class="sppb-embed-responsive-item" src="' . $src . '" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
        $output .= '</div>';
        $output .= '</div>';
        return $output;
    }
    return;
}
Esempio n. 17
0
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>';
}
Esempio n. 18
0
function sp_testimonialpro_item_addon($atts)
{
    extract(spAddonAtts(array("title" => '', "avatar" => '', "avatar_style" => '', 'message' => '', "url" => ''), $atts));
    $output = '<div class="sppb-item">';
    $title = '<strong class="pro-client-name">' . $title . '</strong>';
    if ($url) {
        $title .= ' - <span class="pro-client-url">' . $url . '</span>';
    }
    if ($avatar) {
        $output .= '<img class="sppb-img-responsive sppb-avatar ' . $avatar_style . '" src="' . $avatar . '" alt="">';
    }
    $output .= '<div class="sppb-testimonial-message">' . $message . '</div>';
    if ($title) {
        $output .= '<div class="sppb-testimonial-client">' . $title . '</div>';
    }
    $output .= '</div>';
    return $output;
}
Esempio n. 19
0
function sp_gallery_item_addon($atts)
{
    global $sppbGalleryParam;
    extract(spAddonAtts(array("title" => '', "thumb" => '', "full" => ''), $atts));
    $output = '';
    if ($thumb) {
        $output .= '<li>';
        if ($full) {
            $output .= '<a href="' . $full . '" rel="prettyPhoto[gallery1]">';
        }
        $output .= '<img class="sppb-img-responsive" src="' . $thumb . '" width="' . $sppbGalleryParam['width'] . '" height="' . $sppbGalleryParam['height'] . '" alt="' . $title . '">';
        if ($full) {
            $output .= '</a>';
        }
        $output .= '</li>';
    }
    return $output;
}
Esempio n. 20
0
function sp_clients_item_addon($atts)
{
    global $sppbClientsParam;
    extract(spAddonAtts(array("image" => '', "url" => '', "title" => ''), $atts));
    $output = '';
    if ($image) {
        $output .= '<div class="' . $sppbClientsParam['col'] . '">';
        if ($url) {
            $output .= '<a target="_blank" href="' . $url . '">';
        }
        $output .= '<img class="sppb-img-responsive" src="' . $image . '" alt="' . $title . '">';
        if ($url) {
            $output .= '</a>';
        }
        $output .= '</div>';
    }
    return $output;
}
Esempio n. 21
0
function sp_facebook_like_addon($atts)
{
    extract(spAddonAtts(array('layout' => '', 'width' => 225, 'appid' => '274875399357309'), $atts));
    $output = '';
    if (!defined('_SPPB_FB')) {
        define('_SPPB_FB', 1);
        $output .= '<div id="fb-root"></div>';
        $output .= '<script>(function(d, s, id) {
					  var js, fjs = d.getElementsByTagName(s)[0];
					  if (d.getElementById(id)) return;
					  js = d.createElement(s); js.id = id;
					  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=' . $appid . '&version=v2.0";
					  fjs.parentNode.insertBefore(js, fjs);
					}(document, "script", "facebook-jssdk"));</script>';
    }
    $output .= '<div class="fb-like" data-href="' . JURI::current() . '" data-layout="' . $layout . '" data-width="' . $width . '" data-action="like" data-show-faces="false" data-share="false"></div>';
    return $output;
}
Esempio n. 22
0
function sp_twitter_share_addon($atts)
{
    extract(spAddonAtts(array('showcount' => '', 'size' => ''), $atts));
    $output = '';
    if (!defined('_SPPB_TWITTER')) {
        define('_SPPB_TWITTER', 1);
        $output .= "<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>";
    }
    $data = '';
    if (!$showcount) {
        $data .= ' data-count="none"';
    }
    if ($size == 'large') {
        $data .= ' data-size="large"';
    }
    $output .= '<a href="' . JURI::current() . '" class="twitter-share-button" ' . $data . '>Tweet</a>';
    return $output;
}
Esempio n. 23
0
function sp_facebook_likebox_addon($atts)
{
    extract(spAddonAtts(array('title' => '', "heading_selector" => 'h3', "title_fontsize" => '', "title_fontweight" => '', "title_text_color" => '', "title_margin_top" => '', "title_margin_bottom" => '', 'url' => '', 'appid' => '354400064582736', 'width' => '', 'height' => '', 'colorscheme' => '', 'showposts' => '', 'class' => ''), $atts));
    if ($width == '') {
        $width = 292;
    }
    if ($height == '') {
        $height = 300;
    }
    $output = '<div class="sppb-addon sppb-addon-facebook-likebox ' . $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 . '>';
    }
    if (!defined('_SPPB_FB')) {
        define('_SPPB_FB', 1);
        $output .= '<div id="fb-root"></div>';
        $output .= '<script>(function(d, s, id) {
					  var js, fjs = d.getElementsByTagName(s)[0];
					  if (d.getElementById(id)) return;
					  js = d.createElement(s); js.id = id;
					  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=' . $appid . '&version=v2.0";
					  fjs.parentNode.insertBefore(js, fjs);
					}(document, "script", "facebook-jssdk"));</script>';
    }
    $output .= '<div class="fb-like-box" data-href="' . $url . '" data-height="' . (int) $height . '" data-width="' . (int) $width . '" data-colorscheme="' . $colorscheme . '" data-show-faces="true" data-header="false" data-stream="' . $showposts . '" data-show-border="false"></div>';
    $output .= '</div>';
    return $output;
}
Esempio n. 24
0
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;';
    }
    if ($color) {
        $number_style .= 'color:' . $color . ';';
    }
    if ($font_size) {
        $number_style .= 'font-size:' . (int) $font_size . 'px;line-height:' . (int) $font_size . 'px;';
    }
    if ($counter_color) {
        $text_style .= 'color:' . $counter_color . ';';
    }
    if ($title_font_size) {
        $text_style .= 'font-size:' . (int) $title_font_size . 'px;line-height:' . (int) $title_font_size . 'px;';
    }
    $output = '<div class="sppb-addon sppb-addon-animated-number ' . $alignment . ' ' . $class . '">';
    $output .= '<div class="sppb-addon-content" style="' . $style . '">';
    $output .= '<div class="sppb-animated-number" data-digit="' . $number . '" data-duration="' . $duration . '" style="' . $number_style . '">0</div>';
    if ($counter_title) {
        $output .= '<div class="sppb-animated-number-title" style="' . $text_style . '">' . $counter_title . '</div>';
    }
    $output .= '</div>';
    $output .= '</div>';
    return $output;
}
Esempio n. 25
0
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) {
        $output .= '<div class="sppb-pricing-price">' . $price . '</div>';
    }
    if ($duration) {
        $output .= '<span class="sppb-pricing-duration">' . $duration . '</span>';
    }
    $output .= '</div>';
    if ($pricing_content) {
        $output .= '<div class="sppb-pricing-features">';
        $output .= '<ul>';
        $features = explode("\n", $pricing_content);
        foreach ($features as $feature) {
            $output .= '<li>' . $feature . '</li>';
        }
        $output .= '</ul>';
        $output .= '</div>';
    }
    $output .= '<div class="sppb-pricing-footer">';
    $output .= '<a href="' . $button_url . '" class="sppb-btn sppb-btn-' . $button_type . ' sppb-btn-' . $button_size . ' ' . $button_block . '">' . $button_text . '</a>';
    $output .= '</div>';
    $output .= '</div>';
    $output .= '</div>';
    return $output;
}
Esempio n. 26
0
function sp_icon_addon($atts)
{
    extract(spAddonAtts(array('name' => '', 'alignment' => '', 'color' => '', 'size' => '', 'border_color' => '', 'border_width' => '', 'border_radius' => '', 'style' => '', 'background' => '', 'margin_top' => '', 'margin_bottom' => '', 'padding' => '', 'class' => ''), $atts));
    $style = 'text-align:center;';
    $font_size = '';
    if ($name) {
        if ($margin_top) {
            $style .= 'margin-top:' . (int) $margin_top . 'px;';
        }
        if ($margin_bottom) {
            $style .= 'margin-bottom:' . (int) $margin_bottom . 'px;';
        }
        if ($padding) {
            $style .= 'padding:' . (int) $padding . 'px;';
        }
        if ($color) {
            $style .= 'color:' . $color . ';';
        }
        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;';
        }
        if ($size) {
            $font_size .= 'font-size:' . (int) $size . 'px;width:' . (int) $size . 'px;height:' . (int) $size . 'px;line-height:' . (int) $size . 'px;';
        }
        $output = '<div class="sppb-icon ' . $alignment . ' ' . $class . '">';
        $output .= '<span style="display:inline-block;' . $style . ';">';
        $output .= '<i class="fa ' . $name . '" style="' . $font_size . ';"></i>';
        $output .= '</span>';
        $output .= '</div>';
        return $output;
    }
    return;
}
Esempio n. 27
0
function sp_testimonial_addon($atts, $content)
{
    extract(spAddonAtts(array("title" => '', "heading_selector" => 'h3', "title_fontsize" => '', "title_fontweight" => '', "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;';
        }
        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-media">';
    if ($avatar) {
        $output .= '<a target="' . $link_target . '" class="pull-' . $avatar_position . '" href="' . $link . '">';
        $output .= '<img class="sppb-media-object" src="' . $avatar . '" width="' . $avatar_width . '" alt="' . $name . '">';
        $output .= '</a>';
    }
    $output .= '<div class="sppb-media-body">';
    $output .= '<blockquote>';
    $output .= $review;
    $output .= '<footer><strong>' . $name . '</strong> <cite>' . $company . '</cite></footer>';
    $output .= '</blockquote>';
    $output .= '</div>';
    $output .= '</div>';
    $output .= '</div>';
    $output .= '</div>';
    return $output;
}
Esempio n. 28
0
function sp_accordion_item_addon($atts)
{
    global $sppbAccordionStyle;
    extract(spAddonAtts(array("title" => '', "icon" => '', 'content' => ''), $atts));
    if ($icon != '') {
        $title = '<i class="fa ' . $icon . '"></i> ' . $title;
    }
    $output = '<div class="sppb-panel sppb-' . $sppbAccordionStyle . '">';
    $output .= '<div class="sppb-panel-heading">';
    $output .= '<span class="sppb-panel-title">';
    $output .= $title;
    $output .= '</span>';
    $output .= '</div>';
    $output .= '<div class="sppb-panel-collapse">';
    $output .= '<div class="sppb-panel-body">';
    $output .= $content;
    $output .= '</div>';
    $output .= '</div>';
    $output .= '</div>';
    return $output;
}
Esempio n. 29
0
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;';
            }
            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">';
        if ($link != 'http://') {
            $output .= '<a target="' . $target . '" href="' . $link . '">';
        }
        $output .= '<img class="sppb-img-responsive" src="' . $image . '" alt="">';
        if ($link != 'http://') {
            $output .= '</a>';
        }
        $output .= '</div>';
        $output .= '</div>';
        return $output;
    }
    return;
}
Esempio n. 30
0
function sp_gmap_addon($atts)
{
    extract(spAddonAtts(array("title" => '', "heading_selector" => 'h3', "title_fontsize" => '', "title_fontweight" => '', "title_text_color" => '', "title_margin_top" => '', "title_margin_bottom" => '', "map" => '', "height" => '', "type" => '', "zoom" => '', 'mousescroll' => '', "class" => ''), $atts));
    if ($map) {
        $map = explode(',', $map);
        $doc = JFactory::getDocument();
        $doc->addScript('//maps.google.com/maps/api/js?sensor=false&libraries=places');
        $doc->addScript(JURI::base(true) . '/components/com_sppagebuilder/assets/js/gmap.js');
        $output = '<div class="sppb-addon sppb-addon-gmap ' . $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 style="height:' . (int) $height . 'px" class="sppb-addon-gmap-canvas" data-lat="' . $map[0] . '" data-lng="' . $map[1] . '" data-maptype="' . $type . '" data-mapzoom="' . $zoom . '" data-mousescroll="' . $mousescroll . '"></div>';
        $output .= '</div>';
        $output .= '</div>';
        return $output;
    }
    return;
}