Changeset 158509
- Timestamp:
- 09/28/2009 05:06:58 AM (16 years ago)
- Location:
- lj-longtail-seo/trunk
- Files:
-
- 2 edited
-
lj-longtail-seo.php (modified) (9 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lj-longtail-seo/trunk/lj-longtail-seo.php
r157413 r158509 5 5 Description: 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 6 6 Author: Jon Smith 7 Version: 1. 07 Version: 1.2 8 8 Author URI: http://www.thelazysysadmin.net/ 9 9 */ … … 12 12 13 13 private $dbversion = "1.75"; 14 private $pluginversion = "1. 0";14 private $pluginversion = "1.2"; 15 15 16 16 private $defaults = array … … 26 26 add_action('LJLongtailSEO_cron_hook', array(&$this, 'cron')); 27 27 add_action('admin_menu', array(&$this, 'admin_menu')); 28 add_action('plugins_loaded', array(&$this, 'plugins_loaded')); 28 29 29 30 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"));33 31 34 32 register_activation_hook(__FILE__, array(&$this, 'db_install')); … … 39 37 if ( function_exists('add_options_page') ) 40 38 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")); 41 44 } 42 45 … … 162 165 echo "<h3>".$options['widget-title']."</h3>\n"; 163 166 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 DESCLIMIT 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); 165 168 166 169 if (count($dbresults) > 0) { … … 330 333 <th scope="col" id="postfound" class="manage-column column-postfound" style="">Post Found</th> 331 334 <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> 332 336 </tr> 333 337 </thead> … … 338 342 <th scope="col" id="postfound" class="manage-column column-postfound" style="">Post Found</th> 339 343 <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> 340 345 </tr> 341 346 </tfoot> … … 344 349 <?php 345 350 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 DESCLIMIT 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); 347 352 348 353 if (count($results) > 0) { … … 353 358 <td class="text column-postfound"><?php echo get_the_title($result['postid']); ?></td> 354 359 <td class="text column-hits"><?php echo $result['num']; ?></td> 360 <td class="text column-hits"><?php echo sprintf("%d", $result['relage']); ?></td> 355 361 </tr> 356 362 <?php -
lj-longtail-seo/trunk/readme.txt
r157413 r158509 1 1 === Plugin Name === 2 2 Contributors: littlejon 3 Tags: serp, position, longtail, results, google, bing, yahoo, SEO, widget, sidebar4 Requires at least: 2. 73 Tags: serp, position, longtail, long tail, results, google, bing, yahoo, SEO, widget, sidebar 4 Requires at least: 2.5 5 5 Tested up to: 2.8.4 6 6 Donate link: http://www.thelazysysadmin.net/software/appreciation/ 7 Stable tag: 1. 07 Stable tag: 1.2 8 8 9 9 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 … … 48 48 == Changelog == 49 49 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 50 58 = 1.0 = 51 59
Note: See TracChangeset
for help on using the changeset viewer.