public function __construct($config)
 {
     if ($config == '') {
         $this->config = $this->defaults;
     } else {
         $this->config = array_merge($this->defaults, $config);
     }
     global $excerptLength;
     $excerptLength = YoPressFormModel::getOption($this->settingName, '160');
     $this->defaultSettings['link'] = YoPressFormModel::getOption($this->settingSubName);
     $this->defaultSettings['excerpt_name'] = YoPressFormModel::getOption('excerpt_name');
     if ($this->defaultSettings['excerpt_name'] == '') {
         $this->defaultSettings['excerpt_name'] = '...';
     }
     if ($excerptLength == '' || $excerptLength == 0) {
         $excerptLength = $this->defaultSettings['length'];
     }
 }
    private function renderDropdown($name, $options, $raw)
    {
        $value = $this->model->fieldValue($name, $options['default']);
        $options['htmlOptions']['id'] = $options['id'];
        $htmlOptions = $this->makeHtmlOptions($options);
        if (!$raw) {
            echo '<tr valign="top">
				<th>
				<label for="' . $options['id'] . '">' . $options['label'] . '</label>
				</th>
				<td>';
        }
        echo "<select name='" . $this->model->fieldName($name) . "' " . $htmlOptions . ">";
        $this->listOptions($name, $options['default']);
        echo "</select>";
        if (!$raw) {
            echo '</td></tr>';
        }
    }
    public function colorBoxRun()
    {
        $settingsArray = array('transition' => YoPressFormModel::getOption('yopress_colorbox_transition', 'elastic'), 'speed' => (int) YoPressFormModel::getOption('yopress_colorbox_speed', '300'), 'slideshow' => (bool) YoPressFormModel::getOption('yopress_colorbox_slideshow', 'false'), 'maxHeight' => '70%', 'rel' => 'gal');
        echo '<script type="text/javascript">
			var def = ' . json_encode($settingsArray) . ';
			jQuery(document).ready(function(){
				r = "gal";
				$.each($(".gallery"), function(i,v){
					r = "gal"+i;
					$.each($(v).find("a"), function(j,b){
						$(b).attr("rel", r);
						$(b).addClass(r);
					});
					def["rel"] = r;
					jQuery("."+r).colorbox(def); 
				});
			});
		</script>';
    }
<?php

require_once '../../../../wp-config.php';
$form = new YoPressFormModel();
?>
<html>
	<head>
		<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
		<script type="text/javascript" src="<?php 
echo home_url();
?>
/wp-includes/js/jquery/jquery.js"></script>
		<script type="text/javascript" src="<?php 
echo home_url();
?>
/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
		<link rel="stylesheet" href="<?php 
echo YoPressBase::instance()->getCoreUrl();
?>
/admin/css/popups.css">
		<script type="text/javascript"> 

		function insertButton() {
			var lat, lng, zoom;

				lat = document.getElementById('contact_address_lat').value;
				lng = document.getElementById('contact_address_lng').value;
				zoom = document.getElementById('contact_address_zoom').value;

				tinyMCEPopup.editor.execCommand('mceInsertContent', false, '[gmap lat="'+lat+'" long="'+lng+'" zoom="'+zoom+'"][/gmap]');
				closeDialog();