Click here to set up your options Version: 3.2.23 Author: Dr. Noel Swanson Author URI: http://www.uniquearticlewizard.com/ */ /* Copyright 2007 Noel Swanson http://allegrettopublishing.com/support/index.php?act=tickets&code=open This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ define ('UAW_URL', 'http://www.uniquearticlewizard.com'); define ("UAW_UPDATE_URL", "http://www.uniquearticlewizard.com/plugins/wordpress"); if (!defined("UAW_PLUGIN_DIR")) { define ("UAW_PLUGIN_DIR", "unique_articles"); // Was not defined in shared.php because it's missing 'plugin_basename' // shared.php gets the server-defined plugin_basename(__FILE__) } if (!function_exists('splice_files')) { function splice_files() { $filesToSplice = array(dirname(__FILE__).'/unique_articles.php', dirname(__FILE__).'/add_article.php', dirname(__FILE__).'/article_mods.php'); foreach ($filesToSplice as $theFile) { $sharedFile = file_get_contents(UAW_UPDATE_URL . "/shared.txt"); $sharedFile = preg_replace("/\\\/", "\\\\\\\\", $sharedFile); $fhandle = fopen($theFile, "r"); # What if file isn't readable? $content = fread($fhandle, filesize($theFile)); fclose($fhandle); $content = preg_replace("/[\t ]*?\/\* remove \*\/.*?\n/", "", $content); # remove these commented lines $content = preg_replace("/include_once\(\"shared.php\"\);/", " if(!defined('UAW_DIR')){ ?>$sharedFileInstallation Error: The UAW Control Panel needs a PHP function called CURL to work. Please contact your hosting provider and ask them to install it for you. (It is not a big request for you to make). If you have any questions about this, please contact us."; uawlog("die: !function_exists(\"curl_init\")"); uawError(99, "curl_init function does not exist"); die(); } if (!function_exists('uawPingOptimizer') && class_exists('uawPingOptimizer')) { $uawPingOptimizer = new uawPingOptimizer(); } if (!function_exists('uaw_add_control_panel')) { function uaw_add_control_panel() { preg_match("#(.*/)".UAW_PLUGIN_DIR."/[^/]*\.php#", __FILE__, $matches); $cpanel_file = $matches[1].autoblogDir().'/controls.php'; //to make sure it hasn't been deleted! if (!is_plugin_active(autoblogDir().'/uaw_autoblogger.php') || get_option('uaw_plugin_active_0') != 'true' || !file_exists($cpanel_file)) //only add if not using other control panel; control panel is uid 0 add_options_page('Unique Article Wizard Control Panel', 'UAW-Control', 'moderate_comments', __FILE__, 'uaw_control_panel'); else //else add the display function to the custom control panel hook add_action('uaw_cpanel_display','uaw_control_panel'); } } if (!function_exists("uaw_get_settings_and_update")) { function uaw_get_settings_and_update($checkfiles) { global $uaw_config_file, $uawsettings, $uawerror, $not_writable, $curl_error; $uawconfig = file($uaw_config_file); foreach ($uawconfig as $uawvalue) { $uawvalue = trim($uawvalue); $uawpos = strpos($uawvalue, "=>"); $uawkey = substr($uawvalue, 0, $uawpos); $uawsettings[$uawkey] = substr($uawvalue, $uawpos +2); } /*$ver_art = UAW_DIR . '/version_art.txt'; if (!file_exists($ver_art)) { touch ($ver_art); // create the version_art.txt if it's absent }*/ $mods = UAW_DIR . '/article_mods.php'; $uniq = UAW_DIR . '/unique_articles.php'; $add = UAW_DIR . '/add_article.php'; touch ($uaw_config_file); // create the config if it's absent $writable_files = array ( $uaw_config_file, UAW_VERSION, $ver_art, $mods, $uniq, $add ); if ((($uawsettings['audio'] == 1 and ($_POST == Array () || ($_POST['audio'] != "" and $_POST != Array ()))) or $_POST['audio'] == 1) and $not_writable == '') { $swf = UAW_DIR . '/flashaudioplayer.swf'; $swfjs = UAW_DIR . '/swfobject.js'; if ($checkfiles === true) { if (!file_exists($swfjs) and is_writable(UAW_DIR)) { $mods = @fetch_file('http://www.uniquearticlewizard.com/extras/swfobject.js'); if ((strpos($mods, "Oops, sorry, this page seems to be missin") > 250 or strpos($mods, "Oops, sorry, this page seems to be missin") === false) and strlen($mods) > 100 and $curl_error == "") file_put_contents($swfjs, $mods); } else if (!file_exists($swfjs)) $writable_files[] = $swfjs; if (!file_exists($swf) and is_writable(UAW_DIR)) { $mods = fetch_binary_file('http://www.uniquearticlewizard.com/extras/flashaudioplayer.swf'); if ((strpos($mods, "Oops, sorry, this page seems to be missin") > 250 or strpos($mods, "Oops, sorry, this page seems to be missin") === false) and strlen($mods) > 100 and $curl_error == "") file_put_contents($swf, $mods); } else if (!file_exists($swf)) $writable_files[] = $swf; } } $writable_files = array_unique($writable_files); if ($not_writable == '' and $checkfiles === true) { foreach ($writable_files as $v) { if (!is_writable($v) && !empty($v)) { $not_writable .= "$v
"; } } if (!file_exists(UAW_VERSION)) { file_put_contents(UAW_VERSION, 'Version 0.0.0'); $overrideUpdate = true; } //make sure you have the latest version: $mods = file_get_contents(UAW_DIR . '/add_article.php'); if (strpos($mods, "Plugin URI") === false) { $mods = @fetch_file(UAW_UPDATE_URL . '/add_art.txt'); if ((strpos($mods, "Oops, sorry, this page seems to be missin") > 250 or strpos($mods, "Oops, sorry, this page seems to be missin") === false) and strlen($mods) > 100 and $curl_error == "") if (!@ file_put_contents(UAW_DIR . '/add_article.php', $mods)) $uawerror .= "
WARNING: UNABLE TO UPDATE add_article.php. Please change the permissions to 666 or download and install the new version. This is needed even though the version numbers appear to be the same.
"; } // Check the version.txt and see if it's old enough for us to check for a new version if (function_exists('get_hours_since_file_updated')) { $hoursPassed = get_hours_since_file_updated(UAW_VERSION); } if ($hoursPassed >= UAW_UPDATE_CHECK_IN_HOURS) { $upgradeThisGroup = check_upgrade_group(); } else { $upgradeThisGroup = false; } if ( ($hoursPassed >= UAW_UPDATE_CHECK_IN_HOURS && $upgradeThisGroup) || $overrideUpdate) { // Check for an update every 3 hours touch(UAW_VERSION); // modify the timestamp so we only check for an update again after 3 more hours. $our_version = trim(file_get_contents(UAW_VERSION)); //these two files are numbers. $mods_version = @ fetch_file(UAW_UPDATE_URL . "/version.txt"); if ($our_version != $mods_version and strlen($mods_version) > 5 and $curl_error == "") { //updates with latest version @ file_put_contents(UAW_VERSION, $mods_version); $mods = @ fetch_file(UAW_UPDATE_URL . '/mods.txt'); if ((strpos($mods, "Oops, sorry, this page seems to be missin") > 250 or strpos($mods, "Oops, sorry, this page seems to be missin") === false) and strlen($mods) > 100 and $curl_error == "") @ file_put_contents(UAW_DIR . '/article_mods.php', $mods); $mods = @ fetch_file(UAW_UPDATE_URL . '/add_art.txt'); if ((strpos($mods, "Oops, sorry, this page seems to be missin") > 250 or strpos($mods, "Oops, sorry, this page seems to be missin") === false) and strlen($mods) > 100 and $curl_error == "") @ file_put_contents(UAW_DIR . '/add_article.php', $mods); // We can't update shared.txt here because it has already been included in this file which calls the update } else if ($not_writable != "") { $uawerror .= "
WARNING: UNABLE TO WRITE TO THESE FILES, PLEASE SET PERMISSIONS for these files to 666 or their parent directory to 777:
$not_writable
"; } } } return $uawsettings; } } #============================= # Get all the URL's and paths #============================= if (!function_exists("uaw_get_urls")) { function uaw_get_urls($uawsettings) { global $wpdb; $httpUrl = "http://"; if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") { $httpUrl = "https://"; } $uawsettings['url'] = $httpUrl . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; preg_match("#(.*/)".UAW_PLUGIN_DIR."/[^/]*\.php#", __FILE__, $matches); $cpanel_file = $matches[1].autoblogDir().'/controls.php'; //to make sure it hasn't been deleted! if(get_option('uaw_plugin_active_0')!='true' || !file_exists($cpanel_file)){ $uawsettings['plugin_url'] = $uawsettings['url'] . "?page=" . UAW_PLUGIN_DIR . "/unique_articles.php"; $uawsettings['extra_vars'] = ""; } else { $uawsettings['plugin_url'] = $uawsettings['url'] . "?page=".autoblogDir()."/uaw_autoblogger.php"; $uawsettings['extra_vars'] = ""; } if (strpos($uawsettings['url'], "?") !== false) $uawsettings['url'] = substr($uawsettings['url'], 0, strpos($uawsettings['url'], "?")); $uawsettings['base_url'] = substr($uawsettings['url'], 0, strrpos($uawsettings['url'], "/")); $uawsettings['admin_url'] = $uawsettings['base_url']; $uawsettings['blog_url'] = get_bloginfo( 'wpurl' ); $uawsettings['site_url'] = get_bloginfo( 'url' ); $uawsettings['base_url'] = $uawsettings['blog_url'] . "/wp-content/plugins/" . UAW_PLUGIN_DIR; $uawsettings['add_articles'] = $uawsettings['base_url'] . "/add_article.php"; return $uawsettings; } } #============================= # Run Control Panel #============================= if (!function_exists("uaw_control_panel")) { function uaw_control_panel() { global $uawoptions, $uawprefix, $uawjscript, $uawsettings, $uawcatlist, $uawcats, $uawlevel, $uaw_js_file, $uaw_config_file, $uawerror, $uawwp_version, $wud, $not_writable, $curl_error,$uawPingOptimizer, $blog_id; if ($blog_id == '1') { $config_file = 'config.php'; } else { $config_file = 'config_'.$blog_id.'.php'; } $uawsettings = uaw_load_settings(true); if (!empty($uawsettings['branding'])) $afflink = UAW_URL."/amember/go.php?r=".$uawsettings['branding']."&i=l0"; else $afflink = UAW_URL.'/amember/signup.php?price_group=-3'; #================================ # create security token once only #================================ if (empty ($uawsettings['token'])) { $uawsettings['token'] = md5(uniqid(rand(), true)); uaw_update_settings($uawsettings); } $uawcode = substr($uawsettings['token'], 0, 8); #=============================================== # Get update notification #=============================================== /* $ver_art = UAW_DIR . '/version_art.txt'; if (!file_exists($ver_art)) { touch ($ver_art); // create the version_art.txt if it's absent } */ $uawversion = trim(file_get_contents(UAW_VERSION)); $uaw_config_file = UAW_DIR . '/' . $config_file; touch ($uaw_config_file); // create the config if it's absent $mods = UAW_DIR . '/article_mods.php'; $uniq = UAW_DIR . '/unique_articles.php'; $add = UAW_DIR . '/add_article.php'; @mkdir(ABSPATH . 'wp-content/uploads'); @chmod(ABSPATH . 'wp-content/uploads', 0755); $wud = wp_upload_dir(); $writable_files = array ( $uaw_config_file, UAW_VERSION, $ver_art, $mods, $uniq, $add ); if ((($uawsettings['audio'] == 1 and ($_POST == Array () || ($_POST['audio'] != "" and $_POST != Array ()))) or $_POST['audio'] == 1) and $not_writable == '' ) { $swf = UAW_DIR . '/flashaudioplayer.swf'; $swfjs = UAW_DIR . '/swfobject.js'; if (!file_exists($swfjs) and is_writable('')) { $mods = @ fetch_file('http://www.uniquearticlewizard.com/extras/swfobject.js'); if ((strpos($mods, "Oops, sorry, this page seems to be missin") > 250 or strpos($mods, "Oops, sorry, this page seems to be missin") === false) and strlen($mods) > 100 and $curl_error == "") file_put_contents($swfjs, $mods); } else if (!file_exists($swfjs)) { $writable_files[] = $swfjs; } if (!file_exists($swf) and is_writable('')) { $mods = fetch_binary_file('http://www.uniquearticlewizard.com/extras/flashaudioplayer.swf'); if ((strpos($mods, "Oops, sorry, this page seems to be missin") > 250 or strpos($mods, "Oops, sorry, this page seems to be missin") === false) and strlen($mods) > 100 and $curl_error == "") file_put_contents($swf, $mods); } else if (!file_exists($swf)) { $writable_files[] = $swf; } } if ($uawsettings['graphics'] == 1) { $writable_files[] = $wud['baseurl']; } $writable_files = array_unique($writable_files); if ($not_writable == '') { foreach ($writable_files as $v) { if (!is_writable($v)) { if ($v != $wud['baseurl']) $not_writable .= "$v
"; else $not_writable .= "$v (set directory to 777)
"; } } } // Check the version.txt and see if it's old enough for us to check for a new version if (function_exists('get_hours_since_file_updated')) { $hoursPassed = get_hours_since_file_updated(UAW_VERSION); } if ($not_writable != '') $not_writable = "
But, before you do, you will need to change the permissions for these files to 666:
" . $not_writable; $upgradeThisGroup = check_upgrade_group(); $uawn = trim(uaw_make_post(UAW_UPDATE_URL . '/version.txt', "")); if ($uawn != $uawversion && $curl_error == "" && $hoursPassed >= UAW_UPDATE_CHECK_IN_HOURS && $upgradeThisGroup) { $uawerror .= "
There is a new upgrade available: $uawn You can download it from here
Or you can trigger the automatic update by requesting a test article and then hitting the Update button one more time. $not_writable
"; } $uawcats = uaw_get_cats(); if (empty ($uawcats)) $uawcats = array (); #============================= # Organize category hierarchy #============================= foreach ($uawcats as $uawkey => $uawvalue) { $uawnewkey = $uawkey; if ($uawcats[$uawnewkey]['category_parent'] != 0) { while ($uawcats[$uawnewkey]['category_parent'] != 0) { $uawoldkey = $uawnewkey; $uawnewkey = $uawcats[$uawoldkey]['category_parent']; $uawcats[$uawnewkey]['child'][$uawcats[$uawoldkey]['cat_ID']] = $uawcats[$uawoldkey]; $uawunset[] = $uawoldkey; } } } if (!empty ($uawunset)) { $uawunset = array_unique($uawunset); foreach ($uawunset as $uawkey => $uawvalue) { $uawcats[$uawvalue] = ""; } } $uawoptions = ""; $uawlevel = 0; $uawjscript = ""; $uawprefix = "    "; #============================================ # Process delete link from email notification #============================================ if (isset ($_GET['delete']) && isset ($_GET['c'])) { $uawresult = query_posts('p=' . $_GET['delete']); if ($_GET['c'] == $uawcode) { $uawquery = wp_delete_post($_GET['delete']); if ($uawquery != 0) $uawerror .= "
The article '" . $uawresult[0]->post_title . "' has been deleted.
"; else { if (empty ($uawresult)) $uawerror .= "
Looks like that article had already been deleted.
Please check manually in your admin panel
"; else $uawerror .= "
Sorry, there was a problem deleting this article. Please review it manually in your admin panel
"; } } else $uawerror .= "
Sorry, invalid authentication code. Please review it manually in your admin panel
"; } #============================================ # Process accept link from email notification #============================================ if (isset ($_GET['accept']) && isset ($_GET['c'])) { $uawresult = query_posts('p=' . $_GET['accept']); if ($_GET['c'] == $uawcode) { $uawarticle_id = wp_update_post(array ( 'ID' => $_GET['accept'], 'post_modified_date' => date("Y-m-d H:i:s"), 'post_modified_date_gmt' => gmdate("Y-m-d H:i:s"), 'post_status' => "publish" )); $uawresult = query_posts('p=' . $_GET['accept']); if ($uawresult[0]->post_status == "publish") $uawerror .= "
The article '" . $uawresult[0]->post_title . "' has been approved and published.
"; else { if (empty ($uawresult)) $uawerror .= "
Sorry, cannot find that article. Looks like it might have already been deleted.
Please check manually in your admin panel
"; else $uawerror .= "
Sorry, there was a problem approving this article. Please review it manually in your admin panel
"; } } else $uawerror .= "
Sorry, invalid authentication code. Please review it manually in your admin panel
"; } #============================================ # Process Update Button #============================================ if (isset ($_POST['B1']) or isset ($_POST['test'])) { $uawPingOptimizer -> uawUpdatePing(); //print_r($uawPingOptimizer -> uawGetLogData()); $uawtoken = $uawsettings['token']; $uawdir_id = $uawsettings['dir_id']; $uawtype = $uawsettings['type']; unset ($uawsettings); // so as to remove all the categories $uawsettings['token'] = $uawtoken; $uawsettings['dir_id'] = $uawdir_id; $uawsettings['type'] = $uawtype; foreach ($_POST as $uawkey => $uawvalue) { $uawconfig .= $uawkey . "=>" . stripslashes($uawvalue) . "\n"; $uawsettings[$uawkey] = stripslashes($uawvalue); } $uawsettings = uaw_get_urls($uawsettings); uaw_update_settings($uawsettings); uaw_get_settings_and_update(false); $uawcatlist = ""; uaw_get_child($uawcats, $uawsettings, 0); $uawdir_id = $uawsettings['dir_id']; uaw_update_settings($uawsettings); $uawcatstring = ""; if (!empty ($uawcatlist)) { foreach ($uawcatlist as $uawkey => $uawvalue) { $uawcatstring .= "&cat[]=" . rawurlencode($uawvalue); } } $uawdomain = str_replace("http://", "", $uawsettings['base_url']); $uawdomain = str_replace("www.", "", $uawdomain); $uawdomain = substr($uawdomain, 0, strrpos($uawdomain, "/")); $uawpoststring = "email=" . rawurlencode($uawsettings['email']) . "&f_name=" . rawurlencode($uawsettings['f_name']) . "&l_name=" . rawurlencode($uawsettings['l_name']) . "&url=" . rawurlencode($uawsettings['add_articles']) . "&link=" . rawurlencode($uawsettings['link']) . "&max_arts=" . rawurlencode($uawsettings['max_arts']) . "&uaw_username=" . rawurlencode($uawsettings['uaw_username']) . "&enable=" . rawurlencode($uawsettings['enable']) . "$uawcatstring&token=" . rawurlencode($uawsettings['token']) . "&type=" . rawurlencode($uawsettings['type']) . "&version=" . rawurlencode($uawversion) . "&dir_id=" . rawurlencode($uawsettings['dir_id']) . "&uniq_email=$uawuniq_email&domain=" . rawurlencode($uawdomain) . "&website_name=" . rawurlencode($uawsettings['website_name']) . "&audio=" . rawurlencode($uawsettings['audio']) . "&video=" . rawurlencode($uawsettings['video']) . "&images=" . rawurlencode($uawsettings['graphics']) . "&publish=".rawurlencode($uawsettings['publish'] ) . "&dir_name=" . rawurlencode($uawsettings['blog_url']); $uawresult = uaw_make_post(UAW_URL.'/affiliates/optin.php', $uawpoststring); $uawpos = strpos($uawresult, ""); $uawerror1 = trim(substr($uawresult, $uawpos +7, -10)); if ($uawerror1 != "") { $uawerror .= "
$uawerror1
"; } else { $uawerror .= "
Your Preferences Have Been Updated
"; } $uawsettings['dir_id'] = substr($uawresult, 8, strpos($uawresult, "") - 8); $branding = substr($uawresult, strpos($uawresult, "")+8, strpos($uawresult, "") - strpos($uawresult, "")-8); if ($branding !='')$uawsettings['branding'] = $branding ; uaw_update_settings($uawsettings); } else uaw_get_child($uawcats, $uawsettings, 0); #============================================ # Request Test Article #============================================ if (isset ($_POST['test']) and $uawsettings['password'] == $_POST['password']) { $uawpoststring = "email=" . rawurlencode($uawsettings['email']) . "&f_name=" . rawurlencode($uawsettings['f_name']) . "&l_name=" . rawurlencode($uawsettings['l_name']) . "&url=" . rawurlencode($uawsettings['add_articles']) . "&link=" . rawurlencode($uawsettings['link']) . "&max_arts=" . rawurlencode($uawsettings['max_arts']) . "&uaw_username=" . rawurlencode($uawsettings['uaw_username']) . "&enable=" . rawurlencode($uawsettings['enable']) . "$uawcatstring&token=" . rawurlencode($uawsettings['token']) . "&type=" . rawurlencode($uawsettings['type']) . "&version=" . rawurlencode($uawversion) . "&dir_id=" . rawurlencode($uawsettings['dir_id']) . "&website_name=" . rawurlencode($uawsettings['website_name']) . "&audio=" . rawurlencode($uawsettings['audio']) . "&video=" . rawurlencode($uawsettings['video']) . "&images=" . rawurlencode($uawsettings['graphics']) . "&domain=" . rawurlencode($uawdomain) . "&dir_name=" . rawurlencode($uawsettings['blog_url']); // $uawpoststring.="&debug=1"; // use this line for development debugging $uawresult = uaw_make_post(UAW_URL.'/affiliates/runtest.php', $uawpoststring . "&testdir=" . $uawsettings['dir_id']); uawlog ("RESULT: $uawresult"); if ($uawresult == "Success") { if ($uawsettings['publish'] != 1) $uawerror .= "
A test article has been submitted. Please check your Wordpress admin panel to see it.
"; else $uawerror .= "
A test article has been submitted. Please check your site to see it.
"; if ($uawsettings['enable'] != 1) $uawerror .= "
PLEASE NOTE: You have not checked the box to receive articles. Until you do so, you will not receive any articles.
"; } elseif ($uawresult == "") if ($curl_error != "") $uawerror .= "
Sorry, we ran into a problem getting the test articles. This is the CURL error we received:
\"$curl_error\"
You will probably need to show this error to your hosting company to see if they can help you troubleshoot it.
"; else { $uawerror .= "
Sorry, request for test article produced a blank response. This means one of two things:
a) the request for the test article timed out. Please try it again in a few minutes and see if it goes through. Or,
b) the script that receives the articles is producing a blank response. You can check it by visiting that script in your browser. You should see some words coming up about not having permission to use the script. If you get just a blank page, try re-installing the plugin file add_article.php.
"; } else $uawerror .= "
$uawresult
"; } #============================================ # Display Page #============================================ $wud = wp_upload_dir(); if ($uawsettings['graphics'] && $wud['error'] != "") $uawerror .= "
" . $wud['error'] . " This is needed so that you can receive images with your articles.
"; $uawjscript = " "; $uawbody = "
Get help | Join the Wizard Today
Unique Article Wizard Control Panel
$uawversion

