/** * DEFINE shortcode content * * @param type $atts * @param type $content */ public function element_shortcode($atts = null, $content = null) { extract(JSNPagebuilderHelpersShortcode::shortcodeAtts($this->config['params'], $atts)); $inner_content = JSNPagebuilderHelpersShortcode::removeAutop($content); $inner_content = JSNPagebuilderHelpersFunctions::add_absolute_path_to_image_url($inner_content); return "\n\t\t\t<div id='pane_{index}' class='tab-pane {active} {fade_effect}' STYLE>\n\t\t\t\t{$inner_content}\n\t\t\t</div><!--seperate-->"; }
/** * DEFINE shortcode content * * @param type $atts * @param type $content * * @return string */ public function element_shortcode($atts = null, $content = null) { $content = JSNPagebuilderHelpersFunctions::add_absolute_path_to_image_url($content); $atts['testimonial_content'] = $content; return serialize($atts) . '<!--seperate-->'; extract(JSNPagebuilderHelpersShortcode::shortcodeAtts($this->config['params'], $atts)); $img = !empty($image_file) ? "<img class='pb-testimonial-image {style}' src='{$image_file}' />" : ''; return ""; }
/** * DEFINE shortcode content * * @param type $atts * @param type $content * * @return string */ public function element_shortcode($atts = null, $content = null) { $params = JSNPagebuilderHelpersShortcode::shortcodeAtts($this->config['params'], $atts); extract($params); // reassign value for description from content of shortcode $content = JSNPagebuilderHelpersFunctions::add_absolute_path_to_image_url($content); $params['gmi_desc_content'] = $content; $html_element = "<input type='hidden' value='" . json_encode($params) . "' class='pb-gmi-lat-long' />"; $html_element .= '<!--seperate-->'; return $html_element; }
/** * DEFINE shortcode content * * @param type $atts * @param type $content */ public function element_shortcode($atts = null, $content = null) { extract(JSNPagebuilderHelpersShortcode::shortcodeAtts($this->config['params'], $atts)); $content = JSNPagebuilderHelpersShortcode::removeAutop($content); $rowstyle = !$rowstyle || strtolower($rowstyle) == 'default' ? '' : $rowstyle; if (in_array($tagname, array('tr_start', 'tr_end'))) { return "{$tagname}<!--seperate-->"; } $width = !empty($width_value) ? "width='{$width_value}{$width_type}'" : ''; $empty = empty($content) ? '<!--empty-->' : ''; return "<CELL_WRAPPER class='{$rowstyle}' rowspan='{$rowspan}' colspan='{$colspan}' {$width}>" . JSNPagebuilderHelpersFunctions::add_absolute_path_to_image_url($content) . "</CELL_WRAPPER>{$empty}<!--seperate-->"; }
/** * DEFINE shortcode content * * @param type $atts * @param type $content * * @return string */ public function element_shortcode($atts = null, $content = null) { $html_element = ''; $arr_params = JSNPagebuilderHelpersShortcode::shortcodeAtts($this->config['params'], $atts); extract($arr_params); $alert_style = !$arr_params['alert_style'] ? '' : $arr_params['alert_style']; $alert_close = !$arr_params['alert_close'] || $arr_params['alert_close'] == 'no' ? '' : '<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>'; $alert_dismis = !$arr_params['alert_close'] || $arr_params['alert_close'] == 'no' ? '' : ' alert-dismissable'; $content = !$content ? $alert_content : $content; $content = JSNPagebuilderHelpersFunctions::add_absolute_path_to_image_url($content); $html_element .= "<div class='alert {$alert_style}{$alert_dismis}'>"; $html_element .= $alert_close; $html_element .= $content; $html_element .= '</div>'; $html_element .= '<div style="clear: both"></div>'; return $this->element_wrapper($html_element, $arr_params); }
/** * DEFINE shortcode content * * @param type $atts * @param type $content * * @return string */ public function element_shortcode($atts = null, $content = null) { $pathRoot = JURI::root(); extract(JSNPagebuilderHelpersShortcode::shortcodeAtts($this->config['params'], $atts)); $content_class = !empty($image_file) ? 'carousel-caption' : 'carousel-content'; $pathRoot = JURI::root(); $url_pattern = '/^(http|https)/'; preg_match($url_pattern, $image_file, $m); if (count($m)) { $pathRoot = ''; } $hidden = empty($heading) && empty($content) ? 'style="display:none"' : ''; $img = !empty($image_file) ? "<img src='{$pathRoot}{$image_file}'>" : ''; $icon = !empty($icon) ? "<i class='{$icon}'></i>" : ''; $inner_content = JSNPagebuilderHelpersShortcode::removeAutop($content); $inner_content = JSNPagebuilderHelpersFunctions::add_absolute_path_to_image_url($inner_content); if (empty($heading) && empty($inner_content)) { $html_content = ""; } else { $html_content = "<div class='{$content_class}' {$hidden}>"; $html_content .= "<h4>{$icon}{$heading}</h4>"; $html_content .= "<p>{$inner_content}</p></div>"; } return "<div class='{active} item'>{$img}{$html_content}</div><!--seperate-->"; }
/** * DEFINE shortcode content * * @param type $atts * @param type $content * * @return string */ function element_shortcode($atts = null, $content = null) { $arr_params = JSNPagebuilderHelpersShortcode::shortcodeAtts($this->config['params'], $atts); if (empty($content) && isset($atts['text'])) { $content = $atts['text']; } $content = preg_replace("/^<\\/p>/", "", $content); extract($arr_params); $html_element = $html_style = $html_width = ''; if (isset($enable_dropcap) && $enable_dropcap == 'yes') { if ($content) { $styles = array(); if ($dropcap_font_face_type == 'google fonts' and $dropcap_font_face_value != '') { $document = JFactory::getDocument(); $document->addStyleSheet("http://fonts.googleapis.com/css?family={$dropcap_font_face_value}", 'text/css'); $styles[] = 'font-family:' . $dropcap_font_face_value; } elseif ($dropcap_font_face_type == 'standard fonts' and $dropcap_font_face_value) { $styles[] = 'font-family:' . $dropcap_font_face_value; } if (intval($dropcap_font_size) > 0) { $styles[] = 'font-size:' . intval($dropcap_font_size) . 'px'; $styles[] = 'line-height:' . intval($dropcap_font_size / 2) . 'px'; } switch ($dropcap_font_style) { case 'bold': $styles[] = 'font-weight:700'; break; case 'italic': $styles[] = 'font-style:italic'; break; case 'normal': $styles[] = 'font-weight:normal'; break; } if (strpos($dropcap_font_color, '#') !== false) { $styles[] = 'color:' . $dropcap_font_color; } $random_id = JSNPagebuilderHelpersShortcode::generateRandomString(6, true); if (count($styles)) { $html_style .= 'div.pb-element-text div.dropcap.' . $random_id . ' :first-child::first-letter { float:left;margin-top:5px;margin-right:5px;'; $html_style .= implode(';', $styles); $html_style .= '}'; } $html_element .= "<div class='dropcap {$random_id}'>{$content}</div>"; } } else { $html_element .= '<div>' . $content . '</div>'; } if ($width_value) { $width_style = 'width:' . $width_value . $width_unit; } if (!empty($width_style)) { $html_width .= 'div.pb-element-text{margin:0 auto;'; $html_width .= $width_style; $html_width .= '}'; } $document = JFactory::getDocument(); if ($html_style) { $document->addStyleDeclaration($html_style, 'text/css'); } if ($html_width) { $document->addStyleDeclaration($html_width, 'text/css'); } $html_element = JSNPagebuilderHelpersFunctions::add_absolute_path_to_image_url($html_element); return $this->element_wrapper($html_element, $arr_params); }
/** * DEFINE shortcode content * * @param type $atts * @param type $content * * @return string */ public function element_shortcode($atts = null, $content = null) { $document = JFactory::getDocument(); $app = JFactory::getApplication(); if ($app->isAdmin()) { $this->load_assets_frontend(); } $html_element = ''; $arr_params = JSNPagebuilderHelpersShortcode::shortcodeAtts($this->config['params'], $atts); extract($arr_params); $styles = array(); if ($pb_bg_color) { $styles[] = 'background-color:' . $pb_bg_color; } if (intval($pb_border_top) > 0) { $styles[] = 'border-top-width:' . (int) $pb_border_top . 'px'; $styles[] = 'border-top-style: solid'; } if (intval($pb_border_left) > 0) { $styles[] = 'border-left-width:' . (int) $pb_border_left . 'px'; $styles[] = 'border-left-style: solid'; } if (intval($pb_border_bottom) > 0) { $styles[] = 'border-bottom-width:' . (int) $pb_border_bottom . 'px'; $styles[] = 'border-bottom-style: solid'; } if (intval($pb_border_right) > 0) { $styles[] = 'border-right-width:' . (int) $pb_border_right . 'px'; $styles[] = 'border-right-style: solid'; } if ($pb_border_color) { $styles[] = 'border-color:' . $pb_border_color; } $elements = explode('__#__', $elements); $class = ''; if ($pb_show_drop == 'yes') { $class .= 'promo-box-shadow'; } $cls_button_fancy = $target = $button = ''; if (in_array('button', $elements)) { switch ($link_type) { case 'no_link': $button_href = ''; break; case 'url': $button_href = !$pb_button_url ? ' href="#"' : " href='{$pb_button_url}'"; break; } if ($pb_button_open_in and $link_type != 'no_link') { switch ($pb_button_open_in) { case 'current_browser': $target = ''; break; case 'new_browser': $target = ' target="_blank"'; break; case 'lightbox': $cls_button_fancy = ' pb-pb-button-fancy'; break; } } $pb_button_size = isset($pb_button_size) && $pb_button_size != 'default' ? $pb_button_size : ''; $pb_button_color = isset($pb_button_color) && $pb_button_color != 'default' ? $pb_button_color : ''; $button = "<a class='pull-right btn {$pb_button_size} {$pb_button_color} {$cls_button_fancy}' {$target} {$button_href}>{$pb_button_title}</a>"; } $styles = implode(';', $styles); $styles = $styles ? "style='{$styles}'" : ''; $html_element .= "<div class='pb-promobox'>"; $html_element .= "<section class='{$class}' {$styles}>"; $html_element .= $button; if (in_array('title', $elements)) { $style_title = array(); if ($title_font == 'custom') { if ($title_font_face_type == 'google fonts') { $document = JFactory::getDocument(); $document->addStyleSheet("http://fonts.googleapis.com/css?family={$title_font_face_value}", 'text/css'); $style_title[] = 'font-family:' . $title_font_face_value; } elseif ($title_font_face_value) { $style_title[] = 'font-family:' . $title_font_face_value; } if (intval($title_font_size) > 0) { $style_title[] = 'font-size:' . intval($title_font_size) . 'px'; } switch ($title_font_style) { case 'bold': $style_title[] = 'font-weight:700'; break; case 'italic': $style_title[] = 'font-style:italic'; break; case 'normal': $style_title[] = 'font-weight:normal'; break; } if (strpos($title_font_color, '#') !== false) { $style_title[] = 'color:' . $title_font_color; } } if ($title_padding_bottom) { $style_title[] = 'padding-bottom:' . $title_padding_bottom . 'px'; } if ($title_margin_bottom) { $style_title[] = 'margin-bottom:' . $title_margin_bottom . 'px'; } if (count($style_title)) { $style_title = 'style="' . implode(';', $style_title) . '"'; } else { $style_title = ''; } $html_element .= "<h2 {$style_title}>{$pb_title}</h2>"; } $content = !$content ? $pb_content : $content; $content = JSNPagebuilderHelpersFunctions::add_absolute_path_to_image_url($content); if (in_array('content', $elements)) { $html_element .= "<p>{$content}</p>"; } $html_element .= '</section>'; $html_element .= '</div>'; $html_element .= "<div style='clear: both'></div>"; return $this->element_wrapper($html_element, $arr_params); }
/** * DEFINE shortcode content * * @param type $atts * @param type $content * * @return string */ public function element_shortcode($atts = null, $content = null) { extract(JSNPagebuilderHelpersShortcode::shortcodeAtts($this->config['params'], $atts)); // tag1,tag2 => tag1 tag2 , to filter $tag = str_replace(" ", "_", $tag); $tag = str_replace(",", " ", $tag); $content = JSNPagebuilderHelpersShortcode::removeAutop($content); return "\n\t\t\t<div class='panel panel-default' data-tag='{$tag}'>\n\t\t\t\t<div class='panel-heading'>\n\t\t\t\t\t<h4 class='panel-title'>\n\t\t\t\t\t\t<a data-toggle='collapse' data-parent='#accordion_{ID}' href='#collapse{index}'>\n\t\t\t\t\t\t<i class='{$icon}'></i>{$heading}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</h4>\n\t\t\t\t</div>\n\t\t\t\t<div id='collapse{index}' class='panel-collapse collapse {show_hide}'>\n\t\t\t\t <div class='panel-body'>\n\t\t\t\t " . JSNPagebuilderHelpersFunctions::add_absolute_path_to_image_url($content) . "\n\t\t\t\t </div>\n\t\t\t\t</div>\n\t\t\t</div><!--seperate-->"; }
/** * DEFINE shortcode content * * @param type $atts * @param type $content * * @return string */ public function element_shortcode($atts = null, $content = null) { extract(JSNPagebuilderHelpersShortcode::shortcodeAtts($this->config['params'], $atts)); $content = JSNPagebuilderHelpersFunctions::add_absolute_path_to_image_url($content); return "\n\t\t<li>\n\t\t\t[icon]<div class='pb-sub-icons' style='pb-styles'>\n\t\t\t\t<i class='{$icon}'></i>\n\t\t\t</div>[/icon]\n\t\t\t<div class='pb-list-content-wrap'>\n\t\t\t\t[heading]<h4 style='pb-list-title'>{$heading}</h4>[/heading]\n\t\t\t\t<div class='pb-list-content'>\n\t\t\t\t\t{$content}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</li><!--seperate-->"; }