Yet Another Related Posts Plugin (YARPP) - Version 4.1.2

Version Description

  • Tested on Wordpress 3.8.
  • Added field boxes with API Key information to Domain page.
  • MyISAM check notice message was updated to better express what it does and a feedback message was added in case the fulltext index creation fails.
  • Bugfix: MyISAM check overwrite was broken since 4.1.x release.
  • Bugfix: PHP title not defined warning when creating new cache entry.
  • Bugfix: Uninstall script now deletes options with empty, false or 0 values.
  • Bugfix: Scrollbar functionality on YARPP Pro Domain Settings page.
Download this release

Release Info

Developer jeffparker
Plugin Icon 128x128 Yet Another Related Posts Plugin (YARPP)
Version 4.1.2
Comparing to
See all releases

Code changes from version 4.1.1 to 4.1.2

classes/YARPP_Admin.php CHANGED
@@ -319,7 +319,7 @@ class YARPP_Admin {
319
320
$out .=
321
'<p>'.
322
- 'We would really appreciate your input to help us continue to <a href="http://yarpp.com" target="_blank">improve the product</a>. We are primarily looking '.
323
'for country, domain, and date installed information. Please help us make YARPP better by providing this information and by filling '.
324
'out our quick, 5 question survey: <a href="http://www.surveymonkey.com/s/Z278L88" target="_blank">http://www.surveymonkey.com/s/Z278L88</a>'.
325
'</p>';
@@ -483,7 +483,6 @@ class YARPP_Admin {
483
484
/*
485
* AJAX SERVICES
486
- * TODO: Move to its own class.
487
*/
488
489
function ajax_display_exclude_terms() {
319
320
$out .=
321
'<p>'.
322
+ 'We would really appreciate your input to help us continue to <a href="http://www.yarpp.com" target="_blank">improve the product</a>. We are primarily looking '.
323
'for country, domain, and date installed information. Please help us make YARPP better by providing this information and by filling '.
324
'out our quick, 5 question survey: <a href="http://www.surveymonkey.com/s/Z278L88" target="_blank">http://www.surveymonkey.com/s/Z278L88</a>'.
325
'</p>';
483
484
/*
485
* AJAX SERVICES
486
*/
487
488
function ajax_display_exclude_terms() {
classes/YARPP_Cache.php CHANGED
@@ -186,11 +186,11 @@ abstract class YARPP_Cache {
186
187
$newsql .= 'ROUND(0';
188
189
- if (isset($weight['body']) && (int) $weight['body']) {
190
$newsql .= " + (MATCH (post_content) AGAINST ('".esc_sql($keywords['body'])."')) * ".absint($weight['body']);
191
}
192
193
- if (isset($weight['body']) && (int) $weight['title']) {
194
$newsql .= " + (MATCH (post_title) AGAINST ('".esc_sql($keywords['title'])."')) * ".absint($weight['title']);
195
}
196
@@ -267,7 +267,6 @@ abstract class YARPP_Cache {
267
}
268
269
private function tax_criteria($reference_ID, $taxonomy) {
270
- /* TODO: maybe reinforce the object term cache? */
271
$terms = get_the_terms($reference_ID, $taxonomy);
272
273
// if there are no terms of that tax
186
187
$newsql .= 'ROUND(0';
188
189
+ if (isset($weight['body']) && isset($weight['body']) && (int) $weight['body']) {
190
$newsql .= " + (MATCH (post_content) AGAINST ('".esc_sql($keywords['body'])."')) * ".absint($weight['body']);
191
}
192
193
+ if (isset($weight['body']) && isset($weight['title']) && (int) $weight['title']) {
194
$newsql .= " + (MATCH (post_title) AGAINST ('".esc_sql($keywords['title'])."')) * ".absint($weight['title']);
195
}
196
267
}
268
269
private function tax_criteria($reference_ID, $taxonomy) {
270
$terms = get_the_terms($reference_ID, $taxonomy);
271
272
// if there are no terms of that tax
classes/YARPP_Core.php CHANGED
@@ -55,7 +55,6 @@ class YARPP {
55
56
/**
57
* If we're using thumbnails, register yarpp-thumbnail size, if theme has not already.
58
- * TODO: make these UI-configurable?
59
* Note: see FAQ in the readme if you would like to change the YARPP thumbnail size.
60
*/
61
if ($this->diagnostic_using_thumbnails() && (!($dimensions = $this->thumbnail_dimensions()) || isset($dimensions['_default']))) {
@@ -210,7 +209,6 @@ class YARPP {
210
211
/*
212
* INFRASTRUCTURE
213
- * TODO: to a separate class.
214
*/
215
216
/**
@@ -228,19 +226,21 @@ class YARPP {
228
}
229
230
public function enabled() {
231
- if ($this->cache->is_enabled() === false) return false;
232
- if (!$this->diagnostic_fulltext_disabled()) return $this->diagnostic_fulltext_indices();
233
return true;
234
}
235
236
public function activate() {
237
238
- /* if it's not known to be disabled, but the indexes aren't there. */
239
if (!$this->diagnostic_fulltext_disabled() && !$this->diagnostic_fulltext_indices()) {
240
$this->enable_fulltext();
241
}
242
243
- if ($this->cache->is_enabled() === false) {
244
$this->cache->setup();
245
}
246
@@ -260,7 +260,6 @@ class YARPP {
260
/**
261
* DIAGNOSTICS
262
* @since 4.0 Moved into separate functions. Note return value types can differ.
263
- * TODO: Move to a separate class.
264
*/
265
public function diagnostic_myisam_posts() {
266
global $wpdb;
@@ -279,15 +278,18 @@ class YARPP {
279
return get_option('yarpp_fulltext_disabled', false);
280
}
281
282
- public function enable_fulltext( $override_myisam = false ) {
283
global $wpdb;
284
-
285
- /* TODO: Check the myisam_override option instead. */
286
- if (!$override_myisam) {
287
$table_type = $this->diagnostic_myisam_posts();
288
if ($table_type !== true) {
289
$this->disable_fulltext();
290
- return;
291
}
292
}
293
@@ -295,17 +297,25 @@ class YARPP {
295
$previous_value = $wpdb->hide_errors();
296
297
$wpdb->query("ALTER TABLE $wpdb->posts ADD FULLTEXT `yarpp_title` (`post_title`)");
298
- if (!empty($wpdb->last_error)) $this->disable_fulltext();
299
300
$wpdb->query("ALTER TABLE $wpdb->posts ADD FULLTEXT `yarpp_content` (`post_content`)");
301
- if (!empty($wpdb->last_error)) $this->disable_fulltext();
302
303
/* Restore previous setting */
304
$wpdb->show_errors($previous_value);
305
}
306
307
public function disable_fulltext() {
308
- if (get_option('yarpp_fulltext_disabled', false) === true) return;
309
310
/* Remove title and body weights: */
311
$weight = $this->get_option('weight');
@@ -319,7 +329,11 @@ class YARPP {
319
320
update_option('yarpp_fulltext_disabled', true);
321
}
322
-
323
public function diagnostic_fulltext_indices() {
324
global $wpdb;
325
$wpdb->get_results("SHOW INDEX FROM {$wpdb->posts} WHERE Key_name = 'yarpp_title' OR Key_name = 'yarpp_content'");
@@ -328,7 +342,11 @@ class YARPP {
328
329
public function diagnostic_hidden_metaboxes() {
330
global $wpdb;
331
- $raw = $wpdb->get_var("SELECT meta_value FROM $wpdb->usermeta WHERE meta_key = 'metaboxhidden_settings_page_yarpp' ORDER BY length(meta_value) ASC LIMIT 1");
332
333
if (!$raw) return $this->default_hidden_metaboxes;
334
@@ -364,7 +382,7 @@ class YARPP {
364
private $default_dimensions = array(
365
'width' => 120,
366
'height' => 120,
367
- 'crop' => false, // TODO: True for crop?
368
'size' => '120x120',
369
'_default' => true
370
);
@@ -735,7 +753,6 @@ class YARPP {
735
736
/*
737
* UTILITIES
738
- * TODO: Create its own class
739
*/
740
741
private $current_post;
@@ -1075,7 +1092,7 @@ class YARPP {
1075
"<p>".
1076
sprintf(
1077
__("Related posts brought to you by <a href='%s'>Yet Another Related Posts Plugin</a>.",'yarpp'),
1078
- 'http://yarpp.com'
1079
).
1080
"</p>\n";
1081
}
@@ -1257,7 +1274,7 @@ class YARPP {
1257
"Related posts brought to you by <a href='%s'>Yet Another Related Posts Plugin</a>.",
1258
'yarpp'
1259
),
1260
- 'http://yarpp.com'
1261
).
1262
"</p>\n";
1263
}
@@ -1435,7 +1452,6 @@ class YARPP {
1435
1436
/*
1437
* UTILS
1438
- * TODO: Move it to its own class.
1439
*/
1440
1441
/**
55
56
/**
57
* If we're using thumbnails, register yarpp-thumbnail size, if theme has not already.
58
* Note: see FAQ in the readme if you would like to change the YARPP thumbnail size.
59
*/
60
if ($this->diagnostic_using_thumbnails() && (!($dimensions = $this->thumbnail_dimensions()) || isset($dimensions['_default']))) {
209
210
/*
211
* INFRASTRUCTURE
212
*/
213
214
/**
226
}
227
228
public function enabled() {
229
+ if (!(bool) $this->cache->is_enabled()) return false;
230
+ if (!(bool) $this->diagnostic_fulltext_disabled()) return $this->diagnostic_fulltext_indices();
231
return true;
232
}
233
234
public function activate() {
235
236
+ /*
237
+ * If it's not known to be disabled, but the indexes aren't there.
238
+ */
239
if (!$this->diagnostic_fulltext_disabled() && !$this->diagnostic_fulltext_indices()) {
240
$this->enable_fulltext();
241
}
242
243
+ if ((bool) $this->cache->is_enabled() === false) {
244
$this->cache->setup();
245
}
246
260
/**
261
* DIAGNOSTICS
262
* @since 4.0 Moved into separate functions. Note return value types can differ.
263
*/
264
public function diagnostic_myisam_posts() {
265
global $wpdb;
278
return get_option('yarpp_fulltext_disabled', false);
279
}
280
281
+ public function enable_fulltext() {
282
global $wpdb;
283
+ /*
284
+ * If overwrite is not set go thru the normal process.
285
+ * Otherwise force it.
286
+ */
287
+ $overwrite = (bool) $this->get_option('myisam_override', false);
288
+ if (!$overwrite) {
289
$table_type = $this->diagnostic_myisam_posts();
290
if ($table_type !== true) {
291
$this->disable_fulltext();
292
+ return false;
293
}
294
}
295
297
$previous_value = $wpdb->hide_errors();
298
299
$wpdb->query("ALTER TABLE $wpdb->posts ADD FULLTEXT `yarpp_title` (`post_title`)");
300
+ if (!empty($wpdb->last_error)){
301
+ $this->disable_fulltext();
302
+ return false;
303
+ }
304
305
$wpdb->query("ALTER TABLE $wpdb->posts ADD FULLTEXT `yarpp_content` (`post_content`)");
306
+ if (!empty($wpdb->last_error)){
307
+ $this->disable_fulltext();
308
+ return false;
309
+ }
310
311
/* Restore previous setting */
312
$wpdb->show_errors($previous_value);
313
+
314
+ return true;
315
}
316
317
public function disable_fulltext() {
318
+ if ((bool) get_option('yarpp_fulltext_disabled', false) === true) return;
319
320
/* Remove title and body weights: */
321
$weight = $this->get_option('weight');
329
330
update_option('yarpp_fulltext_disabled', true);
331
}
332
+
333
+ /*
334
+ * Try to retrieve fulltext index from database.
335
+ * @return bool
336
+ */
337
public function diagnostic_fulltext_indices() {
338
global $wpdb;
339
$wpdb->get_results("SHOW INDEX FROM {$wpdb->posts} WHERE Key_name = 'yarpp_title' OR Key_name = 'yarpp_content'");
342
343
public function diagnostic_hidden_metaboxes() {
344
global $wpdb;
345
+ $raw = $wpdb->get_var(
346
+ "SELECT meta_value FROM $wpdb->usermeta ".
347
+ "WHERE meta_key = 'metaboxhidden_settings_page_yarpp' ".
348
+ "ORDER BY length(meta_value) ASC LIMIT 1"
349
+ );
350
351
if (!$raw) return $this->default_hidden_metaboxes;
352
382
private $default_dimensions = array(
383
'width' => 120,
384
'height' => 120,
385
+ 'crop' => false,
386
'size' => '120x120',
387
'_default' => true
388
);
753
754
/*
755
* UTILITIES
756
*/
757
758
private $current_post;
1092
"<p>".
1093
sprintf(
1094
__("Related posts brought to you by <a href='%s'>Yet Another Related Posts Plugin</a>.",'yarpp'),
1095
+ 'http://www.yarpp.com'
1096
).
1097
"</p>\n";
1098
}
1274
"Related posts brought to you by <a href='%s'>Yet Another Related Posts Plugin</a>.",
1275
'yarpp'
1276
),
1277
+ 'http://www.yarpp.com'
1278
).
1279
"</p>\n";
1280
}
1452
1453
/*
1454
* UTILS
1455
*/
1456
1457
/**
classes/YARPP_Meta_Boxes.php CHANGED
@@ -314,7 +314,7 @@ class YARPP_Meta_Box_Display_Web extends YARPP_Meta_Box {
314
$this->displayorder( 'order' );
315
316
$this->checkbox( 'promote_yarpp', __( "Help promote Yet Another Related Posts Plugin?", 'yarpp' )
317
- ." <span class='yarpp_help' data-help='" . esc_attr( 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( sprintf( __( "Related posts brought to you by <a href='%s'>Yet Another Related Posts Plugin</a>.", 'yarpp' ), 'http://yarpp.com' ) ) . "</code>" ) ) ."'>&nbsp;</span>" );
318
}
319
}
320
@@ -375,7 +375,7 @@ class YARPP_Meta_Box_Display_Feed extends YARPP_Meta_Box {
375
376
$this->displayorder( 'rss_order', 'rss_displayed' );
377
378
- $this->checkbox( 'rss_promote_yarpp', __( "Help promote Yet Another Related Posts Plugin?", 'yarpp' ) . " <span class='yarpp_help' data-help='" . esc_attr( 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( sprintf( __( "Related posts brought to you by <a href='%s'>Yet Another Related Posts Plugin</a>.", 'yarpp' ), 'http://yarpp.com' ) )."</code>" ) ) . "'>&nbsp;</span>", 'rss_displayed' );
379
}
380
}
381
@@ -396,11 +396,16 @@ class YARPP_Meta_Box_Contact extends YARPP_Meta_Box {
396
'</li>'.
397
'<li>'.
398
'<a href="http://twitter.com/yarpp" target="_blank">'.
399
- '<span class="icon icon-twitter"></span> '.__('YARPP on Twitter', 'yarpp').
400
'</a>'.
401
'</li>'.
402
'<li>'.
403
- '<a href="http://yarpp.com" target="_blank">'.
404
'<span class="icon icon-pro"></span> Learn more about YARPP'.
405
'</a>'.
406
'</li>'.
@@ -418,7 +423,7 @@ class YARPP_Meta_Box_Contact extends YARPP_Meta_Box {
418
419
add_meta_box(
420
'yarpp_display_optin',
421
- __('Help Improve YARPP', 'yarpp'),
422
array(
423
new YARPP_Meta_Box_Optin,
424
'display'
@@ -440,34 +445,27 @@ class YARPP_Meta_Box_Optin extends YARPP_Meta_Box {
440
function display() {
441
global $yarpp;
442
443
- /* TODO: fix this text and i18nize it */
444
- echo "<input type='checkbox' id='yarpp-optin' name='optin' value='true' ";
445
- checked(yarpp_get_option('optin') == 1);
446
- echo " /> ";
447
-
448
- echo(
449
- '<label for="yarpp-optin">'.
450
- __( 'Send usage data back to YARPP!', 'yarpp' ).
451
- '</label>'
452
- );
453
-
454
echo (
455
'<p>'.
456
- 'We would really appreciate your input to help us continue to improve the product. We are primarily looking '.
457
- 'for country, domain, and date installed information.'.
458
'</p>'.
459
'<p>'.
460
- 'Please help us make YARPP better providing this information and by filling out our quick, '.
461
- '5 question survey: '.
462
- '<a href="http://www.surveymonkey.com/s/Z278L88" target="_blank">'.
463
- 'http://www.surveymonkey.com/s/Z278L88'.
464
- '</a>'.
465
- '<br/><br/>'.
466
- '<input type="button" value="'.esc_attr(__('Learn More', 'yarpp')).'" id="yarpp-optin-learnmore" class="button button-small"/>'.
467
'<br/>'.
468
'</p>'
469
);
470
471
}/*end display*/
472
473
}/*YARPP_Meta_Box_Optin*/
314
$this->displayorder( 'order' );
315
316
$this->checkbox( 'promote_yarpp', __( "Help promote Yet Another Related Posts Plugin?", 'yarpp' )
317
+ ." <span class='yarpp_help' data-help='" . esc_attr( 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( sprintf( __( "Related posts brought to you by <a href='%s'>Yet Another Related Posts Plugin</a>.", 'yarpp' ), 'http://www.yarpp.com' ) ) . "</code>" ) ) ."'>&nbsp;</span>" );
318
}
319
}
320
375
376
$this->displayorder( 'rss_order', 'rss_displayed' );
377
378
+ $this->checkbox( 'rss_promote_yarpp', __( "Help promote Yet Another Related Posts Plugin?", 'yarpp' ) . " <span class='yarpp_help' data-help='" . esc_attr( 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( sprintf( __( "Related posts brought to you by <a href='%s'>Yet Another Related Posts Plugin</a>.", 'yarpp' ), 'http://www.yarpp.com' ) )."</code>" ) ) . "'>&nbsp;</span>", 'rss_displayed' );
379
}
380
}
381
396
'</li>'.
397
'<li>'.
398
'<a href="http://twitter.com/yarpp" target="_blank">'.
399
+ '<span class="icon icon-twitter"></span> '.__('YARPP on Twitter', 'yarpp').
400
'</a>'.
401
'</li>'.
402
'<li>'.
403
+ '<a href="https://www.facebook.com/YARPPRecommendationEngine" target="_blank">'.
404
+ '<span class="icon icon-facebook"></span> YARPP on Facebook'.
405
+ '</a>'.
406
+ '</li>'.
407
+ '<li>'.
408
+ '<a href="http://www.yarpp.com" target="_blank">'.
409
'<span class="icon icon-pro"></span> Learn more about YARPP'.
410
'</a>'.
411
'</li>'.
423
424
add_meta_box(
425
'yarpp_display_optin',
426
+ 'Get the Most Out of YARPP',
427
array(
428
new YARPP_Meta_Box_Optin,
429
'display'
445
function display() {
446
global $yarpp;
447
448
echo (
449
'<p>'.
450
+ 'Enable the free <a href="http://www.yarpp.com" target="_blank">YARPP Pro enhancements</a> to add even '.
451
+ 'more power to your blog or website!'.
452
+ '<br/><br/>'.
453
+ '<a href="'.plugins_url('/', dirname(__FILE__)).'includes/yarpp_switch.php" style="text-decoration:underline" class="yarpp_switch_button" data-go="pro">Turn them on now</a>&nbsp;&nbsp;'.
454
+ '<a href="http://www.yarpp.com" target="_blank" style="float:right;text-decoration:underline">Learn more</a>'.
455
'</p>'.
456
'<p>'.
457
+ 'We can continue to improve the YARPP product for you if we know how it&#39;s used. Please help us by '.
458
+ 'allowing usage data to be sent back.'.
459
'<br/>'.
460
'</p>'
461
);
462
463
+ echo (
464
+ '<input type="checkbox" id="yarpp-optin" name="optin" value="true" '.checked(yarpp_get_option('optin') == 1 ,true, false).'/>'.
465
+ '<label for="yarpp-optin">Send usage data back.</label>'.
466
+ '<a href="#" id="yarpp-optin-learnmore" style="float:right;text-decoration:underline">Learn More</a>'
467
+ );
468
+
469
}/*end display*/
470
471
}/*YARPP_Meta_Box_Optin*/
images/sprites-2x.png CHANGED
Binary file
images/sprites.png CHANGED
Binary file
includes/yarpp_myisam_notice.php ADDED
@@ -0,0 +1,88 @@
1
+ <?php
2
+
3
+ if (isset($_POST['myisam_override'])) {
4
+
5
+ yarpp_set_option('myisam_override', true);
6
+ $enabled = $yarpp->enable_fulltext();
7
+
8
+ if($enabled){
9
+
10
+ update_option('yarpp_fulltext_disabled', 0);
11
+ echo(
12
+ '<div class="updated" style="padding:5px">'.
13
+ __(
14
+ 'The MyISAM check has been overridden. You may now use the "consider titles" and "consider bodies" relatedness criteria.',
15
+ 'yarpp'
16
+ ).
17
+ "</div>"
18
+ );
19
+
20
+ } else {
21
+
22
+ yarpp_set_option('myisam_override', 0);
23
+ echo(
24
+ '<div class="updated" style="padding:5px">'.
25
+ '<span style="color:red;font-weight:bold">Fulltext Index creation did not work!</span><br/>'.
26
+ 'Trying to force fulltext indexing on your table resulted in an error. Your posts table does not have fulltext indexing capabilities.<br/>'.
27
+ 'The "consider titles" and "consider bodies" relatedness criteria will remain disabled.'.
28
+ '</div>'
29
+ );
30
+
31
+ }
32
+ }
33
+
34
+ $table_type = $yarpp->diagnostic_myisam_posts();
35
+ if ((bool) $table_type !== true) $yarpp->disable_fulltext();
36
+
37
+ if (!(bool) yarpp_get_option('myisam_override') && (bool) $yarpp->diagnostic_fulltext_disabled()) {
38
+ echo(
39
+ "<div class='updated' style='padding:15px'>".
40
+ '<p>'.
41
+ '<strong>"Consider Titles"</strong> and <strong>"Consider Bodies"</strong> are currently disabled.'.
42
+ '&nbsp;&nbsp;<a href="#" id="yarpp_fulltext_expand">Show Details [+]</a>'.
43
+ '</p>'.
44
+ '<div id="yarpp_fulltext_details" class="hidden">'.
45
+ '<p>'.
46
+ sprintf(
47
+ 'YARPP&#39;s "consider titles" and "consider bodies" relatedness criteria require your <code>%s</code> '.
48
+ 'table to use the <code>MyISAM</code> engine'.
49
+ 'fulltext indexing feature. Unfortunately your table seems to be using the <code>%s</code> engine. '.
50
+ 'Because fulltext indexing is not supported by your current table engine, these two options have been disabled.',
51
+ $wpdb->posts,
52
+ $table_type
53
+ ).
54
+ '</p>'.
55
+ '<p>'.
56
+ sprintf(
57
+ 'To restore these features, please do the following:<br/>'.
58
+ '<ol>'.
59
+ '<li>'.
60
+ 'Convert your <code>%s</code> table to <code>MyISAM</code> engine by executing the '.
61
+ 'following SQL code on your MySQL client or terminal:<br/>'.
62
+ '<code style="display:inline-block;margin:1.5em 1em">ALTER TABLE `%s` ENGINE = MyISAM;</code>'.
63
+ '</li>',
64
+ $wpdb->posts,
65
+ $wpdb->posts
66
+ ).
67
+ sprintf(
68
+ '<li>'.
69
+ 'Once your <code>%s</code> table has been successfully converted to the <code>MyISAM</code> engine, '.
70
+ 'click the button below to create the fulltext indices.<br/>',
71
+ $wpdb->posts
72
+ ).
73
+ '<form method="post" style="display:inline-block;margin:1.5em 1em">'.
74
+ "<input type='submit' class='button' name='myisam_override' value='Create fulltext indexes'/>".
75
+ "</form>".
76
+ '</li>'.
77
+ '</ol>'.
78
+ "</p>".
79
+ '<p>'.
80
+ 'Note that, although no data should be lost by altering the table&#39;s engine, it is always recommended to perform a '.
81
+ 'full backup of the data before attempting to perform changes to your database.<br/>'.
82
+ 'See MySQL <a href="http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html" target="_blank">storage engines</a> '.
83
+ 'documentation for details on MySQL engines.'.
84
+ '</p>'.
85
+ '</div>'.
86
+ "</div>"
87
+ );
88
+ }
includes/yarpp_options.php CHANGED
@@ -4,6 +4,10 @@ global $wpdb, $wp_version, $yarpp;
4
/* Enforce YARPP setup: */
5
$yarpp->enforce();
6
7
/* Check to see that templates are in the right place */
8
if (!$yarpp->diagnostic_custom_templates()) {
9
@@ -65,66 +69,15 @@ if (current_user_can('update_plugins')) {
65
}
66
}
67
68
- /* MyIsam message */
69
- if (isset($_POST['myisam_override'])) {
70
- yarpp_set_option('myisam_override', 1);
71
-
72
- echo(
73
- "<div class='updated'>"
74
- .__("The MyISAM check has been overridden. You may now use the \"consider titles\" and \"consider bodies\" relatedness criteria.",'yarpp')
75
- ."</div>"
76
- );
77
-
78
- $yarpp->enable_fulltext(true);
79
- }
80
-
81
- $table_type = $yarpp->diagnostic_myisam_posts();
82
-
83
- if ($table_type !== true) $yarpp->disable_fulltext();
84
-
85
- if (!yarpp_get_option('myisam_override') && $yarpp->diagnostic_fulltext_disabled()) {
86
- echo(
87
- "<div class='updated'>".
88
- sprintf(
89
- __("YARPP's \"consider titles\" and \"consider bodies\" relatedness criteria require your <code>%s</code>
90
- table to use the <a href='http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html'>MyISAM storage engine</a>,
91
- but the table seems to be using the <code>%s</code> engine. These two options have been disabled.",'yarpp'),
92
- $wpdb->posts,
93
- $table_type
94
- ).
95
- "<br />".
96
- sprintf(
97
- __("To restore these features, please update your <code>%s</code> table by executing the following SQL
98
- directive: <code>ALTER TABLE `%s` ENGINE = MyISAM;</code> . No data will be erased by altering the
99
- table's engine, although there are performance implications.",'yarpp'),
100
- $wpdb->posts,
101
- $wpdb->posts
102
- ).
103
- "<br />".
104
- sprintf(
105
- __("If, despite this check, you are sure that <code>%s</code> is using the MyISAM engine, press this magic
106
- button:",'yarpp'),
107
- $wpdb->posts
108
- ).
109
- "<br />".
110
- "<form method='post'>".
111
- "<input type='submit' class='button' name='myisam_override' value='".__("Trust me. Let me use MyISAM features.",'yarpp')."'/>".
112
- "</form>"
113
- ."</div>"
114
- );
115
- }
116
-
117
- if(!$yarpp->enabled() && !$yarpp->activate()) {
118
- echo '<div class="updated">'.__('The YARPP database has an error which could not be fixed.','yarpp').'</div>';
119
- }
120
121
- /* This is not a yarpp pluging update, it is an yarpp uption update */
122
if (isset($_POST['update_yarpp'])) {
123
$new_options = array();
124
foreach ($yarpp->default_options as $option => $default) {
125
if ( is_bool($default) )
126
$new_options[$option] = isset($_POST[$option]);
127
- // @todo: do we really want to stripslashes here anymore?
128
if ( (is_string($default) || is_int($default)) &&
129
isset($_POST[$option]) && is_string($_POST[$option]) )
130
$new_options[$option] = stripslashes($_POST[$option]);
@@ -191,8 +144,6 @@ if (!count($yarpp->admin->get_templates()) && $yarpp->admin->can_copy_templates(
191
wp_nonce_field('yarpp_copy_templates', 'yarpp_copy_templates-nonce', false);
192
}
193
194
- $switch = (isset($_GET['go']) && $_GET['go'] === 'pro') ? true : false;
195
-
196
?>
197
198
<div class="wrap">
@@ -204,75 +155,24 @@ $switch = (isset($_GET['go']) && $_GET['go'] === 'pro') ? true : false;
204
</h2>
205
206
<div id="yarpp_switch_container">
207
-
208
<ul id="yarpp_switch_tabs">
209
- <li class="<?php echo (($switch) ? 'disabled': null)?>">
210
<a href="options-general.php?page=yarpp">YARPP Basic</a>
211
</li>
212
- <li class="<?php echo (($switch) ? null : 'disabled')?>">
213
- <a href="options-general.php?page=yarpp&go=pro">YARPP Pro</a>
214
</li>
215
</ul>
216
217
- <?php if ($switch): ?>
218
-
219
- <div class="yarpp_switch_content">
220
- <h1>YARPP Pro is now available!</h1>
221
- <p>
222
- Access more powerful features with <em>YARPP Pro</em>! Try it today for <strong>FREE</strong>, switch back at any
223
- time with no lost custom settings. <a href="http://www.yarpp.com" target="_blank">Find out more.</a>
224
- </p>
225
- <ul>
226
- <li>
227
- Make money by displaying sponsored ads.
228
- </li>
229
- <li>
230
- Easily customize thumbnail display.
231
- </li>
232
- <li>
233
- Pull related content from multiple domains.
234
- </li>
235
- <li>
236
- Get detailed traffic reports.
237
- </li>
238
- <li>
239
- No lost settings. Trying <em>YARPP Pro</em> will not delete your Basic settings. Switch back any time.
240
- </li>
241
- <li>
242
- You at decide how much sponsored ad content to display, from 25% to 100% of your related content.
243
- When visitors click, you get paid.<br/>
244
- <em>(Note: Ad content will be loaded from an external site and usage data will be sent back to YARPP servers.)</em>
245
- </li>
246
- <li>
247
- <em>YARPP Pro</em> does not support non-English ad content at this time so non-English sites will not
248
- display sponsored ads.
249
- </li>
250
- <li>
251
- <em>YARPP Pro</em> does not support custom post types at this time.
252
- </li>
253
- <li>
254
- Some <em>YARPP Basic</em> features may not yet be available in <em>YARPP Pro</em>.
255
- </li>
256
- </ul>
257
- <p>
258
- <a href="<?php echo plugins_url('includes/', dirname(__FILE__)).'yarpp_switch.php' ?>" id="yarpp_switch_button" data-go="pro" class="button">
259
- Enable YARPP Pro for FREE!
260
- </a>
261
- &nbsp;&nbsp
262
- <a href="options-general.php?page=yarpp" id="yarpp_switch_cancel" class="button">No, thanks</a>
263
- </p>
264
- </div>
265
-
266
- <?php else: ?>
267
-
268
- <div class="yarpp_switch_content">
269
- <p>
270
- The settings below allow you to configure the basic version of Yet Another Related Post Plugin (YARPP).
271
- Click on the "YARPP Pro" tab for enhanced functionality: Make money by displaying sponsored ads,
272
- further customize thumbnail display, pull related content from multiple domains, and get detailed
273
- reporting. <a href="http://yarpp.com" target="_blank">Learn more.</a>
274
- </p>
275
- </div>
276
</div>
277
278
<form method="post">
@@ -310,6 +210,4 @@ $switch = (isset($_GET['go']) && $_GET['go'] === 'pro') ? true : false;
310
311
</form>
312
313
- <?php endif ?>
314
-
315
</div>
4
/* Enforce YARPP setup: */
5
$yarpp->enforce();
6
7
+ if(!$yarpp->enabled() && !$yarpp->activate()) {
8
+ echo '<div class="updated">'.__('The YARPP database has an error which could not be fixed.','yarpp').'</div>';
9
+ }
10
+
11
/* Check to see that templates are in the right place */
12
if (!$yarpp->diagnostic_custom_templates()) {
13
69
}
70
}
71
72
+ /* MyISAM Check */
73
+ include 'yarpp_myisam_notice.php';
74
75
+ /* This is not a yarpp pluging update, it is an yarpp option update */
76
if (isset($_POST['update_yarpp'])) {
77
$new_options = array();
78
foreach ($yarpp->default_options as $option => $default) {
79
if ( is_bool($default) )
80
$new_options[$option] = isset($_POST[$option]);
81
if ( (is_string($default) || is_int($default)) &&
82
isset($_POST[$option]) && is_string($_POST[$option]) )
83
$new_options[$option] = stripslashes($_POST[$option]);
144
wp_nonce_field('yarpp_copy_templates', 'yarpp_copy_templates-nonce', false);
145
}
146
147
?>
148
149
<div class="wrap">
155
</h2>
156
157
<div id="yarpp_switch_container">
158
<ul id="yarpp_switch_tabs">
159
+ <li>
160
<a href="options-general.php?page=yarpp">YARPP Basic</a>
161
</li>
162
+ <li class="disabled">
163
+ <a href="<?php echo plugins_url('/', dirname(__FILE__)) ?>includes/yarpp_switch.php" class="yarpp_switch_button" data-go="pro">YARPP Pro</a>
164
</li>
165
</ul>
166
167
+ <div class="yarpp_switch_content">
168
+ <p>
169
+ The settings bellow allow you to configure the basic version of Yet Another Related Post Plugin (YARPP).
170
+ Click on the "YARPP Pro" tab for enhanced functionality: <strong>Earn money</strong> from sponsored ads,
171
+ easily <strong>customize thumbnail layout</strong>, pull related posts from <strong>multiple sites</strong>
172
+ , and get <strong>detailed reporting.</strong>&nbsp;&nbsp;
173
+ <a href="http://www.yarpp.com" target="_blank">Learn more.</a>
174
+ </p>
175
+ </div>
176
</div>
177
178
<form method="post">
210
211
</form>
212
213
</div>
includes/yarpp_pro_options.php CHANGED
@@ -3,18 +3,24 @@
3
$switch = (isset($_GET['go']) && $_GET['go'] === 'basic') ? $switch = true : null;
4
5
if (isset($_GET['aid']) && isset($_GET['v']) && isset($_GET['st'])) {
6
-
7
$yarpp->yarppPro['aid'] = (trim($_GET['aid']) !== '') ? $_GET['aid'] : null;
8
$yarpp->yarppPro['st'] = (trim($_GET['st']) !== '') ? rawurlencode($_GET['st']) : null;
9
$yarpp->yarppPro['v'] = (trim($_GET['v']) !== '') ? rawurlencode($_GET['v']) : null;
10
11
update_option('yarpp_pro', $yarpp->yarppPro);
12
13
}
14
15
$src = urlencode(admin_url().'options-general.php?page='.$_GET['page']);
16
$aid = (isset($yarpp->yarppPro['aid']) && $yarpp->yarppPro['aid']) ? $yarpp->yarppPro['aid'] : 0;
17
$st = (isset($yarpp->yarppPro['st']) && $yarpp->yarppPro['st']) ? $yarpp->yarppPro['st'] : 0;
18
$d = urlencode(get_home_url());
19
$url = 'https://yarpp.adkengage.com/AdcenterUI/PublisherUI/PublisherDashboard.aspx?src='.$src.'&d='.$d.'&aid='.$aid.'&st='.$st.'&plugin=1';
20
?>
@@ -34,8 +40,7 @@
34
<?php echo apply_filters('yarpp_version_html', esc_html(get_option('yarpp_version'))) ?>
35
</small>
36
</h2>
37
- <div id="yarpp_switch_container">
38
-
39
<ul id="yarpp_switch_tabs">
40
<li class="<?php echo (($switch) ? null : 'disabled')?>">
41
<a href="options-general.php?page=yarpp&go=basic">YARPP Basic</a>
@@ -44,10 +49,8 @@
44
<a href="options-general.php?page=yarpp">YARPP Pro</a>
45
</li>
46
</ul>
47
-
48
<div class="yarpp_switch_content">
49
<?php if ($switch): ?>
50
-
51
<p>
52
You currently have <em>YARPP Pro</em> enabled, giving you access to even more powerful features.
53
</p>
@@ -58,7 +61,7 @@
58
multiple domains.
59
</p>
60
<p>
61
- <a href="<?php echo plugins_url('includes/',dirname(__FILE__)).'yarpp_switch.php' ?>" id="yarpp_switch_button" data-go="basic" class="button">
62
I only want access to <em>YARPP Basic</em> features
63
</a>
64
&nbsp;&nbsp
@@ -66,21 +69,70 @@
66
No, thanks. Keep <em>YARPP Pro</em> features enabled
67
</a>
68
</p>
69
-
70
<?php else: ?>
71
-
72
<p>
73
- The settings below allow you to configure the additional features of <em>YARPP Pro</em>. Make money by displaying
74
- sponsored ads, easily customize thumbnail display, pull related content from multiple domains, and get
75
- detailed reporting.
76
</p>
77
-
78
<?php endif ?>
79
</div>
80
81
- </div>
82
<?php if (!$switch): ?>
83
- <iframe id="yarpp_pro_dashboard" src="<?php echo $url ?>" frameborder="0" border="0" cellspacing="0" scrolling="no">'.
84
- </iframe>
85
<?php endif ?>
86
</div>
3
$switch = (isset($_GET['go']) && $_GET['go'] === 'basic') ? $switch = true : null;
4
5
if (isset($_GET['aid']) && isset($_GET['v']) && isset($_GET['st'])) {
6
$yarpp->yarppPro['aid'] = (trim($_GET['aid']) !== '') ? $_GET['aid'] : null;
7
$yarpp->yarppPro['st'] = (trim($_GET['st']) !== '') ? rawurlencode($_GET['st']) : null;
8
$yarpp->yarppPro['v'] = (trim($_GET['v']) !== '') ? rawurlencode($_GET['v']) : null;
9
10
update_option('yarpp_pro', $yarpp->yarppPro);
11
+ }
12
13
+ if (isset($_POST['aid']) && isset($_POST['v'])) {
14
+ $yarpp->yarppPro['aid'] = (trim($_POST['aid']) !== '') ? $_POST['aid'] : null;
15
+ $yarpp->yarppPro['v'] = (trim($_POST['v']) !== '') ? $_POST['v'] : null;
16
+
17
+ update_option('yarpp_pro', $yarpp->yarppPro);
18
}
19
20
$src = urlencode(admin_url().'options-general.php?page='.$_GET['page']);
21
$aid = (isset($yarpp->yarppPro['aid']) && $yarpp->yarppPro['aid']) ? $yarpp->yarppPro['aid'] : 0;
22
$st = (isset($yarpp->yarppPro['st']) && $yarpp->yarppPro['st']) ? $yarpp->yarppPro['st'] : 0;
23
+ $v = (isset($yarpp->yarppPro['v']) && $yarpp->yarppPro['v']) ? $yarpp->yarppPro['v'] : 0;
24
$d = urlencode(get_home_url());
25
$url = 'https://yarpp.adkengage.com/AdcenterUI/PublisherUI/PublisherDashboard.aspx?src='.$src.'&d='.$d.'&aid='.$aid.'&st='.$st.'&plugin=1';
26
?>
40
<?php echo apply_filters('yarpp_version_html', esc_html(get_option('yarpp_version'))) ?>
41
</small>
42
</h2>
43
+ <div id="yarpp_switch_container">
44
<ul id="yarpp_switch_tabs">
45
<li class="<?php echo (($switch) ? null : 'disabled')?>">
46
<a href="options-general.php?page=yarpp&go=basic">YARPP Basic</a>
49
<a href="options-general.php?page=yarpp">YARPP Pro</a>
50
</li>
51
</ul>
52
<div class="yarpp_switch_content">
53
<?php if ($switch): ?>
54
<p>
55
You currently have <em>YARPP Pro</em> enabled, giving you access to even more powerful features.
56
</p>
61
multiple domains.
62
</p>
63
<p>
64
+ <a href="<?php echo plugins_url('includes/',dirname(__FILE__)).'yarpp_switch.php' ?>" data-go="basic" class="button yarpp_switch_button">
65
I only want access to <em>YARPP Basic</em> features
66
</a>
67
&nbsp;&nbsp
69
No, thanks. Keep <em>YARPP Pro</em> features enabled
70
</a>
71
</p>
72
<?php else: ?>
73
<p>
74
+ <strong>Access more powerful features with YARPP Pro!</strong>
75
+ <br/>
76
+ <ul>
77
+ <li>Earn money from sponsored content</li>
78
+ <li>Pull related content from multiples sites</li>
79
+ </ul>
80
+ <ul>
81
+ <li>Easily customize thumbnail layout</li>
82
+ <li>Get detailed traffic reports</li>
83
+ </ul>
84
+ <div class="clear"></div>
85
</p>
86
<?php endif ?>
87
</div>
88
+ </div>
89
90
<?php if (!$switch): ?>
91
+ <div id="yarpp_pro_dashboard_wrapper">
92
+ <iframe
93
+ id="yarpp_pro_dashboard"
94
+ src="<?php echo $url ?>"
95
+ frameborder="0"
96
+ border="0"
97
+ cellspacing="0"
98
+ scrolling="yes"
99
+ >
100
+ </iframe>
101
+ </div>
102
+
103
+ <!-- MARK: API Setting override (uncomment ajax handler on options_switch.js lines 17-38)
104
+ <div class="postbox">
105
+ <h3 class="hndle">
106
+ <span style="margin-left:0.8em">API Settings</span>
107
+ </h3>
108
+ <div class="inside">
109
+ <div id="yarpp_pro_api_settings_note" class="yarpp_form_row">
110
+ <p>
111
+ Explanation of what, why and how to use this box!!!!
112
+ </p>
113
+ <br/>
114
+ <a id="yarpp_pro_api_settings_unlock" class="button">Unlock API Settings</a>
115
+ </div>
116
+ <form id="yarpp_pro_api_settings" action="?page=yarpp" method="post">
117
+
118
+ <div class="yarpp_form_row">
119
+ <label class="yarpp_pro_label">Affiliate ID: </label>
120
+ <input id="yarpp_pro_aid" type="text" name="aid" value="<?php echo ($aid) ? $aid : null ?>" disabled />
121
+ <span class="yarpp_warning"></span>
122
+ </div>
123
+
124
+ <div class="yarpp_form_row">
125
+ <label class="yarpp_pro_label">API Key: </label>
126
+ <input id="yarpp_pro_api_key" type="text" name="v" value="<?php echo ($v) ? $v : null ?>" disabled />
127
+ <span class="yarpp_warning"></span>
128
+ </div>
129
+
130
+ <div class="yarpp_form_row">
131
+ <input id="yarpp_pro_settings_submit" class="submit-btn" type="submit" value="Save API Settings" disabled />
132
+ </div>
133
+ </form>
134
+ </div>
135
+ </div>
136
+ -->
137
<?php endif ?>
138
</div>
js/options_basic.js CHANGED
@@ -271,4 +271,19 @@ jQuery(function($) {
271
}
272
$('.yarpp_form_post_types input[type=checkbox]').change(auto_display_archive);
273
auto_display_archive();
274
});
271
}
272
$('.yarpp_form_post_types input[type=checkbox]').change(auto_display_archive);
273
auto_display_archive();
274
+
275
+ $("#yarpp_fulltext_expand").click(function(e){
276
+ e.preventDefault();
277
+ var $details = $("#yarpp_fulltext_details");
278
+
279
+ $details.slideToggle();
280
+
281
+ if ($details.hasClass('hidden')) {
282
+ $details.removeClass('hidden');
283
+ $(this).text('Hide Details [-]');
284
+ }else{
285
+ $details.addClass('hidden');
286
+ $(this).text('Show Details [+]');
287
+ }
288
+ });
289
});
js/options_switch.js CHANGED
@@ -1,5 +1,5 @@
1
jQuery(document).ready(function($){
2
- $('#yarpp_switch_button').click(function(e){
3
e.preventDefault();
4
var url = $(this).attr('href'),
5
data = { go : $(this).data('go') };
@@ -14,4 +14,26 @@ jQuery(document).ready(function($){
14
}
15
);
16
});
17
});
1
jQuery(document).ready(function($){
2
+ $('.yarpp_switch_button').click(function( e){
3
e.preventDefault();
4
var url = $(this).attr('href'),
5
data = { go : $(this).data('go') };
14
}
15
);
16
});
17
+ /* MARK: API Setting override
18
+ $('#yarpp_pro_api_settings_unlock').click(function(){
19
+ $('#yarpp_pro_aid, #yarpp_pro_api_key, #yarpp_pro_settings_submit').attr('disabled',false);
20
+ $('#yarpp_pro_aid').focus();
21
+ $(this).attr('disabled',true);
22
+ });
23
+
24
+ $('#yarpp_pro_api_settings_unlock').click(function(){
25
+ $('#yarpp_pro_aid, #yarpp_pro_api_key').attr('disabled',false);
26
+ $('#yarpp_pro_aid').focus();
27
+ });
28
+
29
+ $('#yarpp_pro_api_settings').submit(function(e){
30
+ $('#yarpp_pro_aid, #yarpp_pro_api_key').each(function (idx,obj){
31
+ if ($(obj).val() === ''){
32
+ var msg = 'This field is empty. Please be sure to fill-in the right data before proceeding.';
33
+ $(obj).next('.yarpp_warning').html(msg).css('display','inline-block');
34
+ e.preventDefault();
35
+ }
36
+ });
37
+ });
38
+ */
39
});
lang/yarpp-gb_IR.po CHANGED
@@ -518,7 +518,7 @@ msgstr ""
518
#: options-meta-boxes.php:205
519
#: options-meta-boxes.php:269
520
#@ yarpp
521
- msgid "Related posts brought to you by <a href='http://yarpp.com'>Yet Another Related Posts Plugin</a>."
522
msgstr ""
523
524
#: options-meta-boxes.php:283
518
#: options-meta-boxes.php:205
519
#: options-meta-boxes.php:269
520
#@ yarpp
521
+ msgid "Related posts brought to you by <a href='http://www.yarpp.com'>Yet Another Related Posts Plugin</a>."
522
msgstr ""
523
524
#: options-meta-boxes.php:283
readme.txt CHANGED
@@ -1,65 +1,40 @@
1
=== Yet Another Related Posts Plugin (YARPP) ===
2
Contributors: jeffparker
3
Author: Adknowledge
4
- Author URI: http://yarpp.com/
5
- Plugin URI: http://yarpp.com/
6
Tags: feeds, pages, posts, related, rss, yarpp, ads, multisite, multilingual, thumbnails, related posts, related content
7
Requires at least: 3.3
8
- Tested up to: 3.7.1
9
- Stable tag: 4.1.1
10
License: GPLv2 or later
11
12
- Display a list of related entries on your site and feeds based on a unique algorithm. Now with thumbnail support built-in!
13
14
== Description ==
15
16
Yet Another Related Posts Plugin (YARPP) displays pages, posts, and custom post types related to the current entry, introducing your readers to other relevant content on your site.
17
18
- **YARPP Basic Features**
19
-----------------------------------------
20
- * **Thumbnails or list view** of related content.
21
- * **Related posts, pages, and custom post types**.
22
- * **Templating**: The YARPP templating system gives you advanced control of how your results are displayed.
23
- * **An advanced and versatile algorithm**: Using a customizable algorithm considering post titles, content, tags, categories, and custom taxonomies, YARPP finds related content from across your site. [Learn more](http://wordpress.tv/2011/01/29/michael-%E2%80%9Cmitcho%E2%80%9D-erlewine-the-yet-another-related-posts-plugin-algorithm-explained/).
24
- * **Caching**: YARPP is performant, caching related posts data as your site is visited.
25
- * **Related posts in feeds**: Display related posts in RSS feeds with custom display options.
26
27
- This plugin requires PHP 5, MySQL 4.1, and WordPress 3.3 or greater. See [the FAQ](http://wordpress.org/plugins/yet-another-related-posts-plugin/faq/) for answers to common questions.
28
29
- **Enable YARPP Pro for Powerful Enhancements**
30
-------------------------------------------
31
- * Make money by displaying relevant sponsored ads.
32
- * Customize thumbnail display through the user interface.
33
- * Pull related content from multiple domains.
34
- * Get detailed reporting about your related content list.
35
-
36
- [Learn more about the new YARPP Pro enhancements!](http://yarpp.com)
37
-
38
- = Testimonials =
39
-
40
- <blockquote>
41
- "One of my favorite plugin's I just activated on my blog is called Yet Another Related Posts Plugin... I've been blogging seven or eight years now so I have a lot of archives, and it actually surprises me sometimes when I blog about something and I visit the permalink to see I've written about it before... and it also increases the traffic on your blog because when they come in just to one entry, they'll see this other stuff going on."
42
- </blockquote>
43
-
44
- &mdash; [Matt Mullenweg](http://ma.tt), WordPress creator
45
-
46
- <blockquote>
47
- "The first one I ended up trying was Yet Another Related Posts Plugin (YARPP), and mitcho has really done a fantastic job on it:
48
-
49
- <ul>
50
- <li>It's trivial to install.</li>
51
- <li>You don't have to edit your WordPress template.</li>
52
- <li>The relevance is good: the suggested posts are related, and you can tweak thresholds and how things are computed if you want."</li>
53
- </ul>
54
- </blockquote>
55
-
56
- &mdash; [Matt Cutts](http://www.mattcutts.com/blog/wordpress-plugin-related-posts/), head of Webspam, Google
57
-
58
- <blockquote>
59
- "One way of getting search engines to get to your older content a bit easier, thus increasing your WordPress SEO capabilites a LOT, is by using a related posts plugin. These plugins search through your posts database to find posts with the same subject, and add links to these posts. There are quite a few related posts plugins but I tend to stick with the Yet Another Related Posts Plugin..."
60
- </blockquote>
61
62
- &mdash; [Yoast (Joost de Valk)](http://yoast.com/articles/wordpress-seo/)
63
64
== Installation ==
65
@@ -87,7 +62,7 @@ YARPP allows the advanced user with knowledge of PHP to customize the display of
87
88
Below are Frequently Asked Questions about YARPP basic. For questions about the new YARPP Pro enhancements, please visit the [YARPP Pro FAQ](http://www.yarpp.com/faq).
89
90
- If your question isn't here, ask your own question at [the WordPress.org forums](http://wordpress.org/support/plugin/yet-another-related-posts-plugin). We'd also appreciate if you would tell us how you found out about YARPP, by taking [this quick five-question survey](http://www.surveymonkey.com/s/Z278L88). Thanks for your feedback!
91
92
= Many pages list "no related posts." =
93
@@ -130,7 +105,7 @@ Some common overrides that YARPP users have added are:
130
`
131
/* Reduces the title font size and displays more than two title lines */
132
.yarpp-thumbnail {height: 200px !important;}
133
- .yarpp-thumbnail-title {font-size:0.8em !important; max-height: 4em !important
134
135
/* Centers the thumbnail section */
136
.yarpp-related-widget {text-align:center !important;}
@@ -215,9 +190,7 @@ Beginning with version 4.0.7, YARPP includes clean uninstall functionality. If y
215
216
Yes. To make YARPP support your custom post type, the attribute `yarpp_support` must be set to true on the custom post type when it is registered. It will then be available on options on the YARPP settings page.
217
218
- `
219
- 'yarpp_support' => true
220
- `
221
222
If you would like to programmatically control which post types are considered in an automatically-displayed related posts display, use the `yarpp_map_post_types` filter.
223
@@ -233,7 +206,6 @@ yarpp_related(array(
233
'past_only' => false, // show only posts which were published before the reference post
234
'exclude' => array(), // a list of term_taxonomy_ids. entities with any of these terms will be excluded from consideration.
235
'recent' => false, // to limit to entries published recently, set to something like '15 day', '20 week', or '12 month'.
236
-
237
// Relatedness options: these determine how "relatedness" is computed
238
// Weights are used to construct the "match score" between candidates and the reference post
239
'weight' => array(
@@ -322,8 +294,17 @@ YARPP is currently localized in the following languages:
322
323
== Changelog ==
324
325
= 4.1.1 =
326
- * Bugfix: Incompatibility with PHP < 5.3.x
327
328
= 4.1 =
329
* Added optional YARPP Pro enhancements:
@@ -519,6 +500,7 @@ YARPP is currently localized in the following languages:
519
* Strengthen default post ID values for `related_*` functions
520
* Added nonce to cache flushing. If you would like to manually flush the cache now, you must use the [YARPP Experiments](http://wordpress.org/extend/plugins/yarpp-experiments/) plugin.
521
* Updated `sv_SE`, `ko_KR`, `fr_FR` localizations
522
= 3.4 =
523
* Major optimizations to the main related posts query, in particular with regard to taxonomy lookups
524
* Performance improvements on pages with "no related posts"
@@ -548,6 +530,7 @@ YARPP is currently localized in the following languages:
548
* Localizations
549
* Updated `it_IT` localization
550
* Added Portuguese stopwords by Leandro Coelho ([LogĂ­stica Descomplicada](http://www.logisticadescomplicada.com))
551
= 3.3.3 =
552
* [Bug fix](http://wordpress.org/support/topic/no-related-posts-1): a fix for keyword computation for pages; should improve results on pages. May require flushing of cache: see FAQ for instructions.
553
* Init YARPP on the `init` action, [for compatibility with WPML](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-load-sequence-yarpp-starts-before-the-wordpress-init-completes)
@@ -557,11 +540,14 @@ YARPP is currently localized in the following languages:
557
* Fixed fatal error in postmeta keyword caching code
558
* Fewer `glob`s
559
* [Bug fix](http://wordpress.org/support/topic/the-problem-when-publish-a-post): ignore empty `blog_charset`s
560
= 3.3.2 =
561
* [Bugfix](http://wordpress.org/support/topic/missing-translate-strings): removed an unlocalized string
562
* Bugfix for users of WordPress 3.0.x.
563
= 3.3.1 =
564
* Quick bugfix to [relatedness options panel bug](http://wordpress.org/support/topic/relatedness-options-for-titles-and-bodies-cant-be-changed)
565
= 3.3 =
566
* Pretty major rewrite to the options page for extensibility and screen options support
567
* By default, the options screen now only show the display options. "The Pool" and "Relatedness" options can be shown in the screen options tab in the top right corner of the screen.
@@ -575,6 +561,7 @@ YARPP is currently localized in the following languages:
575
* Added Hungarian (`hu_HU`) by [daSSad](http://dassad.com)
576
* Added Kazakh (`kk_KZ`) by [DachaDecor](http://DachaDecor.ru)
577
* Added Irish (`gb_IR`) by [Ray Gren](http://letsbefamous.com)
578
= 3.2.2 =
579
* Now [ignores soft hyphens](http://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-french-overused-words) in keyword construction
580
* Minor fix for "cross-relate posts and pages" option and more accurate `related_*()` results across post types
@@ -584,6 +571,7 @@ YARPP is currently localized in the following languages:
584
* Added `es_ES` Spanish localization by Rene of [WordPress Webshop](http://wpwebshop.com)
585
* Added `ge_KA` Georgian by Kasia Ciszewski of [Find My Hosting](www.findmyhosting.com)
586
* Added Czech (`cs_CZ`) overused words list [by berniecz](http://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-french-overused-words)
587
= 3.2.1 =
588
* Bugfix: [Duplicate results shown for some users](http://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-yarpp-post-duplicate-related-articles)
589
* Bugfix: [With PHP4, the "related posts" would simply show the current post](http://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-yarpp-showing-same-post)
@@ -600,6 +588,7 @@ YARPP is currently localized in the following languages:
600
* Eliminated a couple globals
601
* Cleaned up some edge case causes for "unexpected output" on plugin activation
602
* Removed WP Help Center badge, as they are closing
603
= 3.2 =
604
* Better caching performance:
605
* Previously, the cache would never actually build up properly. This is now fixed. Thanks to Artefact for pointing this out.
@@ -616,6 +605,7 @@ YARPP is currently localized in the following languages:
616
* Added [WordPress HelpCenter](http://wphelpcenter.com/) widget for quick access to professional support.
617
* Some code cleanup (bug [#1246](http://plugins.trac.wordpress.org/ticket/1246))
618
* No longer supporting WordPress versions before 3.0, not because I suddenly started using something that requires 3.0, but in order to simplify testing.
619
= 3.1.9 =
620
* Added Standard Arabic localization (`ar`) by [led](http://led24.de)
621
* The Related Posts Widget now can also use custom templates. ([#1143](http://plugins.trac.wordpress.org/ticket/1143))
@@ -625,6 +615,7 @@ YARPP is currently localized in the following languages:
625
* Fixed a strict WordPress warning about capabilities.
626
* Bugfix: widget now obeys cross-relate posts and pages option
627
* For WPMU + Multisite users, reverted 3.1.8's `get_site_option`s to `get_option`s, so that individual site options can be maintained.
628
= 3.1.8 =
629
* Added Turkish localization (`tr_TR`)
630
* Bugfix: related pages and "cross-relate posts and pages" functionality is now working again.
@@ -634,22 +625,27 @@ YARPP is currently localized in the following languages:
634
* Minor fix which may help reduce [`strip_tags()` errors](http://wordpress.org/support/topic/353588).
635
* Updated FAQ.
636
* Code cleanup.
637
= 3.1.7 =
638
* Added Egyptian Arabic localization (`ar_EG`)
639
* Changed default option for automatic display of related posts in feeds to OFF. May improve performance for new users who use the default settings.
640
* "Use template" options are now disabled when templates are not found. Other minor tweaks to options screen.
641
* 3.1.7 has been lightly tested with WP 3.0. Multisite (WPMU) compatibility has not been tested yet.
642
= 3.1.6 =
643
* Added Latvian localization (`lv_LV`)
644
* Added a template which displays post thumbnails; requires WordPress 2.9 and a theme which has post thumbnail support
645
= 3.1.5 =
646
* Quick bugfix to new widget template (removed extra quote).
647
= 3.1.4 =
648
* Improved widget code
649
* Localization improvements - descriptions can now be localized
650
* [Compatibility with PageBar](http://wordpress.org/support/topic/346714) - thanks to Latz for the patch!
651
* Bugfix: [`related_posts_exist` was giving incorrect values](http://wordpress.org/support/topic/362347)
652
* Bugfix: [SQL error for setups with blank DB_CHARSET](http://wordpress.org/support/topic/358757)
653
= 3.1.3 =
654
* Performance improvements:
655
* Turning off cache expiration, made possible by smarter caching system of 3.1 - should improve caching database performance over time.
@@ -661,12 +657,15 @@ YARPP is currently localized in the following languages:
661
* Bugfix: [`yarpp_clear_cache` bug on empty input](http://wordpress.org/support/topic/343001)
662
* Version checking code no longer uses Snoopy.
663
* New localization: Hindi by [Outshine Solutions](http://outshinesolutions.com/)
664
= 3.1.2 =
665
* Bugfix: [saving posts would sometimes timeout](http://wordpress.org/support/topic/343001)
666
= 3.1.1 =
667
* [Possible fix for the "no related posts" issue](http://wordpress.org/support/topic/284209/page/2) by [vkovalcik](http://wordpress.org/support/profile/5032111)
668
* Bugfix: [slight optimization to keyword function](http://wordpress.org/support/topic/284209/page/2) by [vkovalcik](http://wordpress.org/support/profile/5032111)
669
* Bugfix: [regex issue with br-stripping](http://wordpress.org/support/topic/323823)
670
= 3.1 =
671
* New snazzy options screen
672
* Smarter, less confusing caching
@@ -679,8 +678,10 @@ YARPP is currently localized in the following languages:
679
* Breaks (&lt;br /&gt;) are now stripped out of titles.
680
* Added plugin incompatibility info for Pagebar.
681
* Faster post saving.
682
= 3.0.13 =
683
* Quick immediate bugfix to 3.0.12
684
= 3.0.12 =
685
* Yet another DISQUS note... sigh.
686
* Changed [default markup](http://wordpress.org/support/topic/307890) to be make the output validate better.
@@ -690,15 +691,19 @@ YARPP is currently localized in the following languages:
690
* Tweaked a SQL query so that it was WPML compatible
691
* Added YARPP template to be used with WPML
692
* Added Hebrew localization
693
= 3.0.11 =
694
* Quick fix for `compare_version` code.
695
= 3.0.10 =
696
* Added Ukrainian localization
697
* Incorporated a quick update for the widget display [thanks to doodlebee](http://wordpress.org/support/topic/281575).
698
* Now properly uses `compare_version` in lieu of old hacky versioning.
699
= 3.0.9 =
700
* Added Uzbek, Greek, Cypriot Greek, and Vietnamese localizations
701
* Further bugfixes for the [pagination issue](http://wordpress.org/support/topic/267350)
702
= 3.0.8 =
703
* Bugfix: [a pagination issue](http://wordpress.org/support/topic/267350) (may not be completely fixed yet)
704
* Bugfix: a quick bugfix for widgets, thanks to Chris Northwood
@@ -708,6 +713,7 @@ YARPP is currently localized in the following languages:
708
* Bugfix: `is_single` and other such flags are now set properly within the related posts Loop (as a result, now [compatible with WP Greet Box](http://wordpress.org/support/topic/288230))
709
* Confirmed compatibility with 2.8.2
710
* Bugfix: [the Related Posts metabox now respects the Screen Options](http://wordpress.org/support/topic/289290)
711
= 3.0.7 =
712
* Bugfix: additional bugfix for widgets.
713
* Reinstating excerpt length by number of words (was switched to letters in 3.0.6 without accompanying documentation)
@@ -715,20 +721,24 @@ YARPP is currently localized in the following languages:
715
* Updated Italian
716
* Added Belarussian by [Fat Cow](http://www.fatcow.com)
717
* Confirmed compatibility with 2.8.1
718
= 3.0.6 =
719
* Bugfix: [updated excerpting to use `wp_html_excerpt`](http://wordpress.org/support/topic/268934) (for WP 2.5+)
720
* Bugfix: [fixed broken widget display](http://wordpress.org/support/topic/276031)
721
* Added Russian (`ru_RU`) localization by Marat Latypov
722
* Confirmed 2.8 compatibility
723
* Added note on [incompatibility with SEO Pager plugin](http://wordpress.org/support/topic/267966)
724
= 3.0.5 =
725
* Added link to manual SQL setup information [by request](http://wordpress.org/support/topic/266752)
726
* Added Portuguese localization
727
* Updated info on "on the fly" caching - it is *strongly recommended* for larger blogs.
728
* Updated "incomplete cache" warning message so it is only displayed when the "on the fly" option is off.
729
= 3.0.4 =
730
* A fix to the version checking in the options page - now uses Snoopy
731
* Adding Dutch localization
732
= 3.0.3 =
733
* Reinstated the 3.0.1 bugfix for includes
734
* Bugfix: Fixed encoding issue in keyword caching algorithm
@@ -737,25 +747,31 @@ YARPP is currently localized in the following languages:
737
* Added note on DISQUS in readme
738
* Making some extra strings localizable
739
* Bugfix: [a problem with the Italian localization](http://wordpress.org/support/topic/265952)
740
= 3.0.2 =
741
* Bugfix: [Templating wasn't working with child templates.](http://wordpress.org/support/topic/265515)
742
* Bugfix: In some situations, [SQL errors were printed in the AJAX preview displays](http://wordpress.org/support/topic/265728).
743
= 3.0.1 =
744
* Bugfix: In some situations before YARPP options were updated, an `include` PHP error was displayed.
745
= 3.0 =
746
* Major new release!
747
* Caching for better SQL performance
748
* A new templating feature for custom related posts displays
749
* Cleaned up options page
750
* New and updated localizations
751
= 2.1.6 =
752
* Versioning bugfix - same as 2.1.5
753
= 2.1.5 =
754
* Bugfix: In certain scenarios, [related posts would be displayed in RSS feeds even when that option was off](http://wordpress.org/support/topic/216145)
755
* Bugfix: The `related_*()` functions were missing the `echo` parameter
756
* Some localization bugfixes
757
* Localizations:
758
* Japanese (`ja`) by [Michael Yoshitaka Erlewine](http://mitcho.com)
759
= 2.1.4 =
760
* Bugfix: [Settings' sumbmit button took you to PayPal](http://wordpress.org/support/topic/214090)
761
* Bugfix: Fixed [keyword algorithm for users without `mbstring`](http://wordpress.org/support/topic/216420)
@@ -770,16 +786,20 @@ YARPP is currently localized in the following languages:
770
* Further internationalization:
771
* the donate button! ^^
772
* overused words lists ([by request](http://wordpress.org/support/topic/159359))), with a German word list.
773
= 2.1.3 =
774
* Bugfix: Turned off [the experimental caching](http://wordpress.org/support/topic/216194#post-894440) which shouldn't have been on in this release...
775
* Bugfix: an issue with the [keywords algorithm for non-ASCII characters](http://wordpress.org/support/topic/216078)
776
= 2.1.2 =
777
* Bugfix: MyISAM override handling bug
778
= 2.1.1 =
779
* Bugfix: keywords with forward slashes (\) could make the main SQL query ill-formed.
780
* Bugfix: Added an override option for the [false MyISAM warnings](http://wordpress.org/support/topic/211043).
781
* Preparing for localization! (See note at the bottom of the FAQ.)
782
* Adding a debug mode--just try adding `&yarpp_debug=1` to your URL's and look at the HTML source.
783
= 2.1 - The RSS edition! =
784
* RSS feed support!: the option to automagically show related posts in RSS feeds and to customize their display, [by popular request](http://wordpress.org/support/topic/151766).
785
* A link to [the Yet Another Related Posts Plugin RSS feed](http://wordpress.org/support/topic/208469).
@@ -789,8 +809,10 @@ YARPP is currently localized in the following languages:
789
* Bugfix: `related_*_exist()` functions produced invalid queries
790
* A warning for `wp_posts` with non-MyISAM engines and semi-compatibility with non-MyISAM setups.
791
* Bugfix: [a better notice for users of Wordpress < 2.5](http://www.mattcutts.com/blog/wordpress-plugin-related-posts/#comment-131194) regarding the "compare tags" and "compare categories" features.
792
= 2.0.6 =
793
* A quick emergency bugfix (In one instance, assumed existence of `wp_posts`)
794
= 2.0.5 =
795
* Further optimized algorithm - should be faster on most systems. Good bye [subqueries](http://dev.mysql.com/doc/refman/5.0/en/unnamed-views.html)!
796
* Bugfix: restored MySQL 4.0 support
@@ -799,16 +821,21 @@ YARPP is currently localized in the following languages:
799
* Bugfix: [quotes in HTML tag options would get escaped](http://wordpress.org/support/topic/199139)
800
* Bugfix: `user_level` was being checked in a deprecated manner
801
* A helpful little tooltip for the admin-only threshold display
802
= 2.0.4 - what 2.0 should have been =
803
* Bugfix: new fulltext query for MySQL 5 compatibility
804
* Bugfix: updated `apply_filters` to work with WP 2.6
805
= 2.0.3 =
806
* Bugfix: [2.0.2 accidentally required some tags or categories to be disabled](http://wordpress.org/support/topic/188745)
807
= 2.0.2 =
808
* Versioning bugfix (rerelease of 2.0.1)
809
= 2.0.1 =
810
* Bugfix: [`admin_menu` instead of `admin_head`](http://konstruktors.com/blog/wordpress/277-fixing-postpost-and-ozh-absolute-comments-plugins/)
811
* Bugfix: [a variable scope issue](http://wordpress.org/support/topic/188550) crucial for 2.0 upgrading
812
= 2.0 =
813
* New algorithm which considers tags and categories, by frequent request
814
* Order by score, date, or title, [by request](http://wordpress.org/support/topic/158459)
@@ -821,17 +848,22 @@ YARPP is currently localized in the following languages:
821
- Viper's Video Quicktags
822
- WP-CodeBox
823
- WP shortcodes
824
= 1.5.1 =
825
* Bugfix: standardized directory references to `yet-another-related-posts-plugin`
826
= 1.5 =
827
* Simple installation: automatic display of a basic related posts install
828
* code and variable cleanup
829
* FAQ in the documentation
830
= 1.1 =
831
* Related pages support!
832
* Also, uses `apply_filters` to apply whatever content text transformation you use (Wikipedia link, Markdown, etc.) before computing similarity.
833
= 1.0.1 =
834
* Bugfix: 1.0 assumed you had Markdown installed
835
= 1.0 =
836
* Initial upload
837
1
=== Yet Another Related Posts Plugin (YARPP) ===
2
Contributors: jeffparker
3
Author: Adknowledge
4
+ Author URI: http://www.yarpp.com/
5
+ Plugin URI: http://www.yarpp.com/
6
Tags: feeds, pages, posts, related, rss, yarpp, ads, multisite, multilingual, thumbnails, related posts, related content
7
Requires at least: 3.3
8
+ Tested up to: 3.8
9
+ Stable tag: 4.1.2
10
License: GPLv2 or later
11
12
+ Display a list of related posts on your site based on a powerful unique algorithm. Earn money by including sponsored content!
13
14
== Description ==
15
16
Yet Another Related Posts Plugin (YARPP) displays pages, posts, and custom post types related to the current entry, introducing your readers to other relevant content on your site.
17
+ [(See current offers and promotions for YARPP Pro users.)](http://www.yarpp.com/offers)
18
19
+ **Enable YARPP Pro for Powerful Enhancements**
20
-----------------------------------------
21
+ * **Customize thumbnail layout** through the user interface.
22
+ * **Pull related content from multiple sites**.
23
+ * **Make money** by displaying relevant sponsored content.
24
+ * **Easily promote your product or service** on thousands of blogs and websites.
25
+ * **Get detailed reporting** ab out your related content list.
26
27
+ [Learn more about the new YARPP Pro enhancements!](http://www.yarpp.com)
28
29
+ **Keep YARPP Basic for Standard Features**
30
-------------------------------------------
31
+ * **Thumbnail or list view** of related content.
32
+ * **Related posts, pages, and custom post types.**
33
+ * **Templating**: The YARPP templating system gives you advanced control of how your results are displayed.
34
+ * **An advanced and versatile algorithm**: Using a customizable algorithm considering post titles, content, tags, categories, and custom taxonomies, YARPP finds related content from across your site. [Learn More.](http://wordpress.tv/2011/01/29/michael-"mitcho"-erlewine-the-yet-another-related-posts-plugin-algorithm-explained/)
35
+ * **Related posts in feeds**: Display related posts in RSS feeds with custom display options.
36
37
+ This plugin requires PHP 5, MySQL 4.1, and WordPress 3.3 or greater. See [the FAQ](http://wordpress.org/plugins/yet-another-related-posts-plugin/faq/) for answers to common questions.
38
39
== Installation ==
40
62
63
Below are Frequently Asked Questions about YARPP basic. For questions about the new YARPP Pro enhancements, please visit the [YARPP Pro FAQ](http://www.yarpp.com/faq).
64
65
+ If your question isn't here, ask your own question at [the WordPress.org forums](http://wordpress.org/support/plugin/yet-another-related-posts-plugin). We'd also appreciate if you would help us improve YARPP by [answering a few survey questions](http://www.surveymonkey.com/s/Z278L88). Thanks for your feedback!
66
67
= Many pages list "no related posts." =
68
105
`
106
/* Reduces the title font size and displays more than two title lines */
107
.yarpp-thumbnail {height: 200px !important;}
108
+ .yarpp-thumbnail-title {font-size:0.8em !important; max-height: 4em !important}
109
110
/* Centers the thumbnail section */
111
.yarpp-related-widget {text-align:center !important;}
190
191
Yes. To make YARPP support your custom post type, the attribute `yarpp_support` must be set to true on the custom post type when it is registered. It will then be available on options on the YARPP settings page.
192
193
+ `'yarpp_support' => true`
194
195
If you would like to programmatically control which post types are considered in an automatically-displayed related posts display, use the `yarpp_map_post_types` filter.
196
206
'past_only' => false, // show only posts which were published before the reference post
207
'exclude' => array(), // a list of term_taxonomy_ids. entities with any of these terms will be excluded from consideration.
208
'recent' => false, // to limit to entries published recently, set to something like '15 day', '20 week', or '12 month'.
209
// Relatedness options: these determine how "relatedness" is computed
210
// Weights are used to construct the "match score" between candidates and the reference post
211
'weight' => array(
294
295
== Changelog ==
296
297
+ = 4.1.2 =
298
+ * Tested on Wordpress 3.8.
299
+ * Added field boxes with API Key information to Domain page.
300
+ * MyISAM check notice message was updated to better express what it does and a feedback message was added in case the fulltext index creation fails.
301
+ * Bugfix: MyISAM check overwrite was broken since 4.1.x release.
302
+ * Bugfix: PHP title not defined warning when creating new cache entry.
303
+ * Bugfix: Uninstall script now deletes options with empty, false or 0 values.
304
+ * Bugfix: Scrollbar functionality on YARPP Pro Domain Settings page.
305
+
306
= 4.1.1 =
307
+ * Bugfix: Incompatibility with PHP < 5.3.x
308
309
= 4.1 =
310
* Added optional YARPP Pro enhancements:
500
* Strengthen default post ID values for `related_*` functions
501
* Added nonce to cache flushing. If you would like to manually flush the cache now, you must use the [YARPP Experiments](http://wordpress.org/extend/plugins/yarpp-experiments/) plugin.
502
* Updated `sv_SE`, `ko_KR`, `fr_FR` localizations
503
+
504
= 3.4 =
505
* Major optimizations to the main related posts query, in particular with regard to taxonomy lookups
506
* Performance improvements on pages with "no related posts"
530
* Localizations
531
* Updated `it_IT` localization
532
* Added Portuguese stopwords by Leandro Coelho ([LogĂ­stica Descomplicada](http://www.logisticadescomplicada.com))
533
+
534
= 3.3.3 =
535
* [Bug fix](http://wordpress.org/support/topic/no-related-posts-1): a fix for keyword computation for pages; should improve results on pages. May require flushing of cache: see FAQ for instructions.
536
* Init YARPP on the `init` action, [for compatibility with WPML](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-load-sequence-yarpp-starts-before-the-wordpress-init-completes)
540
* Fixed fatal error in postmeta keyword caching code
541
* Fewer `glob`s
542
* [Bug fix](http://wordpress.org/support/topic/the-problem-when-publish-a-post): ignore empty `blog_charset`s
543
+
544
= 3.3.2 =
545
* [Bugfix](http://wordpress.org/support/topic/missing-translate-strings): removed an unlocalized string
546
* Bugfix for users of WordPress 3.0.x.
547
+
548
= 3.3.1 =
549
* Quick bugfix to [relatedness options panel bug](http://wordpress.org/support/topic/relatedness-options-for-titles-and-bodies-cant-be-changed)
550
+
551
= 3.3 =
552
* Pretty major rewrite to the options page for extensibility and screen options support
553
* By default, the options screen now only show the display options. "The Pool" and "Relatedness" options can be shown in the screen options tab in the top right corner of the screen.
561
* Added Hungarian (`hu_HU`) by [daSSad](http://dassad.com)
562
* Added Kazakh (`kk_KZ`) by [DachaDecor](http://DachaDecor.ru)
563
* Added Irish (`gb_IR`) by [Ray Gren](http://letsbefamous.com)
564
+
565
= 3.2.2 =
566
* Now [ignores soft hyphens](http://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-french-overused-words) in keyword construction
567
* Minor fix for "cross-relate posts and pages" option and more accurate `related_*()` results across post types
571
* Added `es_ES` Spanish localization by Rene of [WordPress Webshop](http://wpwebshop.com)
572
* Added `ge_KA` Georgian by Kasia Ciszewski of [Find My Hosting](www.findmyhosting.com)
573
* Added Czech (`cs_CZ`) overused words list [by berniecz](http://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-french-overused-words)
574
+
575
= 3.2.1 =
576
* Bugfix: [Duplicate results shown for some users](http://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-yarpp-post-duplicate-related-articles)
577
* Bugfix: [With PHP4, the "related posts" would simply show the current post](http://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-yarpp-showing-same-post)
588
* Eliminated a couple globals
589
* Cleaned up some edge case causes for "unexpected output" on plugin activation
590
* Removed WP Help Center badge, as they are closing
591
+
592
= 3.2 =
593
* Better caching performance:
594
* Previously, the cache would never actually build up properly. This is now fixed. Thanks to Artefact for pointing this out.
605
* Added [WordPress HelpCenter](http://wphelpcenter.com/) widget for quick access to professional support.
606
* Some code cleanup (bug [#1246](http://plugins.trac.wordpress.org/ticket/1246))
607
* No longer supporting WordPress versions before 3.0, not because I suddenly started using something that requires 3.0, but in order to simplify testing.
608
+
609
= 3.1.9 =
610
* Added Standard Arabic localization (`ar`) by [led](http://led24.de)
611
* The Related Posts Widget now can also use custom templates. ([#1143](http://plugins.trac.wordpress.org/ticket/1143))
615
* Fixed a strict WordPress warning about capabilities.
616
* Bugfix: widget now obeys cross-relate posts and pages option
617
* For WPMU + Multisite users, reverted 3.1.8's `get_site_option`s to `get_option`s, so that individual site options can be maintained.
618
+
619
= 3.1.8 =
620
* Added Turkish localization (`tr_TR`)
621
* Bugfix: related pages and "cross-relate posts and pages" functionality is now working again.
625
* Minor fix which may help reduce [`strip_tags()` errors](http://wordpress.org/support/topic/353588).
626
* Updated FAQ.
627
* Code cleanup.
628
+
629
= 3.1.7 =
630
* Added Egyptian Arabic localization (`ar_EG`)
631
* Changed default option for automatic display of related posts in feeds to OFF. May improve performance for new users who use the default settings.
632
* "Use template" options are now disabled when templates are not found. Other minor tweaks to options screen.
633
* 3.1.7 has been lightly tested with WP 3.0. Multisite (WPMU) compatibility has not been tested yet.
634
+
635
= 3.1.6 =
636
* Added Latvian localization (`lv_LV`)
637
* Added a template which displays post thumbnails; requires WordPress 2.9 and a theme which has post thumbnail support
638
+
639
= 3.1.5 =
640
* Quick bugfix to new widget template (removed extra quote).
641
+
642
= 3.1.4 =
643
* Improved widget code
644
* Localization improvements - descriptions can now be localized
645
* [Compatibility with PageBar](http://wordpress.org/support/topic/346714) - thanks to Latz for the patch!
646
* Bugfix: [`related_posts_exist` was giving incorrect values](http://wordpress.org/support/topic/362347)
647
* Bugfix: [SQL error for setups with blank DB_CHARSET](http://wordpress.org/support/topic/358757)
648
+
649
= 3.1.3 =
650
* Performance improvements:
651
* Turning off cache expiration, made possible by smarter caching system of 3.1 - should improve caching database performance over time.
657
* Bugfix: [`yarpp_clear_cache` bug on empty input](http://wordpress.org/support/topic/343001)
658
* Version checking code no longer uses Snoopy.
659
* New localization: Hindi by [Outshine Solutions](http://outshinesolutions.com/)
660
+
661
= 3.1.2 =
662
* Bugfix: [saving posts would sometimes timeout](http://wordpress.org/support/topic/343001)
663
+
664
= 3.1.1 =
665
* [Possible fix for the "no related posts" issue](http://wordpress.org/support/topic/284209/page/2) by [vkovalcik](http://wordpress.org/support/profile/5032111)
666
* Bugfix: [slight optimization to keyword function](http://wordpress.org/support/topic/284209/page/2) by [vkovalcik](http://wordpress.org/support/profile/5032111)
667
* Bugfix: [regex issue with br-stripping](http://wordpress.org/support/topic/323823)
668
+
669
= 3.1 =
670
* New snazzy options screen
671
* Smarter, less confusing caching
678
* Breaks (&lt;br /&gt;) are now stripped out of titles.
679
* Added plugin incompatibility info for Pagebar.
680
* Faster post saving.
681
+
682
= 3.0.13 =
683
* Quick immediate bugfix to 3.0.12
684
+
685
= 3.0.12 =
686
* Yet another DISQUS note... sigh.
687
* Changed [default markup](http://wordpress.org/support/topic/307890) to be make the output validate better.
691
* Tweaked a SQL query so that it was WPML compatible
692
* Added YARPP template to be used with WPML
693
* Added Hebrew localization
694
+
695
= 3.0.11 =
696
* Quick fix for `compare_version` code.
697
+
698
= 3.0.10 =
699
* Added Ukrainian localization
700
* Incorporated a quick update for the widget display [thanks to doodlebee](http://wordpress.org/support/topic/281575).
701
* Now properly uses `compare_version` in lieu of old hacky versioning.
702
+
703
= 3.0.9 =
704
* Added Uzbek, Greek, Cypriot Greek, and Vietnamese localizations
705
* Further bugfixes for the [pagination issue](http://wordpress.org/support/topic/267350)
706
+
707
= 3.0.8 =
708
* Bugfix: [a pagination issue](http://wordpress.org/support/topic/267350) (may not be completely fixed yet)
709
* Bugfix: a quick bugfix for widgets, thanks to Chris Northwood
713
* Bugfix: `is_single` and other such flags are now set properly within the related posts Loop (as a result, now [compatible with WP Greet Box](http://wordpress.org/support/topic/288230))
714
* Confirmed compatibility with 2.8.2
715
* Bugfix: [the Related Posts metabox now respects the Screen Options](http://wordpress.org/support/topic/289290)
716
+
717
= 3.0.7 =
718
* Bugfix: additional bugfix for widgets.
719
* Reinstating excerpt length by number of words (was switched to letters in 3.0.6 without accompanying documentation)
721
* Updated Italian
722
* Added Belarussian by [Fat Cow](http://www.fatcow.com)
723
* Confirmed compatibility with 2.8.1
724
+
725
= 3.0.6 =
726
* Bugfix: [updated excerpting to use `wp_html_excerpt`](http://wordpress.org/support/topic/268934) (for WP 2.5+)
727
* Bugfix: [fixed broken widget display](http://wordpress.org/support/topic/276031)
728
* Added Russian (`ru_RU`) localization by Marat Latypov
729
* Confirmed 2.8 compatibility
730
* Added note on [incompatibility with SEO Pager plugin](http://wordpress.org/support/topic/267966)
731
+
732
= 3.0.5 =
733
* Added link to manual SQL setup information [by request](http://wordpress.org/support/topic/266752)
734
* Added Portuguese localization
735
* Updated info on "on the fly" caching - it is *strongly recommended* for larger blogs.
736
* Updated "incomplete cache" warning message so it is only displayed when the "on the fly" option is off.
737
+
738
= 3.0.4 =
739
* A fix to the version checking in the options page - now uses Snoopy
740
* Adding Dutch localization
741
+
742
= 3.0.3 =
743
* Reinstated the 3.0.1 bugfix for includes
744
* Bugfix: Fixed encoding issue in keyword caching algorithm
747
* Added note on DISQUS in readme
748
* Making some extra strings localizable
749
* Bugfix: [a problem with the Italian localization](http://wordpress.org/support/topic/265952)
750
+
751
= 3.0.2 =
752
* Bugfix: [Templating wasn't working with child templates.](http://wordpress.org/support/topic/265515)
753
* Bugfix: In some situations, [SQL errors were printed in the AJAX preview displays](http://wordpress.org/support/topic/265728).
754
+
755
= 3.0.1 =
756
* Bugfix: In some situations before YARPP options were updated, an `include` PHP error was displayed.
757
+
758
= 3.0 =
759
* Major new release!
760
* Caching for better SQL performance
761
* A new templating feature for custom related posts displays
762
* Cleaned up options page
763
* New and updated localizations
764
+
765
= 2.1.6 =
766
* Versioning bugfix - same as 2.1.5
767
+
768
= 2.1.5 =
769
* Bugfix: In certain scenarios, [related posts would be displayed in RSS feeds even when that option was off](http://wordpress.org/support/topic/216145)
770
* Bugfix: The `related_*()` functions were missing the `echo` parameter
771
* Some localization bugfixes
772
* Localizations:
773
* Japanese (`ja`) by [Michael Yoshitaka Erlewine](http://mitcho.com)
774
+
775
= 2.1.4 =
776
* Bugfix: [Settings' sumbmit button took you to PayPal](http://wordpress.org/support/topic/214090)
777
* Bugfix: Fixed [keyword algorithm for users without `mbstring`](http://wordpress.org/support/topic/216420)
786
* Further internationalization:
787
* the donate button! ^^
788
* overused words lists ([by request](http://wordpress.org/support/topic/159359))), with a German word list.
789
+
790
= 2.1.3 =
791
* Bugfix: Turned off [the experimental caching](http://wordpress.org/support/topic/216194#post-894440) which shouldn't have been on in this release...
792
* Bugfix: an issue with the [keywords algorithm for non-ASCII characters](http://wordpress.org/support/topic/216078)
793
+
794
= 2.1.2 =
795
* Bugfix: MyISAM override handling bug
796
+
797
= 2.1.1 =
798
* Bugfix: keywords with forward slashes (\) could make the main SQL query ill-formed.
799
* Bugfix: Added an override option for the [false MyISAM warnings](http://wordpress.org/support/topic/211043).
800
* Preparing for localization! (See note at the bottom of the FAQ.)
801
* Adding a debug mode--just try adding `&yarpp_debug=1` to your URL's and look at the HTML source.
802
+
803
= 2.1 - The RSS edition! =
804
* RSS feed support!: the option to automagically show related posts in RSS feeds and to customize their display, [by popular request](http://wordpress.org/support/topic/151766).
805
* A link to [the Yet Another Related Posts Plugin RSS feed](http://wordpress.org/support/topic/208469).
809
* Bugfix: `related_*_exist()` functions produced invalid queries
810
* A warning for `wp_posts` with non-MyISAM engines and semi-compatibility with non-MyISAM setups.
811
* Bugfix: [a better notice for users of Wordpress < 2.5](http://www.mattcutts.com/blog/wordpress-plugin-related-posts/#comment-131194) regarding the "compare tags" and "compare categories" features.
812
+
813
= 2.0.6 =
814
* A quick emergency bugfix (In one instance, assumed existence of `wp_posts`)
815
+
816
= 2.0.5 =
817
* Further optimized algorithm - should be faster on most systems. Good bye [subqueries](http://dev.mysql.com/doc/refman/5.0/en/unnamed-views.html)!
818
* Bugfix: restored MySQL 4.0 support
821
* Bugfix: [quotes in HTML tag options would get escaped](http://wordpress.org/support/topic/199139)
822
* Bugfix: `user_level` was being checked in a deprecated manner
823
* A helpful little tooltip for the admin-only threshold display
824
+
825
= 2.0.4 - what 2.0 should have been =
826
* Bugfix: new fulltext query for MySQL 5 compatibility
827
* Bugfix: updated `apply_filters` to work with WP 2.6
828
+
829
= 2.0.3 =
830
* Bugfix: [2.0.2 accidentally required some tags or categories to be disabled](http://wordpress.org/support/topic/188745)
831
+
832
= 2.0.2 =
833
* Versioning bugfix (rerelease of 2.0.1)
834
+
835
= 2.0.1 =
836
* Bugfix: [`admin_menu` instead of `admin_head`](http://konstruktors.com/blog/wordpress/277-fixing-postpost-and-ozh-absolute-comments-plugins/)
837
* Bugfix: [a variable scope issue](http://wordpress.org/support/topic/188550) crucial for 2.0 upgrading
838
+
839
= 2.0 =
840
* New algorithm which considers tags and categories, by frequent request
841
* Order by score, date, or title, [by request](http://wordpress.org/support/topic/158459)
848
- Viper's Video Quicktags
849
- WP-CodeBox
850
- WP shortcodes
851
+
852
= 1.5.1 =
853
* Bugfix: standardized directory references to `yet-another-related-posts-plugin`
854
+
855
= 1.5 =
856
* Simple installation: automatic display of a basic related posts install
857
* code and variable cleanup
858
* FAQ in the documentation
859
+
860
= 1.1 =
861
* Related pages support!
862
* Also, uses `apply_filters` to apply whatever content text transformation you use (Wikipedia link, Markdown, etc.) before computing similarity.
863
+
864
= 1.0.1 =
865
* Bugfix: 1.0 assumed you had Markdown installed
866
+
867
= 1.0 =
868
* Initial upload
869
sprites-2x.png CHANGED
Binary file
sprites.png CHANGED
Binary file
style/options_basic.css CHANGED
@@ -43,7 +43,7 @@ body.rtl .icon {
43
@media only screen and (-webkit-min-device-pixel-ratio: 1.5) {
44
.icon {
45
background-image: url('../images/sprites-2x.png');
46
- background-size: 110px 22px;
47
}
48
}
49
@@ -62,6 +62,9 @@ body.rtl .icon {
62
.icon-pro {
63
background-position: -88px 0;
64
}
65
66
.icon.spin, .icon-star:hover {
67
transform-origin: 11px 12px;
43
@media only screen and (-webkit-min-device-pixel-ratio: 1.5) {
44
.icon {
45
background-image: url('../images/sprites-2x.png');
46
+ background-size: 132px 22px;
47
}
48
}
49
62
.icon-pro {
63
background-position: -88px 0;
64
}
65
+ .icon-facebook {
66
+ background-position: -110px 0;
67
+ }
68
69
.icon.spin, .icon-star:hover {
70
transform-origin: 11px 12px;
style/options_switch.css CHANGED
@@ -63,6 +63,7 @@ a{
63
64
.yarpp_switch_content p,
65
.yarpp_switch_content h1 {
66
margin: 15px 25% 15px 45px;
67
}
68
@@ -75,16 +76,56 @@ a{
75
}
76
77
.yarpp_switch_content ul {
78
line-height: 1.5em;
79
padding-left: 75px;
80
list-style: disc;
81
}
82
83
#yarpp_pro_dashboard{
84
position: relative;
85
- width: 100%;
86
- height: 1024px;
87
border: 1px solid #dfdfdf;
88
- border-radius: 3px;
89
z-index: 5;
90
}
63
64
.yarpp_switch_content p,
65
.yarpp_switch_content h1 {
66
+ position: relative;
67
margin: 15px 25% 15px 45px;
68
}
69
76
}
77
78
.yarpp_switch_content ul {
79
+ float: left;
80
line-height: 1.5em;
81
padding-left: 75px;
82
list-style: disc;
83
}
84
85
+ #yarpp_pro_dashboard_wrapper{
86
+ position: relative;
87
+ top: 0;
88
+ left: 0;
89
+ bottom: 0;
90
+ height:1024px;
91
+ width:100%;
92
+ overflow: hidden;
93
+ }
94
+
95
#yarpp_pro_dashboard{
96
position: relative;
97
+ width: 105%;
98
+ height: 100%;
99
border: 1px solid #dfdfdf;
100
+ border-radius: 4px;
101
+ overflow-x: hidden;
102
+ overflow-y: scroll;
103
z-index: 5;
104
+ }
105
+
106
+ #yarpp_pro_api_settings input[type="text"]{
107
+ font-family: monospace;
108
+ border-radius: 3px;
109
+ width: 280px;
110
+ }
111
+
112
+ .yarpp_pro_label{
113
+ display: inline-block;
114
+ width: 75px;
115
+ }
116
+
117
+ .yarpp_warning {
118
+ display: none;
119
+ color: #F00;
120
+ background-color: #ffcfd4;
121
+ border: 1px solid #F00;
122
+ padding: 2px 6px;
123
+ margin-left: 1em;
124
+ border-radius: 3px;
125
+ }
126
+
127
+ #yarpp_pro_api_settings #yarpp_pro_settings_submit[disabled]{
128
+ border: none !important;
129
+ padding: 8px !important;
130
+ margin: 1px !important;
131
}
uninstall.php CHANGED
@@ -56,9 +56,8 @@ if(is_multisite()) {
56
function clean(Array $opts, $wpdb){
57
58
foreach($opts as $opt){
59
- /* if option exist... delete it */
60
- if(get_option($opt)) delete_option($opt);
61
- }/*end foreach*/
62
63
/* Truncate, clear and drop yarpp cache */
64
$wpdb->query('DELETE FROM `'.$wpdb->prefix.'postmeta` WHERE meta_key LIKE "%yarpp%"');
56
function clean(Array $opts, $wpdb){
57
58
foreach($opts as $opt){
59
+ delete_option($opt);
60
+ }
61
62
/* Truncate, clear and drop yarpp cache */
63
$wpdb->query('DELETE FROM `'.$wpdb->prefix.'postmeta` WHERE meta_key LIKE "%yarpp%"');
yarpp.php CHANGED
@@ -1,11 +1,11 @@
1
<?php
2
/*----------------------------------------------------------------------------------------------------------------------
3
Plugin Name: Yet Another Related Posts Plugin
4
- Description: Adds related posts to your site and in RSS feeds, based on a powerful, customizable algorithm. Enabling YARPP Pro gives you access to even more powerful features. <a href="http://yarpp.com" target="_blank">Find out more</a>.
5
- Version: 4.1.1
6
Author: Adknowledge
7
- Author URI: http://yarpp.com/
8
- Plugin URI: http://yarpp.com/
9
----------------------------------------------------------------------------------------------------------------------*/
10
11
if(!defined('WP_CONTENT_URL')) define('WP_CONTENT_URL', get_option('siteurl').'/wp-content');
@@ -14,7 +14,7 @@ if(!defined('WP_CONTENT_DIR')){
14
define('WP_CONTENT_DIR', substr($tr,0,strrpos($tr,'/')));
15
}
16
17
- define('YARPP_VERSION', '4.1.1');
18
define('YARPP_DIR', dirname(__FILE__));
19
define('YARPP_NO_RELATED', ':(');
20
define('YARPP_RELATED', ':)');
1
<?php
2
/*----------------------------------------------------------------------------------------------------------------------
3
Plugin Name: Yet Another Related Posts Plugin
4
+ Description: Adds related posts to your site and in RSS feeds, based on a powerful, customizable algorithm. Enabling YARPP Pro gives you access to even more powerful features. <a href="http://www.yarpp.com" target="_blank">Find out more</a>.
5
+ Version: 4.1.2
6
Author: Adknowledge
7
+ Author URI: http://www.yarpp.com/
8
+ Plugin URI: http://www.yarpp.com/
9
----------------------------------------------------------------------------------------------------------------------*/
10
11
if(!defined('WP_CONTENT_URL')) define('WP_CONTENT_URL', get_option('siteurl').'/wp-content');
14
define('WP_CONTENT_DIR', substr($tr,0,strrpos($tr,'/')));
15
}
16
17
+ define('YARPP_VERSION', '4.1.2');
18
define('YARPP_DIR', dirname(__FILE__));
19
define('YARPP_NO_RELATED', ':(');
20
define('YARPP_RELATED', ':)');