function display_settings($section_name, $config = array(), $return = false) { if (($cur = $this->get_option($section_name)) === false) { $cur = array(); } $tabs = $tab_content = array(); op_tpl_assign('section_name', $section_name); foreach ($config as $name => $tab) { $str = ''; $cur_items = op_get_var($cur, $name, array()); $section_array = array($section_name, $name); foreach ($tab['options'] as $short_name => $options) { $cur_item = op_get_var($cur_items, $short_name, array()); $options = $this->_get_options($options, array($section_array, $short_name)); $data = array('tab' => $name, 'title' => $options['title'], 'name' => $short_name, 'options' => $options['tab_opts']); if ($options['tab_opts']['type'] == 'multi') { $items = op_get_var($cur_item, 'ads_array', array()); if (count($items) == 0) { $items[] = array('href' => '', 'imgurl' => '', 'upload_file' => '', 'type' => 'file'); } $data['items'] = $items; } $str .= $this->load_tpl('advert_entry', $data); } $tabs[$name] = array('title' => $tab['title']); if (op_has_group_error($section_name . '_' . $name)) { $tabs[$name]['li_class'] = 'has-error'; } $tab_content[$name] = $str; } $data = array('tabs' => $tabs, 'tab_content' => $tab_content, 'module_name' => 'advertising'); echo $this->load_tpl('generic/tabbed_module', $data, false); }
$no_content = op_get_var($section, 'no_content', false); if (isset($section['module'])) { $cur_module = $section['module']; $options = op_get_var($section, 'options', $options); if (isset($section['module_type'])) { $module_type = $section['module_type']; } } } else { $cur_action = $section; } if ($cur_action == '' && $cur_module == '') { $no_content = true; } $class = $name; if (op_has_group_error($section_type . '_' . $name)) { $class .= ' has-error'; op_section_error($section_type); } if ($i == 0 && $name !== 'color_scheme_advanced') { ?> <div class="op-bsw-grey-panel section-seo"> <div class="op-bsw-grey-panel-header cf"> <h3><a href="#"><?php _e('Page Thumbnail', OP_SN); ?> </a></h3> <div class="op-bsw-panel-controls cf"> <div class="show-hide-panel"><a href="#" class="op-bsw-visible"></a></div> </div> </div>
$content = op_tpl($section['template']); } } else { $content = op_tpl('launch_suite/settings/' . $name); } $title = op_get_var($section, 'title'); } else { $title = $section; $content = op_tpl('launch_suite/settings/' . $name); } if (empty($content)) { $no_content = true; } $on_off = op_get_var($section, 'on_off', true); $class = $name; if (op_has_group_error('launch_suite_settings_' . $name)) { $class .= ' has-error'; op_section_error($section_type); } ?> <div class="op-bsw-grey-panel section-<?php echo $class . ($no_content ? ' op-bsw-grey-panel-no-content' : ''); ?> "> <div class="op-bsw-grey-panel-header cf"> <h3><?php echo $no_content ? $title : '<a href="#">' . $title . '</a>'; ?> </h3> <?php $help_vid = op_help_vid(array('launch_suite', 'settings', $name), true);
$no_content = op_get_var($section, 'no_content', false); if (isset($section['module'])) { $cur_module = $section['module']; $options = op_get_var($section, 'options', $options); if (isset($section['module_type'])) { $module_type = $section['module_type']; } } } else { $cur_action = $section; } if ($cur_action == '' && $cur_module == '') { $no_content = true; } $class = $name; if (op_has_group_error('functionality_' . $name)) { $class .= ' has-error'; op_section_error('functionality'); } ?> <div class="op-bsw-grey-panel section-<?php echo $class . ($no_content ? ' op-bsw-grey-panel-no-content' : ''); ?> "> <div class="op-bsw-grey-panel-header cf"> <h3><?php echo $no_content ? $section['title'] : '<a href="#">' . $section['title'] . '</a>'; ?> </h3> <?php $help_vid = op_help_vid(array('page', 'functionality', $name), true);
} if (isset($section['help'])) { $help = $section['help']; } if (isset($section['module'])) { $cur_module = $section['module']; $options = op_get_var($section, 'options', $options); $on_off = op_get_var($section, 'on_off', true); $no_content = op_get_var($section, 'no_content', false); } } else { $cur_action = $section; } ?> <div class="op-bsw-grey-panel section-<?php echo $name . (op_has_group_error($section_type . '_' . $name) ? ' has-error' : '') . ($no_content ? ' op-bsw-grey-panel-no-content' : ''); ?> "> <div class="op-bsw-grey-panel-header cf"> <h3><?php echo $no_content ? $section['title'] : '<a href="#">' . $section['title'] . '</a>'; ?> </h3> <?php $help_vid = op_help_vid(array($section_type, $name), true); ?> <div class="op-bsw-panel-controls<?php echo $help_vid == '' ? '' : ' op-bsw-panel-controls-help'; ?> cf"> <div class="show-hide-panel"><?php