function style_template($output = array()) { //$this->load_style(); $html = ' <div class="floating-featured-panel"> {title_logo} <div class="container cf"> {content} {optin} </div> {footer_note} </div>'; return op_convert_template($html, $output); }
function style_template($output = array()) { /* * Theme 4 started having trouble with slashes due to mb_unserialize */ if (isset($output['content'])) { $output['content'] = stripslashes($output['content']); } //$this->load_style(); $html = ' <div class="floating-featured-panel"> {title_logo} <div class="container cf"> {content} {optin} </div> {footer_note} </div>'; return op_convert_template($html, $output); }
function style_template($output = array()) { switch ($this->style) { case 'A': $html = ' <div class="full-width featured-panel featured-panel-style-1 featured-panel-1"> {liveeditor_above} <div class="row cf"> <div class="fixed-width"> {title} {video} {content} </div> </div> <div class="row cf"> <div class="fixed-width"> {optin} </div> </div> {liveeditor_below} </div> {content_layout}'; break; case 'B': $html = ' <div class="full-width featured-panel featured-panel-style-1 featured-panel-2"> {liveeditor_above} <div class="row cf"> <div class="fixed-width"> {title} {video} {optin} </div> </div> {liveeditor_below} </div> {content_layout}'; break; case 'C': $html = ' <div class="full-width featured-panel featured-panel-style-1 featured-panel-3"> {liveeditor_above} <div class="row cf"> <div class="fixed-width"> {title} {video} {content} </div> </div> <div class="row cf"> <div class="fixed-width"> {optin} </div> </div> {liveeditor_below} </div> {content_layout}'; break; case 'D': case 'E': $html = ' <div class="full-width featured-panel featured-panel-style-1 featured-panel-' . ($this->style == 'D' ? 4 : 5) . '"> {liveeditor_above} <div class="row cf"> <div class="fixed-width"> {content} <div class="nine columns offset-by-one"> {video} {arrow_text} {optin} </div> </div> </div> {liveeditor_below} </div> {content_layout}'; break; case 'F': $html = ' <div class="full-width featured-panel featured-panel-style-1 featured-panel-6"> {liveeditor_above} <div class="row cf"> <div class="fixed-width"> <div class="fourteen columns"> {title} {video} </div> <div class="nine columns offset-by-one"> <img src="' . $this->global_imgs . 'featured-panel/red-down.png" class="red-down" alt="red-down" width="145" height="194" /> {optin} </div> </div> </div> {liveeditor_below} </div> {content_layout}'; break; case 'G': $html = ' <div class="full-width featured-panel featured-panel-style-1 featured-panel-7"> {liveeditor_above} <div class="row cf"> <div class="fixed-width"> {title} {image} <div class="ten columns offset-by-one"> <div class="the-form-area cf"> <div class="the-white-peaks"></div> {optin} <div class="the-white-bottom"></div> </div> </div> </div> </div> {liveeditor_below} </div> {content_layout}'; break; case 'H': $html = ' <div class="full-width featured-panel featured-panel-style-1 featured-panel-8"> {liveeditor_above} <div class="row cf"> <div class="fixed-width"> {title} {image1} {optin} {content} <div class="eight columns offset-by-two sidebar"> {image2} {optin2} </div> </div> </div> {liveeditor_below} </div> {content_layout}'; break; case 'I': $html = ' <div class="full-width featured-panel featured-panel-style-1 featured-panel-9"> {liveeditor_above} <div class="row cf"> <div class="fixed-width"> {title} {content} <div class="nine columns offset-by-one top-form"> {video} {optin} </div> <div class="cf"></div> {content_layout} {optin2} </div> </div> {liveeditor_below} </div>'; break; case 'J': $html = ' <div class="full-width featured-panel featured-panel-style-1 featured-panel-9"> {content_large} </div>'; break; } $output['content_layout'] = $GLOBALS['op_content_layout']; return op_convert_template($html, $output); }
function launch_navigation($atts) { $op_fonts = new OptimizePress_Fonts(); extract(shortcode_atts(array('style' => 1, 'font_size' => '', 'font_family' => '', 'font_style' => '', 'font_color' => '', 'font_spacing' => '', 'font_shadow' => ''), $atts)); $active = $inactive = ''; switch ($style) { case 1: case 2: $active = '<a href="{link}"><img width="163" height="102" src="{image}" alt="" /> {text}</a>'; $inactive = '<p><img width="163" height="102" src="{image}" alt="" /> {text}</p>'; break; case 3: $active = '<p><a href="{link}">{text}</a></p>'; $inactive = '<p><span>{text}</span></p>'; break; case 4: case 7: case 8: case 9: $active = '<a href="{link}">{text}</a>'; $inactive = '<span>{text}</span>'; break; case 10: $active = '<a href="{link}"><div class="thumb"><img src="{image}" class="scale-with-grid" /></div><span>{text}</span></a>'; $inactive = '<div class="thumb"><img src="{image}" class="scale-with-grid" /></div><span>{text}</span>'; break; } $str = ''; $menu_items = _op_launch_menu_list(); if (!empty($menu_items)) { foreach ($menu_items as $menu) { $tpl = $inactive; $class = ''; if ($menu['active'] === true) { /*$class = 'active';*/ $class = ''; $tpl = $active; } if ($menu['selected'] === true) { $class .= ($class == '' ? '' : ' ') . 'active current-page'; } if (!empty($menu['text'])) { $menu['text'] = stripslashes($menu['text']); } $str .= '<li' . ($class == '' ? '' : ' class="' . $class . '"') . '>' . op_convert_template($tpl, $menu) . '</li>'; } $font_family_css = ''; $font_style_css = ''; $font_shadow_css = ''; if (!empty($font_family) && $font_family != 'undefined') { $font_family_css = 'font-family: ' . $font_family . ';'; $op_fonts->add_font($font_family); } if (!empty($font_style) && $font_style != 'undefined') { if ($font_style == 'italic') { $font_style_css = 'font-style: italic;'; } elseif ($font_style == 'bold italic') { $font_style_css = 'font-style: italic; font-weight: bold;'; } else { $font_style_css = 'font-weight: ' . $font_style . ';'; } } if (!empty($font_shadow) && $font_shadow != 'undefined') { switch (strtolower(str_replace(' ', '', $font_shadow))) { case '': case 'none': $font_shadow_css = 'none'; break; case 'light': $font_shadow_css = '1px 1px 0px rgba(255,255,255,0.5)'; break; case 'dark': default: $font_shadow_css = '0 1px 1px #000000, 0 1px 1px rgba(0, 0, 0, 0.5)'; } $font_shadow_css = 'text-shadow: ' . $font_shadow_css . ';'; } $id = op_generate_id(); $className = $style >= 7 && $style <= 10 ? 'launch-nav-style-' . $style : 'video-navigation-' . $style; $str = ' <style> #video-navigation-' . $id . ' ul li a{ ' . (!empty($font_size) && $font_size != 'undefined' ? 'font-size: ' . $font_size . 'px;' : '') . ' ' . (!empty($font_family_css) ? $font_family_css : '') . ' ' . (!empty($font_style_css) ? $font_style_css : '') . ' ' . (!empty($font_color) && $font_color != 'undefined' ? 'color: ' . $font_color . ';' : '') . ' ' . (!empty($font_spacing) && $font_spacing != 'undefined' ? 'letter-spacing: ' . $font_spacing . 'px;' : '') . ' ' . (!empty($font_shadow_css) ? $font_shadow_css : '') . ' } </style> <div id="video-navigation-' . $id . '" class="video-navigation ' . $className . '"> <ul class="cf">' . $str . '</ul> </div>'; } else { if (is_admin()) { $str = '<p>' . __('This navigation bar will only display when added to a page which has been added to funnel as a funnel stage', OP_SN) . '</p>'; } } return $str; }
function style_template($output = array()) { $styles = array('A' => 1, 'B' => 2, 'C' => 3, 'D' => 4, 'E' => 5, 'F' => 6, 'G' => 7, 'H' => 8); $html = ' <div class="full-width featured-panel featured-panel-style-2 featured-panel-' . $styles[$this->style] . '"> <div class="row cf"><div class="fixed-width cf">' . ($this->style == 'H' ? '' : '{liveeditor_above}'); switch ($this->style) { case 'A': $html .= ' {video} {optin}'; break; case 'B': $html .= ' {title} {video} {optin}'; break; case 'C': $html .= ' {video} </div> <div class="row cf"> <div class="fixed-width"> {optin} </div>'; break; case 'D': $html .= ' {video} </div> <div class="row grey-form cf"> <div class="row cf"> <div class="fixed-width"> {optin} </div> </div>'; break; case 'E': $html .= ' {video} </div> <div class="row cf"> <div class="fixed-width"> {optin} </div>'; break; case 'F': $html .= ' {video} </div> <div class="row grey-form cf"> <div class="row cf"> <div class="fixed-width"> {optin} </div> </div>'; break; case 'G': $html .= ' <div class="fourteen columns"> <div class="white-video-panel"> {video} <div class="video-panel-content"> <fb:like send="false" width="450" show_faces="true"></fb:like> {content} </div> </div> </div> {content2}'; break; case 'H': $html .= '{content_large}'; break; } $html .= ($this->style == 'H' ? '' : '{liveeditor_below}') . '</div> </div> </div>'; return op_convert_template($html, $output); }
function op_optin_box($options, $values, $output, $tpl = '', $wrap_elems = array()) { static $global_imgs; if (!isset($global_imgs)) { $global_imgs = op_page_img('', true, 'global'); } $disable_name = isset($options['disable_name']); $content_fields = op_get_var($options, 'content_fields', array()); $ignore = array(); if (isset($options['ignore_fields'])) { $ignore = is_array($options['ignore_fields']) ? $options['ignore_fields'] : array_filter(explode('|', $options['ignore_fields'])); } if (!isset($values['content']) || count($values['content']) == 0) { $content = op_get_var($options, 'content_fields', array()); $values['content'] = array(); foreach ($content as $name => $field) { $values['content'][$name] = op_get_var($field, 'default'); } } if (!isset($values['form_open']) || !isset($values['form_close'])) { $values['form_open'] = '<form action="#" class="op-optin-validation">'; $values['form_close'] = '</form>'; $values['hidden_elems'] = ''; $values['email_input'] = '<input type="email" required="required" name="email" placeholder="' . $values['content']['email_default'] . '" class="email" />'; if (!$disable_name) { $values['name_input'] = '<input type="text" name="name" required="required" placeholder="' . $values['content']['name_default'] . '" class="name" />'; } } $content = op_get_var($values, 'content', array()); $fields = array('title' => '<h2>%s</h2>', 'form_header' => '<p>%s</p>', 'footer_note' => '<p class="secure-icon"><img src="' . $global_imgs . 'secure.png" alt="secure" width="16" height="15"> %s</p>'); $btn_config = op_get_var($options, 'submit_button_config', array()); $vars = array('form_open' => op_get_var($values, 'form_open'), 'form_close' => op_get_var($values, 'form_close'), 'hidden_elems' => op_get_var($values, 'hidden_elems'), 'name_input' => !$disable_name ? op_get_var($values, 'name_input') : '', 'email_input' => op_get_var($values, 'email_input'), 'submit_button' => op_mod('submit_button')->output(array('submit_button'), $btn_config, $values['submit_button'], true), 'extra_fields' => ''); if (isset($values['extra_fields']) && is_array($values['extra_fields'])) { $vars['extra_fields'] = implode('', $values['extra_fields']); } foreach ($content_fields as $name => $settings) { if (!isset($content[$name])) { $value = op_get_var($settings, 'default'); } else { $value = $content[$name]; } $wrap = ''; if (isset($wrap_elems[$name])) { $wrap = $wrap_elems[$name]; } elseif (isset($fields[$name])) { $wrap = $fields[$name]; } $vars[$name] = $wrap == '' ? $value : sprintf($wrap, $value); } if ($tpl != '') { $output = $tpl; } else { $output = ' <div class="op_signup_form"> {title} {form_header} {form_open} <div> {hidden_elems} {name_input} {email_input} {extra_fields} {submit_button} </div> {footer_note} {form_close} </div>'; } $out = op_convert_template($output, $vars); return $out; }