Changeset 454094
- Timestamp:
- 10/22/2011 01:57:08 AM (14 years ago)
- Location:
- comment-extra-field
- Files:
-
- 41 added
- 6 edited
-
tags/1.4 (added)
-
tags/1.4/cef-ajax.php (added)
-
tags/1.4/cef-upload.php (added)
-
tags/1.4/comment-extra-fields-config.php (added)
-
tags/1.4/comment-extra-fields-front.php (added)
-
tags/1.4/comment-extra-fields-functions.php (added)
-
tags/1.4/comment-extra-fields.php (added)
-
tags/1.4/css (added)
-
tags/1.4/css/default.css (added)
-
tags/1.4/css/front (added)
-
tags/1.4/css/front/cef-style.css (added)
-
tags/1.4/css/images (added)
-
tags/1.4/css/images/Info-16x16.png (added)
-
tags/1.4/css/images/cancelbutton.gif (added)
-
tags/1.4/css/images/page_white_add.png (added)
-
tags/1.4/css/images/shadow.png (added)
-
tags/1.4/css/images/shadow2-reverse.png (added)
-
tags/1.4/css/images/shadow2.png (added)
-
tags/1.4/css/jquery.tooltip.css (added)
-
tags/1.4/css/style.css (added)
-
tags/1.4/js (added)
-
tags/1.4/js/jquery.tooltip.min.js (added)
-
tags/1.4/js/lib (added)
-
tags/1.4/js/lib/jquery.bgiframe.js (added)
-
tags/1.4/js/lib/jquery.delegate.js (added)
-
tags/1.4/js/lib/jquery.dimensions.js (added)
-
tags/1.4/js/scripts.js (added)
-
tags/1.4/readme.txt (added)
-
tags/1.4/screenshot-1.png (added)
-
tags/1.4/screenshot-2.png (added)
-
tags/1.4/screenshot-3.png (added)
-
tags/1.4/screenshot-4.png (added)
-
tags/1.4/screenshots (added)
-
tags/1.4/scripts (added)
-
tags/1.4/scripts/cef-button.png (added)
-
tags/1.4/scripts/cef.uploader.js (added)
-
tags/1.4/scripts/jquery.swfupload.js (added)
-
tags/1.4/scripts/swfupload.js (added)
-
tags/1.4/scripts/swfupload.queue.js (added)
-
tags/1.4/scripts/swfupload.swf (added)
-
trunk/cef-ajax.php (added)
-
trunk/comment-extra-fields-config.php (modified) (2 diffs)
-
trunk/comment-extra-fields-functions.php (modified) (1 diff)
-
trunk/comment-extra-fields.php (modified) (9 diffs)
-
trunk/css/style.css (modified) (1 diff)
-
trunk/js/scripts.js (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
comment-extra-field/trunk/comment-extra-fields-config.php
r446799 r454094 31 31 if(!defined('CEF_POSTFIX_DB_VALUE_COL')) define('CEF_POSTFIX_DB_VALUE_COL', '_col_value'); 32 32 if(!defined('CEF_POSTFIX_HTML_CODE')) define('CEF_POSTFIX_HTML_CODE', '_html_code'); 33 if(!defined('CEF_POSTFIX_LOCATION')) define('CEF_POSTFIX_LOCATION', '_location'); 33 34 34 35 if(!defined('CEF_OPTION_SEPARATOR')) define('CEF_OPTION_SEPARATOR', ';'); … … 46 47 47 48 if(!defined('CEF_ADMIN_URL')) define('CEF_ADMIN_URL', get_bloginfo('siteurl') . '/wp-admin/options-general.php?page=comment-extra-fields'); 49 50 if(!defined('CEF_LOCATION_BOTH')) define('CEF_LOCATION_BOTH', 100); 51 if(!defined('CEF_LOCATION_GUEST')) define('CEF_LOCATION_GUEST', 101); 52 if(!defined('CEF_LOCATION_LOGGED')) define('CEF_LOCATION_LOGGED', 102); 48 53 ?> -
comment-extra-field/trunk/comment-extra-fields-functions.php
r446058 r454094 479 479 480 480 global $wpdb; 481 $sql = "SELECT option_name FROM {$wpdb->options} WHERE option_value='" . esc_attr($cef_id). "' AND option_name LIKE ('" . CEF_OPTION_PREFIX . CEF_POSTFIX_ID . "%')";481 $sql = "SELECT option_name FROM {$wpdb->options} WHERE option_value='" . $cef_id . "' AND option_name LIKE ('" . CEF_OPTION_PREFIX . CEF_POSTFIX_ID . "%')"; 482 482 $data = $wpdb->get_var($sql); 483 483 return ($data) ? str_replace(CEF_OPTION_PREFIX . CEF_POSTFIX_ID, '', $data) : ''; -
comment-extra-field/trunk/comment-extra-fields.php
r446799 r454094 2 2 /* 3 3 Plugin Name: Comment Extra Fields 4 Plugin URI: http:// elfdreamer.blogspot.com/2011/09/wordpress-comment-extra-fields-plugin.html4 Plugin URI: http://wordpress.org/extend/plugins/comment-extra-field/ 5 5 Description: Allows administrator to add custom fields to comment form. On admin side let you update/delete the extra info. 6 Version: 1. 36 Version: 1.4 7 7 Author: Simona Ilie 8 Author URI: http://elfdreamer.blogspot.com8 Author URI: 9 9 License: GPL2 10 10 … … 50 50 wp_enqueue_style('comment-extra-fields-tooltips', CEF_FULL_PLUGIN_PATH . 'css/jquery.tooltip.css'); 51 51 wp_enqueue_style('comment-extra-fields-style', CEF_FULL_PLUGIN_PATH . 'css/style.css'); 52 ?> 53 <script type="text/javascript"> 54 var cef_admin_url = "<?php echo CEF_ADMIN_URL;?>"; 55 </script> 56 <?php else: 52 else: 57 53 wp_enqueue_script('jquery-on-front', 'http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js', null, null, null); 58 54 wp_enqueue_script('swf-uploader', CEF_FULL_PLUGIN_PATH . 'scripts/swfupload.js', null, null, null); … … 60 56 wp_enqueue_script('cef-script-uploader', CEF_FULL_PLUGIN_PATH . 'scripts/cef.uploader.js', null, null, null); 61 57 wp_enqueue_style('custom_style', CEF_FULL_PLUGIN_PATH . 'css/front/cef-style.css', null, null); 62 ?> 58 if(!isset($_POST['action'])) : 59 ?> 60 63 61 <script type="text/javascript"> 64 62 var plugin_url = "<?php echo CEF_FULL_PLUGIN_PATH;?>"; 65 63 </script> 66 64 <?php endif; 65 endif; 67 66 /** 68 67 * include a submenu option under Settings Dashboard … … 105 104 ?> 106 105 <script type='text/javascript'> 107 var cef_plugin_url = '<?php echo CEF_FULL_PLUGIN_PATH;?>'; 106 var cef_admin_url = '<?php echo CEF_ADMIN_URL;?>'; 107 var cef_plugin_url = '<?php echo CEF_FULL_PLUGIN_PATH;?>'; 108 108 var cef_input_types = <?php echo json_encode(array(CEF_INPUT_TEXT, CEF_INPUT_TEXTAREA, CEF_INPUT_CHECKBOX, CEF_INPUT_RADIO, CEF_INPUT_SELECT, CEF_INPUT_FILE, CEF_INPUT_DB_SELECT));?>; 109 109 </script> … … 115 115 <thead> 116 116 <tr> 117 <!--<th style="" class="manage-column column-cb check-column" id="cb" scope="col">117 <th style="" class="manage-column column-cb check-column" id="cb" scope="col"> 118 118 <input type="checkbox"> 119 </th> -->119 </th> 120 120 <th style="" class="manage-column column-title sortable desc" id="cef_field_name_row" scope="col"> 121 121 <span><a><?php _e('Field Name');?></a></span> … … 134 134 <tfoot> 135 135 <tr> 136 <!--<th style="" class="manage-column column-cb check-column" scope="col">136 <th style="" class="manage-column column-cb check-column" scope="col"> 137 137 <input type="checkbox"> 138 </th> -->138 </th> 139 139 <th style="" class="manage-column column-title sortable desc" scope="col"> 140 140 <span><a><?php _e('Field Name');?></a></span> … … 155 155 foreach($comment_extra_fields as $cef):?> 156 156 <tr valign="top" class="alternate author-self status-publish format-default iedit" id="post-9"> 157 <!-- <th class="check-column" scope="row"><input type="checkbox" value="<?php echo $cef['id'];?>" name="cef[]"></th> -->157 <th class="check-column" scope="row"><input type="checkbox" value="<?php echo $cef['id'];?>" name="cef[]"></th> 158 158 <td class="post-title page-title column-title"><?php echo $cef['label'];?></td> 159 159 <td><?php echo ucwords($cef['type']);?></td> … … 169 169 </tbody> 170 170 </table> 171 <div class="cef-horizonat-space"><!-- --></div> 172 <input type="button" class="cef-btn" id="delete-selected-cefs" value="Delete Selected Fields" /> 171 173 <div class="cef-horizontal-line"><!-- --></div> 172 174 <h3><?php _e('Add/Edit Field');?></h3> … … 341 343 </td> 342 344 </tr> 343 <!-- <tr> 344 <td colspan="2"> 345 <input type="checkbox" id="cef_field_required" name="cef_field_required" /> 346 <label for="cef_field_required"><?php _e('Field is required');?></label> 347 </td> 348 </tr> --> 345 <!-- <tr> 346 <td> 347 <label for="cef_field_location"><?php _e('Field Location');?></label> 348 </td> 349 <td colspan="3"> 350 <input type="radio" name="cef_field_location" id="cef_field_location_both" value="<?php echo CEF_LOCATION_BOTH;?>" /> 351 <label for="cef_field_location_both"><?php _e('Both');?></label> 352 <input type="radio" name="cef_field_location" id="cef_field_location_guest" value="<?php echo CEF_LOCATION_GUEST;?>" /> 353 <label for="cef_field_location_guest"><?php _e('Only Guests');?></label> 354 <input type="radio" name="cef_field_location" id="cef_field_location_logged" value="<?php echo CEF_LOCATION_LOGGED;?>" /> 355 <label for="cef_field_location_logged"><?php _e('Only Logged in user');?></label> 356 </td> 357 </tr> --> 349 358 <tr> 350 359 <td> </td> -
comment-extra-field/trunk/css/style.css
r446058 r454094 200 200 color: #000000; 201 201 } 202 203 .cef-horizonat-space 204 { 205 padding-top: 10px; 206 } 207 208 .cef-btn 209 { 210 cursor:pointer; 211 } -
comment-extra-field/trunk/js/scripts.js
r446058 r454094 35 35 else if(hints_div.hasClass('cef-show')) 36 36 my_toggle_class(hints_div, 'cef-show', 'cef-hide'); 37 }); 38 $('#delete-selected-cefs').click(function(){ 39 var selected_ids = new Array(); 40 $("input[name='cef[]']:checked").each(function(){ 41 selected_ids.push($(this).val()); 42 }); 43 if(selected_ids.length == 0) { 44 alert('No fields selected.') 45 } else { 46 $.ajax({ 47 url:cef_plugin_url + 'cef-ajax.php', 48 data: {cef: selected_ids, action:'delete-bulk'}, 49 dataType: 'JSON', 50 type:'POST', 51 success: function(response) 52 { 53 $('input[name="cef[]"]').removeAttr('checked'); 54 window.location.reload(); 55 }, 56 error: function() 57 { 58 alert('There was an error. The fields could not be deleted.'); 59 } 60 }) 61 } 37 62 }); 38 63 }); -
comment-extra-field/trunk/readme.txt
r446799 r454094 5 5 Requires at least: 3.2.1 6 6 Tested up to: 3.2.1 7 Stable tag: 1. 37 Stable tag: 1.4 8 8 9 9 Add extra fields to default Wordpress comment form … … 19 19 20 20 To use the users input for extra fields in your theme there are two functions: 21 21 22 22 cef_get_all_extra_field_values($comment_id); 23 23 … … 67 67 = 1.3 = 68 68 69 * fix plugin path bug 69 * fix base plugin path bug 70 71 = 1.4 = 72 73 * fix "unexpected output" warning during activation 74 75 * added bulk fields deletion option 70 76 71 77 == Upgrade Notice ==
Note: See TracChangeset
for help on using the changeset viewer.