Plugin Directory

Changeset 158509


Ignore:
Timestamp:
09/28/2009 05:06:58 AM (16 years ago)
Author:
littlejon
Message:

Commit for version 1.2 release of LJ Longtail SEO

Location:
lj-longtail-seo/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lj-longtail-seo/trunk/lj-longtail-seo.php

    r157413 r158509  
    55Description: LJ Longtail SEO is a tool that detects search engine visits and uses this information to display a list of links based on second page search results
    66Author: Jon Smith
    7 Version: 1.0
     7Version: 1.2
    88Author URI: http://www.thelazysysadmin.net/
    99*/
     
    1212
    1313  private $dbversion = "1.75";
    14   private $pluginversion = "1.0";
     14  private $pluginversion = "1.2";
    1515
    1616  private $defaults = array
     
    2626    add_action('LJLongtailSEO_cron_hook', array(&$this, 'cron'));
    2727    add_action('admin_menu', array(&$this, 'admin_menu'));
     28    add_action('plugins_loaded', array(&$this, 'plugins_loaded'));
    2829
    2930    add_filter("wp_head", array(&$this, "checkreferrer"));
    30 
    31     register_sidebar_widget("LJ Longtail SEO", array(&$this, "widget"));
    32     register_widget_control("LJ Longtail SEO", array(&$this, "widget_control"));
    3331
    3432    register_activation_hook(__FILE__, array(&$this, 'db_install'));
     
    3937    if ( function_exists('add_options_page') )
    4038      add_options_page(__('LJ Longtail SEO Configuration'), __('LJ Longtail SEO'), 8, __FILE__, array(&$this, 'config'));
     39  }
     40 
     41  function plugins_loaded() {
     42    register_sidebar_widget("LJ Longtail SEO", array(&$this, "widget"));
     43    register_widget_control("LJ Longtail SEO", array(&$this, "widget_control"));
    4144  }
    4245
     
    162165    echo "<h3>".$options['widget-title']."</h3>\n";
    163166
    164     $dbresults = $wpdb->get_results($wpdb->prepare("SELECT postid, query, serppage, count(query) AS num, archive FROM $table_name GROUP BY postid, query, serppage HAVING serppage != -1 AND serppage != 1 AND postid != 0 AND archive = 0 ORDER BY serppage, num DESC LIMIT 0, %d;", $options['widget-numitems']), ARRAY_A);
     167    $dbresults = $wpdb->get_results($wpdb->prepare("SELECT avg(id) AS relage, postid, query, serppage, count(query) AS num, archive FROM $table_name GROUP BY postid, query, serppage HAVING serppage != -1 AND serppage != 1 AND postid != 0 AND archive = 0 ORDER BY serppage, num DESC, relage LIMIT 0, %d;", $options['widget-numitems']), ARRAY_A);
    165168   
    166169    if (count($dbresults) > 0) {
     
    330333  <th scope="col" id="postfound" class="manage-column column-postfound" style="">Post Found</th>
    331334  <th scope="col" id="hits" class="manage-column column-hits" style="">Hits</th>
     335  <th scope="col" id="ageweight" class="manage-column column-ageweight" style="">Age Weighting</th>
    332336  </tr>
    333337  </thead>
     
    338342  <th scope="col" id="postfound" class="manage-column column-postfound" style="">Post Found</th>
    339343  <th scope="col" id="hits" class="manage-column column-hits" style="">Hits</th>
     344  <th scope="col" id="ageweight" class="manage-column column-ageweight" style="">Age Weighting</th>
    340345  </tr>
    341346  </tfoot>
     
    344349<?php
    345350 
    346   $results = $wpdb->get_results($wpdb->prepare("SELECT postid, query, serppage, count(query) AS num, archive FROM $table_name GROUP BY postid, query, serppage HAVING serppage != -1 AND serppage != 1 AND postid != 0 AND archive = 0 ORDER BY serppage, num DESC LIMIT 0, %d;", $options['widget-numitems']), ARRAY_A);
     351  $results = $wpdb->get_results($wpdb->prepare("SELECT avg(id) AS relage, postid, query, serppage, count(query) AS num, archive FROM $table_name GROUP BY postid, query, serppage HAVING serppage != -1 AND serppage != 1 AND postid != 0 AND archive = 0 ORDER BY serppage, num DESC, relage LIMIT 0, %d;", $options['widget-numitems']), ARRAY_A);
    347352
    348353  if (count($results) > 0) {
     
    353358      <td class="text column-postfound"><?php echo get_the_title($result['postid']); ?></td>
    354359      <td class="text column-hits"><?php echo $result['num']; ?></td>
     360      <td class="text column-hits"><?php echo sprintf("%d", $result['relage']); ?></td>
    355361    </tr>
    356362<?php
  • lj-longtail-seo/trunk/readme.txt

    r157413 r158509  
    11=== Plugin Name ===
    22Contributors: littlejon
    3 Tags: serp, position, longtail, results, google, bing, yahoo, SEO, widget, sidebar
    4 Requires at least: 2.7
     3Tags: serp, position, longtail, long tail, results, google, bing, yahoo, SEO, widget, sidebar
     4Requires at least: 2.5
    55Tested up to: 2.8.4
    66Donate link: http://www.thelazysysadmin.net/software/appreciation/
    7 Stable tag: 1.0
     7Stable tag: 1.2
    88
    99LJ Longtail SEO is a tool that detects search engine visits and uses this information to display a list of links based on second page search results
     
    4848== Changelog ==
    4949
     50= 1.2 =
     51
     52* Added backwards compatiblity down to Wordpress 2.5
     53
     54= 1.1 =
     55
     56* Added age weighting to the Widget results page. This will help stabilise the results and allow for graceful aging. The figure shown on the admin page is purely relative (it is based on the average id of the database records, as such this value will continue getting higher and higher but yet still remain relevant to the results being shown)
     57
    5058= 1.0 =
    5159
Note: See TracChangeset for help on using the changeset viewer.