Ultimate CSV Importer - Version 3.2.3

Version Description

Download this release

Release Info

Developer smackcoders
Plugin Icon 128x128 Ultimate CSV Importer
Version 3.2.3
Comparing to
See all releases

Code changes from version 3.2.2 to 3.2.3

Files changed (3) hide show
  1. Readme.txt +130 -104
  2. SmackImpCE.php +14 -4
  3. wp_ultimate_csv_importer.php +2 -2
Readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: smackcoders
3
  Donate link: http://www.smackcoders.com/donate.html
4
  Tags: batch, excel, import, spreadsheet, plugin, admin, csv, importer,
5
  Requires at least: 3.4.0
6
- Tested up to: 3.6
7
- Stable tag: 3.2.2
8
- Version: 3.2.2
9
  Author: smackcoders
10
  Author URI: http://profiles.wordpress.org/smackcoders/
11
  License: GPLv2 or later
@@ -15,11 +15,11 @@ A plugin that turns your offline data as wordpress post, page or custom post dat
15
 
16
  == Description ==
17
 
18
- Version 3.2.2 is out now with bug fix and UI improvements. Please visit http://www.smackcoders.com/category/free-wordpress-plugins.html for guides and tutorials.
19
 
20
- Make you CSV imports as easy as with simple cicks. Just relate or map your csv header (column name or field name) to wordpress fields. Turn your every CSV import as your wordpress content. WP Ultimate CSV Importer Plugin helps in this way to import any CSV file as post, page or even as custom post type. Also do periodical content changes, maintenance, content update, prices, offers, coupons and inventory etc.
21
 
22
- This simple but ultimate plugin as you can import everything needed to create as any WP post types from admin as simple as CSV import. Just in few clicks to map your CSV import set to match the Wordpress fields to import. Thats all, now your imports are turned as Wordpress site content in matter of seconds. No more pain of creating post content one by one of converting your offline data. You can import all the essential data as Wordpress post and skip unwanted things. Or you can import as many as custom fields without missing even a single data. Provided you should have a theme that supports custom fields. So you can now make use of your offline data, inventory, price catalog, information data, database and any other excel data sheet for online content distribution to your valuable visitor or customers.
23
 
24
  1. Admin can import the data's from any CSV file.
25
  2. Can import as post, page or custom post.
@@ -39,8 +39,7 @@ This simple but ultimate plugin as you can import everything needed to create as
39
  16. Skip Duplicate titles or content or both to avoid duplicates at time of import itself
40
  17. Only option we missed is post format, will be added in next major update.
41
 
42
-
43
- <p>http://www.youtube.com/embed/OwKdt_NlT2U?list=PL2k3Ck1bFtbQqFhOK7g08kxENI4qQkmC-</p>
44
 
45
 
46
  Important Notes:
