Content Template Test Posts Meta Box

A goal of CSV 2 POST is to help users protect their live blog. What I mean by this is that we want to reduce risk when making changes to a project that has already created hundreds of posts. Our Test Posts meta box feature allows us to enter one or more post ID when editing a Content Template. On clicking “Update” our template changes are applied to those test post. Other update procedures make changes to the whole post, essentially re-building it. This feature focuses on the “post_content” value stored in the database and that is the value users see. We can then inspect them and decide if we want to allow the plugin to apply the changes to all posts. As always you should read this feature guide to fully understand how this operates.

close

Original Premium Feature: No other CSV importer on WordPress provides this functionality and so it is provided in our premium plugin only. Our aim is to provide surgical tools to help manage live blogs without taking them offline and we will continue to show innovation in this area.

csv2post-test-posts-meta-box

 

Step One

The Test Posts tool is provided to help during the process of editing and updating existing posts. So the first step is to create posts using CSV 2 POST.

Step Two

Open C2P Content in the menu and click Edit on the template you wish to change then apply to posts using that template.

Step Three

Enter one or more post ID separated by comma. The posts must be using the template you plan to edit. They may have used the template originally or you have changed to that template. Either way CSV 2 POST will still only apply the template linked to the posts through the standard project settings or the custom field named “csv2post_template”. The Test Posts tool simply tells CSV 2 POST which posts we want updated right now, despite any other settings.

Step Four

Ensure your posts are private or draft, unless you are working on a test blog then it does not matter. The idea is to hide changes. Confident users may enter post ID for public posts, that is fine. We’re still reducing any potential damage if our template changes are not correct or turn out different from what we expected.

Step Five

Click Update and check your posts. Continue the process if required.

close

Custom Field: the string of post ID will be stored in a custom field named _csv2post_testposts. The underscore at the beginning of this custom field key hides it on the interface though.

The first plugin you may have found, might be one that requires a specific CSV file format i.e. the column headers need to be named something specific.

CSV 2 POST does not require a specific CSV file format. A lot of time has gone into allowing any column headers/titles to be used. We recommend using comma and double quotes for other elements of Comma Separated Value files however CSV 2 POST is also designed to accept any other separator or quote.

What about the number of CSV file columns?

A plugin that requires specific column headers may also have a limit to the number of columns you can actually use. They may even require an exact amount meaning many users will have to remove columns or merge them somehow.

CSV 2 POST allows 5 or 55 columns. That doesn’t mean you should go column crazy just for the sake of it. The more columns the more work the plugin does.

What about the order of CSV file columns?

CSV 2 POST does not require the columns to be in any specific order.

Is there anything else I should know about CSV files being used in CSV 2 POST?

Do not rename header names after you have used a CSV file, if you plan to run data/post updating. Once the format of your CSV file has been stored in CSV 2 POST/Wordpress our software will continue to expect that specific format.

Contact us if for any reason you need to add more columns or remove columns etc. We do not provide such abilities until they are requested and they have yet to be. However we do understand that after many months projects do change and so we are always open to such requests. Please comment below with your request though so that everyone can get an idea of the level of demand for this possible feature.

This panel offers two tables of information only, no actions. The CSV file profile is made up of the separator, quote and number of fields/columns. The profile is key to being able to read and process a CSV file properly. The plugin will attempt to establish the profile automatically but due to the lack of standardization in CSV files, it is not always possible.

Separator (plugin)

This column displays the separator CSV 2 POST guessed for each CSV file. We can compare it too a second column that also holds a guessed separator but using a different method. If both are the same it helps to confirm the real separator. If they are not the same, it helps to indicate a possible issue and helps us to decide which method is best for reading each CSV file.

This separator is specifically guessed using the most basic PHP method and functions. It includes fget and fgetcsv. These will mean nothing too anyone not trained in PHP, hence why these function names are not used in the columns title.

The important thing to know is that this method of establishing the separator is also a method of reading CSV files. This method may work with most files, but not all. This is why we have more than one method of reading CSV files built into the plugin as explained below.

Separator (pear)

Pear happens to be a technical term. The important thing to know is that pear is another method of reading CSV files. It makes use of a heavier package, more functions. More is explained above.

Rows

Displays the number of rows in each CSV file. I have never seen this value being wrong in any method of reading CSV files, it is a simple thing to do. So we only need one column to display the count.

Size

This column displays the size of our CSV files. It does not serve much purpose unless dealing with very large files; sizes that are rare. With the plugin being so new, it is important to monitor its performance under stress and large files cause stress with any plugin if the user is not careful. There is only so many safe guards we can or will build into the plugin to protect users from their own actions.

I’m making a mention of this because anyone using a large file and is not a developer. Can easily bring their site down for a few minutes, people often find this stressing. It is actually, not a big deal at all. During development I bring a single site down constantly, for a few minutes at a time, it has little or even no effect on traffic. It is important to focus on the job. Learn from mistakes and take steps to avoid making the same mistakes again.