$uawerror
".$uawsettings['extra_vars']." " . $uawjscript . " */ if ($uawwp_version >= 2.3) { $uawbody .= "
Enter your preferences below, choose the categories for which you want to receive articles, and press the Update button. To test it is all working, just click the \"Update & Test\" button and you will immediately receive a test submission. NOTE: when you press the \"Update & Test\" button your preferences WILL be updated. "Reset" restores your settings to what they were when you completed your last update - this is mainly used if you get mixed up changing your category selections. For further help, just hover over any of the question marks or check the plugin FAQ
Check this Box to Start Receiving Unique Articles
Your Email (Used only for important announcements, eg security or upgrades - no spam, no sales pitches.)
First Name
Last Name
Maximum Articles Per Day? (?)
If you don't want to be overwhelmed with too many article submissions each day, you can enter a number here to limit how many you will receive. Leave blank if you want no limit.
Automatically Publish Articles?
(leave unchecked to have them posted as Pending Review) (?)
Normally articles will be posted as 'Pending Review', which means that you will need to manually approve each article before it will be published and visible to the public.

Approvals are done in the same way as for any other article submission, ie. through your site's admin panel. However we also offer the opportunity to do approvals by email notification - see below.

If you are happy with the articles you are receiving, and don't want to manually approve them all, you can check this box and all UAW articles will be automatically approved (you will still have to manually approve other article submissions you might receive).

If you combine this with the email notifications, you will have a quick and easy way to delete the odd article that is not up to your standards.
(?)
This will change all the links in the article so that they open in a new window.
Prefix for Div Class
(default is blank) (?)
To allow you to customize the look for articles that are submitted, the Author's Name, and the Resource Boxes are enclosed in <div> tags. The class name for these tags is, by default, uawlinks, uawbyline, uawabout and uawresource. To reduce the footprint even further, you have the option of specifying a different prefix for these classes - eg you might choose 'cats' in which case the div class names would be catslinks, catsbyline, catsabout and catsresource. You can use any alphabetical string of characters you choose for this.

If you are not sure what all this means, just leave this as it is.
Assign Keywords as Tags? (?)
If you check this, articles will be assigned tags with the same names as the keywords supplied with the article, e.g. articles submitted with the keywords \"poodles,dogs,pets,home,family\" will be given all those tags. If you uncheck this box then articles will be tagged only with the category name.
(?)
This is a unique feature of articles submitted by the Wizard. A special link is added to the end of the resource box. This link takes people to a unique version of the same article. Which means that, instead of duplicating the article on your site, they can get their own unique version. This benefits, you, them, and the author. For this reason we encourage you to enable this option, whether or not you also sign up as an affiliate.

Note that the unique article they get will automatically include a line above the resource box which says
\"Article kindly provided by "; if (!empty ($uawsettings['website_name'])) $uawbody .= htmlspecialchars($uawsettings['website_name'], ENT_QUOTES); else $uawbody .= $uawsettings['blog_url']; $uawbody .= "\"
with a live link back to your article directory. (If no link is displayed here, it is because you have not entered your Website Name into this form)

But there is another cool twist! This link can also earn you money! Simply sign up for our free affiliate program and you will earn 20% recurring commission for every person who signs up for UAW membership through any one of these links. You need do no active promotion - you simply earn money by displaying the article. And you earn money when someone pulls off a unique version of the article and displays that on their site.

Plus the affiliate program has a second tier, on which you earn 5% when your first tier members recruit more members.

Everybody wins with the Wizard!
(?)
You will get your UAW username when you sign up as an affiliate or full member of the Unique Article Wizard. You can do so by clicking on this link. Once you have done so, enter your username here so that you can earn commissions from displayed articles. Note that the special link will contain your directory id, not your membership id.

You will also then be able to brand this plugin with your affiliate id so that, when you give it away to others, they will sign up to the Wizard using your affiliate link.
Your Website Name: (?)
Enter your site's name or title (not the URL). We already have the URL. This is needed so that we can credit your site when people click on the link to get their own unique version of the article. It will appear as a line above the resource box which says
"Article kindly provided by "; if (!empty ($uawsettings['website_name'])) $uawbody .= htmlspecialchars($uawsettings['website_name'], ENT_QUOTES); else $uawbody .= $uawsettings['blog_url']; $uawbody .= ""
with a live link back to your article directory. (If no link is displayed here, it is because you have not entered your Website Name into this form)
Email Notification Address (leave blank for no email) (?)
If you check this, you will receive an email for each article that is submitted to your site. This email will contain:
  • Three links: 'approve', 'edit', or 'delete' that allow you to manage the article without having to log in to your site's admin panel
  • The Article Title
  • The Category to which it has been posted
  • The real author's name (not the penname seen by the public)
  • The body of the article
  • The resource box
  • The keywords as provided by the author
If you receive small numbers of articles this may be a lot less work than having to go into your site each day to see if there are new articles that need approval.

Another option is to use this to delete articles that are automatically approved (see option above). Again, if you find that you approve most articles, it may be easier to just delete the ones you don't like, rather than approve all the ones you do.
Email Subject Line (helps with filtering your emails) (?)
This is the subject line of the email notification you will receive for every article sent by the Wizard. If you have turned off Email Notification then this field has no effect
Exclude These Keywords (Comma separated. No articles with these keywords will be accepted) (?)
Any article received will be checked against this list to ensure it is acceptable to you. E.g. if you don't want any 'poker' articles, put 'poker' in this list. This applies globally to all articles received.
MULTI MEDIA SETTINGS These settings allow you to display video, images, and audio in your posts. NOTE: If you receive media you MUST keep the plugin activated in order for the media to be displayed. You can, of course, stop receiving articles just by un-checking the box at the top.
Enable Video? (?)
If you check this, articles with embedded video tags will have their video displayed.

If it is not checked, then the video won't be displayed. Also, if it is not checked then, from the time you uncheck this, until you check it again, articles that are received with embedded video tags will have the tags stripped out. Articles that you have ALREADY received will NOT have their tags stripped out (but they won't be displayed).

