Changeset 544313
- Timestamp:
- 05/15/2012 01:27:18 AM (14 years ago)
- Location:
- wordpress-automation-suite
- Files:
-
- 48 added
- 8 edited
-
tags/1.0 (added)
-
tags/1.0/AutoMore.php (added)
-
tags/1.0/AutoPaging.php (added)
-
tags/1.0/Menu.php (added)
-
tags/1.0/automation-suite.php (added)
-
tags/1.0/imgs (added)
-
tags/1.0/imgs/icon.png (added)
-
tags/1.0/js (added)
-
tags/1.0/js/automation-suite.js (added)
-
tags/1.0/pages (added)
-
tags/1.0/pages/MainOptions.php (added)
-
tags/1.0/pages/auto-more.php (added)
-
tags/1.0/pages/auto-paging.php (added)
-
tags/1.0/readme.txt (added)
-
tags/2.0 (added)
-
tags/2.0/AutoMore.php (added)
-
tags/2.0/AutoPaging.php (added)
-
tags/2.0/AutoTagger.php (added)
-
tags/2.0/Menu.php (added)
-
tags/2.0/automation-suite.php (added)
-
tags/2.0/imgs (added)
-
tags/2.0/imgs/icon.png (added)
-
tags/2.0/js (added)
-
tags/2.0/js/automation-suite.js (added)
-
tags/2.0/pages (added)
-
tags/2.0/pages/MainOptions.php (added)
-
tags/2.0/pages/auto-more-update-all.php (added)
-
tags/2.0/pages/auto-more.php (added)
-
tags/2.0/pages/auto-paging-update-all.php (added)
-
tags/2.0/pages/auto-paging.php (added)
-
tags/2.0/pages/auto-tagger.php (added)
-
tags/2.0/pages/paypal.php (added)
-
tags/2.0/readme.txt (added)
-
tags/2.0/screenshot-1.png (added)
-
tags/2.0/screenshot-2.png (added)
-
tags/2.0/screenshot-3.png (added)
-
tags/2.0/screenshot-4.png (added)
-
tags/2.0/screenshot5.png (added)
-
trunk/AutoMore.php (modified) (4 diffs)
-
trunk/AutoPaging.php (modified) (3 diffs)
-
trunk/AutoTagger.php (added)
-
trunk/Menu.php (modified) (4 diffs)
-
trunk/automation-suite.php (modified) (4 diffs)
-
trunk/pages/MainOptions.php (modified) (3 diffs)
-
trunk/pages/auto-more-update-all.php (added)
-
trunk/pages/auto-more.php (modified) (2 diffs)
-
trunk/pages/auto-paging-update-all.php (added)
-
trunk/pages/auto-paging.php (modified) (2 diffs)
-
trunk/pages/auto-tagger.php (added)
-
trunk/pages/paypal.php (added)
-
trunk/readme.txt (modified) (7 diffs)
-
trunk/screenshot-1.png (added)
-
trunk/screenshot-2.png (added)
-
trunk/screenshot-3.png (added)
-
trunk/screenshot-4.png (added)
-
trunk/screenshot5.png (added)
Legend:
- Unmodified
- Added
- Removed
-
wordpress-automation-suite/trunk/AutoMore.php
r543823 r544313 10 10 public $data; 11 11 12 public function __construct() { 13 global $wpdb; 12 public function __construct($wpdb) { 14 13 $this->_db = &$wpdb; 15 self::$_instance = $this;14 self::$_instance = &$this; 16 15 17 16 add_filter('content_save_pre', 'AutoMore::addTag', '1', 2); … … 19 18 } 20 19 20 public static function getInstance() { 21 return self::$_instance; 22 } 23 21 24 public function activate() { 22 25 update_option('AutomationSuite_Module_AutoMore', true); … … 201 204 202 205 public function updateAll() { 203 206 // Stop the auto tagger from firing, so we don't have a baragge of auto tagging going on. 207 WNAutomation::getInstance()->stopTagger(); 204 208 $posts = get_posts(array( 205 209 'numberposts' => '-1', … … 213 217 setup_postdata($post); 214 218 $post->post_content = self::addTag($post->post_content); 215 wp_update_post($post); 219 wp_update_post($post); 220 usleep(750000); 216 221 } 217 222 } -
wordpress-automation-suite/trunk/AutoPaging.php
r543823 r544313 10 10 public $data; 11 11 12 public function __construct() { 13 global $wpdb; 12 public function __construct($wpdb) { 14 13 $this->_db = &$wpdb; 15 self::$_instance = $this;14 self::$_instance = &$this; 16 15 17 16 add_filter('content_save_pre', 'AutoPaging::addTag', '1', 2); 18 17 } 19 18 19 public static function getInstance() { 20 return self::$_instance; 21 } 22 20 23 public function activate() { 21 24 update_option('AutomationSuite_Module_AutoPaging', true); … … 99 102 100 103 public function updateAll() { 101 104 WNAutomation::getInstance()->stopTagger(); 105 102 106 $posts = get_posts(array( 103 107 'numberposts' => '-1', … … 111 115 setup_postdata($post); 112 116 $post->post_content = self::addTag($post->post_content); 113 wp_update_post($post); 117 wp_update_post($post); 118 usleep(750000); 114 119 } 115 120 } -
wordpress-automation-suite/trunk/Menu.php
r543823 r544313 33 33 $options['AutomationSuite_AutoMore'] = get_option('AutomationSuite_AutoMore', true); 34 34 $options['AutomationSuite_AutoPaging'] = get_option('AutomationSuite_AutoPaging', false); 35 $options['AutomationSuite_AutoTagger'] = get_option('AutomationSuite_AutoTagger', false); 35 36 $options['AutomationSuite_GiveCredit'] = get_option('AutomationSuite_GiveCredit', false); 36 37 break; … … 47 48 $options['AutoPaging_break'] = get_option('AutoPaging_break', 1); 48 49 $options['AutoPaging_auto_update'] = get_option('AutoPaging_auto_update', true); 50 break; 51 case 'auto-tagger': 52 $options['AutoTagger_TagTheNetCount'] = (int)get_option('AutoTagger_TagTheNetCount', 10); 53 $options['AutoTagger_Blacklist'] = get_option('AutoTagger_Blacklist', null); 49 54 break; 50 55 default: … … 74 79 } 75 80 81 public function buildAutoTaggerOptionsPage() { 82 83 require_once(dirname(__FILE__).'/pages/auto-tagger.php'); 84 85 } 86 76 87 public function buildMenu() { 77 88 … … 86 97 } 87 98 99 if(get_option('AutomationSuite_AutoTagger', false) != false){ 100 $this->option_menu_page_four = add_submenu_page('automation_suite', 'Auto Post Tagger', 'Auto Post Tagger', 'manage_options', 'automation_suite_auto_tagger', array($this, 'buildAutoTaggerOptionsPage')); 101 } 102 88 103 } 89 104 -
wordpress-automation-suite/trunk/automation-suite.php
r543823 r544313 6 6 Author URI: http://travisweston.com/ 7 7 Description: With the help of this automation suite you are able to forget about creating excerpts, you can forget about manually inserting new pages for your posts. With this suite, all of these actions can, and will, be automated for you! 8 Version: 1.08 Version: 2.0 9 9 */ 10 ini_set('display_errors', 1);11 10 if(!defined('WESTON_NETWORKS_AUTOMATION_SUITE')){ 12 11 define('WESTON_NETWORKS_AUTOMATION_SUITE', true); … … 25 24 'More WordPress plugins', 26 25 'Excellent technology blog, opinions and tutorials', 27 'WordPress Automation Suite © 2012 Travis Weston' 26 'WordPress Automation Suite © 2012 Travis Weston', 27 'This blog automated by WordPress Automation Suite' 28 28 ); 29 29 30 private static $_instance; 31 30 32 public function __construct() { 31 33 global $wpdb; … … 36 38 if(get_option('AutomationSuite_AutoMore', true) != false){ 37 39 include_once('AutoMore.php'); 38 $this->_modules['auto-more'] = new AutoMore( );40 $this->_modules['auto-more'] = new AutoMore($wpdb); 39 41 } 40 42 41 43 if(get_option('AutomationSuite_AutoPaging', false) != false){ 42 44 include_once('AutoPaging.php'); 43 $this->_modules['auto-paging'] = new AutoPaging( );45 $this->_modules['auto-paging'] = new AutoPaging($wpdb); 44 46 } 45 47 48 if(get_option('AutomationSuite_AutoTagger', false) != false){ 49 if(function_exists('curl_init')){ 50 include_once('AutoTagger.php'); 51 $this->_modules['auto-tagger'] = new AutoTagger(); 52 }else{ 53 add_action('admin_notices', function() { 54 echo '<div id="message" class="error">Auto Tagger Module requires PHP cURL extension to be installed.</div>'; 55 update_option("AutomationSuite_AutoTagger", false); 56 } 57 ); 58 } 59 } 60 46 61 add_action('wp_footer', array($this, 'giveCredit')); 47 62 add_action('admin_notices', array($this, 'begForMoney')); 63 self::$_instance = $this; 64 } 65 66 public static function getInstance() { 67 68 if(!(self::$_instance instanceof WNAutomation)) 69 self::$_instance = new WNAutomation(); 70 71 return self::$_instance; 72 73 } 74 75 public function stopTagger() { 76 77 if(!isset($this->_modules['auto-tagger'])) 78 return; 79 80 $this->_modules['auto-tagger']->removeAction(); 81 48 82 } 49 83 … … 57 91 } 58 92 93 public function setAlertTime() { 94 95 $time = get_option('AutomationSuite_AlertTime', false); 96 97 if($time !== false && $time > time()) 98 return; 99 100 $length = (get_option('AutomationSuite_GiveCredit', true) != true) ? '+2 Weeks' : '+1 Month'; 101 102 update_option('AutomationSuite_AlertTime', strtotime($length, time())); 103 104 } 105 106 public function begForMoney() { 107 108 $time = get_option('AutomationSuite_AlertTime', false); 109 110 if($time === false || $time > time() || isset($_POST['hide'])){ 111 $this->setAlertTime(); 112 return; 113 } 114 115 $button = <<<html 116 <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> 117 <input type="hidden" name="cmd" value="_s-xclick"> 118 <input type="hidden" name="hosted_button_id" value="PMDJTKFD26YQL"> 119 <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_paynow_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> 120 <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"> 121 </form> 122 html; 123 echo '<div id="message" class="updated fade"><p style="font-weight: bold;"><span style="float: left;">You\'ve used the WordPress Automation Suite for a while now. If you enjoy it, please consider donating $1</span>'.$button.'<form action="'.$_SERVER['REQUEST_URI'].'" method="get" style="float: right;"><input type="hidden" name="hide" value="true" /><input type="submit" class="button-primary" name="hide_msg" value="Hide Message" /></form></p><div style="clear:both;"> </div></div>'; 124 125 } 126 59 127 } 60 128 -
wordpress-automation-suite/trunk/pages/MainOptions.php
r543823 r544313 6 6 ?> 7 7 <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>"> 8 <input type="hidden" name="DoUpdate" />8 <input type="hidden" name="DoUpdate" value="true" /> 9 9 <div class="section" style="margin-right: 20px !important;"> 10 10 <div class="box visible"> … … 26 26 </li> 27 27 <li> 28 I <select name="AutomationSuite_AutoTagger"> 29 <option value="1" <?php echo (isset($options['AutomationSuite_AutoTagger']) && $options['AutomationSuite_AutoTagger'] == true) ? 'selected="SELECTED" ' : null; ?>/>would 30 <option value="0" <?php echo (!isset($options['AutomationSuite_AutoTagger']) || $options['AutomationSuite_AutoTagger'] != true) ? 'selected="SELECTED" ' : null; ?>/>wouldn't 31 </select> like to use the Auto Post Tagger Module. 32 </li> 33 <li> 28 34 I <select name="AutomationSuite_GiveCredit"> 29 35 <option value="1" <?php echo (isset($options['AutomationSuite_GiveCredit']) && $options['AutomationSuite_GiveCredit'] == true) ? 'selected="SELECTED" ' : null;?>/>would … … 35 41 <input type="submit" class="button-primary" name="submit" value="Update" /> 36 42 </p> 37 <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> 38 <input type="hidden" name="cmd" value="_s-xclick"> 39 <input type="hidden" name="hosted_button_id" value="XWLHKSW6EJD3A"> 40 <input type="hidden" name="on0" value="Donations"> 41 <h2>Donations</h2> 42 <select name="os0"> 43 <option value="Donate a coffee?">Donate a coffee? $1.00 USD</option> 44 <option value="Coffee w/ Bagel?">Coffee w/ Bagel? $5.00 USD</option> 45 <option value="Beer?">Beer? $10.00 USD</option> 46 <option value="Diapers for my 2 kids?">Diapers for my 2 kids? $25.00 USD</option> 47 <option value="Car Payment?">Car Payment? $50.00 USD</option> 48 <option value="House Payment?">House Payment? $100.00 USD</option> 49 <option value="Now you're just crazy, but I love you.">Now you're just crazy, but I love you. $500.00 USD</option> 50 </select><br /> 51 <input type="hidden" name="currency_code" value="USD"> 52 <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_paynow_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> 53 <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"> 54 </form> 43 <?php include_once('paypal.php'); ?> 55 44 </div> 56 45 </div> -
wordpress-automation-suite/trunk/pages/auto-more.php
r543823 r544313 7 7 8 8 if(isset($_POST['DoUpdate']) && isset($options['AutoMore_auto_update']) && $options['AutoMore_auto_update'] == true){ 9 AutoMore::updateAll(); 9 $url = plugins_url('pages/auto-more-update-all.php', dirname(__FILE__)); 10 wp_remote_post( $url, array('timeout' => 0.01, 'blocking' => false, 'sslverify' => apply_filters('https_local_ssl_verify', true)) ); 10 11 } 11 12 ?> … … 31 32 <option value="0" <?php echo (isset($options['AutoMore_ignore_man_tag']) && $options['AutoMore_ignore_man_tag'] == false) ? 'selected="SELECTED" ' : null;?>/>wouldn't 32 33 </select> like to ignore manually inserted shortcode more tags of the format [amt_override].</p> 33 <p class="submit"> 34 <input type="submit" class="button-primary" value="<?php _e('Update Auto More Tag Settings'); ?>" /> 35 </p> 34 <p class="submit"> 35 <input type="submit" class="button-primary" value="<?php _e('Update Auto More Tag Settings'); ?>" /> 36 </p> 37 <?php include_once('paypal.php'); ?> 36 38 </div> 37 39 </div> -
wordpress-automation-suite/trunk/pages/auto-paging.php
r543823 r544313 7 7 8 8 if(isset($_POST['DoUpdate']) && isset($options['AutoPaging_auto_update']) && $options['AutoPaging_auto_update'] == true){ 9 AutoPaging::updateAll(); 9 $url = plugins_url('pages/auto-paging-update-all.php', dirname(__FILE__)); 10 wp_remote_post( $url, array('timeout' => 0.01, 'blocking' => false, 'sslverify' => apply_filters('https_local_ssl_verify', true)) ); 10 11 } 11 12 ?> … … 28 29 <option value="0" <?php echo (isset($options['AutoPaging_auto_update']) && $options['AutoPaging_auto_update'] == false) ? 'selected="SELECTED" ' : null;?>/>wouldn't 29 30 </select> like to automatically update every post in my blog when I update my settings.</p> 30 <p class="submit"> 31 <input type="submit" class="button-primary" value="<?php _e('Update Auto Post Paging Settings'); ?>" /> 32 </p> 31 <p class="submit"> 32 <input type="submit" class="button-primary" value="<?php _e('Update Auto Post Paging Settings'); ?>" /> 33 </p> 34 <?php include_once('paypal.php'); ?> 33 35 </div> 34 36 </div> -
wordpress-automation-suite/trunk/readme.txt
r543834 r544313 8 8 Requires at least: 3.0 9 9 Tested up to: 3.3.2 10 Stable tag: 1.010 Stable tag: 2.0 11 11 12 12 Makes your life easier by automating the mundane tasks of writing blog posts, so you can focus on the content. … … 20 20 * Auto More Tag Module 21 21 * Auto Pagination Module 22 22 * Auto Post Tagging Module 23 * Simple to understand, conversational options pages 24 23 25 Excellent quality modules allow this Automation Suite for WordPress to handle the menial task of formatting your posts for maximum effectiveness. Use the Auto More Tag Module to get that "Read More" effect that so many blogs use to lower their bounce rate, and use the Auto Pagination Module to get the multiple post pages effect that sites like Cracked.com have been using for years, to great effect. 24 26 … … 37 39 This module uses a similar Intelligent Placement system as the More tags. Using a set of guidelines such as minimum number of characters or words to break apart into multiple pages, and the number of pages that you want to break your posts into, you can set the settings, and let the plugin do the work for you. 38 40 39 = What is Intelligent Placement?=41 = Auto Post Tagging Module = 40 42 41 Intelligent Placement is a method of searching out the best placement for the tags. It does this through an analysis of the post, and finding a proper **break point**, which you can define as either an **End of Line** or a **Space**. 43 * Tagthe.net API 44 45 Add tags to your posts, automatically, without having to focus on them. This module uses a multitude of APIs to collect the best tags for your posts, to help you organize your site for search engines, as well as the searching reader. Never force yourself to tag your posts again. 42 46 43 47 == Installation == … … 51 55 Quite possibly. Auto more tag was a great plugin, which spawned this automation suite. But, with the installation of this plugin you can simply deactivate Auto More Tag, and setup the Auto More Tag module with the same settings. It is an updated version of that plugin. 52 56 57 = I can't seem to activate the Auto Tagger module? = 58 You most likely do not have the PHP cURL extension installed on your server. This is a requirement for the Auto Tagger module. You'll have to install this yourself, or if you do not have direct access to PHP, you'll have to ask your server admin to allow you access to this extension. 59 53 60 = What is the shortcode for Auto More Tag module's manual placement? = 54 61 That would be [amt_override]. Something to note, though, if you have the option Ignore Manual tags to true, than you can place as many of those short codes as you want, and it will ignore them all. … … 57 64 Post pagination has to be setup in the theme itself. Some themes ignore this, and don't include the required function call in the post page. Try adding a function call <?php wp_link_pages(); ?> to your themes single post page, in most cases that is *single.php* page. 58 65 59 60 66 = I use the More Tag Module, but my posts still show full length, why? = 61 67 It is quite possible that the theme you are using has purposely stopped any more tag use. To test this, you can chance to the default WordPress theme and see if your posts show short there. If not, please contact me. 68 69 = What is Intelligent Placement? = 70 71 Intelligent Placement is a method of searching out the best placement for the tags. It does this through an analysis of the post, and finding a proper **break point**, which you can define as either an **End of Line** or a **Space**. 62 72 63 73 = Have a question? = … … 67 77 == Screenshots == 68 78 69 1. This is the options page for Auto More Tag. See how simple and clean it looks? Sexy, right? 79 1. The Main Options Page, you turn each individual module on and off here, as well as decide if you would like to give me credit VIA a link to my site in your footer. 80 2. The Auto More Tag Module options page, look how simple those options are. Just fill out the paragraph, and you're set. 81 3. The Auto Pagination Module options page. Same conversational tone as the other modules. 82 4. The Auto Tagging Module, with that same conversational options page! 83 5. This is what the menu looks like, when all modules are activated. 70 84 71 85 == Changelog == 86 87 = 2.0 = 88 89 Added Auto Tagging module, and removed extraneous global calls to $wpdb, placed it as a constructor argument instead, added new footer messages, and periodic header donation request. Moved the all-post updaters to their own pages. 72 90 73 91 = 1.0 = … … 77 95 == Upgrade Notice == 78 96 97 = 2.0 = 98 99 Added Auto Tagging module, and removed extraneous global calls to $wpdb, placed it as a constructor argument instead, added new footer messages, and periodic header donation request. Moved the all-post updaters to their own pages. 100 79 101 = 1.0 = 80 102
Note: See TracChangeset
for help on using the changeset viewer.