/** * This function creates the html code for the textarea text output. * * @param array $element is an array with all the data necessary for creating the html code (it contains the element data and the saved values for the element) * @return string $output the string returned contains the html code generated within the method */ function textarea($element) { if (!isset($element['saved_value'])) { return; } extract($element['saved_value'][0]); $dynamic_text = apply_filters('the_content', $dynamic_text); $output = ""; switch ($dynamic_text_styling) { case 'p': $output .= "<div class='dynamic_textarea_p'>" . $dynamic_text . "</div>"; break; case 'blockquote': $output .= "\t<blockquote class='advanced_blockquote'>"; $output .= "\t\t<div class='content-area'>"; $output .= $dynamic_text; $output .= "\t\t</div>"; $output .= "\t</blockquote>"; break; case 'callout': $output .= "<div class='outer_callout'>"; $output .= "\t<blockquote class='callout'>"; if (!empty($dynamic_text_button)) { $output .= "<span class='style_wrap'><a class='big_button' href='" . avia_get_link($element['saved_value'][0], 'dynamic_text_button_') . "'>" . $dynamic_text_button . "</a></span>"; } $output .= "\t\t<div class='content-area'>"; $output .= $dynamic_text; $output .= "\t\t</div>"; $output .= "\t</blockquote>"; $output .= "</div>"; break; } return $output; }
function _build_xml_slides($element) { global $avia_config; $text = $url = $title = ""; if (!empty($element['slideshow_caption'])) { if (!empty($element['slideshow_caption_title'])) { $title = '<h1>' . $element['slideshow_caption_title'] . '</p>'; } $text = "<Text>" . $title . "<p>" . strip_tags($element['slideshow_caption']) . "</p></Text>"; } //apply links to the image if thats what the user wanted $url = avia_get_link($element, 'slideshow_', false, $this->post_id); if ($url) { $url = "<Hyperlink URL='" . $url . "' />"; } if (is_numeric($element['slideshow_image'])) { $this->slides_xml .= '<Image Source="' . avia_image_by_id($element['slideshow_image'], 'featured', 'url') . '" Title="' . $element['slideshow_caption_title'] . '">'; $this->slides_xml .= $text . $url; $this->slides_xml .= '</Image>'; } else { if (avia_backend_is_file($element['slideshow_image'], 'html5video') || avia_backend_is_file($element['slideshow_image'], array('swf'))) { preg_match("!^(.+?)(?:\\.([^.]+))?\$!", $element['slideshow_image'], $path_split); $tag = 'Video'; if ($path_split[2] == 'swf') { $tag = 'Flash'; } $this->slides_xml .= '<' . $tag . ' Source="' . $element['slideshow_image'] . '" Title="' . $element['slideshow_caption_title'] . '" Width="' . $avia_config['imgSize']['featured']['width'] . '" Height="' . $avia_config['imgSize']['featured']['height'] . '" Autoplay="true" >'; $image = $path_split[1] . '.jpg'; $checkpath = $path_split[1] . '-' . $avia_config['imgSize']['featured']['width'] . 'x' . $avia_config['imgSize']['featured']['height'] . '.jpg'; if (@file_get_contents($checkpath, 0, NULL, 0, 1)) { $image = $checkpath; } $this->slides_xml .= '<Image Source="' . $image . '" />'; $this->slides_xml .= '</' . $tag . '>'; } } }