Videos are NOT hosted on your site, so displaying them will NOT use up any of your bandwidth.
(?)
Videos will be resized to the width, in pixels, you specify. The height will be automatically set to preserve aspect ratio.
0 ? htmlspecialchars($uawsettings['vidwidth'], ENT_QUOTES) : '320') . "' size=\"8\"/>px
Font Color for Caption Text (use valid css/HTML color terms) (?)
Videos will have a caption displayed below them. This setting sets the text color for the caption. Use standard terms such as 'black', 'red', 'blue', or hex settings such as '#8080CD'
Font Size for Caption Text (use valid css/HTML fontsize terms, eg 0.8em, 8pt, 10px) (?)
Videos will have a caption displayed below them. This setting sets the text fontsize for the caption. Use standard terms that would be valid in any css style statement. DO include the units, not just a number.
Video position (?)
Videos will be displayed either on the left, with text wrapped around the right, on the right, with text wrapped around the left, for centered, with no text on either side.
Enable Audio? (?)
If you check this, articles with embedded audio tags will have an mp3 audio player displayed.

If it is not checked, then the audio won't be displayed. Also, if it is not checked then, from the time you uncheck this, until you check it again, articles that are received with embedded audio tags will have the tags stripped out. Articles that you have ALREADY received will NOT have their tags stripped out (but they won't be displayed).

