ArticleImport ============= Plugin Name: Article Import Plugin URI: http://webous.com/products/article-import-plugin/ Description: Plugin to mass-import articles from zip file uploaded by the user. Author: Val Petruchek Version: 1.16 Author URI: http://webous.com/ README STRUCTURE ---------------- Introduction Requirements Installation Version History How To Use Article Import Available Override Codes Final Notice Introduction ------------ Article Import plugin allows you to upload zip archive containing blog records that will appear on your blog with certain delay (configurable at uploading). This way you can set up your blog to updates daily and you won't need to post your records everyday. Requirements ------------ You need WordPress ver 1.5 or higher installed and running. It's good if your php supports ZZIPlib functions, but plugin will still work if ZZIPlib is not supported. You need to have FTP/SFTP/SSH access to your server in order to upload plugin. Installation ------------ 1. Unzip artimport.zip to your local folder. 2. Upload 'artimport.php' to your WordPress 'plugins' folder (via ftp or sftp). 3. Log in to the WordPress Admin Panel and activate Plugin (Plugins Tab). Name of the plugin is 'Article Import'. 4. Open 'Write' Tab and choose 'Import Articles' submenu item. How To Use Article Import ------------------------- First, you should create zip archive containing blog records. Every file from archive should contain one record. You should number text files with number followed by hyphen (numbers are used for sorting). For example: 01-First record.txt 02-Second record.txt You can specify record title inside the file - this is helpful when your title contains special signs like ":" or "?" which can not be used in filenames. See the 'Available Override Codes' section below. Records will be imported into the database in the order their filenames are numbered. That's why we need these numbers - there is no such thing like 'natural file order' inside zip archive. Of course, your blog records should be not plain text but good html instead (nevermind .txt extension). You should add html tags for paragraphs, links and so on. Files must have same charset as your blog has. Default charset for latest WordPress now is UTF-8. Article Import plugin automatizes the process of posting articles only. When you have your zip archive ready for upload, login to your WordPress Admin Console and open 'Write' Tab and choose 'Import Articles' submenu item. Starting from version 1.11, you can point the plugin to the server folder with you text files. Files must be of the same format as described above. Do not forget about file order - the posts will be sorted by their filenames. Don't be afraid of pretty large input form. It's easy to fill! * Author - selectbox to choose author of the records you are going to import. * Title - check it if you want plugin to extract title from first line of the post. You can specify how many words to take from the first line (0 = take all of them) * Start Date - first day when articles will start appearing on your blog. It can be date in the past or in the future. Default is current date. * Post Time - time of the day when you want your records to appear on blog. You should choose start time and end time, post will be assigned a random time from chosen interval. You can also override time for particular post using time override code. * Post Frequency - this is interval (in days) between two neighbour records to appear on blog. So, if you want your blog to be updated weekly, choose "1 post every 7 days". If you want your blog to be updated twice per day, choose "2 posts per day". * Post Status - choose status of posts imported. To import posts as wordpress pages, choose "static". * Default Tags - enter default tags which will be used for imported posts which do not have any tags overriden. * Default Categories - choose categories where you want your records to go to by default. You can override categories for every single records. See the 'Available Override Codes' section below. * File - Browse your hard-drive to choose your zip file with articles which your prepared. Check samplearticles.zip that comes with this plugin. * Folder - enter server folder name to parse for files. It must be located in /wp-content/plugins/ folder Check every field and then hit 'Import Articles'. The plugin will unpack the zip file, sort the files by numbers and try to import every record. It will show message if any error happens or OK message. When done, plugin will output total amount of articles imported and link to manage them. Every added article can be edited through common wordpress interface. Now every article imported will appear on your blog when its time comes. Available Override Codes ------------------------ Override Code is special string placed in the beginning of article text file which allows you to override default post properties you filled in the form at previous stage and also some extra properties. {title:This will override the title} {categories:3} {date:2006-01-01} {time:04:08} {excerpt:Post Excerpt} {tags:tag1, second tag, webous} {name:post-name-aka-slug} {title:This will override the title} This may be useful if you need article title to have special symbols like '?' or ':". If your text file is named 05-bla-bla-bla.txt and contains this line in the top: {title:How to choose a web host?} then your article will have title "How to choose a web host?" when imported into wordpress database. {categories:3} This is useful if you need to place the article into another category instead of default categories. If you need to place article into several categories, separate category IDs with commas. On the 'Import Articles' you can click on 'Categories' link above list of categories to find out category IDs. {date:2006-01-01} Obviously, it's date of the record if you need to override it. If omitted, it will be calculated automatically using Start Date, Post Frequency and article Number. {time:04:08} You are right! This allows you to override time of every single article if you want your articles to look more random. {excerpt:Post Excerpt} This code allows you to specify post excerpt. This is the only way to specify excerpt using this plugin. {tags:tag1, second tag, webous} Comma separated list of tags for this particular post. {name:post-name-aka-slug} This code allows you to specify post name (Also called "slug" in WordPress). This is the only way to specify name using this plugin. Version History --------------- 1.16 :: November 15, 2007 - "Take title from first line bug" fixed - random time bug fixed (for posting frequency > 1 post per day) - byte-order mark bug fixed 1.15 :: October 24, 2007 - Tag support - WP2.3 compatibility 1.14 :: May 6, 2007 - Post frequency up to 10 posts per day (in previous version you could not have post frequency less than 1 post per day) - Natural order for sorting source files 1.13 :: April 16, 2007 - Bug fix for new method of storing static pages, implemented in WP2.1 1.12 :: October 1, 2006 - Extra override codes (excerpt, name) - Option to choose post status - Now plugin allows to import both posts and pages - Small interface improvement - Tested with WordPress 2.0.4 1.11 :: July 24, 2006 - Option to feed the plugin with files from zip or from server folder - Option to extract title from post contents (choose how many words to take) - Time Randomness feature - Tested with WordPress 2.0.3 1.1 :: January 21, 2005 - Single version for zip_ and mzip_ forks (function_exists() check) - Selectbox to choose author of the articles posted. - Tested with WordPress 2.0 - works fine October 22, 2005 - WordPress 1.5.2 is not doing addslashes in wp_insert_post() Very stupid behaviour, but i've added bugfix - calling to addslashes before wp_insert_post() for WordPress >= 1.5.2 Not sure if this started in WordPress 1.5.1, so if plugin shows MySQL error caused by quotes/slashes, change 1.5.2 to 1.5.1 in this line: if (version_compare($wp_version,"1.5.2","ge")) Summary 2005 - fork for zip & mzip versions Final Notice ------------ You can use this software on any wordpress blog you own; you can not put it on any website for download; email it to your friends or share it in any other way. You got it for your PERSONAL USE ONLY. No exceptions. All forms of reproduction are strictly prohibited. This software s distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.