Yet Another Related Posts Plugin (YARPP) - Version 3.0.1

Version Description

Download this release

Release Info

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

Code changes from version 2.1.6 to 3.0.1

i/close.gif ADDED
Binary file
i/spin.gif ADDED
Binary file
includes.php CHANGED
@@ -3,11 +3,20 @@
3
  require_once('magic.php');
4
  require_once('keywords.php');
5
  require_once('intl.php');
 
 
 
 
 
 
6
 
7
  // here's a list of all the options YARPP uses (except version), as well as their default values, sans the yarpp_ prefix, split up into binary options and value options. These arrays are used in updating settings (options.php) and other tasks.
8
  $yarpp_value_options = array('threshold' => 5,
9
  'limit' => 5,
 
10
  'excerpt_length' => 10,
 
 
11
  'before_title' => '<li>',
12
  'after_title' => '</li>',
13
  'before_post' => ' <small>',
@@ -17,6 +26,7 @@ $yarpp_value_options = array('threshold' => 5,
17
  'no_results' => '<p>No related posts.</p>',
18
  'order' => 'score DESC',
19
  'rss_limit' => 3,
 
20
  'rss_excerpt_length' => 10,
21
  'rss_before_title' => '<li>',
22
  'rss_after_title' => '</li>',
@@ -34,20 +44,31 @@ $yarpp_value_options = array('threshold' => 5,
34
  'discats' => '');
35
  $yarpp_binary_options = array('past_only' => true,
36
  'show_excerpt' => false,
 
 
37
  'rss_show_excerpt' => false,
 
38
  'show_pass_post' => false,
39
  'cross_relate' => false,
40
  'auto_display' => true,
41
  'rss_display' => true,
42
  'rss_excerpt_display' => true,
43
  'promote_yarpp' => false,
44
- 'rss_promote_yarpp' => false);
 
45
 
46
  function yarpp_enabled() {
47
  global $wpdb;
48
  $indexdata = $wpdb->get_results("show index from $wpdb->posts");
49
  foreach ($indexdata as $index) {
50
- if ($index->Key_name == 'yarpp_title') return 1;
 
 
 
 
 
 
 
51
  }
52
  return 0;
53
  }
@@ -69,7 +90,6 @@ function yarpp_activate() {
69
  add_option("yarpp_$option",$yarpp_binary_options[$option]." ");
70
  }
71
  if (!yarpp_enabled()) {
72
- // $wpdb->query("ALTER TABLE `wp_posts` DROP INDEX `yarpp_cache`");
73
  if (!$wpdb->query("ALTER TABLE $wpdb->posts ADD FULLTEXT `yarpp_title` ( `post_title`)")) {
74
  echo "<!--".__('MySQL error on adding yarpp_title','yarpp').": ";
75
  $wpdb->print_error();
@@ -80,12 +100,34 @@ function yarpp_activate() {
80
  $wpdb->print_error();
81
  echo "-->";
82
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  if (!yarpp_enabled()) {
84
  return 0;
85
  }
86
  }
87
- add_option('yarpp_version','2.16');
88
- update_option('yarpp_version','2.16');
89
  return 1;
90
  }
91
 
@@ -119,7 +161,7 @@ function yarpp_upgrade_check($inuse = false) {
119
  update_option('yarpp_version','1.5');
120
  }
121
 
122
- if (get_option('yarpp_version') < 2) {
123
  foreach (array_keys($yarpp_value_options) as $option) {
124
  if (!get_option("yarpp_$option"))
125
  add_option("yarpp_$option",$yarpp_value_options[$option].' ');
@@ -129,17 +171,18 @@ function yarpp_upgrade_check($inuse = false) {
129
  add_option("yarpp_$option",$yarpp_binary_options[$option]);
130
  }
131
 
132
- if (!$inuse)
133
- echo '<div id="message" class="updated fade" style="background-color: rgb(207, 235, 247);">'.__('<h3>An important message from YARPP:</h3><p>Thank you for upgrading to YARPP 2. YARPP 2.0 adds the much requested ability to limit related entry results by certain tags or categories. 2.0 also brings more fine tuned control of the magic algorithm, letting you specify how the algorithm should consider or not consider entry content, titles, tags, and categories. Make sure to adjust the new settings to your liking and perhaps readjust your threshold.</p><p>For more information, check out the <a href="http://mitcho.com/code/yarpp/">YARPP documentation</a>. (This message will not be displayed again.)</p>','yarpp').'</div>';
134
  }
135
 
136
- if (get_option('yarpp_version') < 2.03) {
137
  $wpdb->query("ALTER TABLE $wpdb->posts ADD FULLTEXT `yarpp_title` ( `post_title`)");
138
  $wpdb->query("ALTER TABLE $wpdb->posts ADD FULLTEXT `yarpp_content` ( `post_content`)"); update_option('yarpp_version','2.03');
139
  }
140
 
141
- if (get_option('yarpp_version') < 2.16) {
142
- update_option('yarpp_version','2.16');
 
 
 
143
  }
144
 
145
  // just in case, try to add the index one more time.
@@ -151,8 +194,16 @@ function yarpp_upgrade_check($inuse = false) {
151
  }
152
 
153
  function yarpp_admin_menu() {
154
- add_options_page(__('Related Posts (YARPP)','yarpp'),__('Related Posts (YARPP)','yarpp'), 8, 'yet-another-related-posts-plugin/options.php', 'yarpp_options_page');
155
  //if (function_exists('add_submenu_page')) add_submenu_page('options-general.php', 'Related Posts (YARPP)', 'Related Posts (YARPP)', 8, 'yet-another-related-posts-plugin/options.php');
 
 
 
 
 
 
 
 
156
  }
157
 
158
  function yarpp_options_page() {
@@ -183,7 +234,7 @@ function yarpp_default($content) {
183
  if (is_feed())
184
  return yarpp_rss($content);
185
  elseif (yarpp_get_option('auto_display') and is_single())
186
- return $content.yarpp_related(array('post'),array(),false,'website');
187
  else
188
  return $content;
189
  }
@@ -191,15 +242,15 @@ function yarpp_default($content) {
191
  function yarpp_rss($content) {
192
  global $wpdb, $post;
193
  if (yarpp_get_option('rss_display'))
194
- return $content.yarpp_related(array('post'),array(),false,'rss');
195
  else
196
  return $content;
197
  }
198
 
199
  function yarpp_rss_excerpt($content) {
200
  global $wpdb, $post;
201
- if (yarpp_get_option('rss_excerpt_display') and yarpp_get_option('rss_display'))
202
- return $content.clean_pre(yarpp_related(array('post'),array(),false,'rss'));
203
  else
204
  return $content;
205
  }
@@ -282,7 +333,7 @@ function apply_filters_if_white($tag, $value) {
282
  // upgrade to 1.5!
283
  function yarpp_upgrade_one_five() {
284
  global $wpdb;
285
- $migrate_options = array('past_only','show_score','show_excerpt','show_pass_post','cross_relate','limit','threshold','before_title','after_title','before_post','after_post');
286
  foreach ($migrate_options as $option) {
287
  if (get_option($option)) {
288
  update_option("yarpp_$option",get_option($option));
@@ -326,4 +377,10 @@ function yarpp_get_option($option,$escapehtml = false) {
326
  return $return;
327
  }
328
 
 
 
 
 
 
 
329
  ?>
3
  require_once('magic.php');
4
  require_once('keywords.php');
5
  require_once('intl.php');
6
+ require_once('services.php');
7
+
8
+ if ( !defined('WP_CONTENT_URL') )
9
+ define('WP_CONTENT_URL', get_option('siteurl') . '/wp-content');
10
+ if ( !defined('WP_CONTENT_DIR') )
11
+ define('WP_CONTENT_DIR', ABSPATH . 'wp-content');
12
 
13
  // here's a list of all the options YARPP uses (except version), as well as their default values, sans the yarpp_ prefix, split up into binary options and value options. These arrays are used in updating settings (options.php) and other tasks.
14
  $yarpp_value_options = array('threshold' => 5,
15
  'limit' => 5,
16
+ 'template_file' => '', // new in 2.2
17
  'excerpt_length' => 10,
18
+ 'recent_number' => 12,
19
+ 'recent_units' => 'month',
20
  'before_title' => '<li>',
21
  'after_title' => '</li>',
22
  'before_post' => ' <small>',
26
  'no_results' => '<p>No related posts.</p>',
27
  'order' => 'score DESC',
28
  'rss_limit' => 3,
29
+ 'rss_template_file' => '', // new in 2.2
30
  'rss_excerpt_length' => 10,
31
  'rss_before_title' => '<li>',
32
  'rss_after_title' => '</li>',
44
  'discats' => '');
45
  $yarpp_binary_options = array('past_only' => true,
46
  'show_excerpt' => false,
47
+ 'recent_only' => false, // new in 3.0
48
+ 'use_template' => false, // new in 2.2
49
  'rss_show_excerpt' => false,
50
+ 'rss_use_template' => false, // new in 2.2
51
  'show_pass_post' => false,
52
  'cross_relate' => false,
53
  'auto_display' => true,
54
  'rss_display' => true,
55
  'rss_excerpt_display' => true,
56
  'promote_yarpp' => false,
57
+ 'rss_promote_yarpp' => false,
58
+ 'ad_hoc_caching' => true);
59
 
60
  function yarpp_enabled() {
61
  global $wpdb;
62
  $indexdata = $wpdb->get_results("show index from $wpdb->posts");
63
  foreach ($indexdata as $index) {
64
+ if ($index->Key_name == 'yarpp_title') {
65
+ // now check for the cache tables
66
+ $tabledata = $wpdb->get_col("show tables");
67
+ if (array_search("{$wpdb->prefix}yarpp_related_cache",$tabledata) !== false and array_search("{$wpdb->prefix}yarpp_keyword_cache",$tabledata) !== false)
68
+ return 1;
69
+ else
70
+ return 0;
71
+ };
72
  }
73
  return 0;
74
  }
90
  add_option("yarpp_$option",$yarpp_binary_options[$option]." ");
91
  }
92
  if (!yarpp_enabled()) {
 
93
  if (!$wpdb->query("ALTER TABLE $wpdb->posts ADD FULLTEXT `yarpp_title` ( `post_title`)")) {
94
  echo "<!--".__('MySQL error on adding yarpp_title','yarpp').": ";
95
  $wpdb->print_error();
100
  $wpdb->print_error();
101
  echo "-->";
102
  }
103
+ if (!$wpdb->query("CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}yarpp_keyword_cache` (
104
+ `ID` bigint(20) unsigned NOT NULL default '0',
105
+ `body` text collate utf8_unicode_ci NOT NULL,
106
+ `title` text collate utf8_unicode_ci NOT NULL,
107
+ `date` timestamp NOT NULL default CURRENT_TIMESTAMP,
108
+ PRIMARY KEY (`ID`)
109
+ ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='YARPP''s keyword cache table';")) {
110
+ echo "<!--".__('MySQL error on creating yarpp_keyword_cache table','yarpp').": ";
111
+ $wpdb->print_error();
112
+ echo "-->";
113
+ }
114
+ if (!$wpdb->query("CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}yarpp_related_cache` (
115
+ `reference_ID` bigint(20) unsigned NOT NULL default '0',
116
+ `ID` bigint(20) unsigned NOT NULL default '0',
117
+ `score` float unsigned NOT NULL default '0',
118
+ `date` timestamp NOT NULL default CURRENT_TIMESTAMP,
119
+ PRIMARY KEY (`reference_ID`,`ID`)
120
+ ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;")) {
121
+ echo "<!--".__('MySQL error on creating yarpp_related_cache table','yarpp').": ";
122
+ $wpdb->print_error();
123
+ echo "-->";
124
+ }
125
  if (!yarpp_enabled()) {
126
  return 0;
127
  }
128
  }
129
+ add_option('yarpp_version','3.01');
130
+ update_option('yarpp_version','3.01');
131
  return 1;
132
  }
133
 
161
  update_option('yarpp_version','1.5');
162
  }
163
 
164
+ if (eregi_replace('[a-z].*$','',get_option('yarpp_version')) < 2) {
165
  foreach (array_keys($yarpp_value_options) as $option) {
166
  if (!get_option("yarpp_$option"))
167
  add_option("yarpp_$option",$yarpp_value_options[$option].' ');
171
  add_option("yarpp_$option",$yarpp_binary_options[$option]);
172
  }
173
 
 
 
174
  }
175
 
176
+ if (eregi_replace('[a-z].*$','',get_option('yarpp_version')) < 2.03) {
177
  $wpdb->query("ALTER TABLE $wpdb->posts ADD FULLTEXT `yarpp_title` ( `post_title`)");
178
  $wpdb->query("ALTER TABLE $wpdb->posts ADD FULLTEXT `yarpp_content` ( `post_content`)"); update_option('yarpp_version','2.03');
179
  }
180
 
181
+ if (eregi_replace('[a-z].*$','',get_option('yarpp_version')) < 3.01 or get_option('yarpp_version') != '3.01') {
182
+ update_option('yarpp_version','3.01');
183
+
184
+ //if (!$inuse)
185
+ // echo '<div id="message" class="updated fade" style="background-color: rgb(207, 235, 247);">'.__('<h3>An important message from YARPP:</h3><p>Thank you for upgrading to YARPP 2. YARPP 2.0 adds the much requested ability to limit related entry results by certain tags or categories. 2.0 also brings more fine tuned control of the magic algorithm, letting you specify how the algorithm should consider or not consider entry content, titles, tags, and categories. Make sure to adjust the new settings to your liking and perhaps readjust your threshold.</p><p>For more information, check out the <a href="http://mitcho.com/code/yarpp/">YARPP documentation</a>. (This message will not be displayed again.)</p>','yarpp').'</div>';
186
  }
187
 
188
  // just in case, try to add the index one more time.
194
  }
195
 
196
  function yarpp_admin_menu() {
197
+ $hook = add_options_page(__('Related Posts (YARPP)','yarpp'),__('Related Posts (YARPP)','yarpp'), 8, 'yet-another-related-posts-plugin/options.php', 'yarpp_options_page');
198
  //if (function_exists('add_submenu_page')) add_submenu_page('options-general.php', 'Related Posts (YARPP)', 'Related Posts (YARPP)', 8, 'yet-another-related-posts-plugin/options.php');
199
+ add_action("load-$hook",'yarpp_load_thickbox');
200
+ }
201
+
202
+ function yarpp_load_thickbox() {
203
+ wp_enqueue_script( 'thickbox' );
204
+ if (function_exists('wp_enqueue_style')) {
205
+ wp_enqueue_style( 'thickbox' );
206
+ }
207
  }
208
 
209
  function yarpp_options_page() {
234
  if (is_feed())
235
  return yarpp_rss($content);
236
  elseif (yarpp_get_option('auto_display') and is_single())
237
+ return $content.yarpp_related(array('post'),array(),false,false,'website');
238
  else
239
  return $content;
240
  }
242
  function yarpp_rss($content) {
243
  global $wpdb, $post;
244
  if (yarpp_get_option('rss_display'))
245
+ return $content.yarpp_related(array('post'),array(),false,false,'rss');
246
  else
247
  return $content;
248
  }
249
 
250
  function yarpp_rss_excerpt($content) {
251
  global $wpdb, $post;
252
+ if (yarpp_get_option('rss_excerpt_display') && yarpp_get_option('rss_display'))
253
+ return $content.clean_pre(yarpp_related(array('post'),array(),false,false,'rss'));
254
  else
255
  return $content;
256
  }
333
  // upgrade to 1.5!
334
  function yarpp_upgrade_one_five() {
335
  global $wpdb;
336
+ $migrate_options = array('past_only','show_excerpt','show_pass_post','cross_relate','limit','threshold','before_title','after_title','before_post','after_post');
337
  foreach ($migrate_options as $option) {
338
  if (get_option($option)) {
339
  update_option("yarpp_$option",get_option($option));
377
  return $return;
378
  }
379
 
380
+ function yarpp_microtime_float()
381
+ {
382
+ list($usec, $sec) = explode(" ", microtime());
383
+ return ((float)$usec + (float)$sec);
384
+ }
385
+
386
  ?>
install.txt ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Yet Another Related Posts Plugin ===
2
+ by mitcho (Michael Yoshitaka Erlewine)
3
+ Twitter: http://twitter.com/yarpp/
4
+ Support forum: http://wordpress.org/tags/yet-another-related-posts-plugin
5
+
6
+ == INSTALLATION ==
7
+
8
+ 1. Copy the folder `yet-another-related-posts-plugin` into the directory `wp-content/plugins/` and (optionally) the sample templates inside `yarpp-templates` folder into your active theme.
9
+
10
+ 2. Activate the plugin.
11
+
12
+ 3. Find the Related Posts (YARPP) settings page in your `wp-admin`. If you see a message telling you to build your cache, please build your cache. Otherwise, you will see no related posts anywhere.
13
+
14
+ NOTE: If you run a large and complex site and/or worry about your SQL query volume, it may be better to simply make sure the "compute related posts on the fly" option is turned on and *not* try to build the cache all at once.
15
+
16
+ == SUPPORT ==
17
+
18
+ Read the FAQ:
19
+ http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/faq/
20
+
21
+ If it's not in the FAQ, find it or ask it in the forum:
22
+ http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/
intl.php CHANGED
File without changes
keywords.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
- function yarpp_extract_keywords($source,$num_to_ret = 20) {
4
- global $post, $overusedwords;
5
 
6
  if (function_exists('mb_split')) {
7
  mb_regex_encoding(get_option('blog_charset'));
@@ -10,39 +10,57 @@ function yarpp_extract_keywords($source,$num_to_ret = 20) {
10
  $wordlist = preg_split('%\s*\W+\s*%', strtolower($source));
11
 
12
  // Build an array of the unique words and number of times they occur.
13
- $a = array_count_values($wordlist);
14
 
15
  // Remove the stop words from the list.
16
  foreach ($overusedwords as $word) {
17
- unset($a[$word]);
18
  }
19
- arsort($a, SORT_NUMERIC);
 
 
 
 
 
 
 
 
20
 
21
- $num_words = count($a);
22
- $num_to_ret = $num_words > $num_to_ret ? $num_to_ret : $num_words;
23
 
24
- $outwords = array_slice($a, 0, $num_to_ret);
25
- return implode(' ', array_keys($outwords));
 
 
 
 
 
 
26
  }
27
 
28
- function post_title_keywords($max = 20) {
29
- global $post;
30
- return yarpp_extract_keywords($post->post_title,$max);
 
 
31
  }
32
 
33
- function post_body_keywords($max = 20) {
34
- global $post;
35
- $content = strip_tags(apply_filters_if_white('the_content',$post->post_content));
 
 
 
 
 
 
36
  return yarpp_extract_keywords($content,$max);
37
  }
38
 
39
- /* yarpp_cache_keywords is EXPERIMENTAL and not used.
40
- * Don't worry about it. ^^
41
- */
42
- function yarpp_cache_keywords() {
43
- global $wpdb, $post, $yarpp_debug;
44
- $body_terms = post_body_keywords();
45
- $title_terms = post_title_keywords();
46
  /*
47
  CREATE TABLE `wp_yarpp_keyword_cache` (
48
  `ID` BIGINT( 20 ) UNSIGNED NOT NULL ,
@@ -52,15 +70,58 @@ function yarpp_cache_keywords() {
52
  PRIMARY KEY ( `ID` )
53
  ) ENGINE = MYISAM COMMENT = 'YARPP\'s keyword cache table'
54
  */
55
- $timeout = 400;
56
-
57
- if (!$wpdb->get_var("select count(*) as count from wp_yarpp_keyword_cache where ID = $post->ID and date > date_sub(now(),interval $timeout minute)")) {
58
- $wpdb->query('set names utf8');
59
 
60
- $wpdb->query("insert into wp_yarpp_keyword_cache (ID,body,title) values ($post->ID,'$body_terms','$title_terms') on duplicate key update body = '$body_terms', title = '$title_terms'");
61
 
62
- if ($yarpp_debug) echo "<!--"."insert into wp_yarpp_keyword_cache (ID,body,title) values ($post->ID,'$body_terms','$title_terms') on duplicate key update body = '$body_terms', title = '$title_terms'"."-->";
63
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  }
65
 
66
  ?>
1
  <?php
2
 
3
+ function yarpp_extract_keywords($source,$max = 20) {
4
+ global $overusedwords;
5
 
6
  if (function_exists('mb_split')) {
7
  mb_regex_encoding(get_option('blog_charset'));
10
  $wordlist = preg_split('%\s*\W+\s*%', strtolower($source));
11
 
12
  // Build an array of the unique words and number of times they occur.
13
+ $tokens = array_count_values($wordlist);
14
 
15
  // Remove the stop words from the list.
16
  foreach ($overusedwords as $word) {
17
+ unset($tokens[$word]);
18
  }
19
+ // Remove words which are only a letter
20
+ foreach (array_keys($tokens) as $word) {
21
+ if (function_exists('mb_strlen'))
22
+ if (mb_strlen($word) < 2) unset($tokens[$word]);
23
+ else
24
+ if (strlen($word) < 2) unset($tokens[$word]);
25
+ }
26
+
27
+ arsort($tokens, SORT_NUMERIC);
28
 
29
+ $types = array_keys($tokens);
 
30
 
31
+ if (count($types) > $max)
32
+ $types = array_slice($types, 0, $max);
33
+ return implode(' ', $types);
34
+ }
35
+
36
+ function post_title_keywords($ID,$max = 20) {
37
+ global $wpdb;
38
+ return yarpp_extract_keywords(html_entity_strip($wpdb->get_var("select post_title from $wpdb->posts where ID = $ID")),$max);
39
  }
40
 
41
+ function html_entity_strip($html) {
42
+ $html = preg_replace('/&#x[0-9a-f]+;/','',$html);
43
+ $html = preg_replace('/&#[0-9]+;/','',$html);
44
+ $html = preg_replace('/&[a-zA-Z]+;/','',$html);
45
+ return $html;
46
  }
47
 
48
+ function post_body_keywords($ID,$max = 20) {
49
+ global $wpdb;
50
+ $content = strip_tags(apply_filters_if_white('the_content',$wpdb->get_var("select post_content from $wpdb->posts where ID = $ID")));
51
+ //echo "<!--".get_option('blog_charset')."-->";
52
+ /*if (get_option('blog_charset') == 'UTF-8')
53
+ $content = html_entity_decode_utf8($content);
54
+ else
55
+ $content = html_entity_decode($content,ENT_QUOTES,get_option('blog_charset'));*/
56
+ $content = html_entity_strip($content);
57
  return yarpp_extract_keywords($content,$max);
58
  }
59
 
60
+ function yarpp_cache_keywords($ID) {
61
+ global $wpdb, $yarpp_debug;
62
+ $body_terms = post_body_keywords($ID);
63
+ $title_terms = post_title_keywords($ID);
 
 
 
64
  /*
65
  CREATE TABLE `wp_yarpp_keyword_cache` (
66
  `ID` BIGINT( 20 ) UNSIGNED NOT NULL ,
70
  PRIMARY KEY ( `ID` )
71
  ) ENGINE = MYISAM COMMENT = 'YARPP\'s keyword cache table'
72
  */
 
 
 
 
73
 
74
+ $wpdb->query('set names utf8');
75
 
76
+ $wpdb->query("insert into {$wpdb->prefix}yarpp_keyword_cache (ID,body,title) values ($ID,'$body_terms ','$title_terms ') on duplicate key update date = now(), body = '$body_terms ', title = '$title_terms '");
77
+
78
+ //echo "<!--"."insert into {$wpdb->prefix}yarpp_keyword_cache (ID,body,title) values ($ID,'$body_terms','$title_terms') on duplicate key update date = now(), body = '$body_terms', title = '$title_terms'"."-->";
79
+
80
+ }
81
+
82
+ function yarpp_get_cached_keywords($ID,$type='body') {
83
+ global $wpdb;
84
+ $out = $wpdb->get_var("select $type from {$wpdb->prefix}yarpp_keyword_cache where ID = $ID");
85
+ if ($out === false or $out == '')
86
+ yarpp_cache_keywords($ID);
87
+ $out = $wpdb->get_var("select $type from {$wpdb->prefix}yarpp_keyword_cache where ID = $ID");
88
+ if ($out === false or $out == '')
89
+ echo "<!--YARPP ERROR: couldn't select/create yarpp $type keywords for $ID-->";
90
+ else
91
+ return $out;
92
+ return false;
93
+ }
94
+
95
+ // replacement html_entity_decode code from php.net
96
+ // author: laurynas dot butkus at gmail dot com
97
+
98
+ function html_entity_decode_utf8($string) {
99
+ static $trans_tbl;
100
+
101
+ // replace numeric entities
102
+ $string = preg_replace('~&#x([0-9a-f]+);~ei', 'code2utf(hexdec("\\1"))', $string);
103
+ $string = preg_replace('~&#([0-9]+);~e', 'code2utf(\\1)', $string);
104
+
105
+ // replace literal entities
106
+ if (!isset($trans_tbl))
107
+ {
108
+ $trans_tbl = array();
109
+
110
+ foreach (get_html_translation_table(HTML_ENTITIES) as $val=>$key)
111
+ $trans_tbl[$key] = utf8_encode($val);
112
+ }
113
+
114
+ return strtr($string, $trans_tbl);
115
+ }
116
+
117
+ // Returns the utf string corresponding to the unicode value (from php.net, courtesy - romans@void.lv)
118
+ function code2utf($num)
119
+ {
120
+ if ($num < 128) return chr($num);
121
+ if ($num < 2048) return chr(($num >> 6) + 192) . chr(($num & 63) + 128);
122
+ if ($num < 65536) return chr(($num >> 12) + 224) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
123
+ if ($num < 2097152) return chr(($num >> 18) + 240) . chr((($num >> 12) & 63) + 128) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
124
+ return '';
125
  }
126
 
127
  ?>
lang/words-de_DE.php CHANGED
File without changes
lang/words-en_US.php CHANGED
File without changes
lang/words-it_IT.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+ $overusedwords = array( '', 'il', 'di', 'e', 'a', 'un', 'in', 'che', 'non', 'ma', 'come', 'su', 'mi', 'anche', 'o', 'io', 'se', 'perch�', 'li', 'ci', 'ne', 'lei', 'ancora', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '10', 'tu', 'lui', 'senza', 'bene', 'cui', 'chi', 'gi�', 'dopo', 'uno', 'noi', 'dove', 'qui', 'no', 'allora', 'tra', 'vi', 'ora', 'fra', 'prima', 'forse', 's�', 'sotto', 'voi', 'fino', 'oggi', 'quasi', 'pure', 'egli', 'mentre', 'contro', 'invece', 'esso', 'l�', 'per�', 'n�', 'subito', 'verso', 'ci�', 'ecco', 'loro', 'essa', 'fuori', 'meno', 'adesso', 'niente', 'cio�', 'male', 'nulla, 'ah', 'oh', 'quindi', 'appena', 'insieme', 'dunque', 'dentro', 'durante', 'almeno', 'secondo', 'anzi', 'oramai', 'oltre', 'intorno', 'sopra', 'dietro', 'ieri', 'davvero', 'l�', 'qualcuno', 'avanti', 'assai', 'presto', 'qua', 'domani', 'circa', 'gi�', 'soprattutto', 'nemmeno', 'grazie', 'tuttavia', 'appunto', 'neppure', 'eh', 'veramente', 'tardi', 'insomma', 'soltanto', 'infatti', 'qualcosa', 'apesso', 'accordo', 'presso', 'intanto', 'lungo', 'neanche', 'piuttosto', 'stasera', 'perci�', 'naturalmente', 'accanto', 'eppure', 'eccetera', 'finalmente', 'infine', 'poich�', 'comunque', 'dinanzi', 'abbastanza', 'peccato', 'certamente', 'coloro', 'attorno', 'magari', 'oppure', 'inoltre', 'indietro', 'addosso', 'addirittura', 'finch�', 'perfino', 'affatto', 'stamattina', 'completamente', 'probabilmente', 'sino', 'chiss�', 'ognuno', 'entro');
4
+
5
+ ?>
lang/yarpp-de_DE.mo CHANGED
Binary file
lang/yarpp-de_DE.po CHANGED
@@ -4,7 +4,7 @@ msgstr ""
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: 2008-11-17 14:23+0100\n"
6
  "PO-Revision-Date: \n"
7
- "Last-Translator: Michael Kalina <m.kalina@3th.be>\n"
8
  "Language-Team: Michael Kalina <m.kalina@3th.be>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -14,8 +14,8 @@ msgstr ""
14
  "X-Poedit-SourceCharset: utf-8\n"
15
  "X-Poedit-KeywordsList: _e;__\n"
16
  "X-Poedit-Basepath: .\n"
 
17
  "X-Poedit-SearchPath-0: .\n"
18
- ": "
19
 
20
  #: includes.php:74
21
  msgid "MySQL error on adding yarpp_title"
@@ -29,7 +29,6 @@ msgstr "MySQL-Fehler beim Hinzufügen von \"yarpp_content\""
29
  msgid "<h3>An important message from YARPP:</h3><p>Thank you for upgrading to YARPP 2. YARPP 2.0 adds the much requested ability to limit related entry results by certain tags or categories. 2.0 also brings more fine tuned control of the magic algorithm, letting you specify how the algorithm should consider or not consider entry content, titles, tags, and categories. Make sure to adjust the new settings to your liking and perhaps readjust your threshold.</p><p>For more information, check out the <a href=\"http://mitcho.com/code/yarpp/\">YARPP documentation</a>. (This message will not be displayed again.)</p>"
30
  msgstr "<h3>Nachricht von YARPP</h3><p>Danke fürs Upgrade auf YARPP 2. Diese Version bringt Verbesserungen im magischen Algorithmus, lässt Sie Einstellungen in der Gewichtung der verschiedenen Stichwörter oder Kategorien vornehmen, berücksichtigt Einstellungen zum Gebrauch bestimmter Ausschlussregeln und lässt Sie bestimmen, wie stark die Variablen \"Inhalt\", \"Überschrift\", \"Stichwörter\" und \"Kategorien\" berücksichtigt werden. Mehr Informationen gibt es in der <a href=\"http://mitcho.com/code/yarpp/\">YARPP Dokumentation</a>.</p><p>Diese Nachricht erscheint nie wieder!</p>"
31
 
32
- #: includes.php:154
33
  #: includes.php:154
34
  msgid "Related Posts (YARPP)"
35
  msgstr "Related Posts (YARPP)"
@@ -106,7 +105,6 @@ msgstr "besonders berücksichtigen"
106
  msgid "Yet Another Related Posts Plugin version history (RSS 2.0)"
107
  msgstr "YARPP-Versionsverlauf (RSS 2.0)"
108
 
109
- #: options.php:183
110
  #: options.php:183
111
  msgid "Donate to mitcho (Michael Yoshitaka Erlewine) for this plugin via PayPal"
112
  msgstr "An mitcho (Michael Yoshitaka Erlewine) für die Entwicklung des Plugins via PayPal spenden"
@@ -162,7 +160,6 @@ msgstr "YARPP funktioniert ein wenig anders als <a href=\"http://wasabi.pbwiki.c
162
  msgid "more&gt;"
163
  msgstr "?"
164
 
165
-
166
  #: options.php:242
167
  msgid "Match threshold:"
168
  msgstr "Relevanz:"
@@ -201,7 +198,6 @@ msgstr "PERMALINK"
201
 
202
  #: options.php:302
203
  #: options.php:363
204
- #: options.php:363
205
  msgid "RELATED TITLE"
206
  msgstr "ÄHNLICHER TITEL"
207
 
@@ -299,8 +295,6 @@ msgstr "Überschrift (Z-A)"
299
  msgid "Default display if no results:"
300
  msgstr "Quellcode bei 0 relevanten Artikeln:"
301
 
302
-
303
-
304
  #: options.php:347
305
  #: options.php:411
306
  msgid "Help promote Yet Another Related Posts Plugin?"
@@ -320,7 +314,6 @@ msgstr "Darstellung <small>(RSS)</small>"
320
  msgid "Display related posts in feeds?"
321
  msgstr "Ähnliche Beiträge in Newsfeeds anzeigen?"
322
 
323
-
324
  #: options.php:371
325
  msgid "Display related posts in the descriptions?"
326
  msgstr "Ähnliche Beiträge in Descriptions anzeigen?"
@@ -343,31 +336,31 @@ msgstr "Quellcode vor/nach dem Exzerpt:"
343
 
344
  #: options.php:115
345
  msgid "word"
346
- msgstr ""
347
 
348
  #: options.php:116
349
  msgid "tag"
350
- msgstr ""
351
 
352
  #: options.php:117
353
  msgid "category"
354
- msgstr ""
355
 
356
  #: options.php:124
357
  #: options.php:154
358
  #, php-format
359
  msgid "require at least one %s in common"
360
- msgstr ""
361
 
362
  #: options.php:126
363
  #: options.php:156
364
  #, php-format
365
  msgid "require more than one %s in common"
366
- msgstr ""
367
 
368
  #: options.php:95
369
  msgid "Options saved!"
370
- msgstr ""
371
 
372
  #: options.php:237
373
  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."
@@ -375,15 +368,15 @@ msgstr ""
375
 
376
  #: options.php:419
377
  msgid "Update options"
378
- msgstr ""
379
 
380
  #: options.php:420
381
  msgid "Do you really want to reset your configuration?"
382
- msgstr ""
383
 
384
  #: options.php:420
385
  msgid "Reset options"
386
- msgstr ""
387
 
388
  #~ 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, I recommend you turn on the \"show admins the match scores\" setting below. That way, 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."
389
  #~ msgstr "Je höher Sie den Wert \"Relevanz\" setzen, desto restriktiver arbeitet YARPP. Der Standardwert liegt bei 5. Wenn gar keine oder zuwenige Artikel angezeigt werden, setzen Sie ihn auf 3.5 oder gar 1 herunter. Für die Feinabstimmung aktivieren Sie die Option \"Administratoren den Wert der Relevanz anzeigen\" und stimmen den Wert auf Ihre Anforderungen ab."
@@ -392,4 +385,5 @@ msgstr ""
392
  #~ msgid "With this option on, each related entry's total 'match score' (all above the threshold, set above) are displayed after each entry title, <em>if you are an administrator and logged in.</em> Even if you see these values, your visitors will not."
393
  #~ msgstr "Wenn aktiviert, sehen nur eingeloggte Administratoren (nicht die Besucher!) neben jeder Beitragsüberschrift den Übereinstimmungswert."
394
  #~ msgid "This option displays related posts at the end of each item in your RSS and Atom feeds. No template changes are needed."
395
- #~ msgstr "Zeigt ähnliche Beiträge in RSS- und Atom-Feeds an."
 
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: 2008-11-17 14:23+0100\n"
6
  "PO-Revision-Date: \n"
7
+ "Last-Translator: Michael Kalina <yarpp-de@mitcho.com>\n"
8
  "Language-Team: Michael Kalina <m.kalina@3th.be>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "X-Poedit-SourceCharset: utf-8\n"
15
  "X-Poedit-KeywordsList: _e;__\n"
16
  "X-Poedit-Basepath: .\n"
17
+ ": \n"
18
  "X-Poedit-SearchPath-0: .\n"
 
19
 
20
  #: includes.php:74
21
  msgid "MySQL error on adding yarpp_title"
29
  msgid "<h3>An important message from YARPP:</h3><p>Thank you for upgrading to YARPP 2. YARPP 2.0 adds the much requested ability to limit related entry results by certain tags or categories. 2.0 also brings more fine tuned control of the magic algorithm, letting you specify how the algorithm should consider or not consider entry content, titles, tags, and categories. Make sure to adjust the new settings to your liking and perhaps readjust your threshold.</p><p>For more information, check out the <a href=\"http://mitcho.com/code/yarpp/\">YARPP documentation</a>. (This message will not be displayed again.)</p>"
30
  msgstr "<h3>Nachricht von YARPP</h3><p>Danke fürs Upgrade auf YARPP 2. Diese Version bringt Verbesserungen im magischen Algorithmus, lässt Sie Einstellungen in der Gewichtung der verschiedenen Stichwörter oder Kategorien vornehmen, berücksichtigt Einstellungen zum Gebrauch bestimmter Ausschlussregeln und lässt Sie bestimmen, wie stark die Variablen \"Inhalt\", \"Überschrift\", \"Stichwörter\" und \"Kategorien\" berücksichtigt werden. Mehr Informationen gibt es in der <a href=\"http://mitcho.com/code/yarpp/\">YARPP Dokumentation</a>.</p><p>Diese Nachricht erscheint nie wieder!</p>"
31
 
 
32
  #: includes.php:154
33
  msgid "Related Posts (YARPP)"
34
  msgstr "Related Posts (YARPP)"
105
  msgid "Yet Another Related Posts Plugin version history (RSS 2.0)"
106
  msgstr "YARPP-Versionsverlauf (RSS 2.0)"
107
 
 
108
  #: options.php:183
109
  msgid "Donate to mitcho (Michael Yoshitaka Erlewine) for this plugin via PayPal"
110
  msgstr "An mitcho (Michael Yoshitaka Erlewine) für die Entwicklung des Plugins via PayPal spenden"
160
  msgid "more&gt;"
161
  msgstr "?"
162
 
 
163
  #: options.php:242
164
  msgid "Match threshold:"
165
  msgstr "Relevanz:"
198
 
199
  #: options.php:302
200
  #: options.php:363
 
201
  msgid "RELATED TITLE"
202
  msgstr "ÄHNLICHER TITEL"
203
 
295
  msgid "Default display if no results:"
296
  msgstr "Quellcode bei 0 relevanten Artikeln:"
297
 
 
 
298
  #: options.php:347
299
  #: options.php:411
300
  msgid "Help promote Yet Another Related Posts Plugin?"
314
  msgid "Display related posts in feeds?"
315
  msgstr "Ähnliche Beiträge in Newsfeeds anzeigen?"
316
 
 
317
  #: options.php:371
318
  msgid "Display related posts in the descriptions?"
319
  msgstr "Ähnliche Beiträge in Descriptions anzeigen?"
336
 
337
  #: options.php:115
338
  msgid "word"
339
+ msgstr "Wort"
340
 
341
  #: options.php:116
342
  msgid "tag"
343
+ msgstr "Tag"
344
 
345
  #: options.php:117
346
  msgid "category"
347
+ msgstr "Kategorie"
348
 
349
  #: options.php:124
350
  #: options.php:154
351
  #, php-format
352
  msgid "require at least one %s in common"
353
+ msgstr "zumindest ein %s gleich"
354
 
355
  #: options.php:126
356
  #: options.php:156
357
  #, php-format
358
  msgid "require more than one %s in common"
359
+ msgstr "mehr als ein %s gleich"
360
 
361
  #: options.php:95
362
  msgid "Options saved!"
363
+ msgstr "Einstellungen gespeichert!"
364
 
365
  #: options.php:237
366
  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."
368
 
369
  #: options.php:419
370
  msgid "Update options"
371
+ msgstr "Einstellungen aktualisieren"
372
 
373
  #: options.php:420
374
  msgid "Do you really want to reset your configuration?"
375
+ msgstr "Einstellungen tatsächlich zurücksetzen?"
376
 
377
  #: options.php:420
378
  msgid "Reset options"
379
+ msgstr "Einstellungen zurücksetzen"
380
 
381
  #~ 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, I recommend you turn on the \"show admins the match scores\" setting below. That way, 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."
382
  #~ msgstr "Je höher Sie den Wert \"Relevanz\" setzen, desto restriktiver arbeitet YARPP. Der Standardwert liegt bei 5. Wenn gar keine oder zuwenige Artikel angezeigt werden, setzen Sie ihn auf 3.5 oder gar 1 herunter. Für die Feinabstimmung aktivieren Sie die Option \"Administratoren den Wert der Relevanz anzeigen\" und stimmen den Wert auf Ihre Anforderungen ab."
385
  #~ msgid "With this option on, each related entry's total 'match score' (all above the threshold, set above) are displayed after each entry title, <em>if you are an administrator and logged in.</em> Even if you see these values, your visitors will not."
386
  #~ msgstr "Wenn aktiviert, sehen nur eingeloggte Administratoren (nicht die Besucher!) neben jeder Beitragsüberschrift den Übereinstimmungswert."
387
  #~ msgid "This option displays related posts at the end of each item in your RSS and Atom feeds. No template changes are needed."
388
+ #~ msgstr "Zeigt ähnliche Beiträge in RSS- und Atom-Feeds an."
389
+
lang/yarpp-fr_FR.mo ADDED
Binary file
lang/yarpp-fr_FR.po ADDED
@@ -0,0 +1,537 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Yet Another Related Posts Plugin fr_FR v2.1.6\n"
4
+ "PO-Revision-Date: 2008-12-07 23:48+0100\n"
5
+ "Last-Translator: Lionel Chollet <lionel.chollet@gmail.com>\n"
6
+ "Language-Team: Lionel Chollet <lionel.chollet@gmail.com>\n"
7
+ "MIME-Version: 1.0\n"
8
+ "Content-Type: text/plain; charset=UTF-8\n"
9
+ "Content-Transfer-Encoding: 8bit\n"
10
+ "Plural-Forms: nplurals=2; plural=n>1;\n"
11
+ "X-Poedit-Language: French\n"
12
+ "X-Poedit-Country: FRANCE\n"
13
+ "X-Poedit-SourceCharset: utf-8\n"
14
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;__ngettext_noop:1,2;_c\n"
15
+ "X-Poedit-Basepath: ../\n"
16
+ "X-Poedit-SearchPath-0: .: "
17
+
18
+ #: includes.php:94
19
+ msgid "MySQL error on adding yarpp_title"
20
+ msgstr "Erreur MySQL lors de l’ajout du titre “yarpp_title”"
21
+
22
+ #: includes.php:99
23
+ msgid "MySQL error on adding yarpp_content"
24
+ msgstr "Erreur MySQL lors de l’ajout du contenu “yarpp_content”"
25
+
26
+ #: includes.php:185
27
+ msgid "<h3>An important message from YARPP:</h3><p>Thank you for upgrading to YARPP 2. YARPP 2.0 adds the much requested ability to limit related entry results by certain tags or categories. 2.0 also brings more fine tuned control of the magic algorithm, letting you specify how the algorithm should consider or not consider entry content, titles, tags, and categories. Make sure to adjust the new settings to your liking and perhaps readjust your threshold.</p><p>For more information, check out the <a href=\"http://mitcho.com/code/yarpp/\">YARPP documentation</a>. (This message will not be displayed again.)</p>"
28
+ msgstr "<h3>Message important de YARPP</h3><p>Merci d’avoir fait la mise à jour vers YARPP 2. Cette version inclut une fonctionnalité très demandée&nbsp;: la possibilité de construire la liste d’entrées complémentaires en fonction de certains tags ou certaines catégories. YARPP 2 apporte également un meilleur contrôle de l’algorithme de complémentarité, ce qui vous permet de définir si le calcul doit prendre en compte les contenus d’entrée, les titres, les tags ou les catégories. Réglez les nouveaux paramètres selon votre convenance (vous devrez peut-être adapter le seuil de prise en compte pour un résultat optimum).</p><p>Pour plus d’information, consultez la <a href=\"http://mitcho.com/code/yarpp/\">documentation YARPP</a>. (Ce message n’apparaîtra plus.)</p>"
29
+
30
+ #: includes.php:197
31
+ #: includes.php:197
32
+ msgid "Related Posts (YARPP)"
33
+ msgstr "Related Posts (YARPP)"
34
+
35
+ #: includes.php:224
36
+ #: yarpp.php:29
37
+ #: yarpp.php:29
38
+ msgid "Related Posts"
39
+ msgstr "Entrées complémentaires"
40
+
41
+ #: includes.php:229
42
+ msgid "YARPP"
43
+ msgstr "YARPP"
44
+
45
+ #: template-builtin.php:35
46
+ #, php-format
47
+ msgid "%f is the YARPP match score between the current entry and this related entry. You are seeing this value because you are logged in to WordPress as an administrator. It is not shown to regular visitors."
48
+ msgstr "%f représente le degré de complémentarité entre l’entrée considérée et cette entrée complémentaire. Cette valeur n’est affichée que pour les administrateurs connectés au site&nbsp;; elle n’apparaît pas pour les simples visiteurs."
49
+
50
+ #: magic.php:304
51
+ #: options.php:458
52
+ #: options.php:521
53
+ msgid "Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>."
54
+ msgstr "La liste des entrées complémentaires est établie par le module d’extension <a href='http://mitcho.com/code/yarpp/'>YARPP</a>."
55
+
56
+ #: options.php:26
57
+ msgid "The MyISAM check has been overridden. You may now use the \"consider titles\" and \"consider bodies\" relatedness criteria."
58
+ msgstr "Le calcul MyISAM n’est plus utilisé. Vous pouvez maintenant activer les options “Prendre en compte le titre” et “Prendre en compte le contenu” pour définir le calcul de complémentarité."
59
+
60
+ #: options.php:35
61
+ #, php-format
62
+ msgid "YARPP's \"consider titles\" and \"consider bodies\" relatedness criteria require your <code>%s</code> table to use the <a href='http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html'>MyISAM storage engine</a>, but the table seems to be using the <code>%s</code> engine. These two options have been disabled."
63
+ msgstr "Les options YARPP “Prendre en compte le titre” et “Prendre en compte le contenu” pour le calcul de complémentarité requièrent que votre table <code>%s</code> utilise le <a href='http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html'>moteur de classement MyISAM</a>, mais votre table utilise apparemment le moteur <code>%s</code>. Ces deux options ont été désactivées."
64
+
65
+ #: options.php:37
66
+ #, php-format
67
+ msgid "To restore these features, please update your <code>%s</code> table by executing the following SQL directive: <code>ALTER TABLE `%s` ENGINE = MyISAM;</code> . No data will be erased by altering the table's engine, although there are performance implications."
68
+ msgstr "Pour rétablir ces fonctionnalités, mettez à jour votre table <code>%s</code> en exécutant la commande SQL suivante&nbsp;: <code>ALTER TABLE `%s` ENGINE = MyISAM;</code><br />Le changement de moteur de classement n’entraînera pas de perte de données, mais pourra influer sur les performances."
69
+
70
+ #: options.php:39
71
+ #, php-format
72
+ msgid "If, despite this check, you are sure that <code>%s</code> is using the MyISAM engine, press this magic button:"
73
+ msgstr "Si, malgré cette vérification, vous êtes certain que <code>%s</code> utilise le moteur MyISAM, cliquez ce bouton magique&nbsp;:"
74
+
75
+ #: options.php:42
76
+ msgid "Trust me. Let me use MyISAM features."
77
+ msgstr "Faites-moi confiance. Laissez-moi utiliser le moteur MyISAM."
78
+
79
+ #: options.php:65
80
+ msgid "The YARPP database had an error but has been fixed."
81
+ msgstr "La base de données YARPP a rencontré une erreur mais elle a pu être corrigée."
82
+
83
+ #: options.php:67
84
+ msgid "The YARPP database has an error which could not be fixed."
85
+ msgstr "La base de données YARPP a rencontré une erreur qui n’a pas pu être corrigée."
86
+
87
+ #: options.php:153
88
+ #: options.php:170
89
+ #: options.php:182
90
+ msgid "do not consider"
91
+ msgstr "ne pas prendre en compte"
92
+
93
+ #: options.php:154
94
+ #: options.php:171
95
+ #: options.php:184
96
+ msgid "consider"
97
+ msgstr "prendre en compte"
98
+
99
+ #: options.php:172
100
+ msgid "consider with extra weight"
101
+ msgstr "prendre en compte avec plus d’importance"
102
+
103
+ #: options.php:200
104
+ msgid "Yet Another Related Posts Plugin version history (RSS 2.0)"
105
+ msgstr "Historique des versions de l’extension YARPP (RSS 2.0)"
106
+
107
+ #: options.php:271
108
+ #: options.php:271
109
+ msgid "Donate to mitcho (Michael Yoshitaka Erlewine) for this plugin via PayPal"
110
+ msgstr "Faire un don à mitcho (Michael Yoshitaka Erlewine), via PayPal, pour cette extension"
111
+
112
+ #: options.php:254
113
+ msgid "Yet Another Related Posts Plugin Options"
114
+ msgstr "Réglages YARPP"
115
+
116
+ #: options.php:278
117
+ msgid "\"The Pool\""
118
+ msgstr "Le <em>corpus</em>"
119
+
120
+ #: options.php:279
121
+ msgid "\"The Pool\" refers to the pool of posts and pages that are candidates for display as related to the current entry."
122
+ msgstr "Le <em>corpus</em> représente l’ensemble des articles et pages pouvant apparaître dans la liste des entrées complémentaires établie par l’extension YARPP."
123
+
124
+ #: options.php:284
125
+ msgid "Disallow by category:"
126
+ msgstr "Catégorie(s) à&nbsp;exclure&nbsp;:"
127
+
128
+ #: options.php:286
129
+ msgid "Disallow by tag:"
130
+ msgstr "Tag(s)<br />à exclure&nbsp;:"
131
+
132
+ #: options.php:288
133
+ msgid "Show password protected posts?"
134
+ msgstr "Inclure les entrées protégées par mot de passe&nbsp;?"
135
+
136
+ #: options.php:289
137
+ msgid "Show only previous posts?"
138
+ msgstr "Afficher seulement les entrées publiées antérieurement&nbsp;?"
139
+
140
+ #: options.php:306
141
+ msgid "\"Relatedness\" options"
142
+ msgstr "Options de complémentarité"
143
+
144
+ #: options.php:308
145
+ #, php-format
146
+ msgid "YARPP is different than the <a href=\"http://wasabi.pbwiki.com/Related%20Entries\">previous plugins it is based on</a> as it limits the related posts list by (1) a maximum number and (2) a <em>match threshold</em>."
147
+ msgstr "YARPP fonctionne différemment <a href=\"http://wasabi.pbwiki.com/Related%20Entries\">des extensions antérieures</a>, en ceci que la liste des articles complémentaires est établie en fonction&nbsp;:<br />(1) d’une valeur maximale et (2) d’un <em>seuil</em> de complémentarité."
148
+
149
+ #: options.php:308
150
+ #: options.php:322
151
+ #: options.php:405
152
+ #: options.php:410
153
+ #: options.php:457
154
+ #: options.php:469
155
+ #: options.php:470
156
+ #: options.php:474
157
+ #: options.php:520
158
+ #: options.php:531
159
+ msgid "more&gt;"
160
+ msgstr "aide&nbsp;&gt;"
161
+
162
+ #: options.php:313
163
+ msgid "Match threshold:"
164
+ msgstr "Seuil de complémentarité&nbsp;:"
165
+
166
+ #: options.php:314
167
+ msgid "Titles: "
168
+ msgstr "Titres&nbsp;:"
169
+
170
+ #: options.php:316
171
+ msgid "Bodies: "
172
+ msgstr "Contenus&nbsp;:"
173
+
174
+ #: options.php:318
175
+ msgid "Tags: "
176
+ msgstr "Tags&nbsp;:"
177
+
178
+ #: options.php:320
179
+ msgid "Categories: "
180
+ msgstr "Catégories&nbsp;:"
181
+
182
+ #: options.php:322
183
+ msgid "Cross-relate posts and pages?"
184
+ msgstr "Complémentarité croisée entre articles et pages&nbsp;?"
185
+
186
+ #: options.php:322
187
+ msgid "When the \"Cross-relate posts and pages\" option is selected, the <code>related_posts()</code>, <code>related_pages()</code>, and <code>related_entries()</code> all will give the same output, returning both related pages and posts."
188
+ msgstr "Quand l’option “Complémentarité croisée entre articles et pages” est activée, les fonctions <code>related_posts()</code>, <code>related_pages()</code> et <code>related_entries()</code> produiront le même résultat, et la liste présentera aussi bien les articles que les pages complémentaires."
189
+
190
+ #: options.php:401
191
+ msgid "Display options <small>for your website</small>"
192
+ msgstr "Réglages de présentation <small>pour votre site</small>"
193
+
194
+ #: options.php:405
195
+ msgid "Automatically display related posts?"
196
+ msgstr "Afficher la liste des entrées complémentaires automatiquement&nbsp;?"
197
+
198
+ #: options.php:405
199
+ msgid "This option automatically displays related posts right after the content on single entry pages. If this option is off, you will need to manually insert <code>related_posts()</code> or variants (<code>related_pages()</code> and <code>related_entries()</code>) into your theme files."
200
+ msgstr "Quand cette option est activée, la liste d’entrées complémentaires sera affichée automatiquement après le contenu de l’entrée. Si cette option n’est pas activée, vous devrez insérer vous-même le code <code>related_posts()</code> ou ses variantes (<code>related_pages()</code> et <code>related_entries()</code>) dans vos fichiers-modèles."
201
+
202
+ #: options.php:406
203
+ msgid "Website display code example"
204
+ msgstr "Exemple du code produit pour l’affichage des entrées complémentaires sur votre site"
205
+
206
+ #: options.php:406
207
+ #: options.php:471
208
+ msgid "(Update options to reload.)"
209
+ msgstr "(Enregistrez les réglages pour actualiser.)"
210
+
211
+ #: options.php:409
212
+ #: options.php:473
213
+ msgid "Maximum number of related posts:"
214
+ msgstr "Nombre maximal d’articles complémentaires&nbsp;:"
215
+
216
+ #: options.php:422
217
+ msgid "Before / after related entries:"
218
+ msgstr "Avant / Après<br />la liste&nbsp;:"
219
+
220
+ #: options.php:423
221
+ #: options.php:428
222
+ #: options.php:437
223
+ #: options.php:487
224
+ #: options.php:492
225
+ #: options.php:501
226
+ msgid "For example:"
227
+ msgstr "Par exemple&nbsp;:"
228
+
229
+ #: options.php:427
230
+ #: options.php:491
231
+ msgid "Before / after each related entry:"
232
+ msgstr "Avant / Après<br />chaque entrée&nbsp;:"
233
+
234
+ #: options.php:431
235
+ #: options.php:495
236
+ msgid "Show excerpt?"
237
+ msgstr "Afficher l’extrait&nbsp;?"
238
+
239
+ #: options.php:432
240
+ #: options.php:496
241
+ msgid "Excerpt length (No. of words):"
242
+ msgstr "Taille de l’extrait (nombre de mots)&nbsp;/"
243
+
244
+ #: options.php:436
245
+ msgid "Before / after (Excerpt):"
246
+ msgstr "Avant / Après<br />l’extrait"
247
+
248
+ #: options.php:442
249
+ #: options.php:506
250
+ msgid "Order results:"
251
+ msgstr "Classement des résultats&nbsp;"
252
+
253
+ #: options.php:444
254
+ #: options.php:508
255
+ msgid "score (high relevance to low)"
256
+ msgstr "par complémentarité (de la plus forte à la plus faible)"
257
+
258
+ #: options.php:445
259
+ #: options.php:509
260
+ msgid "score (low relevance to high)"
261
+ msgstr "par complémentarité (de la plus faible à la plus forte)"
262
+
263
+ #: options.php:446
264
+ #: options.php:510
265
+ msgid "date (new to old)"
266
+ msgstr "par date (de la plus récente à la plus ancienne)"
267
+
268
+ #: options.php:447
269
+ #: options.php:511
270
+ msgid "date (old to new)"
271
+ msgstr "par date (de la plus ancienne à la plus récente)"
272
+
273
+ #: options.php:448
274
+ #: options.php:512
275
+ msgid "title (alphabetical)"
276
+ msgstr "par titre (en ordre alphabétique)"
277
+
278
+ #: options.php:449
279
+ #: options.php:513
280
+ msgid "title (reverse alphabetical)"
281
+ msgstr "par titre (en ordre contre-alphabétique)"
282
+
283
+ #: options.php:454
284
+ #: options.php:518
285
+ msgid "Default display if no results:"
286
+ msgstr "Afficher s’il n’y a pas d’entrée complémentaire&nbsp;:"
287
+
288
+ #: options.php:456
289
+ #: options.php:520
290
+ msgid "Help promote Yet Another Related Posts Plugin?"
291
+ msgstr "Aider à la promotion de l’extension YARPP&nbsp;?"
292
+
293
+ #: options.php:458
294
+ #: options.php:521
295
+ #, php-format
296
+ msgid "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."
297
+ msgstr "Cette option affiche la mention&nbsp;: %s. Activez-la, enregistrez les réglages, et vous verrez la mention apparaître sous l’exemple du code produit pour l’affichage des entrées complémentaires, dans le cadre à droite."
298
+
299
+ #: options.php:464
300
+ msgid "Display options <small>for RSS</small>"
301
+ msgstr "Réglages de présentation <small>pour les flux RSS</small>"
302
+
303
+ #: options.php:469
304
+ msgid "Display related posts in feeds?"
305
+ msgstr "Afficher les entrées complémentaires dans les flux RSS&nbsp;?"
306
+
307
+ #: options.php:470
308
+ msgid "Display related posts in the descriptions?"
309
+ msgstr "Afficher les entrées complémentaires dans les descriptions&nbsp;?"
310
+
311
+ #: options.php:470
312
+ msgid "This option displays the related posts in the RSS description fields, not just the content. If your feeds are set up to only display excerpts, however, only the description field is used, so this option is required for any display at all."
313
+ msgstr "Cette option affiche les entrées complémentaires après l’extrait d’article dans vos flux RSS. Si vos flux RSS sont configurés pour n’afficher que les extraits, vous devez activer cette option si vous souhaitez faire apparaître la liste des entrées complémentaires."
314
+
315
+ #: options.php:471
316
+ msgid "RSS display code example"
317
+ msgstr "Exemple du code produit pour l’affichage des entrées complémentaires dans vos flux RSS"
318
+
319
+ #: options.php:486
320
+ msgid "Before / after related entries display:"
321
+ msgstr "Avant / Après<br />la liste&nbsp;:"
322
+
323
+ #: options.php:500
324
+ msgid "Before / after (excerpt):"
325
+ msgstr "Avant / Après<br />l’extrait&nbsp;:"
326
+
327
+ #: options.php:147
328
+ msgid "word"
329
+ msgstr "mot"
330
+
331
+ #: options.php:148
332
+ msgid "tag"
333
+ msgstr "tag"
334
+
335
+ #: options.php:149
336
+ msgid "category"
337
+ msgstr "catégorie"
338
+
339
+ #: options.php:156
340
+ #: options.php:186
341
+ #, php-format
342
+ msgid "require at least one %s in common"
343
+ msgstr "nécessite d’avoir au moins 1 %s en commun"
344
+
345
+ #: options.php:158
346
+ #: options.php:188
347
+ #, php-format
348
+ msgid "require more than one %s in common"
349
+ msgstr "nécessite d’avoir plusieurs %ss en commun"
350
+
351
+ #: options.php:125
352
+ msgid "Options saved!"
353
+ msgstr "Réglages enregistrés."
354
+
355
+ #: options.php:308
356
+ 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."
357
+ msgstr "Plus le seuil de complémentarité sera élevé, plus la sélection sera restrictive, et les listes d’entrées complémentaires présenteront, dans l’ensemble, moins d’éléments. La valeur du seuil de complémentarité, par défaut, est fixée à 5. Faites des essais avec différentes valeurs, afin de déterminer le seuil de complémentarité le mieux adapté à votre site et à vos entrées."
358
+
359
+ #: options.php:605
360
+ msgid "Update options"
361
+ msgstr "Enregistrer les réglages"
362
+
363
+ #: options.php:606
364
+ msgid "Do you really want to reset your configuration?"
365
+ msgstr "Voulez-vous vraiment revenir aux réglages par défaut&nbsp;?"
366
+
367
+ #: options.php:606
368
+ msgid "Reset options"
369
+ msgstr "Revenir aux réglages par défaut"
370
+
371
+ #: includes.php:110
372
+ msgid "MySQL error on creating yarpp_keyword_cache table"
373
+ msgstr "Erreur MySQL lors de la création de la table yarpp_keyword_cache"
374
+
375
+ #: includes.php:121
376
+ msgid "MySQL error on creating yarpp_related_cache table"
377
+ msgstr "Erreur MySQL lors de la création de la table yarpp_related_cache table"
378
+
379
+ #: magic.php:56
380
+ msgid "Example post "
381
+ msgstr "Exemple d’entrée "
382
+
383
+ #: options.php:81
384
+ #: options.php:84
385
+ #: options.php:126
386
+ #: options.php:530
387
+ msgid "Related posts cache status"
388
+ msgstr "Statut du cache des entrées complémentaires"
389
+
390
+ #: options.php:81
391
+ msgid "Your related posts cache is incomplete. Please build your cache from the <A>related posts status pane</a>."
392
+ msgstr "Le cache des entrées complémentaires n’est pas à jour. Actualisez le cache depuis le <A>panneau du statut des entrées complémentaires</a>."
393
+
394
+ #: options.php:84
395
+ msgid "Your related posts cache is empty. Please build your cache from the <A>related posts status pane</a>."
396
+ msgstr "Le cache des entrées complémentaires est vide. Construisez le cache depuis le <A>panneau du statut des entrées complémentaires</a>."
397
+
398
+ #: options.php:127
399
+ msgid "If you updated the \"pool\" options or \"relatedness\" options displayed, please rebuild your cache now from the <A>related posts status pane</a>."
400
+ msgstr "Si vous avez modifié les réglages pour le <i>corpus</i> ou pour les options de complémentarité, veuillez reconstruire le cache depuis le <A>panneau du statut des entrées complémentaires</a>."
401
+
402
+ #: options.php:273
403
+ msgid "by <a href=\"http://mitcho.com/code/\">mitcho (Michael 芳貴 Erlewine)</a>"
404
+ msgstr "par <a href=\"http://mitcho.com/code/\">mitcho (Michael 芳貴 Erlewine)</a>"
405
+
406
+ #: options.php:273
407
+ msgid "Follow <a href=\"http://twitter.com/yarpp/\">Yet Another Related Posts Plugin on Twitter</a>"
408
+ msgstr "Suivez <a href=\"http://twitter.com/yarpp/\">YARPP sur Twitter</a>"
409
+
410
+ #: options.php:294
411
+ msgid "day(s)"
412
+ msgstr "jour(s)"
413
+
414
+ #: options.php:295
415
+ msgid "week(s)"
416
+ msgstr "semaine(s)"
417
+
418
+ #: options.php:296
419
+ msgid "month(s)"
420
+ msgstr "mois"
421
+
422
+ #: options.php:298
423
+ msgid "Show only posts from the past NUMBER UNITS"
424
+ msgstr "N’afficher que des entrées publiées depuis moins de NUMBER UNITS"
425
+
426
+ #: options.php:387
427
+ msgid "There is a new beta (VERSION) of Yet Another Related Posts Plugin. You can <A>download it here</a> at your own risk."
428
+ msgstr "Une nouvelle version beta (VERSION) du module d’extension YARPP est disponible. Si vous souhaitez l’essayer, vous pouvez <A>la télécharger ici</a>."
429
+
430
+ #: options.php:389
431
+ msgid "There is a new version (VERSION) of Yet Another Related Posts Plugin available! You can <A>download it here</a>."
432
+ msgstr "Une nouvelle version (VERSION) du module d’extension YARPP est disponible. Vous pouvez <A>la télécharger ici</a>."
433
+
434
+ #: options.php:410
435
+ #: options.php:474
436
+ msgid "Display using a custom template file"
437
+ msgstr "Utiliser un modèle personnalisé"
438
+
439
+ #: options.php:412
440
+ #: options.php:476
441
+ msgid "Template file:"
442
+ msgstr "Fichier-modèle :"
443
+
444
+ #: options.php:469
445
+ msgid "This option displays related posts at the end of each item in your RSS and Atom feeds. No template changes are needed."
446
+ msgstr "Cette option affiche les entrées complémentaires sous le texte de l’article dans vos flux RSS. Il n’est pas nécessaire de définir un fichier-modèle."
447
+
448
+ #: options.php:527
449
+ msgid "Advanced"
450
+ msgstr "Options spéciales"
451
+
452
+ #: options.php:530
453
+ msgid "Show cache status"
454
+ msgstr "Afficher le statut du cache"
455
+
456
+ #: options.php:531
457
+ msgid "When the cache is incomplete, compute related posts on the fly?"
458
+ msgstr "Quand le cache n’est pas à jour, établir la liste depuis la base de données ?"
459
+
460
+ #: options.php:532
461
+ msgid "If a displayed post's related posts are not cached and this option is on, YARPP will compute them on the fly. Do not turn this option on if you have a high-traffic site.<br />If this option is off and a post's related posts have not been cached, it will display as if it has no related posts."
462
+ msgstr "Quand cette option est activée, si les entrées complémentaires ne sont pas encore en cache, YARPP en établira la liste à partir de la base de données. N’activez pas cette option si votre site a une très fort trafic.<br />Quand cette option est désactivée, si les entrées complémentaires ne sont pas en cache, elles ne seront pas affichées."
463
+
464
+ #: options.php:562
465
+ msgid "'MIN minute(s) and SEC second(s) remaining'"
466
+ msgstr "'MIN minute(s) et SEC seconde(s) restantes'"
467
+
468
+ #: options.php:564
469
+ msgid "'SEC second(s) remaining'"
470
+ msgstr "'SEC seconde(s) restantes'"
471
+
472
+ #: options.php:568
473
+ msgid "Your related posts cache is now complete."
474
+ msgstr "Le cache des entrées complémentaires est à jour."
475
+
476
+ #: options.php:568
477
+ msgid "The SQL queries took SEC seconds."
478
+ msgstr "Les requêtes SQL ont pris SEC secondes."
479
+
480
+ #: options.php:578
481
+ #: options.php:582
482
+ msgid "There was an error while constructing the related posts for TITLE"
483
+ msgstr "Une erreur s’est produite lors de l’établissement de la liste des entrées complémentaires pour TITLE"
484
+
485
+ #: options.php:579
486
+ #: options.php:584
487
+ msgid "try to continue"
488
+ msgstr "Essayez de poursuivre l’opération"
489
+
490
+ #: options.php:592
491
+ msgid "Your related posts cache is PERCENT% complete."
492
+ msgstr "Le cache des entrées complémentaires est à jour à PERCENT%."
493
+
494
+ #: options.php:598
495
+ msgid "starting..."
496
+ msgstr "Démarrage…"
497
+
498
+ #: services.php:59
499
+ msgid "You cannot rebuild the YARPP cache."
500
+ msgstr "Vous n’êtes pas autorisé à reconstruire le cache YARPP."
501
+
502
+ #: services.php:90
503
+ #, php-format
504
+ msgid "You do not have the permission to write the file '%s'."
505
+ msgstr "Vous n‘avez pas la permission en écriture pour le fichier '%s'."
506
+
507
+ #: template-metabox.php:12
508
+ msgid "These are the related entries for this entry. Updating this post may change these related posts."
509
+ msgstr "Voici les entrées complémentaires pour cette entrée. Les futures modifications de cette entrée pourront entraîner une modification de la liste de ses entrées complémentaires."
510
+
511
+ #: template-metabox.php:25
512
+ msgid "Whether all of these related entries are actually displayed and how they are displayed depends on your YARPP display options."
513
+ msgstr "La teneur finale de la liste d’entrées complémentaires ainsi que sa présentation sur votre site dépendent des options d’affichage YARPP que vous aurez choisies."
514
+
515
+ #: template-metabox.php:27
516
+ msgid "No related posts."
517
+ msgstr "Il n’y a pas d’entrées complémentaires."
518
+
519
+ #: options.php:10
520
+ msgid "Please move the YARPP template files into your theme to complete installation. Simply move the sample template files (currently in <code>wp-content/plugins/yet-another-related-posts-plugin/yarpp-templates/</code>) to the <code>TEMPLATEPATH</code> directory."
521
+ msgstr "Pour finaliser l’installation, mettez maintenant les fichiers-modèles YARPP dans votre thème WordPress. Déplacez simplement les fichiers-modèles de base (actuellement situés dans le dossier <code>wp-content/plugins/yet-another-related-posts-plugin/yarpp-templates/</code>) vers le dossier <code>TEMPLATEPATH</code>."
522
+
523
+ #: options.php:15
524
+ msgid "No YARPP template files were found in your theme (<code>TEMPLATEPATH</code>) so the templating feature has been turned off."
525
+ msgstr "Aucun fichier-modèle YARPP ne se trouve dans votre thème WordPress (<code>TEMPLATEPATH</code>) ; la fonction de présentation d’après fichier-modèle n’a donc pas été activée."
526
+
527
+ #: options.php:410
528
+ #: options.php:474
529
+ #: options.php:527
530
+ msgid "NEW!"
531
+ msgstr "NOUVEAU !"
532
+
533
+ #: options.php:410
534
+ #: options.php:474
535
+ msgid "This advanced option gives you full power to customize how your related posts are displayed. Templates (stored in your theme folder) are written in PHP."
536
+ msgstr "Cette option avancée vous permet de personnaliser la présentation de vos listes d’entrées complémentaires. Les fichiers-modèles (à placer dans le dossier de votre thème WordPress) sont écrits en PHP."
537
+
lang/yarpp-it_IT.mo ADDED
Binary file
lang/yarpp-it_IT.po ADDED
@@ -0,0 +1,577 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: YARPP in italiano\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: \n"
7
+ "Last-Translator: Gianni Diurno (aka gidibao) <gidibao@gmail.com>\n"
8
+ "Language-Team: Gianni Diurno | http://gidibao.net/ <gidibao@gmail.com>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-Language: Italian\n"
13
+ "X-Poedit-Country: ITALY\n"
14
+ "X-Poedit-SourceCharset: utf-8\n"
15
+ "X-Poedit-KeywordsList: _e;__\n"
16
+ "X-Poedit-Basepath: .\n"
17
+ ": \n"
18
+ "X-Poedit-SearchPath-0: .\n"
19
+
20
+ #: includes.php:94
21
+ msgid "MySQL error on adding yarpp_title"
22
+ msgstr "Errore MySQL durante l'aggiunta di \"yarpp_title\""
23
+
24
+ #: includes.php:99
25
+ msgid "MySQL error on adding yarpp_content"
26
+ msgstr "Errore MySQL durante l'aggiunta di \"yarpp_content\""
27
+
28
+ #: includes.php:185
29
+ msgid "<h3>An important message from YARPP:</h3><p>Thank you for upgrading to YARPP 2. YARPP 2.0 adds the much requested ability to limit related entry results by certain tags or categories. 2.0 also brings more fine tuned control of the magic algorithm, letting you specify how the algorithm should consider or not consider entry content, titles, tags, and categories. Make sure to adjust the new settings to your liking and perhaps readjust your threshold.</p><p>For more information, check out the <a href=\"http://mitcho.com/code/yarpp/\">YARPP documentation</a>. (This message will not be displayed again.)</p>"
30
+ msgstr "<h3>Un messaggio importante da YARPP:</h3><p>Grazie per avere aggiornato alla YARPP 2. YARPP 2.0 aggiunge la possibilità di limitare i risultati nelle corrispondenze in relazione a determinati tag o categorie inoltre. 2.0 offre una maggiore qualità sul controllo dell'algoritmo facendo sì che sia possibilespecificare come l'algoritmo debba considerare oppure no il contenuto degli articoli, dei tag e delle categorie. Assicurati di aggiornare a tuo piacere le nuove impostazioni e correggi eventualmente la soglia di corrispondenza.</p><p>Per ulteriori informazioni, consulta la <a href=\"http://mitcho.com/code/yarpp/\">documentazione YARPP</a>. (Questo messaggio non verrà più mostrato)</p>"
31
+
32
+ #: yarpp.php:29
33
+ #: includes.php:224
34
+ msgid "Related Posts"
35
+ msgstr "Articoli correlati"
36
+
37
+ #: includes.php:229
38
+ msgid "YARPP"
39
+ msgstr "YARPP"
40
+
41
+ #: options.php:35
42
+ #, php-format
43
+ msgid "YARPP's \"consider titles\" and \"consider bodies\" relatedness criteria require your <code>%s</code> table to use the <a href='http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html'>MyISAM storage engine</a>, but the table seems to be using the <code>%s</code> engine. These two options have been disabled."
44
+ msgstr "I criteri di affinità YARPP \"considera titoli\" e \"considera contenuti\" necessitano che la tua tabella <code>%s</code> possa utilizzare il <a href='http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html'>MyISAM storage engine</a>. Pare che sia in uso il <code>%s</code> engine. Queste due opzioni sono state disattivate."
45
+
46
+ #: options.php:37
47
+ #, php-format
48
+ msgid "To restore these features, please update your <code>%s</code> table by executing the following SQL directive: <code>ALTER TABLE `%s` ENGINE = MyISAM;</code> . No data will be erased by altering the table's engine, although there are performance implications."
49
+ msgstr "Per poter ripristinare queste funzioni dovrai aggiornare la tua tabella <code>%s</code> facendo sì che sia eseguita la seguente direttiva SQL: <code>ALTER TABLE `%s` ENGINE = MyISAM;</code> . Nessun dato verrà perso modificando la tabella del motore sebbene ne verranno interessate le prestazioni."
50
+
51
+ #: options.php:39
52
+ #, php-format
53
+ msgid "If, despite this check, you are sure that <code>%s</code> is using the MyISAM engine, press this magic button:"
54
+ msgstr "Se, nonostante questa nota, fossi certo che <code>%s</code> stia utilizzando il MyISAM engine, premi il pulsante magico:"
55
+
56
+ #: options.php:42
57
+ msgid "Trust me. Let me use MyISAM features."
58
+ msgstr "Abbi fiducia. Lasciami utilizzare le funzioni MyISAM."
59
+
60
+ #: options.php:65
61
+ msgid "The YARPP database had an error but has been fixed."
62
+ msgstr "Il database di YARPP aveva un errore, ma é stato corretto."
63
+
64
+ #: options.php:67
65
+ msgid "The YARPP database has an error which could not be fixed."
66
+ msgstr "Il database di YARPP ha un errore che non può essere corretto."
67
+
68
+ #: options.php:147
69
+ msgid "word"
70
+ msgstr "parola"
71
+
72
+ #: options.php:148
73
+ msgid "tag"
74
+ msgstr "tag"
75
+
76
+ #: options.php:149
77
+ msgid "category"
78
+ msgstr "categoria"
79
+
80
+ #: options.php:153
81
+ #: options.php:170
82
+ #: options.php:182
83
+ msgid "do not consider"
84
+ msgstr "non considerare"
85
+
86
+ #: options.php:154
87
+ #: options.php:171
88
+ #: options.php:184
89
+ msgid "consider"
90
+ msgstr "considera"
91
+
92
+ #: options.php:156
93
+ #: options.php:186
94
+ #, php-format
95
+ msgid "require at least one %s in common"
96
+ msgstr "richiedi almeno 1 %s in comune"
97
+
98
+ #: options.php:158
99
+ #: options.php:188
100
+ #, php-format
101
+ msgid "require more than one %s in common"
102
+ msgstr "richiedi più di 1 %s in comune"
103
+
104
+ #: options.php:172
105
+ msgid "consider with extra weight"
106
+ msgstr "considera con extra weight"
107
+
108
+ #: options.php:200
109
+ msgid "Yet Another Related Posts Plugin version history (RSS 2.0)"
110
+ msgstr "Storico versioni Yet Another Related Posts Plugin (RSS 2.0)"
111
+
112
+ #: options.php:271
113
+ msgid "Donate to mitcho (Michael Yoshitaka Erlewine) for this plugin via PayPal"
114
+ msgstr "Effettua una donazione via PayPal per mitcho (Michael Yoshitaka Erlewine) lo sviluppatore di questo plugin"
115
+
116
+ #: options.php:254
117
+ msgid "Yet Another Related Posts Plugin Options"
118
+ msgstr "Opzioni Yet Another Related Posts"
119
+
120
+ #: options.php:278
121
+ msgid "\"The Pool\""
122
+ msgstr "\"Veduta di insieme\""
123
+
124
+ #: options.php:279
125
+ msgid "\"The Pool\" refers to the pool of posts and pages that are candidates for display as related to the current entry."
126
+ msgstr "Per \"Veduta di insieme\" si intende il totale degli articoli e pagine che sono cadidati per essere mostrati quali correlati all'articolo in merito."
127
+
128
+ #: options.php:284
129
+ msgid "Disallow by category:"
130
+ msgstr "Escludi categorie:"
131
+
132
+ #: options.php:286
133
+ msgid "Disallow by tag:"
134
+ msgstr "Escludi tag:"
135
+
136
+ #: options.php:288
137
+ msgid "Show password protected posts?"
138
+ msgstr "Desideri mostrare gli articoli protetti da una password?"
139
+
140
+ #: options.php:289
141
+ msgid "Show only previous posts?"
142
+ msgstr "Desideri mostrare solamente gli articoli pubblicati in precedenza?"
143
+
144
+ #: options.php:306
145
+ msgid "\"Relatedness\" options"
146
+ msgstr "Opzioni \"Affinità\""
147
+
148
+ #: options.php:308
149
+ #, php-format
150
+ msgid "YARPP is different than the <a href=\"http://wasabi.pbwiki.com/Related%20Entries\">previous plugins it is based on</a> as it limits the related posts list by (1) a maximum number and (2) a <em>match threshold</em>."
151
+ msgstr "YARPP é differente rispetto ai <a href=\"http://wasabi.pbwiki.com/Related%20Entries\">precedenti plugin</a>."
152
+
153
+ #: options.php:313
154
+ msgid "Match threshold:"
155
+ msgstr "Valore di corrispondenza:"
156
+
157
+ #: options.php:314
158
+ msgid "Titles: "
159
+ msgstr "Titoli:"
160
+
161
+ #: options.php:316
162
+ msgid "Bodies: "
163
+ msgstr "Contenuti:"
164
+
165
+ #: options.php:318
166
+ msgid "Tags: "
167
+ msgstr "Tag: "
168
+
169
+ #: options.php:320
170
+ msgid "Categories: "
171
+ msgstr "Categorie:"
172
+
173
+ #: options.php:322
174
+ msgid "Cross-relate posts and pages?"
175
+ msgstr "Relazione incrociata per articoli e pagine?"
176
+
177
+ #: options.php:322
178
+ msgid "When the \"Cross-relate posts and pages\" option is selected, the <code>related_posts()</code>, <code>related_pages()</code>, and <code>related_entries()</code> all will give the same output, returning both related pages and posts."
179
+ msgstr "Una volta selezionata l'opzione \"Relazione incrociata articoli e pagine\", <code>related_posts()</code>, <code>related_pages()</code> e <code>related_entries()</code> forniranno tutti lo stesso output verso le pagine e gli articoli correlati."
180
+
181
+ #: options.php:401
182
+ msgid "Display options <small>for your website</small>"
183
+ msgstr "Opzioni di visualizzazione nel <small>tuo sito</small>"
184
+
185
+ #: magic.php:304
186
+ #: options.php:458
187
+ #: options.php:521
188
+ msgid "Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>."
189
+ msgstr "Articoli correlati elaborati dal plugin <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts</a>."
190
+
191
+ #: options.php:405
192
+ msgid "Automatically display related posts?"
193
+ msgstr "Desideri mostrare in automatico gli articoli correlati?"
194
+
195
+ #: options.php:405
196
+ msgid "This option automatically displays related posts right after the content on single entry pages. If this option is off, you will need to manually insert <code>related_posts()</code> or variants (<code>related_pages()</code> and <code>related_entries()</code>) into your theme files."
197
+ msgstr "Questa opzione farà in modo che gli articoli correlati vengano mostrati automaticamente in coda al contenuto di ogni singola pubblicazione . Qualora questa opzione non fosse stata attivata, dovrai inserire manualmente <code>related_posts()</code> oppure le varianti (<code>related_pages()</code> e <code>related_entries()</code>) nei file del tuo tema."
198
+
199
+ #: options.php:406
200
+ msgid "Website display code example"
201
+ msgstr "Esempio codice"
202
+
203
+ #: options.php:406
204
+ #: options.php:471
205
+ msgid "(Update options to reload.)"
206
+ msgstr "(Ricarica la pagina per visualizzare l'aggiornamento)"
207
+
208
+ #: options.php:409
209
+ #: options.php:473
210
+ msgid "Maximum number of related posts:"
211
+ msgstr "Numero max. di articoli correlati:"
212
+
213
+ #: options.php:422
214
+ msgid "Before / after related entries:"
215
+ msgstr "Davanti / in coda agli articoli correlati:"
216
+
217
+ #: options.php:423
218
+ #: options.php:428
219
+ #: options.php:437
220
+ #: options.php:487
221
+ #: options.php:492
222
+ #: options.php:501
223
+ msgid "For example:"
224
+ msgstr "Esempio:"
225
+
226
+ #: options.php:427
227
+ #: options.php:491
228
+ msgid "Before / after each related entry:"
229
+ msgstr "Davanti / in coda ad ogni articolo correlato:"
230
+
231
+ #: options.php:431
232
+ #: options.php:495
233
+ msgid "Show excerpt?"
234
+ msgstr "Desideri mostrare il riassunto?"
235
+
236
+ #: options.php:432
237
+ #: options.php:496
238
+ msgid "Excerpt length (No. of words):"
239
+ msgstr "Lunghezza riassunto (totale parole):"
240
+
241
+ #: options.php:436
242
+ msgid "Before / after (Excerpt):"
243
+ msgstr "Davanti / in coda (Riassunto):"
244
+
245
+ #: options.php:442
246
+ #: options.php:506
247
+ msgid "Order results:"
248
+ msgstr "Disposizione dei risultati:"
249
+
250
+ #: options.php:444
251
+ #: options.php:508
252
+ msgid "score (high relevance to low)"
253
+ msgstr "punteggio (da massima a minima rilevanza)"
254
+
255
+ #: options.php:445
256
+ #: options.php:509
257
+ msgid "score (low relevance to high)"
258
+ msgstr "punteggio (da minima a massima rilevanza)"
259
+
260
+ #: options.php:446
261
+ #: options.php:510
262
+ msgid "date (new to old)"
263
+ msgstr "data (dal nuovo al vecchio)"
264
+
265
+ #: options.php:447
266
+ #: options.php:511
267
+ msgid "date (old to new)"
268
+ msgstr "data (dal vecchio al nuovo)"
269
+
270
+ #: options.php:448
271
+ #: options.php:512
272
+ msgid "title (alphabetical)"
273
+ msgstr "titolo (A-Z)"
274
+
275
+ #: options.php:449
276
+ #: options.php:513
277
+ msgid "title (reverse alphabetical)"
278
+ msgstr "titolo (Z-A)"
279
+
280
+ #: options.php:454
281
+ #: options.php:518
282
+ msgid "Default display if no results:"
283
+ msgstr "Testo predefinito da mostrare in assenza di risultati:"
284
+
285
+ #: options.php:456
286
+ #: options.php:520
287
+ msgid "Help promote Yet Another Related Posts Plugin?"
288
+ msgstr "Desideri promuovere il plugin Yet Another Related Posts?"
289
+
290
+ #: options.php:458
291
+ #: options.php:521
292
+ #, php-format
293
+ msgid "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."
294
+ msgstr "Questa opzione aggiugerà il codice %s. Attivalo, aggiorna le opzioni e vedi l'anteprima del codice qui a lato. Ti sarei molto grato se tu mostrassi il mio link."
295
+
296
+ #: options.php:464
297
+ msgid "Display options <small>for RSS</small>"
298
+ msgstr "Opzioni di visualizzazione nel tuo <small>feed RSS</small>"
299
+
300
+ #: options.php:469
301
+ msgid "Display related posts in feeds?"
302
+ msgstr "Desideri mostrare gli articoli correlati nei feed?"
303
+
304
+ #: options.php:470
305
+ msgid "Display related posts in the descriptions?"
306
+ msgstr "Desideri mostrare gli articoli correlati nelle descrizioni?"
307
+
308
+ #: options.php:470
309
+ msgid "This option displays the related posts in the RSS description fields, not just the content. If your feeds are set up to only display excerpts, however, only the description field is used, so this option is required for any display at all."
310
+ msgstr "Questa opzione mostrerà gli articoli correlati nei campi della descrizione del feed RSS e non solo nei contenuti. Se i tuoi feed fossero stati impostati per mostrare solamente i riassunti degli articoli, in ogni caso verrà utilizzato il campo per la descrizione quindi, questa opzione é comunque necessaria."
311
+
312
+ #: options.php:471
313
+ msgid "RSS display code example"
314
+ msgstr "Esempio codice"
315
+
316
+ #: options.php:486
317
+ msgid "Before / after related entries display:"
318
+ msgstr "Mostra davanti / in coda agli articoli correlati:"
319
+
320
+ #: options.php:500
321
+ msgid "Before / after (excerpt):"
322
+ msgstr "Davanti / in coda (riassunto):"
323
+
324
+ #: template-builtin.php:35
325
+ #, php-format
326
+ msgid "%f is the YARPP match score between the current entry and this related entry. You are seeing this value because you are logged in to WordPress as an administrator. It is not shown to regular visitors."
327
+ msgstr "%f é il punteggio di affinità YARPP tra questo articolo principale ed i suoi relativi. Stai vedendo questo messaggio perché sei collegato come amministratore di WordPress. Il messaggio lo vedi solo tu."
328
+
329
+ #: includes.php:197
330
+ msgid "Related Posts (YARPP)"
331
+ msgstr "Related Posts (YARPP)"
332
+
333
+ #: options.php:26
334
+ msgid "The MyISAM check has been overridden. You may now use the \"consider titles\" and \"consider bodies\" relatedness criteria."
335
+ msgstr "La verifica MyISAM é stata sovrascritta. Potrai da ora utilizzare \"considera titoli\" e \"considera contenuti\" come criteri di affinità."
336
+
337
+ #: options.php:308
338
+ #: options.php:322
339
+ #: options.php:405
340
+ #: options.php:410
341
+ #: options.php:457
342
+ #: options.php:469
343
+ #: options.php:470
344
+ #: options.php:474
345
+ #: options.php:520
346
+ #: options.php:531
347
+ msgid "more&gt;"
348
+ msgstr "info&gt;"
349
+
350
+ #: options.php:125
351
+ msgid "Options saved!"
352
+ msgstr "Le opzioni sono state salvate!"
353
+
354
+ #: options.php:606
355
+ msgid "Do you really want to reset your configuration?"
356
+ msgstr "Sei certo di volere ripristinare la tua configurazione?"
357
+
358
+ #: options.php:605
359
+ msgid "Update options"
360
+ msgstr "Aggiorna le opzioni"
361
+
362
+ #: options.php:308
363
+ 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."
364
+ msgstr "Quanto più alto sarà il valore di corrispondenza, maggiore sarà la restrizione: otterrai di fatto un minore numero di articoli correlati. Il valore predefinito é impostato a 5. Qualora desiderassi trovare un valore appropriato per determinare le affinità, verifica gli articoli correlati di alcuni post ed il punteggio a loro associato. Potrai quindi determinare quale sia il migliore valore di corrispondenza per il tuo sito."
365
+
366
+ #: options.php:606
367
+ msgid "Reset options"
368
+ msgstr "Ripristina le opzioni"
369
+
370
+ #: magic.php:56
371
+ msgid "Example post "
372
+ msgstr "Articolo di esempio:"
373
+
374
+ #: template-metabox.php:12
375
+ msgid "These are the related entries for this entry. Updating this post may change these related posts."
376
+ msgstr "Questi sono gli articoli correlati per questo post. L'aggiornamento di questo post potrebbe cambiare gli articoli ad esso correlati."
377
+
378
+ #: template-metabox.php:25
379
+ msgid "Whether all of these related entries are actually displayed and how they are displayed depends on your YARPP display options."
380
+ msgstr "La visualizzazione degli articoli correlati dipende principalmente dalle opzioni YARPP."
381
+
382
+ #: template-metabox.php:27
383
+ msgid "No related posts."
384
+ msgstr "Nessun articolo correlato."
385
+
386
+ #: options.php:81
387
+ #: options.php:84
388
+ #: options.php:126
389
+ #: options.php:530
390
+ msgid "Related posts cache status"
391
+ msgstr "Stato della cache articoli correlati"
392
+
393
+ #: options.php:81
394
+ msgid "Your related posts cache is incomplete. Please build your cache from the <A>related posts status pane</a>."
395
+ msgstr "La cache per gli articoli correlati é incompleta. Genera la cache via il pannello di <A>related posts</a>."
396
+
397
+ #: options.php:84
398
+ msgid "Your related posts cache is empty. Please build your cache from the <A>related posts status pane</a>."
399
+ msgstr "La cache per gli articoli correlati é vuota. Genera la cache via il pannello di <A>related posts</a>."
400
+
401
+ #: options.php:127
402
+ msgid "If you updated the \"pool\" options or \"relatedness\" options displayed, please rebuild your cache now from the <A>related posts status pane</a>."
403
+ msgstr "Qualora avessi aggiornato le opzioni \"pool\" o \"relatedness\" genera subito la cache via il pannello di <A>related posts</a>."
404
+
405
+ #: options.php:273
406
+ msgid "by <a href=\"http://mitcho.com/code/\">mitcho (Michael 芳貴 Erlewine)</a>"
407
+ msgstr "di <a href=\"http://mitcho.com/code/\">mitcho (Michael 芳貴 Erlewine)</a>"
408
+
409
+ #: options.php:273
410
+ msgid "Follow <a href=\"http://twitter.com/yarpp/\">Yet Another Related Posts Plugin on Twitter</a>"
411
+ msgstr "Segui via Twitter il plugin <a href=\"http://twitter.com/yarpp/\">Yet Another Related Posts</a>"
412
+
413
+ #: options.php:294
414
+ msgid "day(s)"
415
+ msgstr "giorno(i)"
416
+
417
+ #: options.php:295
418
+ msgid "week(s)"
419
+ msgstr "settimana(e)"
420
+
421
+ #: options.php:296
422
+ msgid "month(s)"
423
+ msgstr "mese(i)"
424
+
425
+ #: options.php:298
426
+ msgid "Show only posts from the past NUMBER UNITS"
427
+ msgstr "Mostra solamente gli articoli dalle precedenti NUMBER UNITS"
428
+
429
+ #: options.php:387
430
+ msgid "There is a new beta (VERSION) of Yet Another Related Posts Plugin. You can <A>download it here</a> at your own risk."
431
+ msgstr "E' disponibile una nuova (VERSIONE) beta di Yet Another Related Posts Plugin. Puoi <A>scaricarla qui</a> a tuo rischio e pericolo."
432
+
433
+ #: options.php:389
434
+ msgid "There is a new version (VERSION) of Yet Another Related Posts Plugin available! You can <A>download it here</a>."
435
+ msgstr "E' disponibile una nuova versione (VERSIONE) di Yet Another Related Posts Plugin! Puoi <A>scaricarla qui</a>."
436
+
437
+ #: options.php:410
438
+ #: options.php:474
439
+ msgid "Display using a custom template file"
440
+ msgstr "Mostra utilizzando un file template personalizzato"
441
+
442
+ #: options.php:412
443
+ #: options.php:476
444
+ msgid "Template file:"
445
+ msgstr "File template:"
446
+
447
+ #: options.php:469
448
+ msgid "This option displays related posts at the end of each item in your RSS and Atom feeds. No template changes are needed."
449
+ msgstr "Questa opzione mostra gli articoli correlati in coda ad ogni articolo nei tuoi feed RSS e Atom. Non é necessaria alcuna modifica al template."
450
+
451
+ #: options.php:527
452
+ msgid "Advanced"
453
+ msgstr "Avanzato"
454
+
455
+ #: options.php:530
456
+ msgid "Show cache status"
457
+ msgstr "Mostra lo stato della cache"
458
+
459
+ #: options.php:531
460
+ msgid "When the cache is incomplete, compute related posts on the fly?"
461
+ msgstr "Qualora la cache fosse incompleta, calcolare ugualmente gli articoli correlati?"
462
+
463
+ #: options.php:532
464
+ msgid "If a displayed post's related posts are not cached and this option is on, YARPP will compute them on the fly. Do not turn this option on if you have a high-traffic site.<br />If this option is off and a post's related posts have not been cached, it will display as if it has no related posts."
465
+ msgstr "Nel caso in cui gli articoli correlati per un post non fossero nella cache e questa opzione fosse stata attivata, YARPP li calcolerà nell'immediato. Non attivare questa opzione qualora il tuo sito ricevesse molto traffico.<br />Se l'opzione non fosse attiva e gli articoli correlati non fossero presenti nella cache, il plugin si comporterà come se non ci fosse alcun articolo correlato."
466
+
467
+ #: options.php:562
468
+ msgid "'MIN minute(s) and SEC second(s) remaining'"
469
+ msgstr "'MIN minuto(i) e SEC secondo(i) restanti'"
470
+
471
+ #: options.php:564
472
+ msgid "'SEC second(s) remaining'"
473
+ msgstr "'SEC secondo(i) restanti'"
474
+
475
+ #: options.php:568
476
+ msgid "Your related posts cache is now complete."
477
+ msgstr "La cache per gli articoli correlati é completa"
478
+
479
+ #: options.php:568
480
+ msgid "The SQL queries took SEC seconds."
481
+ msgstr "Le richieste SQL hanno richiesto SEC secondi."
482
+
483
+ #: options.php:578
484
+ #: options.php:582
485
+ msgid "There was an error while constructing the related posts for TITLE"
486
+ msgstr "Si é verificato un errore durante la preparazione degli articoli correlati per TITOLO"
487
+
488
+ #: options.php:579
489
+ #: options.php:584
490
+ msgid "try to continue"
491
+ msgstr "prova a continuare"
492
+
493
+ #: options.php:592
494
+ msgid "Your related posts cache is PERCENT% complete."
495
+ msgstr "La cache per gli articoli correlati é completa al PERCENT%."
496
+
497
+ #: options.php:598
498
+ msgid "starting..."
499
+ msgstr "in avvio..."
500
+
501
+ #: includes.php:110
502
+ msgid "MySQL error on creating yarpp_keyword_cache table"
503
+ msgstr "Errore MySQL durante la creazione della tabella yarpp_keyword_cache"
504
+
505
+ #: includes.php:121
506
+ msgid "MySQL error on creating yarpp_related_cache table"
507
+ msgstr "Errore MySQL durante la creazione della tabella yarpp_related_cache"
508
+
509
+ #: services.php:59
510
+ msgid "You cannot rebuild the YARPP cache."
511
+ msgstr "Non puoi rigenerare la cache di YARPP."
512
+
513
+ #: services.php:90
514
+ #, php-format
515
+ msgid "You do not have the permission to write the file '%s'."
516
+ msgstr "Non hai i permessi per la scrittura del file '%s'."
517
+
518
+ #: options.php:10
519
+ msgid "Please move the YARPP template files into your theme to complete installation. Simply move the sample template files (currently in <code>wp-content/plugins/yet-another-related-posts-plugin/yarpp-templates/</code>) to the <code>TEMPLATEPATH</code> directory."
520
+ msgstr "Sposta i file del template di YARPP allocandoli nella cartella del tuo tema in modo da completare l'installazione. Sposta i file del template dimostrativo (al momento sotto <code>wp-content/plugins/yet-another-related-posts-plugin/yarpp-templates/</code>) nella cartella <code>TEMPLATEPATH</code>."
521
+
522
+ #: options.php:15
523
+ msgid "No YARPP template files were found in your theme (<code>TEMPLATEPATH</code>) so the templating feature has been turned off."
524
+ msgstr "Poiché nessun file template YARPP é stato trovato nel tuo tema (<code>TEMPLATEPATH</code>) la funzione template é stata disattivata."
525
+
526
+ #: options.php:410
527
+ #: options.php:474
528
+ #: options.php:527
529
+ msgid "NEW!"
530
+ msgstr "NUOVO!"
531
+
532
+ #: options.php:410
533
+ #: options.php:474
534
+ msgid "This advanced option gives you full power to customize how your related posts are displayed. Templates (stored in your theme folder) are written in PHP."
535
+ msgstr "Le opzioni avanzate ti permettono una completa personalizzazione per la visualizzazione degli articoli correlati. I template (allocati nella cartella del tuo tema) sono stati scritti in PHP."
536
+
537
+ #~ msgid ""
538
+ #~ "by <a href=\"http://mitcho.com/code/\">mitcho (Michael 芳貴 Erlewine)</a> "
539
+ #~ "and based on the fabulous work of <a href=\"http://peter.mapledesign.co."
540
+ #~ "uk/weblog/archives/wordpress-related-posts-plugin\">Peter Bower</a>, <a "
541
+ #~ "href=\"http://wasabi.pbwiki.com/Related%20Entries\">Alexander Malov &amp; "
542
+ #~ "Mike Lu</a>."
543
+ #~ msgstr ""
544
+ #~ "Il Team: <a href=\"http://mitcho.com/code/\">mitcho (Michael 芳貴 "
545
+ #~ "Erlewine)</a> ha sviluppato questo plugin grazie al favoloso lavoro di <a "
546
+ #~ "href=\"http://peter.mapledesign.co.uk/weblog/archives/wordpress-related-"
547
+ #~ "posts-plugin\">Peter Bower</a> e <a href=\"http://wasabi.pbwiki.com/"
548
+ #~ "Related%20Entries\">Alexander Malov &amp; Mike Lu</a>. Traduzione "
549
+ #~ "italiana a cura di <a href=\"http://gidibao.net/\">Gianni Diurno</a>."
550
+ #~ msgid "PERMALINK"
551
+ #~ msgstr "PERMALINK"
552
+ #~ msgid "RELATED TITLE"
553
+ #~ msgstr "TITOLO CORRELATO"
554
+ #~ msgid ""
555
+ #~ "The higher the match threshold, the more restrictive, and you get less "
556
+ #~ "related posts overall. The default match threshold is 5. If you want to "
557
+ #~ "find an appropriate match threshhold, I recommend you turn on the \"show "
558
+ #~ "admins the match scores\" setting below. That way, you can see what kinds "
559
+ #~ "of related posts are being picked up and with what kind of match scores, "
560
+ #~ "and determine an appropriate threshold for your site."
561
+ #~ msgstr ""
562
+ #~ "Je höher Sie den Wert \"Relevanz\" setzen, desto restriktiver arbeitet "
563
+ #~ "YARPP. Der Standardwert liegt bei 5. Wenn gar keine oder zuwenige Artikel "
564
+ #~ "angezeigt werden, setzen Sie ihn auf 3.5 oder gar 1 herunter. Für die "
565
+ #~ "Feinabstimmung aktivieren Sie die Option \"Administratoren den Wert der "
566
+ #~ "Relevanz anzeigen\" und stimmen den Wert auf Ihre Anforderungen ab."
567
+ #~ msgid "Show admins (user level > 8) the match scores?"
568
+ #~ msgstr "Administratoren (User Level > 8) den Wert der Relevanz anzeigen?"
569
+ #~ msgid ""
570
+ #~ "With this option on, each related entry's total 'match score' (all above "
571
+ #~ "the threshold, set above) are displayed after each entry title, <em>if "
572
+ #~ "you are an administrator and logged in.</em> Even if you see these "
573
+ #~ "values, your visitors will not."
574
+ #~ msgstr ""
575
+ #~ "Wenn aktiviert, sehen nur eingeloggte Administratoren (nicht die "
576
+ #~ "Besucher!) neben jeder Beitragsüberschrift den Übereinstimmungswert."
577
+
lang/yarpp-ja.mo CHANGED
Binary file
lang/{yarpp-ja.po → yarpp-ja_JP.po} RENAMED
@@ -14,367 +14,523 @@ msgstr ""
14
  "X-Poedit-Basepath: \n"
15
  "X-Poedit-SearchPath-0: ."
16
 
17
- #: includes.php:74
18
  msgid "MySQL error on adding yarpp_title"
19
  msgstr "yarpp_title インデックス作成時にエラー発生。"
20
 
21
- #: includes.php:79
22
  msgid "MySQL error on adding yarpp_content"
23
  msgstr "yarpp_content インデックス作成時にエラー発生。"
24
 
25
- #: includes.php:133
26
  msgid "<h3>An important message from YARPP:</h3><p>Thank you for upgrading to YARPP 2. YARPP 2.0 adds the much requested ability to limit related entry results by certain tags or categories. 2.0 also brings more fine tuned control of the magic algorithm, letting you specify how the algorithm should consider or not consider entry content, titles, tags, and categories. Make sure to adjust the new settings to your liking and perhaps readjust your threshold.</p><p>For more information, check out the <a href=\"http://mitcho.com/code/yarpp/\">YARPP documentation</a>. (This message will not be displayed again.)</p>"
27
  msgstr ""
28
 
29
- #: includes.php:173
 
 
30
  msgid "Related Posts"
31
  msgstr "関連記事"
32
 
33
- #: includes.php:178
34
  msgid "YARPP"
35
  msgstr ""
36
 
37
- #: options.php:17
38
  #, php-format
39
  msgid "YARPP's \"consider titles\" and \"consider bodies\" relatedness criteria require your <code>%s</code> table to use the <a href='http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html'>MyISAM storage engine</a>, but the table seems to be using the <code>%s</code> engine. These two options have been disabled."
40
  msgstr "YARPPの関連スコア計算の「タイトルを検討する」、「内容を検討する」オプションはデータベースの<code>%s</code>テーブルが <a href='http://dev.mysql.com/doc/refman/4.1/ja/myisam.html'>MyISAM</a> でなければ使用できません。 <code>%s</code>テーブルは現在<code>%s</code>ストーレージエンジンを使用しているので、このふたつのオプションは使えません。"
41
 
42
- #: options.php:19
43
  #, php-format
44
  msgid "To restore these features, please update your <code>%s</code> table by executing the following SQL directive: <code>ALTER TABLE `%s` ENGINE = MyISAM;</code> . No data will be erased by altering the table's engine, although there are performance implications."
45
  msgstr "このオプションを使用したければ、<code>%s</code>テーブルに対してこのようなクエリを実行してください:<code>ALTER TABLE `%s` ENGINE = MyISAM;</code>。このクエリはデータは一切消しません。"
46
 
47
- #: options.php:21
48
  #, php-format
49
  msgid "If, despite this check, you are sure that <code>%s</code> is using the MyISAM engine, press this magic button:"
50
  msgstr "<code>%s</code>テーブルが絶対MyISAMを使用していると思う方はこちらの魔法のボタンをどうぞ:"
51
 
52
- #: options.php:24
53
  msgid "Trust me. Let me use MyISAM features."
54
  msgstr "MyISAM を使ってます。嘘じゃないから。"
55
 
56
- #: options.php:47
57
  msgid "The YARPP database had an error but has been fixed."
58
  msgstr "YARPPのデータベースは修正されました。"
59
 
60
- #: options.php:49
61
  msgid "The YARPP database has an error which could not be fixed."
62
  msgstr "YARPPのデータベースに修正できないエラーが発生しました。"
63
 
64
- #: options.php:115
65
  msgid "word"
66
  msgstr ""
67
 
68
- #: options.php:116
69
  msgid "tag"
70
  msgstr "タグ"
71
 
72
- #: options.php:117
73
  msgid "category"
74
  msgstr "カテゴリー"
75
 
76
- #: options.php:121
77
- #: options.php:138
78
- #: options.php:150
79
  msgid "do not consider"
80
  msgstr "検討しない"
81
 
82
- #: options.php:122
83
- #: options.php:139
84
- #: options.php:152
85
  msgid "consider"
86
  msgstr "検討する"
87
 
88
- #: options.php:124
89
- #: options.php:154
90
  #, php-format
91
  msgid "require at least one %s in common"
92
  msgstr "共有の%sをひとつ以上必要とする"
93
 
94
- #: options.php:126
95
- #: options.php:156
96
  #, php-format
97
  msgid "require more than one %s in common"
98
  msgstr "共有の%sをふたつ以上必要とする"
99
 
100
- #: options.php:140
101
  msgid "consider with extra weight"
102
  msgstr "検討する(重要視)"
103
 
104
- #: options.php:168
105
  msgid "Yet Another Related Posts Plugin version history (RSS 2.0)"
106
  msgstr "関連記事プラグイン (YARPP) 更新履歴 (RSS 2.0)"
107
 
108
- #: options.php:183
109
- #: options.php:183
110
  msgid "Donate to mitcho (Michael Yoshitaka Erlewine) for this plugin via PayPal"
111
  msgstr "YARPPの作成者(ミッチョ)にPayPalで寄付をする"
112
 
113
- #: options.php:186
114
  msgid "Yet Another Related Posts Plugin Options"
115
  msgstr "関連記事 (YARPP) 設定"
116
 
117
- #: options.php:202
118
- #, php-format
119
- msgid "by <a href=\"http://mitcho.com/code/\">mitcho (Michael 芳貴 Erlewine)</a> and based on the fabulous work of <a href=\"http://peter.mapledesign.co.uk/weblog/archives/wordpress-related-posts-plugin\">Peter Bower</a>, <a href=\"http://wasabi.pbwiki.com/Related%20Entries\">Alexander Malov &amp; Mike Lu</a>."
120
- msgstr "作成者: <a href=\"http://mitcho.com/\">ミッチョ (アーリーワイン・マイケル芳貴)</a>"
121
-
122
- #: options.php:206
123
  msgid "\"The Pool\""
124
  msgstr "フィルター設定"
125
 
126
- #: options.php:207
127
  msgid "\"The Pool\" refers to the pool of posts and pages that are candidates for display as related to the current entry."
128
  msgstr "関連記事として表示したい記事を制限します。"
129
 
130
- #: options.php:212
131
  msgid "Disallow by category:"
132
  msgstr "このカテゴリーの記事を表示しない"
133
 
134
- #: options.php:221
135
  msgid "Disallow by tag:"
136
  msgstr "このタグの記事を表示しない"
137
 
138
- #: options.php:230
139
  msgid "Show password protected posts?"
140
  msgstr "パスワードで保護されている記事も表示"
141
 
142
- #: options.php:231
143
  msgid "Show only previous posts?"
144
  msgstr "過去の記事だけを表示"
145
 
146
- #: options.php:236
147
  msgid "\"Relatedness\" options"
148
  msgstr "関連スコア設定"
149
 
150
- #: options.php:237
151
  #, php-format
152
  msgid "YARPP is different than the <a href=\"http://wasabi.pbwiki.com/Related%20Entries\">previous plugins it is based on</a> as it limits the related posts list by (1) a maximum number and (2) a <em>match threshold</em>."
153
  msgstr "この関連記事プラグイン(YARPP)は各対象記事の関連スコアを計算し、ある関連スコア以上の記事だけを表示します。"
154
 
155
- #: options.php:242
156
  msgid "Match threshold:"
157
  msgstr "表示する最低関連スコア"
158
 
159
- #: options.php:243
160
  msgid "Titles: "
161
  msgstr "タイトル:"
162
 
163
- #: options.php:245
164
  msgid "Bodies: "
165
  msgstr "内容:"
166
 
167
- #: options.php:247
168
  msgid "Tags: "
169
  msgstr "タグ:"
170
 
171
- #: options.php:249
172
  msgid "Categories: "
173
  msgstr "カテゴリー:"
174
 
175
- #: options.php:251
176
  msgid "Cross-relate posts and pages?"
177
  msgstr "記事とページを関連づける"
178
 
179
- #: options.php:251
180
  msgid "When the \"Cross-relate posts and pages\" option is selected, the <code>related_posts()</code>, <code>related_pages()</code>, and <code>related_entries()</code> all will give the same output, returning both related pages and posts."
181
  msgstr "「記事とページを関連づける」が有効の場合は <code>related_posts()</code>、 <code>related_pages()</code> と <code>related_entries()</code> は全て記事とページを両方「関連記事/ページ」として表示します。"
182
 
183
- #: options.php:293
184
  msgid "Display options <small>for your website</small>"
185
  msgstr "表示設定 <small>ウェブサイト用</small>"
186
 
187
- #: options.php:302
188
- #: options.php:363
189
- #: options.php:363
190
- msgid "RELATED TITLE"
191
- msgstr "関連記事タイトル"
192
-
193
- #: options.php:307
194
- #: options.php:349
195
- #: options.php:368
196
- #: options.php:412
197
- #: magic.php:219
198
  msgid "Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>."
199
  msgstr "関連記事は<a href='http://mitcho.com/code/yarpp/'>YARPP関連記事プラグイン</a>によって表示されています。"
200
 
201
- #: options.php:309
202
  msgid "Automatically display related posts?"
203
  msgstr "自動的に関連記事を表示する"
204
 
205
- #: options.php:309
206
  msgid "This option automatically displays related posts right after the content on single entry pages. If this option is off, you will need to manually insert <code>related_posts()</code> or variants (<code>related_pages()</code> and <code>related_entries()</code>) into your theme files."
207
  msgstr "単体記事表示時に自動的に関連記事を表示します。この自動表示を無効にすると、テーマファイルに<code>related_posts()</code>を入れる必要があります。"
208
 
209
- #: options.php:310
210
  msgid "Website display code example"
211
  msgstr "ウェブサイト表示のソース例"
212
 
213
- #: options.php:310
214
- #: options.php:372
215
  msgid "(Update options to reload.)"
216
  msgstr "(設定保存時に更新されます)"
217
 
218
- #: options.php:312
219
- #: options.php:374
220
  msgid "Maximum number of related posts:"
221
  msgstr "一度に表示する関連記事数"
222
 
223
- #: options.php:314
224
  msgid "Before / after related entries:"
225
  msgstr "関連記事表示を囲むタグ:"
226
 
227
- #: options.php:315
228
- #: options.php:320
229
- #: options.php:329
230
- #: options.php:378
231
- #: options.php:383
232
- #: options.php:392
233
  msgid "For example:"
234
  msgstr "例:"
235
 
236
- #: options.php:319
237
- #: options.php:382
238
  msgid "Before / after each related entry:"
239
  msgstr "各関連記事を囲むタグ:"
240
 
241
- #: options.php:323
242
- #: options.php:386
243
  msgid "Show excerpt?"
244
  msgstr "抜粋を表示?"
245
 
246
- #: options.php:324
247
- #: options.php:387
248
  msgid "Excerpt length (No. of words):"
249
  msgstr "抜粋の長さ(単語数):"
250
 
251
- #: options.php:328
252
  msgid "Before / after (Excerpt):"
253
  msgstr "抜粋を囲むタグ:"
254
 
255
- #: options.php:334
256
- #: options.php:397
257
  msgid "Order results:"
258
  msgstr "表示順番:"
259
 
260
- #: options.php:336
261
- #: options.php:399
262
  msgid "score (high relevance to low)"
263
  msgstr "関連スコアの高い順"
264
 
265
- #: options.php:337
266
- #: options.php:400
267
  msgid "score (low relevance to high)"
268
  msgstr "関連スコアの低い順"
269
 
270
- #: options.php:338
271
- #: options.php:401
272
  msgid "date (new to old)"
273
  msgstr "新しい日付順(降順)"
274
 
275
- #: options.php:339
276
- #: options.php:402
277
  msgid "date (old to new)"
278
  msgstr "古い日付順(昇順)"
279
 
280
- #: options.php:340
281
- #: options.php:403
282
  msgid "title (alphabetical)"
283
  msgstr "タイトル順(昇順)"
284
 
285
- #: options.php:341
286
- #: options.php:404
287
  msgid "title (reverse alphabetical)"
288
  msgstr "タイトル順(降順)"
289
 
290
- #: options.php:346
291
- #: options.php:409
292
  msgid "Default display if no results:"
293
  msgstr "関連記事がない時のメッセージ"
294
 
295
- #: options.php:347
296
- #: options.php:411
297
  msgid "Help promote Yet Another Related Posts Plugin?"
298
  msgstr "この関連記事プラグイン(YARPP)を宣伝しますか?"
299
 
300
- #: options.php:349
301
- #: options.php:412
302
  #, php-format
303
  msgid "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."
304
  msgstr "関連記事表示の下に「%s」というコードを挿入します。"
305
 
306
- #: options.php:354
307
  msgid "Display options <small>for RSS</small>"
308
  msgstr "表示設定 <small>RSS/Atom フィード用</small>"
309
 
310
- #: options.php:370
311
  msgid "Display related posts in feeds?"
312
  msgstr "自動的にフィードで関連記事を表示する"
313
 
314
- #: options.php:371
315
  msgid "Display related posts in the descriptions?"
316
  msgstr "フィード内の抜粋にも自動的に関連記事を表示する"
317
 
318
- #: options.php:371
319
  msgid "This option displays the related posts in the RSS description fields, not just the content. If your feeds are set up to only display excerpts, however, only the description field is used, so this option is required for any display at all."
320
  msgstr "フィード内の全文表示に関連記事を表示するだけでなく、フィード内の抜粋でも関連記事が表示されます。WordPressの設定によりフィードに抜粋のみを表示している場合は、このオプションが無効の場合関連記事がフィード内で表示されません。"
321
 
322
- #: options.php:372
323
  msgid "RSS display code example"
324
  msgstr "RSS表示のソース例"
325
 
326
- #: options.php:377
327
  msgid "Before / after related entries display:"
328
  msgstr "関連記事表示を囲むタグ:"
329
 
330
- #: options.php:391
331
  msgid "Before / after (excerpt):"
332
  msgstr "抜粋を囲むタグ:"
333
 
334
- #: magic.php:210
335
  #, php-format
336
  msgid "%f is the YARPP match score between the current entry and this related entry. You are seeing this value because you are logged in to WordPress as an administrator. It is not shown to regular visitors."
337
  msgstr "%fは現在表示の記事とこの関連記事の関連スコアです。この関連スコアはログイン済みのサイト管理者のみに表示されます。"
338
 
339
- #: includes.php:154
340
- #: includes.php:154
341
  msgid "Related Posts (YARPP)"
342
  msgstr "関連記事 (YARPP)"
343
 
344
- #: options.php:8
345
  msgid "The MyISAM check has been overridden. You may now use the \"consider titles\" and \"consider bodies\" relatedness criteria."
346
  msgstr "MyISAM専用機能を強制的に有効にしました。「タイトルを検討」と「内容を検討」機能が使えるようになりました。"
347
 
348
- #: options.php:302
349
- msgid "PERMALINK"
350
- msgstr "パーマリンク"
351
-
352
- #: options.php:237
353
- #: options.php:251
354
- #: options.php:309
355
- #: options.php:348
356
- #: options.php:371
357
- #: options.php:411
358
  msgid "more&gt;"
359
  msgstr "(説明)"
360
 
361
- #: options.php:95
362
  msgid "Options saved!"
363
  msgstr "設定の変更は保存されました。"
364
 
365
- #: options.php:420
366
  msgid "Do you really want to reset your configuration?"
367
  msgstr "本当に初期設定に戻りますか?"
368
 
369
- #: options.php:419
370
  msgid "Update options"
371
  msgstr "変更を保存"
372
 
373
- #: options.php:237
374
  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."
375
  msgstr "より関連性の高い記事だけを表示したい場合は、最低関連スコアを上げてください。初期設定は5です。"
376
 
377
- #: options.php:420
378
  msgid "Reset options"
379
  msgstr "初期設定に戻る"
380
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  "X-Poedit-Basepath: \n"
15
  "X-Poedit-SearchPath-0: ."
16
 
17
+ #: includes.php:94
18
  msgid "MySQL error on adding yarpp_title"
19
  msgstr "yarpp_title インデックス作成時にエラー発生。"
20
 
21
+ #: includes.php:99
22
  msgid "MySQL error on adding yarpp_content"
23
  msgstr "yarpp_content インデックス作成時にエラー発生。"
24
 
25
+ #: includes.php:185
26
  msgid "<h3>An important message from YARPP:</h3><p>Thank you for upgrading to YARPP 2. YARPP 2.0 adds the much requested ability to limit related entry results by certain tags or categories. 2.0 also brings more fine tuned control of the magic algorithm, letting you specify how the algorithm should consider or not consider entry content, titles, tags, and categories. Make sure to adjust the new settings to your liking and perhaps readjust your threshold.</p><p>For more information, check out the <a href=\"http://mitcho.com/code/yarpp/\">YARPP documentation</a>. (This message will not be displayed again.)</p>"
27
  msgstr ""
28
 
29
+ #: yarpp.php:29
30
+ #: yarpp.php:29
31
+ #: includes.php:224
32
  msgid "Related Posts"
33
  msgstr "関連記事"
34
 
35
+ #: includes.php:229
36
  msgid "YARPP"
37
  msgstr ""
38
 
39
+ #: options.php:35
40
  #, php-format
41
  msgid "YARPP's \"consider titles\" and \"consider bodies\" relatedness criteria require your <code>%s</code> table to use the <a href='http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html'>MyISAM storage engine</a>, but the table seems to be using the <code>%s</code> engine. These two options have been disabled."
42
  msgstr "YARPPの関連スコア計算の「タイトルを検討する」、「内容を検討する」オプションはデータベースの<code>%s</code>テーブルが <a href='http://dev.mysql.com/doc/refman/4.1/ja/myisam.html'>MyISAM</a> でなければ使用できません。 <code>%s</code>テーブルは現在<code>%s</code>ストーレージエンジンを使用しているので、このふたつのオプションは使えません。"
43
 
44
+ #: options.php:37
45
  #, php-format
46
  msgid "To restore these features, please update your <code>%s</code> table by executing the following SQL directive: <code>ALTER TABLE `%s` ENGINE = MyISAM;</code> . No data will be erased by altering the table's engine, although there are performance implications."
47
  msgstr "このオプションを使用したければ、<code>%s</code>テーブルに対してこのようなクエリを実行してください:<code>ALTER TABLE `%s` ENGINE = MyISAM;</code>。このクエリはデータは一切消しません。"
48
 
49
+ #: options.php:39
50
  #, php-format
51
  msgid "If, despite this check, you are sure that <code>%s</code> is using the MyISAM engine, press this magic button:"
52
  msgstr "<code>%s</code>テーブルが絶対MyISAMを使用していると思う方はこちらの魔法のボタンをどうぞ:"
53
 
54
+ #: options.php:42
55
  msgid "Trust me. Let me use MyISAM features."
56
  msgstr "MyISAM を使ってます。嘘じゃないから。"
57
 
58
+ #: options.php:65
59
  msgid "The YARPP database had an error but has been fixed."
60
  msgstr "YARPPのデータベースは修正されました。"
61
 
62
+ #: options.php:67
63
  msgid "The YARPP database has an error which could not be fixed."
64
  msgstr "YARPPのデータベースに修正できないエラーが発生しました。"
65
 
66
+ #: options.php:147
67
  msgid "word"
68
  msgstr ""
69
 
70
+ #: options.php:148
71
  msgid "tag"
72
  msgstr "タグ"
73
 
74
+ #: options.php:149
75
  msgid "category"
76
  msgstr "カテゴリー"
77
 
78
+ #: options.php:153
79
+ #: options.php:170
80
+ #: options.php:182
81
  msgid "do not consider"
82
  msgstr "検討しない"
83
 
84
+ #: options.php:154
85
+ #: options.php:171
86
+ #: options.php:184
87
  msgid "consider"
88
  msgstr "検討する"
89
 
90
+ #: options.php:156
91
+ #: options.php:186
92
  #, php-format
93
  msgid "require at least one %s in common"
94
  msgstr "共有の%sをひとつ以上必要とする"
95
 
96
+ #: options.php:158
97
+ #: options.php:188
98
  #, php-format
99
  msgid "require more than one %s in common"
100
  msgstr "共有の%sをふたつ以上必要とする"
101
 
102
+ #: options.php:172
103
  msgid "consider with extra weight"
104
  msgstr "検討する(重要視)"
105
 
106
+ #: options.php:200
107
  msgid "Yet Another Related Posts Plugin version history (RSS 2.0)"
108
  msgstr "関連記事プラグイン (YARPP) 更新履歴 (RSS 2.0)"
109
 
110
+ #: options.php:271
111
+ #: options.php:271
112
  msgid "Donate to mitcho (Michael Yoshitaka Erlewine) for this plugin via PayPal"
113
  msgstr "YARPPの作成者(ミッチョ)にPayPalで寄付をする"
114
 
115
+ #: options.php:254
116
  msgid "Yet Another Related Posts Plugin Options"
117
  msgstr "関連記事 (YARPP) 設定"
118
 
119
+ #: options.php:278
 
 
 
 
 
120
  msgid "\"The Pool\""
121
  msgstr "フィルター設定"
122
 
123
+ #: options.php:279
124
  msgid "\"The Pool\" refers to the pool of posts and pages that are candidates for display as related to the current entry."
125
  msgstr "関連記事として表示したい記事を制限します。"
126
 
127
+ #: options.php:284
128
  msgid "Disallow by category:"
129
  msgstr "このカテゴリーの記事を表示しない"
130
 
131
+ #: options.php:286
132
  msgid "Disallow by tag:"
133
  msgstr "このタグの記事を表示しない"
134
 
135
+ #: options.php:288
136
  msgid "Show password protected posts?"
137
  msgstr "パスワードで保護されている記事も表示"
138
 
139
+ #: options.php:289
140
  msgid "Show only previous posts?"
141
  msgstr "過去の記事だけを表示"
142
 
143
+ #: options.php:306
144
  msgid "\"Relatedness\" options"
145
  msgstr "関連スコア設定"
146
 
147
+ #: options.php:308
148
  #, php-format
149
  msgid "YARPP is different than the <a href=\"http://wasabi.pbwiki.com/Related%20Entries\">previous plugins it is based on</a> as it limits the related posts list by (1) a maximum number and (2) a <em>match threshold</em>."
150
  msgstr "この関連記事プラグイン(YARPP)は各対象記事の関連スコアを計算し、ある関連スコア以上の記事だけを表示します。"
151
 
152
+ #: options.php:313
153
  msgid "Match threshold:"
154
  msgstr "表示する最低関連スコア"
155
 
156
+ #: options.php:314
157
  msgid "Titles: "
158
  msgstr "タイトル:"
159
 
160
+ #: options.php:316
161
  msgid "Bodies: "
162
  msgstr "内容:"
163
 
164
+ #: options.php:318
165
  msgid "Tags: "
166
  msgstr "タグ:"
167
 
168
+ #: options.php:320
169
  msgid "Categories: "
170
  msgstr "カテゴリー:"
171
 
172
+ #: options.php:322
173
  msgid "Cross-relate posts and pages?"
174
  msgstr "記事とページを関連づける"
175
 
176
+ #: options.php:322
177
  msgid "When the \"Cross-relate posts and pages\" option is selected, the <code>related_posts()</code>, <code>related_pages()</code>, and <code>related_entries()</code> all will give the same output, returning both related pages and posts."
178
  msgstr "「記事とページを関連づける」が有効の場合は <code>related_posts()</code>、 <code>related_pages()</code> と <code>related_entries()</code> は全て記事とページを両方「関連記事/ページ」として表示します。"
179
 
180
+ #: options.php:401
181
  msgid "Display options <small>for your website</small>"
182
  msgstr "表示設定 <small>ウェブサイト用</small>"
183
 
184
+ #: magic.php:304
185
+ #: options.php:458
186
+ #: options.php:521
 
 
 
 
 
 
 
 
187
  msgid "Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>."
188
  msgstr "関連記事は<a href='http://mitcho.com/code/yarpp/'>YARPP関連記事プラグイン</a>によって表示されています。"
189
 
190
+ #: options.php:405
191
  msgid "Automatically display related posts?"
192
  msgstr "自動的に関連記事を表示する"
193
 
194
+ #: options.php:405
195
  msgid "This option automatically displays related posts right after the content on single entry pages. If this option is off, you will need to manually insert <code>related_posts()</code> or variants (<code>related_pages()</code> and <code>related_entries()</code>) into your theme files."
196
  msgstr "単体記事表示時に自動的に関連記事を表示します。この自動表示を無効にすると、テーマファイルに<code>related_posts()</code>を入れる必要があります。"
197
 
198
+ #: options.php:406
199
  msgid "Website display code example"
200
  msgstr "ウェブサイト表示のソース例"
201
 
202
+ #: options.php:406
203
+ #: options.php:471
204
  msgid "(Update options to reload.)"
205
  msgstr "(設定保存時に更新されます)"
206
 
207
+ #: options.php:409
208
+ #: options.php:473
209
  msgid "Maximum number of related posts:"
210
  msgstr "一度に表示する関連記事数"
211
 
212
+ #: options.php:422
213
  msgid "Before / after related entries:"
214
  msgstr "関連記事表示を囲むタグ:"
215
 
216
+ #: options.php:423
217
+ #: options.php:428
218
+ #: options.php:437
219
+ #: options.php:487
220
+ #: options.php:492
221
+ #: options.php:501
222
  msgid "For example:"
223
  msgstr "例:"
224
 
225
+ #: options.php:427
226
+ #: options.php:491
227
  msgid "Before / after each related entry:"
228
  msgstr "各関連記事を囲むタグ:"
229
 
230
+ #: options.php:431
231
+ #: options.php:495
232
  msgid "Show excerpt?"
233
  msgstr "抜粋を表示?"
234
 
235
+ #: options.php:432
236
+ #: options.php:496
237
  msgid "Excerpt length (No. of words):"
238
  msgstr "抜粋の長さ(単語数):"
239
 
240
+ #: options.php:436
241
  msgid "Before / after (Excerpt):"
242
  msgstr "抜粋を囲むタグ:"
243
 
244
+ #: options.php:442
245
+ #: options.php:506
246
  msgid "Order results:"
247
  msgstr "表示順番:"
248
 
249
+ #: options.php:444
250
+ #: options.php:508
251
  msgid "score (high relevance to low)"
252
  msgstr "関連スコアの高い順"
253
 
254
+ #: options.php:445
255
+ #: options.php:509
256
  msgid "score (low relevance to high)"
257
  msgstr "関連スコアの低い順"
258
 
259
+ #: options.php:446
260
+ #: options.php:510
261
  msgid "date (new to old)"
262
  msgstr "新しい日付順(降順)"
263
 
264
+ #: options.php:447
265
+ #: options.php:511
266
  msgid "date (old to new)"
267
  msgstr "古い日付順(昇順)"
268
 
269
+ #: options.php:448
270
+ #: options.php:512
271
  msgid "title (alphabetical)"
272
  msgstr "タイトル順(昇順)"
273
 
274
+ #: options.php:449
275
+ #: options.php:513
276
  msgid "title (reverse alphabetical)"
277
  msgstr "タイトル順(降順)"
278
 
279
+ #: options.php:454
280
+ #: options.php:518
281
  msgid "Default display if no results:"
282
  msgstr "関連記事がない時のメッセージ"
283
 
284
+ #: options.php:456
285
+ #: options.php:520
286
  msgid "Help promote Yet Another Related Posts Plugin?"
287
  msgstr "この関連記事プラグイン(YARPP)を宣伝しますか?"
288
 
289
+ #: options.php:458
290
+ #: options.php:521
291
  #, php-format
292
  msgid "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."
293
  msgstr "関連記事表示の下に「%s」というコードを挿入します。"
294
 
295
+ #: options.php:464
296
  msgid "Display options <small>for RSS</small>"
297
  msgstr "表示設定 <small>RSS/Atom フィード用</small>"
298
 
299
+ #: options.php:469
300
  msgid "Display related posts in feeds?"
301
  msgstr "自動的にフィードで関連記事を表示する"
302
 
303
+ #: options.php:470
304
  msgid "Display related posts in the descriptions?"
305
  msgstr "フィード内の抜粋にも自動的に関連記事を表示する"
306
 
307
+ #: options.php:470
308
  msgid "This option displays the related posts in the RSS description fields, not just the content. If your feeds are set up to only display excerpts, however, only the description field is used, so this option is required for any display at all."
309
  msgstr "フィード内の全文表示に関連記事を表示するだけでなく、フィード内の抜粋でも関連記事が表示されます。WordPressの設定によりフィードに抜粋のみを表示している場合は、このオプションが無効の場合関連記事がフィード内で表示されません。"
310
 
311
+ #: options.php:471
312
  msgid "RSS display code example"
313
  msgstr "RSS表示のソース例"
314
 
315
+ #: options.php:486
316
  msgid "Before / after related entries display:"
317
  msgstr "関連記事表示を囲むタグ:"
318
 
319
+ #: options.php:500
320
  msgid "Before / after (excerpt):"
321
  msgstr "抜粋を囲むタグ:"
322
 
323
+ #: template-builtin.php:35
324
  #, php-format
325
  msgid "%f is the YARPP match score between the current entry and this related entry. You are seeing this value because you are logged in to WordPress as an administrator. It is not shown to regular visitors."
326
  msgstr "%fは現在表示の記事とこの関連記事の関連スコアです。この関連スコアはログイン済みのサイト管理者のみに表示されます。"
327
 
328
+ #: includes.php:197
329
+ #: includes.php:197
330
  msgid "Related Posts (YARPP)"
331
  msgstr "関連記事 (YARPP)"
332
 
333
+ #: options.php:26
334
  msgid "The MyISAM check has been overridden. You may now use the \"consider titles\" and \"consider bodies\" relatedness criteria."
335
  msgstr "MyISAM専用機能を強制的に有効にしました。「タイトルを検討」と「内容を検討」機能が使えるようになりました。"
336
 
337
+ #: options.php:308
338
+ #: options.php:322
339
+ #: options.php:405
340
+ #: options.php:410
341
+ #: options.php:457
342
+ #: options.php:469
343
+ #: options.php:470
344
+ #: options.php:474
345
+ #: options.php:520
346
+ #: options.php:531
347
  msgid "more&gt;"
348
  msgstr "(説明)"
349
 
350
+ #: options.php:125
351
  msgid "Options saved!"
352
  msgstr "設定の変更は保存されました。"
353
 
354
+ #: options.php:606
355
  msgid "Do you really want to reset your configuration?"
356
  msgstr "本当に初期設定に戻りますか?"
357
 
358
+ #: options.php:605
359
  msgid "Update options"
360
  msgstr "変更を保存"
361
 
362
+ #: options.php:308
363
  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."
364
  msgstr "より関連性の高い記事だけを表示したい場合は、最低関連スコアを上げてください。初期設定は5です。"
365
 
366
+ #: options.php:606
367
  msgid "Reset options"
368
  msgstr "初期設定に戻る"
369
 
370
+ #: magic.php:56
371
+ msgid "Example post "
372
+ msgstr "例:"
373
+
374
+ #: template-metabox.php:12
375
+ msgid "These are the related entries for this entry. Updating this post may change these related posts."
376
+ msgstr "この投稿の関連記事。投稿を更新すると関連記事も変わる可能性があります。"
377
+
378
+ #: template-metabox.php:25
379
+ msgid "Whether all of these related entries are actually displayed and how they are displayed depends on your YARPP display options."
380
+ msgstr "関連記事候補が全て表示されるかどうかは YARPP (関連記事) オプションの表示設定によって異なります。"
381
+
382
+ #: template-metabox.php:27
383
+ msgid "No related posts."
384
+ msgstr "関連記事はありません。"
385
+
386
+ #: options.php:81
387
+ #: options.php:84
388
+ #: options.php:126
389
+ #: options.php:530
390
+ msgid "Related posts cache status"
391
+ msgstr "関連記事のキャッシュ状況"
392
+
393
+ #: options.php:81
394
+ msgid "Your related posts cache is incomplete. Please build your cache from the <A>related posts status pane</a>."
395
+ msgstr "関連記事のキャッシュは現在未完全です。<A>キャッシュ状況パネル</a>でキャッシュを作成してください。"
396
+
397
+ #: options.php:84
398
+ msgid "Your related posts cache is empty. Please build your cache from the <A>related posts status pane</a>."
399
+ msgstr "関連記事はまだキャッシュされていません。すぐに<A>キャッシュ状況パネル</a>でキャッシュを作成してください。"
400
+
401
+ #: options.php:127
402
+ msgid "If you updated the \"pool\" options or \"relatedness\" options displayed, please rebuild your cache now from the <A>related posts status pane</a>."
403
+ msgstr "フィルター設定や関連スコア設定を調節した場合、<A>キャッシュ状況パネル</a>でキャッシュを更新してください。"
404
+
405
+ #: options.php:273
406
+ msgid "by <a href=\"http://mitcho.com/code/\">mitcho (Michael 芳貴 Erlewine)</a>"
407
+ msgstr ""
408
+
409
+ #: options.php:273
410
+ msgid "Follow <a href=\"http://twitter.com/yarpp/\">Yet Another Related Posts Plugin on Twitter</a>"
411
+ msgstr "Twitter で <a href=\"http://twitter.com/yarpp/\">YARPP をフォロー</a>。"
412
+
413
+ #: options.php:294
414
+ msgid "day(s)"
415
+ msgstr "日間"
416
+
417
+ #: options.php:295
418
+ msgid "week(s)"
419
+ msgstr "週間"
420
+
421
+ #: options.php:296
422
+ msgid "month(s)"
423
+ msgstr "ヶ月間"
424
+
425
+ #: options.php:298
426
+ msgid "Show only posts from the past NUMBER UNITS"
427
+ msgstr "過去 NUMBER UNITS の記事だけを表示"
428
+
429
+ #: options.php:387
430
+ msgid "There is a new beta (VERSION) of Yet Another Related Posts Plugin. You can <A>download it here</a> at your own risk."
431
+ msgstr "関連記事プラグイン(YARPP)の新しいベータ(VERSION)があります。是非<A>ダウンロード</a>してみてください。"
432
+
433
+ #: options.php:389
434
+ msgid "There is a new version (VERSION) of Yet Another Related Posts Plugin available! You can <A>download it here</a>."
435
+ msgstr "関連記事プラグイン(YARPP)の新しいバージョン(VERSION)があります。是非<A>ダウンロード</a>してみてください。"
436
+
437
+ #: options.php:410
438
+ #: options.php:474
439
+ msgid "Display using a custom template file"
440
+ msgstr "テンプレートを使って表示"
441
+
442
+ #: options.php:412
443
+ #: options.php:476
444
+ msgid "Template file:"
445
+ msgstr "テンプレートファイル:"
446
+
447
+ #: options.php:469
448
+ msgid "This option displays related posts at the end of each item in your RSS and Atom feeds. No template changes are needed."
449
+ msgstr "RSSとAtomフィード内に関連記事を表示。テーマの変更は必要ありません。"
450
+
451
+ #: options.php:527
452
+ msgid "Advanced"
453
+ msgstr "詳細"
454
+
455
+ #: options.php:530
456
+ msgid "Show cache status"
457
+ msgstr "キャッシュ状況を表示"
458
+
459
+ #: options.php:531
460
+ msgid "When the cache is incomplete, compute related posts on the fly?"
461
+ msgstr "キャッシュされていない場合、関連記事を寸時に計算。"
462
+
463
+ #: options.php:532
464
+ msgid "If a displayed post's related posts are not cached and this option is on, YARPP will compute them on the fly. Do not turn this option on if you have a high-traffic site.<br />If this option is off and a post's related posts have not been cached, it will display as if it has no related posts."
465
+ msgstr "関連記事がキャッシュが未完全の場合、このオプションが有効であれば自動的に関連記事のクエリを実行します。"
466
+
467
+ #: options.php:562
468
+ msgid "'MIN minute(s) and SEC second(s) remaining'"
469
+ msgstr "'残りMIN分SEC秒'"
470
+
471
+ #: options.php:564
472
+ msgid "'SEC second(s) remaining'"
473
+ msgstr "'残りSEC秒'"
474
+
475
+ #: options.php:568
476
+ msgid "Your related posts cache is now complete."
477
+ msgstr "関連記事キャッシュの作成は完了しました。"
478
+
479
+ #: options.php:568
480
+ msgid "The SQL queries took SEC seconds."
481
+ msgstr "SQLクエリは計SEC秒かかりました。"
482
+
483
+ #: options.php:578
484
+ #: options.php:582
485
+ msgid "There was an error while constructing the related posts for TITLE"
486
+ msgstr "「TITLE」の関連記事を作成する途中にエラーが置きました。"
487
+
488
+ #: options.php:579
489
+ #: options.php:584
490
+ msgid "try to continue"
491
+ msgstr "続ける"
492
+
493
+ #: options.php:592
494
+ msgid "Your related posts cache is PERCENT% complete."
495
+ msgstr "関連記事キャッシュは PERCENT% 完了です。"
496
+
497
+ #: options.php:598
498
+ msgid "starting..."
499
+ msgstr "キャッシュ作成開始..."
500
+
501
+ #: includes.php:110
502
+ msgid "MySQL error on creating yarpp_keyword_cache table"
503
+ msgstr "yarpp_keywords_cache テーブル作成時に MySQL エラー発生!"
504
+
505
+ #: includes.php:121
506
+ msgid "MySQL error on creating yarpp_related_cache table"
507
+ msgstr "yarpp_related_cache テーブル作成時に MySQL エラー発生!"
508
+
509
+ #: services.php:59
510
+ msgid "You cannot rebuild the YARPP cache."
511
+ msgstr "YARPP は関連記事キャッシュを作成出来ませんでした。"
512
+
513
+ #: services.php:90
514
+ #, php-format
515
+ msgid "You do not have the permission to write the file '%s'."
516
+ msgstr ""
517
+
518
+ #: options.php:10
519
+ msgid "Please move the YARPP template files into your theme to complete installation. Simply move the sample template files (currently in <code>wp-content/plugins/yet-another-related-posts-plugin/yarpp-templates/</code>) to the <code>TEMPLATEPATH</code> directory."
520
+ msgstr "インストールの最終項目として、 YARPP のテンプレートファイルを現在使用のテーマのフォルダに移しましょう。<code>wp-content/plugins/yet-another-related-posts-plugin/yarpp-templates/</code>内の模範テンプレートを<code>TEMPLATEPATH</code>にコピーしてください。"
521
+
522
+ #: options.php:15
523
+ msgid "No YARPP template files were found in your theme (<code>TEMPLATEPATH</code>) so the templating feature has been turned off."
524
+ msgstr "現在使用のテーマのフォルダ (<code>TEMPLATEPATH</code>) に YARPP テンプレートファイルが見つからなかったためテンプレート機能は使えません。"
525
+
526
+ #: options.php:410
527
+ #: options.php:474
528
+ #: options.php:527
529
+ msgid "NEW!"
530
+ msgstr ""
531
+
532
+ #: options.php:410
533
+ #: options.php:474
534
+ msgid "This advanced option gives you full power to customize how your related posts are displayed. Templates (stored in your theme folder) are written in PHP."
535
+ msgstr "この新機能で関連記事の表示を完全にカスタマイズする事が出来ます。テンプレートファイルは PHP でかき、使用テーマのフォルダにいれます。"
536
+
lang/yarpp-sv_SE.mo ADDED
Binary file
lang/yarpp-sv_SE.po ADDED
@@ -0,0 +1,538 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Yet Another Related Posts Plugin v3.0b6\n"
4
+ "PO-Revision-Date: 2009-03-31 01:26-0700\n"
5
+ "Last-Translator: admin <max@maxelander.se>\n"
6
+ "MIME-Version: 1.0\n"
7
+ "Content-Type: text/plain; charset=UTF-8\n"
8
+ "Content-Transfer-Encoding: 8bit\n"
9
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
10
+ "X-Poedit-Language: Swedish\n"
11
+ "X-Poedit-Country: SWEDEN\n"
12
+ "X-Poedit-SourceCharset: utf-8\n"
13
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;__ngettext_noop:1,2;_c\n"
14
+ "X-Poedit-Basepath: ../\n"
15
+ "X-Poedit-SearchPath-0: ."
16
+
17
+ #: includes.php:94
18
+ msgid "MySQL error on adding yarpp_title"
19
+ msgstr "MySQL gav ett felmeddelande när vi skulle lägga till \"yarpp_title\""
20
+
21
+ #: includes.php:99
22
+ msgid "MySQL error on adding yarpp_content"
23
+ msgstr "MySQL gav ett felmeddelande när vi skulle lägga till \"yarpp_content\""
24
+
25
+ #: includes.php:110
26
+ msgid "MySQL error on creating yarpp_keyword_cache table"
27
+ msgstr "MySQL gav ett felmeddelande när vi skulle lägga till \"yarpp_keyword_cache\""
28
+
29
+ #: includes.php:121
30
+ msgid "MySQL error on creating yarpp_related_cache table"
31
+ msgstr "MySQL gav ett felmeddelande när vi skulle lägga till \"yarpp_related_cache\""
32
+
33
+ #: includes.php:185
34
+ msgid "<h3>An important message from YARPP:</h3><p>Thank you for upgrading to YARPP 2. YARPP 2.0 adds the much requested ability to limit related entry results by certain tags or categories. 2.0 also brings more fine tuned control of the magic algorithm, letting you specify how the algorithm should consider or not consider entry content, titles, tags, and categories. Make sure to adjust the new settings to your liking and perhaps readjust your threshold.</p><p>For more information, check out the <a href=\"http://mitcho.com/code/yarpp/\">YARPP documentation</a>. (This message will not be displayed again.)</p>"
35
+ msgstr "<h3>Viktigt meddelande från YARPP</h3><p>Tack för att du uppgraderat till YARPP 2. Den här versionen lägger till en efterfrågad funktion för att begränsa antalet relaterade inlägg som visas baserat på vissa etiketter eller kategorier. Du får också möjlighet till mer detaljerad kontroll över algoritmen, genom att bestämma huruvida den ska eller inte ska ta hänsyn till ett inläggs innehåll, titel, etiketter eller kategorier. Kontrollera inställningarna så att du får det resultat du vill ha, du kan behöva justera tröskelvärdet. </p><p>Du kan hitta mer information i <a href=\"http://mitcho.com/code/yarpp/\">YARPPs dokumentation</a>.</p><p>(Detta meddelande kommer inte att visas igen.)</p>"
36
+
37
+ #: includes.php:197
38
+ #: includes.php:197
39
+ msgid "Related Posts (YARPP)"
40
+ msgstr "Relaterade inlägg (YARPP)"
41
+
42
+ #: includes.php:224
43
+ #: yarpp.php:29
44
+ #: yarpp.php:29
45
+ msgid "Related Posts"
46
+ msgstr "Relaterade inlägg"
47
+
48
+ #: includes.php:229
49
+ msgid "YARPP"
50
+ msgstr "YARPP"
51
+
52
+ #: magic.php:56
53
+ msgid "Example post "
54
+ msgstr "Exempel på inlägg"
55
+
56
+ #: magic.php:304
57
+ #: options.php:469
58
+ #: options.php:533
59
+ msgid "Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>."
60
+ msgstr "Relaterade inlägg tack vare <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>."
61
+
62
+ #: options.php:10
63
+ msgid "Please move the YARPP template files into your theme to complete installation. Simply move the sample template files (currently in <code>wp-content/plugins/yet-another-related-posts-plugin/yarpp-templates/</code>) to the <code>TEMPLATEPATH</code> directory."
64
+ msgstr "Vänligen flytta YARPPs mallfiler till mappen med ditt tema för att slutföra installationen. Flytta bara exempelfilerna som finns i mappen <code>wp-content/plugins/yet-another-related-posts-plugin/yarpp-templates/</code> till mappen <code>TEMPLATEPATH</code>."
65
+
66
+ #: options.php:15
67
+ msgid "No YARPP template files were found in your theme (<code>TEMPLATEPATH</code>) so the templating feature has been turned off."
68
+ msgstr "Hittade inga mallfiler i din temamapp (<code>TEMPLATEPATH</code>), så temainställningarna är inaktiva."
69
+
70
+ #: options.php:26
71
+ msgid "The MyISAM check has been overridden. You may now use the \"consider titles\" and \"consider bodies\" relatedness criteria."
72
+ msgstr "MyISAM-kontrollen har åsidosatts. Du kan nu använda kriterierna \"ta hänsyn till rubriker\" och \"ta hänsyn till innehåll\"."
73
+
74
+ #: options.php:35
75
+ #, php-format
76
+ msgid "YARPP's \"consider titles\" and \"consider bodies\" relatedness criteria require your <code>%s</code> table to use the <a href='http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html'>MyISAM storage engine</a>, but the table seems to be using the <code>%s</code> engine. These two options have been disabled."
77
+ msgstr "YARPPs kriterier \"ta hänsyn till rubriker\" och \"ta hänsyn till innehåll\" kräver att din <code>%s</code> tabell använder <a href='http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html'>MyISAM Storage Engine</a>, men det verkar som om den använder <code>%s</code>. Därför är kriterierna inte åtkomliga."
78
+
79
+ #: options.php:37
80
+ #, php-format
81
+ msgid "To restore these features, please update your <code>%s</code> table by executing the following SQL directive: <code>ALTER TABLE `%s` ENGINE = MyISAM;</code> . No data will be erased by altering the table's engine, although there are performance implications."
82
+ msgstr "Vill du använda dessa funktioner måste du ändra tabellen <code>%s</code>, genom att utföra detta SQL-kommando mot din databas: <code>ALTER TABLE `%s` ENGINE = MyISAM;</code>."
83
+
84
+ #: options.php:39
85
+ #, php-format
86
+ msgid "If, despite this check, you are sure that <code>%s</code> is using the MyISAM engine, press this magic button:"
87
+ msgstr "Om du trots denna kontroll är säker på att tabellen <code>%s</code> använder MyISAM-formatet kan du klicka på denna magiska knapp:"
88
+
89
+ #: options.php:42
90
+ msgid "Trust me. Let me use MyISAM features."
91
+ msgstr "Lita på mig. Låt mig använda MyISAM-finesserna."
92
+
93
+ #: options.php:65
94
+ msgid "The YARPP database had an error but has been fixed."
95
+ msgstr "Databasen för YARPP innehöll ett fel, men det har korrigerats nu."
96
+
97
+ #: options.php:67
98
+ msgid "The YARPP database has an error which could not be fixed."
99
+ msgstr "Databasen för YARPP innehåller ett fel som inte kunde korrigeras."
100
+
101
+ #: options.php:81
102
+ #: options.php:84
103
+ #: options.php:126
104
+ #: options.php:543
105
+ msgid "Related posts cache status"
106
+ msgstr "Cache status för relaterade inlägg"
107
+
108
+ #: options.php:81
109
+ msgid "Your related posts cache is incomplete. Please build your cache from the <A>related posts status pane</a>."
110
+ msgstr "Din cache för relaterade poster är inte komplett. Vänligen bygg om den via <A>statuspanelen för relaterade poster</a>."
111
+
112
+ #: options.php:84
113
+ msgid "Your related posts cache is empty. Please build your cache from the <A>related posts status pane</a>."
114
+ msgstr "Din cache för relaterade poster är tom. Vänligen bygg om den via <A>statuspanelen för relaterade poster</a>."
115
+
116
+ #: options.php:125
117
+ msgid "Options saved!"
118
+ msgstr "Inställningarna sparade!"
119
+
120
+ #: options.php:127
121
+ msgid "If you updated the \"pool\" options or \"relatedness\" options displayed, please rebuild your cache now from the <A>related posts status pane</a>."
122
+ msgstr "Om du ändrade inställningarna för \"Din pool\" eller \"relationer\", bör du bygga om din cache nu via <A>statuspanelen för relaterade poster</a>."
123
+
124
+ #: options.php:147
125
+ msgid "word"
126
+ msgstr "ord"
127
+
128
+ #: options.php:148
129
+ msgid "tag"
130
+ msgstr "etikett"
131
+
132
+ #: options.php:149
133
+ msgid "category"
134
+ msgstr "kategori"
135
+
136
+ #: options.php:153
137
+ #: options.php:170
138
+ #: options.php:182
139
+ msgid "do not consider"
140
+ msgstr "ta inte hänsyn till"
141
+
142
+ #: options.php:154
143
+ #: options.php:171
144
+ #: options.php:184
145
+ msgid "consider"
146
+ msgstr "ta hänsyn till"
147
+
148
+ #: options.php:156
149
+ #: options.php:186
150
+ #, php-format
151
+ msgid "require at least one %s in common"
152
+ msgstr "kräv minst en gemensam %s "
153
+
154
+ #: options.php:158
155
+ #: options.php:188
156
+ #, php-format
157
+ msgid "require more than one %s in common"
158
+ msgstr "kräv mer än en gemensam %s"
159
+
160
+ #: options.php:172
161
+ msgid "consider with extra weight"
162
+ msgstr "ta hänsyn till och ge extra vikt åt"
163
+
164
+ #: options.php:198
165
+ msgid "Edit Catalog Entry"
166
+ msgstr "Redigera kataloginlägg"
167
+
168
+ #: options.php:199
169
+ msgid "close"
170
+ msgstr "stäng"
171
+
172
+ #: options.php:211
173
+ msgid "Yet Another Related Posts Plugin version history (RSS 2.0)"
174
+ msgstr "Versionshistoria för Yet Another Related Posts Plugin (RSS 2.0)"
175
+
176
+ #: options.php:265
177
+ msgid "Yet Another Related Posts Plugin Options"
178
+ msgstr "YARPP-inställningar"
179
+
180
+ #: options.php:282
181
+ #: options.php:282
182
+ msgid "Donate to mitcho (Michael Yoshitaka Erlewine) for this plugin via PayPal"
183
+ msgstr "Skänk pengar till mitcho (Michael Yoshitaka Erlewine) som tack för utvecklingen av detta tillägg via PayPal"
184
+
185
+ #: options.php:284
186
+ msgid "by <a href=\"http://mitcho.com/code/\">mitcho (Michael 芳貴 Erlewine)</a>"
187
+ msgstr "av <a href=\"http://mitcho.com/code/\">mitcho (Michael 芳貴 Erlewine)</a>, svensk översättninga av <a href=\"http://www.maxelander.se/\">Max Elander</a>."
188
+
189
+ #: options.php:284
190
+ msgid "Follow <a href=\"http://twitter.com/yarpp/\">Yet Another Related Posts Plugin on Twitter</a>"
191
+ msgstr "Följ <a href=\"http://twitter.com/yarpp/\">Yet Another Related Posts Plugin på Twitter</a>"
192
+
193
+ #: options.php:289
194
+ msgid "\"The Pool\""
195
+ msgstr "\"Din pool\""
196
+
197
+ #: options.php:290
198
+ msgid "\"The Pool\" refers to the pool of posts and pages that are candidates for display as related to the current entry."
199
+ msgstr "De inlägg och sidor som beaktas är de som finns i \"Din pool\"."
200
+
201
+ #: options.php:295
202
+ msgid "Disallow by category:"
203
+ msgstr "Uteslut inlägg och sidor i dessa kategorier:"
204
+
205
+ #: options.php:297
206
+ msgid "Disallow by tag:"
207
+ msgstr "Uteslut sidor och inlägg med dessa etiketter:"
208
+
209
+ #: options.php:299
210
+ msgid "Show password protected posts?"
211
+ msgstr "Visa inlägg som skyddas med lösenord?"
212
+
213
+ #: options.php:300
214
+ msgid "Show only previous posts?"
215
+ msgstr "Visa endast poster som är äldre än den aktuella?"
216
+
217
+ #: options.php:305
218
+ msgid "day(s)"
219
+ msgstr "dag(ar)"
220
+
221
+ #: options.php:306
222
+ msgid "week(s)"
223
+ msgstr "vecka (veckor)"
224
+
225
+ #: options.php:307
226
+ msgid "month(s)"
227
+ msgstr "månad(er)"
228
+
229
+ #: options.php:309
230
+ msgid "Show only posts from the past NUMBER UNITS"
231
+ msgstr "Visa endast inlägg från de senaste NUMBER UNITS"
232
+
233
+ #: options.php:317
234
+ msgid "\"Relatedness\" options"
235
+ msgstr "Inställningar för \"relationsstyrka\"."
236
+
237
+ #: options.php:319
238
+ #, php-format
239
+ msgid "YARPP is different than the <a href=\"http://wasabi.pbwiki.com/Related%20Entries\">previous plugins it is based on</a> as it limits the related posts list by (1) a maximum number and (2) a <em>match threshold</em>."
240
+ msgstr "YARPP fungerar inte på samma sätt som <a href=\"http://wasabi.pbwiki.com/Related%20Entries\">andra tillägg som det baseras på</a>: YARPP begränsar antalet relaterade poster genom både (1) ett maximalt antal och (2) ett <em>tröskelvärde för matchningen</em>."
241
+
242
+ #: options.php:319
243
+ #: options.php:333
244
+ #: options.php:416
245
+ #: options.php:421
246
+ #: options.php:468
247
+ #: options.php:481
248
+ #: options.php:482
249
+ #: options.php:486
250
+ #: options.php:532
251
+ #: options.php:544
252
+ msgid "more&gt;"
253
+ msgstr "mer&gt;"
254
+
255
+ #: options.php:319
256
+ 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."
257
+ msgstr "Ju högre tröskelvärde, desto mer restriktivt bliir filtret, och du får färre relaterade poster. Förvalt värde är 5. Om du vill hitta ett lagom värde, ta en titt på vilka värden som visas för några relaterade poster. Genom att titta på vilka värden du har för de relaterade poster som hittas kan du enklare se om du behöver sänka eller höja värdet. Sänk det om du får för få relaterade poster, och höj det om du får för många."
258
+
259
+ #: options.php:324
260
+ msgid "Match threshold:"
261
+ msgstr "Tröskelvärde:"
262
+
263
+ #: options.php:325
264
+ msgid "Titles: "
265
+ msgstr "Rubriker:"
266
+
267
+ #: options.php:327
268
+ msgid "Bodies: "
269
+ msgstr "Brödtext:"
270
+
271
+ #: options.php:329
272
+ msgid "Tags: "
273
+ msgstr "Etiketter:"
274
+
275
+ #: options.php:331
276
+ msgid "Categories: "
277
+ msgstr "Kategorier:"
278
+
279
+ #: options.php:333
280
+ msgid "Cross-relate posts and pages?"
281
+ msgstr "Relatera till både inlägg och sidor?"
282
+
283
+ #: options.php:333
284
+ msgid "When the \"Cross-relate posts and pages\" option is selected, the <code>related_posts()</code>, <code>related_pages()</code>, and <code>related_entries()</code> all will give the same output, returning both related pages and posts."
285
+ msgstr "Om \"Relatera till både inlägg och sidor?\" är aktivt, kommer du att få samma resultat från <code>related_posts()</code>, <code>related_pages()</code> och <code>related_entries()</code>. Alla tre kommer att visa både relaterade sidor och inlägg."
286
+
287
+ #: options.php:398
288
+ msgid "There is a new beta (VERSION) of Yet Another Related Posts Plugin. You can <A>download it here</a> at your own risk."
289
+ msgstr "Det finns en ny beta (VERSION) av Yet Another Related Posts Plugin. Du kan <A>hämta den här</a> på egen risk."
290
+
291
+ #: options.php:400
292
+ msgid "There is a new version (VERSION) of Yet Another Related Posts Plugin available! You can <A>download it here</a>."
293
+ msgstr "Det finns en ny (VERSION) av Yet Another Related Posts Plugin. Du kan <A>hämta den här</a>."
294
+
295
+ #: options.php:412
296
+ msgid "Display options <small>for your website</small>"
297
+ msgstr "Visningsinställningar <small>för din webbplats</small>"
298
+
299
+ #: options.php:416
300
+ msgid "Automatically display related posts?"
301
+ msgstr "Visa relaterade inlägg automatiskt?"
302
+
303
+ #: options.php:416
304
+ msgid "This option automatically displays related posts right after the content on single entry pages. If this option is off, you will need to manually insert <code>related_posts()</code> or variants (<code>related_pages()</code> and <code>related_entries()</code>) into your theme files."
305
+ msgstr "Om du aktiverar detta alternativ visas relaterade inlägg direkt efter innehållet på sidor med enstaka inlägg. Om du inte har aktiverat alternativet måste du manuellt infoga koden <code>related_posts()</code> eller någon av varianterna <code>related_pages()</code> eller <code>related_entries()</code> i ditt tema."
306
+
307
+ #: options.php:417
308
+ msgid "Website display code example"
309
+ msgstr "Kodexempel för att visa relaterade inlägg"
310
+
311
+ #: options.php:417
312
+ #: options.php:483
313
+ msgid "(Update options to reload.)"
314
+ msgstr "(Uppdatera inställningarna för att ladda om sidan)"
315
+
316
+ #: options.php:420
317
+ #: options.php:485
318
+ msgid "Maximum number of related posts:"
319
+ msgstr "Maximalt antal relaterade inlägg som ska visas:"
320
+
321
+ #: options.php:421
322
+ #: options.php:486
323
+ msgid "Display using a custom template file"
324
+ msgstr "Visa med en speciell mall "
325
+
326
+ #: options.php:421
327
+ #: options.php:486
328
+ msgid "This advanced option gives you full power to customize how your related posts are displayed. Templates (in the <code>wp-content/yarpp-templates</code> directory) are written in PHP."
329
+ msgstr "Denna avancerade inställning ger dig möjlighet att bestämma exakt hur relaterade inlägg ska visas. Mallar (i mappen <code>wp-content/yarpp-templates</code>) ska skrivas i PHP."
330
+
331
+ #: options.php:423
332
+ #: options.php:488
333
+ msgid "Template file:"
334
+ msgstr "Malldokument:"
335
+
336
+ #: options.php:433
337
+ msgid "Before / after related entries:"
338
+ msgstr "Kod att infoga före / efter relaterade poster:"
339
+
340
+ #: options.php:434
341
+ #: options.php:439
342
+ #: options.php:448
343
+ #: options.php:499
344
+ #: options.php:504
345
+ #: options.php:513
346
+ msgid "For example:"
347
+ msgstr "Till exempel:"
348
+
349
+ #: options.php:438
350
+ #: options.php:503
351
+ msgid "Before / after each related entry:"
352
+ msgstr "Kod att infoga före / efter varje relaterat inlägg:"
353
+
354
+ #: options.php:442
355
+ #: options.php:507
356
+ msgid "Show excerpt?"
357
+ msgstr "Visa utdrag?"
358
+
359
+ #: options.php:443
360
+ #: options.php:508
361
+ msgid "Excerpt length (No. of words):"
362
+ msgstr "Utdragets längd (antal ord):"
363
+
364
+ #: options.php:447
365
+ msgid "Before / after (Excerpt):"
366
+ msgstr "Kod att infoga före / efter utdrag:"
367
+
368
+ #: options.php:453
369
+ #: options.php:518
370
+ msgid "Order results:"
371
+ msgstr "Sorteringsordning:"
372
+
373
+ #: options.php:455
374
+ #: options.php:520
375
+ msgid "score (high relevance to low)"
376
+ msgstr "relevans (från hög till låg)"
377
+
378
+ #: options.php:456
379
+ #: options.php:521
380
+ msgid "score (low relevance to high)"
381
+ msgstr "relevans (från låg till hög)"
382
+
383
+ #: options.php:457
384
+ #: options.php:522
385
+ msgid "date (new to old)"
386
+ msgstr "ålder (ny till gammal)"
387
+
388
+ #: options.php:458
389
+ #: options.php:523
390
+ msgid "date (old to new)"
391
+ msgstr "ålder (gammal till ny)"
392
+
393
+ #: options.php:459
394
+ #: options.php:524
395
+ msgid "title (alphabetical)"
396
+ msgstr "rubrik (A-Ö)"
397
+
398
+ #: options.php:460
399
+ #: options.php:525
400
+ msgid "title (reverse alphabetical)"
401
+ msgstr "rubrik (Ö-A)"
402
+
403
+ #: options.php:465
404
+ #: options.php:530
405
+ msgid "Default display if no results:"
406
+ msgstr "Visa detta om det inte finns några relaterade inlägg:"
407
+
408
+ #: options.php:467
409
+ #: options.php:532
410
+ msgid "Help promote Yet Another Related Posts Plugin?"
411
+ msgstr "Visa reklam för YARPP?"
412
+
413
+ #: options.php:469
414
+ #: options.php:533
415
+ #, php-format
416
+ msgid "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."
417
+ msgstr "Detta alternativ lägger till den här koden: %s. Prova med att aktivera det, uppdatera dina inställningar och se hur det ser ut i exemplet till höger. Dessa länkar och donationer uppskattas verkligen."
418
+
419
+ #: options.php:476
420
+ msgid "Display options <small>for RSS</small>"
421
+ msgstr "Visningsinställningar <small>för RSS</small>"
422
+
423
+ #: options.php:481
424
+ msgid "Display related posts in feeds?"
425
+ msgstr "Visa relaterade inlägg i RSS-flöde?"
426
+
427
+ #: options.php:481
428
+ msgid "This option displays related posts at the end of each item in your RSS and Atom feeds. No template changes are needed."
429
+ msgstr "Detta alternativ gör att relaterade inlägg redovisas efter varje post i ditt RSS- eller Atom-flöde. Du behöver inte ändra i någon mall för att det ska fungera."
430
+
431
+ #: options.php:482
432
+ msgid "Display related posts in the descriptions?"
433
+ msgstr "Visa relaterade inlägg i beskrivningsfälten?"
434
+
435
+ #: options.php:482
436
+ msgid "This option displays the related posts in the RSS description fields, not just the content. If your feeds are set up to only display excerpts, however, only the description field is used, so this option is required for any display at all."
437
+ msgstr "Detta alternativ gör att relaterade inlägg visas i fälten för beskrivning, inte bara innehållet. Om du har ställt in att dina RSS-flöden bara ska visa utdrag används bara beskrivningarna, så då krävs denna inställning för att relaterade inlägg ska visas alls."
438
+
439
+ #: options.php:483
440
+ msgid "RSS display code example"
441
+ msgstr "RSS-exempel"
442
+
443
+ #: options.php:498
444
+ msgid "Before / after related entries display:"
445
+ msgstr "Visa före / efter relaterade inlägg:"
446
+
447
+ #: options.php:512
448
+ msgid "Before / after (excerpt):"
449
+ msgstr "Visa före / efter utdrag:"
450
+
451
+ #: options.php:540
452
+ msgid "Advanced"
453
+ msgstr "Avancerat"
454
+
455
+ #: options.php:543
456
+ msgid "Show cache status"
457
+ msgstr "Visa status för cache"
458
+
459
+ #: options.php:544
460
+ msgid "When the cache is incomplete, compute related posts on the fly?"
461
+ msgstr "Beräkna relaterade inlägg i farten om cachen är inkomplett?"
462
+
463
+ #: options.php:545
464
+ msgid "If a displayed post's related posts are not cached and this option is on, YARPP will compute them on the fly. Do not turn this option on if you have a high-traffic site.<br />If this option is off and a post's related posts have not been cached, it will display as if it has no related posts."
465
+ msgstr "Om ett inläggs relaterade inlägg inte har cachats, och detta alternativ är aktivt, kommer YARPP att beräkna dem i farten. Aktivera inte detta alternativ om du har hög trafik på din webbplats. <br />Om alternativet är inaktiverat, och ett inläggs relaterade inlägg inte har cachats, kommer det att se ut som om det inte finns några relaterade inlägg."
466
+
467
+ #: options.php:575
468
+ msgid "'MIN minute(s) and SEC second(s) remaining'"
469
+ msgstr "'MIN minuter och SEC sekunder återstår'"
470
+
471
+ #: options.php:577
472
+ msgid "'SEC second(s) remaining'"
473
+ msgstr "'SEC sekunder återstår'"
474
+
475
+ #: options.php:581
476
+ msgid "Your related posts cache is now complete."
477
+ msgstr "Din cache för relaterade inlägg är nu komplett."
478
+
479
+ #: options.php:581
480
+ msgid "The SQL queries took SEC seconds."
481
+ msgstr "SQL frågorna tog SEC sekunder."
482
+
483
+ #: options.php:591
484
+ #: options.php:595
485
+ msgid "There was an error while constructing the related posts for TITLE"
486
+ msgstr "Ett fel uppstod under beräkningen av relaterade inlägg för TITLE"
487
+
488
+ #: options.php:592
489
+ #: options.php:597
490
+ msgid "try to continue"
491
+ msgstr "försök att fortsätta "
492
+
493
+ #: options.php:605
494
+ msgid "Your related posts cache is PERCENT% complete."
495
+ msgstr "Cachen för relaterade inlägg är komplett till PERCENT%."
496
+
497
+ #: options.php:611
498
+ msgid "starting..."
499
+ msgstr "börjar..."
500
+
501
+ #: options.php:618
502
+ msgid "Update options"
503
+ msgstr "Updatera inställningar "
504
+
505
+ #: options.php:619
506
+ msgid "Do you really want to reset your configuration?"
507
+ msgstr "Vill du verkligen nollställa inställningarna?"
508
+
509
+ #: options.php:619
510
+ msgid "Reset options"
511
+ msgstr "Nollställ inställningar"
512
+
513
+ #: services.php:59
514
+ msgid "You cannot rebuild the YARPP cache."
515
+ msgstr "Du kan inte bygga om cachen för YARPP."
516
+
517
+ #: services.php:90
518
+ #, php-format
519
+ msgid "You do not have the permission to write the file '%s'."
520
+ msgstr "Du har inte behörighet att skriva i filen '%s'."
521
+
522
+ #: template-builtin.php:35
523
+ #, php-format
524
+ msgid "%f is the YARPP match score between the current entry and this related entry. You are seeing this value because you are logged in to WordPress as an administrator. It is not shown to regular visitors."
525
+ msgstr "%f är det matchningsvärde som YARPP räknat ut mellan det aktuella inlägget och detta relaterade inlägg. Du ser värdet för att du är inloggad till WordPress som adminstratör. Det visas inte för vanliga besökare."
526
+
527
+ #: template-metabox.php:12
528
+ msgid "These are the related entries for this entry. Updating this post may change these related posts."
529
+ msgstr "Dessa är de relaterade inläggen för detta inlägg. Uppdaterar du detta inlägg kanske du får se andra relaterade inlägg."
530
+
531
+ #: template-metabox.php:25
532
+ msgid "Whether all of these related entries are actually displayed and how they are displayed depends on your YARPP display options."
533
+ msgstr "Huruvida alla dessa relaterade inlägg visas och hur de visas beror på dina visningsinställningar för YARPP."
534
+
535
+ #: template-metabox.php:27
536
+ msgid "No related posts."
537
+ msgstr "Inga relaterade inlägg."
538
+
lang/yarpp-zh_CN.mo CHANGED
Binary file
lang/yarpp-zh_CN.po CHANGED
@@ -14,367 +14,525 @@ msgstr ""
14
  "X-Poedit-Basepath: \n"
15
  "X-Poedit-SearchPath-0: ."
16
 
17
- #: includes.php:74
18
  msgid "MySQL error on adding yarpp_title"
19
- msgstr "在添加 yarpp_title 时 MySQL 发生错误"
20
 
21
- #: includes.php:79
22
  msgid "MySQL error on adding yarpp_content"
23
- msgstr "在添加 yarpp_content 时 MySQL 发生错误"
24
 
25
- #: includes.php:133
26
  msgid "<h3>An important message from YARPP:</h3><p>Thank you for upgrading to YARPP 2. YARPP 2.0 adds the much requested ability to limit related entry results by certain tags or categories. 2.0 also brings more fine tuned control of the magic algorithm, letting you specify how the algorithm should consider or not consider entry content, titles, tags, and categories. Make sure to adjust the new settings to your liking and perhaps readjust your threshold.</p><p>For more information, check out the <a href=\"http://mitcho.com/code/yarpp/\">YARPP documentation</a>. (This message will not be displayed again.)</p>"
27
  msgstr "<h3>关于 YARPP 的重要信息:</h3><p>感谢您升级到 YARPP 2. YARPP 2.0 adds the much requested ability to limit related entry results by certain tags or categories. 2.0 also brings more fine tuned control of the magic algorithm, letting you specify how the algorithm should consider or not consider entry content, titles, tags, and categories. Make sure to adjust the new settings to your liking and perhaps readjust your threshold.</p><p>更多信息,请查阅 <a href=\"http://mitcho.com/code/yarpp/\">YARPP 官方手册</a>. (本条信息不会再次出现。)</p>"
28
 
29
- #: includes.php:154
30
- #: includes.php:154
31
  msgid "Related Posts (YARPP)"
32
  msgstr "关联文章 (YARPP)"
33
 
34
- #: includes.php:173
 
 
35
  msgid "Related Posts"
36
  msgstr "Related Posts"
37
 
38
- #: includes.php:178
39
  msgid "YARPP"
40
  msgstr "YARPP"
41
 
42
- #: magic.php:210
43
  #, php-format
44
  msgid "%f is the YARPP match score between the current entry and this related entry. You are seeing this value because you are logged in to WordPress as an administrator. It is not shown to regular visitors."
45
  msgstr "YARPP 中的 %f 是指当前文章和关联文章之间的匹配程度。当您以管理员的身份登录时才能查阅,游客等其他权限是不能查阅的。"
46
 
47
- #: options.php:307
48
- #: options.php:349
49
- #: options.php:368
50
- #: options.php:412
51
- #: magic.php:219
52
  msgid "Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>."
53
- msgstr "Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>."
54
 
55
- #: options.php:8
56
  msgid "The MyISAM check has been overridden. You may now use the \"consider titles\" and \"consider bodies\" relatedness criteria."
57
  msgstr "The MyISAM check has been overridden. You may now use the \"consider titles\" and \"consider bodies\" relatedness criteria."
58
 
59
- #: options.php:17
60
  #, php-format
61
  msgid "YARPP's \"consider titles\" and \"consider bodies\" relatedness criteria require your <code>%s</code> table to use the <a href='http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html'>MyISAM storage engine</a>, but the table seems to be using the <code>%s</code> engine. These two options have been disabled."
62
  msgstr "YARPP's \"consider titles\" and \"consider bodies\" relatedness criteria require your <code>%s</code> table to use the <a href='http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html'>MyISAM storage engine</a>, but the table seems to be using the <code>%s</code> engine. These two options have been disabled."
63
 
64
- #: options.php:19
65
  #, php-format
66
  msgid "To restore these features, please update your <code>%s</code> table by executing the following SQL directive: <code>ALTER TABLE `%s` ENGINE = MyISAM;</code> . No data will be erased by altering the table's engine, although there are performance implications."
67
  msgstr "如果要恢复这些功能,请在您的 <code>%s</code> 表执行下列SQL指令: <code>ALTER TABLE `%s` ENGINE = MyISAM;</code> 。该操作将修改数据库,但不会损坏您的其它设置。"
68
 
69
- #: options.php:21
70
  #, php-format
71
  msgid "If, despite this check, you are sure that <code>%s</code> is using the MyISAM engine, press this magic button:"
72
  msgstr "同意后 <code>%s</code> 将使用 MyISAM 引擎:"
73
 
74
- #: options.php:24
75
  msgid "Trust me. Let me use MyISAM features."
76
  msgstr "Trust me. Let me use MyISAM features."
77
 
78
- #: options.php:47
79
  msgid "The YARPP database had an error but has been fixed."
80
  msgstr "YARPP 数据库中的错误已被修复。"
81
 
82
- #: options.php:49
83
  msgid "The YARPP database has an error which could not be fixed."
84
  msgstr "YARPP 数据库中出现一个错误,无法修复。"
85
 
86
- #: options.php:121
87
- #: options.php:138
88
- #: options.php:150
89
  msgid "do not consider"
90
  msgstr "不参考"
91
 
92
- #: options.php:122
93
- #: options.php:139
94
- #: options.php:152
95
  msgid "consider"
96
  msgstr "参考"
97
 
98
- #: options.php:140
99
  msgid "consider with extra weight"
100
  msgstr "作为主要参考指标"
101
 
102
- #: options.php:168
103
  msgid "Yet Another Related Posts Plugin version history (RSS 2.0)"
104
  msgstr "Yet Another Related Posts Plugin 版本历史 (RSS 2.0)"
105
 
106
- #: options.php:183
107
- #: options.php:183
108
  msgid "Donate to mitcho (Michael Yoshitaka Erlewine) for this plugin via PayPal"
109
  msgstr "通过 PayPal 给插件作者 mitcho (Michael Yoshitaka Erlewine) 捐赠"
110
 
111
- #: options.php:186
112
  msgid "Yet Another Related Posts Plugin Options"
113
- msgstr "Yet Another Related Posts Plugin 设置"
114
-
115
- #: options.php:202
116
- #, php-format
117
- msgid "by <a href=\"http://mitcho.com/code/\">mitcho (Michael 芳貴 Erlewine)</a> and based on the fabulous work of <a href=\"http://peter.mapledesign.co.uk/weblog/archives/wordpress-related-posts-plugin\">Peter Bower</a>, <a href=\"http://wasabi.pbwiki.com/Related%20Entries\">Alexander Malov &amp; Mike Lu</a>."
118
- msgstr "by <a href=\"http://mitcho.com/code/\">mitcho (Michael 芳貴 Erlewine)</a> and based on the fabulous work of <a href=\"http://peter.mapledesign.co.uk/weblog/archives/wordpress-related-posts-plugin\">Peter Bower</a>, <a href=\"http://wasabi.pbwiki.com/Related%20Entries\">Alexander Malov &amp; Mike Lu</a>. 简体中文翻译:<a href=\"http://jorwang.com/\">Jor Wang</a>."
119
 
120
- #: options.php:206
121
  msgid "\"The Pool\""
122
  msgstr "全局设置"
123
 
124
- #: options.php:207
125
  msgid "\"The Pool\" refers to the pool of posts and pages that are candidates for display as related to the current entry."
126
- msgstr "您可以在“全局设置”里排除某特定分类或标签,今后 YARPP 在筛选关联文章时将不列出已排除项目中的文章。"
127
 
128
- #: options.php:212
129
  msgid "Disallow by category:"
130
  msgstr "禁止关联以下分类:"
131
 
132
- #: options.php:221
133
  msgid "Disallow by tag:"
134
  msgstr "禁止关联以下标签:"
135
 
136
- #: options.php:230
137
  msgid "Show password protected posts?"
138
- msgstr "显示加密日志?"
139
 
140
- #: options.php:231
141
  msgid "Show only previous posts?"
142
  msgstr "只显示以前的日志?"
143
 
144
- #: options.php:236
145
  msgid "\"Relatedness\" options"
146
  msgstr "关联设置"
147
 
148
- #: options.php:237
149
  #, php-format
150
  msgid "YARPP is different than the <a href=\"http://wasabi.pbwiki.com/Related%20Entries\">previous plugins it is based on</a> as it limits the related posts list by (1) a maximum number and (2) a <em>match threshold</em>."
151
- msgstr "关联文章(YARPP)不同于<a href=\"http://wasabi.pbwiki.com/Related%20Entries\">以往的关联文章插件</a>,它有更先进的关联算法。您可以通过设置最大显示条目和匹配值使文章之间的匹配度更为精准。"
152
 
153
- #: options.php:242
154
  msgid "Match threshold:"
155
  msgstr "匹配值:"
156
 
157
- #: options.php:243
158
  msgid "Titles: "
159
  msgstr "标题:"
160
 
161
- #: options.php:245
162
  msgid "Bodies: "
163
  msgstr "正文:"
164
 
165
- #: options.php:247
166
  msgid "Tags: "
167
  msgstr "标签:"
168
 
169
- #: options.php:249
170
  msgid "Categories: "
171
  msgstr "分类:"
172
 
173
- #: options.php:251
174
  msgid "Cross-relate posts and pages?"
175
  msgstr "固定页面参与关联?"
176
 
177
- #: options.php:251
178
  msgid "When the \"Cross-relate posts and pages\" option is selected, the <code>related_posts()</code>, <code>related_pages()</code>, and <code>related_entries()</code> all will give the same output, returning both related pages and posts."
179
  msgstr "选中该项后,<code>related_posts()</code>, <code>related_pages()</code>, 和 <code>related_entries()</code> 这些代码的输出结果相同。"
180
 
181
- #: options.php:293
182
  msgid "Display options <small>for your website</small>"
183
  msgstr "显示设置"
184
 
185
- #: options.php:302
186
- msgid "PERMALINK"
187
- msgstr "PERMALINK"
188
-
189
- #: options.php:302
190
- #: options.php:363
191
- #: options.php:363
192
- msgid "RELATED TITLE"
193
- msgstr "RELATED TITLE"
194
-
195
- #: options.php:309
196
  msgid "Automatically display related posts?"
197
  msgstr "自动插入关联文章?"
198
 
199
- #: options.php:309
200
  msgid "This option automatically displays related posts right after the content on single entry pages. If this option is off, you will need to manually insert <code>related_posts()</code> or variants (<code>related_pages()</code> and <code>related_entries()</code>) into your theme files."
201
  msgstr "根据右侧的代码示例,自动插入关联文章到您的页面中,当您取消该选项时,需要通过手工加入代码 <code>related_posts()</code> 或者根据需求插入 (<code>related_pages()</code> and <code>related_entries()</code>) 到您的模板文件中。"
202
 
203
- #: options.php:310
204
  msgid "Website display code example"
205
  msgstr "网站显示的代码示例"
206
 
207
- #: options.php:310
208
- #: options.php:372
209
  msgid "(Update options to reload.)"
210
- msgstr "(更新设置后生效。)"
211
 
212
- #: options.php:312
213
- #: options.php:374
214
  msgid "Maximum number of related posts:"
215
  msgstr "最多关联篇数"
216
 
217
- #: options.php:314
218
  msgid "Before / after related entries:"
219
  msgstr "主体起止标签"
220
 
221
- #: options.php:315
222
- #: options.php:320
223
- #: options.php:329
224
- #: options.php:378
225
- #: options.php:383
226
- #: options.php:392
227
  msgid "For example:"
228
  msgstr "例如:"
229
 
230
- #: options.php:319
231
- #: options.php:382
232
  msgid "Before / after each related entry:"
233
  msgstr "条目起止标签"
234
 
235
- #: options.php:323
236
- #: options.php:386
237
  msgid "Show excerpt?"
238
  msgstr "显示摘要?"
239
 
240
- #: options.php:324
241
- #: options.php:387
242
  msgid "Excerpt length (No. of words):"
243
  msgstr "摘要字符数"
244
 
245
- #: options.php:328
246
  msgid "Before / after (Excerpt):"
247
  msgstr "摘要起止标签:"
248
 
249
- #: options.php:334
250
- #: options.php:397
251
  msgid "Order results:"
252
  msgstr "排序方式:"
253
 
254
- #: options.php:336
255
- #: options.php:399
256
  msgid "score (high relevance to low)"
257
  msgstr "匹配值(有高到低)"
258
 
259
- #: options.php:337
260
- #: options.php:400
261
  msgid "score (low relevance to high)"
262
  msgstr "匹配值(由低到高)"
263
 
264
- #: options.php:338
265
- #: options.php:401
266
  msgid "date (new to old)"
267
  msgstr "日期(由新到旧)"
268
 
269
- #: options.php:339
270
- #: options.php:402
271
  msgid "date (old to new)"
272
  msgstr "日期(由旧到新)"
273
 
274
- #: options.php:340
275
- #: options.php:403
276
  msgid "title (alphabetical)"
277
  msgstr "标题(按字母顺序排列)"
278
 
279
- #: options.php:341
280
- #: options.php:404
281
  msgid "title (reverse alphabetical)"
282
  msgstr "标题(按逆向字母排列)"
283
 
284
- #: options.php:346
285
- #: options.php:409
286
  msgid "Default display if no results:"
287
  msgstr "无匹配时:"
288
 
289
- #: options.php:347
290
- #: options.php:411
291
  msgid "Help promote Yet Another Related Posts Plugin?"
292
  msgstr "帮助推广关联文章(YARPP)插件?"
293
 
294
- #: options.php:349
295
- #: options.php:412
296
  #, php-format
297
  msgid "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."
298
  msgstr "选中该项后会在模板中加入以下代码:%s. 设置更新后可以在右侧的代码示例看到。真诚地感谢您的推广或捐赠。"
299
 
300
- #: options.php:354
301
  msgid "Display options <small>for RSS</small>"
302
  msgstr "RSS 相关设置"
303
 
304
- #: options.php:370
305
  msgid "Display related posts in feeds?"
306
  msgstr "在文章底部显示?"
307
 
308
- #: options.php:371
309
  msgid "Display related posts in the descriptions?"
310
  msgstr "在摘要中显示?(当RSS只输出摘要时)"
311
 
312
- #: options.php:371
313
  msgid "This option displays the related posts in the RSS description fields, not just the content. If your feeds are set up to only display excerpts, however, only the description field is used, so this option is required for any display at all."
314
  msgstr "该选项将会在 RSS 的摘要区中插入关联文章,而不是在正文区中。如果您的 RSS 只输出摘要,请选择该项。"
315
 
316
- #: options.php:372
317
  msgid "RSS display code example"
318
  msgstr "RSS 显示的代码示例"
319
 
320
- #: options.php:377
321
  msgid "Before / after related entries display:"
322
  msgstr "主体起止标签:"
323
 
324
- #: options.php:391
325
  msgid "Before / after (excerpt):"
326
  msgstr "摘要起止标签:"
327
 
328
- #: options.php:237
329
- #: options.php:251
330
- #: options.php:309
331
- #: options.php:348
332
- #: options.php:371
333
- #: options.php:411
 
 
 
 
334
  msgid "more&gt;"
335
  msgstr "更多&gt;"
336
 
337
- #: options.php:115
338
  msgid "word"
339
  msgstr "字符"
340
 
341
- #: options.php:116
342
  msgid "tag"
343
  msgstr "标签"
344
 
345
- #: options.php:117
346
  msgid "category"
347
  msgstr "分类"
348
 
349
- #: options.php:124
350
- #: options.php:154
351
  #, php-format
352
  msgid "require at least one %s in common"
353
  msgstr "至少从一个%s中考虑关联"
354
 
355
- #: options.php:126
356
- #: options.php:156
357
  #, php-format
358
  msgid "require more than one %s in common"
359
  msgstr "至少从一个以上%s中考虑关联"
360
 
361
- #: options.php:95
362
  msgid "Options saved!"
363
  msgstr "保存成功!"
364
 
365
- #: options.php:237
366
  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."
367
- msgstr "只简单的几步设置,就能精准得到您想要的关联文章。这里默认的匹配值为5 。如果你想找到合适您网站的的匹配值,我建议你打开 ”对管理员(权限>8的用户)显示匹配值” 这个设置,这样可以更容易找到适合您网站的匹配值。"
368
 
369
- #: options.php:419
370
  msgid "Update options"
371
  msgstr "保存设置"
372
 
373
- #: options.php:420
374
  msgid "Do you really want to reset your configuration?"
375
  msgstr "请注意!您确定重置所有的设置吗?"
376
 
377
- #: options.php:420
378
  msgid "Reset options"
379
  msgstr "重置设置"
380
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  "X-Poedit-Basepath: \n"
15
  "X-Poedit-SearchPath-0: ."
16
 
17
+ #: includes.php:94
18
  msgid "MySQL error on adding yarpp_title"
19
+ msgstr "添加 yarpp_title 时错误"
20
 
21
+ #: includes.php:99
22
  msgid "MySQL error on adding yarpp_content"
23
+ msgstr "添加 yarpp_content 时错误"
24
 
25
+ #: includes.php:185
26
  msgid "<h3>An important message from YARPP:</h3><p>Thank you for upgrading to YARPP 2. YARPP 2.0 adds the much requested ability to limit related entry results by certain tags or categories. 2.0 also brings more fine tuned control of the magic algorithm, letting you specify how the algorithm should consider or not consider entry content, titles, tags, and categories. Make sure to adjust the new settings to your liking and perhaps readjust your threshold.</p><p>For more information, check out the <a href=\"http://mitcho.com/code/yarpp/\">YARPP documentation</a>. (This message will not be displayed again.)</p>"
27
  msgstr "<h3>关于 YARPP 的重要信息:</h3><p>感谢您升级到 YARPP 2. YARPP 2.0 adds the much requested ability to limit related entry results by certain tags or categories. 2.0 also brings more fine tuned control of the magic algorithm, letting you specify how the algorithm should consider or not consider entry content, titles, tags, and categories. Make sure to adjust the new settings to your liking and perhaps readjust your threshold.</p><p>更多信息,请查阅 <a href=\"http://mitcho.com/code/yarpp/\">YARPP 官方手册</a>. (本条信息不会再次出现。)</p>"
28
 
29
+ #: includes.php:197
30
+ #: includes.php:197
31
  msgid "Related Posts (YARPP)"
32
  msgstr "关联文章 (YARPP)"
33
 
34
+ #: includes.php:224
35
+ #: yarpp.php:29
36
+ #: yarpp.php:29
37
  msgid "Related Posts"
38
  msgstr "Related Posts"
39
 
40
+ #: includes.php:229
41
  msgid "YARPP"
42
  msgstr "YARPP"
43
 
44
+ #: template-builtin.php:35
45
  #, php-format
46
  msgid "%f is the YARPP match score between the current entry and this related entry. You are seeing this value because you are logged in to WordPress as an administrator. It is not shown to regular visitors."
47
  msgstr "YARPP 中的 %f 是指当前文章和关联文章之间的匹配程度。当您以管理员的身份登录时才能查阅,游客等其他权限是不能查阅的。"
48
 
49
+ #: magic.php:304
50
+ #: options.php:469
51
+ #: options.php:533
 
 
52
  msgid "Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>."
53
+ msgstr "以上关联文章由 <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a> 提供支持。"
54
 
55
+ #: options.php:26
56
  msgid "The MyISAM check has been overridden. You may now use the \"consider titles\" and \"consider bodies\" relatedness criteria."
57
  msgstr "The MyISAM check has been overridden. You may now use the \"consider titles\" and \"consider bodies\" relatedness criteria."
58
 
59
+ #: options.php:35
60
  #, php-format
61
  msgid "YARPP's \"consider titles\" and \"consider bodies\" relatedness criteria require your <code>%s</code> table to use the <a href='http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html'>MyISAM storage engine</a>, but the table seems to be using the <code>%s</code> engine. These two options have been disabled."
62
  msgstr "YARPP's \"consider titles\" and \"consider bodies\" relatedness criteria require your <code>%s</code> table to use the <a href='http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html'>MyISAM storage engine</a>, but the table seems to be using the <code>%s</code> engine. These two options have been disabled."
63
 
64
+ #: options.php:37
65
  #, php-format
66
  msgid "To restore these features, please update your <code>%s</code> table by executing the following SQL directive: <code>ALTER TABLE `%s` ENGINE = MyISAM;</code> . No data will be erased by altering the table's engine, although there are performance implications."
67
  msgstr "如果要恢复这些功能,请在您的 <code>%s</code> 表执行下列SQL指令: <code>ALTER TABLE `%s` ENGINE = MyISAM;</code> 。该操作将修改数据库,但不会损坏您的其它设置。"
68
 
69
+ #: options.php:39
70
  #, php-format
71
  msgid "If, despite this check, you are sure that <code>%s</code> is using the MyISAM engine, press this magic button:"
72
  msgstr "同意后 <code>%s</code> 将使用 MyISAM 引擎:"
73
 
74
+ #: options.php:42
75
  msgid "Trust me. Let me use MyISAM features."
76
  msgstr "Trust me. Let me use MyISAM features."
77
 
78
+ #: options.php:65
79
  msgid "The YARPP database had an error but has been fixed."
80
  msgstr "YARPP 数据库中的错误已被修复。"
81
 
82
+ #: options.php:67
83
  msgid "The YARPP database has an error which could not be fixed."
84
  msgstr "YARPP 数据库中出现一个错误,无法修复。"
85
 
86
+ #: options.php:153
87
+ #: options.php:170
88
+ #: options.php:182
89
  msgid "do not consider"
90
  msgstr "不参考"
91
 
92
+ #: options.php:154
93
+ #: options.php:171
94
+ #: options.php:184
95
  msgid "consider"
96
  msgstr "参考"
97
 
98
+ #: options.php:172
99
  msgid "consider with extra weight"
100
  msgstr "作为主要参考指标"
101
 
102
+ #: options.php:211
103
  msgid "Yet Another Related Posts Plugin version history (RSS 2.0)"
104
  msgstr "Yet Another Related Posts Plugin 版本历史 (RSS 2.0)"
105
 
106
+ #: options.php:282
107
+ #: options.php:282
108
  msgid "Donate to mitcho (Michael Yoshitaka Erlewine) for this plugin via PayPal"
109
  msgstr "通过 PayPal 给插件作者 mitcho (Michael Yoshitaka Erlewine) 捐赠"
110
 
111
+ #: options.php:265
112
  msgid "Yet Another Related Posts Plugin Options"
113
+ msgstr "关联文章(YARPP)插件设置"
 
 
 
 
 
114
 
115
+ #: options.php:289
116
  msgid "\"The Pool\""
117
  msgstr "全局设置"
118
 
119
+ #: options.php:290
120
  msgid "\"The Pool\" refers to the pool of posts and pages that are candidates for display as related to the current entry."
121
+ msgstr "您可以在“全局设置”里排除关联某些分类或标签,使其 YARPP 不再关联显示它们。"
122
 
123
+ #: options.php:295
124
  msgid "Disallow by category:"
125
  msgstr "禁止关联以下分类:"
126
 
127
+ #: options.php:297
128
  msgid "Disallow by tag:"
129
  msgstr "禁止关联以下标签:"
130
 
131
+ #: options.php:299
132
  msgid "Show password protected posts?"
133
+ msgstr "关联显示加密日志?"
134
 
135
+ #: options.php:300
136
  msgid "Show only previous posts?"
137
  msgstr "只显示以前的日志?"
138
 
139
+ #: options.php:317
140
  msgid "\"Relatedness\" options"
141
  msgstr "关联设置"
142
 
143
+ #: options.php:319
144
  #, php-format
145
  msgid "YARPP is different than the <a href=\"http://wasabi.pbwiki.com/Related%20Entries\">previous plugins it is based on</a> as it limits the related posts list by (1) a maximum number and (2) a <em>match threshold</em>."
146
+ msgstr "关联文章(YARPP)不同于<a href=\"http://wasabi.pbwiki.com/Related%20Entries\">以往的关联文章插件</a>,它有着更为先进的关联算法。您可以通过设置最大显示条目和匹配值使关联更精准。"
147
 
148
+ #: options.php:324
149
  msgid "Match threshold:"
150
  msgstr "匹配值:"
151
 
152
+ #: options.php:325
153
  msgid "Titles: "
154
  msgstr "标题:"
155
 
156
+ #: options.php:327
157
  msgid "Bodies: "
158
  msgstr "正文:"
159
 
160
+ #: options.php:329
161
  msgid "Tags: "
162
  msgstr "标签:"
163
 
164
+ #: options.php:331
165
  msgid "Categories: "
166
  msgstr "分类:"
167
 
168
+ #: options.php:333
169
  msgid "Cross-relate posts and pages?"
170
  msgstr "固定页面参与关联?"
171
 
172
+ #: options.php:333
173
  msgid "When the \"Cross-relate posts and pages\" option is selected, the <code>related_posts()</code>, <code>related_pages()</code>, and <code>related_entries()</code> all will give the same output, returning both related pages and posts."
174
  msgstr "选中该项后,<code>related_posts()</code>, <code>related_pages()</code>, 和 <code>related_entries()</code> 这些代码的输出结果相同。"
175
 
176
+ #: options.php:412
177
  msgid "Display options <small>for your website</small>"
178
  msgstr "显示设置"
179
 
180
+ #: options.php:416
 
 
 
 
 
 
 
 
 
 
181
  msgid "Automatically display related posts?"
182
  msgstr "自动插入关联文章?"
183
 
184
+ #: options.php:416
185
  msgid "This option automatically displays related posts right after the content on single entry pages. If this option is off, you will need to manually insert <code>related_posts()</code> or variants (<code>related_pages()</code> and <code>related_entries()</code>) into your theme files."
186
  msgstr "根据右侧的代码示例,自动插入关联文章到您的页面中,当您取消该选项时,需要通过手工加入代码 <code>related_posts()</code> 或者根据需求插入 (<code>related_pages()</code> and <code>related_entries()</code>) 到您的模板文件中。"
187
 
188
+ #: options.php:417
189
  msgid "Website display code example"
190
  msgstr "网站显示的代码示例"
191
 
192
+ #: options.php:417
193
+ #: options.php:483
194
  msgid "(Update options to reload.)"
195
+ msgstr "(保存设置后生效。)"
196
 
197
+ #: options.php:420
198
+ #: options.php:485
199
  msgid "Maximum number of related posts:"
200
  msgstr "最多关联篇数"
201
 
202
+ #: options.php:433
203
  msgid "Before / after related entries:"
204
  msgstr "主体起止标签"
205
 
206
+ #: options.php:434
207
+ #: options.php:439
208
+ #: options.php:448
209
+ #: options.php:499
210
+ #: options.php:504
211
+ #: options.php:513
212
  msgid "For example:"
213
  msgstr "例如:"
214
 
215
+ #: options.php:438
216
+ #: options.php:503
217
  msgid "Before / after each related entry:"
218
  msgstr "条目起止标签"
219
 
220
+ #: options.php:442
221
+ #: options.php:507
222
  msgid "Show excerpt?"
223
  msgstr "显示摘要?"
224
 
225
+ #: options.php:443
226
+ #: options.php:508
227
  msgid "Excerpt length (No. of words):"
228
  msgstr "摘要字符数"
229
 
230
+ #: options.php:447
231
  msgid "Before / after (Excerpt):"
232
  msgstr "摘要起止标签:"
233
 
234
+ #: options.php:453
235
+ #: options.php:518
236
  msgid "Order results:"
237
  msgstr "排序方式:"
238
 
239
+ #: options.php:455
240
+ #: options.php:520
241
  msgid "score (high relevance to low)"
242
  msgstr "匹配值(有高到低)"
243
 
244
+ #: options.php:456
245
+ #: options.php:521
246
  msgid "score (low relevance to high)"
247
  msgstr "匹配值(由低到高)"
248
 
249
+ #: options.php:457
250
+ #: options.php:522
251
  msgid "date (new to old)"
252
  msgstr "日期(由新到旧)"
253
 
254
+ #: options.php:458
255
+ #: options.php:523
256
  msgid "date (old to new)"
257
  msgstr "日期(由旧到新)"
258
 
259
+ #: options.php:459
260
+ #: options.php:524
261
  msgid "title (alphabetical)"
262
  msgstr "标题(按字母顺序排列)"
263
 
264
+ #: options.php:460
265
+ #: options.php:525
266
  msgid "title (reverse alphabetical)"
267
  msgstr "标题(按逆向字母排列)"
268
 
269
+ #: options.php:465
270
+ #: options.php:530
271
  msgid "Default display if no results:"
272
  msgstr "无匹配时:"
273
 
274
+ #: options.php:467
275
+ #: options.php:532
276
  msgid "Help promote Yet Another Related Posts Plugin?"
277
  msgstr "帮助推广关联文章(YARPP)插件?"
278
 
279
+ #: options.php:469
280
+ #: options.php:533
281
  #, php-format
282
  msgid "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."
283
  msgstr "选中该项后会在模板中加入以下代码:%s. 设置更新后可以在右侧的代码示例看到。真诚地感谢您的推广或捐赠。"
284
 
285
+ #: options.php:476
286
  msgid "Display options <small>for RSS</small>"
287
  msgstr "RSS 相关设置"
288
 
289
+ #: options.php:481
290
  msgid "Display related posts in feeds?"
291
  msgstr "在文章底部显示?"
292
 
293
+ #: options.php:482
294
  msgid "Display related posts in the descriptions?"
295
  msgstr "在摘要中显示?(当RSS只输出摘要时)"
296
 
297
+ #: options.php:482
298
  msgid "This option displays the related posts in the RSS description fields, not just the content. If your feeds are set up to only display excerpts, however, only the description field is used, so this option is required for any display at all."
299
  msgstr "该选项将会在 RSS 的摘要区中插入关联文章,而不是在正文区中。如果您的 RSS 只输出摘要,请选择该项。"
300
 
301
+ #: options.php:483
302
  msgid "RSS display code example"
303
  msgstr "RSS 显示的代码示例"
304
 
305
+ #: options.php:498
306
  msgid "Before / after related entries display:"
307
  msgstr "主体起止标签:"
308
 
309
+ #: options.php:512
310
  msgid "Before / after (excerpt):"
311
  msgstr "摘要起止标签:"
312
 
313
+ #: options.php:319
314
+ #: options.php:333
315
+ #: options.php:416
316
+ #: options.php:421
317
+ #: options.php:468
318
+ #: options.php:481
319
+ #: options.php:482
320
+ #: options.php:486
321
+ #: options.php:532
322
+ #: options.php:544
323
  msgid "more&gt;"
324
  msgstr "更多&gt;"
325
 
326
+ #: options.php:147
327
  msgid "word"
328
  msgstr "字符"
329
 
330
+ #: options.php:148
331
  msgid "tag"
332
  msgstr "标签"
333
 
334
+ #: options.php:149
335
  msgid "category"
336
  msgstr "分类"
337
 
338
+ #: options.php:156
339
+ #: options.php:186
340
  #, php-format
341
  msgid "require at least one %s in common"
342
  msgstr "至少从一个%s中考虑关联"
343
 
344
+ #: options.php:158
345
+ #: options.php:188
346
  #, php-format
347
  msgid "require more than one %s in common"
348
  msgstr "至少从一个以上%s中考虑关联"
349
 
350
+ #: options.php:125
351
  msgid "Options saved!"
352
  msgstr "保存成功!"
353
 
354
+ #: options.php:319
355
  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."
356
+ msgstr ""
357
 
358
+ #: options.php:618
359
  msgid "Update options"
360
  msgstr "保存设置"
361
 
362
+ #: options.php:619
363
  msgid "Do you really want to reset your configuration?"
364
  msgstr "请注意!您确定重置所有的设置吗?"
365
 
366
+ #: options.php:619
367
  msgid "Reset options"
368
  msgstr "重置设置"
369
 
370
+ #: includes.php:110
371
+ msgid "MySQL error on creating yarpp_keyword_cache table"
372
+ msgstr "创建 yarpp_keyword_cache table 表时错误"
373
+
374
+ #: includes.php:121
375
+ msgid "MySQL error on creating yarpp_related_cache table"
376
+ msgstr "创建 yarpp_related_cache 表时错误"
377
+
378
+ #: magic.php:56
379
+ msgid "Example post "
380
+ msgstr ""
381
+
382
+ #: options.php:81
383
+ #: options.php:84
384
+ #: options.php:126
385
+ #: options.php:543
386
+ msgid "Related posts cache status"
387
+ msgstr "关联文章缓存"
388
+
389
+ #: options.php:81
390
+ msgid "Your related posts cache is incomplete. Please build your cache from the <A>related posts status pane</a>."
391
+ msgstr "您的缓存不完整,<A>立即重建</a>。"
392
+
393
+ #: options.php:84
394
+ msgid "Your related posts cache is empty. Please build your cache from the <A>related posts status pane</a>."
395
+ msgstr "您还尚未建立关联文章缓存, <A>立即重建</a>。"
396
+
397
+ #: options.php:127
398
+ msgid "If you updated the \"pool\" options or \"relatedness\" options displayed, please rebuild your cache now from the <A>related posts status pane</a>."
399
+ msgstr "如果您刚刚修改了“全局设置”或者“关联设置”等选项后,建议您<A>重建下关联文章缓存</a>。"
400
+
401
+ #: options.php:198
402
+ msgid "Edit Catalog Entry"
403
+ msgstr ""
404
+
405
+ #: options.php:199
406
+ msgid "close"
407
+ msgstr "关闭"
408
+
409
+ #: options.php:284
410
+ msgid "by <a href=\"http://mitcho.com/code/\">mitcho (Michael 芳貴 Erlewine)</a>"
411
+ msgstr "插件作者:<a href=\"http://mitcho.com/code/\">mitcho (Michael 芳貴 Erlewine)</a> | 中文译者:<a href=\"http://jorwang.com/\">JorWang</a>"
412
+
413
+ #: options.php:284
414
+ msgid "Follow <a href=\"http://twitter.com/yarpp/\">Yet Another Related Posts Plugin on Twitter</a>"
415
+ msgstr ""
416
+
417
+ #: options.php:305
418
+ msgid "day(s)"
419
+ msgstr "天"
420
+
421
+ #: options.php:306
422
+ msgid "week(s)"
423
+ msgstr "周"
424
+
425
+ #: options.php:307
426
+ msgid "month(s)"
427
+ msgstr "月"
428
+
429
+ #: options.php:309
430
+ msgid "Show only posts from the past NUMBER UNITS"
431
+ msgstr "仅关联显示 NUMBER UNITS 内的文章。"
432
+
433
+ #: options.php:398
434
+ msgid "There is a new beta (VERSION) of Yet Another Related Posts Plugin. You can <A>download it here</a> at your own risk."
435
+ msgstr "新的测试版本发布了!<A>点击下载</a> Yet Another Related Posts Plugin (VERSION) 。(测试版使用有风险,请注意备份。)"
436
+
437
+ #: options.php:400
438
+ msgid "There is a new version (VERSION) of Yet Another Related Posts Plugin available! You can <A>download it here</a>."
439
+ msgstr "新的正式版本发布了!<A>点击下载</a> Yet Another Related Posts Plugin (VERSION) 。"
440
+
441
+ #: options.php:421
442
+ #: options.php:486
443
+ msgid "Display using a custom template file"
444
+ msgstr "使用自定义模板"
445
+
446
+ #: options.php:421
447
+ #: options.php:486
448
+ msgid "This advanced option gives you full power to customize how your related posts are displayed. Templates (in the <code>wp-content/yarpp-templates</code> directory) are written in PHP."
449
+ msgstr ""
450
+
451
+ #: options.php:423
452
+ #: options.php:488
453
+ msgid "Template file:"
454
+ msgstr "模板文件:"
455
+
456
+ #: options.php:481
457
+ msgid "This option displays related posts at the end of each item in your RSS and Atom feeds. No template changes are needed."
458
+ msgstr ""
459
+
460
+ #: options.php:540
461
+ msgid "Advanced"
462
+ msgstr "高级设置"
463
+
464
+ #: options.php:543
465
+ msgid "Show cache status"
466
+ msgstr "查看缓存状态"
467
+
468
+ #: options.php:544
469
+ msgid "When the cache is incomplete, compute related posts on the fly?"
470
+ msgstr "当缓存不完整时,由插件自行匹配关联文章?"
471
+
472
+ #: options.php:545
473
+ msgid "If a displayed post's related posts are not cached and this option is on, YARPP will compute them on the fly. Do not turn this option on if you have a high-traffic site.<br />If this option is off and a post's related posts have not been cached, it will display as if it has no related posts."
474
+ msgstr ""
475
+
476
+ #: options.php:575
477
+ msgid "'MIN minute(s) and SEC second(s) remaining'"
478
+ msgstr ""
479
+
480
+ #: options.php:577
481
+ msgid "'SEC second(s) remaining'"
482
+ msgstr ""
483
+
484
+ #: options.php:581
485
+ msgid "Your related posts cache is now complete."
486
+ msgstr "恭喜!您的关联文章缓存已成功完成。"
487
+
488
+ #: options.php:581
489
+ msgid "The SQL queries took SEC seconds."
490
+ msgstr ""
491
+
492
+ #: options.php:591
493
+ #: options.php:595
494
+ msgid "There was an error while constructing the related posts for TITLE"
495
+ msgstr ""
496
+
497
+ #: options.php:592
498
+ #: options.php:597
499
+ msgid "try to continue"
500
+ msgstr "重试"
501
+
502
+ #: options.php:605
503
+ msgid "Your related posts cache is PERCENT% complete."
504
+ msgstr "您的关联文章(YARPP)缓存完整率为:PERCENT% "
505
+
506
+ #: options.php:611
507
+ msgid "starting..."
508
+ msgstr "开始建立……"
509
+
510
+ #: services.php:59
511
+ msgid "You cannot rebuild the YARPP cache."
512
+ msgstr "您不能建立关联文章缓存。"
513
+
514
+ #: services.php:90
515
+ #, php-format
516
+ msgid "You do not have the permission to write the file '%s'."
517
+ msgstr ""
518
+
519
+ #: template-metabox.php:12
520
+ msgid "These are the related entries for this entry. Updating this post may change these related posts."
521
+ msgstr ""
522
+
523
+ #: template-metabox.php:25
524
+ msgid "Whether all of these related entries are actually displayed and how they are displayed depends on your YARPP display options."
525
+ msgstr ""
526
+
527
+ #: template-metabox.php:27
528
+ msgid "No related posts."
529
+ msgstr "无关联文章"
530
+
531
+ #: options.php:10
532
+ msgid "Please move the YARPP template files into your theme to complete installation. Simply move the sample template files (currently in <code>wp-content/plugins/yet-another-related-posts-plugin/yarpp-templates/</code>) to the <code>TEMPLATEPATH</code> directory."
533
+ msgstr "如果您需要使用关联文章(YARPP)插件的自定义模板,请手动将文件夹(<code>wp-content/plugins/yet-another-related-posts-plugin/yarpp-templates/</code>)的文件移动到您的主题文件夹(<code>TEMPLATEPATH</code>)内。"
534
+
535
+ #: options.php:15
536
+ msgid "No YARPP template files were found in your theme (<code>TEMPLATEPATH</code>) so the templating feature has been turned off."
537
+ msgstr "未在您的主题文件夹 (<code>TEMPLATEPATH</code>) 内找到关联文章(YARPP)的自定义模板文件。"
538
+
magic.php CHANGED
@@ -1,8 +1,89 @@
1
  <?php
2
 
3
- function yarpp_sql($type,$args,$giveresults = true,$domain='website') {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  global $wpdb, $post, $yarpp_debug;
5
 
 
 
 
 
6
  // set $yarpp_debug
7
  if (isset($_REQUEST['yarpp_debug']))
8
  $yarpp_debug = true;
@@ -14,10 +95,7 @@ function yarpp_sql($type,$args,$giveresults = true,$domain='website') {
14
  $domainprefix = '';
15
 
16
  $options = array('limit'=>"${domainprefix}limit",
17
- 'order'=>"${domainprefix}order",
18
  'threshold'=>'threshold',
19
- 'show_excerpt'=>"${domainprefix}show_excerpt",
20
- 'excerpt_length'=>"${domainprefix}excerpt_length",
21
  'show_pass_post'=>'show_pass_post',
22
  'past_only'=>'past_only',
23
  'cross_relate'=>'cross_relate',
@@ -26,7 +104,10 @@ function yarpp_sql($type,$args,$giveresults = true,$domain='website') {
26
  'tags'=>'tags',
27
  'categories'=>'categories',
28
  'distags'=>'distags',
29
- 'discats'=>'discats');
 
 
 
30
  $optvals = array();
31
  foreach (array_keys($options) as $option) {
32
  if (isset($args[$option])) {
@@ -41,18 +122,12 @@ function yarpp_sql($type,$args,$giveresults = true,$domain='website') {
41
  // if cross_relate is set, override the type argument and make sure both matches are accepted in the sql query
42
  if ($cross_relate) $type = array('post','page');
43
 
44
- //yarpp_cache_keywords(); /* TEST */
45
-
46
  // Fetch keywords
47
- $body_terms = post_body_keywords();
48
- $title_terms = post_title_keywords();
49
 
50
  if ($yarpp_debug) echo "<!--TITLE TERMS: $title_terms-->"; // debug
51
  if ($yarpp_debug) echo "<!--BODY TERMS: $body_terms-->"; // debug
52
-
53
- // Make sure the post is not from the future
54
- $time_difference = get_settings('gmt_offset');
55
- $now = gmdate("Y-m-d H:i:s",(time()+($time_difference*3600)));
56
 
57
  // get weights
58
 
@@ -68,8 +143,6 @@ function yarpp_sql($type,$args,$giveresults = true,$domain='website') {
68
 
69
  $totalweight = $bodyweight + $titleweight + $tagweight + $catweight;
70
 
71
- $weightedthresh = $threshold/($totalweight + 0.1);
72
-
73
  // get disallowed categories and tags
74
 
75
  $disterms = implode(',', array_filter(array_merge(explode(',',$discats),explode(',',$distags)),'is_numeric'));
@@ -78,28 +151,25 @@ function yarpp_sql($type,$args,$giveresults = true,$domain='website') {
78
 
79
  $criteria = array();
80
  if ($bodyweight)
81
- $criteria['body'] = "(MATCH (post_content) AGAINST ('$body_terms'))";
82
  if ($titleweight)
83
- $criteria['title'] = "(MATCH (post_title) AGAINST ('$title_terms'))";
84
  if ($tagweight)
85
  $criteria['tag'] = "COUNT( DISTINCT tagtax.term_taxonomy_id )";
86
  if ($catweight)
87
  $criteria['cat'] = "COUNT( DISTINCT cattax.term_taxonomy_id )";
88
 
89
- $newsql = "SELECT ID, post_title, post_date, post_content, post_excerpt, ";
90
 
91
- foreach ($criteria as $key => $value) {
92
- $newsql .= "$value as ${key}score, ";
93
- }
94
 
95
  $newsql .= '(0';
96
  foreach ($criteria as $key => $value) {
97
  $newsql .= "+ $value * ".$weights[$key];
98
  }
99
  $newsql .= ') as score';
100
-
101
- if ($usedisterms)
102
- $newsql .= ", count(blockterm.term_id) as block";
103
 
104
  $newsql .= "\n from $wpdb->posts \n";
105
 
@@ -109,14 +179,14 @@ function yarpp_sql($type,$args,$giveresults = true,$domain='website') {
109
  left join $wpdb->terms as blockterm on (blocktax.term_id = blockterm.term_id and blockterm.term_id in ($disterms))\n";
110
 
111
  if ($tagweight)
112
- $newsql .= " left JOIN $wpdb->term_relationships AS thistag ON (thistag.object_id = $post->ID )
113
  left JOIN $wpdb->term_relationships AS tagrel on (tagrel.term_taxonomy_id = thistag.term_taxonomy_id
114
  AND tagrel.object_id = $wpdb->posts.ID)
115
  left JOIN $wpdb->term_taxonomy AS tagtax ON ( tagrel.term_taxonomy_id = tagtax.term_taxonomy_id
116
  AND tagtax.taxonomy = 'post_tag')\n";
117
 
118
  if ($catweight)
119
- $newsql .= " left JOIN $wpdb->term_relationships AS thiscat ON (thiscat.object_id = $post->ID )
120
  left JOIN $wpdb->term_relationships AS catrel on (catrel.term_taxonomy_id = thiscat.term_taxonomy_id
121
  AND catrel.object_id = $wpdb->posts.ID)
122
  left JOIN $wpdb->term_taxonomy AS cattax ON ( catrel.term_taxonomy_id = cattax.term_taxonomy_id
@@ -124,27 +194,30 @@ function yarpp_sql($type,$args,$giveresults = true,$domain='website') {
124
 
125
  // WHERE
126
 
127
- $newsql .= " where (post_status IN ( 'publish', 'static' ) and ID != '$post->ID')";
128
 
129
  if ($past_only)
130
- $newsql .= " and post_date <= '$now' ";
131
  if (!$show_pass_post)
132
  $newsql .= " and post_password ='' ";
 
 
133
 
134
  $newsql .= " and post_type IN ('".implode("', '",$type)."')";
135
 
136
  // GROUP BY
137
  $newsql .= "\n group by id \n";
138
  // HAVING
139
- $newsql .= " having score >= $threshold";
 
140
  if ($usedisterms)
141
- $newsql .= " and block = 0";
142
 
143
- $newsql .= (($categories == 3)?' and catscore >= 1':'');
144
- $newsql .= (($categories == 4)?' and catscore >= 2':'');
145
- $newsql .= (($tags == 3)?' and tagscore >= 1':'');
146
- $newsql .= (($tags == 4)?' and tagscore >= 2':'');
147
- $newsql .= " order by ".(($order?$order:"score desc"))." limit ".$limit;
148
 
149
  if (!$giveresults) {
150
  $newsql = "select count(t.ID) from ($newsql) as t";
@@ -156,12 +229,24 @@ function yarpp_sql($type,$args,$giveresults = true,$domain='website') {
156
 
157
  /* new in 2.1! the domain argument refers to {website,widget,rss}, though widget is not used yet. */
158
 
159
- function yarpp_related($type,$args,$echo = true,$domain = 'website') {
160
- global $wpdb, $post, $userdata;
 
 
 
 
 
 
 
 
 
 
 
 
161
  get_currentuserinfo();
162
 
163
  // set the "domain prefix", used for all the preferences.
164
- if ($domain == 'rss')
165
  $domainprefix = 'rss_';
166
  else
167
  $domainprefix = '';
@@ -169,15 +254,10 @@ function yarpp_related($type,$args,$echo = true,$domain = 'website') {
169
  // get options
170
  // note the 2.1 change... the options array changed from what you might call a "list" to a "hash"... this changes the structure of the $args to something which is, in the long term, much more useful
171
  $options = array(
172
- 'before_related'=>"${domainprefix}before_related",
173
- 'after_related'=>"${domainprefix}after_related",
174
- 'before_title'=>"${domainprefix}before_title",
175
- 'after_title'=>"${domainprefix}after_title",
176
- 'show_excerpt'=>"${domainprefix}show_excerpt",
177
- 'excerpt_length'=>"${domainprefix}excerpt_length",
178
- 'before_post'=>"${domainprefix}before_post",
179
- 'after_post'=>"${domainprefix}after_post",
180
- 'no_results'=>"${domainprefix}no_results",
181
  'promote_yarpp'=>"${domainprefix}promote_yarpp");
182
  $optvals = array();
183
  foreach (array_keys($options) as $option) {
@@ -189,44 +269,70 @@ function yarpp_related($type,$args,$echo = true,$domain = 'website') {
189
  }
190
  extract($optvals);
191
 
192
- $sql = yarpp_sql($type,$args,true,$domain);
193
- $results = $wpdb->get_results($sql);
194
-
195
  $output = '';
196
- if ($results) {
197
- foreach ($results as $result) {
198
- $title = stripslashes(apply_filters('the_title', $result->post_title));
199
- $permalink = get_permalink($result->ID);
200
-
201
- $post_content = strip_tags(apply_filters_if_white('the_content',$result->post_content));
202
- //$post_content = stripslashes($post_content);
203
-
204
- $post_excerpt = strip_tags($result->post_excerpt);
205
- if ($post_excerpt == '')
206
- $post_excerpt = $post_content; //this is okay because it will be clipped later anyway.
 
 
 
 
 
 
 
 
207
 
208
- $output .= "$before_title<a href='$permalink' rel='bookmark' title='Permanent Link: $title'>$title";
209
- if ($userdata->user_level >= 8 and $domain != 'rss')
210
- $output .= ' <abbr title="'.sprintf(__('%f is the YARPP match score between the current entry and this related entry. You are seeing this value because you are logged in to WordPress as an administrator. It is not shown to regular visitors.','yarpp'),round($result->score,3)).'">('.round($result->score,3).')</abbr>';
211
- $output .= '</a>';
212
- if ($show_excerpt) {
213
- $output .= $before_post . yarpp_excerpt($post_excerpt,$excerpt_length) . $after_post;
214
- }
215
- $output .= $after_title;
216
- }
217
- $output = stripslashes(stripslashes($before_related)).$output.stripslashes(stripslashes($after_related));
218
- if ($promote_yarpp)
219
- $output .= "\n<p>".__("Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.",'yarpp')."</p>";
220
-
221
  } else {
222
- $output = $no_results;
223
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
224
  if ($echo) echo $output; else return ((!empty($output))?"\n\n":'').$output;
225
  }
226
 
227
- function yarpp_related_exist($type,$args) {
228
- global $wpdb, $post;
229
 
 
 
 
 
 
 
230
  $options = array('threshold'=>'threshold','show_pass_post'=>'show_pass_post','past_only'=>'past_only');
231
  $optvals = array();
232
  foreach (array_keys($options) as $option) {
@@ -238,34 +344,83 @@ function yarpp_related_exist($type,$args) {
238
  }
239
  extract($optvals);
240
 
241
- $result = $wpdb->get_var(yarpp_sql($type,$args,false,$domain));
242
  return $result > 0 ? true: false;
243
  }
244
 
245
- /* yarpp_cache_* are EXPERIMENTAL and not used.
246
- * Don't worry about it. ^^
247
- */
248
- function yarpp_cache_exists($post_id) {
249
- global $wpdb;
250
- /*
251
- CREATE TABLE `wp_yarpp_keyword_cache` (
252
- `ID` BIGINT( 20 ) UNSIGNED NOT NULL ,
253
- `body` TEXT NOT NULL ,
254
- `title` TEXT NOT NULL ,
255
- `date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ,
256
- PRIMARY KEY ( `ID` )
257
- ) ENGINE = MYISAM COMMENT = 'YARPP\'s keyword cache table'
258
- */
259
- $timeout = 400;
260
-
261
- if (!$wpdb->get_var("select count(*) as count from wp_yarpp_keyword_cache where ID = $post->ID and date > date_sub(now(),interval $timeout minute)")) {
262
- $wpdb->query('set names utf8');
263
-
264
- $wpdb->query("insert into wp_yarpp_keyword_cache (ID,body,title) values ($post->ID,'$body_terms','$title_terms') on duplicate key update body = '$body_terms', title = '$title_terms'");
265
 
266
- if ($yarpp_debug) echo "<!--"."insert into wp_yarpp_keyword_cache (ID,body,title) values ($post->ID,'$body_terms','$title_terms') on duplicate key update body = '$body_terms', title = '$title_terms'"."-->";
 
 
 
 
 
 
 
 
267
  }
268
  }
269
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
270
 
271
- ?>
1
  <?php
2
 
3
+ //=TEMPLATING/DISPLAY===========
4
+
5
+ function yarpp_set_score_override_flag($q) {
6
+ global $yarpp_time, $yarpp_score_override, $yarpp_online_limit;
7
+ if ($yarpp_time) {
8
+ if ($q->query_vars['orderby'] == 'score')
9
+ $yarpp_score_override = true;
10
+ else
11
+ $yarpp_score_override = false;
12
+
13
+ if ($q->query_vars['showposts'] != '') {
14
+ $yarpp_online_limit = $q->query_vars['showposts'];
15
+ } else {
16
+ $yarpp_online_limit = false;
17
+ }
18
+
19
+ }
20
+ }
21
+
22
+ function yarpp_join_filter($arg) {
23
+ global $wpdb, $yarpp_time;
24
+ if ($yarpp_time) {
25
+ $arg .= " join {$wpdb->prefix}yarpp_related_cache as yarpp using (ID)";
26
+ }
27
+ return $arg;
28
+ }
29
+
30
+ function yarpp_where_filter($arg) {
31
+ global $wpdb, $yarpp_time;
32
+ $threshold = yarpp_get_option('threshold');
33
+ if ($yarpp_time) {
34
+ $arg = str_replace("$wpdb->posts.ID = ","yarpp.score > $threshold and yarpp.reference_ID = ",$arg);
35
+ if (yarpp_get_option("recent_only"))
36
+ $arg .= " and post_date > date_sub(now(), interval ".yarpp_get_option("recent_number")." ".yarpp_get_option("recent_units").") ";
37
+ //echo "<!--YARPP TEST: $arg-->";
38
+ }
39
+ return $arg;
40
+ }
41
+
42
+ function yarpp_orderby_filter($arg) {
43
+ global $wpdb, $yarpp_time, $yarpp_score_override;
44
+ if ($yarpp_time and $yarpp_score_override) {
45
+ $arg = str_replace("$wpdb->posts.post_date","yarpp.score",$arg);
46
+ }
47
+ return $arg;
48
+ }
49
+
50
+ function yarpp_limit_filter($arg) {
51
+ global $wpdb, $yarpp_time, $yarpp_online_limit;
52
+ if ($yarpp_time and $yarpp_online_limit) {
53
+ return " limit $yarpp_online_limit ";
54
+ }
55
+ return $arg;
56
+ }
57
+
58
+ function yarpp_fields_filter($arg) {
59
+ global $wpdb, $yarpp_time;
60
+ if ($yarpp_time) {
61
+ $arg .= ", yarpp.score";
62
+ }
63
+ return $arg;
64
+ }
65
+
66
+ function yarpp_demo_request_filter($arg) {
67
+ global $wpdb, $yarpp_demo_time, $yarpp_limit;
68
+ if ($yarpp_demo_time) {
69
+ $wpdb->query("set @count = 0;");
70
+ $arg = "SELECT SQL_CALC_FOUND_ROWS ID + $yarpp_limit as ID, post_author, post_date, post_date_gmt, 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.' as post_content,
71
+ concat('".__('Example post ','yarpp')."',@count:=@count+1) as post_title, 0 as post_category, '' as post_excerpt, 'publish' as post_status, 'open' as comment_status, 'open' as ping_status, '' as post_password, concat('example-post-',@count) as post_name, '' as to_ping, '' as pinged, post_modified, post_modified_gmt, '' as post_content_filtered, 0 as post_parent, concat('PERMALINK',@count) as guid, 0 as menu_order, 'post' as post_type, '' as post_mime_type, 0 as comment_count, 'SCORE' as score
72
+ FROM wp_posts
73
+ ORDER BY ID DESC LIMIT 0, $yarpp_limit";
74
+ }
75
+ return $arg;
76
+ }
77
+
78
+ //=CACHING===========
79
+
80
+ function yarpp_sql($type,$args,$giveresults = true,$reference_ID=false,$domain='website') {
81
  global $wpdb, $post, $yarpp_debug;
82
 
83
+ if (is_object($post) and !$reference_ID) {
84
+ $reference_ID = $post->ID;
85
+ }
86
+
87
  // set $yarpp_debug
88
  if (isset($_REQUEST['yarpp_debug']))
89
  $yarpp_debug = true;
95
  $domainprefix = '';
96
 
97
  $options = array('limit'=>"${domainprefix}limit",
 
98
  'threshold'=>'threshold',
 
 
99
  'show_pass_post'=>'show_pass_post',
100
  'past_only'=>'past_only',
101
  'cross_relate'=>'cross_relate',
104
  'tags'=>'tags',
105
  'categories'=>'categories',
106
  'distags'=>'distags',
107
+ 'discats'=>'discats',
108
+ 'recent_only'=>'recent_only',
109
+ 'recent_number'=>'recent_number',
110
+ 'recent_units'=>'recent_units');
111
  $optvals = array();
112
  foreach (array_keys($options) as $option) {
113
  if (isset($args[$option])) {
122
  // if cross_relate is set, override the type argument and make sure both matches are accepted in the sql query
123
  if ($cross_relate) $type = array('post','page');
124
 
 
 
125
  // Fetch keywords
126
+ $body_terms = yarpp_get_cached_keywords($reference_ID,'body');
127
+ $title_terms = yarpp_get_cached_keywords($reference_ID,'title');
128
 
129
  if ($yarpp_debug) echo "<!--TITLE TERMS: $title_terms-->"; // debug
130
  if ($yarpp_debug) echo "<!--BODY TERMS: $body_terms-->"; // debug
 
 
 
 
131
 
132
  // get weights
133
 
143
 
144
  $totalweight = $bodyweight + $titleweight + $tagweight + $catweight;
145
 
 
 
146
  // get disallowed categories and tags
147
 
148
  $disterms = implode(',', array_filter(array_merge(explode(',',$discats),explode(',',$distags)),'is_numeric'));
151
 
152
  $criteria = array();
153
  if ($bodyweight)
154
+ $criteria['body'] = "(MATCH (post_content) AGAINST ('".$wpdb->escape($body_terms)."'))";
155
  if ($titleweight)
156
+ $criteria['title'] = "(MATCH (post_title) AGAINST ('".$wpdb->escape($title_terms)."'))";
157
  if ($tagweight)
158
  $criteria['tag'] = "COUNT( DISTINCT tagtax.term_taxonomy_id )";
159
  if ($catweight)
160
  $criteria['cat'] = "COUNT( DISTINCT cattax.term_taxonomy_id )";
161
 
162
+ $newsql = "SELECT $reference_ID, ID, "; //post_title, post_date, post_content, post_excerpt,
163
 
164
+ //foreach ($criteria as $key => $value) {
165
+ // $newsql .= "$value as ${key}score, ";
166
+ //}
167
 
168
  $newsql .= '(0';
169
  foreach ($criteria as $key => $value) {
170
  $newsql .= "+ $value * ".$weights[$key];
171
  }
172
  $newsql .= ') as score';
 
 
 
173
 
174
  $newsql .= "\n from $wpdb->posts \n";
175
 
179
  left join $wpdb->terms as blockterm on (blocktax.term_id = blockterm.term_id and blockterm.term_id in ($disterms))\n";
180
 
181
  if ($tagweight)
182
+ $newsql .= " left JOIN $wpdb->term_relationships AS thistag ON (thistag.object_id = $reference_ID )
183
  left JOIN $wpdb->term_relationships AS tagrel on (tagrel.term_taxonomy_id = thistag.term_taxonomy_id
184
  AND tagrel.object_id = $wpdb->posts.ID)
185
  left JOIN $wpdb->term_taxonomy AS tagtax ON ( tagrel.term_taxonomy_id = tagtax.term_taxonomy_id
186
  AND tagtax.taxonomy = 'post_tag')\n";
187
 
188
  if ($catweight)
189
+ $newsql .= " left JOIN $wpdb->term_relationships AS thiscat ON (thiscat.object_id = $reference_ID )
190
  left JOIN $wpdb->term_relationships AS catrel on (catrel.term_taxonomy_id = thiscat.term_taxonomy_id
191
  AND catrel.object_id = $wpdb->posts.ID)
192
  left JOIN $wpdb->term_taxonomy AS cattax ON ( catrel.term_taxonomy_id = cattax.term_taxonomy_id
194
 
195
  // WHERE
196
 
197
+ $newsql .= " where (post_status IN ( 'publish', 'static' ) and ID != '$reference_ID')";
198
 
199
  if ($past_only)
200
+ $newsql .= " and post_date <= NOW() ";
201
  if (!$show_pass_post)
202
  $newsql .= " and post_password ='' ";
203
+ if ($recent_only)
204
+ $newsql .= " and post_date > date_sub(now(), interval $recent_number $recent_units) ";
205
 
206
  $newsql .= " and post_type IN ('".implode("', '",$type)."')";
207
 
208
  // GROUP BY
209
  $newsql .= "\n group by id \n";
210
  // HAVING
211
+ $safethreshold = max($threshold/2,0.1); // this is so the new calibration system works.
212
+ $newsql .= " having score >= $safethreshold";
213
  if ($usedisterms)
214
+ $newsql .= " and count(blockterm.term_id) = 0";
215
 
216
+ $newsql .= (($categories == 3)?' and '.$criteria['cat'].' >= 1':'');
217
+ $newsql .= (($categories == 4)?' and '.$criteria['cat'].' >= 2':'');
218
+ $newsql .= (($tags == 3)?' and '.$criteria['tag'].' >= 1':'');
219
+ $newsql .= (($tags == 4)?' and '.$criteria['tag'].' >= 2':'');
220
+ $newsql .= " order by score desc limit ".$limit;
221
 
222
  if (!$giveresults) {
223
  $newsql = "select count(t.ID) from ($newsql) as t";
229
 
230
  /* new in 2.1! the domain argument refers to {website,widget,rss}, though widget is not used yet. */
231
 
232
+ function yarpp_related($type,$args,$echo = true,$reference_ID=false,$domain = 'website') {
233
+ global $wpdb, $post, $userdata, $yarpp_time, $yarpp_demo_time, $wp_query, $id, $page, $pages, $authordata;
234
+
235
+ if ($domain != 'demo_web' and $domain != 'demo_rss') {
236
+ if ($yarpp_time) // if we're already in a YARPP loop, stop now.
237
+ return false;
238
+
239
+ if (is_object($post) and !$reference_ID)
240
+ $reference_ID = $post->ID;
241
+ } else {
242
+ if ($yarpp_demo_time) // if we're already in a YARPP loop, stop now.
243
+ return false;
244
+ }
245
+
246
  get_currentuserinfo();
247
 
248
  // set the "domain prefix", used for all the preferences.
249
+ if ($domain == 'rss' or $domain == 'demo_rss')
250
  $domainprefix = 'rss_';
251
  else
252
  $domainprefix = '';
254
  // get options
255
  // note the 2.1 change... the options array changed from what you might call a "list" to a "hash"... this changes the structure of the $args to something which is, in the long term, much more useful
256
  $options = array(
257
+ 'limit'=>"${domainprefix}limit",
258
+ 'use_template'=>"${domainprefix}use_template",
259
+ 'order'=>"${domainprefix}order",
260
+ 'template_file'=>"${domainprefix}template_file",
 
 
 
 
 
261
  'promote_yarpp'=>"${domainprefix}promote_yarpp");
262
  $optvals = array();
263
  foreach (array_keys($options) as $option) {
269
  }
270
  extract($optvals);
271
 
272
+ if (yarpp_get_option('ad_hoc_caching') == 1)
273
+ yarpp_cache_enforce($type,$reference_ID);
274
+
275
  $output = '';
276
+
277
+ if ($domain != 'demo_web' and $domain != 'demo_rss')
278
+ $yarpp_time = true; // get ready for YARPP TIME!
279
+ else
280
+ $yarpp_demo_time = true;
281
+ // just so we can return to normal later
282
+ $current_query = $wp_query;
283
+ $current_post = $post;
284
+ $current_id = $id;
285
+ $current_page = $page;
286
+ $current_pages = $pages;
287
+ $current_authordata = $authordata;
288
+
289
+ $related_query = new WP_Query();
290
+ $orders = split(' ',$order);
291
+ if ($domain != 'demo_web' and $domain != 'demo_rss')
292
+ $related_query->query("p=$reference_ID&orderby=".$orders[0]."&order=".$orders[1]."&showposts=$limit");
293
+ else
294
+ $related_query->query('');
295
 
296
+ if ($domain == 'metabox') {
297
+ include('template-metabox.php');
298
+ } elseif ($use_template and file_exists(TEMPLATEPATH . '/' . $template_file)) {
299
+ ob_start();
300
+ include(TEMPLATEPATH . '/' . $template_file);
301
+ $output = ob_get_contents();
302
+ ob_end_clean();
 
 
 
 
 
 
303
  } else {
304
+ include('template-builtin.php');
305
+ }
306
+
307
+ unset($related_query);
308
+ if ($domain != 'demo_web' and $domain != 'demo_rss')
309
+ $yarpp_time = false; // YARPP time is over... :(
310
+ else
311
+ $yarpp_demo_time = false;
312
+
313
+ // restore the older wp_query.
314
+ $wp_query = null; $wp_query = $current_query; unset($current_query);
315
+ $post = null; $post = $current_post; unset($current_post);
316
+ $authordata = null; $authordata = $current_authordata; unset($current_authordata);
317
+ $pages = null; $pages = $current_pages; unset($current_pages);
318
+ $id = $current_id; unset($current_id);
319
+ $page = $current_page; unset($current_page);
320
+
321
+ if ($promote_yarpp and $domain != 'metabox')
322
+ $output .= "\n<p>".__("Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.",'yarpp')."</p>";
323
+
324
  if ($echo) echo $output; else return ((!empty($output))?"\n\n":'').$output;
325
  }
326
 
327
+ function yarpp_related_exist($type,$args,$reference_ID=false) {
328
+ global $wpdb, $post, $yarpp_time;
329
 
330
+ if (is_object($post) and !$reference_ID)
331
+ $reference_ID = $post->ID;
332
+
333
+ if ($yarpp_time) // if we're already in a YARPP loop, stop now.
334
+ return false;
335
+
336
  $options = array('threshold'=>'threshold','show_pass_post'=>'show_pass_post','past_only'=>'past_only');
337
  $optvals = array();
338
  foreach (array_keys($options) as $option) {
344
  }
345
  extract($optvals);
346
 
347
+ $result = $wpdb->get_var(yarpp_sql($type,$args,false,$reference_ID));
348
  return $result > 0 ? true: false;
349
  }
350
 
351
+ // these are the post ID's which have been updated in this caching cycle
352
+ $yarpp_updated_posts = array();
353
+ // here's a queue of posts whose related posts should be enforced
354
+ $yarpp_caching_queue = array();
355
+
356
+ function yarpp_save_cache($post_ID,$force=true) {
357
+ global $wpdb, $yarpp_caching_queue, $yarpp_updated_posts;
358
+ $parent_ID = $wpdb->get_var("select post_parent from $wpdb->posts where ID='$post_ID'");
359
+ if ($parent_ID != $post_ID and $parent_ID)
360
+ $post_ID = $parent_ID;
361
+ if (yarpp_get_option('cross_relate'))
362
+ $type = array('post','page');
363
+ else
364
+ $type = array('post');
365
+
366
+ // add it to the queue
367
+ array_push($yarpp_caching_queue,$post_ID);
 
 
 
368
 
369
+ // go through the queue
370
+ while ($ID = array_pop($yarpp_caching_queue)) {
371
+ if (array_search($ID,$yarpp_updated_posts) === false) {
372
+ //echo "YARPP updating $ID<br/>";
373
+ //echo "YARPP QUEUE: ".print_r($yarpp_caching_queue,true)."<br/>";
374
+ //echo "YARPP UPDATED: ".print_r($yarpp_updated_posts,true)."<br/>";
375
+ yarpp_cache_enforce($type,$ID,$force);
376
+ array_push($yarpp_updated_posts,$ID);
377
+ }
378
  }
379
  }
380
 
381
+ function yarpp_cache_enforce($type=array('post'),$reference_ID,$force=false) {
382
+ global $wpdb, $yarpp_debug, $yarpp_caching_queue;
383
+
384
+ $timeout = 600;
385
+
386
+ if (!$force) {
387
+ if ($wpdb->get_var("select count(*) as count from {$wpdb->prefix}yarpp_related_cache where reference_ID = $reference_ID and date > date_sub(now(),interval $timeout minute)")) {
388
+ if ($yarpp_debug) echo "<!--YARPP is using the cache right now.-->";
389
+ return false;
390
+ }
391
+ }
392
+
393
+ yarpp_cache_keywords($reference_ID);
394
+
395
+ // let's first record the current related posts for this reference ID
396
+ $old_relations = $wpdb->get_col("select ID from {$wpdb->prefix}yarpp_related_cache where reference_ID = $reference_ID and ID != 0");
397
+ array_push($old_relations,0);
398
+
399
+ // now clear out the cruft
400
+ $wpdb->query("delete from {$wpdb->prefix}yarpp_related_cache where reference_ID = $reference_ID");
401
+
402
+ // let's update the related posts
403
+ $wpdb->query("insert into {$wpdb->prefix}yarpp_related_cache (reference_ID,ID,score) ".yarpp_sql($type,array(),true,$reference_ID)." on duplicate key update date = now()");
404
+
405
+ if ($wpdb->rows_affected and $yarpp_debug) echo "<!--YARPP just set the cache for post $reference_ID-->";
406
+
407
+ // if changes were made, let's find out which ones are new. We'll want to then add add these to the queue so their related posts can also be updated.
408
+ if ($wpdb->rows_affected) {
409
+ $new_relations = $wpdb->get_col("select ID from {$wpdb->prefix}yarpp_related_cache where reference_ID = $reference_ID and ID not in (".implode(',',$old_relations).")");
410
+ //echo "YARPP added (select ID from {$wpdb->prefix}yarpp_related_cache where reference_ID = $reference_ID and ID not in (".implode(',',$old_relations).")): ".print_r($new_relations,true)."<br/>";
411
+ $yarpp_caching_queue = array_merge($yarpp_caching_queue,$new_relations);
412
+ }
413
+
414
+ if (!$wpdb->rows_affected) {
415
+ $wpdb->query("insert into {$wpdb->prefix}yarpp_related_cache (reference_ID,ID,score) values ($reference_ID,0,0)");
416
+ if (!$wpdb->rows_affected)
417
+ return false;
418
+ }
419
+ //$wpdb->query("delete from {$wpdb->prefix}yarpp_related_cache where date <= date_sub(now(),interval $timeout minute)");
420
+ //if ($wpdb->rows_affected)
421
+ // if ($yarpp_debug) echo "<!--$wpdb->rows_affected rows were cleared as they had expired.-->";
422
+
423
+ return true;
424
+
425
+ }
426
 
 
options.css CHANGED
File without changes
options.php CHANGED
@@ -2,10 +2,28 @@
2
 
3
  global $wpdb, $yarpp_value_options, $yarpp_binary_options, $wp_version;
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  if ($_POST['myisam_override']) {
6
  yarpp_set_option('myisam_override',1);
7
  echo "<div class='updated'>"
8
- .__("The MyISAM check has been overridden. You may now use the \"consider titles\" and \"consider bodies\" relatedness criteria.")
9
  ."</div>";
10
  }
11
 
@@ -20,7 +38,7 @@ if (!yarpp_get_option('myisam_override')) {
20
  ."<br />"
21
  .sprintf(__("If, despite this check, you are sure that <code>%s</code> is using the MyISAM engine, press this magic button:",'yarpp'),$wpdb->posts)
22
  ."<br />"
23
- ."<form method='post'><input type='submit' name='myisam_override' value='"
24
  .__("Trust me. Let me use MyISAM features.",'yarpp')
25
  ."'></input></form>"
26
  ."</div>";
@@ -42,17 +60,29 @@ if (substr($wp_version,0,3) < 2.5) {
42
 
43
  if ($yarpp_myisam) {
44
  if (!yarpp_enabled()) {
45
- echo '<div class="updated">';
46
  if (yarpp_activate())
47
  _e('The YARPP database had an error but has been fixed.','yarpp');
48
  else
49
  _e('The YARPP database has an error which could not be fixed.','yarpp');
50
- echo '</div>';
51
  }
52
  }
53
 
54
  yarpp_reinforce(); // just in case, set default options, etc.
55
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  //compute $tagmap
57
  $tagmap = array();
58
  foreach ($wpdb->get_results("select $wpdb->terms.term_id, name from $wpdb->terms natural join $wpdb->term_taxonomy where $wpdb->term_taxonomy.taxonomy = 'category'") as $tag) {
@@ -92,12 +122,14 @@ if (isset($_POST['update_yarpp'])) {
92
  foreach (array_keys($yarpp_binary_options) as $option) {
93
  (isset($_POST[$option])) ? yarpp_set_option($option,true) : yarpp_set_option($option,false);
94
  }
95
- echo '<div id="message" class="updated fade" style="background-color: rgb(207, 235, 247);"><p>'.__('Options saved!','yarpp').'</p></div>';
 
 
96
  }
97
 
98
  function checkbox($option,$desc,$tr="<tr valign='top'>
99
  <th class='th-full' colspan='2' scope='row'>",$inputplus = '',$thplus='') {
100
- echo " $tr<input $inputplus type='checkbox' name='$option' value='true'". ((yarpp_get_option($option)) ? ' checked="checked"': '' )." /> $desc</th>$thplus
101
  </tr>";
102
  }
103
  function textbox($option,$desc,$size=2,$tr="<tr valign='top'>
@@ -174,15 +206,51 @@ css.setAttribute("rel", "stylesheet");
174
  css.setAttribute("type", "text/css");
175
  css.setAttribute("href", "../wp-content/plugins/yet-another-related-posts-plugin/options.css");
176
  document.getElementsByTagName("head")[0].appendChild(css);
177
- document.getElementsByTagName("body")[0].setAttribute('onload',"excerpt();rss_excerpt();do_rss_display();");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  //-->
179
  </script>
180
 
181
  <div class="wrap">
182
  <h2>
183
- <a href='https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=66G4DATK4999L&item_name=mitcho%2ecom%2fcode%3a%20donate%20to%20Michael%20Yoshitaka%20Erlewine&no_shipping=1&no_note=1&tax=0&currency_code=USD&lc=US&charset=UTF%2d8' target='_new'><img src="https://www.paypal.com/<?php echo paypal_directory(); ?>i/btn/btn_donate_SM.gif" name="submit" alt="<?php _e('Donate to mitcho (Michael Yoshitaka Erlewine) for this plugin via PayPal');?>" title="<?php _e('Donate to mitcho (Michael Yoshitaka Erlewine) for this plugin via PayPal','yarpp');?>" style="float:right" /></a>
184
-
185
-
186
  <?php _e('Yet Another Related Posts Plugin Options','yarpp');?> <small><?php
187
 
188
  $display_version = yarpp_get_option('version');
@@ -196,44 +264,47 @@ document.getElementsByTagName("body")[0].setAttribute('onload',"excerpt();rss_ex
196
  ?></small>
197
  </h2>
198
 
 
 
199
  <form method="post">
200
 
 
201
 
202
- <p><small><?php _e('by <a href="http://mitcho.com/code/">mitcho (Michael 芳貴 Erlewine)</a> and based on the fabulous work of <a href="http://peter.mapledesign.co.uk/weblog/archives/wordpress-related-posts-plugin">Peter Bower</a>, <a href="http://wasabi.pbwiki.com/Related%20Entries">Alexander Malov &amp; Mike Lu</a>.','yarpp');?></small></p>
203
 
204
 
205
  <!--The Pool-->
 
206
  <h3><?php _e('"The Pool"','yarpp');?></h3>
207
  <p><?php _e('"The Pool" refers to the pool of posts and pages that are candidates for display as related to the current entry.','yarpp');?></p>
208
 
209
  <table class="form-table" style="margin-top: 0">
210
  <tbody>
211
  <tr valign='top'>
212
- <th scope='row'><?php _e('Disallow by category:','yarpp');?></th><td><div style="overflow:auto;max-height:100px;">
213
- <?php
214
- $discats = explode(',',yarpp_get_option('discats'));
215
- array_unshift($discats,' ');
216
- foreach ($wpdb->get_results("select $wpdb->terms.term_id, name from $wpdb->terms natural join $wpdb->term_taxonomy where $wpdb->term_taxonomy.taxonomy = 'category' order by name") as $cat) {
217
- echo "<input type='checkbox' name='discats[$cat->term_id]' value='true'". (array_search($cat->term_id,$discats) ? ' checked="checked"': '' )." /> <label>$cat->name</label> ";//for='discats[$cat->term_id]' it's not HTML. :(
218
- }?>
219
- </div></td></tr>
220
  <tr valign='top'>
221
  <th scope='row'><?php _e('Disallow by tag:','yarpp');?></th>
222
- <td><div style="overflow:auto;max-height:100px;">
223
- <?php
224
- $distags = explode(',',yarpp_get_option('distags'));
225
- array_unshift($distags,' ');
226
- foreach ($wpdb->get_results("select $wpdb->terms.term_id, name from $wpdb->terms natural join $wpdb->term_taxonomy where $wpdb->term_taxonomy.taxonomy = 'post_tag' order by name") as $tag) {
227
- echo "<input type='checkbox' name='distags[$tag->term_id]' value='true'". (array_search($tag->term_id,$distags) ? ' checked="checked"': '' )." /> <label>$tag->name</label> ";// for='distags[$tag->term_id]'
228
- }?>
229
- </div></td></tr>
230
- <?php checkbox('show_past_post',__("Show password protected posts?",'yarpp')); ?>
231
- <?php checkbox('past_only',__("Show only previous posts?",'yarpp')); ?>
 
 
 
232
  </tbody>
233
  </table>
 
234
 
235
  <!-- Relatedness -->
 
236
  <h3><?php _e('"Relatedness" options','yarpp');?></h3>
 
237
  <p><?php _e('YARPP is different than the <a href="http://wasabi.pbwiki.com/Related%20Entries">previous plugins it is based on</a> as it limits the related posts list by (1) a maximum number and (2) a <em>match threshold</em>.','yarpp');?> <a href="#" class='info'><?php _e('more&gt;','yarpp');?><span><?php _e('The higher the match threshold, the more restrictive, and you get less related posts overall. The default match threshold is 5. If you want to find an appropriate match threshhold, take a look at some post\'s related posts display and their scores. You can see what kinds of related posts are being picked up and with what kind of match scores, and determine an appropriate threshold for your site.','yarpp');?></span></a></p>
238
 
239
  <table class="form-table" style="margin-top: 0">
@@ -251,86 +322,123 @@ document.getElementsByTagName("body")[0].setAttribute('onload',"excerpt();rss_ex
251
  <?php checkbox('cross_relate',__("Cross-relate posts and pages?",'yarpp')." <a href='#' class='info'>".__('more&gt;','yarpp')."<span>".__("When the \"Cross-relate posts and pages\" option is selected, the <code>related_posts()</code>, <code>related_pages()</code>, and <code>related_entries()</code> all will give the same output, returning both related pages and posts.",'yarpp')."</span></a>"); ?>
252
  </tbody>
253
  </table>
 
254
 
255
  <script language="javascript">
256
  //<!--
 
 
 
 
 
 
 
 
 
 
257
  function excerpt() {
258
- display = 'none';
259
- if (document.getElementsByName('show_excerpt')[0].checked) {
260
- display = 'table-row';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
261
  }
262
- document.getElementsByName('excerpted')[0].style.display = display;
263
- document.getElementsByName('excerpted')[1].style.display = display;
264
  }
265
  function rss_excerpt() {
266
- display = 'none';
267
- if (document.getElementsByName('rss_display')[0].checked && document.getElementsByName('rss_show_excerpt')[0].checked) {
268
- display = 'table-row';
269
- }
270
- document.getElementsByName('rss_excerpted')[0].style.display = display;
271
- document.getElementsByName('rss_excerpted')[1].style.display = display;
272
  }
273
- function do_rss_display() {
274
- display = 'none';
275
- if (document.getElementsByName('rss_display')[0].checked) {
276
- rss_excerpt();
277
- display = 'table-row';
278
- }
279
- document.getElementsByName('rss_displayed')[0].style.display = display;
280
- document.getElementsByName('rss_displayed')[1].style.display = display;
281
- document.getElementsByName('rss_displayed')[2].style.display = display;
282
- document.getElementsByName('rss_displayed')[3].style.display = display;
283
- document.getElementsByName('rss_displayed')[4].style.display = display;
284
- document.getElementsByName('rss_displayed')[5].style.display = display;
285
- document.getElementsByName('rss_displayed')[6].style.display = display;
286
- document.getElementsByName('rss_displayed')[7].style.display = display;
 
 
 
 
 
 
 
 
287
  }
 
 
 
288
  //-->
289
  </script>
290
 
291
 
292
  <!-- Display options -->
 
293
  <h3><?php _e("Display options <small>for your website</small>",'yarpp');?></h3>
294
 
295
- <table class="form-table" style="margin-top: 0">
296
  <?php
297
- // construct the demo code based on current preferences
298
-
299
- $democode = stripslashes(yarpp_get_option('before_related',true))."
300
- ";
301
- for ($i=1;$i<=yarpp_get_option('limit');$i++) {
302
- $democode .= stripslashes(yarpp_get_option('before_title',true)).stripslashes(htmlspecialchars("<a href='".__("PERMALINK",'yarpp')."$i'>".__("RELATED TITLE",'yarpp')." $i</a>")).(yarpp_get_option('show_excerpt')?"\r\t".stripslashes(yarpp_get_option('before_post',true)).yarpp_excerpt(LOREMIPSUM,yarpp_get_option('excerpt_length')).stripslashes(yarpp_get_option('before_post',true)):'').stripslashes(yarpp_get_option('after_title',true))."
303
- ";
304
- }
305
- $democode .= stripslashes(yarpp_get_option('after_related',true));
306
- if (yarpp_get_option('promote_yarpp'))
307
- $democode .= htmlspecialchars("\n<p>".__("Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.",'yarpp')."</p>");
308
-
309
  checkbox('auto_display',__("Automatically display related posts?",'yarpp')." <a href='#' class='info'>".__('more&gt;','yarpp')."<span>".__("This option automatically displays related posts right after the content on single entry pages. If this option is off, you will need to manually insert <code>related_posts()</code> or variants (<code>related_pages()</code> and <code>related_entries()</code>) into your theme files.",'yarpp')."</span></a>","<tr valign='top'>
310
- <th class='th-full' colspan='2' scope='row'>",'','<td rowspan="10" style="border-left:8px white solid;"><b>'.__("Website display code example",'yarpp').'</b><br /><small>'.__("(Update options to reload.)",'yarpp').'</small><br/>'
311
- ."<code><pre style='overflow:auto;width:350px;'>".($democode)."</pre></code></td>"); ?>
 
312
  <?php textbox('limit',__('Maximum number of related posts:','yarpp'))?>
313
- <tr valign='top'>
 
 
 
 
 
 
 
 
 
 
 
314
  <th><?php _e("Before / after related entries:",'yarpp');?></th>
315
  <td><input name="before_related" type="text" id="before_related" value="<?php echo stripslashes(yarpp_get_option('before_related',true)); ?>" size="10" /> / <input name="after_related" type="text" id="after_related" value="<?php echo stripslashes(yarpp_get_option('after_related',true)); ?>" size="10" /><em><small> <?php _e("For example:",'yarpp');?> &lt;ol&gt;&lt;/ol&gt; or &lt;div&gt;&lt;/div&gt;</small></em>
316
  </td>
317
  </tr>
318
- <tr valign='top'>
319
  <th><?php _e("Before / after each related entry:",'yarpp');?></th>
320
  <td><input name="before_title" type="text" id="before_title" value="<?php echo stripslashes(yarpp_get_option('before_title',true)); ?>" size="10" /> / <input name="after_title" type="text" id="after_title" value="<?php echo stripslashes(yarpp_get_option('after_title',true)); ?>" size="10" /><em><small> <?php _e("For example:",'yarpp');?> &lt;li&gt;&lt;/li&gt; or &lt;dl&gt;&lt;/dl&gt;</small></em>
321
  </td>
322
  </tr>
323
- <?php checkbox('show_excerpt',__("Show excerpt?",'yarpp'),"<tr valign='top'><th colspan='2'>",' onclick="javascript:excerpt()"'); ?>
324
- <?php textbox('excerpt_length',__('Excerpt length (No. of words):','yarpp'),null,"<tr name='excerpted' valign='top' ".(yarpp_get_option('show_excerpt')?'':"style='display:none'").">
325
  <th>")?>
326
 
327
- <tr name="excerpted" valign='top' <?php echo (yarpp_get_option('show_excerpt')?'':"style='display:none'")?>>
328
  <th><?php _e("Before / after (Excerpt):",'yarpp');?></th>
329
  <td><input name="before_post" type="text" id="before_post" value="<?php echo stripslashes(yarpp_get_option('before_post',true)); ?>" size="10" /> / <input name="after_post" type="text" id="after_post" value="<?php echo stripslashes(yarpp_get_option('after_post')); ?>" size="10" /><em><small> <?php _e("For example:",'yarpp');?> &lt;li&gt;&lt;/li&gt; or &lt;dl&gt;&lt;/dl&gt;</small></em>
330
  </td>
331
  </tr>
332
 
333
- <tr name="excerpted" valign='top'>
334
  <th><?php _e("Order results:",'yarpp');?></th>
335
  <td><select name="order" id="order">
336
  <option value="score DESC" <?php echo (yarpp_get_option('order')=='score DESC'?' selected="selected"':'')?>><?php _e("score (high relevance to low)",'yarpp');?></option>
@@ -343,57 +451,58 @@ checkbox('auto_display',__("Automatically display related posts?",'yarpp')." <a
343
  </td>
344
  </tr>
345
 
346
- <?php textbox('no_results',__('Default display if no results:','yarpp'),'40')?>
 
347
  <?php checkbox('promote_yarpp',__("Help promote Yet Another Related Posts Plugin?",'yarpp')
348
  ." <a href='#' class='info'>".__('more&gt;','yarpp')."<span>"
349
- .sprintf(__("This option will add the code %s. Try turning it on, updating your options, and see the code in the code example to the right. These links and donations are greatly appreciated.",'yarpp'),"<code>".htmlspecialchars(__("Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.",'yarpp'))."</code>")
350
- ."</span></a>"); ?>
351
  </table>
 
352
 
353
  <!-- Display options for RSS -->
354
- <h3><?php _e("Display options <small>for RSS</small>",'yarpp');?> <span style='color:red;'>NEW!</span></h3>
 
355
 
356
- <table class="form-table" style="margin-top: 0">
357
  <?php
358
- // construct the demo code based on current preferences for RSS
359
 
360
- $democode = stripslashes(yarpp_get_option('rss_before_related',true))."
361
- ";
362
- for ($i=1;$i<=yarpp_get_option('rss_limit');$i++) {
363
- $democode .= stripslashes(yarpp_get_option('rss_before_title',true)).stripslashes(htmlspecialchars("<a href='".__("RELATED TITLE",'yarpp')."$i'>".__("RELATED TITLE",'yarpp')." $i</a>")).(yarpp_get_option('rss_show_excerpt')?"\r\t".stripslashes(yarpp_get_option('rss_before_post',true)).yarpp_excerpt(LOREMIPSUM,yarpp_get_option('rss_excerpt_length')).stripslashes(yarpp_get_option('rss_before_post',true)):'').stripslashes(yarpp_get_option('rss_after_title',true))."
364
- ";
365
- }
366
- $democode .= stripslashes(yarpp_get_option('rss_after_related',true));
367
- if (yarpp_get_option('rss_promote_yarpp'))
368
- $democode .= htmlspecialchars("\n<p>".__("Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.",'yarpp')."</p>");
369
-
370
- checkbox('rss_display',__("Display related posts in feeds?",'yarpp'),"<tr valign='top'><th colspan='3'>",' onclick="javascript:do_rss_display();"');
371
- checkbox('rss_excerpt_display',__("Display related posts in the descriptions?",'yarpp')." <a href='#' class='info'>".__('more&gt;','yarpp')."<span>".__("This option displays the related posts in the RSS description fields, not just the content. If your feeds are set up to only display excerpts, however, only the description field is used, so this option is required for any display at all.",'yarpp')."</span></a>","<tr name='rss_displayed' valign='top'>
372
- <th class='th-full' colspan='2' scope='row'>",'','<td rowspan="10" style="border-left:8px white solid;"><b>'.__("RSS display code example",'yarpp').'</b><br /><small>'.__("(Update options to reload.)",'yarpp').'</small><br/>'
373
- ."<code><pre style='overflow:auto;width:350px;'>".($democode)."</pre></code></td>"); ?>
374
- <?php textbox('rss_limit',__('Maximum number of related posts:','yarpp'),2,"<tr valign='top' name='rss_displayed'>
375
- <th scope='row'>")?>
376
- <tr name='rss_displayed' valign='top'>
377
  <th><?php _e("Before / after related entries display:",'yarpp');?></th>
378
  <td><input name="rss_before_related" type="text" id="rss_before_related" value="<?php echo stripslashes(yarpp_get_option('rss_before_related',true)); ?>" size="10" /> / <input name="rss_after_related" type="text" id="rss_after_related" value="<?php echo stripslashes(yarpp_get_option('rss_after_related',true)); ?>" size="10" /><em><small> <?php _e("For example:",'yarpp');?> &lt;ol&gt;&lt;/ol&gt; or &lt;div&gt;&lt;/div&gt;</small></em>
379
  </td>
380
  </tr>
381
- <tr name='rss_displayed' valign='top'>
382
  <th><?php _e("Before / after each related entry:",'yarpp');?></th>
383
  <td><input name="rss_before_title" type="text" id="rss_before_title" value="<?php echo stripslashes(yarpp_get_option('rss_before_title',true)); ?>" size="10" /> / <input name="rss_after_title" type="text" id="rss_after_title" value="<?php echo stripslashes(yarpp_get_option('rss_after_title',true)); ?>" size="10" /><em><small> <?php _e("For example:",'yarpp');?> &lt;li&gt;&lt;/li&gt; or &lt;dl&gt;&lt;/dl&gt;</small></em>
384
  </td>
385
  </tr>
386
- <?php checkbox('rss_show_excerpt',__("Show excerpt?",'yarpp'),"<tr name='rss_displayed' valign='top'><th colspan='2'>",' onclick="javascript:rss_excerpt()"'); ?>
387
- <?php textbox('rss_excerpt_length',__('Excerpt length (No. of words):','yarpp'),null,"<tr name='rss_excerpted' valign='top' ".(yarpp_get_option('rss_show_excerpt')?'':"style='display:none'").">
388
  <th>")?>
389
 
390
- <tr name="rss_excerpted" valign='top' <?php echo (yarpp_get_option('rss_show_excerpt')?'':"style='display:none'")?>>
391
  <th><?php _e("Before / after (excerpt):",'yarpp');?></th>
392
  <td><input name="rss_before_post" type="text" id="rss_before_post" value="<?php echo stripslashes(yarpp_get_option('rss_before_post',true)); ?>" size="10" /> / <input name="rss_after_post" type="text" id="rss_after_post" value="<?php echo stripslashes(yarpp_get_option('rss_after_post')); ?>" size="10" /><em><small> <?php _e("For example:",'yarpp');?> &lt;li&gt;&lt;/li&gt; or &lt;dl&gt;&lt;/dl&gt;</small></em>
393
  </td>
394
  </tr>
395
 
396
- <tr name='rss_displayed' valign='top'>
397
  <th><?php _e("Order results:",'yarpp');?></th>
398
  <td><select name="rss_order" id="rss_order">
399
  <option value="score DESC" <?php echo (yarpp_get_option('rss_order')=='score DESC'?' selected="selected"':'')?>><?php _e("score (high relevance to low)",'yarpp');?></option>
@@ -406,14 +515,92 @@ checkbox('rss_excerpt_display',__("Display related posts in the descriptions?",'
406
  </td>
407
  </tr>
408
 
409
- <?php textbox('rss_no_results',__('Default display if no results:','yarpp'),'40',"<tr valign='top' name='rss_displayed'>
410
  <th scope='row'>")?>
411
  <?php checkbox('rss_promote_yarpp',__("Help promote Yet Another Related Posts Plugin?",'yarpp')." <a href='#' class='info'>".__('more&gt;','yarpp')."<span>"
412
- .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."),"<code>".htmlspecialchars(__("Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.",'yarpp'))."</code>")
413
- ."</span></a>","<tr valign='top' name='rss_displayed'>
414
  <th class='th-full' colspan='2' scope='row'>"); ?>
415
  </table>
 
416
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
417
  <div>
418
  <p class="submit">
419
  <input type="submit" name="update_yarpp" value="<?php _e("Update options",'yarpp')?>" />
2
 
3
  global $wpdb, $yarpp_value_options, $yarpp_binary_options, $wp_version;
4
 
5
+ // check to see that templates are in the right place
6
+
7
+ if (!count(glob(TEMPLATEPATH . '/yarpp-template-*.php'))) {
8
+ if (count(glob(WP_CONTENT_DIR.'/plugins/yet-another-related-posts-plugin/yarpp-templates/yarpp-template-*.php')))
9
+ echo "<div class='updated'>"
10
+ .str_replace("TEMPLATEPATH",TEMPLATEPATH,__("Please move the YARPP template files into your theme to complete installation. Simply move the sample template files (currently in <code>wp-content/plugins/yet-another-related-posts-plugin/yarpp-templates/</code>) to the <code>TEMPLATEPATH</code> directory.",'yarpp'))
11
+ ."</div>";
12
+
13
+ else
14
+ echo "<div class='updated'>"
15
+ .str_replace('TEMPLATEPATH',TEMPLATEPATH,__("No YARPP template files were found in your theme (<code>TEMPLATEPATH</code>) so the templating feature has been turned off.",'yarpp'))
16
+ ."</div>";
17
+
18
+ yarpp_set_option('use_template',false);
19
+ yarpp_set_option('rss_use_template',false);
20
+
21
+ }
22
+
23
  if ($_POST['myisam_override']) {
24
  yarpp_set_option('myisam_override',1);
25
  echo "<div class='updated'>"
26
+ .__("The MyISAM check has been overridden. You may now use the \"consider titles\" and \"consider bodies\" relatedness criteria.",'yarpp')
27
  ."</div>";
28
  }
29
 
38
  ."<br />"
39
  .sprintf(__("If, despite this check, you are sure that <code>%s</code> is using the MyISAM engine, press this magic button:",'yarpp'),$wpdb->posts)
40
  ."<br />"
41
+ ."<form method='post'><input type='submit' class='button' name='myisam_override' value='"
42
  .__("Trust me. Let me use MyISAM features.",'yarpp')
43
  ."'></input></form>"
44
  ."</div>";
60
 
61
  if ($yarpp_myisam) {
62
  if (!yarpp_enabled()) {
63
+ echo '<div class="updated"><p>';
64
  if (yarpp_activate())
65
  _e('The YARPP database had an error but has been fixed.','yarpp');
66
  else
67
  _e('The YARPP database has an error which could not be fixed.','yarpp');
68
+ echo '</div></p>';
69
  }
70
  }
71
 
72
  yarpp_reinforce(); // just in case, set default options, etc.
73
 
74
+ // check if the cache is complete or not.
75
+ $cache_complete = $wpdb->get_var("select (count(p.ID)-sum(c.ID IS NULL))/count(p.ID)
76
+ FROM $wpdb->posts as p
77
+ LEFT JOIN {$wpdb->prefix}yarpp_related_cache as c ON ( p.ID = c.reference_ID )
78
+ WHERE p.post_status = 'publish' ");
79
+
80
+ if ($cache_complete > 0 and $cache_complete < 1)
81
+ echo '<div class="updated fade" style="background-color: rgb(207, 235, 247);"><p>'.str_replace('<A>','<a class="thickbox" title="'.__('Related posts cache status','yarpp').'" href="#TB_inline?height=100&width=300&inlineId=yarpp-cache-status">',__('Your related posts cache is incomplete. Please build your cache from the <A>related posts status pane</a>.','yarpp')).'</p></div>';
82
+
83
+ if ($cache_complete == 0)
84
+ echo '<div class="updated fade" style="background-color: rgb(207, 235, 247);"><p>'.str_replace('<A>','<a class="thickbox" title="'.__('Related posts cache status','yarpp').'" href="#TB_inline?height=100&width=300&inlineId=yarpp-cache-status">',__('Your related posts cache is empty. Please build your cache from the <A>related posts status pane</a>.','yarpp')).'</p></div>';
85
+
86
  //compute $tagmap
87
  $tagmap = array();
88
  foreach ($wpdb->get_results("select $wpdb->terms.term_id, name from $wpdb->terms natural join $wpdb->term_taxonomy where $wpdb->term_taxonomy.taxonomy = 'category'") as $tag) {
122
  foreach (array_keys($yarpp_binary_options) as $option) {
123
  (isset($_POST[$option])) ? yarpp_set_option($option,true) : yarpp_set_option($option,false);
124
  }
125
+ echo '<div class="updated fade" style="background-color: rgb(207, 235, 247);"><p>'.__('Options saved!','yarpp')
126
+ .' '.str_replace('<A>','<a class="thickbox" title="'.__('Related posts cache status','yarpp').'" href="#TB_inline?height=100&width=300&inlineId=yarpp-cache-status">',
127
+ __('If you updated the "pool" options or "relatedness" options displayed, please rebuild your cache now from the <A>related posts status pane</a>.','yarpp')).'</p></div>';
128
  }
129
 
130
  function checkbox($option,$desc,$tr="<tr valign='top'>
131
  <th class='th-full' colspan='2' scope='row'>",$inputplus = '',$thplus='') {
132
+ echo " $tr<input $inputplus type='checkbox' name='$option' value='true'". ((yarpp_get_option($option) == 1) ? ' checked="checked"': '' )." /> $desc</th>$thplus
133
  </tr>";
134
  }
135
  function textbox($option,$desc,$size=2,$tr="<tr valign='top'>
206
  css.setAttribute("type", "text/css");
207
  css.setAttribute("href", "../wp-content/plugins/yet-another-related-posts-plugin/options.css");
208
  document.getElementsByTagName("head")[0].appendChild(css);
209
+
210
+ function load_display_demo_web() {
211
+ jQuery.ajax({type:'POST',
212
+ url:'admin-ajax.php',
213
+ data:'action=yarpp_display_demo_web',
214
+ beforeSend:function(){jQuery('#display_demo_web').eq(0).html('<img src="../wp-content/plugins/yet-another-related-posts-plugin/i/spin.gif" alt="loading..."/>')},
215
+ success:function(html){jQuery('#display_demo_web').eq(0).html('<pre>'+html+'</pre>')},
216
+ dataType:'html'}
217
+ )
218
+ }
219
+
220
+ function load_display_demo_rss() {
221
+ jQuery.ajax({type:'POST',
222
+ url:'admin-ajax.php',
223
+ data:'action=yarpp_display_demo_rss',
224
+ beforeSend:function(){jQuery('#display_demo_rss').eq(0).html('<img src="../wp-content/plugins/yet-another-related-posts-plugin/i/spin.gif" alt="loading..."/>')},
225
+ success:function(html){jQuery('#display_demo_rss').eq(0).html('<pre>'+html+'</pre>')},
226
+ dataType:'html'}
227
+ )
228
+ }
229
+
230
+ function load_display_distags() {
231
+ jQuery.ajax({type:'POST',
232
+ url:'admin-ajax.php',
233
+ data:'action=yarpp_display_distags',
234
+ beforeSend:function(){jQuery('#display_distags').eq(0).html('<img src="../wp-content/plugins/yet-another-related-posts-plugin/i/spin.gif" alt="loading..."/>')},
235
+ success:function(html){jQuery('#display_distags').eq(0).html(html)},
236
+ dataType:'html'}
237
+ )
238
+ }
239
+
240
+ function load_display_discats() {
241
+ jQuery.ajax({type:'POST',
242
+ url:'admin-ajax.php',
243
+ data:'action=yarpp_display_discats',
244
+ beforeSend:function(){jQuery('#display_discats').eq(0).html('<img src="../wp-content/plugins/yet-another-related-posts-plugin/i/spin.gif" alt="loading..."/>')},
245
+ success:function(html){jQuery('#display_discats').eq(0).html(html)},
246
+ dataType:'html'}
247
+ )
248
+ }
249
  //-->
250
  </script>
251
 
252
  <div class="wrap">
253
  <h2>
 
 
 
254
  <?php _e('Yet Another Related Posts Plugin Options','yarpp');?> <small><?php
255
 
256
  $display_version = yarpp_get_option('version');
264
  ?></small>
265
  </h2>
266
 
267
+ <?php echo "<div id='yarpp-version' style='display:none;'>".yarpp_get_option('version')."</div>"; ?>
268
+
269
  <form method="post">
270
 
271
+ <a href='https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=66G4DATK4999L&item_name=mitcho%2ecom%2fcode%3a%20donate%20to%20Michael%20Yoshitaka%20Erlewine&no_shipping=1&no_note=1&tax=0&currency_code=USD&lc=US&charset=UTF%2d8' target='_new'><img src="https://www.paypal.com/<?php echo paypal_directory(); ?>i/btn/btn_donate_SM.gif" name="submit" alt="<?php _e('Donate to mitcho (Michael Yoshitaka Erlewine) for this plugin via PayPal');?>" title="<?php _e('Donate to mitcho (Michael Yoshitaka Erlewine) for this plugin via PayPal','yarpp');?>" style="float:right" /></a>
272
 
273
+ <p><small><?php _e('by <a href="http://mitcho.com/code/">mitcho (Michael 芳貴 Erlewine)</a>','yarpp');?>. <?php _e('Follow <a href="http://twitter.com/yarpp/">Yet Another Related Posts Plugin on Twitter</a>','yarpp');?>.</small></p>
274
 
275
 
276
  <!--The Pool-->
277
+ <div style='border:1px solid #ddd;padding:8px;'>
278
  <h3><?php _e('"The Pool"','yarpp');?></h3>
279
  <p><?php _e('"The Pool" refers to the pool of posts and pages that are candidates for display as related to the current entry.','yarpp');?></p>
280
 
281
  <table class="form-table" style="margin-top: 0">
282
  <tbody>
283
  <tr valign='top'>
284
+ <th scope='row'><?php _e('Disallow by category:','yarpp');?></th><td><div id='display_discats' style="overflow:auto;max-height:100px;"></div></td></tr>
 
 
 
 
 
 
 
285
  <tr valign='top'>
286
  <th scope='row'><?php _e('Disallow by tag:','yarpp');?></th>
287
+ <td><div id='display_distags' style="overflow:auto;max-height:100px;"></div></td></tr>
288
+ <?php checkbox('show_pass_post',__("Show password protected posts?",'yarpp')); ?>
289
+ <?php /*checkbox('past_only',__("Show only previous posts?",'yarpp')); */ ?>
290
+ <?php
291
+
292
+ $recent_number = "<input name=\"recent_number\" type=\"text\" id=\"recent_number\" value=\"".stripslashes(yarpp_get_option('recent_number',true))."\" size=\"2\" />";
293
+ $recent_units = "<select name=\"recent_units\" id=\"recent_units\">
294
+ <option value='day'". (('day'==yarpp_get_option('recent_units'))?" selected='selected'":'').">".__('day(s)','yarpp')."</option>
295
+ <option value='week'". (('week'==yarpp_get_option('recent_units'))?" selected='selected'":'').">".__('week(s)','yarpp')."</option>
296
+ <option value='month'". (('month'==yarpp_get_option('recent_units'))?" selected='selected'":'').">".__('month(s)','yarpp')."</option>
297
+ </select>";
298
+ checkbox('recent_only',str_replace('NUMBER',$recent_number,str_replace('UNITS',$recent_units,__("Show only posts from the past NUMBER UNITS",'yarpp')))); ?>
299
+
300
  </tbody>
301
  </table>
302
+ </div>
303
 
304
  <!-- Relatedness -->
305
+ <div style='border:1px solid #ddd;padding:8px;'>
306
  <h3><?php _e('"Relatedness" options','yarpp');?></h3>
307
+
308
  <p><?php _e('YARPP is different than the <a href="http://wasabi.pbwiki.com/Related%20Entries">previous plugins it is based on</a> as it limits the related posts list by (1) a maximum number and (2) a <em>match threshold</em>.','yarpp');?> <a href="#" class='info'><?php _e('more&gt;','yarpp');?><span><?php _e('The higher the match threshold, the more restrictive, and you get less related posts overall. The default match threshold is 5. If you want to find an appropriate match threshhold, take a look at some post\'s related posts display and their scores. You can see what kinds of related posts are being picked up and with what kind of match scores, and determine an appropriate threshold for your site.','yarpp');?></span></a></p>
309
 
310
  <table class="form-table" style="margin-top: 0">
322
  <?php checkbox('cross_relate',__("Cross-relate posts and pages?",'yarpp')." <a href='#' class='info'>".__('more&gt;','yarpp')."<span>".__("When the \"Cross-relate posts and pages\" option is selected, the <code>related_posts()</code>, <code>related_pages()</code>, and <code>related_entries()</code> all will give the same output, returning both related pages and posts.",'yarpp')."</span></a>"); ?>
323
  </tbody>
324
  </table>
325
+ </div>
326
 
327
  <script language="javascript">
328
  //<!--
329
+ function template() {
330
+ if (jQuery('.template').eq(0).attr('checked')) {
331
+ jQuery('.templated').show();
332
+ jQuery('.not_templated').hide();
333
+ } else {
334
+ jQuery('.templated').hide();
335
+ jQuery('.not_templated').show();
336
+ }
337
+ excerpt();
338
+ }
339
  function excerpt() {
340
+ if (!jQuery('.template').eq(0).attr('checked') && jQuery('.show_excerpt').eq(0).attr('checked'))
341
+ jQuery('.excerpted').show();
342
+ else
343
+ jQuery('.excerpted').hide();
344
+ }
345
+
346
+ function rss_display() {
347
+ if (jQuery('.rss_display').eq(0).attr('checked'))
348
+ jQuery('.rss_displayed').show();
349
+ else
350
+ jQuery('.rss_displayed').hide();
351
+ rss_excerpt();
352
+ }
353
+ function rss_template() {
354
+ if (jQuery('.rss_template').eq(0).attr('checked')) {
355
+ jQuery('.rss_templated').show();
356
+ jQuery('.rss_not_templated').hide();
357
+ } else {
358
+ jQuery('.rss_templated').hide();
359
+ jQuery('.rss_not_templated').show();
360
  }
361
+ rss_excerpt();
 
362
  }
363
  function rss_excerpt() {
364
+ if (jQuery('.rss_display').eq(0).attr('checked') && jQuery('.rss_show_excerpt').eq(0).attr('checked'))
365
+ jQuery('.rss_excerpted').show();
366
+ else
367
+ jQuery('.rss_excerpted').hide();
 
 
368
  }
369
+
370
+ function yarpp_js_init() {
371
+ template();
372
+ rss_template();
373
+ load_display_discats();
374
+ load_display_distags();
375
+ load_display_demo_web();
376
+ load_display_demo_rss();
377
+ jQuery('#build-cache-button').click(function() {
378
+ jQuery('#yarpp-cache-message').hide();
379
+ jQuery('#build-cache-button').hide();
380
+ jQuery('#build-display').css('display','block');
381
+ yarppBuildRequest();
382
+ });
383
+
384
+ version = jQuery('#yarpp-version').html();
385
+ jQuery.post('http://mitcho.com/code/yarpp/checkversion.php',{version:version},function(json){
386
+ if (json.result == 'newbeta')
387
+ jQuery('#yarpp-version').addClass('updated').html(<?php echo "'<p>".str_replace('VERSION',"'+json.beta.version+'",str_replace('<A>',"<a href=\"'+json.beta.url+'\">",__("There is a new beta (VERSION) of Yet Another Related Posts Plugin. You can <A>download it here</a> at your own risk.","yarpp")))."</p>'"?>).show();
388
+ if (json.result == 'new')
389
+ jQuery('#yarpp-version').addClass('updated').html(<?php echo "'<p>".str_replace('VERSION',"'+json.current.version+'",str_replace('<A>',"<a href=\"'+json.current.url+'\">",__("There is a new version (VERSION) of Yet Another Related Posts Plugin available! You can <A>download it here</a>.","yarpp")))."</p>'"?>).show();
390
+ },'json');
391
  }
392
+
393
+ jQuery(document).ready(yarpp_js_init);
394
+
395
  //-->
396
  </script>
397
 
398
 
399
  <!-- Display options -->
400
+ <div style='border:1px solid #ddd;padding:8px;'>
401
  <h3><?php _e("Display options <small>for your website</small>",'yarpp');?></h3>
402
 
403
+ <table class="form-table" style="margin-top: 0;width:100%">
404
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
405
  checkbox('auto_display',__("Automatically display related posts?",'yarpp')." <a href='#' class='info'>".__('more&gt;','yarpp')."<span>".__("This option automatically displays related posts right after the content on single entry pages. If this option is off, you will need to manually insert <code>related_posts()</code> or variants (<code>related_pages()</code> and <code>related_entries()</code>) into your theme files.",'yarpp')."</span></a>","<tr valign='top'>
406
+ <th class='th-full' colspan='2' scope='row'>",'','<td rowspan="11" style="border-left:8px transparent solid;"><b>'.__("Website display code example",'yarpp').'</b><br /><small>'.__("(Update options to reload.)",'yarpp').'</small><br/>'
407
+ ."<div id='display_demo_web' style='overflow:auto;width:350px;max-height:500px;'></div></td>");?>
408
+
409
  <?php textbox('limit',__('Maximum number of related posts:','yarpp'))?>
410
+ <?php checkbox('use_template',__("Display using a custom template file",'yarpp')." <span style='color:red;'>".__('NEW!','yarpp')."</span> <a href='#' class='info'>".__('more&gt;','yarpp')."<span>".__("This advanced option gives you full power to customize how your related posts are displayed. Templates (stored in your theme folder) are written in PHP.",'yarpp')."</span></a>","<tr valign='top'><th colspan='2'>",' class="template" onclick="javascript:template()"'); ?>
411
+ <tr valign='top' class='templated'>
412
+ <th><?php _e("Template file:",'yarpp');?></th>
413
+ <td>
414
+ <select name="template_file" id="template_file">
415
+ <?php foreach (glob(TEMPLATEPATH . '/yarpp-template-*.php') as $template): ?>
416
+ <option value='<?php echo htmlspecialchars(basename($template))?>'<?php echo (basename($template)==yarpp_get_option('template_file'))?" selected='selected'":'';?>><?php echo htmlspecialchars(basename($template))?></option>
417
+ <?php endforeach; ?>
418
+ </select>
419
+ </td>
420
+ </tr>
421
+ <tr valign='top' class='not_templated'>
422
  <th><?php _e("Before / after related entries:",'yarpp');?></th>
423
  <td><input name="before_related" type="text" id="before_related" value="<?php echo stripslashes(yarpp_get_option('before_related',true)); ?>" size="10" /> / <input name="after_related" type="text" id="after_related" value="<?php echo stripslashes(yarpp_get_option('after_related',true)); ?>" size="10" /><em><small> <?php _e("For example:",'yarpp');?> &lt;ol&gt;&lt;/ol&gt; or &lt;div&gt;&lt;/div&gt;</small></em>
424
  </td>
425
  </tr>
426
+ <tr valign='top' class='not_templated'>
427
  <th><?php _e("Before / after each related entry:",'yarpp');?></th>
428
  <td><input name="before_title" type="text" id="before_title" value="<?php echo stripslashes(yarpp_get_option('before_title',true)); ?>" size="10" /> / <input name="after_title" type="text" id="after_title" value="<?php echo stripslashes(yarpp_get_option('after_title',true)); ?>" size="10" /><em><small> <?php _e("For example:",'yarpp');?> &lt;li&gt;&lt;/li&gt; or &lt;dl&gt;&lt;/dl&gt;</small></em>
429
  </td>
430
  </tr>
431
+ <?php checkbox('show_excerpt',__("Show excerpt?",'yarpp'),"<tr class='not_templated' valign='top'><th colspan='2'>",' class="show_excerpt" onclick="javascript:excerpt()"'); ?>
432
+ <?php textbox('excerpt_length',__('Excerpt length (No. of words):','yarpp'),null,"<tr class='excerpted' valign='top'>
433
  <th>")?>
434
 
435
+ <tr class="excerpted" valign='top'>
436
  <th><?php _e("Before / after (Excerpt):",'yarpp');?></th>
437
  <td><input name="before_post" type="text" id="before_post" value="<?php echo stripslashes(yarpp_get_option('before_post',true)); ?>" size="10" /> / <input name="after_post" type="text" id="after_post" value="<?php echo stripslashes(yarpp_get_option('after_post')); ?>" size="10" /><em><small> <?php _e("For example:",'yarpp');?> &lt;li&gt;&lt;/li&gt; or &lt;dl&gt;&lt;/dl&gt;</small></em>
438
  </td>
439
  </tr>
440
 
441
+ <tr valign='top'>
442
  <th><?php _e("Order results:",'yarpp');?></th>
443
  <td><select name="order" id="order">
444
  <option value="score DESC" <?php echo (yarpp_get_option('order')=='score DESC'?' selected="selected"':'')?>><?php _e("score (high relevance to low)",'yarpp');?></option>
451
  </td>
452
  </tr>
453
 
454
+ <?php textbox('no_results',__('Default display if no results:','yarpp'),'40',"<tr class='not_templated' valign='top'>
455
+ <th>")?>
456
  <?php checkbox('promote_yarpp',__("Help promote Yet Another Related Posts Plugin?",'yarpp')
457
  ." <a href='#' class='info'>".__('more&gt;','yarpp')."<span>"
458
+ .sprintf(__("This option will add the code %s. Try turning it on, updating your options, and see the code in the code example to the right. These links and donations are greatly appreciated.", 'yarpp'),"<code>".htmlspecialchars(__("Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.",'yarpp'))."</code>") ."</span></a>"); ?>
 
459
  </table>
460
+ </div>
461
 
462
  <!-- Display options for RSS -->
463
+ <div style='border:1px solid #ddd;padding:8px;'>
464
+ <h3><?php _e("Display options <small>for RSS</small>",'yarpp');?></h3>
465
 
466
+ <table class="form-table" style="margin-top: 0;width:100%">
467
  <?php
 
468
 
469
+ checkbox('rss_display',__("Display related posts in feeds?",'yarpp')." <a href='#' class='info'>".__('more&gt;','yarpp')."<span>".__("This option displays related posts at the end of each item in your RSS and Atom feeds. No template changes are needed.",'yarpp')."</span></a>","<tr valign='top'><th colspan='3'>",' class="rss_display" onclick="javascript:rss_display();"');
470
+ checkbox('rss_excerpt_display',__("Display related posts in the descriptions?",'yarpp')." <a href='#' class='info'>".__('more&gt;','yarpp')."<span>".__("This option displays the related posts in the RSS description fields, not just the content. If your feeds are set up to only display excerpts, however, only the description field is used, so this option is required for any display at all.",'yarpp')."</span></a>","<tr class='rss_displayed' valign='top'>
471
+ <th class='th-full' colspan='2' scope='row'>",'','<td rowspan="9" style="border-left:8px transparent solid;"><b>'.__("RSS display code example",'yarpp').'</b><br /><small>'.__("(Update options to reload.)",'yarpp').'</small><br/>'
472
+ ."<div id='display_demo_rss' style='overflow:auto;width:350px;max-height:500px;'></div></td>"); ?>
473
+ <?php textbox('rss_limit',__('Maximum number of related posts:','yarpp'),2)?>
474
+ <?php checkbox('rss_use_template',__("Display using a custom template file",'yarpp')." <span style='color:red;'>".__('NEW!','yarpp')."</span> <a href='#' class='info'>".__('more&gt;','yarpp')."<span>".__("This advanced option gives you full power to customize how your related posts are displayed. Templates (stored in your theme folder) are written in PHP.",'yarpp')."</span></a>","<tr valign='top'><th colspan='2'>",' class="rss_template" onclick="javascript:rss_template()"'); ?>
475
+ <tr valign='top' class='rss_templated'>
476
+ <th><?php _e("Template file:",'yarpp');?></th>
477
+ <td>
478
+ <select name="rss_template_file" id="rss_template_file">
479
+ <?php foreach (glob(TEMPLATEPATH . '/yarpp-template-*.php') as $template): ?>
480
+ <option value='<?php echo htmlspecialchars(basename($template))?>'<?php echo (basename($template)==yarpp_get_option('rss_template_file'))?" selected='selected'":'';?>><?php echo htmlspecialchars(basename($template))?></option>
481
+ <?php endforeach; ?>
482
+ </select>
483
+ </td>
484
+ </tr>
485
+ <tr class='rss_not_templated' valign='top'>
486
  <th><?php _e("Before / after related entries display:",'yarpp');?></th>
487
  <td><input name="rss_before_related" type="text" id="rss_before_related" value="<?php echo stripslashes(yarpp_get_option('rss_before_related',true)); ?>" size="10" /> / <input name="rss_after_related" type="text" id="rss_after_related" value="<?php echo stripslashes(yarpp_get_option('rss_after_related',true)); ?>" size="10" /><em><small> <?php _e("For example:",'yarpp');?> &lt;ol&gt;&lt;/ol&gt; or &lt;div&gt;&lt;/div&gt;</small></em>
488
  </td>
489
  </tr>
490
+ <tr class='rss_not_templated' valign='top'>
491
  <th><?php _e("Before / after each related entry:",'yarpp');?></th>
492
  <td><input name="rss_before_title" type="text" id="rss_before_title" value="<?php echo stripslashes(yarpp_get_option('rss_before_title',true)); ?>" size="10" /> / <input name="rss_after_title" type="text" id="rss_after_title" value="<?php echo stripslashes(yarpp_get_option('rss_after_title',true)); ?>" size="10" /><em><small> <?php _e("For example:",'yarpp');?> &lt;li&gt;&lt;/li&gt; or &lt;dl&gt;&lt;/dl&gt;</small></em>
493
  </td>
494
  </tr>
495
+ <?php checkbox('rss_show_excerpt',__("Show excerpt?",'yarpp'),"<tr class='rss_not_templated' valign='top'><th colspan='2'>",' class="rss_show_excerpt" onclick="javascript:rss_excerpt()"'); ?>
496
+ <?php textbox('rss_excerpt_length',__('Excerpt length (No. of words):','yarpp'),null,"<tr class='rss_excerpted' valign='top'>
497
  <th>")?>
498
 
499
+ <tr class="rss_excerpted" valign='top'>
500
  <th><?php _e("Before / after (excerpt):",'yarpp');?></th>
501
  <td><input name="rss_before_post" type="text" id="rss_before_post" value="<?php echo stripslashes(yarpp_get_option('rss_before_post',true)); ?>" size="10" /> / <input name="rss_after_post" type="text" id="rss_after_post" value="<?php echo stripslashes(yarpp_get_option('rss_after_post')); ?>" size="10" /><em><small> <?php _e("For example:",'yarpp');?> &lt;li&gt;&lt;/li&gt; or &lt;dl&gt;&lt;/dl&gt;</small></em>
502
  </td>
503
  </tr>
504
 
505
+ <tr class='rss_displayed' valign='top'>
506
  <th><?php _e("Order results:",'yarpp');?></th>
507
  <td><select name="rss_order" id="rss_order">
508
  <option value="score DESC" <?php echo (yarpp_get_option('rss_order')=='score DESC'?' selected="selected"':'')?>><?php _e("score (high relevance to low)",'yarpp');?></option>
515
  </td>
516
  </tr>
517
 
518
+ <?php textbox('rss_no_results',__('Default display if no results:','yarpp'),'40',"<tr valign='top' class='rss_not_templated'>
519
  <th scope='row'>")?>
520
  <?php checkbox('rss_promote_yarpp',__("Help promote Yet Another Related Posts Plugin?",'yarpp')." <a href='#' class='info'>".__('more&gt;','yarpp')."<span>"
521
+ .sprintf(__("This option will add the code %s. Try turning it on, updating your options, and see the code in the code example to the right. These links and donations are greatly appreciated.", 'yarpp'),"<code>".htmlspecialchars(__("Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.",'yarpp'))."</code>") ."</span></a>","<tr valign='top' class='rss_displayed'>
 
522
  <th class='th-full' colspan='2' scope='row'>"); ?>
523
  </table>
524
+ </div>
525
 
526
+ <div style='border:1px solid #ddd;padding:8px;'>
527
+ <h3><?php _e('Advanced','yarpp');?> <span style='color:red;'><?php _e('NEW!','yarpp')?></span></h3>
528
+
529
+ <table class="form-table" style="margin-top: 0">
530
+ <tr valign='top' colspan='2'><td><input class="thickbox button" type="button" value="<?php _e("Show cache status",'yarpp');?>" title="<?php _e('Related posts cache status','yarpp');?>" alt="#TB_inline?height=100&width=300&inlineId=yarpp-cache-status"/>
531
+ <?php checkbox('ad_hoc_caching',__("When the cache is incomplete, compute related posts on the fly?",'yarpp')." <a href='#' class='info'>".__('more&gt;','yarpp')."<span>"
532
+ .__("If a displayed post's related posts are not cached and this option is on, YARPP will compute them on the fly. Do not turn this option on if you have a high-traffic site.<br />If this option is off and a post's related posts have not been cached, it will display as if it has no related posts.",'yarpp')
533
+ ."</span></a>"); ?>
534
+ </table>
535
+ </div>
536
+
537
+ <script type='text/javascript'>
538
+ //<!--
539
+ time=0;i=0;m=0;id=0;
540
+ timeout = 10000;
541
+ function yarppBuildRequest() {
542
+ jQuery.ajax({
543
+ url:'admin-ajax.php',
544
+ type: 'post',
545
+ data: {action:'yarpp_build_cache_action',i:i,m:m,id:id},
546
+ dataType: 'json',
547
+ timeout: timeout,
548
+ success: function (json) {
549
+ if (json.result == 'success') {
550
+ i = json.i;
551
+ m = json.m;
552
+ id = json.id;
553
+ time = time + parseFloat(json.time);
554
+ var remaining = Math.floor((m-i)*(time/i));
555
+ var min = Math.floor(remaining/60);
556
+ var sec = Math.floor(remaining - 60*min);
557
+ if (i < m) {
558
+ jQuery('#yarpp-bar').css('width',json.percent+'%');
559
+ jQuery('#yarpp-percentage').html(json.percent+'%');
560
+ jQuery('#yarpp-latest').html(json.title);
561
+ if (min > 0) {
562
+ jQuery('#yarpp-time').html(<?php echo str_replace('SEC',"'+sec+'",str_replace('MIN',"'+min+'",__("'MIN minute(s) and SEC second(s) remaining'",'yarpp')));?>);
563
+ } else {
564
+ jQuery('#yarpp-time').html(<?php echo str_replace('SEC',"'+sec+'",__("'SEC second(s) remaining'",'yarpp'));?>);
565
+ }
566
+ yarppBuildRequest();
567
+ } else {
568
+ jQuery('#build-display').html('<p><?php _e("Your related posts cache is now complete.",'yarpp');?><br/><small><?php echo str_replace('SEC',"'+(Math.floor(time*10)/10)+'",__('The SQL queries took SEC seconds.','yarpp'));?></small></p>');
569
+ }
570
+ return;
571
+ } else if (json.result == 'error') {
572
+ i = json.i;
573
+ m = json.m;
574
+ id = json.id;
575
+ jQuery('#yarpp-latest').html('<?php echo str_replace('TITLE',"'+json.title+'",__('There was an error while constructing the related posts for TITLE','yarpp'))?>');
576
+ } else {
577
+ jQuery('#yarpp-latest').html('<?php _e('Constructing the related posts timed out.','yarpp')?>');
578
+ }
579
+ timeout += 5000;
580
+ jQuery('#build-cache-button').show().val('<?php _e("Try to continue...",'yarpp');?>');
581
+ },
582
+ error: function(json) {
583
+ jQuery('#yarpp-latest').html('<?php _e('Constructing the related posts timed out.','yarpp')?>');
584
+ timeout += 5000;
585
+ jQuery('#build-cache-button').show().val('<?php _e("Try to continue...",'yarpp');?>');
586
+ }
587
+ });
588
+ return false;
589
+ }
590
+ //-->
591
+ </script>
592
+
593
+ <div id='yarpp-cache-status' style='display:none;'><p id='yarpp-cache-message'><?php echo str_replace('PERCENT',floor($cache_complete * 1000)/10,__("Your related posts cache is PERCENT% complete.",'yarpp'));?></p>
594
+ <center><input type='button' class='button' id='build-cache-button' value='build the cache now'/></center>
595
+ <div id='build-display' style='display:none;margin-top:15px;'>
596
+ <div class="progress-container" style='border: 1px solid #ccc; width: 200px; margin: 2px 5px 2px 0; padding: 1px; float: left; background: white;'>
597
+ <div id='yarpp-bar' style="width: 0%; height: 12px; background-color: #21759B;">&nbsp;</div>
598
+ </div><div id='yarpp-percentage'>0%</div>
599
+ <p style='font-size: .8em' id='yarpp-latest'><?php _e('starting...','yarpp');?></p>
600
+ <p style='font-size: .8em' id='yarpp-time'></p>
601
+ </div>
602
+ </div>
603
+
604
  <div>
605
  <p class="submit">
606
  <input type="submit" name="update_yarpp" value="<?php _e("Update options",'yarpp')?>" />
readme.txt CHANGED
@@ -6,99 +6,65 @@ Plugin URI: http://mitcho.com/code/yarpp/
6
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=66G4DATK4999L&item_name=mitcho%2ecom%2fcode%3a%20donate%20to%20Michael%20Yoshitaka%20Erlewine&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&charset=UTF%2d8
7
  Tags: related, posts, post, pages, page, RSS, feed, feeds
8
  Requires at least: 2.3
9
- Tested up to: 2.7.1
10
- Stable tag: 2.1.6
11
 
12
- Returns a list of the related entries based on a unique algorithm using titles, post bodies, tags, and categories. Now with RSS feed support!
13
 
14
  == Description ==
15
 
16
  Yet Another Related Posts Plugin (YARPP) gives you a list of posts and/or pages related to the current entry, introducing the reader to other relevant content on your site. Key features include:
17
 
18
- 1. *Limiting by a threshold*: Peter Bowyer did the great work of making the algorithm use MySQL's [fulltext search](http://dev.mysql.com/doc/en/Fulltext_Search.html) score to identify related posts. But it just displayed, for example, the top 5 most "relevant" entries, even if some of them weren't at all relevant. Now you can set a threshold limit for relevance, and you get more related posts if there are more related posts and less if there are less. Ha!
19
- 2. *Using tags and categories*: **New in 2.0!** The new 2.0 algorithm uses tags and categories. The new options screen puts you in control of how these factors should be used.
20
- 3. *Related posts in RSS feeds*: **New in 2.1!** Display related posts in your RSS and Atom feeds with custom display options.
21
- 4. *Disallowing certain tags or categories*: **New in 2.0!** You can choose certain tags or categories as disallowed, meaning any page or post with such tags or categories will not be served up by the plugin.
22
- 5. *Related posts and pages*: **New in 1.1!** Puts you in control of pulling up related posts, pages, or both.
23
- 6. *Simple installation*: **New in 1.5!** Automatically displays related posts after content on single entry pages without any theme tinkering.
24
- 7. *Miscellany*: a nicer options screen (including a sample display of the code that is produced **New in 2.0**), displaying the fulltext match score on output for admins, an option to allow related posts from the future, a couple bug fixes, etc.
25
 
26
  == Installation ==
27
 
28
  = Auto display on your website =
29
 
30
- Since YARPP 1.5, you can just put the `yet-another-related-posts-plugin` directory in your `/wp-content/plugins/` directory, activate the plugin, and you're set! You'll see related posts in single entry (permalink) pages. If all your pages say "no related posts," see the FAQ.
31
 
32
- = Auto display in your feeds =
33
-
34
- Since YARPP 2.1, you can turn on the "display related posts in feeds" option to show related posts in your RSS and Atom feeds.
35
-
36
- The "display related posts in feeds" option can be used regardless of whether you auto display them on your website (and vice versa).
37
-
38
- = Widget =
39
-
40
- Related posts can also be displayed as a widget. Go to the Design > Widgets options page and add the Related Posts widget. The widget will only be displayed on single entry (permalink) pages. The widget can be used even if the "auto display" option is turned off.
41
-
42
- = Manual installation =
43
 
44
- **This is an advanced feature for those comfortable with PHP.** 97% of users will be better served by the auto display options above.
45
 
46
- If you would like to put the related posts display in another part of your theme, or display them in pages other than single entry pages, turn off "auto display" in the YARPP Options, then drop `related_posts()`, `related_pages()`, or `related_entries()` (see below) in your [WP loop](http://codex.wordpress.org/The_Loop). Change any options in the Related Posts (YARPP) Options pane in Admin > Plugins. See Examples in Other Notes for sample code you can drop into your theme.
47
 
48
- There're also `related_posts_exist()`, `related_pages_exist()`, and `related_entries_exist()` functions, which return a boolean as expected.
49
 
50
- **The `related_` functions**
51
 
52
- By default, `related_posts()` gives you back posts only, `related_pages()` gives you pages, and there's `related_entries()` which gives you posts and pages. When the "cross-relate posts and pages" option is checked in the YARPP options panel, `related_posts()`, `related_pages()`, and `related_entries()` will give you exactly the same output.
53
 
54
- The `related` functions can be used in conjunction to the regular "auto display" option.
55
 
56
- **Customizing the "related" functions**
57
 
58
- Since YARPP 2.1, you can specify some custom options for each instance of `related_*()`. The functions take two arguments: 1. an array with key-value pairs of options, and 2. a boolean called `echo`, with default value of `true`. If `echo` is set to `false`, the result will simply be returned back instead of echoed.
59
 
60
- For example: `related_*(array(key=>value, key=>value, ...),`(`true` or `false`)`)`.
61
 
62
- The available keys in version 2.1 are (roughly in the same order as in the options page):
63
 
64
- * The Pool:
65
- * `distags` => comma-delimited list of tag numbers which should be disallowed
66
- * `discats` => comma-delimited list of category numbers which should be disallowed
67
- * Relatedness options:
68
- * `threshold` => the match threshold
69
- * `show_pass_post` => (`bool`) show password-protected posts
70
- * `past_only` => (`bool`) only past posts
71
- * `title` => 1 for "do not consider", 2 for "consider", 3 for "consider with extra weight"
72
- * `body` => 1 for "do not consider", 2 for "consider", 3 for "consider with extra weight"
73
- * `tags` => 1 for "do not consider", 2 for "consider", 3 for "require one common tag", 4 for "require multiple common tags"
74
- * `categories` => 1 for "do not consider", 2 for "consider", 3 for "require one common category", 4 for "require multiple common categories"
75
- * `cross_relate` => (`bool`) cross-relate posts and pages
76
- * Display options:
77
- * `limit` => (`int`) maximum number of results
78
- * `order` => MySQL `ORDER BY ` field and direction
79
- * `promote_yarpp` => (`bool`) promote YARPP?
80
 
81
- **Examples**
82
 
83
- Customized `related_*()` functions can be used to build specialized related-post functionality into your WordPress-enabled site. Here are some examples to get you started:
84
 
85
- * `related_posts(array('title'=>1,'body'=>1,'tags'=>1,'categories'=>3))`
86
- * This example will return posts with at least one common category (with no other considerations).
87
- * `related_posts(array('show_pass_post'=>1))`
88
- * This example will return password-protected posts.
89
- * This is useful for a site with some members-only content. This command can be run within a `if ($membership == true)` type of conditional.
90
- * `related_posts(array('order'=>'rand() asc','limit'=>1))`
91
- * This example will link to one random related post.
92
- * `related_posts(array('discats'=>'`(all categories except one)`'))`
93
- * This example will give you related posts from only a certain category. (Although there are certainly much better ways to do this with other plugins or custom code.)
94
 
95
- == Frequently Asked Questions ==
96
 
97
- If your question isn't here, ask your own question at [the Wordpress.org forums](http://wordpress.org/tags/yet-another-related-posts-plugin).
98
 
99
- = Every page just says "no related posts"! What's up with that? =
100
 
101
- Most likely you have "no related posts" right now as the default "match threshold" is too high. Here's what I recommend to find an appropriate match threshold: first, lower your match threshold in the YARPP prefs to something ridiculously low, like 1 or 0.5. Make sure the last option "show admins the match scores" is on. Most likely the really low threshold will pull up many posts that aren't actually related (false positives), so look at some of your posts' related posts and their match scores. This will help you find an appropriate threshold. You want it lower than what you have now, but high enough so it doesn't have many false positives.
102
 
103
  = Does YARPP work with full-width characters or languages that don't use spaces between words? =
104
 
@@ -128,15 +94,32 @@ It is recommended that you tweak your match threshold whenever you make changes
128
 
129
  Please submit such bugs by starting a new thread on [the Wordpress.org forums](http://wordpress.org/tags/yet-another-related-posts-plugin). I check the forums regularly and will try to release a quick bugfix.
130
 
131
- = Things are weird after I upgraded. Ack! =
132
 
133
- I highly recommend you disactivate YARPP, replace it with the new one, and then reactivate it.
134
 
135
  == Localizations ==
136
 
137
  YARPP is currently localized in the following languages:
138
- * Simplified Chinese (`zh_CN`) by Jor Wang (mail at jorwang dot com) of [jorwang.com](http://jorwang.com)
139
- * German (`de_DE`) by Michael Kalina (yarpp-de at mitcho dot com) of [3th.be](http://3th.be)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
 
141
  If you are a bilingual speaker of English and another language and an avid user of YARPP, I would love to talk to you about localizing YARPP! Localizing YARPP can be pretty easy using [the Codestyling Localization plugin](http://www.code-styling.de/english/development/wordpress-plugin-codestyling-localization-en). Please [contact me](mailto:yarpp@mitcho.com) *first* before translating to make sure noone else is working on your language. Thanks!
142
 
@@ -228,11 +211,11 @@ If you are a bilingual speaker of English and another language and an avid user
228
  * Japanese (`ja`) by myself ([mitcho (Michael Yoshitaka Erlewine)](http://mitcho.com))
229
  * 2.1.6
230
  * Versioning bugfix - same as 2.1.5
231
-
232
- == Future versions ==
233
-
234
- The following feature requests have been made and may be incorporated into a future release. If you have a bug fix, please start a new thread on [the Wordpress.org forums](http://wordpress.org/tags/yet-another-related-posts-plugin).
235
-
236
- * More customizeable displays so that you can, for example, add the date and comment count in the excerpt ([by request](http://wordpress.org/support/topic/156231))
237
- * More localizations
238
- * Sentece-aware excerpts, [by request](http://wordpress.org/support/topic/162465)
6
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=66G4DATK4999L&item_name=mitcho%2ecom%2fcode%3a%20donate%20to%20Michael%20Yoshitaka%20Erlewine&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&charset=UTF%2d8
7
  Tags: related, posts, post, pages, page, RSS, feed, feeds
8
  Requires at least: 2.3
9
+ Tested up to: 2.7.2
10
+ Stable tag: 3.0.1
11
 
12
+ Returns a list of related entries based on a unique algorithm for display on your blog and RSS feeds. A templating feature allows customization of the display.
13
 
14
  == Description ==
15
 
16
  Yet Another Related Posts Plugin (YARPP) gives you a list of posts and/or pages related to the current entry, introducing the reader to other relevant content on your site. Key features include:
17
 
18
+ 1. *An advanced and versatile algorithm*: Using a customizable algorithm considering post titles, content, tags, and categories, YARPP calculates a "match score" for each pair of posts on your blog. You choose the threshold limit for relevance and you get more related posts if there are more related posts and less if there are less.
19
+ 2. *Templating*: **New in 3.0!** A new [templating system](http://mitcho.com/blog/projects/yarpp-3-templatesyarpp-3-templates/) puts you in charge of how your posts are displayed.
20
+ 3. *Caching*: **New in 3.0!** YARPP now caches the related posts for all the posts and thus has significantly improved performance over versions 2.x.
21
+ 4. *Related posts in RSS feeds*: Display related posts in your RSS and Atom feeds with custom display options.
22
+ 5. *Disallowing certain tags or categories*: You can choose certain tags or categories as disallowed, meaning any page or post with such tags or categories will not be served up by the plugin.
23
+ 6. *Related posts and pages*: Puts you in control of pulling up related posts, pages, or both.
 
24
 
25
  == Installation ==
26
 
27
  = Auto display on your website =
28
 
29
+ 1. Copy the folder `yet-another-related-posts-plugin` into the directory `wp-content/plugins/` and (optionally) the sample templates inside `yarpp-templates` folder into your active theme.
30
 
31
+ 2. Activate the plugin.
 
 
 
 
 
 
 
 
 
 
32
 
33
+ 3. Find the Related Posts (YARPP) settings page in your `wp-admin`. If you see a message telling you to build your cache, please build your cache. Otherwise, you will see no related posts anywhere.
34
 
35
+ NOTE: If you run a large and complex site and/or worry about your SQL query volume, it may be better to simply make sure the "compute related posts on the fly" option is turned on and *not* try to build the cache all at once.
36
 
37
+ = Auto display in your feeds =
38
 
39
+ Make sure the "display related posts in feeds" option is turned on if you would like to show related posts in your RSS and Atom feeds. The "display related posts in feeds" option can be used regardless of whether you auto display them on your website (and vice versa).
40
 
41
+ = Widget =
42
 
43
+ Related posts can also be displayed as a widget. Go to the Design > Widgets options page and add the Related Posts widget. The widget will only be displayed on single entry (permalink) pages. The widget can be used even if the "auto display" option is turned off.
44
 
45
+ = Custom display through templates =
46
 
47
+ New in version 3.0, YARPP allows the advanced user with knowledge of PHP to customize the display of related posts using a templating mechanism. More information is available [in this tutorial](http://mitcho.com/blog/projects/yarpp-3-templates/).
48
 
49
+ = Manual installation =
50
 
51
+ For advanced users with knowledge of PHP, there is also an [advanced manual installation option](http://mitcho.com/code/yarpp/manual.php).
52
 
53
+ == Frequently Asked Questions ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
 
55
+ If your question isn't here, ask your own question at [the Wordpress.org forums](http://wordpress.org/tags/yet-another-related-posts-plugin).
56
 
57
+ = Every page just says "no related posts"! What's up with that? =
58
 
59
+ 1. Most likely you have "no related posts" right now as the default "match threshold" is too high. Here's what I recommend to find an appropriate match threshold: first, lower your match threshold in the YARPP prefs to something ridiculously low, like 1 or 0.5. Most likely the really low threshold will pull up many posts that aren't actually related (false positives), so look at some of your posts' related posts and their match scores. This will help you find an appropriate threshold. You want it lower than what you have now, but high enough so it doesn't have many false positives.
 
 
 
 
 
 
 
 
60
 
61
+ 2. It is also possible that your related posts cache has not been built and the "compute related posts on the fly" option is also turned off. Please go to the Related Posts (YARPP) options page and either build the cache or turn on the "compute related posts on the fly" option.
62
 
63
+ = How do I turn off the match score next to the related posts? =
64
 
65
+ The match score display is only for administrators... you can log out of `wp-admin` and check out the post again and you will see that the score is gone.
66
 
67
+ If you would like more flexibility in changing the display of your related posts, please see the [templating tutorial](http://mitcho.com/blog/projects/yarpp-3-templates/).
68
 
69
  = Does YARPP work with full-width characters or languages that don't use spaces between words? =
70
 
94
 
95
  Please submit such bugs by starting a new thread on [the Wordpress.org forums](http://wordpress.org/tags/yet-another-related-posts-plugin). I check the forums regularly and will try to release a quick bugfix.
96
 
97
+ = Things are weird after I upgraded. =
98
 
99
+ I highly recommend you disactivate YARPP, replace it with the new one, and then reactivate it. If you continue to have trouble, please find
100
 
101
  == Localizations ==
102
 
103
  YARPP is currently localized in the following languages:
104
+
105
+ * Simplified Chinese (`zh_CN`) by Jor Wang (mail at jorwang dot com) of [jorwang.com](http://jorwang.com)
106
+ * French (`fr_FR`) by Lionel Chollet (yarpp-fr at mitcho dot com)
107
+ * German (`de_DE`) by Michael Kalina (yarpp-de at mitcho dot com) of [3th.be](http://3th.be)
108
+ * Italian (`it_IT`) by Gianni Diurno (yarpp-it at mitcho dot com) of [gidibao.net](http://gidibao.net)
109
+ * Japanese (`ja`) by myself (yarpp at mitcho dot com)
110
+ * Swedish (`sv_SE`) by Max Elander (yarpp-sv at mitcho dot com)
111
+
112
+ We already have localizers lined up for the following languages:
113
+
114
+ * Danish
115
+ * Spanish
116
+ * Catalan
117
+ * Indonesian
118
+ * Brazilian Portuguese
119
+ * Hungarian
120
+ * Romanian
121
+ * Russian
122
+ * Hebrew
123
 
124
  If you are a bilingual speaker of English and another language and an avid user of YARPP, I would love to talk to you about localizing YARPP! Localizing YARPP can be pretty easy using [the Codestyling Localization plugin](http://www.code-styling.de/english/development/wordpress-plugin-codestyling-localization-en). Please [contact me](mailto:yarpp@mitcho.com) *first* before translating to make sure noone else is working on your language. Thanks!
125
 
211
  * Japanese (`ja`) by myself ([mitcho (Michael Yoshitaka Erlewine)](http://mitcho.com))
212
  * 2.1.6
213
  * Versioning bugfix - same as 2.1.5
214
+ * 3.0
215
+ * Major new release!
216
+ * Caching for better SQL performance
217
+ * A new [templating feature](http://mitcho.com/blog/projects/yarpp-3-templates/) for custom related posts displays
218
+ * Cleaned up options page
219
+ * New and updated localizations
220
+ * 3.0.1
221
+ * Bugfix: In some situations before YARPP options were updated, an `include` PHP error was displayed.
related-functions.php CHANGED
@@ -4,28 +4,28 @@
4
 
5
  // Since YARPP 2.1, these functions receive (optionally) one array argument. See the documentation for instructions on how to customize their output.
6
 
7
- function related_posts($a = array(),$echo=true) {
8
- return yarpp_related(array('post'),$a,$echo);
9
  }
10
 
11
- function related_pages($a = array(),$echo=true) {
12
- return yarpp_related(array('page'),$a,$echo);
13
  }
14
 
15
- function related_entries($a = array(),$echo=true) {
16
- return yarpp_related(array('page','post'),$a,$echo);
17
  }
18
 
19
- function related_posts_exist($a = array()) {
20
- return yarpp_related_exist(array('post'),$a);
21
  }
22
 
23
- function related_pages_exist($a = array()) {
24
- return yarpp_related_exist(array('page'),$a);
25
  }
26
 
27
- function related_entries_exist($a = array()) {
28
- return yarpp_related_exist(array('page','post'),$a);
29
  }
30
 
31
  ?>
4
 
5
  // Since YARPP 2.1, these functions receive (optionally) one array argument. See the documentation for instructions on how to customize their output.
6
 
7
+ function related_posts($a = array(),$echo=true,$reference_ID=false) {
8
+ return yarpp_related(array('post'),$a,$echo,$reference_ID);
9
  }
10
 
11
+ function related_pages($a = array(),$echo=true,$reference_ID=false) {
12
+ return yarpp_related(array('page'),$a,$echo,$reference_ID);
13
  }
14
 
15
+ function related_entries($a = array(),$echo=true,$reference_ID=false) {
16
+ return yarpp_related(array('page','post'),$a,$echo,$reference_ID);
17
  }
18
 
19
+ function related_posts_exist($a = array(),$reference_ID=false) {
20
+ return yarpp_related_exist(array('post'),$a,$reference_ID);
21
  }
22
 
23
+ function related_pages_exist($a = array(),$reference_ID=false) {
24
+ return yarpp_related_exist(array('page'),$a,$reference_ID);
25
  }
26
 
27
+ function related_entries_exist($a = array(),$reference_ID=false) {
28
+ return yarpp_related_exist(array('page','post'),$a,$reference_ID);
29
  }
30
 
31
  ?>
services.php ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // setup the ajax action hooks
4
+ if (function_exists('add_action')) {
5
+ add_action('wp_ajax_yarpp_display_discats', 'yarpp_ajax_display_discats');
6
+ add_action('wp_ajax_yarpp_display_distags', 'yarpp_ajax_display_distags');
7
+ add_action('wp_ajax_yarpp_display_demo_web', 'yarpp_ajax_display_demo_web');
8
+ add_action('wp_ajax_yarpp_display_demo_rss', 'yarpp_ajax_display_demo_rss');
9
+ add_action('wp_ajax_yarpp_build_cache_action', 'yarpp_build_cache');
10
+ }
11
+
12
+ function yarpp_ajax_display_discats() {
13
+ global $wpdb;
14
+ $discats = explode(',',yarpp_get_option('discats'));
15
+ array_unshift($discats,' ');
16
+ foreach ($wpdb->get_results("select $wpdb->terms.term_id, name from $wpdb->terms natural join $wpdb->term_taxonomy where $wpdb->term_taxonomy.taxonomy = 'category' order by name") as $cat) {
17
+ echo "<input type='checkbox' name='discats[$cat->term_id]' value='true'". (array_search($cat->term_id,$discats) ? ' checked="checked"': '' )." /> <label>$cat->name</label> ";//for='discats[$cat->term_id]' it's not HTML. :(
18
+ }
19
+ exit;
20
+ }
21
+
22
+ function yarpp_ajax_display_distags() {
23
+ global $wpdb;
24
+ $distags = explode(',',yarpp_get_option('distags'));
25
+ array_unshift($distags,' ');
26
+ foreach ($wpdb->get_results("select $wpdb->terms.term_id, name from $wpdb->terms natural join $wpdb->term_taxonomy where $wpdb->term_taxonomy.taxonomy = 'post_tag' order by name") as $tag) {
27
+ echo "<input type='checkbox' name='distags[$tag->term_id]' value='true'". (array_search($tag->term_id,$distags) ? ' checked="checked"': '' )." /> <label>$tag->name</label> ";// for='distags[$tag->term_id]'
28
+ }
29
+ exit;
30
+ }
31
+
32
+ function yarpp_ajax_display_demo_web() {
33
+ global $wpdb, $post, $userdata, $yarpp_demo_time, $wp_query, $id, $page, $pages, $yarpp_limit;
34
+
35
+ header("Content-Type: text/html; charset=UTF-8");
36
+
37
+ $yarpp_limit = yarpp_get_option('limit');
38
+ $return = yarpp_related(array('post'),array(),false,false,'demo_web');
39
+ unset($yarpp_limit);
40
+ echo ereg_replace("[\n\r]",'',nl2br(htmlspecialchars($return)));
41
+ exit;
42
+ }
43
+
44
+ function yarpp_ajax_display_demo_rss() {
45
+ global $wpdb, $post, $userdata, $yarpp_demo_time, $wp_query, $id, $page, $pages, $yarpp_limit;
46
+
47
+ header("Content-Type: text/html; charset=utf-8");
48
+
49
+ $yarpp_limit = yarpp_get_option('rss_limit');
50
+ $return = yarpp_related(array('post'),array(),false,false,'demo_rss');
51
+ unset($yarpp_limit);
52
+ echo ereg_replace("[\n\r]",'',nl2br(htmlspecialchars($return)));
53
+ exit;
54
+ }
55
+
56
+ function yarpp_build_cache() {
57
+ global $wpdb;
58
+ if (!is_user_logged_in() || !current_user_can('level_10')) {
59
+ wp_die(__('You cannot rebuild the YARPP cache.', 'yarpp'));
60
+ }
61
+
62
+ if (!$_POST['i']) {
63
+ $id = $wpdb->get_var("select min(ID), count(ID) from $wpdb->posts where post_status = 'publish'",0);
64
+ $i = 1;
65
+ $m = $wpdb->get_var(null,1);
66
+ } else {
67
+ $id = $_POST['id'];
68
+ $i = $_POST['i'];
69
+ $m = $_POST['m'];
70
+ }
71
+
72
+ $timeout = 2; // seconds
73
+ $start = yarpp_microtime_float();
74
+ while ((yarpp_microtime_float() - $start) < $timeout and $i <= $m) {
75
+ $result = yarpp_cache_enforce(array('post'),$id,true);
76
+
77
+ if (!$result) {
78
+ header('Content-Type: application/json');
79
+ echo "{result:'error',id: '$id', title: '".addslashes($title)."', i: $i, m: $m, percent: '".(floor(1000 * $i/$m)/10)."'}";
80
+ exit();
81
+ }
82
+
83
+ $id = $wpdb->get_var("select ID, post_title from $wpdb->posts where ID > $id and post_status = 'publish' and ifnull(post_title,'') != '' order by ID asc limit 1",0);
84
+ $title = $wpdb->get_var(null,1);
85
+ $i++;
86
+ }
87
+
88
+ header('Content-Type: application/json');
89
+ echo "{result:'success',time:'".(yarpp_microtime_float() - $start)."', id: '$id', title: '".addslashes($title)."', i: $i, m: $m, percent: '".(floor(1000 * $i/$m)/10)."'}";
90
+ exit();
91
+ }
92
+
93
+ ?>
template-builtin.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php /*
2
+ YARPP's built-in "template"
3
+
4
+ This "template" is used when you choose not to use a template.
5
+
6
+ If you want to create a new template, look at templates/template-example.php as an example.
7
+ */
8
+
9
+ $options = array(
10
+ 'before_title'=>"${domainprefix}before_title",
11
+ 'after_title'=>"${domainprefix}after_title",
12
+ 'show_excerpt'=>"${domainprefix}show_excerpt",
13
+ 'excerpt_length'=>"${domainprefix}excerpt_length",
14
+ 'before_post'=>"${domainprefix}before_post",
15
+ 'after_post'=>"${domainprefix}after_post",
16
+ 'before_related'=>"${domainprefix}before_related",
17
+ 'after_related'=>"${domainprefix}after_related",
18
+ 'no_results'=>"${domainprefix}no_results");
19
+ $optvals = array();
20
+ foreach (array_keys($options) as $option) {
21
+ if (isset($args[$option])) {
22
+ $optvals[$option] = stripslashes($args[$option]);
23
+ } else {
24
+ $optvals[$option] = stripslashes(stripslashes(yarpp_get_option($options[$option])));
25
+ }
26
+ }
27
+ extract($optvals);
28
+
29
+ if ($related_query->have_posts()) {
30
+ while ($related_query->have_posts()) {
31
+ $related_query->the_post();
32
+
33
+ $output .= "$before_title<a href='".get_permalink()."' rel='bookmark' title='Permanent Link: ".get_the_title()."'>".get_the_title()."";
34
+ if ($userdata->user_level >= 8 and $domain != 'rss')
35
+ $output .= ' <abbr title="'.sprintf(__('%f is the YARPP match score between the current entry and this related entry. You are seeing this value because you are logged in to WordPress as an administrator. It is not shown to regular visitors.','yarpp'),round(get_the_score(),3)).'">('.round(get_the_score(),3).')</abbr>';
36
+ $output .= '</a>';
37
+ if ($show_excerpt) {
38
+ $output .= $before_post . yarpp_excerpt(get_the_excerpt(),$excerpt_length) . $after_post;
39
+ }
40
+ $output .= $after_title;
41
+
42
+ }
43
+ $output = stripslashes(stripslashes($before_related)).$output.stripslashes(stripslashes($after_related));
44
+ } else {
45
+ $output = $no_results;
46
+ }
template-functions.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // two YARPP-specific Template Tags, to be used in the YARPP-template Loop.
4
+
5
+ function the_score() {
6
+ echo get_the_score();
7
+ }
8
+
9
+ function get_the_score() { // returns the score
10
+ global $post;
11
+ $score = $post->score;
12
+ return apply_filters('get_the_score', $score, $d, $gmt);
13
+ }
template-metabox.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ yarpp_save_cache($reference_ID,false); // enforce the cache, but don't force it
4
+
5
+ $body_terms = yarpp_get_cached_keywords($reference_ID,'body');
6
+ $title_terms = yarpp_get_cached_keywords($reference_ID,'title');
7
+
8
+ if ($yarpp_debug) $output .= "<p>last updated keywords: ".$wpdb->get_var("select date from {$wpdb->prefix}yarpp_keyword_cache where ID = '$reference_ID'")."</p>";
9
+ if ($yarpp_debug) $output .= "<p>body keywords: $body_terms</p>";
10
+ if ($yarpp_debug) $output .= "<p>title keywords: $title_terms</p>";
11
+
12
+ $output .= '<p>'.__( 'These are the related entries for this entry. Updating this post may change these related posts.' , 'yarpp').'</p>';
13
+
14
+ if ($yarpp_debug) $output .= "<p>last updated: ".$wpdb->get_var("select max(date) as updated from {$wpdb->prefix}yarpp_related_cache where reference_ID = '$reference_ID'")."</p>";
15
+
16
+ if ($related_query->have_posts()) {
17
+ $output .= '<ol>';
18
+ while ($related_query->have_posts()) {
19
+ $related_query->the_post();
20
+ $output .= "<li><a href='post.php?action=edit&post=$id'>".get_the_title()."</a>"; // FIXME: what if it's a page?
21
+ $output .= ' ('.round(get_the_score(),3).')';
22
+ $output .= '</li>';
23
+ }
24
+ $output .= '</ol>';
25
+ $output .= '<p>'.__( 'Whether all of these related entries are actually displayed and how they are displayed depends on your YARPP display options.' , 'yarpp').'</p>';
26
+ } else {
27
+ $output .= '<p><em>'.__('No related posts.').'</em></p>';
28
+ }
yarpp-templates/yarpp-template-example.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php /*
2
+ Example template
3
+ Author: mitcho (Michael Yoshitaka Erlewine)
4
+ */
5
+ ?><h3>Related Posts</h3>
6
+ <?php if ($related_query->have_posts()):?>
7
+ <ol>
8
+ <?php while ($related_query->have_posts()) : $related_query->the_post(); ?>
9
+ <li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a><!-- (<?php the_score(); ?>)--></li>
10
+ <?php endwhile; ?>
11
+ </ol>
12
+ <?php else: ?>
13
+ <p>No related posts.</p>
14
+ <?php endif; ?>
yarpp-templates/yarpp-template-list.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php /*
2
+ List template
3
+ This template returns the related posts as a comma-separated list.
4
+ Author: mitcho (Michael Yoshitaka Erlewine)
5
+ */
6
+ ?><h3>Related Posts</h3>
7
+
8
+ <?php if ($related_query->have_posts()):
9
+ $postsArray = array();
10
+ while ($related_query->have_posts()) : $related_query->the_post();
11
+ $postsArray[] = '<a href="'.get_permalink().'" rel="bookmark">'.get_the_title().'</a><!-- ('.get_the_score().')-->';
12
+ endwhile;
13
+
14
+ echo implode(', '."\n",$postsArray); // print out a list of the related items, separated by commas
15
+
16
+ else:?>
17
+
18
+ <p>No related posts.</p>
19
+ <?php endif; ?>
yarpp-templates/yarpp-template-photoblog.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php /*
2
+ Example photoblog template for use with Yet Another Photoblog
3
+ Author: mitcho (Michael Yoshitaka Erlewine)
4
+ */ ?>
5
+ <h3>Related Photos</h3>
6
+ <?php if ($related_query->have_posts()):?>
7
+ <ol>
8
+ <?php while ($related_query->have_posts()) : $related_query->the_post(); ?>
9
+ <?php if (function_exists('yapb_is_photoblog_post')): if (yapb_is_photoblog_post()):?>
10
+ <li><a href="<?php the_permalink() ?>" rel="bookmark"><?php yapb_get_thumbnail(); ?></a></li>
11
+ <?php endif; endif; ?>
12
+ <?php endwhile; ?>
13
+ </ol>
14
+
15
+ <?php else: ?>
16
+ <p>No related photos.</p>
17
+ <?php endif; ?>
yarpp-templates/yarpp-template-random.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php /*
2
+ Example template: random
3
+ This template gives you some random other post in case there are no related posts
4
+ Author: mitcho (Michael Yoshitaka Erlewine)
5
+ */ ?>
6
+ <h3>Related Posts</h3>
7
+ <?php if ($related_query->have_posts()):?>
8
+ <ol>
9
+ <?php while ($related_query->have_posts()) : $related_query->the_post(); ?>
10
+ <li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a><!-- (<?php the_score(); ?>)--></li>
11
+ <?php endwhile; ?>
12
+ </ol>
13
+
14
+ <?php else:
15
+ $related_query->query("orderby=rand&order=asc&limit=1");
16
+ $related_query->the_post();?>
17
+ <p>No related posts were found, so here's a consolation prize: <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>.</p>
18
+ <?php endif; ?>
yarpp.php CHANGED
@@ -2,14 +2,16 @@
2
  /*
3
  Plugin Name: Yet Another Related Posts Plugin
4
  Plugin URI: http://mitcho.com/code/yarpp/
5
- Description: Returns a list of the related entries based on a unique algorithm using titles, post bodies, tags, and categories. Now with RSS feed support!
6
- Version: 2.1.6
7
  Author: mitcho (Michael Yoshitaka Erlewine)
8
  Author URI: http://mitcho.com/
 
9
  */
10
 
11
  require_once('includes.php');
12
  require_once('related-functions.php');
 
13
 
14
  add_action('admin_menu','yarpp_admin_menu');
15
  add_action('admin_print_scripts','yarpp_upgrade_check');
@@ -22,5 +24,27 @@ load_plugin_textdomain('yarpp', PLUGINDIR.'/'.dirname(plugin_basename(__FILE__))
22
 
23
  // new in 2.0: add as a widget
24
  add_action('plugins_loaded', 'widget_yarpp_init');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
26
- ?>
 
 
 
 
 
 
 
 
2
  /*
3
  Plugin Name: Yet Another Related Posts Plugin
4
  Plugin URI: http://mitcho.com/code/yarpp/
5
+ Description: Returns a list of related entries based on a unique algorithm for display on your blog and RSS feeds. A templating feature allows customization of the display.
6
+ Version: 3.0.1
7
  Author: mitcho (Michael Yoshitaka Erlewine)
8
  Author URI: http://mitcho.com/
9
+ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=66G4DATK4999L&item_name=mitcho%2ecom%2fcode%3a%20donate%20to%20Michael%20Yoshitaka%20Erlewine&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&charset=UTF%2d8
10
  */
11
 
12
  require_once('includes.php');
13
  require_once('related-functions.php');
14
+ require_once('template-functions.php');
15
 
16
  add_action('admin_menu','yarpp_admin_menu');
17
  add_action('admin_print_scripts','yarpp_upgrade_check');
24
 
25
  // new in 2.0: add as a widget
26
  add_action('plugins_loaded', 'widget_yarpp_init');
27
+ // new in 3.0: add meta box
28
+ add_action( 'admin_menu', 'yarpp_add_metabox');
29
+ function yarpp_add_metabox() {
30
+ add_meta_box( __( 'Related Posts' , 'yarpp'), __( 'Related Posts' , 'yarpp'), 'yarpp_metabox', 'post', 'normal' );
31
+ }
32
+ function yarpp_metabox() {
33
+ global $post;
34
+ echo '<div id="yarpp-related-posts">';
35
+ if ($post->ID)
36
+ yarpp_related(array('post'),array('limit'=>1000),true,false,'metabox');
37
+ else
38
+ echo "<p>Related entries may be displayed once you save your entry.</p>";
39
+ echo '</div>';
40
+ }
41
 
42
+ add_action('save_post','yarpp_save_cache');
43
+
44
+ add_filter('posts_join','yarpp_join_filter');
45
+ add_filter('posts_where','yarpp_where_filter');
46
+ add_filter('posts_orderby','yarpp_orderby_filter');
47
+ add_filter('posts_fields','yarpp_fields_filter');
48
+ add_filter('posts_request','yarpp_demo_request_filter');
49
+ add_filter('post_limits','yarpp_limit_filter');
50
+ add_action('parse_query','yarpp_set_score_override_flag'); // sets the score override flag.