We provide a powerful plugin that offers the ability to break tasks down. We know you want the job done fast, but we also know most servers won’t allow unlimited processing time. It is usually 30 seconds and there are plenty affiliate data files that will require 60 seconds processing during data import.

Files Age

This column is important for users planning to update their data. It shows us how old our file is. It allows us to quickly check if any of our CSV files have been updated i.e. affiliate networks can deliver files using FTP on a daily basis.

close

PHP 5.3 Only: the Files Age column will be empty for users on a server that still uses PHP 5.2 because this feature makes use of a new ability in 5.3. It is possible to write a function that works in 5.2 but everyone should be moving too 5.3 so it is low priority. Please request it if you must use PHP 5.2. We provide hosting with 5.3, free for buyers of the paid edition of CSV 2 POST.

Part One: Enter Job Name

CSV 2 POST allows users to create multiple projects, it is highly important that we have a personal way of remembering what each project was created for if we make many. If you only want to import one file on your blog, ever! Then just put anything in the box.

 Upload Directory

All CSV files are currently loaded into a folder named “wpcsvimportercontent” that will be in your wp-content folder. The wpcsvimportercontent folder is created when installing CSV 2 POST. The folder name is used by all of our plugins that work with CSV files

close

Request Upgrade: we are ready to upgrade the file up-loader so that users can enter or select different paths for their files destination. This is not a small upgrade as the plugins interface also needs to take more directories into consideration. We offer this ability in Easy CSV Importer so it will eventually be added too CSV 2 POST, then removed from ECI to make that plugin easier. If you need it added now, please comment below.

Part Two: Select Table Setup

Selecting “Existing Table” is considered an advanced feature. You really need to know the plugin well, especially if you plan to use the data to create posts. Leave the Select Table Setup on the default ‘New Table’.

 Upload Directory

The plugin allows us to import data too an existing table, but it is intended that the existing table is either one created by CSV 2 POST (with special project columns added) or one that is part of a post creation project, that uses multiple tables including a main table. This is all very advanced, it has great purpose but not for 95% of the plugins users.

Please ignore the Select Table Setup buttons if you need something simple.

close

Using “Existing Table” Option?: are you using the Existing Table option or would like to use it more but need more information and maybe more related tools? Please let us know by commenting below, so we know how much more development to put into this ability.

Part Three: Select CSV Files Table

Select your CSV file for importing data from. The paid edition allows us to select more than one file and merge the contents of all selected CSV files into one table. If your dealing with a single file or using the free edition. Only make one selection in the table and complete the form as explained below.

 CSV File Profile

We need to enter our CSV files profile before clicking submit. The plugin can detect the profile automatically, but can occasionally get it wrong due to a lack of standardization in CSV files. We prefer users to enter the information themselves. We must enter the following information:

  • Number of columns/fields in our CSV file (easier to count when opened in Microsoft Excel)
  • Select a separator, you can use the Test CSV File tool to help confirm this
  • Select a quote, you can use the Test CSV File tool to help confirm this
close

CSV File Not Working?: hidden in CSV 2 POST is the ability to quickly change how we read and import CSV files. With some quick changes of code I can adapt the plugin to use a whole different approach. If your 100% sure your CSV file is valid i.e. it works with other imports. It may simply be the case that CSV 2 POST needs to use another method for handling your file. Please send us a copy of your file for support.

Technical Information

A little hint on a key part of how CSV 2 POST operates. The plugin creates tables and adds special columns too them. The special columns are not used for data import, despite being added too the new tables when creating a data import job. The special columns are used for projects, mainly post creation. They allow us to track all sorts of things and are especially important in the paid edition. Every post creation project needs a “project table” which holds these special columns. That table is labelled the main table in a project. If you select two or more tables for a post creation project but none of the tables were originally created by CSV 2 POST. The plugin will detect this, then create another database table that only holds the special columns. This new table becomes the main table and is a sort of parent too all the other tables you selected. It is used to tie them all together, create a relationship and manage the projects data.

This area of CSV 2 POST is far more advanced than any other data importer plugins data import abilities.

As I write this (14th August 2012) the file up-loader is very basic compared to CSV importers we have created previously. If you require the ability to upload your CSV file too different directories we can add that, please comment below to make the request.

Default Upload Directory

When CSV 2 POST is installed it will create a folder named “wpcsvimportercontent”. The name does not match the plugin name but that is alright. We plan to share the folder with our other plugins that do different things with CSV files.

The wpcsvimportercontent folder can be found in your wp-content directory. It is that simple for now.

File Size Limit

My server offers a file upload size limit of 64MB, yours may be different, possibly even just 2MB. You can request an increase in the limit through your hosting provider or attempt to edit your WordPress installation. All of which should only be done following a fully detailed guide if your new to PHP. I’m not recommending this approach to anyone other than those studying PHP or developers.

I recommend using FTP if you are dealing with very large files.