Yet Another Related Posts Plugin (YARPP) - Version 3.3.3

Version Description

  • Bug fix: a fix for keyword computation for pages; should improve results on pages. May require flushing of cache: see FAQ for instructions.
  • Init YARPP on the init action, for compatibility with WPML
  • Updated Polish, Italian, and Japanese localizations; added Dutch stopwords by Paul Kessels
  • Code cleanup:
    • Minor speedup to unnecessarily slow i18n code
    • Fixed fatal error in postmeta keyword caching code
    • Fewer globs
    • Bug fix: ignore empty blog_charsets
Download this release

Release Info

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

Code changes from version 3.3.3b2 to 3.3.3

Files changed (6) hide show
  1. keywords.php +3 -3
  2. lang/words-nl_NL.php +1 -1
  3. lang/yarpp-ja.mo +0 -0
  4. lang/yarpp-ja_JP.po +18 -13
  5. readme.txt +6 -5
  6. yarpp.php +8 -8
keywords.php CHANGED
@@ -51,10 +51,10 @@ function yarpp_html_entity_strip( $html ) {
51
}
52
53
function post_body_keywords( $ID, $max = 20 ) {
54
- $posts = get_posts(array('p'=>$ID,'post_type'=>'any'));
55
- if (count($posts) != 1)
56
return '';
57
- $content = strip_tags( apply_filters_if_white( 'the_content', $posts[0]->post_content ) );
58
$content = yarpp_html_entity_strip( $content );
59
return yarpp_extract_keywords( $content, $max );
60
}
51
}
52
53
function post_body_keywords( $ID, $max = 20 ) {
54
+ $post = get_post( $ID );
55
+ if ( empty($post) )
56
return '';
57
+ $content = strip_tags( apply_filters_if_white( 'the_content', $post->post_content ) );
58
$content = yarpp_html_entity_strip( $content );
59
return yarpp_extract_keywords( $content, $max );
60
}
lang/words-nl_NL.php CHANGED
@@ -1,3 +1,3 @@
1
<?php
2
3
- $overusedwords = array( '', 'een', 'de', 'het', 'of', 'in', 'naar', 'op', 'is', 'met', 'voor', 'als', 'dat', 'onder', 'dit', 'mijn', 'mij', 'was', 'ons', 'jij', 'zij', 'wij', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '10', 'over', 'na', 'alle', 'bijna', 'langs', 'ook', 'ander', 'enig', 'enige', 'zijn', 'ben', 'bent', 'beschikbaar', 'terug', 'omdat', 'geweest', 'doordat', 'beste', 'beter', 'groot', 'klein', 'beiden', 'maar', 'c', 'kom', 'komen','kan','kunnen','konden', 'controleren', 'zouden', 'zou', 'cursus', 'd', 'dan', 'dag', 'beslissen', 'deden', 'deed', 'doet', 'verschillend', 'doe', 'niet', 'nog', 'onder', 'rijden', 'e', 'elke', 'gemakkelijk', 'makkie', 'editie', 'versie', 'einde', 'genoeg', 'even', 'elke', 'voorbeeld', 'enkele', 'vinden', 'eerste', 'gevonden', 'vind', 'vindt' 'van', 'krijg', 'krijgen', 'gaan', 'ga', 'goed', 'snap', 'begrijpen', 'heb', 'hebben', 'had', 'hard', 'heeft', 'hij', 'hem', 'haar', 'hier', 'hoe', 'niet', 'wel', 'weten', 'laatste', 'links', 'rechts', 'leuk', 'klein', 'lang', 'kijk', 'kijken', 'veel', 'weinig', 'maken', 'maak', 'gemaakt', 'menu', 'misschien', 'wellicht', 'meer', 'minder', 'naam', 'nbsp', 'nodig', 'nieuw', 'nee', 'ja', 'niet', 'nu', 'nummer', 'uit', 'oud', 'een', 'alleen', 'originineel', 'ander', 'andere', 'anders', 'haar', 'over', 'deel', 'plek', 'plek', 'mooi', 'waarschijnlijk', 'probleem', 'plaats', 'ongeveer', 'gezegde', 're', 'werkelijk', 'uitkomst', 'plus', 'min','klopt', 's', 'zelfde','dezelfde', 'zag', 'zien', 'zie', 'verschillende','zou', 'zouden', 'since', 'maat', 'kleine', 'zo', 'sommige', 'iets', 'speciaal', 'stil','nog', 'dingen', 'zoals', 'natuurlijk', 'systeem', 't', 'nemen','neem', 'dan', 'hun', 'hen', 'daarna', 'er', 'deze', 'dingen', 'ding', 'denk', 'denken', 'zulke', 'moeilijk', 'door','doorheen', 'doordat','omdat', 'tijd', 'vandaag', 'samen', 'ook', 'nam', 'twee', 'gebruiken','gebruik', 'gebruikt', 'gebruikte', 'zeer', 'erg', 'want', 'manier', 'nou', 'nu', 'geweest', 'waar', 'wat', 'wanneer', 'waar', 'welke', 'ondertussen', 'terwijl', 'wit','zwart','wie','wil', 'zou','zouden', 'jou', 'jouw', 'haar', 'van','mensen', 'man', 'vrouw', 'persoon', 'goed', 'slecht', 'heel','later', 'eerder', 'nieuw', 'moet', 'moeten', 'mogen', 'mag', 'zegt', 'zeggen', 'zei', 'zeg', 'maak', 'maken', 'maakte', 'gemaakt', 'doe', 'doen', 'deed', 'deden', 'konden', 'word', 'wordt', 'werd', 'werden', 'ja', 'nee','uh', 'die','naar', 'je', 'maar','jaar','moet', 'aleen');
1
<?php
2
3
+ $overusedwords = array('', 'een', 'de', 'het', 'of', 'in', 'naar', 'op', 'is', 'met', 'voor', 'als', 'dat', 'onder', 'dit', 'mijn', 'mij', 'was', 'ons', 'jij', 'zij', 'wij', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '10', 'over', 'na', 'alle', 'bijna', 'langs', 'ook', 'ander', 'enig', 'enige', 'zijn', 'ben', 'bent', 'beschikbaar', 'terug', 'omdat', 'geweest', 'doordat', 'beste', 'beter', 'groot', 'klein', 'beiden', 'maar', 'c', 'kom', 'komen','kan','kunnen','konden', 'controleren', 'zouden', 'zou', 'cursus', 'd', 'dan', 'dag', 'beslissen', 'deden', 'deed', 'doet', 'verschillend', 'doe', 'niet', 'nog', 'onder', 'rijden', 'e', 'elke', 'gemakkelijk', 'makkie', 'editie', 'versie', 'einde', 'genoeg', 'even', 'elke', 'voorbeeld', 'enkele', 'vinden', 'eerste', 'gevonden', 'vind', 'vindt', 'van', 'krijg', 'krijgen', 'gaan', 'ga', 'goed', 'snap', 'begrijpen', 'heb', 'hebben', 'had', 'hard', 'heeft', 'hij', 'hem', 'haar', 'hier', 'hoe', 'niet', 'wel', 'weten', 'laatste', 'links', 'rechts', 'leuk', 'klein', 'lang', 'kijk', 'kijken', 'veel', 'weinig', 'maken', 'maak', 'gemaakt', 'menu', 'misschien', 'wellicht', 'meer', 'minder', 'naam', 'nbsp', 'nodig', 'nieuw', 'nee', 'ja', 'niet', 'nu', 'nummer', 'uit', 'oud', 'een', 'alleen', 'originineel', 'ander', 'andere', 'anders', 'haar', 'over', 'deel', 'plek', 'plek', 'mooi', 'waarschijnlijk', 'probleem', 'plaats', 'ongeveer', 'gezegde', 're', 'werkelijk', 'uitkomst', 'plus', 'min','klopt', 's', 'zelfde','dezelfde', 'zag', 'zien', 'zie', 'verschillende','zou', 'zouden', 'since', 'maat', 'kleine', 'zo', 'sommige', 'iets', 'speciaal', 'stil','nog', 'dingen', 'zoals', 'natuurlijk', 'systeem', 't', 'nemen','neem', 'dan', 'hun', 'hen', 'daarna', 'er', 'deze', 'dingen', 'ding', 'denk', 'denken', 'zulke', 'moeilijk', 'door','doorheen', 'doordat','omdat', 'tijd', 'vandaag', 'samen', 'ook', 'nam', 'twee', 'gebruiken','gebruik', 'gebruikt', 'gebruikte', 'zeer', 'erg', 'want', 'manier', 'nou', 'nu', 'geweest', 'waar', 'wat', 'wanneer', 'waar', 'welke', 'ondertussen', 'terwijl', 'wit','zwart','wie','wil', 'zou','zouden', 'jou', 'jouw', 'haar', 'van','mensen', 'man', 'vrouw', 'persoon', 'goed', 'slecht', 'heel','later', 'eerder', 'nieuw', 'moet', 'moeten', 'mogen', 'mag', 'zegt', 'zeggen', 'zei', 'zeg', 'maak', 'maken', 'maakte', 'gemaakt', 'doe', 'doen', 'deed', 'deden', 'konden', 'word', 'wordt', 'werd', 'werden', 'ja', 'nee','uh', 'die','naar', 'je', 'maar','jaar','moet', 'aleen');
lang/yarpp-ja.mo CHANGED
Binary file
lang/yarpp-ja_JP.po CHANGED
@@ -19,7 +19,7 @@ msgstr ""
19
"X-Poedit-SearchPath-0: .\n"
20
"X-Textdomain-Support: yes"
21
22
- #: includes.php:376
23
#@ yarpp
24
msgid "Related Posts"
25
msgstr "関連記事"
@@ -105,13 +105,13 @@ msgstr "共有の%sをふたつ以上必要とする"
105
msgid "consider with extra weight"
106
msgstr "検討する(重要視)"
107
108
- #: options-meta-boxes.php:286
109
#@ default
110
#@ yarpp
111
msgid "Donate to mitcho (Michael Yoshitaka Erlewine) for this plugin via PayPal"
112
msgstr "YARPPの作成者(ミッチョ)にPayPalで寄付をする"
113
114
- #: options.php:178
115
#@ yarpp
116
msgid "Yet Another Related Posts Plugin Options"
117
msgstr "関連記事 (YARPP) 設定"
@@ -305,7 +305,7 @@ msgstr "タイトル順(降順)"
305
msgid "Default display if no results:"
306
msgstr "関連記事がない時のメッセージ"
307
308
- #: includes.php:257
309
#: options-meta-boxes.php:203
310
#: options-meta-boxes.php:268
311
#@ yarpp
@@ -385,12 +385,12 @@ msgstr "(説明)"
385
msgid "Options saved!"
386
msgstr "設定の変更は保存されました。"
387
388
- #: options.php:280
389
#@ yarpp
390
msgid "Do you really want to reset your configuration?"
391
msgstr "本当に初期設定に戻りますか?"
392
393
- #: options.php:279
394
#@ yarpp
395
msgid "Update options"
396
msgstr "変更を保存"
@@ -400,7 +400,7 @@ msgstr "変更を保存"
400
msgid "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."
401
msgstr "より関連性の高い記事だけを表示したい場合は、最低関連スコアを上げてください。初期設定は5です。"
402
403
- #: options.php:280
404
#@ yarpp
405
msgid "Reset options"
406
msgstr "初期設定に戻る"
@@ -449,14 +449,14 @@ msgstr "ヶ月間"
449
msgid "Show only posts from the past NUMBER UNITS"
450
msgstr "過去 NUMBER UNITS の記事だけを表示"
451
452
- #: includes.php:248
453
#: options-meta-boxes.php:161
454
#: options-meta-boxes.php:228
455
#@ yarpp
456
msgid "Display using a custom template file"
457
msgstr "テンプレートを使って表示"
458
459
- #: includes.php:249
460
#: options-meta-boxes.php:165
461
#: options-meta-boxes.php:233
462
#@ yarpp
@@ -505,7 +505,7 @@ msgstr "設定"
505
msgid "Title:"
506
msgstr ""
507
508
- #: includes.php:385
509
#@ yarpp
510
msgid "Related entries may be displayed once you save your entry"
511
msgstr "関連記事は保存後更新されます。"
@@ -538,7 +538,7 @@ msgstr "YARPP Twitter"
538
msgid "YARPP on the Web"
539
msgstr "ウェブサイト"
540
541
- #: options-meta-boxes.php:292
542
#@ yarpp
543
msgid "Contact YARPP"
544
msgstr "YARPP 情報"
@@ -561,9 +561,14 @@ msgstr "関連記事プラグイン(YARPP)の新しいベータ(%s)が
561
msgid "Please try <a href=\"%s\" target=\"_blank\">manual SQL setup</a>."
562
msgstr ""
563
564
- #: options.php:188
565
#, php-format
566
#@ yarpp
567
msgid "by <a href=\"%s\" target=\"_blank\">mitcho (Michael 芳貴 Erlewine)</a>"
568
- msgstr ""
569
19
"X-Poedit-SearchPath-0: .\n"
20
"X-Textdomain-Support: yes"
21
22
+ #: includes.php:378
23
#@ yarpp
24
msgid "Related Posts"
25
msgstr "関連記事"
105
msgid "consider with extra weight"
106
msgstr "検討する(重要視)"
107
108
+ #: options-meta-boxes.php:287
109
#@ default
110
#@ yarpp
111
msgid "Donate to mitcho (Michael Yoshitaka Erlewine) for this plugin via PayPal"
112
msgstr "YARPPの作成者(ミッチョ)にPayPalで寄付をする"
113
114
+ #: options.php:172
115
#@ yarpp
116
msgid "Yet Another Related Posts Plugin Options"
117
msgstr "関連記事 (YARPP) 設定"
305
msgid "Default display if no results:"
306
msgstr "関連記事がない時のメッセージ"
307
308
+ #: includes.php:259
309
#: options-meta-boxes.php:203
310
#: options-meta-boxes.php:268
311
#@ yarpp
385
msgid "Options saved!"
386
msgstr "設定の変更は保存されました。"
387
388
+ #: options.php:274
389
#@ yarpp
390
msgid "Do you really want to reset your configuration?"
391
msgstr "本当に初期設定に戻りますか?"
392
393
+ #: options.php:273
394
#@ yarpp
395
msgid "Update options"
396
msgstr "変更を保存"
400
msgid "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."
401
msgstr "より関連性の高い記事だけを表示したい場合は、最低関連スコアを上げてください。初期設定は5です。"
402
403
+ #: options.php:274
404
#@ yarpp
405
msgid "Reset options"
406
msgstr "初期設定に戻る"
449
msgid "Show only posts from the past NUMBER UNITS"
450
msgstr "過去 NUMBER UNITS の記事だけを表示"
451
452
+ #: includes.php:250
453
#: options-meta-boxes.php:161
454
#: options-meta-boxes.php:228
455
#@ yarpp
456
msgid "Display using a custom template file"
457
msgstr "テンプレートを使って表示"
458
459
+ #: includes.php:251
460
#: options-meta-boxes.php:165
461
#: options-meta-boxes.php:233
462
#@ yarpp
505
msgid "Title:"
506
msgstr ""
507
508
+ #: includes.php:387
509
#@ yarpp
510
msgid "Related entries may be displayed once you save your entry"
511
msgstr "関連記事は保存後更新されます。"
538
msgid "YARPP on the Web"
539
msgstr "ウェブサイト"
540
541
+ #: options-meta-boxes.php:293
542
#@ yarpp
543
msgid "Contact YARPP"
544
msgstr "YARPP 情報"
561
msgid "Please try <a href=\"%s\" target=\"_blank\">manual SQL setup</a>."
562
msgstr ""
563
564
+ #: options.php:182
565
#, php-format
566
#@ yarpp
567
msgid "by <a href=\"%s\" target=\"_blank\">mitcho (Michael 芳貴 Erlewine)</a>"
568
+ msgstr "by <a href=\"%s\" target=\"_blank\">みっちょ (アーリーワイン・マイケル芳貴)</a>"
569
+
570
+ #: options-meta-boxes.php:286
571
+ #@ yarpp
572
+ msgid "Rate YARPP on WordPress.org"
573
+ msgstr "WordPress.org で YARPP を評価する"
574
readme.txt CHANGED
@@ -7,7 +7,7 @@ Donate link: http://tinyurl.com/donatetomitcho
7
Tags: related, posts, post, pages, page, RSS, feed, feeds
8
Requires at least: 3.0
9
Tested up to: 3.3
10
- Stable tag: 3.3.2
11
12
Display a list of related entries on your site and feeds based on a unique algorithm. Templating allows customization of the display.
13
@@ -24,6 +24,8 @@ Yet Another Related Posts Plugin (YARPP) gives you a list of posts and/or pages
24
25
This plugin requires PHP 5 and MySQL 4.1 or greater.
26
27
**See [other plugins by mitcho](http://profiles.wordpress.org/users/mitchoyoshitaka/)**.
28
29
= A note on support (June 2010) =
@@ -198,10 +200,9 @@ If you are a bilingual speaker of English and another language and an avid user
198
== Changelog ==
199
200
= 3.3.3 =
201
- * Init YARPP on the `init` action, [by request](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-load-sequence-yarpp-starts-before-the-wordpress-init-completes)
202
- * Updated Polish and Italian localizations
203
- * Added Dutch stopwords by Paul Kessels
204
- * [Bug fix](http://wordpress.org/support/topic/no-related-posts-1): a fix for keyword computation for pages; may improve relatedness performance
205
* Code cleanup:
206
* Minor speedup to unnecessarily slow i18n code
207
* Fixed fatal error in postmeta keyword caching code
7
Tags: related, posts, post, pages, page, RSS, feed, feeds
8
Requires at least: 3.0
9
Tested up to: 3.3
10
+ Stable tag: 3.3.3
11
12
Display a list of related entries on your site and feeds based on a unique algorithm. Templating allows customization of the display.
13
24
25
This plugin requires PHP 5 and MySQL 4.1 or greater.
26
27
+ YARPP does not yet support custom post types or taxonomies; look for these in a future version.
28
+
29
**See [other plugins by mitcho](http://profiles.wordpress.org/users/mitchoyoshitaka/)**.
30
31
= A note on support (June 2010) =
200
== Changelog ==
201
202
= 3.3.3 =
203
+ * [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.
204
+ * 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)
205
+ * Updated Polish, Italian, and Japanese localizations; added Dutch stopwords by Paul Kessels
206
* Code cleanup:
207
* Minor speedup to unnecessarily slow i18n code
208
* Fixed fatal error in postmeta keyword caching code
yarpp.php CHANGED
@@ -3,17 +3,13 @@
3
Plugin Name: Yet Another Related Posts Plugin
4
Plugin URI: http://yarpp.org/
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.3.3b2
7
Author: mitcho (Michael Yoshitaka Erlewine)
8
Author URI: http://mitcho.com/
9
Donate link: http://tinyurl.com/donatetomitcho
10
*/
11
12
- // set $yarpp_debug
13
- if (isset($_REQUEST['yarpp_debug']))
14
- $yarpp_debug = true;
15
-
16
- define('YARPP_VERSION','3.3.3b2');
17
define('YARPP_DIR',dirname(__FILE__));
18
19
require_once(YARPP_DIR.'/includes.php');
@@ -27,10 +23,14 @@ require_once(YARPP_DIR.'/template-functions.php');
27
if (!defined('YARPP_CACHE_TYPE'))
28
define('YARPP_CACHE_TYPE', 'tables');
29
30
- // new in 3.2.3: init yarpp on init
31
add_action( 'init', 'yarpp_init' );
32
function yarpp_init() {
33
- global $yarpp_cache, $yarpp_storage_class;
34
35
register_activation_hook( __FILE__, 'yarpp_activate' );
36
3
Plugin Name: Yet Another Related Posts Plugin
4
Plugin URI: http://yarpp.org/
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.3.3
7
Author: mitcho (Michael Yoshitaka Erlewine)
8
Author URI: http://mitcho.com/
9
Donate link: http://tinyurl.com/donatetomitcho
10
*/
11
12
+ define('YARPP_VERSION','3.3.3');
13
define('YARPP_DIR',dirname(__FILE__));
14
15
require_once(YARPP_DIR.'/includes.php');
23
if (!defined('YARPP_CACHE_TYPE'))
24
define('YARPP_CACHE_TYPE', 'tables');
25
26
+ // new in 3.3.3: init yarpp on init
27
add_action( 'init', 'yarpp_init' );
28
function yarpp_init() {
29
+ global $yarpp_cache, $yarpp_storage_class, $yarpp_debug;
30
+
31
+ // set $yarpp_debug
32
+ if ( isset($_REQUEST['yarpp_debug']) )
33
+ $yarpp_debug = true;
34
35
register_activation_hook( __FILE__, 'yarpp_activate' );
36