Version Description
Download this release
Release Info
Developer | mitchoyoshitaka |
Plugin | Yet Another Related Posts Plugin (YARPP) |
Version | 3.1b1 |
Comparing to | |
See all releases |
Code changes from version 3.0.14b1 to 3.1b1
- magic.php +7 -5
- options.php +44 -122
- readme.txt +17 -17
- yarpp.php +2 -2
magic.php
CHANGED
@@ -119,9 +119,6 @@ function yarpp_sql($type,$args,$giveresults = true,$reference_ID=false,$domain='
|
|
119 |
|
120 |
extract($optvals);
|
121 |
|
122 |
-
// if cross_relate is set, override the type argument and make sure both matches are accepted in the sql query
|
123 |
-
if ($cross_relate) $type = array('post','page');
|
124 |
-
|
125 |
// Fetch keywords
|
126 |
$body_terms = yarpp_get_cached_keywords($reference_ID,'body');
|
127 |
$title_terms = yarpp_get_cached_keywords($reference_ID,'title');
|
@@ -203,7 +200,8 @@ function yarpp_sql($type,$args,$giveresults = true,$reference_ID=false,$domain='
|
|
203 |
if ($recent_only)
|
204 |
$newsql .= " and post_date > date_sub(now(), interval $recent_number $recent_units) ";
|
205 |
|
206 |
-
|
|
|
207 |
|
208 |
// GROUP BY
|
209 |
$newsql .= "\n group by id \n";
|
@@ -223,6 +221,10 @@ function yarpp_sql($type,$args,$giveresults = true,$reference_ID=false,$domain='
|
|
223 |
$newsql = "select count(t.ID) from ($newsql) as t";
|
224 |
}
|
225 |
|
|
|
|
|
|
|
|
|
226 |
if ($yarpp_debug) echo "<!--$newsql-->";
|
227 |
return $newsql;
|
228 |
}
|
@@ -296,7 +298,7 @@ function yarpp_related($type,$args,$echo = true,$reference_ID=false,$domain = 'w
|
|
296 |
$related_query = new WP_Query();
|
297 |
$orders = split(' ',$order);
|
298 |
if ($domain != 'demo_web' and $domain != 'demo_rss')
|
299 |
-
$related_query->query(
|
300 |
else
|
301 |
$related_query->query('');
|
302 |
|
119 |
|
120 |
extract($optvals);
|
121 |
|
|
|
|
|
|
|
122 |
// Fetch keywords
|
123 |
$body_terms = yarpp_get_cached_keywords($reference_ID,'body');
|
124 |
$title_terms = yarpp_get_cached_keywords($reference_ID,'title');
|
200 |
if ($recent_only)
|
201 |
$newsql .= " and post_date > date_sub(now(), interval $recent_number $recent_units) ";
|
202 |
|
203 |
+
if ($type == array('page') && !$cross_relate)
|
204 |
+
$newsql .= " and post_type = 'page'";
|
205 |
|
206 |
// GROUP BY
|
207 |
$newsql .= "\n group by id \n";
|
221 |
$newsql = "select count(t.ID) from ($newsql) as t";
|
222 |
}
|
223 |
|
224 |
+
// if we're looking for a X related entries, make sure we get at most X posts and X pages if
|
225 |
+
// we cross-relate
|
226 |
+
if ($cross_relate) $newsql = "($newsql) union (".str_replace("post_type = 'post'","post_type = 'page'",$newsql).")";
|
227 |
+
|
228 |
if ($yarpp_debug) echo "<!--$newsql-->";
|
229 |
return $newsql;
|
230 |
}
|
298 |
$related_query = new WP_Query();
|
299 |
$orders = split(' ',$order);
|
300 |
if ($domain != 'demo_web' and $domain != 'demo_rss')
|
301 |
+
$related_query->query(array('p'=>$reference_ID,'orderby'=>$orders[0],'order'=>$orders[1],'showposts'=>$limit,'post_type'=>$type));
|
302 |
else
|
303 |
$related_query->query('');
|
304 |
|
options.php
CHANGED
@@ -74,7 +74,8 @@ yarpp_reinforce(); // just in case, set default options, etc.
|
|
74 |
|
75 |
if (isset($_POST['update_yarpp'])) {
|
76 |
foreach (array_keys($yarpp_value_options) as $option) {
|
77 |
-
|
|
|
78 |
}
|
79 |
foreach (array('title','body','tags','categories') as $key) {
|
80 |
if (!isset($_POST[$key])) yarpp_set_option($key,1);
|
@@ -262,9 +263,24 @@ function load_display_discats() {
|
|
262 |
<p><small><?php _e('by <a href="http://mitcho.com/code/">mitcho (Michael 芳貴 Erlewine)</a>','yarpp');?>. <?php _e('Follow <a href="http://twitter.com/yarpp/">Yet Another Related Posts Plugin on Twitter</a>','yarpp');?>.</small></p>
|
263 |
|
264 |
|
|
|
|
|
|
|
|
|
265 |
<!--The Pool-->
|
266 |
-
|
267 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
<p><?php _e('"The Pool" refers to the pool of posts and pages that are candidates for display as related to the current entry.','yarpp');?></p>
|
269 |
|
270 |
<table class="form-table" style="margin-top: 0">
|
@@ -289,10 +305,15 @@ function load_display_discats() {
|
|
289 |
</tbody>
|
290 |
</table>
|
291 |
</div>
|
|
|
292 |
|
293 |
<!-- Relatedness -->
|
294 |
-
|
295 |
-
|
|
|
|
|
|
|
|
|
296 |
|
297 |
<p><?php _e('YARPP is different than the <a href="http://wasabi.pbwiki.com/Related%20Entries">previous plugins it is based on</a> as it limits the related posts list by (1) a maximum number and (2) a <em>match threshold</em>.','yarpp');?> <a href="#" class='info'><?php _e('more>','yarpp');?><span><?php _e('The higher the match threshold, the more restrictive, and you get less related posts overall. The default match threshold is 5. If you want to find an appropriate match threshhold, take a look at some post\'s related posts display and their scores. You can see what kinds of related posts are being picked up and with what kind of match scores, and determine an appropriate threshold for your site.','yarpp');?></span></a></p>
|
298 |
|
@@ -312,6 +333,7 @@ function load_display_discats() {
|
|
312 |
</tbody>
|
313 |
</table>
|
314 |
</div>
|
|
|
315 |
|
316 |
<script language="javascript">
|
317 |
//<!--
|
@@ -386,8 +408,12 @@ function load_display_discats() {
|
|
386 |
|
387 |
|
388 |
<!-- Display options -->
|
389 |
-
|
390 |
-
|
|
|
|
|
|
|
|
|
391 |
|
392 |
<table class="form-table" style="margin-top: 0;width:100%">
|
393 |
<?php
|
@@ -447,10 +473,15 @@ checkbox('auto_display',__("Automatically display related posts?",'yarpp')." <a
|
|
447 |
.sprintf(__("This option will add the code %s. Try turning it on, updating your options, and see the code in the code example to the right. These links and donations are greatly appreciated.", 'yarpp'),"<code>".htmlspecialchars(__("Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.",'yarpp'))."</code>") ."</span></a>"); ?>
|
448 |
</table>
|
449 |
</div>
|
|
|
450 |
|
451 |
<!-- Display options for RSS -->
|
452 |
-
|
453 |
-
|
|
|
|
|
|
|
|
|
454 |
|
455 |
<table class="form-table" style="margin-top: 0;width:100%">
|
456 |
<?php
|
@@ -511,126 +542,17 @@ checkbox('rss_excerpt_display',__("Display related posts in the descriptions?",'
|
|
511 |
<th class='th-full' colspan='2' scope='row'>"); ?>
|
512 |
</table>
|
513 |
</div>
|
514 |
-
|
515 |
-
<div style='border:1px solid #ddd;padding:8px;'>
|
516 |
-
<h3><?php _e('Advanced','yarpp');?></h3>
|
517 |
-
|
518 |
-
<table class="form-table" style="margin-top: 0">
|
519 |
-
<tr valign='top' colspan='2'><td><input class="thickbox button" type="button" value="<?php _e("Show cache status",'yarpp');?>" title="<?php _e('Related posts cache status','yarpp');?>" alt="#TB_inline?height=100&width=300&inlineId=yarpp-cache-status"/>
|
520 |
-
|
521 |
-
<!--<input class="thickbox button" type="button" value="Test queries" title="If you are having trouble getting YARPP to show results, try this test." alt="#TB_inline?height=500&width=500&inlineId=yarpp-test"/>-->
|
522 |
-
</td></tr>
|
523 |
-
</table>
|
524 |
-
</div>
|
525 |
-
|
526 |
-
<script type='text/javascript'>
|
527 |
-
//<!--
|
528 |
-
time=0;i=0;m=0;id=0;
|
529 |
-
timeout = 10000;
|
530 |
-
function yarppBuildRequest() {
|
531 |
-
jQuery.ajax({
|
532 |
-
url:'admin-ajax.php',
|
533 |
-
type: 'post',
|
534 |
-
data: {action:'yarpp_build_cache_action',i:i,m:m,id:id},
|
535 |
-
dataType: 'json',
|
536 |
-
timeout: timeout,
|
537 |
-
success: function (json) {
|
538 |
-
if (json.result == 'success') {
|
539 |
-
i = json.i;
|
540 |
-
m = json.m;
|
541 |
-
id = json.id;
|
542 |
-
time = time + parseFloat(json.time);
|
543 |
-
var remaining = Math.floor((m-i)*(time/i));
|
544 |
-
var min = Math.floor(remaining/60);
|
545 |
-
var sec = Math.floor(remaining - 60*min);
|
546 |
-
if (i < m) {
|
547 |
-
jQuery('#yarpp-bar').css('width',json.percent+'%');
|
548 |
-
jQuery('#yarpp-percentage').html(json.percent+'%');
|
549 |
-
jQuery('#yarpp-latest').html(json.title);
|
550 |
-
if (min > 0) {
|
551 |
-
jQuery('#yarpp-time').html(<?php echo str_replace('SEC',"'+sec+'",str_replace('MIN',"'+min+'",__("'MIN minute(s) and SEC second(s) remaining'",'yarpp')));?>);
|
552 |
-
} else {
|
553 |
-
jQuery('#yarpp-time').html(<?php echo str_replace('SEC',"'+sec+'",__("'SEC second(s) remaining'",'yarpp'));?>);
|
554 |
-
}
|
555 |
-
yarppBuildRequest();
|
556 |
-
} else {
|
557 |
-
jQuery('#build-display').html('<p><?php _e("Your related posts cache is now complete.",'yarpp');?><br/><small><?php echo str_replace('SEC',"'+(Math.floor(time*10)/10)+'",__('The SQL queries took SEC seconds.','yarpp'));?></small></p>');
|
558 |
-
}
|
559 |
-
return;
|
560 |
-
} else if (json.result == 'error') {
|
561 |
-
i = json.i;
|
562 |
-
m = json.m;
|
563 |
-
id = json.id;
|
564 |
-
jQuery('#yarpp-latest').html('<?php echo str_replace('TITLE',"'+json.title+'",__('There was an error while constructing the related posts for TITLE','yarpp'))?>');
|
565 |
-
} else {
|
566 |
-
jQuery('#yarpp-latest').html('<?php _e('Constructing the related posts timed out.','yarpp')?>');
|
567 |
-
}
|
568 |
-
timeout += 5000;
|
569 |
-
jQuery('#build-cache-button').show().val('<?php _e("Try to continue...",'yarpp');?>');
|
570 |
-
},
|
571 |
-
error: function(json) {
|
572 |
-
jQuery('#yarpp-latest').html('<?php _e('Constructing the related posts timed out.','yarpp')?>');
|
573 |
-
timeout += 5000;
|
574 |
-
jQuery('#build-cache-button').show().val('<?php _e("Try to continue...",'yarpp');?>');
|
575 |
-
}
|
576 |
-
});
|
577 |
-
return false;
|
578 |
-
}
|
579 |
-
//-->
|
580 |
-
</script>
|
581 |
-
|
582 |
-
<div id='yarpp-cache-status' style='display:none;'><p id='yarpp-cache-message'><?php echo str_replace('PERCENT',floor($cache_complete * 1000)/10,__("Your related posts cache is PERCENT% complete.",'yarpp'));?></p>
|
583 |
-
<center><input type='button' class='button' id='build-cache-button' value='build the cache now'/></center>
|
584 |
-
<div id='build-display' style='display:none;margin-top:15px;'>
|
585 |
-
<div class="progress-container" style='border: 1px solid #ccc; width: 200px; margin: 2px 5px 2px 0; padding: 1px; float: left; background: white;'>
|
586 |
-
<div id='yarpp-bar' style="width: 0%; height: 12px; background-color: #21759B;"> </div>
|
587 |
-
</div><div id='yarpp-percentage'>0%</div>
|
588 |
-
<p style='font-size: .8em' id='yarpp-latest'><?php _e('starting...','yarpp');?></p>
|
589 |
-
<p style='font-size: .8em' id='yarpp-time'></p>
|
590 |
-
</div>
|
591 |
-
</div>
|
592 |
-
|
593 |
-
<div id='yarpp-test' style='display:none;'>
|
594 |
-
<p>This test has been added in response to <a href='http://wordpress.org/support/topic/284209'>this thread</a> on wordpress.org. Once the bug is resolved, I will remove this screen.</p>
|
595 |
-
|
596 |
-
<h3>Cache stats:</h3>
|
597 |
-
|
598 |
-
<?php
|
599 |
-
$smct = $wpdb->get_row("select sum(ID = 0) as sm, count(*) as ct from {$wpdb->prefix}yarpp_related_cache");
|
600 |
-
echo "<p>Proportion of cached posts which have no related posts at all: ".(round(1000*$smct->sm/$smct->ct)/10)."%</p>";
|
601 |
-
|
602 |
-
if ((round(1000*$smct->sm/$smct->ct)/10) > 20) {
|
603 |
-
echo "<p><b>You seem to be affected by the bug I am trying to fix. Please run a test on a single query (below) and <a href=''>post the results here</a>.</b></p>";
|
604 |
-
?>
|
605 |
-
|
606 |
-
<h3>Query test:</h3>
|
607 |
-
|
608 |
-
<p>Please select a post with a good deal of content:</p>
|
609 |
-
|
610 |
-
<select name='test_post_ID' id='test_post_ID'>
|
611 |
-
<?php
|
612 |
-
$posts = $wpdb->get_results("select ID, post_title from $wpdb->posts where length(post_content) > 0 and post_type != 'revision' order by length(post_content) desc limit 20");
|
613 |
-
|
614 |
-
foreach ($posts as $post) {
|
615 |
-
echo "<option value='$post->ID'>$post->post_title</option>\n";
|
616 |
-
}
|
617 |
-
?>
|
618 |
-
</select>
|
619 |
-
|
620 |
-
<?php
|
621 |
-
}
|
622 |
-
else
|
623 |
-
echo "<p><b>You do not seem to be affected by the bug I'm trying to fix. Thank you.</b></p>";
|
624 |
-
?>
|
625 |
-
|
626 |
</div>
|
627 |
|
628 |
<div>
|
629 |
<p class="submit">
|
630 |
-
<input type="submit" name="update_yarpp" value="<?php _e("Update options",'yarpp')?>" />
|
631 |
<input type="submit" onclick='return confirm("<?php _e("Do you really want to reset your configuration?",'yarpp');?>");' class="yarpp_warning" name="reset_yarpp" value="<?php _e('Reset options','yarpp')?>" />
|
632 |
</p>
|
633 |
</div>
|
|
|
|
|
|
|
634 |
</form>
|
635 |
|
636 |
<?php
|
74 |
|
75 |
if (isset($_POST['update_yarpp'])) {
|
76 |
foreach (array_keys($yarpp_value_options) as $option) {
|
77 |
+
if (is_string($_POST[$option]))
|
78 |
+
yarpp_set_option($option,addslashes($_POST[$option]));
|
79 |
}
|
80 |
foreach (array('title','body','tags','categories') as $key) {
|
81 |
if (!isset($_POST[$key])) yarpp_set_option($key,1);
|
263 |
<p><small><?php _e('by <a href="http://mitcho.com/code/">mitcho (Michael 芳貴 Erlewine)</a>','yarpp');?>. <?php _e('Follow <a href="http://twitter.com/yarpp/">Yet Another Related Posts Plugin on Twitter</a>','yarpp');?>.</small></p>
|
264 |
|
265 |
|
266 |
+
<!-- <div style='border:1px solid #ddd;padding:8px;'>-->
|
267 |
+
<div id="poststuff" class="metabox-holder">
|
268 |
+
<div class="meta-box-sortables">
|
269 |
+
|
270 |
<!--The Pool-->
|
271 |
+
<script>
|
272 |
+
jQuery(document).ready(function($) {
|
273 |
+
$('.postbox').children('h3, .handlediv').click(function(){
|
274 |
+
$(this).siblings('.inside').toggle();
|
275 |
+
});
|
276 |
+
});
|
277 |
+
</script>
|
278 |
+
<div class='postbox'>
|
279 |
+
<div class="handlediv" title="<?php _e( 'Click to toggle' ); ?>">
|
280 |
+
<br/>
|
281 |
+
</div>
|
282 |
+
<h3 class='hndle'><span><?php _e('"The Pool"','yarpp');?></span></h3>
|
283 |
+
<div class='inside'>
|
284 |
<p><?php _e('"The Pool" refers to the pool of posts and pages that are candidates for display as related to the current entry.','yarpp');?></p>
|
285 |
|
286 |
<table class="form-table" style="margin-top: 0">
|
305 |
</tbody>
|
306 |
</table>
|
307 |
</div>
|
308 |
+
</div>
|
309 |
|
310 |
<!-- Relatedness -->
|
311 |
+
<div class='postbox'>
|
312 |
+
<div class="handlediv" title="<?php _e( 'Click to toggle' ); ?>">
|
313 |
+
<br/>
|
314 |
+
</div>
|
315 |
+
<h3 class='hndle'><span><?php _e('"Relatedness" options','yarpp');?></span></h3>
|
316 |
+
<div class='inside'>
|
317 |
|
318 |
<p><?php _e('YARPP is different than the <a href="http://wasabi.pbwiki.com/Related%20Entries">previous plugins it is based on</a> as it limits the related posts list by (1) a maximum number and (2) a <em>match threshold</em>.','yarpp');?> <a href="#" class='info'><?php _e('more>','yarpp');?><span><?php _e('The higher the match threshold, the more restrictive, and you get less related posts overall. The default match threshold is 5. If you want to find an appropriate match threshhold, take a look at some post\'s related posts display and their scores. You can see what kinds of related posts are being picked up and with what kind of match scores, and determine an appropriate threshold for your site.','yarpp');?></span></a></p>
|
319 |
|
333 |
</tbody>
|
334 |
</table>
|
335 |
</div>
|
336 |
+
</div>
|
337 |
|
338 |
<script language="javascript">
|
339 |
//<!--
|
408 |
|
409 |
|
410 |
<!-- Display options -->
|
411 |
+
<div class='postbox'>
|
412 |
+
<div class="handlediv" title="<?php _e( 'Click to toggle' ); ?>">
|
413 |
+
<br/>
|
414 |
+
</div>
|
415 |
+
<h3 class='hndle'><span><?php _e("Display options <small>for your website</small>",'yarpp');?></span></h3>
|
416 |
+
<div class='inside'>
|
417 |
|
418 |
<table class="form-table" style="margin-top: 0;width:100%">
|
419 |
<?php
|
473 |
.sprintf(__("This option will add the code %s. Try turning it on, updating your options, and see the code in the code example to the right. These links and donations are greatly appreciated.", 'yarpp'),"<code>".htmlspecialchars(__("Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.",'yarpp'))."</code>") ."</span></a>"); ?>
|
474 |
</table>
|
475 |
</div>
|
476 |
+
</div>
|
477 |
|
478 |
<!-- Display options for RSS -->
|
479 |
+
<div class='postbox'>
|
480 |
+
<div class="handlediv" title="<?php _e( 'Click to toggle' ); ?>">
|
481 |
+
<br/>
|
482 |
+
</div>
|
483 |
+
<h3 class='hndle'><span><?php _e("Display options <small>for RSS</small>",'yarpp');?></span></h3>
|
484 |
+
<div class='inside'>
|
485 |
|
486 |
<table class="form-table" style="margin-top: 0;width:100%">
|
487 |
<?php
|
542 |
<th class='th-full' colspan='2' scope='row'>"); ?>
|
543 |
</table>
|
544 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
545 |
</div>
|
546 |
|
547 |
<div>
|
548 |
<p class="submit">
|
549 |
+
<input type="submit" class='button-primary' name="update_yarpp" value="<?php _e("Update options",'yarpp')?>" />
|
550 |
<input type="submit" onclick='return confirm("<?php _e("Do you really want to reset your configuration?",'yarpp');?>");' class="yarpp_warning" name="reset_yarpp" value="<?php _e('Reset options','yarpp')?>" />
|
551 |
</p>
|
552 |
</div>
|
553 |
+
|
554 |
+
</div></div> <!--closing metabox containers-->
|
555 |
+
|
556 |
</form>
|
557 |
|
558 |
<?php
|
readme.txt
CHANGED
@@ -5,8 +5,8 @@ Author URI: http://mitcho.com/
|
|
5 |
Plugin URI: http://mitcho.com/code/yarpp/
|
6 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=66G4DATK4999L&item_name=mitcho%2ecom%2fcode%3a%20donate%20to%20Michael%20Yoshitaka%20Erlewine&no_shipping=0&no_note=1&tax=0¤cy_code=USD&lc=US&charset=UTF%2d8
|
7 |
Tags: related, posts, post, pages, page, RSS, feed, feeds
|
8 |
-
Requires at least: 2.
|
9 |
-
Tested up to: 2.
|
10 |
Stable tag: 3.0.13
|
11 |
|
12 |
Returns a list of related entries based on a unique algorithm for display on your blog and RSS feeds. A templating feature allows customization of the display.
|
@@ -26,6 +26,10 @@ This plugin requires that your database run on MySQL 4.1 or greater.
|
|
26 |
|
27 |
**Other plugins by mitcho**: [HookPress](http://wordpress.org/extend/plugins/hookpress/), [Markdown for WordPress and bbPress](http://wordpress.org/extend/plugins/markdown-for-wordpress-and-bbpress/), [WP-Smartdate](http://wordpress.org/extend/plugins/wp-smartdate/).
|
28 |
|
|
|
|
|
|
|
|
|
29 |
== Installation ==
|
30 |
|
31 |
= Auto display on your website =
|
@@ -34,10 +38,6 @@ This plugin requires that your database run on MySQL 4.1 or greater.
|
|
34 |
|
35 |
2. Activate the plugin.
|
36 |
|
37 |
-
3. Find the Related Posts (YARPP) settings page in your `wp-admin`. If you see a message telling you to build your cache, please build your cache. Otherwise, you will see no related posts anywhere.
|
38 |
-
|
39 |
-
NOTE: If you run a large and complex site and/or worry about your SQL query volume, it may be better to simply make sure the "compute related posts on the fly" option is turned on and *not* try to build the cache all at once.
|
40 |
-
|
41 |
= Auto display in your feeds =
|
42 |
|
43 |
Make sure the "display related posts in feeds" option is turned on if you would like to show related posts in your RSS and Atom feeds. The "display related posts in feeds" option can be used regardless of whether you auto display them on your website (and vice versa).
|
@@ -60,9 +60,7 @@ If your question isn't here, ask your own question at [the Wordpress.org forums]
|
|
60 |
|
61 |
= Every page just says "no related posts"! What's up with that? =
|
62 |
|
63 |
-
|
64 |
-
|
65 |
-
2. It is also possible that your related posts cache has not been built and the "compute related posts on the fly" option is also turned off. Please go to the Related Posts (YARPP) options page and either build the cache or turn on the "compute related posts on the fly" option.
|
66 |
|
67 |
= How do I turn off the match score next to the related posts? =
|
68 |
|
@@ -80,8 +78,6 @@ However, YARPP does have difficulty with languages that don't place spaces betwe
|
|
80 |
|
81 |
A little bit, yes. YARPP 3.0 introduced a new caching mechanism which greatly reduces the hit of the computationally intensive relatedness computation. In addition, *I highly recommend all YARPP users use a page-caching plugin, such as [WP-SuperCache](http://ocaoimh.ie/wp-super-cache/).*
|
82 |
|
83 |
-
If you are worried about your database load, do not manually build the cache—simply leave the "on the fly" caching option on, and it will build itself over time.
|
84 |
-
|
85 |
= I use DISQUS for comments. I can't access the YARPP options page! =
|
86 |
|
87 |
The DISQUS plugin loads some JavaScript voodoo which is interacting in weird ways with the AJAX in YARPP's options page. You can fix this by going to the DISQUS plugin advanced settings and turning on the "Check this if you have a problem with comment counts not showing on permalinks" option.
|
@@ -150,13 +146,17 @@ If you are a bilingual speaker of English and another language and an avid user
|
|
150 |
|
151 |
== Changelog ==
|
152 |
|
153 |
-
= 3.
|
154 |
-
*
|
155 |
-
* Fixed
|
156 |
-
*
|
157 |
-
* Added plugin incompatibility info for Pagebar.
|
158 |
* Bugfix: [a slash escaping bug](http://wordpress.org/support/topic/315560)
|
159 |
-
*
|
|
|
|
|
|
|
|
|
|
|
160 |
= 3.0.13 =
|
161 |
* Quick immediate bugfix to 3.0.12
|
162 |
= 3.0.12 =
|
5 |
Plugin URI: http://mitcho.com/code/yarpp/
|
6 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=66G4DATK4999L&item_name=mitcho%2ecom%2fcode%3a%20donate%20to%20Michael%20Yoshitaka%20Erlewine&no_shipping=0&no_note=1&tax=0¤cy_code=USD&lc=US&charset=UTF%2d8
|
7 |
Tags: related, posts, post, pages, page, RSS, feed, feeds
|
8 |
+
Requires at least: 2.8
|
9 |
+
Tested up to: 2.9
|
10 |
Stable tag: 3.0.13
|
11 |
|
12 |
Returns a list of related entries based on a unique algorithm for display on your blog and RSS feeds. A templating feature allows customization of the display.
|
26 |
|
27 |
**Other plugins by mitcho**: [HookPress](http://wordpress.org/extend/plugins/hookpress/), [Markdown for WordPress and bbPress](http://wordpress.org/extend/plugins/markdown-for-wordpress-and-bbpress/), [WP-Smartdate](http://wordpress.org/extend/plugins/wp-smartdate/).
|
28 |
|
29 |
+
= Testamonials =
|
30 |
+
|
31 |
+
"As most [sports betting](http://www.betus.com/) fans use our portal, [BetUS.com Sportsbook](http://www.betus.com/sportsbook/) works hard to maintain a high level of quality on their site. Mitcho and his amazing plugins help keep us moving our technology forward. Thank you Mitcho, and the [Wordpress](http://wordpress.org) team for your service and creativity!" - [BetUS.com](http://BetUS.com/)
|
32 |
+
|
33 |
== Installation ==
|
34 |
|
35 |
= Auto display on your website =
|
38 |
|
39 |
2. Activate the plugin.
|
40 |
|
|
|
|
|
|
|
|
|
41 |
= Auto display in your feeds =
|
42 |
|
43 |
Make sure the "display related posts in feeds" option is turned on if you would like to show related posts in your RSS and Atom feeds. The "display related posts in feeds" option can be used regardless of whether you auto display them on your website (and vice versa).
|
60 |
|
61 |
= Every page just says "no related posts"! What's up with that? =
|
62 |
|
63 |
+
Most likely you have "no related posts" right now as the default "match threshold" is too high. Here's what I recommend to find an appropriate match threshold: first, lower your match threshold in the YARPP prefs to something ridiculously low, like 1 or 0.5. Most likely the really low threshold will pull up many posts that aren't actually related (false positives), so look at some of your posts' related posts and their match scores. This will help you find an appropriate threshold. You want it lower than what you have now, but high enough so it doesn't have many false positives.
|
|
|
|
|
64 |
|
65 |
= How do I turn off the match score next to the related posts? =
|
66 |
|
78 |
|
79 |
A little bit, yes. YARPP 3.0 introduced a new caching mechanism which greatly reduces the hit of the computationally intensive relatedness computation. In addition, *I highly recommend all YARPP users use a page-caching plugin, such as [WP-SuperCache](http://ocaoimh.ie/wp-super-cache/).*
|
80 |
|
|
|
|
|
81 |
= I use DISQUS for comments. I can't access the YARPP options page! =
|
82 |
|
83 |
The DISQUS plugin loads some JavaScript voodoo which is interacting in weird ways with the AJAX in YARPP's options page. You can fix this by going to the DISQUS plugin advanced settings and turning on the "Check this if you have a problem with comment counts not showing on permalinks" option.
|
146 |
|
147 |
== Changelog ==
|
148 |
|
149 |
+
= 3.1 =
|
150 |
+
* New snazzy options screen
|
151 |
+
* Bugfix: Fixed related pages functionality
|
152 |
+
* Bugfix: [an issue with options saving](http://wordpress.org/support/topic/312637)
|
|
|
153 |
* Bugfix: [a slash escaping bug](http://wordpress.org/support/topic/315560)
|
154 |
+
* Minor fixes:
|
155 |
+
* Removing the confusing "on the fly caching" setting... it is always on now.
|
156 |
+
* Fixed `yarpp_settings_link` dependency when disabled.
|
157 |
+
* Breaks (<br />) are now stripped out of titles.
|
158 |
+
* Added plugin incompatibility info for Pagebar.
|
159 |
+
* Faster post saving.
|
160 |
= 3.0.13 =
|
161 |
* Quick immediate bugfix to 3.0.12
|
162 |
= 3.0.12 =
|
yarpp.php
CHANGED
@@ -3,13 +3,13 @@
|
|
3 |
Plugin Name: Yet Another Related Posts Plugin
|
4 |
Plugin URI: http://mitcho.com/code/yarpp/
|
5 |
Description: Returns a list of related entries based on a unique algorithm for display on your blog and RSS feeds. A templating feature allows customization of the display.
|
6 |
-
Version: 3.
|
7 |
Author: mitcho (Michael Yoshitaka Erlewine)
|
8 |
Author URI: http://mitcho.com/
|
9 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=66G4DATK4999L&item_name=mitcho%2ecom%2fcode%3a%20donate%20to%20Michael%20Yoshitaka%20Erlewine&no_shipping=0&no_note=1&tax=0¤cy_code=USD&lc=US&charset=UTF%2d8
|
10 |
*/
|
11 |
|
12 |
-
define('YARPP_VERSION','3.
|
13 |
|
14 |
require_once('includes.php');
|
15 |
require_once('related-functions.php');
|
3 |
Plugin Name: Yet Another Related Posts Plugin
|
4 |
Plugin URI: http://mitcho.com/code/yarpp/
|
5 |
Description: Returns a list of related entries based on a unique algorithm for display on your blog and RSS feeds. A templating feature allows customization of the display.
|
6 |
+
Version: 3.1b1
|
7 |
Author: mitcho (Michael Yoshitaka Erlewine)
|
8 |
Author URI: http://mitcho.com/
|
9 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=66G4DATK4999L&item_name=mitcho%2ecom%2fcode%3a%20donate%20to%20Michael%20Yoshitaka%20Erlewine&no_shipping=0&no_note=1&tax=0¤cy_code=USD&lc=US&charset=UTF%2d8
|
10 |
*/
|
11 |
|
12 |
+
define('YARPP_VERSION','3.1b1');
|
13 |
|
14 |
require_once('includes.php');
|
15 |
require_once('related-functions.php');
|