Changeset 8064

Show
Ignore:
Timestamp:
02/25/07 22:07:57 (1 year ago)
Author:
alexkingorg
Message:

tested with 2.0 and 2.1

Files:

Legend:

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

    r7333 r8064  
    33Contributors: alexkingorg 
    44Requires at least: 2.0 
    5 Tested up to: 2.0.5 
     5Tested up to: 2.1 
    66Stable tag: 1.0 
    77 
     
    3434== Showing your Link Harvest == 
    3535 
    36  
    3736= Token Method = 
    3837 
     
    5554To add a links list to your sidebar (like a blogroll), you can use the following template tag: 
    5655 
    57 `<?php aklh_top_links($count = 10); ?>` 
     56`<?php aklh_top_links(); ?>` 
     57 
     58This will show the top 10 links, to show a different number of links set the number like so: 
     59 
     60`<?php aklh_top_links(25); ?>` 
    5861 
    5962 
  • link-harvest/trunk/link-harvest.php

    r7331 r8064  
    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.0beta 
     7Version: 1.0 
    88Author: Alex King 
    99Author URI: http://alexking.org 
    1010*/  
    1111 
    12 // Copyright (c) 2006 Alex King. All rights reserved. 
     12// Copyright (c) 2006-2007 Alex King. All rights reserved. 
    1313// http://alexking.org/projects/wordpress 
    1414// 
     
    5656                        '); 
    5757                  } 
    58                   $$ak_prototype = true; 
     58                  $ak_prototype = true; 
    5959            } 
    6060      } 
     
    431431                        SELECT * 
    432432                        FROM $wpdb->posts 
    433                         WHERE post_status = 'publish' 
     433                        WHERE ( 
     434                              post_status = 'publish' 
     435                              OR post_status = 'static' 
     436                        ) 
    434437                        AND ID IN (".implode(',', $post_ids).") 
    435438                  "); 
     
    445448                        SELECT * 
    446449                        FROM $wpdb->posts 
    447                         WHERE post_status = 'publish' 
     450                        WHERE ( 
     451                              post_status = 'publish' 
     452                              OR post_status = 'static' 
     453                        ) 
    448454                        AND post_content LIKE '%http://%' 
    449455                        ORDER BY ID 
     
    719725                              SELECT count(ID) 
    720726                              FROM $wpdb->posts 
    721                               WHERE post_status = 'publish' 
     727                              WHERE ( 
     728                                    post_status = 'publish' 
     729                                    OR post_status = 'static' 
     730                              ) 
    722731                              AND post_content LIKE '%http://%' 
    723732                        "); 
     
    960969      <title>'.__('Link Harvest', 'alexking.org').'</title> 
    961970      <script src="'.get_bloginfo('wpurl').'/wp-includes/js/prototype.js" type="text/javascript"></script> 
    962       <script src="'.get_bloginfo('wpurl').'/wp-includes/js/wp-ajax-js.php" type="text/javascript"></script> 
    963971      <script type="text/javascript"> 
    964972      '.$js.' 
     
    10871095function aklh_head() { 
    10881096      ak_prototype(); 
     1097      print(' 
     1098            <script type="text/javascript" src="'.get_bloginfo('wpurl').'/index.php?ak_action=lh_js"></script> 
     1099            <link rel="stylesheet" type="text/css" href="'.get_bloginfo('wpurl').'/index.php?ak_action=lh_css" /> 
     1100      '); 
    10891101} 
    10901102 
     
    10921104      ak_prototype(); 
    10931105      print(' 
    1094             <script type="text/javascript" src="'.get_bloginfo('wpurl').'/wp-admin/options-general.php?ak_action=lh_js"></script> 
    1095             <link rel="stylesheet" type="text/css" href="'.get_bloginfo('wpurl').'/wp-admin/options-general.php?ak_action=lh_css" /> 
     1106            <script type="text/javascript" src="'.get_bloginfo('wpurl').'/index.php?ak_action=lh_js"></script> 
     1107            <link rel="stylesheet" type="text/css" href="'.get_bloginfo('wpurl').'/index.php?ak_action=lh_css" /> 
    10961108      '); 
    10971109} 
     
    11461158                              SELECT count(ID) 
    11471159                              FROM $wpdb->posts 
    1148                               WHERE post_status = 'publish' 
     1160                              WHERE ( 
     1161                                    post_status = 'publish' 
     1162                                    OR post_status = 'static' 
     1163                              ) 
    11491164                              AND ( 
    11501165                                    post_content LIKE '%http://%' 
     
    13151330                              ON p.ID = lh.post_id 
    13161331                              WHERE lh.domain_id = '$domain_id' 
    1317                               AND p.post_status = 'publish' 
     1332                              AND ( 
     1333                                    post_status = 'publish' 
     1334                                    OR post_status = 'static' 
     1335                              ) 
    13181336                              GROUP BY p.ID 
    13191337                              ORDER BY p.post_date DESC 
     
    14031421      target.innerHTML = '<span class="loading">Loading...</span>'; 
    14041422      target.style.display = "block"; 
    1405       var url = "<?php bloginfo('wpurl'); ?>/wp-admin/options-general.php"; 
     1423      var url = "<?php bloginfo('wpurl'); ?>/index.php"; 
    14061424      var aklhAjax = new Ajax.Updater( 
    14071425            target,