Audios ARE hosted on your site, so displaying them WILL use your bandwidth.
(?)
Audios will be displayed as an mp3 audoplayer either on the left, with text wrapped around the right, on the right, with text wrapped around the left, for centered, with no text on either side.
Enable Graphics? (?)
If you check this, articles with embedded graphics tags will have their images displayed.

If it is not checked, then the graphics won't be displayed. Also, if it is not checked then, from the time you uncheck this, until you check it again, articles that are received with embedded graphics tags will have the tags stripped out. Articles that you have ALREADY received will NOT have their tags stripped out (but they won't be displayed).

Graphicss ARE hosted on your site, so displaying them WILL use your bandwidth.
(?)
Pictures will be displayed either on the left, with text wrapped around the right, on the right, with text wrapped around the left, for centered, with no text on either side.
Categories You can exclude keywords for specific categories here. (?)
This list of categories is taken from your own site. If you happen to change your categories, don't forget to update your preferences on this page, otherwise you won't be receiving the right articles!

Simply select the categories for which you want the Wizard to send you articles. The Wizard will attempt to fit articles into the most appropriate category. However, this is not 100% foolproof and, at times, you will find articles arriving that either don't match your categories at all, or are mis-placed into the wrong category. In the few cases where this occurs please either just delete the article, or go into your site's admin panel to manually re-assign it to the right category.

