Changeset 20341

Show
Ignore:
Timestamp:
09/28/07 22:03:52 (9 months ago)
Author:
alexkingorg
Message:

version 1.1 ready for release

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • link-harvest/trunk/README.txt

    r8064 r20341  
    1 === Share This === 
     1=== Link Harvest === 
    22Tags: link, links, report, reporting, blogroll 
    33Contributors: alexkingorg 
    44Requires at least: 2.0 
    5 Tested up to: 2.1 
    6 Stable tag: 1.0 
     5Tested up to: 2.3 
     6Stable tag: 1.1 
    77 
    88Link Harvest will go through all of your posts and pages and compile a list of all external links. Then it will create a live updating linkroll for you, based on your actual linking activity. 
  • link-harvest/trunk/link-harvest.php

    r11745 r20341  
    55Plugin URI: http://alexking.org/projects/wordpress 
    66Description: This will harvest links from your WordPress database, creating a links list sorted by popularity. Once you have activated the plugin, you can configure the <a href="options-general.php?page=link-harvest.php">Settings</a> and see your <a href="index.php?page=link-harvest.php">list of links</a>. Also see <a href="options-general.php?page=link-harvest.php#aklh_template_tags">how to show the list of links</a> in your blog. Questions on configuration, etc.? Make sure to read the README. 
    7 Version: 1.1b1 
     7Version: 1.1 
    88Author: Alex King 
    99Author URI: http://alexking.org 
     
    248248                  foreach ($links[1] as $link) { 
    249249                        if (in_array(substr($link, 0, 7), array('http://', 'https:/')) && !$this->excluded_file_type($link)) { 
    250                               $urls[] = $link
     250                              $urls[] = trim($link)
    251251                        } 
    252252                  } 
     
    315315// FeedBurner hack, working around this: 
    316316// http://alexking.org/blog/2006/12/01/why-i-dont-use-feedburner 
    317                   if (strstr($link, '/feeds.feedburner.com/') || strstr($link, '/~r/')) { 
    318                         require_once(ABSPATH.WPINC.'/class-snoopy.php'); 
    319                         $snoop = new Snoopy; 
    320                         $snoop->maxlength = 2000; 
    321                         $snoop->read_timeout = $this->timeout; 
    322                         $snoop->fetch($link); 
    323                         if (!empty($snoop->lastredirectaddr)) { 
    324                               $link = $snoop->lastredirectaddr; 
    325                         } 
    326                   } 
    327                   $domain = $this->get_domain($link); 
    328                   if (!empty($domain)) { 
    329                         foreach ($this->exclude as $exclude) { 
    330                               if (strstr($domain, $exclude)) { 
    331                                     return; 
     317                  if (!empty($link)) { 
     318                        if (strstr($link, '/feeds.feedburner.com/') || strstr($link, '/~r/')) { 
     319                              require_once(ABSPATH.WPINC.'/class-snoopy.php'); 
     320                              $snoop = new Snoopy; 
     321                              $snoop->maxlength = 2000; 
     322                              $snoop->read_timeout = $this->timeout; 
     323                              $snoop->fetch($link); 
     324                              if (!empty($snoop->lastredirectaddr)) { 
     325                                    $link = $snoop->lastredirectaddr; 
    332326                              } 
    333327                        } 
    334                         if (isset($domain_count[$domain])) { 
    335                               $domain_count[$domain]++; 
    336                         } 
    337                         else { 
    338                               $domains[] = $domain; 
    339                               $domain_count[$domain] = 1; 
    340                         } 
    341                         $harvest[] = array($link, $domain); 
    342                   } 
    343  
    344                   aklh_log('Processed link: '.$link); 
    345  
     328                        $domain = $this->get_domain($link); 
     329                        if (!empty($domain)) { 
     330                              foreach ($this->exclude as $exclude) { 
     331                                    if (strstr($domain, $exclude)) { 
     332                                          return; 
     333                                    } 
     334                              } 
     335                              if (isset($domain_count[$domain])) { 
     336                                    $domain_count[$domain]++; 
     337                              } 
     338                              else { 
     339                                    $domains[] = $domain; 
     340                                    $domain_count[$domain] = 1; 
     341                              } 
     342                              $harvest[] = array($link, $domain); 
     343                        } 
     344 
     345                        aklh_log('Processed link: '.$link); 
     346 
     347                  } 
     348                  else { 
     349 
     350                        aklh_log('Skipped link: '.$link); 
     351 
     352                  } 
    346353            } 
    347354             
     
    12031210                        ini_set('display_errors', '0'); 
    12041211                        ini_set('error_reporting', E_PARSE); 
     1212                         
     1213                        @set_time_limit(999999999999999999999); 
     1214                         
    12051215                        $aklk = new ak_link_harvest; 
    12061216                        $aklk->get_settings(); 
     
    12201230                              $limit = $aklh->default_limit;; 
    12211231                        } 
     1232                         
     1233                        if ($start == 0) { 
     1234                              aklh_log("\n\n\n".'Starting a new harvest'."\n".'PHP Version is: '.phpversion()); 
     1235                              $plugins = get_option('active_plugins'); 
     1236                              if (is_array($plugins) && count($plugins) > 0) { 
     1237                                    foreach ($plugins as $plugin) { 
     1238                                          aklh_log('Active plugin: '.$plugin); 
     1239                                    } 
     1240                              } 
     1241                        } 
     1242 
     1243                        aklh_log("\n".'Starting with offset "'.$start.'"'."\n"); 
     1244                         
    12221245                        $aklk->harvest_posts(null, $start, $limit); 
    12231246                        $count = $wpdb->get_var(" 
     
    12381261                              $completed = $count; 
    12391262                        } 
     1263                         
     1264                        aklh_log('Returning "'.''.$completed.'"'."\n"); 
     1265                         
    12401266                        die(''.$completed); 
    12411267                        break;