当前位置: 首页>>代码示例>>PHP>>正文


PHP spAddonAtts函数代码示例

本文整理汇总了PHP中spAddonAtts函数的典型用法代码示例。如果您正苦于以下问题:PHP spAddonAtts函数的具体用法?PHP spAddonAtts怎么用?PHP spAddonAtts使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了spAddonAtts函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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 . '>';
    }
    $output .= '<div class="sppb-addon-content">';
    $output .= $text;
    $output .= '</div>';
    $output .= '</div>';
    return $output;
}
开发者ID:benji1979,项目名称:teszt1,代码行数:26,代码来源:site.php

示例2: sp_soundcloud_addon

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;
}
开发者ID:naka211,项目名称:myloyal,代码行数:32,代码来源:site.php

示例3: 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 . ';';
        }
        $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;
}
开发者ID:naka211,项目名称:myloyal,代码行数:33,代码来源:site.php

示例4: sp_flickr_addon

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;
}
开发者ID:naka211,项目名称:myloyal,代码行数:35,代码来源:site.php

示例5: 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 . ';';
        }
        $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;
}
开发者ID:naka211,项目名称:myloyal,代码行数:34,代码来源:site.php

示例6: 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;';
    }
    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;
}
开发者ID:naka211,项目名称:myloyal,代码行数:34,代码来源:site.php

示例7: sp_carousel_item_addon

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;
}
开发者ID:naka211,项目名称:myloyal,代码行数:32,代码来源:site.php

示例8: 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) {
                $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;
}
开发者ID:naka211,项目名称:myloyal,代码行数:32,代码来源:site.php

示例9: sp_gplus_button_addon

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;
}
开发者ID:naka211,项目名称:myloyal,代码行数:8,代码来源:site.php

示例10: sp_tab_item_addon

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);
}
开发者ID:naka211,项目名称:myloyal,代码行数:9,代码来源:site.php

示例11: sp_button_group_item_addon

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;
}
开发者ID:naka211,项目名称:myloyal,代码行数:10,代码来源:site.php

示例12: 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;
}
开发者ID:naka211,项目名称:myloyal,代码行数:12,代码来源:site.php

示例13: 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" => 'email@yourdomain.com', "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;
}
开发者ID:naka211,项目名称:myloyal,代码行数:53,代码来源:site.php

示例14: 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 != '') {
            $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;
}
开发者ID:naka211,项目名称:myloyal,代码行数:53,代码来源:site.php

示例15: 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;
}
开发者ID:lyrasoft,项目名称:lyrasoft.github.io,代码行数:13,代码来源:site.php


注:本文中的spAddonAtts函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。