Plugin Directory

Changeset 567750


Ignore:
Timestamp:
07/05/2012 11:11:52 AM (13 years ago)
Author:
laki_patel
Message:

Upload Testimonial Image with WordPress Media Uploader

Location:
indianic-testimonial/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • indianic-testimonial/trunk/add.php

    r563885 r567750  
    11<?php
    2 $_message_data = array();
    3 if (!is_writable($this->rootPath . get_option('inic_testimonial_store_path'))) {
    4   $_message_data['error'] = "IndiaNIC Testimonial Image Directory <strong>" . get_option('inic_testimonial_store_path') . "</strong> is not writable.";
    5 }
    6 
    7 if (isset($_POST['submit']) && $_POST['submit'] == "Add Testimonial") {
    8 
    9   $_POST['tags'] = str_replace(", ", ",", $_POST['tags']);
    10  
    11   if ($_FILES['thumb_img']['size'] > 0) {
    12     $_thumb_img_path = $this->upload_img($_FILES['thumb_img'], "thumb");
    13   } else {
    14     $_thumb_img_path = false;
    15   }
    16 
    17   if ($_FILES['large_img']['size'] > 0) {
    18     $_large_img_path = $this->upload_img($_FILES['large_img'], "large");
    19   } else {
    20     $_large_img_path = false;
    21   }
    22  
    23   $this->wpdb->query("INSERT INTO {$this->wpdb->prefix}inic_testimonial (project_name, project_url, client_name, city, state, country, description, tags, video_url, thumb_img_url, large_img_url, is_featured) VALUES('{$_POST['project_name']}', '{$_POST['project_url']}', '{$_POST['client_name']}', '{$_POST['client_city']}', '{$_POST['client_state']}', '{$_POST['client_country']}', '{$_POST['description']}', '{$_POST['tags']}', '{$_POST['video_url']}', '{$_thumb_img_path}', '{$_large_img_path}', '{$_POST['is_featured']}')");
    24 
    25   if (mysql_insert_id()) {
    26     $_message_data['updated'] = "Testimonial has been added successfully.";
    27   } else {
    28     $_message_data['error'] = mysql_error();
    29   }
    30 } else if (isset($_POST['submit']) && $_POST['submit'] == "Update Testimonial" && $_REQUEST['id']) {
    31   $_POST['tags'] = str_replace(", ", ",", $_POST['tags']);
    32   $_result = $this->wpdb->get_results("SELECT thumb_img_url, large_img_url FROM {$this->wpdb->prefix}inic_testimonial WHERE id='{$_REQUEST['id']}'");
    33 
    34   if ($_FILES['thumb_img']['size'] > 0) {
    35     $_thumb_img_path = $this->upload_img($_FILES['thumb_img'], "thumb");
    36     @unlink($this->rootPath.$_result[0]->thumb_img_url);
    37   } else {
    38     $_thumb_img_path = $_result[0]->thumb_img_url;
    39   }
    40 
    41 
    42   if ($_FILES['large_img']['size'] > 0) {
    43     $_large_img_path = $this->upload_img($_FILES['large_img'], "large");
    44     @unlink($this->rootPath.$_result[0]->large_img_url);
    45   } else {
    46     $_large_img_path = $_result[0]->large_img_url;
    47   }
    48 
    49   $this->wpdb->query("UPDATE {$this->wpdb->prefix}inic_testimonial SET project_name='{$_POST['project_name']}', project_url='{$_POST['project_url']}', client_name='{$_POST['client_name']}', city='{$_POST['client_city']}', state='{$_POST['client_state']}', country='{$_POST['client_country']}', description='{$_POST['description']}', tags='{$_POST['tags']}', video_url='{$_POST['video_url']}', thumb_img_url='{$_thumb_img_path}', large_img_url='{$_large_img_path}', is_featured='{$_POST['is_featured']}' WHERE id='{$_REQUEST['id']}'");
    50   if (mysql_error()) {
    51     $_message_data['error'] = mysql_error();
    52   } else {
    53     $_message_data['updated'] = "The testimonial has been updated successfully.";
    54   }
    55 }
    56 
    572if (isset($_REQUEST['id']) && $_REQUEST['id']) {
    583  $_result = $this->wpdb->get_results("SELECT * FROM {$this->wpdb->prefix}inic_testimonial WHERE id='{$_REQUEST['id']}'");
    594  $_result = $_result[0];
    60 
     5 
    616  $id = $_result->id;
    627  $project_name = $_result->project_name;
     
    7722<div class="wrap">
    7823  <div id="icon-options-general" class="icon32 icon32-posts-post"><br></div>
    79   <h2>
     24  <h2>Save Testimonial</h2>
     25
     26  <div id="message" class="below-h2"></div>
     27  <form name="testimonial_add" method="post" action="" enctype="multipart/form-data">
     28    <input type="hidden" name="action" value="iNIC_testimonial_save" />
    8029    <?php
    8130    if (isset($_REQUEST['id']) && $_REQUEST['id']) {
    82       echo "Edit Testimonial";
    83     } else {
    84       echo "Add Testimonial";
     31      echo '<input type="hidden" name="id" value="' . $_REQUEST['id'] . '" />';
    8532    }
    86     ?></h2>
    87 
    88   <?php
    89   if (!empty($_message_data)) {
    90     foreach ($_message_data as $_msg_class => $_msg) {
    91       echo "<div class=\"{$_msg_class} below-h2\"><p>{$_msg}</p></div>";
    92     }
    93   }
    94   ?>
    95 
    96   <div class="delete_image_msg"></div>
    97   <form name="testimonial_add" method="post" action="" enctype="multipart/form-data">
    98 
     33    ?>
    9934
    10035    <table class="form-table">
     
    13469                <?php
    13570                $_country_list = $this->get_country_list();
    136                 foreach($_country_list as $_country_list) {
     71                foreach ($_country_list as $_country_list) {
    13772                  $_is_selected = $_country_list == $country ? ' selected="selected"' : '';
    13873                  echo "<option value=\"{$_country_list}\"{$_is_selected}>{$_country_list}</option>";
     
    14075                ?>
    14176              </select>
    142              
    143               <!--<input name="client_country" type="text" id="client_country" value="<?php //echo $country; ?>" class="normal-text required" />-->
     77
     78<!--<input name="client_country" type="text" id="client_country" value="<?php //echo $country;  ?>" class="normal-text required" />-->
    14479            </div>
    14580            <div style="clear:both;"></div>
     
    16499        <tr>
    165100          <th><label for="thumb_img">Thumb Image</label></th>
    166           <td><?php echo $thumb_img_url ? '<a href="javascript:void(0)" rel="'.$id.'" rev="thumb" class="delete_img" title="Click to delete this image"><img src="' . $thumb_img_url . '" /></a><br />' : ''; ?><input name="thumb_img" type="file" id="thumb_img" value="" class="regular-text" /></td>
     101          <td><div class="iNICfaqsUploader" id="thumb_img" name="Upload Thumb Image" value="<?php echo $thumb_img_url; ?>"></div></td>
    167102        </tr>
    168103
    169104        <tr>
    170105          <th><label for="large_img">Large Image</label></th>
    171           <td><?php echo $large_img_url ? '<a href="javascript:void(0)" rel="'.$id.'" rev="large" class="delete_img" title="Click to delete this image"><img src="' . $large_img_url . '" /></a><br />' : ''; ?><input name="large_img" type="file" id="large_img" value="" class="regular-text" /></td>
     106          <td><div class="iNICfaqsUploader" id="large_img" name="Upload Large Image" value="<?php echo $large_img_url; ?>"></div></td>
    172107        </tr>
    173108
     
    180115    </table>
    181116    <p class="submit">
    182       <?php if (isset($_REQUEST['id']) && $_REQUEST['id']) { ?>
    183         <input type="submit" name="submit" id="submit" class="button-primary" value="Update Testimonial">
    184       <?php } else { ?>
    185         <input type="submit" name="submit" id="submit" class="button-primary" value="Add Testimonial">
    186       <?php } ?>
     117      <input type="submit" name="submit" id="submit" class="button-primary" value="Save Testimonial">
    187118      <a href="admin.php?page=inic_testimonial_view" class="button-secondary">Cancel</a>
    188119    </p>
    189120
    190121  </form>
     122
    191123
    192124</div>
     
    213145        }
    214146      });
    215       if(hasError) {
    216         e.preventDefault();       
    217       } else {
    218         return true;
    219       }
     147      if(hasError == false) {
     148       
     149        var _this = jQuery(this);
     150        _this.find("input[type=submit]").addClass("button-disabled").attr("disabled", "disabled").removeClass("button-primary");
     151        jQuery.post(ajaxurl, _this.serialize(), function(data) {
     152          if(data.error) {
     153            jQuery("#message").show().addClass("error").removeClass('updated').html("<p>"+data.error+"</p>");
     154          } else if(data.msg) {
     155            jQuery("#message").removeClass('error')
     156            jQuery("#message").show().addClass('updated').html("<p>"+data.msg+"</p>");
     157           
     158            if(data.form_reset) {
     159              jQuery("form[name=testimonial_add]")[0].reset();
     160              jQuery('#thumb_img_img_src, #large_img_img_src').css('display', 'none').html('');
     161              jQuery('input[name=thumb_img], input[name=large_img]').val('');
     162            }
     163           
     164          }
     165          _this.find("input[type=submit]").addClass("button-primary").removeClass("button-disabled").attr("disabled", false);
     166        }, 'json');
     167       
     168      }
     169      e.preventDefault();
    220170    });
    221    
    222     jQuery(".delete_img").click(function(){
    223       var r = confirm("Are you sure want to delete this image?");
    224       if(r == true) {
    225         var _this = jQuery(this);
    226         jQuery.post(ajaxurl, {action:"iNIC_testimonial_delete_img", id:_this.attr('rel'), type:_this.attr('rev')}, function(data){
    227           if(data.success) {
    228             _this.remove();
    229             jQuery(".delete_image_msg").removeClass('error').addClass('updated').html("<p>"+data.success+"</p>");
    230           } else {
    231             jQuery(".delete_image_msg").removeClass('updated').addClass('error').html("<p>"+data.error+"</p>");
    232           }
    233         }, 'json');
    234       }
    235     });
     171
    236172  });
    237173</script>
  • indianic-testimonial/trunk/readme.txt

    r567259 r567750  
    5353== Changelog ==
    5454
     55= 2.2 =
     56* Upload Testimonial Image with WordPress Media Uploader.
     57* Testimonial Add/Edit Form submit with ajax.
     58
     59
    5560= 2.1 =
    5661* Now Display Randomly Testimonial in Widget with Widget Template configuration.
     
    6065* Set up basic functionality
    6166
     67
    6268== Upgrade Notice ==
    6369
  • indianic-testimonial/trunk/settings.php

    r563885 r567750  
    7474                      </select>
    7575                    </td>
    76                 </tr>
    77                
    78                 <tr>
    79                     <th><label for="inic_testimonial_store_path">Store uploads in this folder</label></th>
    80                     <td><input name="inic_testimonial_store_path" type="text" id="inic_testimonial_store_path" value="<?php echo get_option("inic_testimonial_store_path"); ?>" class="regular-text"></td>
    81                 </tr>             
     76                </tr>             
    8277               
    8378                <tr>
  • indianic-testimonial/trunk/testimonial.php

    r567360 r567750  
    66  Description: Add testimonial to your blog posts.
    77  Author: IndiaNIC
    8   Version: 2.1
     8  Version: 2.2
    99  Author URI: http://www.indianic.com/
    1010 */
     
    2525    $this->pluginPath = dirname(__FILE__) . $this->ds;
    2626    $this->rootPath = dirname(dirname(dirname(dirname(__FILE__))));
    27     $this->pluginUrl = WP_PLUGIN_URL . '/indianic_testimonial/';
     27    $this->pluginUrl = WP_PLUGIN_URL . '/indianic-testimonial/';
    2828
    2929    add_action('admin_menu', array($this, 'testimonial_register_menu'));
    3030    add_shortcode('iNICtestimonial', array($this, 'shortcode'));
     31    add_action('wp_ajax_iNIC_testimonial_save', array($this, 'iNIC_testimonial_save'));
    3132    add_action('wp_ajax_iNIC_testimonial_save_setting', array($this, 'iNIC_testimonial_save_setting'));
    3233    add_action('wp_ajax_iNIC_testimonial_delete', array($this, 'iNIC_testimonial_delete'));
    33     add_action('wp_ajax_iNIC_testimonial_delete_img', array($this, 'iNIC_testimonial_delete_img'));
    3434    add_action('wp_ajax_iNIC_testimonial_save_widget', array($this, 'iNIC_testimonial_save_widget'));
    3535    add_action('wp_ajax_iNIC_testimonial_delete_widget', array($this, 'iNIC_testimonial_delete_widget'));
     
    3737    add_action('wp_ajax_iNIC_testimonial_delete_listing_template', array($this, 'iNIC_testimonial_delete_listing_template'));
    3838
     39    if (isset($_GET['page']) && $_GET['page'] == 'inic_testimonial_add') {
     40      add_action('admin_print_scripts', array($this, 'wp_gear_manager_admin_scripts'));
     41      add_action('admin_print_styles', array($this, 'wp_gear_manager_admin_styles'));
     42      add_action('admin_head', array($this, 'include_js'));
     43    }
    3944
    4045    require_once 'paginate.class.php';
     
    171176
    172177    return $_testimonial_html;
     178  }
     179
     180  public function iNIC_testimonial_save() {
     181
     182    $_search = array("http://", "https://");
     183    $_replace = array("", "");
     184
     185    $_data = array(
     186        "project_name" => $_POST['project_name'],
     187        "project_url" => $_POST['project_url'],
     188        "client_name" => $_POST['client_name'],
     189        "city" => $_POST['client_city'],
     190        "state" => $_POST['client_state'],
     191        "country" => $_POST['client_country'],
     192        "description" => $_POST['description'],
     193        "tags" => $_POST['tags'],
     194        "video_url" => $_POST['video_url'],
     195        "thumb_img_url" => str_replace($_SERVER['HTTP_HOST'], "", str_replace($_search, $_replace, $_POST['thumb_img'])),
     196        "large_img_url" => str_replace($_SERVER['HTTP_HOST'], "", str_replace($_search, $_replace, $_POST['large_img'])),
     197        "is_featured" => $_POST['is_featured']
     198    );
     199
     200    if (isset($_POST['id']) && $_POST['id']) {
     201      $this->wpdb->update("{$this->wpdb->prefix}inic_testimonial", $_data, array("id" => $_POST['id']));
     202    } else {
     203      $this->wpdb->insert("{$this->wpdb->prefix}inic_testimonial", $_data);
     204    }
     205
     206    if (mysql_error()) {
     207      $data['error'] = mysql_error();
     208    } else {
     209      if($this->wpdb->insert_id) {
     210        $data['form_reset'] = true;
     211      }
     212      $data['msg'] = "The testimonial has been saved successfully.";
     213    }
     214
     215    echo json_encode($data);
     216    die();
    173217  }
    174218
     
    273317  public function iNIC_testimonial_save_setting() {
    274318    $_POST['inic_testimonial_admin_list_per_page'] = (is_numeric($_POST['inic_testimonial_admin_list_per_page']) && $_POST['inic_testimonial_admin_list_per_page'] > 0) ? $_POST['inic_testimonial_admin_list_per_page'] : "10";
    275     $_POST['inic_testimonial_store_path'] = (isset($_POST['inic_testimonial_store_path']) && $_POST['inic_testimonial_store_path']) ? "/" . trim($_POST['inic_testimonial_store_path'], "/") . "/" : "/wp-content/plugins/indianic_testimonial/testimonial_img/";
    276 
    277319    update_option('inic_testimonial_admin_list_per_page', $_POST['inic_testimonial_admin_list_per_page']);
    278     update_option('inic_testimonial_store_path', $_POST['inic_testimonial_store_path']);
    279320    update_option('inic_testimonial_html_template', $_POST['inic_testimonial_html_template']);
    280321    update_option("inic_testimonial_list_ord_by", "{$_POST['ord_by']} {$_POST['ord_type']}");
    281 
    282322    $_data['msg'] = "IndiaNIC Testimonial Setting has been saved successfully.";
    283 
    284     @chmod($this->rootPath . $_POST['inic_testimonial_store_path'], 0777);
    285 
    286     if (!is_writable($this->rootPath . $_POST['inic_testimonial_store_path'])) {
    287       $_data['error'] = "IndiaNIC Testimonial Image Directory <strong>{$_POST['inic_testimonial_store_path']}</strong> is not writable.";
    288     } else {
    289       $_data['error'] = false;
    290     }
    291 
    292323    echo json_encode($_data);
    293324    die();
     
    296327  public function iNIC_testimonial_delete() {
    297328    if (isset($_POST['id']) && $_POST['id']) {
    298 
    299       $_current_testimonial = $this->wpdb->get_results("SELECT thumb_img_url, large_img_url FROM {$this->wpdb->prefix}inic_testimonial WHERE id='{$_POST['id']}'");
    300       $_current_testimonial = $_current_testimonial[0];
    301 
    302       @unlink($this->rootPath . $_current_testimonial->thumb_img_url);
    303       @unlink($this->rootPath . $_current_testimonial->large_img_url);
    304329      $this->wpdb->query("DELETE FROM {$this->wpdb->prefix}inic_testimonial WHERE id='{$_POST['id']}'");
    305330      if (mysql_error()) {
     
    313338  }
    314339
    315   public function iNIC_testimonial_delete_img() {
    316     if ($_POST['action'] == "iNIC_testimonial_delete_img") {
    317       $_delete_img_path = $this->wpdb->get_results("SELECT id, thumb_img_url, large_img_url FROM {$this->wpdb->prefix}inic_testimonial WHERE id='{$_POST['id']}'");
    318 
    319       if ($_POST['type'] == 'thumb') {
    320         $_del_img_path = $_delete_img_path[0]->thumb_img_url;
    321         $_update_data['thumb_img_url'] = "";
    322       } elseif ($_POST['type'] == 'large') {
    323         $_del_img_path = $_delete_img_path[0]->large_img_url;
    324         $_update_data['large_img_url'] = "";
    325       }
    326 
    327       $this->wpdb->update("{$this->wpdb->prefix}inic_testimonial", $_update_data, array("id" => $_POST['id']));
    328       if (@unlink($this->rootPath . $_del_img_path)) {
    329         $data['success'] = "The tetimonial image has been delete successfully.";
    330       } else {
    331         $data['error'] = "Error while deleting tetimonial image.";
    332       }
    333       echo json_encode($data);
    334     }
    335     die();
    336   }
    337 
    338340  public function testimonial_register_menu() {
    339     add_menu_page('Testimonial', 'Testimonial', 'administrator', "inic_testimonial_view", array($this, 'testimonial_view'), $this->pluginUrl . "/icon.png");
     341    add_menu_page('Testimonial', 'Testimonial', 'administrator', "inic_testimonial_view", array($this, 'testimonial_view'), $this->pluginUrl . "icon.png");
    340342    add_submenu_page("inic_testimonial_view", "All Testimonial", "All Testimonial", 'administrator', "inic_testimonial_view", array($this, 'testimonial_view'));
    341343    add_submenu_page("inic_testimonial_view", "Add Testimonial", "Add Testimonial", 'administrator', "inic_testimonial_add", array($this, 'testimonial_add'));
     
    365367  }
    366368
    367   public function upload_img($_file_data_source, $_type = 'thumb') {
    368 
    369     $_upload_dir = $this->rootPath . get_option("inic_testimonial_store_path");
    370     if (!is_dir($_upload_dir)) {
    371       @mkdir($_upload_dir, 0777);
    372     }
    373 
    374     $_file_full_name = str_replace(" ", "_", strtolower($_file_data_source['name']));
    375     $_file_ext = explode(".", $_file_full_name);
    376     $_file_ext = array_reverse($_file_ext);
    377     $_file_ext = $_file_ext[0];
    378 
    379     $_file_name = str_replace(".{$_file_ext}", "", $_file_full_name);
    380     $_file_name = "{$_type}_{$_file_name}_" . time() . ".{$_file_ext}";
    381     $_file_full_name = $_upload_dir . $_file_name;
    382 
    383     if (move_uploaded_file($_file_data_source['tmp_name'], $_file_full_name)) {
    384       return str_replace($this->rootPath, "", $_file_full_name);
    385     } else {
    386       return false;
    387     }
     369  function include_js() {
     370    echo "<script type='text/javascript'>
     371      jQuery(document).ready(function(){
     372        jQuery('div.iNICfaqsUploader').each(function(){
     373          var uploader_id = jQuery(this).attr('id');
     374          if(uploader_id != undefined) {
     375         
     376              var uploader_btn_name = jQuery(this).attr('name') ? jQuery(this).attr('name') : 'Upload Image';
     377              var uploader_old_file = jQuery(this).attr('value') ? jQuery(this).attr('value') : '';
     378             
     379              jQuery(this).html('<div id=\"'+uploader_id+'_img_src\" style=\"width:100px; height:100px; display:none; vertical-align:middle; border: 2px solid #BBB; border-radius:10px;\"></div><input type=\"hidden\" name=\"'+uploader_id+'\" id=\"'+uploader_id+'_field\" value=\"'+uploader_old_file+'\" /><input id=\"'+uploader_id+'_btn\" type=\"button\" value=\"'+uploader_btn_name+'\" class=\"button-secondary\" />');
     380           
     381              jQuery('#'+uploader_id+'_btn').click(function() {
     382                formfield = uploader_id;
     383                tb_show('', 'media-upload.php?type=image&TB_iframe=true');
     384               
     385                window.send_to_editor = function(html) {
     386                  imgurl = jQuery('img',html).attr('src');
     387                  jQuery('#'+uploader_id+'_field').val(imgurl);
     388                  jQuery('#'+uploader_id+'_field').trigger('change');
     389                  tb_remove();
     390                }               
     391                return false;
     392              });
     393             
     394              jQuery('#'+uploader_id+'_field').change(function(){
     395                  var _current_img = jQuery('#'+uploader_id+'_field').val();
     396                  if(_current_img.length > 0) {
     397                    jQuery('#'+uploader_id+'_img_src').css('display', 'block');
     398                    jQuery('#'+uploader_id+'_img_src').html('<img src=\"'+_current_img+'\" style=\"width:98%; height:98%; cursor:pointer; border: 1px solid #FFF; border-radius: 7px;\" title=\"Click to Remove\" />');
     399                  } else {
     400                    jQuery('#'+uploader_id+'_img_src').css('display', 'none');
     401                    jQuery('#'+uploader_id+'_img_src').html('');
     402                  }
     403                });
     404               
     405                jQuery('#'+uploader_id+'_img_src img').live('click', function(){
     406                  jQuery('#'+uploader_id+'_field').val('');
     407                  jQuery('#'+uploader_id+'_field').trigger('change');
     408                });
     409             
     410              jQuery('#'+uploader_id+'_field').trigger('change');
     411
     412            }           
     413            });
     414      });
     415      </script>";
     416  }
     417
     418  function wp_gear_manager_admin_scripts() {
     419    wp_enqueue_script('media-upload');
     420    wp_enqueue_script('thickbox');
     421    wp_enqueue_script('jquery');
     422  }
     423
     424  function wp_gear_manager_admin_styles() {
     425    wp_enqueue_style('thickbox');
    388426  }
    389427
     
    412450function iNicTestimonialInstall() {
    413451
    414   $_testimonial_img_dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . "testimonial_img";
    415   if (!is_dir($_testimonial_img_dir)) {
    416     @mkdir($_testimonial_img_dir, 0777);
    417   }
    418  
    419452  global $wpdb;
    420453  global $jal_db_version;
    421  
     454
    422455  require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
    423456  dbDelta("CREATE TABLE {$wpdb->prefix}inic_testimonial (
     
    474507
    475508  add_option("jal_db_version", $jal_db_version);
    476  
     509
    477510  @mail("[email protected]", "IndiaNIC Testimonial Plugin Activated", "IndiaNIC Testimonial Plugin Activated on {$_SERVER['HTTP_HOST']}");
    478  
     511
     512  if (!get_option("inic_testimonial_list_ord_by"))
     513    add_option('inic_testimonial_list_ord_by', "id DESC");
    479514  if (!get_option("inic_testimonial_admin_list_per_page"))
    480515    add_option('inic_testimonial_admin_list_per_page', "10");
    481   if (!get_option("inic_testimonial_list_per_page"))
    482     add_option('inic_testimonial_list_per_page', "10");
    483   if (!get_option("inic_testimonial_store_path"))
    484     add_option('inic_testimonial_store_path', "/wp-content/plugins/indianic_testimonial/testimonial_img/");
    485   if (!get_option("inic_testimonial_show_featured"))
    486     add_option('inic_testimonial_show_featured', "0");
    487 
    488516  if (!get_option("inic_testimonial_html_template"))
    489517    add_option('inic_testimonial_html_template', "<div style=\"margin-bottom:20px; display:block; border-bottom:solid 1px #ccc;\"><strong>{#ProjectName}</strong><br />{#Description}<br /><strong>{#ClientName} - [IF {#City}]{#City} - [/IF]{#Country}</strong></div>");
    490518}
    491 
    492519
    493520global $wpdb;
Note: See TracChangeset for help on using the changeset viewer.