@@ -145,133 +144,160 @@ Please click here for [ More Details](http://www.smackcoders.com/blog/category/f
145
 
146
  == Changelog ==
147
 
148
- = 3.2.2 = WordPress 3.6.1 compatibility added.
149
- -- Post slug issue fixed and tested for 3.6 and 3.6.1
150
- -- Help content added
151
- -- Mapping UI improved with on select dynamic update feature
152
-
153
- = 3.2.1 = Performance improvements on SQL and CSV parsing
154
- -- Plugin deactivation issue fixed and updated the code.
155
- -- Links in the cells makes problems with the "quote"
156
- -- Loading content from more than one colunm
157
- -- Custom Post type issues fixed
158
-
159
- = 3.2.0 = WordPress 3.6 compatibility added, Much Improved UI.
160
- -- Featured image issues fixed for WordPress-3.6.
161
- -- User interface improvements
162
-
163
- = 3.1.0 = Much Improved Featured Image feature
164
- -- Image url for featured image issues fixed
165
- -- PHP 5.4 upgrade fix
166
-
167
- = 3.0.0 = Lot of performance improvements
168
- - Much improved workflow
169
- - Custom Field mapping and import fixed
170
- - Add custom field option improved.
171
- - Date format handling improved
172
- - Any Date format is supported now
173
- - Future scheduling and status improved
174
- - Overall Status option improved and issue fixed
175
- - Password field fixed for Protected
176
- - Status as in CSV option improved and fixed
177
- - Can apply post status for individual post via csv itself
178
- - Now password should be mentioned as {password}
179
- - Featured image handling improved and fixed. More improvement are scheduled.
180
- - Category in numericals are restricted and skipped to Uncategorized
181
- - Duplicate check options improved for both title and content option.
182
- - Post authors can be User ID or name
183
- - Post author issue fixed and improved
184
- - Wrong user id or name are automatically assigned under admin
185
- - Multi category and tags improved
186
-
187
- = 2.7.0 = Post Status
188
- -- Added more post status options
189
- -- Publish, Sticky, Private, Draft and Pending Status for whole import
190
- -- Protected status with a common password option added
191
- -- "Status as in CSV" to assign status for individual psot thorugh CSV as ID or Field Tag
192
-
193
- Post Author
194
- -- User ID and User Name support for Post author feature added
195
- -- In case of missing or false IDs post assigned to admin as draft
196
- --
197
 
198
- Extra date formats support added.
199
- -- 6 Standard date format added as dropdown to choose.
200
- -- Date format conflict at import fixed.
201
-
202
- Custom field feature improved.
203
- -- Listed custom fields with prefix as CF: Name for easy identification.
204
- -- Add Custom Field Textbox autofilled with CSV header tag.
205
-
206
- Added Feature
207
- -- Duplicate detection for post content and post title added as options.
208
- -- User can choose either one or both to avoid duplicate issues.
209
-
210
- Post Slug
211
- -- Renamed post_name as post_slug to avoid confusion
212
-
213
- Mapping Fields
214
- -- Field tags are formatted to support auto mapping option (next milestone)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
215
 
216
 
217
- = 2.6.0 = Major Bug fixed
218
- -- Added UTF-8 support.
219
- -- Fixed Html tag conflicts.
 
220
 
221
- = 2.5.0 = Major issues fixed and updated to WordPress-3.5.1 compatibility.
 
222
 
223
- = 2.0.1 = Update to WordPress-3.5 compatibility.
 
224
 
225
- = 2.0.0 = WPDEBUG errors fixed. CSV import folder changed to WP native uploads folder.
 
226
 
227
- = 1.1.1 = Renamed the mapping field attachment as featured_image and category as post_category.
 
228
 
229
- = 1.1.0 = Added featured image import feature along with post/page/custom post.
 
230
 
231
- = 1.0.2 = Bug fixed to recognize the trimmed trailing space in the CSV file
232
- - Added validation for the duplicate field mapping.
 
233
 
234
- = 1.0.1 = Added features to import multiple tags and categories with different delimiters.
 
235
 
236
- = 1.0.0 = Initial release version. Tested and found works well without any issues.
 
237
 
238
 
239
 
240
 
241
  == Upgrade Notice ==
242
 
243
- =v 3.2.2 = WordPress 3.6.1 compatibile, bug fix and UI improvements
 
 
 
 
244
 
245
- =v 3.2.1 = Performance improvements on SQL and CSV parsing
 
246
 
247
- =v 3.2.0 = Now compatible with 3.6 and improved featured image
 
248
 
249
- =v 3.1.0 = Now Much Improved Featured Image and url handling
 
250
 
251
- =v 3.0.0 = Must upgrade to have Major improvements, performance fixes and issue fixes
 
252
 
253
- =v 2.7.0 = Major improvements and feature changes.
 
254
 
255
- =v 2.6.0 = Bug fixed and should upgrade.
 
256
 
257
- =v 2.5.0 = Issues fixed and updated to WordPress-3.5.1 compatibility.
258
- -- Duplicate detection added.
259
- -- Added more information in success message.
260
- -- Import memory issues solved.
261
 
262
- =v 2.0.1 = Update to WordPress-3.5 compatibility.
 
263
 
264
- =v 2.0.0 = Major Bug fixed and should upgrade. WPDEBUG errors fixed. CSV import folder changed to WP native uploads folder.
 
265
 
266
- =v 1.1.1 = Minor correction and fix applied.
 
267
 
268
- =v 1.1.0 = A major new feature added in this version. Update needed.
 
269
 
270
- =v 1.0.2 = This version have important bug fixes and newly added features. Must be upgrade immediately.
 
271
 
272
- =v 1.0.1 = Added features to import multiple tags and categories with different delimiters.
 
273
 
274
- =v 1.0.0 = Initial release of plugin.
 
275
 
276
 
277
 
3
  Donate link: http://www.smackcoders.com/donate.html
4
  Tags: batch, excel, import, spreadsheet, plugin, admin, csv, importer,
5
  Requires at least: 3.4.0
6
+ Tested up to: 3.7.1
7
+ Stable tag: 3.2.3
8
+ Version: 3.2.3
9
  Author: smackcoders
10
  Author URI: http://profiles.wordpress.org/smackcoders/
11
  License: GPLv2 or later
15
 
16
  == Description ==
17
 
18
+ Version 3.2.3 is now available with WP 3.7.1 compatibility. [Please visit for guides and tutorials.] (http://www.smackcoders.com/category/free-wordpress-plugins.html)
19
 
20
+ WP Ultimate CSV Importer Plugin helps you to import any CSV file as post, page or even as custom post type. Convert your offline database maintained for years into your valuable website content. Also do periodical content changes, maintenance, content update, prices, offers, coupons and inventory etc.
21
 
22
+ This simple but ultimate plugin as you can import everything needed to create as any WP post types from admin as simple as CSV file. Just in few clicks to map your CSV data set to match the Wordpress fields to import. That�s all, now your imports are turned as Wordpress site content in matter of seconds. No more pain of creating post content one by one of converting your offline data. You can import all the essential data as Wordpress post and skip unwanted things. Or you can import as many as custom fields without missing even a single data. Provided you should have a theme that supports custom fields. So you can now make use of your offline data, inventory, price catalog, information data, database and any other excel data sheet for online content distribution to your valuable visitor or customers.
23
 
24
  1. Admin can import the data's from any CSV file.
25
  2. Can import as post, page or custom post.
39
  16. Skip Duplicate titles or content or both to avoid duplicates at time of import itself
40
  17. Only option we missed is post format, will be added in next major update.
41
 
42
+ <p>http://www.youtube.com/watch?v=OwKdt_NlT2U&list=PL2k3Ck1bFtbQqFhOK7g08kxENI4qQkmC</p>
 
43
 
44
 
45
  Important Notes:
144
 
145
  == Changelog ==
146
 
147
+ = 3.2.3 =
148
+ * Added: WordPress 3.7.1 compatibility added.
149
+ * Added: Different media path support added.
150
+ * Added: Sub folder installations support added.
151
+ * Improved: Updated plugin directory path.
152
+ * Improved: Removed unwanted warnings.
153
+ * Improved: Performance check.
154
+
155
+ = 3.2.2 =
156
+ * Added: WordPress 3.6.1 compatibility added.
157
+ * Added: Mapping UI improved with on select dynamic update feature
158
+ * Added: Help content added
159
+ * Fixed: Post slug issue fixed and tested for 3.6 and 3.6.1
160
+
161
+ = 3.2.1 =
162
+ * Improved: Performance improvements on SQL and CSV parsing
163
+ * Fixed: Plugin deactivation issue fixed and updated the code.
164
+ * Fixed: Links in the cells makes problems with the "quote"
165
+ * Fixed: Loading content from more than one colunm
166
+ * Fixed: Custom Post type issues fixed
167
+
168
+ = 3.2.0 =
169
+ * Improved: User interface improvements
170
+ * Improved:WordPress 3.6 compatibility added, Much Improved UI.
171
+ * Fixed: Featured image issues fixed for WordPress-3.6.
172
+
173
+ = 3.1.0 =
174
+ * Improved: Much Improved Featured Image feature
175
+ * Fixed: Image url for featured image issues fixed
176
+ * Fixed: PHP 5.4 upgrade fix
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
 
178
+ = 3.0.0 =
179
+ * Added: Category in numericals are restricted and skipped to Uncategorized
180
+ * Added: Now password should be mentioned as {password}
181
+ * Added: Post authors can be User ID or name
182
+ * Improved: Much improved workflow
183
+ * Improved: Add custom field option improved.
184
+ * Improved: Date format handling improved
185
+ * Improved: Any Date format is supported now
186
+ * Improved: Future scheduling and status improved
187
+ * Improved: Can apply post status for individual post via csv itself
188
+ * Improved: Featured image handling improved and fixed. More improvement are scheduled.
189
+ * Improved: Duplicate check options improved for both title and content option.
190
+ * Improved: Post author issue fixed and improved
191
+ * Improved: Wrong user id or name are automatically assigned under admin
192
+ * Improved: Multi category and tags improved
193
+ * Fixed: Custom Field mapping and import fixed
194
+ * Fixed: Overall Status option improved and issue fixed
195
+ * Fixed: Password field fixed for Protected
196
+ * Fixed: Status as in CSV option improved and fixed
197
+
198
+ = 2.7.0 =
199
+
200
+ * Added: Added more post status options
201
+ * Added: Publish, Sticky, Private, Draft and Pending Status for whole import
202
+ * Added: Protected status with a common password option added
203
+ * Added: "Status as in CSV" to assign status for individual psot thorugh CSV as ID or Field Tag
204
+ * Added: User ID and User Name support for Post author feature added
205
+ * Added: In case of missing or false IDs post assigned to admin as draft
206
+ * Added: Add Custom Field Textbox autofilled with CSV header tag.
207
+ * Added: Duplicate detection for post content and post title added as options.
208
+ * Added: User can choose either one or both to avoid duplicate issues.
209
+ * Improved: 6 Standard date format added as dropdown to choose.
210
+ * Improved: Renamed post_name as post_slug to avoid confusion
211
+ * Improved: Mapping Fields
212
+ * Improved: Field tags are formatted to support auto mapping option (next milestone)
213
+ * Improved: Listed custom fields with prefix as CF: Name for easy identification.
214
+ * Fixed: Date format conflict at import fixed.
215
 
216
 
217
+ = 2.6.0 =
218
+ * Fixed: Major Bug fixed
219
+ * Fixed: Added UTF-8 support.
220
+ * Fixed: Fixed Html tag conflicts.
221
 
222
+ = 2.5.0 =
223
+ * Major issues fixed and updated to WordPress-3.5.1 compatibility.
224
 
225
+ = 2.0.1 =
226
+ * Update to WordPress-3.5 compatibility.
227
 
228
+ = 2.0.0 =
229
+ * WPDEBUG errors fixed. CSV import folder changed to WP native uploads folder.
230
 
231
+ = 1.1.1 =
232
+ * Renamed the mapping field attachment as featured_image and category as post_category.
233
 
234
+ = 1.1.0 =
235
+ * Added featured image import feature along with post/page/custom post.
236
 
237
+ = 1.0.2 =
238
+ * Bug fixed to recognize the trimmed trailing space in the CSV file
239
+ * Added validation for the duplicate field mapping.
240
 
241
+ = 1.0.1 =
242
+ * Added features to import multiple tags and categories with different delimiters.
243
 
244
+ = 1.0.0 =
245
+ * Initial release version. Tested and found works well without any issues.
246
 
247
 
248
 
249
 
250
  == Upgrade Notice ==
251
 
252
+ = 3.2.3 =
253
+ * Upgrade for WordPress 3.7.1 compatibility and minor bug fixes
254
+
255
+ = 3.2.2 =
256
+ * WordPress 3.6.1 compatibile, bug fix and UI improvements
257
 
258
+ = 3.2.1 =
259
+ * Performance improvements on SQL and CSV parsing
260
 
261
+ = 3.2.0 =
262
+ * Now compatible with 3.6 and improved featured image
263
 
264
+ = 3.1.0 =
265
+ * Now Much Improved Featured Image and url handling
266
 
267
+ = 3.0.0 =
268
+ * Must upgrade to have Major improvements, performance fixes and issue fixes
269
 
270
+ = 2.7.0 =
271
+ * Major improvements and feature changes.
272
 
273
+ = 2.6.0 =
274
+ * Bug fixed and should upgrade.
275
 
276
+ = 2.5.0 =
277
+ * Duplicate detection added.
278
+ * Added more information in success message.
279
+ * Import memory issues solved.
280
 
281
+ = 2.0.1 =
282
+ * Update to WordPress-3.5 compatibility.
283
 
284
+ = 2.0.0 =
285
+ * Major Bug fixed and should upgrade. WPDEBUG errors fixed. CSV import folder changed to WP native uploads folder.
286
 
287
+ = 1.1.1 =
288
+ * Minor correction and fix applied.
289
 
290
+ = 1.1.0 =
291
+ * A major new feature added in this version. Update needed.
292
 
293
+ = 1.0.2 =
294
+ * This version have important bug fixes and newly added features. Must be upgrade immediately.
295
 
296
+ = 1.0.1 =
297
+ * Added features to import multiple tags and categories with different delimiters.
298
 
299
+ = 1.0.0 =
300
+ * Initial release of plugin.
301
 
302
 
303
 
SmackImpCE.php CHANGED
@@ -380,9 +380,15 @@ class SmackImpCE extends SmackWpHandler
380
  }
381
  $attachmentName = urldecode($img_title) . '.' . $type;
382
  $dir = wp_upload_dir();
383
- $dirname = date('Y') . '/' . date('m');
384
- $full_path = $dir ['basedir'] . '/' . $dirname;
385
- $baseurl = $dir ['baseurl'] . '/' . $dirname;
 
 
 
 
 
 
386
  $filename = explode('/', $file_url);
387
  $file_split = count($filename);
388
  $filepath = $full_path . '/' . urldecode($plain_filename);
@@ -571,7 +577,11 @@ class SmackImpCE extends SmackWpHandler
571
  'post_content' => '',
572
  'post_status' => 'inherit'
573
  );