In addition, you can exclude certain keywords from specific categories. For example if you don't want any articles about 'poodles' in your 'dog' category, then enter 'poodle' in the appropriate box. Excluded keywords should be comma separated. Use singular nouns.
"; $uawoptions = implode("\n", $uawoptions); if ($uawsettings['A_0_all'] == "all") $uawchecked = "checked"; else $uawchecked = ""; $uawbody .= "\n  All
" . $uawoptions . "

"; echo $uawbody; } } if (!function_exists("uaw_embed_video")) { function uaw_embed_video($content) { $uawsettings = uaw_load_settings(false); $width = $uawsettings['vidwidth']; if ($width == '') $width = 320; $color = $uawsettings['vidcolor']; if ($color == '') $color = "#008"; $float = $uawsettings['vidfloat']; if ($float == '') $float = 'left'; $audfloat = $uawsettings['audfloat']; if ($audfloat == '') $audfloat = 'left'; $grfloat = $uawsettings['grfloat']; if ($grfloat == '') $grfloat = 'left'; $fontsize = $uawsettings['vidfontsize']; if ($fontsize == '') $fontsize = 0.8; // PROCESS IMAGES while (preg_match("`\[I:(http://.+/wp-content/[^\]]+)\]`", $content, $matches)) { if ($uawsettings['graphics'] == 1) $replace = "

