BJC Computer Services
 
  HOME WordPress PHP Script... 
 

WordPress Article Import Scripts

 

Setup and Configuration

Download Article Submission Test Forms

 

Description: The following user options are available to control import of article posts from iSnare Publisher and Article Marketer into your WordPress Blog MySQL Database.

This script must be installed on a WordPress version that is installed on your own web server. The script can't be installed for a blog that is hosted on the WordPress home site.

To DISABLE any script option - Set value = false;  To ENABLE - Set value = true;


User Options

Database access parameters are retrieved from the WordPress 'wp-config.php' file in the WordPress installation root file directory. You should first verify the file exists, and that it contains accurate database access instructions before proceeding. This script will not execute without the WordPress wp-config.php file.


Option - Script Test Mode

This script can restrict incoming access to Article Marketer or iSnare servers. If Script Test Mode is Disabled, Script execution will halt if an access attempt is made from any other host. The option to Enable Script Test Mode is provided to allow testing by the web site owner. If you need to test your script, then you must Enable this option.

To implement the security restriction, disable this option. When Script Test Mode is Enabled, all script import messages will be displayed in the browser window during the import process.

NOTE: If you receive an error Invalid Host - Access Denied during access or testing, change this value to true  in order to bypass originating host validation.

  • Enable:   $script_test_mode = true;
  • Disable:  $script_test_mode = false; 

Option - View Test Mode Progress on Screen

This option defines how script activity messages are displayed when using test mode. When this option is Enabled, all script activity is displayed on-screen. When Disabled, the screen output is suppressed. The messages are identical to messages stored in the logfile, if the logfile is enabled.

  • Enable:      $view_test_mode_progress_on_screen = true;
  • Disable:     $view_test_mode_progress_on_screen = false;

Option - Log Script Activity

This option allows script activity to be captured to a log file. This information is useful for monitoring incoming article receipt and for trouble isolation.  Enable this option to record the log file.  Disable this option if a log file is not required.

  • Enable:   $log_script_activity = true;
  • Disable:  $log_script_activity = false;

Option - Logfile

This configuration option provides the directory and filename to be used for the script log file.  This must be a valid directory and file write access must be granted.  If the $log_script_activity option is disabled (false), the $logfile option is ignored.

Note:

If you receive an error when accessing your script - Warning: fopen(cgi-bin/article_log.txt) [function.fopen]: failed to open stream: it means the logfile could not be written. Check the $logfile option to ensure the /cgi-bin/ directory is valid and that write access is enabled in that directory.

  • $logfile = getcwd()."/cgi-bin/article-log.txt";

Option - Import Text or HTML Article   [  iSnare Only  ]

This option determines if the TEXT or HTML data field will be imported from iSnare to the article dashboard article body field. The directory owner must select which format will be imported.

  • TEXT:    $import_text_or_html_article = "text";
  • HTML:    $import_text_or_html_article = "html";

NOTE:  Article Marketer delivers TEXT or HTML format based on the option chosen when signing up for article delivery. Format changes must be resubmitted to Article Marketer.


Option - Import Text or HTML Bio  [  iSnare Only  ]

This option determines if the TEXT or HTML data field will be imported from iSnare to the article dashboard article resource field. The directory owner must select which format will be imported.

  • TEXT:    $import_text_or_html_bio = "text";
  • HTML:    $import_text_or_html_bio = "html";

NOTE:  Article Marketer delivers TEXT or HTML format based on the option chosen when signing up for article delivery. Format changes must be resubmitted to Article Marketer.


Disclaimer: Test this script thoroughly under your unique server configuration before using in a live traffic environment. For questions, assistance, or suggestions: Email: support@bjc-computer-services.com

Important:  For script security, the following entry should be added to your robots.txt file in order to exclude the import script file from search engine indexing.

     User-agent: *
     Disallow: /YourScriptName.php


 

Return to the WordPress Content Article Scripts page...