574
- $generate_attachment = $dirname . '/' . $attachmentName;
 
 
 
 
575
  $uploadedImage = $wp_upload_dir['path'] . '/' . $attachmentName;
576
  $attach_id = wp_insert_attachment($attachment, $generate_attachment, $post_id);
577
  require_once(ABSPATH . 'wp-admin/includes/image.php');
380
  }
381
  $attachmentName = urldecode($img_title) . '.' . $type;
382
  $dir = wp_upload_dir();
383
+ $get_media_settings = get_option('uploads_use_yearmonth_folders');
384
+ if($get_media_settings == 1){
385
+ $dirname = date('Y') . '/' . date('m');
386
+ $full_path = $dir ['basedir'] . '/' . $dirname;
387
+ $baseurl = $dir ['baseurl'] . '/' . $dirname;
388
+ }else{
389
+ $full_path = $dir ['basedir'];
390
+ $baseurl = $dir ['baseurl'];
391
+ }
392
  $filename = explode('/', $file_url);
393
  $file_split = count($filename);
394
  $filepath = $full_path . '/' . urldecode($plain_filename);
577
  'post_content' => '',
578
  'post_status' => 'inherit'
579
  );
580
+ if($get_media_settings == 1){
581
+ $generate_attachment = $dirname . '/' . $attachmentName;
582
+ }else{
583
+ $generate_attachment = $attachmentName;
584
+ }
585
  $uploadedImage = $wp_upload_dir['path'] . '/' . $attachmentName;
