本文整理汇总了PHP中yt_image_media函数的典型用法代码示例。如果您正苦于以下问题:PHP yt_image_media函数的具体用法?PHP yt_image_media怎么用?PHP yt_image_media使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了yt_image_media函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: image_compareYTShortcode
function image_compareYTShortcode($atts = null, $content = null)
{
$atts = ytshortcode_atts(array('before_image' => '', 'after_image' => '', 'orientation' => '', 'before_text' => 'Original', 'after_text' => 'Modified', 'class' => ''), $atts, 'image_compare');
// Unique Id
$id = uniqid("ytic") . rand() . time();
if (yt_image_media($atts['before_image']) && yt_image_media($atts['after_image'])) {
$orientation = $atts['orientation'] == 'horizontal' ? 'data-orientation="horizontal"' : '';
$css = '#' . $id . ' .twentytwenty-before-label:before {content: "' . $atts['before_text'] . '"}';
$css .= '#' . $id . ' .twentytwenty-after-label:before {content: "' . $atts['after_text'] . '"}';
// Css Adding in Head
JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/shortcodes/image_compare/css/image_compare.css", 'text/css');
// JavaScipt additon in Head
JHtml::_('jquery.framework');
JHtml::script(JUri::base() . "plugins/system/ytshortcodes/assets/js/jquery.twentytwenty.js");
JHtml::script(JUri::base() . "plugins/system/ytshortcodes/assets/js/jquery.event.move.js");
// OUtput Structure in here
$return = '
<div id="' . $id . '" class="twentytwenty-container' . trim($atts['class']) . '" data-orientation="horizontal">
<img src="' . yt_image_media($atts['before_image']) . '" alt="' . $atts['before_text'] . '">
<img src="' . yt_image_media($atts['after_image']) . '" alt="' . $atts['before_text'] . '">
</div>';
$js = 'jQuery(window).load(function(){
jQuery("#' . $id . '").twentytwenty({orientation: \'' . $atts['orientation'] . '\'});
});';
$doc = JFactory::getDocument();
$doc->addStyleDeclaration($css);
$doc->addScriptDeclaration($js);
} else {
$return = yt_alert_box('You can compare two images by using this shortcode', 'warning');
}
return $return;
}
示例2: accordion_itemYTShortcode
function accordion_itemYTShortcode($atts, $content = null)
{
global $style_acc;
extract(ytshortcode_atts(array("title" => '', "icon" => 'plus', 'background' => '#fff', "color_title" => '#333', "color_desc" => '#333', "width" => '100', "height" => '100%', "active" => '', "border_color" => '', "icon_color" => '#ccc', "icon_size" => '16', "background_active" => '#fff', "color_active" => '#4e9e31'), $atts));
$id = uniqid('yt_acc_item_') . rand() . time();
$css = '';
$icon_color = $icon_color ? 'color:' . $icon_color . ';' : '';
$icon_size_ = $icon_size ? 'font-size: ' . intval($icon_size) . 'px;' : '';
$style = $style_acc == 'border' ? 'border:1px solid ' . $border_color : '';
$acc_item = "<li class='yt-accordion-group' id='" . $id . "' style='" . $style . "'>";
$active = $active == "yes" ? 'enable' : 'disable';
$acc_item .= "<h3 class='accordion-heading " . $active . "'";
$acc_item .= " style='background:" . $background . "; box-shadow: 0px 1px 0px " . $background . " inset ; color:" . $color_title . ";font-size:" . $icon_size . "px'>";
if ($icon != '') {
if (strpos($icon, 'icon:') !== false) {
$acc_item .= "<i class='icon_accordion fa fa-" . trim(str_replace('icon:', '', $icon)) . "'></i> ";
if ($icon_color or $icon_size) {
$css .= '#' . $id . ' .icon_accordion {' . $icon_color . $icon_size_ . '}';
}
} else {
$acc_item .= '<img src="' . yt_image_media($icon) . '" style="width:' . $icon_size . 'px" alt="" /> ';
}
}
$acc_item .= ' ' . $title . "</h3>";
$acc_item .= "<div class='yt-accordion-inner' style='background:" . $background . ";color:" . $color_desc . ";border-color:" . $color_title . "'>" . parse_shortcode(str_replace(array("<br/>", "<br>", "<br />"), " ", $content)) . "</div>";
$acc_item .= "</li>";
$doc = JFactory::getDocument();
$doc->addStyleDeclaration($css);
return $acc_item;
}
示例3: sectionYTShortcode
function sectionYTShortcode($atts = null, $content = null)
{
$atts = ytshortcode_atts(array('background' => '#ffffff', 'image' => '', 'repeat' => 'repeat', 'parallax' => 'yes', 'speed' => '10', 'max_width' => '960', 'margin' => '0px 0px 0px 0px', 'padding' => '30px 0px 30px 0px', 'border' => 'none', 'color' => '#333333', 'text_align' => 'inharit', 'text_shadow' => 'none', 'url_youtube' => '', 'url_webm' => '', 'url_vimeo' => '', 'font_size' => '12px', 'class' => ''), $atts, 'section');
$id_section = uniqid('sec_') . rand() . time();
$id_video = uniqid('svb_sec_') . rand() . time();
$background = $atts['image'] ? sprintf('%s %s url(\'%s\') repeat %s', $atts['background'], '50% 0', yt_image_media($atts['image']), $atts['parallax'] === 'yes' ? 'fixed' : 'scroll') : $atts['background'];
if ($atts['image'] && $atts['parallax'] === 'yes') {
$atts['class'] .= ' yt-section-parallax';
}
if ($atts['url_youtube']) {
$atts['class'] .= ' yt-panel-clickable';
}
JHtml::_('jquery.framework');
if ($atts['image'] && $atts['parallax'] === 'yes' or $atts['url_youtube']) {
JHtml::script(JUri::base() . "plugins/system/ytshortcodes/shortcodes/section/js/section.js");
}
JHtml::script(JUri::base() . "plugins/system/ytshortcodes/shortcodes/section/js/modernizr.video.js");
JHtml::script(JUri::base() . "plugins/system/ytshortcodes/shortcodes/section/js/swfobject.js");
JHtml::script(JUri::base() . "plugins/system/ytshortcodes/shortcodes/section/js/video_background.js");
JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/shortcodes/section/css/section.css", 'text/css');
$atts['text_align'] = $atts['text_align'] != 'inherit' ? 'text-align:' . $atts['text_align'] . ';' : '';
$atts['text_shadow'] = $atts['text_shadow'] ? ' -webkit-text-shadow:' . $atts['text_shadow'] . ';-moz-text-shadow:' . $atts['text_shadow'] . ';text-shadow:' . $atts['text_shadow'] . ';' : '';
if ($atts['url_youtube'] != '') {
return '<div class="yt-section-forcefullwidth"><div id="' . $id_section . '" class="yt-section-wrapper" data-id="' . $id_section . '"><div class="yt-section ' . trim($atts['class']) . ' " data-speed="' . $atts['speed'] . '" style="background:' . $background . ';margin:' . $atts['margin'] . ';padding:' . $atts['padding'] . ';border-top:' . $atts['border'] . ';border-bottom:' . $atts['border'] . '"><div class="yt-section-content yt-content-wrap" style="max-width:' . $atts['max_width'] . 'px; ' . $atts['text_align'] . ' color:' . $atts['color'] . ';' . $atts['text_shadow'] . ' font-size:' . $atts['font_size'] . '">' . parse_shortcode(str_replace(array("<br/>", "<br />", "<p></p>"), " ", $content)) . '</div><div class="yt-section-overlay"></div><div class="yt-section-video" id="' . $id_video . '" data-id="' . $id_video . '" data-loop="true" data-muted="true" data-autoplay="true" data-ratio="1.77" data-overlay="" data-swfpath="" data-youtube="' . $atts['url_youtube'] . '"><div id="video_background_video_1" style="z-index: 0; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; overflow: hidden;"></div></div></div></div></div>';
} else {
if ($atts['url_webm'] != '') {
return '<div class="yt-section-forcefullwidth"><div id="' . $id_section . '" class="yt-section-wrapper" data-id="' . $id_section . '"><div class="yt-section ' . trim($atts['class']) . ' " data-speed="' . $atts['speed'] . '" style="background:' . $background . ';margin:' . $atts['margin'] . ';padding:' . $atts['padding'] . ';border-top:' . $atts['border'] . ';border-bottom:' . $atts['border'] . '"><div class="yt-section-content yt-content-wrap" style="max-width:' . $atts['max_width'] . 'px; ' . $atts['text_align'] . ' color:' . $atts['color'] . ';' . $atts['text_shadow'] . ' font-size:' . $atts['font_size'] . '">' . parse_shortcode(str_replace(array("<br/>", "<br />"), " ", $content)) . '</div><div class="yt-section-overlay"></div><div class="yt-section-video" id="' . $id_video . '" data-id="' . $id_video . '" data-loop="true" data-muted="true" data-autoplay="true" data-ratio="1.77" data-overlay="" data-swfpath="" data-webm="' . $atts['url_webm'] . '"><div id="video_background_video_1" style="z-index: 0; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; overflow: hidden;"><video autoplay="" loop="" onended="this.play()"><source src="' . $atts['url_webm'] . '" type="video/webm"></video></div></div></div></div></div>';
} else {
return '<div class="yt-section ' . trim($atts['class']) . ' " data-speed="' . $atts['speed'] . '" style="background:' . $background . ';margin:' . $atts['margin'] . ';padding:' . $atts['padding'] . ';border-top:' . $atts['border'] . ';border-bottom:' . $atts['border'] . '"><div class="yt-section-content yt-content-wrap" style="max-width:' . $atts['max_width'] . 'px; ' . $atts['text_align'] . ' color:' . $atts['color'] . ';' . $atts['text_shadow'] . ' font-size:' . $atts['font_size'] . '">' . parse_shortcode(str_replace(array("<br/>", "<br />", "<p></p>"), " ", $content)) . '</div></div>';
}
}
}
示例4: documentYTShortcode
function documentYTShortcode($atts = null, $content = null)
{
$atts = ytshortcode_atts(array('url' => '', 'file' => null, 'width' => 600, 'height' => 600, 'responsive' => 'yes', 'class' => ''), $atts, 'yt_document');
if ($atts['file'] !== null) {
$atts['url'] = $atts['file'];
}
JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/shortcodes/document/css/document.css", 'text/css');
return '<div class="yt-document yt-responsive-media-' . $atts['responsive'] . '"><iframe src="http://docs.google.com/viewer?embedded=true&url=' . yt_image_media($atts['url']) . '" width="' . $atts['width'] . '" height="' . $atts['height'] . '" class="yt-document"></iframe></div>';
}
示例5: tabs_itemYTShortcode
function tabs_itemYTShortcode($atts, $content = null)
{
extract(ytshortcode_atts(array("title" => '', "icon" => ''), $atts));
global $tab_array;
if ($icon != '') {
if (strpos($icon, 'icon:') !== false) {
$icon = "<i class='fa fa-" . trim(str_replace('icon:', '', $icon)) . "'></i> ";
} else {
$icon = '<img src="' . yt_image_media($icon) . '" style="width:16px" alt="" /> ';
}
}
$tab_array[] = array("title" => $title, "icon" => $icon, "content" => parse_shortcode(str_replace(array("<br/>", "<br>", "<br />"), " ", $content)));
}
示例6: memberYTShortcode
function memberYTShortcode($atts = null, $content = null)
{
$atts = ytshortcode_atts(array('style' => '1', 'background' => '#ffffff', 'color' => '#333333', 'shadow' => '', 'border' => '1px solid #cccccc', 'radius' => '0', 'text_align' => 'left', 'photo' => '', 'name' => 'John Doe', 'role' => 'Designer', 'icon_1' => '', 'icon_1_url' => '', 'icon_1_color' => '#444444', 'icon_1_title' => '', 'icon_2' => '', 'icon_2_url' => '', 'icon_2_color' => '#444444', 'icon_2_title' => '', 'icon_3' => '', 'icon_3_url' => '', 'icon_3_color' => '#444444', 'icon_3_title' => '', 'icon_4' => '', 'icon_4_url' => '', 'icon_4_color' => '#444444', 'icon_4_title' => '', 'icon_5' => '', 'icon_5_url' => '', 'icon_5_color' => '#444444', 'icon_5_title' => '', 'icon_6' => '', 'icon_6_url' => '', 'icon_6_color' => '#444444', 'icon_6_title' => '', 'url' => '', 'class' => ''), $atts, 'yt_member');
$icons = array();
$id = uniqid('ytm') . rand() . time();
$css = '';
$box_shadow = $atts['shadow'] ? 'box-shadow:' . $atts['shadow'] . '; -webkit-box-shadow:' . $atts['shadow'] . ';' : '';
$radius = $atts['radius'] ? 'border-radius:' . $atts['radius'] . ';' : '';
$css .= '#' . $id . '.yt-member {background-color:' . $atts['background'] . '; color:' . $atts['color'] . '; border:' . $atts['border'] . ';' . $radius . $box_shadow . '}';
for ($i = 1; $i <= 6; $i++) {
if (!$atts['icon_' . $i] || !$atts['icon_' . $i . '_url']) {
continue;
}
if (strpos($atts['icon_' . $i], 'icon:') !== false) {
$icon = '<i class="fa fa-' . trim(str_replace('icon:', '', $atts['icon_' . $i])) . '" style="color:' . $atts['icon_' . $i . '_color'] . '"></i>';
} else {
$icon = '<img src="' . yt_image_media($atts['icon_' . $i]) . '" width="16" height="16" alt="" />';
}
$icons[] = '<a href="' . $atts['icon_' . $i . '_url'] . '" title="' . $atts['icon_' . $i . '_title'] . '" class="yt-memeber-icon yt-m-' . trim(str_replace('icon:', '', $atts['icon_' . $i])) . '" target="_blank" style="text-align:center"> ' . $icon . ' </a>';
}
$icons = count($icons) ? '<div class="yt-member-icons" style="text-align:' . $atts['text_align'] . ';"><div class="yt-member-ic">' . implode('', $icons) . '</div></div>' : '';
$multi_photo = array();
$multi_photo = explode(',', $atts['photo'], 2);
$member_photo = '';
$member_photo = '<a href="' . $atts['url'] . '" title="' . $atts['name'] . '"><img src="' . yt_image_media($multi_photo[0]) . '" alt="" /></a>';
if (isset($multi_photo[1])) {
$member_photo .= '<a href="' . $atts['url'] . '" title="' . $atts['name'] . '"><img src="' . yt_image_media($multi_photo[1]) . '" alt="" /></a>';
}
$title = '<span class="yt-member-name">' . $atts['name'] . '</span><span class="yt-member-role">' . $atts['role'] . '</span>';
// Adding asse
$doc = JFactory::getDocument();
$doc->addStyleDeclaration($css);
JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/shortcodes/member/css/membar.css", 'text/css');
// HTML Layout
$return = '<div id="' . $id . '" class="yt-member yt-member-style-' . $atts['style'] . '" data-url="' . $atts['url'] . '">';
$return .= '<div class="yt-member-photo">' . $member_photo;
if ($atts['style'] == '2' or $atts['style'] == '4') {
$return .= $icons;
}
$return .= '</div>';
$return .= '<div class="yt-member-info" style="text-align:' . $atts['text_align'] . '">';
$return .= $title;
$return .= '<div class="yt-member-desc yt-content-wrap">' . parse_shortcode(str_replace(array("<br/>", "<br />", "<p></p>"), " ", $content)) . '</div>';
$return .= '</div>';
if ($atts['style'] != '2' and $atts['style'] != '4') {
$return .= $icons;
}
$return .= '</div>';
return $return;
}
示例7: audioYTShortcode
function audioYTShortcode($atts, $content = null)
{
$atts = ytshortcode_atts(array('style' => 'dark', 'url' => false, 'width' => '100%', 'title' => '', 'autoplay' => 'no', 'volume' => 50, 'loop' => 'no', 'class' => ''), $atts, 'audio');
$id = uniqid('ytap') . rand() . time();
// Audio URL check
if (!$atts['url']) {
return yt_alert_box(JText::_('PLG_SYSTEM_YOUTECH_SHORTCODES_AUDIO_CU'), 'warning');
}
$width = $atts['width'] !== 'auto' ? 'max-width:' . $atts['width'] : '';
// Add CSS JS file in head
$cssFile = JUri::base() . "plugins/system/ytshortcodes/shortcodes/audio/css/jplayer.skin.css";
JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/shortcodes/audio/css/jplayer.skin.css");
JHtml::_('jquery.framework');
JHtml::script(JUri::base() . "plugins/system/ytshortcodes/shortcodes/audio/js/jplayer.js");
JHtml::script(JUri::base() . "plugins/system/ytshortcodes/shortcodes/audio/js/audio.js");
// Output HTML
$output = '<div id="' . $id . '_container" class="yt-clearfix yt-audio jPlayer audioPlayer jPlayer-' . $atts['style'] . '" data-id="' . $id . '" data-audio="' . yt_image_media($atts['url']) . '" data-swf="' . (JUri::root() . 'plugins/system/ytshortcodes/other/jplayer.swf') . '" data-autoplay="' . $atts['autoplay'] . '" data-volume="' . $atts['volume'] . '" data-loop="' . $atts['loop'] . '">
<div class="playerScreen">
<div id="' . $id . '" class="jPlayer-container"></div>
</div>
<div class="controls">
<div class="controlset left">
<a tabindex="1" href="#" class="play smooth"><i class="fa fa-play"></i></a>
<a tabindex="1" href="#" class="pause smooth"><i class="fa fa-pause"></i></a>
</div>
<div class="controlset right-volume">
<a tabindex="1" href="#" class="mute smooth"><i class="fa fa-volume-up"></i></a>
<a tabindex="1" href="#" class="unmute smooth"><i class="fa fa-volume-off"></i></a>
</div>
<div class="volumeblock">
<div class="volume-control"><div class="volume-value"></div></div>
</div>
<div class="jpprogress-block">
<div class="timer current"></div>
<div class="timer duration"></div>
<div class="jpprogress">
<div class="seekBar">
<div class="playBar"></div>
</div>
</div>
</div>
</div>
</div>';
return $output;
}
示例8: pricing_tables_itemYTShortcode
function pricing_tables_itemYTShortcode($atts, $content = null)
{
global $pcolumns, $per, $type;
extract(ytshortcode_atts(array("title" => '', "button_link" => '', "button_label" => '', "price" => '', "featured" => '', "text" => 'Popular', "background" => '#4e9e41', "color" => '#fff', "icon_name" => ''), $atts));
$return = '';
if ($icon_name != '') {
if (strpos($icon_name, 'icon:') !== false) {
$icon_name = '<i class="fa fa-' . trim(str_replace('icon:', '', $icon_name)) . '"></i>';
} else {
$icon_name = '<img src="' . yt_image_media($icon_name) . '" width="16" height="16" alt="" />';
}
}
switch ($type) {
case 'style1':
$text = strtolower($featured) == "yes" ? $text : '';
$return = '<div class="col-xs-12 col-sm-6 col-md-' . round(12 / $pcolumns) . ' col-lg-' . round(12 / $pcolumns) . '">
<div class="' . $type . ' column ' . ('yes' == strtolower($featured) ? ' featured' : '') . '">
<span class="pricing-featured">' . $text . '</span>
<div class="pricing-basic " style=""><h2>' . $title . '</h2></div>' . '<div class="pricing-money block " style="" ><h5>' . $price . '</h5></div>' . parse_shortcode(str_replace(array("<br/>", "<br>", "<br />"), " ", $content)) . '<div class="pricing-bottom">
<div class="signup"><a href="' . $button_link . '">' . $button_label . '<div class="iconsignup">' . $icon_name . '</div></a></div>
</div> ' . '</div></div>';
break;
default:
case 'style2':
//$text= (strtolower($featured)=="true" ? $text : '');
$return = '<div class="col-xs-12 col-sm-6 col-md-' . round(12 / $pcolumns) . ' col-lg-' . round(12 / $pcolumns) . '">
<div class="' . $type . ' column ' . ('true' == strtolower($featured) ? ' featured' : '') . '">
<div class="pricing-basic " style="background:' . $background . '; color:' . $color . '"><h2>' . $title . '</h2><span class="pricing-featured">' . $text . '</span></div>' . parse_shortcode(str_replace(array("<br/>", "<br>", "<br />"), " ", $content)) . '<div class="pricing-money block ">' . $price . '</div>' . '<div class="pricing-bottom" >
<a class="signup" style="background:' . $background . ';color:' . $color . '" href="' . $button_link . '">' . $button_label . '</a>
</div> ' . '</div></div>';
break;
case 'style3':
$text = strtolower($featured) == "true" ? $text : '';
$return = '<div class="col-xs-12 col-sm-6 col-md-' . round(12 / $pcolumns) . ' col-lg-' . round(12 / $pcolumns) . '">
<div class="' . $type . ' column ' . ('true' == strtolower($featured) ? ' featured' : '') . '">
<div class="pricing-basic " style="background:#e74847; color:' . $color . '"><h2>' . $title . '</h2><span class="pricing-featured">' . $text . '</span></div>' . '<div class="pricing-money block "><h1>' . $price . '</h1></div>' . parse_shortcode(str_replace(array("<br/>", "<br>", "<br />"), " ", $content)) . '<div class="pricing-bottom" >
<a class="signup" style="background:#e74847;color:' . $color . '" href="' . $button_link . '">' . $button_label . '</a>
</div> ' . '</div></div>';
}
return $return;
}
示例9: counterYTShortcode
function counterYTShortcode($atts = null, $content = null)
{
$atts = ytshortcode_atts(array('align' => 'none', 'text_align' => 'top', 'width' => '', 'count_start' => 1, 'count_end' => 5000, 'counter_speed' => 5, 'separator' => 'no', 'prefix' => '', 'suffix' => '', 'count_color' => '', 'count_size' => '32px', 'text_color' => '', 'text_size' => '14px', 'icon' => '', 'icon_color' => '', 'icon_size' => '24px', 'border' => '', 'background' => '', 'border_radius' => '', 'class' => ''), $atts);
$id = uniqid('ytc') . rand() . time();
$css = '';
if (strpos($atts['icon'], '/') !== false) {
$atts['icon'] = '<img src="' . yt_image_media($atts['icon']) . '" style="width:' . $atts['icon_size'] . ';" alt="" />';
} else {
if (strpos($atts['icon'], 'icon:') !== false) {
$atts['icon'] = '<i class="fa fa-' . trim(str_replace('icon:', '', $atts['icon'])) . '"></i>';
}
}
$icon = $atts['icon'] ? '<div class="yt-counter-icon" style="float:left; margin-right:10px">' . $atts['icon'] . '</div>' : '';
$border = $atts['border'] ? 'border:' . $atts['border'] . ';' : '';
$background = $atts['background'] ? 'background-color:' . $atts['background'] . ';' : '';
if ($border or $background) {
$css .= '#' . $id . ' {' . $background . $border . '}';
}
$count_color = $atts['count_color'] ? 'color:' . $atts['count_color'] . ';' : '';
$text_color = $atts['text_color'] ? 'color:' . $atts['text_color'] . ';' : '';
$icon_color = $atts['icon_color'] ? 'color:' . $atts['icon_color'] . ';' : '';
$css .= '#' . $id . ' .yt-counter-number {font-size: ' . $atts['count_size'] . '; ' . $count_color . ' }';
$css .= '#' . $id . ' .yt-counter-text {' . $text_color . ' font-size: ' . $atts['text_size'] . ';}';
$css .= '#' . $id . ' i {' . $icon_color . '' . 'font-size:' . $atts['count_size'] . '; line-height: 1.42857;}';
// Add css file in head
$doc = JFactory::getDocument();
$doc->addStyleDeclaration($css);
JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/shortcodes/counter/css/counter.css", 'text/css', "screen");
// Add javascript file in head
JHtml::_('jquery.framework');
JHtml::script(JUri::base() . "plugins/system/ytshortcodes/assets/js/jquery.appear.js");
JHtml::script(JUri::base() . "plugins/system/ytshortcodes/shortcodes/counter/js/countUp.js");
$return = '<div id="' . $id . '" class="yt-counter-wrapper clearfix yt-counter-' . $atts['align'] . ' ' . trim($atts['class']) . ' pull-' . $atts['text_align'] . '" style="width:' . $atts['width'] . '; overflow:auto; border-radius:' . $atts['border_radius'] . '" data-id="' . $id . '" data-from="' . $atts['count_start'] . '" data-to="' . $atts['count_end'] . '" data-speed="' . $atts['counter_speed'] . '" data-separator="' . $atts['separator'] . '" data-prefix="' . $atts['prefix'] . '" data-suffix="' . $atts['suffix'] . '">';
$return .= $icon;
$return .= '<div class="yt-counter-desc" >
<div id="' . $id . '_count" class="yt-counter-number">
</div>
<div class="yt-counter-text">' . parse_shortcode(str_replace(array("<br/>", "<br />", "<p></p>"), " ", $content)) . '</div>
</div>';
$return .= '</div>';
return $return;
}
示例10: iconYTShortcode
function iconYTShortcode($atts, $content = null)
{
$atts = ytshortcode_atts(array('icon' => 'icon: heart', 'background' => '#eeeeee', 'color' => '#333333', 'size' => '20', 'shape_size' => '', 'padding' => '15px', 'radius' => '3px', 'border' => 'none', 'margin' => '', 'url' => '', 'target' => 'blank', 'class' => ''), $atts, 'icon');
$id = uniqid('ytico_') . rand() . time();
$css = '';
// dep 1.6.7
if ($atts['shape_size']) {
$atts['padding'] = $atts['shape_size'];
}
if ($atts['margin']) {
$css .= '#' . $id . '.yt-icon{margin:' . $atts['margin'] . '}';
}
if (strpos($atts['icon'], '/') !== false) {
$css .= '#' . $id . '.yt-icon img{ width:' . $atts['size'] . 'px;height:' . $atts['size'] . 'px;background:' . $atts['background'] . ';-webkit-border-radius:' . $atts['radius'] . ';border-radius:' . $atts['radius'] . ';border: ' . $atts['border'] . ';padding:' . $atts['padding'] . '; }';
} else {
if (strpos($atts['icon'], 'icon:') !== false) {
$css .= '#' . $id . '.yt-icon i{ font-size:' . $atts['size'] . 'px;line-height:' . $atts['size'] . 'px;background:' . $atts['background'] . ';color:' . $atts['color'] . ';-webkit-border-radius:' . $atts['radius'] . ';border-radius:' . $atts['radius'] . ';border: ' . $atts['border'] . '; padding:' . $atts['padding'] . '; }';
}
}
if (strpos($atts['icon'], '/') !== false) {
$atts['icon'] = '<img src="' . yt_image_media($atts['icon']) . '" alt="" width="' . intval($atts['size']) . 'px;" height="' . intval($atts['size']) . 'px" />';
} else {
if (strpos($atts['icon'], 'icon:') !== false) {
$atts['icon'] = '<i class="fa fa-' . trim(str_replace('icon:', '', $atts['icon'])) . '"></i>';
}
}
// Prepare text
if ($content) {
$content = '<span class="yt-icon-text">' . $content . '</span>';
}
if (!$atts['url']) {
$icon = '<span id="' . $id . '" class="yt-icon">' . $atts['icon'] . parse_shortcode(str_replace(array("<br/>", "<br>", "<br />", "<p>", "</p>"), " ", $content)) . '</span>';
} else {
$icon = '<a id="' . $id . '" href="' . $atts['url'] . '" class="yt-icon" target="_' . $atts['target'] . '">' . $atts['icon'] . parse_shortcode(str_replace(array("<br/>", "<br>", "<br />", "<p>", "</p>"), " ", $content)) . '</a>';
}
// Asset added
JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/shortcodes/icon/css/icon.css", 'text/css');
$doc = JFactory::getDocument();
$doc->addStyleDeclaration($css);
return $icon;
}
示例11: toggle_box_itemYTShortcode
function toggle_box_itemYTShortcode($atts, $content = null)
{
extract(ytshortcode_atts(array("title" => '', "icon" => '', "active" => '', "background" => '#f1f1f1', "color" => '#000'), $atts));
$toggle_active = strtoupper($active) == 'YES' ? 'active' : '';
$icon_active = '';
if ($icon != '') {
if (strpos($icon, 'icon:') !== false) {
$icon_active .= "<i class='fa fa-" . trim(str_replace('icon:', '', $icon)) . "'></i> ";
} else {
$icon_active .= '<img src="' . yt_image_media($icon) . '" style="width:16px" alt="" /> ';
}
}
$toggle_item = "<li class='yt-divider'>";
$toggle_item = $toggle_item . "<h3 class='toggle-box-head " . $toggle_active . "' style=' " . ($background != '' ? 'background:' . $background . '' : '') . ";" . ($color != '' ? 'color:' . $color . '' : '') . "'>";
$toggle_item = $toggle_item . $icon_active;
$toggle_item = $toggle_item . "<span style='color:" . $color . "; " . ($background == '' ? 'background:rgba(255,255,255,0.5)' : 'background:none') . "'></span>";
$toggle_item = $toggle_item . $title . "</h3>";
$toggle_item = $toggle_item . "<div class='toggle-box-content " . $toggle_active . "' style='border-color:" . $background . "'>" . parse_shortcode(str_replace(array("<br/>", "<br>", "<br />"), " ", $content)) . "</div>";
$toggle_item = $toggle_item . "</li>";
return $toggle_item;
}
示例12: portfolioYTShortcode
//.........这里部分代码省略.........
continue;
}
$category[] = $slide['category'];
$return .= '<div class="filter" data-category="' . str_replace(' ', '-', strtolower($slide['category'])) . '">' . $slide['category'] . '</div>';
}
$return .= '
<div class="clear"></div>
</div>
</div>
<div class="clear"></div>
<div class="megafolio-container"
data-grid_types="' . $atts['grid_type'] . '"
data-speed="' . $atts['speed'] . '"
data-delay="' . $atts['delay'] . '"
data-rotate="' . $atts['rotate'] . '"
data-padding="' . intval($atts['padding']) . '"
data-animation="' . $atts['animation'] . '" >';
$limit = 1;
foreach ((array) $slides as $slide) {
$thumb_url = yt_image_resize($slide['image'], $atts['thumb_width'], $atts['thumb_height'], 95);
// Title condition
if ($slide['title']) {
$title = stripslashes($slide['title']);
}
if (isset($slide['introtext'])) {
$intro_text = $slide['introtext'];
if ($atts['intro_text_limit']) {
$atts['intro_text'] = yt_char_limit($intro_text, $atts['intro_text_limit']);
}
}
$category = str_replace(' ', '-', strtolower($slide['category']));
if ($atts['style'] == 2) {
$return .= '
<div class="mega-entry cat-all ' . $category . '" data-src="' . yt_image_media($thumb_url['url']) . '" data-width="500" data-height="500">
<div class="links-container">
<a class="hoverlink project-link" href="' . $slide['link'] . '" title="' . strip_tags($title) . '">
<i class=" fa fa-link"></i>
<span></span>
</a>
<a class="hoverlink yt-lightbox-item" href="' . yt_image_media($slide['image']) . '" title="' . strip_tags($title) . '">
<i class=" fa fa-search"></i>
<span></span>
</a>
</div>
<div class="rollover-content mega-covercaption mega-square-bottom mega-portrait-bottom">
<div class="rollover-content-container">
<h3 class="entry-title">' . $title . '</h3>
<div class="entry-meta">
<div class="yt-portfolio-date">
<span class="yt-pdate">' . JHTML::_('date', $slide['created'], JText::_('DATE_FORMAT_LC3')) . '</span>
</div>
<div class="portfolio-categories">
<span class="category">' . $category . '</span>
</div>
</div>
</div>
</div>
</div>';
} elseif ($atts['style'] == 3) {
$return .= '
<div class="mega-entry cat-all ' . $category . '" data-src="' . yt_image_media($thumb_url['url']) . '" data-width="500" data-height="500">
<div class="mega-hover notitle">
<a class="yt-lightbox-item" href="' . yt_image_media($slide['image']) . '" title="' . strip_tags($title) . '">
<div class="mega-hoverview fa fa-search"></div>
示例13: dividerYTShortcode
function dividerYTShortcode($atts = null, $content = null)
{
extract(ytshortcode_atts(array('style' => 1, 'align' => 'center', 'icon_divider' => '', 'icon_style' => '1', 'icon_color' => '#E5E5E5', 'icon_size' => '16px', 'icon_align' => 'center', 'bottom_top' => '0', 'color' => '#999', 'width' => 100, 'margin_top' => 10, 'margin_bottom' => 10, 'margin_left' => '', 'margin_right' => '', 'text' => '', 'border_width' => '1'), $atts));
$id = uniqid('ytd') . rand() . time();
$classes = array('yt-divider', 'yt-divider-style-' . $style, 'yt-icon-style-' . $icon_style, 'yt-divider-align-' . $align);
$margin = '';
$icon = '';
$css = '';
if ($text != '') {
$icon = '<span style="margin: 0 20px;">' . $text . '</span>';
} else {
if ($icon_divider !== '') {
if (strpos($icon_divider, '/') !== false) {
$icon = '<img src="' . yt_image_media($icon_divider) . '" style="width:' . $icon_size . ';" alt="" />';
} else {
if (strpos($icon_divider, 'icon:') !== false) {
$icon = '<i class="fa fa-' . trim(str_replace('icon:', '', $icon_divider)) . '"></i>';
}
}
$css .= '#' . $id . '.yt-divider > span {font-size:' . $icon_size . 'px;border-color:' . $color . ';}';
$css .= '#' . $id . '.yt-divider i {color:' . $icon_color . ';height:' . $icon_size . ';width:' . $icon_size . ';padding:' . round($icon_size / 2) . 'px;}';
}
if ($bottom_top == '2') {
$icon = '<span id="' . $id . '_top">' . $icon . ' </span>';
$icon .= "<script>\n jQuery(document).ready(function() {\n var offset = 250;\n var duration = 300;\n jQuery('#" . $id . "_top').click(function(event) {\n event.preventDefault();\n jQuery('html, body').animate({scrollTop: 0}, duration);\n return false;\n });\n });\n </script>";
} else {
if ($bottom_top == '1') {
$icon = '<span id="' . $id . '_bottom">' . $icon . '</span>';
$icon .= "<script>\n jQuery(document).ready(function() {\n var offset = 250;\n var duration = 300;\n jQuery('#" . $id . "_bottom').click(function(event) {\n event.preventDefault();\n jQuery('html, body').animate({scrollTop: jQuery(document).height()}, duration);\n return false;\n });\n });\n </script>";
}
}
}
if ($style == 7) {
$css .= '#' . $id . '.yt-divider-style-7 span.divider-left { background-image: -webkit-linear-gradient(45deg, ' . $color . ' 25%, transparent 25%, transparent 50%, ' . $color . ' 50%, ' . $color . ' 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, ' . $color . ' 25%, transparent 25%, transparent 50%, ' . $color . ' 50%, ' . $color . ' 75%, transparent 75%, transparent);}';
$css .= '#' . $id . '.yt-divider-style-7 span.divider-right {background-image: -webkit-linear-gradient(45deg, ' . $color . ' 25%, transparent 25%, transparent 50%, ' . $color . ' 50%, ' . $color . ' 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, ' . $color . ' 25%, transparent 25%, transparent 50%, ' . $color . ' 50%, ' . $color . ' 75%, transparent 75%, transparent);}';
}
if ($margin_top or $margin_right or $margin_bottom or $margin_left) {
$margin = 'margin: ';
$margin .= $margin_top ? intval($margin_top) . 'px ' : '0 ';
$margin .= $margin_right ? intval($margin_right) . 'px ' : 'auto ';
$margin .= $margin_bottom ? intval($margin_bottom) . 'px ' : '0 ';
$margin .= $margin_left ? intval($margin_left) . 'px;' : 'auto;';
}
// Get Css in $css variable
$css .= '#' . $id . '.yt-divider { width:' . intval($width) . '%;' . $margin . ';text-align: ' . $icon_align . ';}';
$css .= '#' . $id . '.yt-divider span:before, #' . $id . ' span:after { border-color: ' . $color . '; border-width:' . $border_width . 'px;}';
$css .= '#' . $id . '.yt-icon-style-2 > span { background: ' . $color . ';border-radius: 50%;}';
// Add CSS in head
$doc = JFactory::getDocument();
$doc->addStyleDeclaration($css);
JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/shortcodes/divider/css/divider.css", 'text/css');
// Output HTML
return '<div id="' . $id . '" class="' . yt_acssc($classes) . '">
<span>
<span class="divider-left"></span>
' . $icon . '
<span class="divider-right"></span>
</span>
</div>';
}
示例14: icon_listYTShortcode
function icon_listYTShortcode($atts = null, $content = null)
{
$atts = ytshortcode_atts(array('title' => 'Icon List Heading', 'title_color' => '', 'title_size' => '', 'color' => '', 'icon_background' => 'transparent', 'icon' => 'icon: heart', 'icon_color' => '', 'icon_size' => 32, 'icon_animation' => '', 'icon_border' => '', 'icon_shadow' => '', 'icon_radius' => '', 'icon_align' => 'left', 'icon_padding' => '', 'connector' => 'no', 'class' => ''), $atts, 'icon_list_item');
$id = uniqid('ytil') . rand() . time();
$css = '';
$has_connector = '';
$icon_animation = '';
$shadow = '';
$icon = '';
$lang = JFactory::getLanguage();
if ($lang->isRTL()) {
if ($atts['icon_align'] === 'left') {
$atts['icon_align'] = 'right';
} elseif ($atts['icon_align'] === 'right') {
$atts['icon_align'] = 'left';
}
}
$has_connector = $atts['connector'] == 'yes' ? ' has-connector ' : '';
$icon_animation = $atts['icon_animation'] ? 'yt-il-animation-' . $atts['icon_animation'] . '' : '';
$title_color = $atts['title_color'] ? 'color:' . $atts['title_color'] . ';' : '';
$title_size = $atts['title_size'] ? 'font-size: ' . $atts['title_size'] . ';' : '';
$radius = $atts['icon_radius'] ? '-webkit-border-radius:' . $atts['icon_radius'] . '; border-radius:' . $atts['icon_radius'] . ';' : '';
$shadow = $atts['icon_shadow'] ? '-webkit-box-shadow:' . $atts['icon_shadow'] . '; box-shadow:' . $atts['icon_shadow'] . ';' : '';
$padding = $atts['icon_padding'] ? 'padding:' . $atts['icon_padding'] . ';' : '';
$border = $atts['icon_border'] ? 'border:' . $atts['icon_border'] . ';' : '';
$icon_color = $atts['icon_color'] ? 'color:' . $atts['icon_color'] . ';' : '';
$icon_size = $atts['icon_size'] ? 'font-size: ' . intval($atts['icon_size']) . 'px;' : '';
$classes = array('yt-icon-list', 'yt-icon-align-' . $atts['icon_align'], $has_connector, $icon_animation);
if (strpos($atts['icon'], 'icon:') !== false) {
$icon = '<i class="list-img-icon fa fa-' . trim(str_replace('icon:', '', $atts['icon'])) . '"></i>';
if ($icon_color or $icon_size) {
$css .= '#' . $id . ' .icon_list_icon .list-img-icon {' . $icon_color . $icon_size . '}';
}
} else {
$icon = '<img class="list-img-icon"src="' . yt_image_media($atts['icon']) . '" style="width:' . $atts['icon_size'] . 'px" alt="" />';
}
if ($atts['icon_align'] == 'right') {
if ($atts['icon_background'] == 'transparent' || $atts['icon_background'] == '' and $atts['icon_border'] == '' || substr($atts['icon_border'], 0, 1) == '0') {
$description_margin = 'margin-right: ' . ($atts['icon_size'] + 30) . 'px;';
} else {
$description_margin = 'margin-right: ' . ($atts['icon_size'] * 2 + 35 + $atts['icon_border'] * 2) . 'px;';
}
} elseif ($atts['icon_align'] == 'top') {
$description_margin = "";
} elseif ($atts['icon_align'] == 'title') {
$description_margin = "";
$padding = 'padding: 0;';
} elseif ($atts['icon_align'] == 'top_left') {
$description_margin = "";
if ($atts['icon_background'] == 'transparent' || $atts['icon_background'] == '' and $atts['icon_border'] == '' || substr($atts['icon_border'], 0, 1) == '0') {
$padding = 'padding: 0;';
}
} elseif ($atts['icon_align'] == 'top_right') {
$description_margin = "";
if ($atts['icon_background'] == 'transparent' || $atts['icon_background'] == '' and $atts['icon_border'] == '' || substr($atts['icon_border'], 0, 1) == '0') {
$padding = 'padding: 0;';
}
} else {
if ($atts['icon_background'] == 'transparent' || $atts['icon_background'] == '' and $atts['icon_border'] == '' || substr($atts['icon_border'], 0, 1) == '0') {
$description_margin = 'margin-left: ' . ($atts['icon_size'] + 20) . 'px;';
$padding = 'padding: 0;';
} else {
$description_margin = 'margin-left: ' . ($atts['icon_size'] * 2 + 30 + $atts['icon_border'] * 2) . 'px;';
}
}
if ($atts['icon_animation'] == 6) {
$css .= '#' . $id . '.su-il-animation-6 .icon_list_icon i:before { margin-right: -' . round($atts['icon_size'] / 2) . 'px}';
}
$icon_list_connector = ($atts['connector'] == "yes" and ($atts['icon_align'] == 'right' or $atts['icon_align'] == 'left')) ? 'icon_list_connector' : '';
$css .= '#' . $id . ' .icon_list_icon { background:' . $atts['icon_background'] . '; font-size:' . $atts['icon_size'] . 'px; max-width:' . $atts['icon_size'] . 'px; height:' . $atts['icon_size'] . 'px;' . $border . $padding . $radius . $shadow . '}';
$css .= '#' . $id . ' .icon_description { ' . $description_margin . '}';
if ($title_color or $title_size) {
$css .= '#' . $id . ' .icon_description h3 {' . $title_color . $title_size . '}';
}
if ($atts['color']) {
$css .= '#' . $id . ' .icon_description_text { color:' . $atts['color'] . ';}';
}
// Add CSS in head
$doc = JFactory::getDocument();
$doc->addStyleDeclaration($css);
JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/shortcodes/icon_list/css/icon-list.css", 'text/css');
$return = '
<div id="' . $id . '" class="' . yt_acssc($classes) . ' ">
<div class="icon_list_item">
<div class="icon_list_wrapper ' . $icon_list_connector . '">
<div class="icon_list_icon">' . $icon . '
</div>
</div>
<div class="icon_description">
<h3>' . $atts['title'] . '</h3>
<div class="icon_description_text">' . parse_shortcode(str_replace(array("<br/>", "<br>", "<br />"), " ", $content)) . '</div>
</div>
<div class="clearfix"></div>
</div>
</div>';
return $return;
}
示例15: contact_formYTShortcode
function contact_formYTShortcode($atts, $content = null)
{
extract(ytshortcode_atts(array('type' => 'border', 'style' => 'default', 'email' => '', 'name' => 'yes', 'subject' => 'yes', 'submit_button_text' => '', 'label_show' => 'yes', 'textarea_height' => '120', 'reset' => 'yes', 'margin' => '', 'class' => '', 'color_name' => '#000', 'background_name' => '#fff', 'icon_name' => '', 'color_email' => '#000', 'background_email' => '#fff', 'icon_email' => '', 'color_subject' => '#000', 'background_subject' => '#fff', 'icon_subject' => '', 'color_message' => '#000', 'background_message' => '#fff', 'add_field' => '', 'btn_submit' => 'info', 'btn_reset' => 'warning'), $atts));
$config = JFactory::getConfig();
parse_shortcode(str_replace(array("<br/>", "<br>", "<br />"), " ", $content));
// add filed
$addstr = '';
$idman = '';
$iduniq = uniqid('ytcf_') . rand() . time();
$validation_mandatory = '';
if ($icon_name != '') {
if (strpos($icon_name, 'icon:') !== false) {
$icon_name = "<span class='add-on' style='background:" . $background_name . "; color:" . $color_name . "'><i class='fa fa-" . trim(str_replace('icon:', '', $icon_name)) . "'></i></span> ";
} else {
$icon_name = '<span class="add-on" style="background:' . $background_name . '; color:' . $color_name . '"><img src="' . yt_image_media($icon_name) . '" style="width:18px" alt="" /></span> ';
}
}
if ($icon_email != '') {
if (strpos($icon_email, 'icon:') !== false) {
$icon_email = "<span class='add-on' style='background:" . $background_name . "; color:" . $color_name . "'><i class='fa fa-" . trim(str_replace('icon:', '', $icon_email)) . "'></i></span> ";
} else {
$icon_email = '<span class="add-on" style="background:' . $background_name . '; color:' . $color_name . '"><img src="' . yt_image_media($icon_email) . '" style="width:18px" alt="" /></span> ';
}
}
if ($icon_subject != '') {
if (strpos($icon_subject, 'icon:') !== false) {
$icon_subject = "<span class='add-on' style='background:" . $background_name . "; color:" . $color_name . "'><i class='fa fa-" . trim(str_replace('icon:', '', $icon_subject)) . "'></i></span> ";
} else {
$icon_subject = '<span class="add-on" style="background:' . $background_name . '; color:' . $color_name . '"><img src="' . yt_image_media($icon_subject) . '" style="width:18px" alt="" /></span> ';
}
}
if ($add_field != '') {
$field_array = explode(',', $add_field);
if (count($field_array) > 0) {
$addstr .= '<div class="yt-form-common-field">';
for ($i = 0; $i < count($field_array); $i++) {
$str1 = $field_array[$i];
$str1_array = explode('|', $str1);
if (count($str1_array) > 4) {
if (count($str1_array) > 5) {
if ($str1_array[5] == 'yes') {
$idman = 'mandatory' . $iduniq;
}
$validation_mandatory = $str1_array[0];
}
$icon_add = '';
if (count($str1_array) > 6) {
$icon_add = '<span class="add-on" style="background:' . $str1_array[4] . ';color:' . $str1_array[3] . '"><i class="fa fa-' . $str1_array[6] . '"></i></span>';
}
$addstr .= '
<div class="form-group">
';
if (strtolower($label_show) == 'yes' || strtolower($label_show) == 'no|yes') {
$addstr .= '<label for="' . $str1_array[0] . '" class="yt-form-label" style="color:' . $str1_array[3] . '">' . $str1_array[0] . ':</label>';
}
$addstr .= '
<div class="yt-input-box ' . ($icon_add != "" ? "yt-input-prepend" : "") . '">';
if ($str1_array[1] == 'textarea') {
$addstr .= '<textarea id="' . $str1_array[0] . ' " placeholder="' . $str1_array[2] . '" class="form-control-1 ' . $idman . '" name="' . $str1_array[0] . '" style="height: ' . $textarea_height . 'px; margin-bottom:10px; background:' . $str1_array[4] . ';color:' . $str1_array[3] . ' !important" ></textarea>';
} else {
$addstr .= $icon_add;
$addstr .= '<input type="' . $str1_array[1] . '" placeholder="' . $str1_array[2] . '" id="' . $str1_array[0] . '" class="form-control-1 ' . $idman . '" name="' . $str1_array[0] . '" style="background:' . $str1_array[4] . ';margin-bottom:10px;color:' . $str1_array[3] . '" />';
}
$addstr .= '</div>
</div>';
}
}
$addstr .= '</div>';
}
}
$margin = $margin != '' ? 'margin: ' . $margin : ' margin: 0 0 25px 0';
JHtml::_('jquery.framework');
JHtml::script(JUri::base() . "plugins/system/ytshortcodes/shortcodes/contact_form/js/contact_form.js");
JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/shortcodes/contact_form/css/contact_form.css");
$fields = "";
if ($name == 'yes' && $subject == 'yes') {
$fields .= 'name-email-subject';
} elseif ($name == 'yes') {
$fields .= 'name-email';
} elseif ($subject == 'yes') {
$fields .= 'email-subject';
} else {
$fields .= 'email';
}
if (isset($_POST['email'])) {
$name = '';
$email1 = '';
$message = '';
$subject = '';
if (isset($_POST['name'])) {
$name = $_POST['name'];
}
if (isset($_POST['email'])) {
$email1 = $_POST['email'];
}
if (isset($_POST['subject'])) {
$subject = $_POST['subject'];
}
if (isset($_POST['message'])) {
$message = $_POST['message'];
//.........这里部分代码省略.........