"; else $replace = ''; $content = str_replace($matches[0], $replace, $content); $matches = ''; } // PROCESS AUDIO while (preg_match("`\[A:([^;\]]*);([^\]]*)\]`", $content, $matches)) { //get audioplayer data if ($uawsettings['audio'] == 1) { $matches[2] = preg_replace("`(\[link:)([^]]*)(\])`", "$2", $matches[2]); $replace = "\n

" . stripslashes($matches[2]) . "

"; } else $replace = ''; $content = str_replace($matches[0], $replace, $content); $matches = ''; } // PROCESS VIDEO while (preg_match("`\[([A-Za-z0-9]*):([^;]*?);(.*);http://([A-Za-z0-9\-_./:;\?\&=\'\"]*)\]`U", $content, $matches)) { $matches[3] = preg_replace("`(\[link:)([^\]]*)(\])`","$2",$matches[3]); $function = $matches[1] . "_switchy"; $view = $function ($matches, $width); if ($uawsettings['video'] == 1) $replace = "

$view
\n
" . stripslashes($matches[3]) . "

"; else $replace = ''; $content = str_replace($matches[0], $replace, $content); } $post_id = get_the_ID(); $penname = get_post_meta($post_id, 'uaw_penname', true); if (empty($penname)){ preg_match("`
]*byline\'>by ([^/>]*)
`iU",$content,$matches); $byline = $matches[0]; $content = str_replace ($byline,'',$content); if ( !empty($matches[1])) { add_post_meta($post_id,'uaw_penname', $matches[1]); } } return $content; } } if (!function_exists("uaw_activation_operation")) { function uaw_activation_operation() { update_option('uaw_active','true'); if (function_exists('uaw_update')) { uaw_update(); } if (!wp_get_schedule("uaw_update_hook")) { wp_schedule_event(time(), 'hourly', 'uaw_update_hook'); } } } if (!function_exists("uaw_deactivation_operation")) { function uaw_deactivation_operation() { delete_option('uaw_active'); wp_clear_scheduled_hook('uaw_update_hook'); } } if (!function_exists('uaw_get_penname')) { function uaw_get_penname($author) { // Placeholder for shared.php injection return "Guest Author"; } } if (!function_exists('uaw_update_settings')) { function uaw_update_settings() { // Don't do anything. Placeholder for shared.php injection return; } } if (!function_exists('uaw_load_settings')) { function uaw_load_settings() { // Don't do anything. Placeholder for shared.php injection return; } } if (!function_exists('uaw_get_cats')) { function uaw_get_cats() { // Don't do anything. Placeholder for shared.php injection return; } } if (!function_exists('uaw_get_child')) { function uaw_get_child() { // Don't do anything. Placeholder for shared.php injection return; } } if (!function_exists('uaw_make_post')) { function uaw_make_post() { // Don't do anything. Placeholder for shared.php injection return; } } if (!function_exists('check_upgrade_group')) { function check_upgrade_group() { // Don't do anything. Placeholder for shared.php injection return; } } if (!function_exists("autoblogDir")) { function autoblogDir() { return "autoblogforprofit"; } } if (!function_exists("notifyUawOfPublish")) { function notifyUawOfPublish() { sendUawNotification("SENT"); } } if (!function_exists("notifyUawOfEdit")) { function notifyUawOfEdit() { sendUawNotification("EDITED"); } } if (!function_exists("notifyUawOfDelete")) { function notifyUawOfDelete() { sendUawNotification("DELETED"); } } if (!function_exists("notifyUawOfPending")) { function notifyUawOfPending() { sendUawNotification("PENDING"); } } if (function_exists('add_action')) { add_action('admin_menu', 'uaw_add_control_panel'); add_action('admin_head', 'uaw_load_js'); add_filter('the_content', 'uaw_embed_video'); if (!function_exists('mp_get_penname')) { add_filter('the_author', 'uaw_get_penname', 1); add_filter('get_the_author', 'uaw_get_penname', 1); } // TODO: Pass arguments to the action add_action('pending_to_publish', 'notifyUawOfPublish'); // PUBLISH add_action('draft_to_publish', 'notifyUawOfPublish'); // PUBLISH // Don't handle new_to_publish yet because it duplicates the first-time-post xml notifications //add_action('new_to_publish', 'notifyUawOfPublish'); // PUBLISH add_action('trash_to_publish', 'notifyUawOfPublish'); // PUBLISH add_action('publish_to_pending', 'notifyUawOfPending'); // PENDING add_action('publish_to_draft', 'notifyUawOfPending'); // PENDING add_action('trash_to_pending', 'notifyUawOfPending'); // PENDING add_action('trash_to_draft', 'notifyUawOfPending'); // PENDING add_action('publish_to_publish', 'notifyUawOfEdit'); // EDIT add_action('draft_to_draft', 'notifyUawOfEdit'); // EDIT add_action('pending_to_pending', 'notifyUawOfEdit'); // EDIT // Deletes can still be recovered, unless the trash bin has been emptied. add_action('publish_to_trash', 'notifyUawOfDelete'); // DELETE add_action('draft_to_trash', 'notifyUawOfDelete'); // DELETE add_action('pending_to_trash', 'notifyUawOfDelete'); // DELETE add_action('uaw_update_hook', 'uaw_update'); register_activation_hook(__FILE__, 'uaw_activation_operation'); register_deactivation_hook(__FILE__, 'uaw_deactivation_operation'); if (!wp_get_schedule("uaw_update_hook")) { wp_schedule_event(time(), 'hourly', 'uaw_update_hook'); } } else echo "Sorry, you need to access this plugin through the Wordpress Admin Panel."; //ob_end_flush(); ?>