예제 #1
0
    function add_lightbox()
    {
        if (!defined('OP_LIVEEDITOR')) {
            $options = op_get_var($this->_options, 'op_lightbox_', array());
            $type = op_get_var($options, 'type');
            $content = '';
            if ($type == 'html') {
                $content = op_get_var($options, 'html_content', array());
                $content = op_get_var($content, 'content');
            } else {
                op_mod('signup_form');
                $mod_opts = array('disable' => 'color_scheme|on_off_switch', 'content_fields' => op_optin_default_fields(), 'submit_button_config' => array('default_button' => '<button class="button-style-2 button-style-2-orange" type="submit"><span>%1$s</span></button>'));
                $optin = op_get_var($options, 'optin_form');
                $output = op_mod('signup_form')->output(array('lightbox', 'optin_form'), $mod_opts, $optin, true);
                $tpl = '
{title}
{form_header}
{form_open}
	{hidden_elems}
	{name_input}
	{email_input}
	{extra_fields}
	{submit_button}
	{footer_note}
{form_close}';
                $wrap = array('title' => '<h1>%s</h1>', 'form_header' => '<h2>%s</h2>');
                $content = op_optin_box($mod_opts, $output, $optin, $tpl, $wrap);
            }
            ?>
		<div id="epicbox-overlay"></div>
		<div id="epicbox" class="sell-box-1">
			<a href="#" class="close"></a>
			<div class="epicbox-content">
				<div class="epicbox-scroll">
                	<?php 
            echo $content;
            ?>
				</div>
			</div>
		</div>
		<?php 
        }
    }
예제 #2
0
 function optin_box($options, $values, $output, $tpl = '', $wrap_elems = array())
 {
     if (!isset($options['submit_button_config'])) {
         $options['submit_button_config'] = array();
     }
     if (!isset($options['submit_button_config']['default_button'])) {
         $options['submit_button_config']['default_button'] = '<button class="button-style-2 button-style-2-orange" type="submit"><span>%1$s</span></button>';
     }
     return op_optin_box($options, $values, $output, $tpl, $wrap_elems);
 }