586
  $attach_id = wp_insert_attachment($attachment, $generate_attachment, $post_id);
587
  require_once(ABSPATH . 'wp-admin/includes/image.php');
wp_ultimate_csv_importer.php CHANGED
@@ -3,7 +3,7 @@
3
  *Plugin Name: WP Ultimate CSV Importer
4
  *Plugin URI: http://www.smackcoders.com/blog/how-to-guide-for-free-wordpress-ultimate-csv-importer-plugin.html
5
  *Description: A plugin that helps to import the data's from a CSV file.
6
- *Version: 3.2.2
7
  *Author: smackcoders.com
8
  *Author URI: http://www.smackcoders.com
9
  *
@@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29
  ini_set('max_execution_time', 600);
30
  ini_set('memory_limit', '128M');
31
 
32
- require_once (dirname(__FILE__) . '/../../../wp-load.php');
33
 
34
  require_once "SmackImpCE.php";
35
  require_once "class.rendercsv.php";
3
  *Plugin Name: WP Ultimate CSV Importer
4
  *Plugin URI: http://www.smackcoders.com/blog/how-to-guide-for-free-wordpress-ultimate-csv-importer-plugin.html
5
  *Description: A plugin that helps to import the data's from a CSV file.
6
+ *Version: 3.2.3
7
  *Author: smackcoders.com
8
  *Author URI: http://www.smackcoders.com
9
  *
29
  ini_set('max_execution_time', 600);
30
  ini_set('memory_limit', '128M');
31
 
32
+ require_once (ABSPATH . 'wp-load.php');
33
 
34
  require_once "SmackImpCE.php";
35
  require_once "class.rendercsv.php";