Event types are not really seen by users right now, not all in one place at least. The “Events” phrase is used to indicate an automatic processing, part of the plugins scheduled processing ability. Events are triggered by visits to the blog and there can be one every 1 minute.
During an event WordPress CSV Importer can automatically import data, updating existing data, create new posts and even update existing posts. We also plan to make it do a lot other things within these events and I decided the functions need to be easy to hack. If a developer wants to add another event to the list, it has to be easy and I think I’ve made a good start on that.
Event Types List
This page is to aid hacking of PHP code. The event types below are shown as their array node names in the $wtgcsv_schedule_array…
dataimport
dataupdate
postcreation
postupdate
twittersend
twitterupdate
twitterget
List updated 11th July 2012
Event Type Descriptions
If you don’t see an event you require in the list, please comment below to request it and show support for this feature. I’ve added Twitter examples (not active yet but will be eventually) just to help explain what we can do with this. These descriptions and this page is not intended as a general user support page. It is for developers customizing the plugin, however it can shed some light on
Import data for the first time from a new CSV file, one that has never been imported from before. This does not include a new version/copy of an existing file. A changed version of a CSV file is imported in data update events. As I write this, I’m not 100% sure how many rows will be imported per event but I will probably set it to about 10 rows as a default and allow the user to increase it.
This event will import rows from a CSV file that has been used already, but updated. So the event must update existing database records in your Data Import Job table, with new data. The event will probably update 10 records per event.
This event will create a single post. My approach will ensure there is no over processing. By focusing on a single post, we can instead do a little more with it. We have a few advanced ideas that will add to the processing of a single post but will be worth it. Creating many posts at once could cause strain on a server.
This event will check for any Data Import Job records that have been updated after being used to create a post. If any updated records exist but have not been applied to their posts yet. This event will proceed and update a single post. There will be manual features added to WordPress CSV Importer that allow users to update all posts with all available records. Automation does one per event.
For now this is just an example but it is a planned feature. This feature will offer the ability to tweet newly created posts but do it in a controlled manner and with conditions i.e. tweet posts with specific values in content or custom fields or in the original data. I want to offer the ability to create a template for tweet text so users can use any data, not just values from the post. That way we can tweet content in the post, but not just use the post title in the tweet. We can also allow integration of Twitter plugins to do this.
Tweet when a post is updated. Again, the idea is that there would be the ability to setup conditions and maybe use a different template so that the update tweet is very different but still about the same post. This feature is not yet in the plugin. This text was updated 11th July 2012.
This example idea takes this a little further for events. This would retrieve replies to tweets made from the users blog, for auto-blogged posts. The reply tweets would maybe be stored a meta data value and we could display the reply along with original tweet in a widget when viewing the applicable post. This would be an opportunity to add dynamic content to the blog. The reason this would existing in events is to make regular, but not constant or long checks for replies. The more posts, the longer it would take to find a reply if any. I still think the feature would be worth it, especially if we use Tweet replies to create comments for a post. This is all planned and some of it in development already.