Yet Another Related Posts Plugin (YARPP) - Version 3.4RC1

Version Description

Download this release

Release Info

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

Code changes from version 3.4b10 to 3.4RC1

blogglue.php CHANGED
@@ -11,21 +11,20 @@ function add_yarpp_blogglue_meta_box() {
11
  $pluginurl = plugin_dir_url(__FILE__);
12
  ?>
13
  <style type="text/css">
14
- #blogglue_upsell {
15
  text-align: center;
16
  }
17
  #blogglue_upsell ul {
18
- list-style-type: disc;
19
- list-style-position: inside;
20
  text-align: left;
21
  margin: 10px 0 10px 15px;
22
  }
23
- #blogglue_install_steps {
24
- text-align: center;
25
- height: 200px;
26
  }
27
  #TB_ajaxContent {
28
- height: 220px !important;
 
 
29
  }
30
  ul.install_help {
31
  list-style-type: disc;
@@ -35,30 +34,28 @@ ul.install_help {
35
  }
36
  </style>
37
  <div id="blogglue_upsell">
38
- <img src="http://s3.amazonaws.com/arkayne-media/img/logo-md.png" alt="BlogGlue Logo"/>
 
39
  <ul>
40
- <li>Display related posts from your own site as well as other sites</li>
41
- <li>Your content linked to from related content on other sites</li>
42
- <!--<li>Off-server Processing</li>-->
43
  </ul>
44
- <a href="#TB_inline?height=300&width=400&inlineId=blogglue_install" class="thickbox"><img src="http://s3.amazonaws.com/arkayne-media/img/email_try.png" alt="Upgrade"/></a><img src="http://www.blogglue.com/cohorts/track/yarpp_sidebar.gif"/>
 
 
45
  </div>
46
- <div id="blogglue_install" style="display: none;">
47
- <div id="blogglue_install_steps">
48
  <img src="http://s3.amazonaws.com/arkayne-media/img/logo.png" alt="BlogGlue Logo"/>
49
- <ul class="install_help">
50
- <li>Installing BlogGlue will disable YARPP</li>
51
- <li>Your YARPP settings will still be saved</li>
52
- <li>Once the download is complete, activate the BlogGlue plugin</li>
53
- <li>After the plugin is activated, follow the signup instructions</li>
54
- </ul>
55
- <a href="<?php echo wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=arkayne-site-to-site-related-content'), 'install-plugin_arkayne-site-to-site-related-content'); ?>"><img src="http://s3.amazonaws.com/arkayne-media/img/start_free_sm.png" width="94" height="30"/></a>
56
- </div>
57
  </div>
58
  <?php
59
  }
60
  }
61
 
62
- add_meta_box('yarpp_display_blogglue', 'Upgrade To BlogGlue', array(new YARPP_Meta_Box_BlogGlue, 'display'), 'settings_page_yarpp', 'side', 'core');
63
  }
64
  add_action( 'add_meta_boxes_settings_page_yarpp', 'add_yarpp_blogglue_meta_box' );
11
  $pluginurl = plugin_dir_url(__FILE__);
12
  ?>
13
  <style type="text/css">
14
+ #blogglue_upsell .center {
15
  text-align: center;
16
  }
17
  #blogglue_upsell ul {
 
 
18
  text-align: left;
19
  margin: 10px 0 10px 15px;
20
  }
21
+ #blogglue_upsell ul li {
22
+ list-style: disc outside !important;
 
23
  }
24
  #TB_ajaxContent {
25
+ height: 480px !important;
26
+ padding: 10px;
27
+ overflow: hidden;
28
  }
29
  ul.install_help {
30
  list-style-type: disc;
34
  }
35
  </style>
36
  <div id="blogglue_upsell">
37
+ <p class="center"><img src="http://s3.amazonaws.com/arkayne-media/img/logo-md.png" alt="BlogGlue Logo"/></p>
38
+ <p>In addition to related links on your own site, YARPP and BlogGlue have partnered to increase your blog’s audience by:</p>
39
  <ul>
40
+ <li>delivering a new audience from trusted partners with relevant, crosslinked content</li>
41
+ <li>improving search engine placement</li>
42
+ <li>pulling traffic from Facebook, Twitter and LinkedIn</li>
43
  </ul>
44
+ <p class="center"><a href="<?php echo wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=arkayne-site-to-site-related-content'), 'install-plugin_arkayne-site-to-site-related-content'); ?>"><img src="http://s3.amazonaws.com/arkayne-media/img/installnow.png" alt="Install Now!"/></a><img src="http://www.blogglue.com/cohorts/track/yarpp_sidebar.gif"/></p>
45
+
46
+ <p class="center">Want to learn more? <a href="#TB_inline?title=rar&height=450&width=610&inlineId=blogglue_video" title="Free Upgrade To BlogGlue: More Information" class="thickbox">Watch A Video</a></p>
47
  </div>
48
+ <div id="blogglue_video" style="display: none;">
 
49
  <img src="http://s3.amazonaws.com/arkayne-media/img/logo.png" alt="BlogGlue Logo"/>
50
+
51
+ <iframe src="http://player.vimeo.com/video/33007489?title=0&amp;byline=0&amp;portrait=0&amp;color=ff6300" width="601" height="338" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
52
+
53
+ <p style="text-align:center;"><a href="<?php echo wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=arkayne-site-to-site-related-content'), 'install-plugin_arkayne-site-to-site-related-content'); ?>"><img src="http://s3.amazonaws.com/arkayne-media/img/installnow.png" alt="Install Now!"/></a></p>
 
 
 
 
54
  </div>
55
  <?php
56
  }
57
  }
58
 
59
+ add_meta_box('yarpp_display_blogglue', 'Free Upgrade To BlogGlue', array(new YARPP_Meta_Box_BlogGlue, 'display'), 'settings_page_yarpp', 'side', 'core');
60
  }
61
  add_action( 'add_meta_boxes_settings_page_yarpp', 'add_yarpp_blogglue_meta_box' );
cache-postmeta.php CHANGED
@@ -5,7 +5,7 @@ $yarpp_storage_class = 'YARPP_Cache_Postmeta';
5
  define('YARPP_POSTMETA_KEYWORDS_KEY','_yarpp_keywords');
6
  define('YARPP_POSTMETA_RELATED_KEY', '_yarpp_related');
7
 
8
- class YARPP_Cache_Postmeta {
9
 
10
  public $name = "postmeta";
11
 
@@ -13,8 +13,6 @@ class YARPP_Cache_Postmeta {
13
  private $related_postdata = array();
14
  private $related_IDs = array();
15
 
16
- private $yarpp_time = false;
17
-
18
  /**
19
  * SETUP/STATUS
20
  */
@@ -104,10 +102,6 @@ class YARPP_Cache_Postmeta {
104
  /**
105
  * RELATEDNESS CACHE CONTROL
106
  */
107
- public function is_yarpp_time() {
108
- return $this->yarpp_time;
109
- }
110
-
111
  public function begin_yarpp_time($reference_ID) {
112
  $this->yarpp_time = true;
113
  // get the related posts from postmeta, and also construct the relate_IDs array
5
  define('YARPP_POSTMETA_KEYWORDS_KEY','_yarpp_keywords');
6
  define('YARPP_POSTMETA_RELATED_KEY', '_yarpp_related');
7
 
8
+ class YARPP_Cache_Postmeta extends YARPP_Cache {
9
 
10
  public $name = "postmeta";
11
 
13
  private $related_postdata = array();
14
  private $related_IDs = array();
15
 
 
 
16
  /**
17
  * SETUP/STATUS
18
  */
102
  /**
103
  * RELATEDNESS CACHE CONTROL
104
  */
 
 
 
 
105
  public function begin_yarpp_time($reference_ID) {
106
  $this->yarpp_time = true;
107
  // get the related posts from postmeta, and also construct the relate_IDs array
cache-tables.php CHANGED
@@ -7,7 +7,6 @@ define('YARPP_TABLES_KEYWORDS_TABLE', 'yarpp_keyword_cache');
7
 
8
  class YARPP_Cache_Tables extends YARPP_Cache {
9
  public $name = "custom tables";
10
- private $yarpp_time = false;
11
 
12
  /**
13
  * SETUP/STATUS
@@ -126,10 +125,6 @@ class YARPP_Cache_Tables extends YARPP_Cache {
126
  /**
127
  * RELATEDNESS CACHE CONTROL
128
  */
129
- public function is_yarpp_time() {
130
- return $this->yarpp_time;
131
- }
132
-
133
  public function begin_yarpp_time() {
134
  $this->yarpp_time = true;
135
  add_filter('posts_join',array(&$this,'join_filter'));
7
 
8
  class YARPP_Cache_Tables extends YARPP_Cache {
9
  public $name = "custom tables";
 
10
 
11
  /**
12
  * SETUP/STATUS
125
  /**
126
  * RELATEDNESS CACHE CONTROL
127
  */
 
 
 
 
128
  public function begin_yarpp_time() {
129
  $this->yarpp_time = true;
130
  add_filter('posts_join',array(&$this,'join_filter'));
class-admin.php CHANGED
@@ -23,6 +23,13 @@ class YARPP_Admin {
23
  }
24
 
25
  function ui_register() {
 
 
 
 
 
 
 
26
  // setup admin
27
  $this->hook = add_options_page(__('Related Posts (YARPP)','yarpp'),__('Related Posts (YARPP)','yarpp'), 'manage_options', 'yarpp', array( $this, 'options_page' ) );
28
  // new in 3.3: load options page sections as metaboxes
@@ -52,10 +59,58 @@ class YARPP_Admin {
52
  }
53
  }
54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  function settings_link($links, $file) {
56
  $this_plugin = dirname(plugin_basename(__FILE__)) . '/yarpp.php';
57
  if($file == $this_plugin) {
58
- $links[] = '<a href="options-general.php?page=yarpp">' . __('Settings', 'yarpp') . '</a>';
59
  }
60
  return $links;
61
  }
@@ -67,10 +122,23 @@ class YARPP_Admin {
67
 
68
  // since 3.4: don't actually compute results here, but use ajax instead
69
  function metabox() {
70
- echo '<style>#yarpp_relatedposts h3 .postbox-title-action { right: 30px; top: 5px; position: absolute; padding: 0 } #yarpp_relatedposts:hover .edit-box { display: inline; }</style>';
 
 
 
 
 
 
 
 
 
 
 
 
71
  if ( !get_the_ID() ) {
72
  echo "<div><p>".__("Related entries may be displayed once you save your entry",'yarpp').".</p></div>";
73
  } else {
 
74
  echo '<div id="yarpp-related-posts"><img src="' . esc_url( admin_url( 'images/wpspin_light.gif' ) ) . '" alt="" /></div>';
75
  }
76
  }
@@ -87,8 +155,8 @@ class YARPP_Admin {
87
  */
88
 
89
  function ajax_display_exclude_terms() {
90
- // @todo nonce
91
-
92
  if ( !isset($_REQUEST['taxonomy']) )
93
  return;
94
 
@@ -119,14 +187,13 @@ class YARPP_Admin {
119
  }
120
 
121
  foreach ($terms as $term) {
122
- echo "<input type='checkbox' name='exclude[$taxonomy][$term->term_id]' value='true' /> <label>" . esc_html($term->name) . "</label> ";
123
- //for='exclude[$taxonomy][$cat->term_id]' it's not HTML. :(
124
  }
125
  exit;
126
  }
127
 
128
  function ajax_display() {
129
- // @todo nonce
130
 
131
  if ( !isset($_REQUEST['ID']) )
132
  return;
@@ -147,7 +214,7 @@ class YARPP_Admin {
147
  }
148
 
149
  function ajax_display_demo() {
150
- // @todo nonce?
151
 
152
  header("HTTP/1.1 200");
153
  header("Content-Type: text/html; charset=UTF-8");
23
  }
24
 
25
  function ui_register() {
26
+ global $wp_version;
27
+ if ( get_option( 'yarpp_activated' ) && version_compare($wp_version, '3.3b1', '>=') ) {
28
+ delete_option( 'yarpp_activated' );
29
+ add_action( 'admin_enqueue_scripts', array( $this, 'pointer_enqueue' ) );
30
+ add_action( 'admin_print_footer_scripts', array( $this, 'pointer_script' ) );
31
+ }
32
+
33
  // setup admin
34
  $this->hook = add_options_page(__('Related Posts (YARPP)','yarpp'),__('Related Posts (YARPP)','yarpp'), 'manage_options', 'yarpp', array( $this, 'options_page' ) );
35
  // new in 3.3: load options page sections as metaboxes
59
  }
60
  }
61
 
62
+ // since 3.4 and WP 3.3
63
+ function pointer_enqueue() {
64
+ wp_enqueue_style( 'wp-pointer' );
65
+ wp_enqueue_script( 'wp-pointer' );
66
+ }
67
+ function pointer_script() {
68
+ $content = '<h3>' . str_replace('<span>', '<span style="font-style:italic; font-weight: inherit;">', __('Thank you for installing <span>Yet Another Related Posts Plugin</span>!', 'yarpp') ) . '</h3>';
69
+ $content .= '<p>' . str_replace('<a>', '<a href="' . esc_url(admin_url('options-general.php?page=yarpp')) .'">', __('Make sure to visit the <a>Related Posts settings page</a> to customize YARPP.', 'yarpp') ). '</p>';
70
+ ?>
71
+ <script>
72
+ jQuery(function ($) {
73
+ var menu = $('#menu-settings'),
74
+ yarpp = menu.find("a[href='options-general.php?page=yarpp']"),
75
+ options = {
76
+ content: '<?php echo $content; ?>',
77
+ position: {
78
+ edge: 'left',
79
+ align: 'center',
80
+ of: menu.is('.wp-menu-open') && !menu.is('.folded *') ? yarpp : menu
81
+ },
82
+ close: function() {
83
+ menu.unbind('mouseenter mouseleave', yarpp_pointer);
84
+ $('#collapse-menu').('mouseenter mouseleave', yarpp_pointer);
85
+ }};
86
+
87
+ if ( !yarpp.length )
88
+ return;
89
+
90
+ yarpp.pointer(options).pointer('open');
91
+
92
+ if ( menu.is('.folded *') || !menu.is('.wp-menu-open') ) {
93
+ function yarpp_pointer(e) {
94
+ setTimeout(function() {
95
+ if (yarpp.is(':visible'))
96
+ options.position.of = yarpp;
97
+ else
98
+ options.position.of = menu;
99
+ yarpp.pointer( options );
100
+ }, 200);
101
+ }
102
+ menu.bind('mouseenter mouseleave', yarpp_pointer);
103
+ $('#collapse-menu').bind('mouseenter mouseleave', yarpp_pointer);
104
+ }
105
+ });
106
+ </script>
107
+ <?php
108
+ }
109
+
110
  function settings_link($links, $file) {
111
  $this_plugin = dirname(plugin_basename(__FILE__)) . '/yarpp.php';
112
  if($file == $this_plugin) {
113
+ $links[] = '<a href="options-general.php?page=yarpp">' . __('Settings') . '</a>';
114
  }
115
  return $links;
116
  }
122
 
123
  // since 3.4: don't actually compute results here, but use ajax instead
124
  function metabox() {
125
+ ?>
126
+ <style>
127
+ #yarpp_relatedposts h3 .postbox-title-action {
128
+ right: 30px;
129
+ top: 5px;
130
+ position: absolute;
131
+ padding: 0;
132
+ }
133
+ #yarpp_relatedposts:hover .edit-box {
134
+ display: inline;
135
+ }
136
+ </style>
137
+ <?php
138
  if ( !get_the_ID() ) {
139
  echo "<div><p>".__("Related entries may be displayed once you save your entry",'yarpp').".</p></div>";
140
  } else {
141
+ wp_nonce_field( 'yarpp_display', 'yarpp_display-nonce', false );
142
  echo '<div id="yarpp-related-posts"><img src="' . esc_url( admin_url( 'images/wpspin_light.gif' ) ) . '" alt="" /></div>';
143
  }
144
  }
155
  */
156
 
157
  function ajax_display_exclude_terms() {
158
+ check_ajax_referer( 'yarpp_display_exclude_terms' );
159
+
160
  if ( !isset($_REQUEST['taxonomy']) )
161
  return;
162
 
187
  }
188
 
189
  foreach ($terms as $term) {
190
+ echo "<span><input type='checkbox' name='exclude[{$taxonomy}][{$term->term_id}]' id='exclude_{$taxonomy}_{$term->term_id}' value='true' /> <label for='exclude_{$taxonomy}_{$term->term_id}'>" . esc_html($term->name) . "</label></span> ";
 
191
  }
192
  exit;
193
  }
194
 
195
  function ajax_display() {
196
+ check_ajax_referer( 'yarpp_display' );
197
 
198
  if ( !isset($_REQUEST['ID']) )
199
  return;
214
  }
215
 
216
  function ajax_display_demo() {
217
+ check_ajax_referer( 'yarpp_display_demo' );
218
 
219
  header("HTTP/1.1 200");
220
  header("Content-Type: text/html; charset=UTF-8");
class-cache.php CHANGED
@@ -2,10 +2,11 @@
2
 
3
  abstract class YARPP_Cache {
4
 
5
- public $core;
6
  public $score_override = false;
7
  public $online_limit = false;
8
  public $last_sql;
 
9
 
10
  function __construct( &$core ) {
11
  $this->core = &$core;
@@ -16,6 +17,25 @@ abstract class YARPP_Cache {
16
  $query->yarpp_cache_type = $this->name;
17
  }
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  // Note: return value changed in 3.4
20
  // return YARPP_NO_RELATED | YARPP_RELATED | YARPP_DONT_RUN | false if no good input
21
  function enforce( $reference_ID, $force = false ) {
@@ -45,7 +65,15 @@ abstract class YARPP_Cache {
45
  return YARPP_RELATED;
46
  }
47
 
48
- /*
 
 
 
 
 
 
 
 
49
  * POST STATUS INTERACTIONS
50
  */
51
 
@@ -102,7 +130,7 @@ abstract class YARPP_Cache {
102
  }
103
  }
104
 
105
- /*
106
  * SQL!
107
  */
108
 
@@ -205,23 +233,60 @@ abstract class YARPP_Cache {
205
  return $newsql;
206
  }
207
 
208
- /*
209
  * KEYWORDS
210
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
 
212
- public function title_keywords($ID,$max = 20) {
213
- return $this->extract_keywords(get_the_title($ID),$max);
 
214
  }
215
 
216
- public function body_keywords( $ID, $max = 20 ) {
217
  $post = get_post( $ID );
218
  if ( empty($post) )
219
  return '';
220
  $content = $this->apply_filters_if_white( 'the_content', $post->post_content );
221
- return $this->extract_keywords( $content, $max );
 
 
222
  }
223
 
224
- private function extract_keywords($html, $max = 20) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
225
 
226
  $lang = 'en_US';
227
  if ( defined('WPLANG') ) {
@@ -382,7 +447,6 @@ class YARPP_Cache_Bypass extends YARPP_Cache {
382
  private $related_postdata = array();
383
  private $related_IDs = array();
384
 
385
- private $yarpp_time = false;
386
  public $demo_time = false;
387
  private $demo_limit = 0;
388
 
@@ -397,12 +461,6 @@ class YARPP_Cache_Bypass extends YARPP_Cache {
397
  return true; // always enabled.
398
  }
399
 
400
- public function setup() {
401
- }
402
-
403
- public function upgrade( $last_version ) {
404
- }
405
-
406
  public function cache_status() {
407
  return 0; // always uncached
408
  }
@@ -471,11 +529,7 @@ class YARPP_Cache_Bypass extends YARPP_Cache {
471
 
472
  /**
473
  * RELATEDNESS CACHE CONTROL
474
- */
475
- public function is_yarpp_time() {
476
- return $this->yarpp_time;
477
- }
478
-
479
  public function begin_yarpp_time( $reference_ID, $args ) {
480
  global $wpdb;
481
 
@@ -518,15 +572,6 @@ class YARPP_Cache_Bypass extends YARPP_Cache {
518
  remove_filter('posts_request',array(&$this,'demo_request_filter'));
519
  }
520
 
521
- // @return YARPP_NO_RELATED | YARPP_RELATED | YARPP_NOT_CACHED
522
- public function is_cached($reference_ID) {
523
- return YARPP_NOT_CACHED;
524
- }
525
-
526
- public function clear($reference_ID) {
527
- return;
528
- }
529
-
530
  // @return YARPP_NO_RELATED | YARPP_RELATED | YARPP_NOT_CACHED
531
  public function update($reference_ID) {
532
  global $wpdb;
@@ -538,9 +583,6 @@ class YARPP_Cache_Bypass extends YARPP_Cache {
538
  return YARPP_RELATED;
539
  }
540
 
541
- public function flush() {
542
- }
543
-
544
  public function related($reference_ID = null, $related_ID = null) {
545
  global $wpdb;
546
 
@@ -570,33 +612,4 @@ class YARPP_Cache_Bypass extends YARPP_Cache {
570
 
571
  return false;
572
  }
573
-
574
- /**
575
- * KEYWORDS CACHE CONTROL
576
- */
577
-
578
- // @return (array) with body and title keywords
579
- private function cache_keywords($ID) {
580
- return array(
581
- 'body' => $this->body_keywords($ID),
582
- 'title' => $this->title_keywords($ID)
583
- );
584
- }
585
-
586
- // @param $ID (int)
587
- // @param $type (string) body | title | all
588
- // @return (string|array) depending on whether "all" were requested or not
589
- public function get_keywords( $ID, $type = 'all' ) {
590
- if ( !$ID = absint($ID) )
591
- return false;
592
-
593
- $keywords = $this->cache_keywords($ID);
594
-
595
- if ( empty($keywords) )
596
- return false;
597
-
598
- if ( 'all' == $type )
599
- return $keywords;
600
- return $keywords[$type];
601
- }
602
  }
2
 
3
  abstract class YARPP_Cache {
4
 
5
+ protected $core;
6
  public $score_override = false;
7
  public $online_limit = false;
8
  public $last_sql;
9
+ protected $yarpp_time = false;
10
 
11
  function __construct( &$core ) {
12
  $this->core = &$core;
17
  $query->yarpp_cache_type = $this->name;
18
  }
19
 
20
+ /**
21
+ * GENERAL CACHE CONTROL
22
+ */
23
+ public function is_yarpp_time() {
24
+ return $this->yarpp_time;
25
+ }
26
+
27
+ public function flush() {
28
+ }
29
+
30
+ public function setup() {
31
+ }
32
+
33
+ public function upgrade( $last_version ) {
34
+ }
35
+
36
+ /**
37
+ * POST CACHE CONTROL
38
+ */
39
  // Note: return value changed in 3.4
40
  // return YARPP_NO_RELATED | YARPP_RELATED | YARPP_DONT_RUN | false if no good input
41
  function enforce( $reference_ID, $force = false ) {
65
  return YARPP_RELATED;
66
  }
67
 
68
+ // @return YARPP_NO_RELATED | YARPP_RELATED | YARPP_NOT_CACHED
69
+ public function is_cached($reference_ID) {
70
+ return YARPP_NOT_CACHED;
71
+ }
72
+
73
+ public function clear($reference_ID) {
74
+ }
75
+
76
+ /**
77
  * POST STATUS INTERACTIONS
78
  */
79
 
130
  }
131
  }
132
 
133
+ /**
134
  * SQL!
135
  */
136
 
233
  return $newsql;
234
  }
235
 
236
+ /**
237
  * KEYWORDS
238
  */
239
+
240
+ // @param $ID (int)
241
+ // @param $type (string) body | title | all
242
+ // @return (string|array) depending on whether "all" were requested or not
243
+ public function get_keywords( $ID, $type = 'all' ) {
244
+ if ( !$ID = absint($ID) )
245
+ return false;
246
+
247
+ $keywords = array(
248
+ 'body' => $this->body_keywords($ID),
249
+ 'title' => $this->title_keywords($ID)
250
+ );
251
+
252
+ if ( empty($keywords) )
253
+ return false;
254
+
255
+ if ( 'all' == $type )
256
+ return $keywords;
257
+ return $keywords[$type];
258
+ }
259
 
260
+ protected function title_keywords( $ID, $max = 20 ) {
261
+ return apply_filters( 'yarpp_title_keywords',
262
+ $this->extract_keywords( get_the_title($ID), $max, $ID ), $max, $ID );
263
  }
264
 
265
+ protected function body_keywords( $ID, $max = 20 ) {
266
  $post = get_post( $ID );
267
  if ( empty($post) )
268
  return '';
269
  $content = $this->apply_filters_if_white( 'the_content', $post->post_content );
270
+ return apply_filters( 'yarpp_body_keywords',
271
+ $this->extract_keywords( $content, $max, $ID ), $max, $ID );
272
+
273
  }
274
 
275
+ private function extract_keywords( $html, $max = 20, $ID = 0 ) {
276
+
277
+ /**
278
+ * @filter yarpp_extract_keywords
279
+ *
280
+ * Use this filter to override YARPP's built-in keyword computation
281
+ * Return values should be a string of space-delimited words
282
+ *
283
+ * @param $keywords
284
+ * @param $html unfiltered HTML content
285
+ * @param (int) $max maximum number of keywords
286
+ * @param (int) $ID
287
+ */
288
+ if ( $keywords = apply_filters( 'yarpp_extract_keywords', false, $html, $max, $ID ) )
289
+ return $keywords;
290
 
291
  $lang = 'en_US';
292
  if ( defined('WPLANG') ) {
447
  private $related_postdata = array();
448
  private $related_IDs = array();
449
 
 
450
  public $demo_time = false;
451
  private $demo_limit = 0;
452
 
461
  return true; // always enabled.
462
  }
463
 
 
 
 
 
 
 
464
  public function cache_status() {
465
  return 0; // always uncached
466
  }
529
 
530
  /**
531
  * RELATEDNESS CACHE CONTROL
532
+ */
 
 
 
 
533
  public function begin_yarpp_time( $reference_ID, $args ) {
534
  global $wpdb;
535
 
572
  remove_filter('posts_request',array(&$this,'demo_request_filter'));
573
  }
574
 
 
 
 
 
 
 
 
 
 
575
  // @return YARPP_NO_RELATED | YARPP_RELATED | YARPP_NOT_CACHED
576
  public function update($reference_ID) {
577
  global $wpdb;
583
  return YARPP_RELATED;
584
  }
585
 
 
 
 
586
  public function related($reference_ID = null, $related_ID = null) {
587
  global $wpdb;
588
 
612
 
613
  return false;
614
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
615
  }
js/metabox.js ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(function($) {
2
+ var loaded_metabox = false;
3
+ var display = $('#yarpp-related-posts');
4
+ function metabox_display() {
5
+ if ( !$('#yarpp_relatedposts .inside').is(':visible') ||
6
+ !display.length ||
7
+ !$('#post_ID').val() )
8
+ return;
9
+ if ( !loaded_metabox ) {
10
+ loaded_metabox = true;
11
+ $.ajax({type:'POST',
12
+ url: ajaxurl,
13
+ data: {
14
+ action: 'yarpp_display',
15
+ domain: 'metabox',
16
+ ID: $('#post_ID').val(),
17
+ '_ajax_nonce': $('#yarpp_display-nonce').val()
18
+ },
19
+ success:function(html){display.html(html)},
20
+ dataType:'html'});
21
+ }
22
+ }
23
+ $('#yarpp_relatedposts .handlediv, #yarpp_relatedposts-hide').click(
24
+ function() {
25
+ setTimeout(metabox_display, 0);
26
+ });
27
+ metabox_display();
28
+ });
js/options.js ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(function($) {
2
+ // since 3.3: add screen option toggles
3
+ postboxes.add_postbox_toggles(pagenow);
4
+
5
+ function template() {
6
+ if ($('.template').attr('checked')) {
7
+ $('.templated').show();
8
+ $('.not_templated').hide();
9
+ } else {
10
+ $('.templated').hide();
11
+ $('.not_templated').show();
12
+ }
13
+ excerpt();
14
+ }
15
+ $('.template').click(template);
16
+ template();
17
+
18
+ function excerpt() {
19
+ if (!$('.template').attr('checked') && $('.show_excerpt').attr('checked'))
20
+ $('.excerpted').show();
21
+ else
22
+ $('.excerpted').hide();
23
+ }
24
+ $('.show_excerpt,.template').click(excerpt);
25
+
26
+ var loaded_demo_web = false;
27
+ function display() {
28
+ if ( !$('#yarpp_display_web .inside').is(':visible') )
29
+ return;
30
+ if ( !loaded_demo_web ) {
31
+ loaded_demo_web = true;
32
+ var demo_web = $('#display_demo_web');
33
+ $.ajax({type:'POST',
34
+ url: ajaxurl,
35
+ data: {
36
+ action: 'yarpp_display_demo',
37
+ domain: 'website',
38
+ '_ajax_nonce': $('#yarpp_display_demo-nonce').val()
39
+ },
40
+ beforeSend:function(){demo_web.html(loading)},
41
+ success:function(html){demo_web.html('<pre>'+html+'</pre>')},
42
+ dataType:'html'});
43
+ }
44
+ }
45
+ $('#yarpp_display_web .handlediv, #yarpp_display_web-hide').click(display);
46
+ display();
47
+
48
+ var loaded_demo_rss = false;
49
+ function rss_display() {
50
+ if ( !$('#yarpp_display_rss .inside').is(':visible') )
51
+ return;
52
+ if ($('.rss_display').attr('checked')) {
53
+ $('.rss_displayed').show();
54
+ if ( !loaded_demo_rss ) {
55
+ loaded_demo_rss = true;
56
+ var demo_rss = $('#display_demo_rss');
57
+ $.ajax({type:'POST',
58
+ url: ajaxurl,
59
+ data: {
60
+ action: 'yarpp_display_demo',
61
+ domain: 'rss',
62
+ '_ajax_nonce': $('#yarpp_display_demo-nonce').val()
63
+ },
64
+ beforeSend:function(){demo_rss.html(loading)},
65
+ success:function(html){demo_rss.html('<pre>'+html+'</pre>')},
66
+ dataType:'html'});
67
+ }
68
+ rss_template();
69
+ } else {
70
+ $('.rss_displayed').hide();
71
+ }
72
+ }
73
+ $('.rss_display, #yarpp_display_rss .handlediv, #yarpp_display_rss-hide').click(rss_display);
74
+ rss_display();
75
+
76
+ function rss_template() {
77
+ if ($('.rss_template').attr('checked')) {
78
+ $('.rss_templated').show();
79
+ $('.rss_not_templated').hide();
80
+ } else {
81
+ $('.rss_templated').hide();
82
+ $('.rss_not_templated').show();
83
+ }
84
+ rss_excerpt();
85
+ }
86
+ $('.rss_template').click(rss_template);
87
+
88
+ function rss_excerpt() {
89
+ if ($('.rss_display').attr('checked') && $('.rss_show_excerpt').attr('checked'))
90
+ $('.rss_excerpted').show();
91
+ else
92
+ $('.rss_excerpted').hide();
93
+ }
94
+ $('.rss_display,.rss_show_excerpt').click(rss_excerpt);
95
+
96
+ var loaded_disallows = false;
97
+ function load_disallows() {
98
+ if ( loaded_disallows || !$('#yarpp_pool .inside').is(':visible') )
99
+ return;
100
+ loaded_disallows = true;
101
+
102
+ var finished_taxonomies = {},
103
+ term_indices = {};
104
+ function load_disallow(taxonomy) {
105
+ if (taxonomy in finished_taxonomies)
106
+ return;
107
+ var display = $('#exclude_' + taxonomy);
108
+ // only do one query at a time:
109
+ if (display.find('.loading').length)
110
+ return;
111
+
112
+ if ( taxonomy in term_indices )
113
+ term_indices[taxonomy] = term_indices[taxonomy] + 100;
114
+ else
115
+ term_indices[taxonomy] = 0;
116
+ $.ajax({type:'POST',
117
+ url: ajaxurl,
118
+ data: { action: 'yarpp_display_exclude_terms',
119
+ taxonomy: taxonomy,
120
+ offset: term_indices[taxonomy],
121
+ '_ajax_nonce': $('#yarpp_display_exclude_terms-nonce').val()
122
+ },
123
+ beforeSend:function(){
124
+ display.append(loading)
125
+ },
126
+ success:function(html){
127
+ display.find('.loading').remove();
128
+ if (':(' == html) { // no more :(
129
+ finished_taxonomies[taxonomy] = true;
130
+ return;
131
+ }
132
+ display.append(html);
133
+ },
134
+ dataType:'html'}
135
+ );
136
+ }
137
+
138
+ ['post_tag', 'category'].forEach(function(taxonomy) {
139
+ load_disallow(taxonomy);
140
+ $('#exclude_' + taxonomy).parent('.scroll_wrapper').scroll(function() {
141
+ var parent = $(this),
142
+ content = parent.children('div');
143
+ if ( parent.scrollTop() + parent.height() > content.height() - 10 )
144
+ load_disallow(taxonomy);
145
+ })
146
+ });
147
+ }
148
+ $('#yarpp_pool .handlediv, #yarpp_pool-hide').click(load_disallows);
149
+ load_disallows();
150
+ });
lang/yarpp-ja.mo CHANGED
Binary file
lang/yarpp-ja_JP.po CHANGED
@@ -19,40 +19,40 @@ msgstr ""
19
  "X-Poedit-SearchPath-0: .\n"
20
  "X-Textdomain-Support: yes"
21
 
22
- #: class-admin.php:25
23
  #@ yarpp
24
  msgid "Related Posts"
25
  msgstr "関連記事"
26
 
27
- #: options.php:62
28
  #, php-format
29
  #@ yarpp
30
  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."
31
  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>ストーレージエンジンを使用しているので、このふたつのオプションは使えません。"
32
 
33
- #: options.php:64
34
  #, php-format
35
  #@ yarpp
36
  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."
37
  msgstr "このオプションを使用したければ、<code>%s</code>テーブルに対してこのようなクエリを実行してください:<code>ALTER TABLE `%s` ENGINE = MyISAM;</code>。このクエリはデータは一切消しません。"
38
 
39
- #: options.php:66
40
  #, php-format
41
  #@ yarpp
42
  msgid "If, despite this check, you are sure that <code>%s</code> is using the MyISAM engine, press this magic button:"
43
  msgstr "<code>%s</code>テーブルが絶対MyISAMを使用していると思う方はこちらの魔法のボタンをどうぞ:"
44
 
45
- #: options.php:69
46
  #@ yarpp
47
  msgid "Trust me. Let me use MyISAM features."
48
  msgstr "MyISAM を使ってます。嘘じゃないから。"
49
 
50
- #: options.php:81
51
  #@ yarpp
52
  msgid "The YARPP database had an error but has been fixed."
53
  msgstr "YARPPのデータベースは修正されました。"
54
 
55
- #: options.php:83
56
  #@ yarpp
57
  msgid "The YARPP database has an error which could not be fixed."
58
  msgstr "YARPPのデータベースに修正できないエラーが発生しました。"
@@ -86,134 +86,134 @@ msgstr "共有の%sをふたつ以上必要とする"
86
  msgid "consider with extra weight"
87
  msgstr "検討する(重要視)"
88
 
89
- #: options-meta-boxes.php:286
90
  #@ default
91
  #@ yarpp
92
  msgid "Donate to mitcho (Michael Yoshitaka Erlewine) for this plugin via PayPal"
93
  msgstr "YARPPの作成者(ミッチョ)にPayPalで寄付をする"
94
 
95
- #: options.php:123
96
  #@ yarpp
97
  msgid "Yet Another Related Posts Plugin Options"
98
  msgstr "関連記事 (YARPP) 設定"
99
 
100
- #: options-meta-boxes.php:131
101
  #@ yarpp
102
  msgid "\"The Pool\""
103
  msgstr "フィルター設定"
104
 
105
- #: options-meta-boxes.php:99
106
  #@ yarpp
107
  msgid "\"The Pool\" refers to the pool of posts and pages that are candidates for display as related to the current entry."
108
  msgstr "関連記事として表示したい記事を制限します。"
109
 
110
- #: options-meta-boxes.php:113
111
  #@ yarpp
112
  msgid "Show password protected posts?"
113
  msgstr "パスワードで保護されている記事も表示"
114
 
115
- #: options-meta-boxes.php:160
116
  #@ yarpp
117
  msgid "Show only previous posts?"
118
  msgstr "過去の記事だけを表示"
119
 
120
- #: options-meta-boxes.php:168
121
  #@ yarpp
122
  msgid "\"Relatedness\" options"
123
  msgstr "関連スコア設定"
124
 
125
- #: options-meta-boxes.php:143
126
  #@ yarpp
127
  msgid "Match threshold:"
128
  msgstr "表示する最低関連スコア"
129
 
130
- #: options-meta-boxes.php:144
131
  #@ yarpp
132
  msgid "Titles: "
133
  msgstr "タイトル:"
134
 
135
- #: options-meta-boxes.php:146
136
  #@ yarpp
137
  msgid "Bodies: "
138
  msgstr "内容:"
139
 
140
- #: options-meta-boxes.php:159
141
  #@ yarpp
142
  msgid "Cross-relate posts and pages?"
143
  msgstr "記事とページを関連づける"
144
 
145
- #: options-meta-boxes.php:159
146
  #@ yarpp
147
  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."
148
  msgstr "「記事とページを関連づける」が有効の場合は <code>related_posts()</code>、 <code>related_pages()</code> と <code>related_entries()</code> は全て記事とページを両方「関連記事/ページ」として表示します。"
149
 
150
- #: options-meta-boxes.php:223
151
  #@ yarpp
152
  msgid "Display options <small>for your website</small>"
153
  msgstr "表示設定 <small>ウェブサイト用</small>"
154
 
155
- #: options-meta-boxes.php:177
156
  #@ yarpp
157
  msgid "Automatically display related posts?"
158
  msgstr "自動的に関連記事を表示する"
159
 
160
- #: options-meta-boxes.php:177
161
  #@ yarpp
162
  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."
163
  msgstr "単体記事表示時に自動的に関連記事を表示します。この自動表示を無効にすると、テーマファイルに<code>related_posts()</code>を入れる必要があります。"
164
 
165
- #: options-meta-boxes.php:178
166
  #@ yarpp
167
  msgid "Website display code example"
168
  msgstr "ウェブサイト表示のソース例"
169
 
170
- #: options-meta-boxes.php:178
171
- #: options-meta-boxes.php:232
172
  #@ yarpp
173
  msgid "(Update options to reload.)"
174
  msgstr "(設定保存時に更新されます)"
175
 
176
- #: options-meta-boxes.php:180
177
- #: options-meta-boxes.php:237
178
  #@ yarpp
179
  msgid "Maximum number of related posts:"
180
  msgstr "一度に表示する関連記事数"
181
 
182
- #: options-meta-boxes.php:195
183
- #: options-meta-boxes.php:255
184
  #@ yarpp
185
  msgid "Before / after related entries:"
186
  msgstr "関連記事表示を囲むタグ:"
187
 
188
- #: options-meta-boxes.php:195
189
- #: options-meta-boxes.php:196
190
- #: options-meta-boxes.php:204
191
- #: options-meta-boxes.php:255
192
- #: options-meta-boxes.php:256
193
- #: options-meta-boxes.php:261
194
  #@ yarpp
195
  msgid "For example:"
196
  msgstr "例:"
197
 
198
- #: options-meta-boxes.php:196
199
- #: options-meta-boxes.php:256
200
  #@ yarpp
201
  msgid "Before / after each related entry:"
202
  msgstr "各関連記事を囲むタグ:"
203
 
204
- #: options-meta-boxes.php:198
205
- #: options-meta-boxes.php:258
206
  #@ yarpp
207
  msgid "Show excerpt?"
208
  msgstr "抜粋を表示?"
209
 
210
- #: options-meta-boxes.php:199
211
- #: options-meta-boxes.php:259
212
  #@ yarpp
213
  msgid "Excerpt length (No. of words):"
214
  msgstr "抜粋の長さ(単語数):"
215
 
216
- #: options-meta-boxes.php:203
217
  #@ yarpp
218
  msgid "Before / after (Excerpt):"
219
  msgstr "抜粋を囲むタグ:"
@@ -253,63 +253,63 @@ msgstr "タイトル順(昇順)"
253
  msgid "title (reverse alphabetical)"
254
  msgstr "タイトル順(降順)"
255
 
256
- #: options-meta-boxes.php:211
257
- #: options-meta-boxes.php:265
258
  #@ yarpp
259
  msgid "Default display if no results:"
260
  msgstr "関連記事がない時のメッセージ"
261
 
262
- #: class-widget.php:72
263
- #: options-meta-boxes.php:214
264
- #: options-meta-boxes.php:267
265
  #@ yarpp
266
  msgid "Help promote Yet Another Related Posts Plugin?"
267
  msgstr "この関連記事プラグイン(YARPP)を宣伝しますか?"
268
 
269
- #: options-meta-boxes.php:216
270
- #: options-meta-boxes.php:268
271
  #, php-format
272
  #@ yarpp
273
  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."
274
  msgstr "関連記事表示の下に「%s」というコードを挿入します。"
275
 
276
- #: options-meta-boxes.php:275
277
  #@ yarpp
278
  msgid "Display options <small>for RSS</small>"
279
  msgstr "表示設定 <small>RSS/Atom フィード用</small>"
280
 
281
- #: options-meta-boxes.php:232
282
  #@ yarpp
283
  msgid "Display related posts in feeds?"
284
  msgstr "自動的にフィードで関連記事を表示する"
285
 
286
- #: options-meta-boxes.php:234
287
  #@ yarpp
288
  msgid "Display related posts in the descriptions?"
289
  msgstr "フィード内の抜粋にも自動的に関連記事を表示する"
290
 
291
- #: options-meta-boxes.php:234
292
  #@ yarpp
293
  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."
294
  msgstr "フィード内の全文表示に関連記事を表示するだけでなく、フィード内の抜粋でも関連記事が表示されます。WordPressの設定によりフィードに抜粋のみを表示している場合は、このオプションが無効の場合関連記事がフィード内で表示されません。"
295
 
296
- #: options-meta-boxes.php:232
297
  #@ yarpp
298
  msgid "RSS display code example"
299
  msgstr "RSS表示のソース例"
300
 
301
- #: options-meta-boxes.php:261
302
  #@ yarpp
303
  msgid "Before / after (excerpt):"
304
  msgstr "抜粋を囲むタグ:"
305
 
306
- #: template-builtin.php:31
307
  #, php-format
308
  #@ yarpp
309
  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."
310
  msgstr "%fは現在表示の記事とこの関連記事の関連スコアです。この関連スコアはログイン済みのサイト管理者のみに表示されます。"
311
 
312
- #: class-admin.php:17
313
  #: class-widget.php:7
314
  #: class-widget.php:28
315
  #@ yarpp
@@ -321,168 +321,167 @@ msgstr "関連記事 (YARPP)"
321
  msgid "The MyISAM check has been overridden. You may now use the \"consider titles\" and \"consider bodies\" relatedness criteria."
322
  msgstr "MyISAM専用機能を強制的に有効にしました。「タイトルを検討」と「内容を検討」機能が使えるようになりました。"
323
 
324
- #: options-meta-boxes.php:137
325
- #: options-meta-boxes.php:159
326
- #: options-meta-boxes.php:177
327
- #: options-meta-boxes.php:181
328
- #: options-meta-boxes.php:215
329
- #: options-meta-boxes.php:232
330
- #: options-meta-boxes.php:234
331
- #: options-meta-boxes.php:239
332
- #: options-meta-boxes.php:267
333
  #@ yarpp
334
  msgid "more&gt;"
335
  msgstr "(説明)"
336
 
337
- #: options.php:117
338
  #@ yarpp
339
  msgid "Options saved!"
340
  msgstr "設定の変更は保存されました。"
341
 
342
- #: options.php:161
343
- #@ yarpp
344
- msgid "Update options"
345
- msgstr "変更を保存"
346
-
347
- #: options-meta-boxes.php:137
348
  #@ yarpp
349
  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."
350
  msgstr "より関連性の高い記事だけを表示したい場合は、最低関連スコアを上げてください。初期設定は5です。"
351
 
352
- #: cache-postmeta.php:112
353
- #: cache-tables.php:132
354
  #@ yarpp
355
  msgid "Example post "
356
  msgstr "例:"
357
 
358
- #: template-metabox.php:13
359
  #@ yarpp
360
  msgid "These are the related entries for this entry. Updating this post may change these related posts."
361
  msgstr "この投稿の関連記事。投稿を更新すると関連記事も変わる可能性があります。"
362
 
363
- #: template-metabox.php:29
364
  #@ yarpp
365
  msgid "Whether all of these related entries are actually displayed and how they are displayed depends on your YARPP display options."
366
  msgstr "関連記事候補が全て表示されるかどうかは YARPP (関連記事) オプションの表示設定によって異なります。"
367
 
368
- #: includes.php:23
369
- #: includes.php:34
370
- #: template-metabox.php:31
 
 
371
  #: template-widget.php:13
372
  #@ yarpp
373
  msgid "No related posts."
374
  msgstr "関連記事はありません。"
375
 
376
- #: options-meta-boxes.php:118
377
  #@ yarpp
378
  msgid "day(s)"
379
  msgstr "日間"
380
 
381
- #: options-meta-boxes.php:119
382
  #@ yarpp
383
  msgid "week(s)"
384
  msgstr "週間"
385
 
386
- #: options-meta-boxes.php:120
387
  #@ yarpp
388
  msgid "month(s)"
389
  msgstr "ヶ月間"
390
 
391
- #: options-meta-boxes.php:122
392
  #@ yarpp
393
  msgid "Show only posts from the past NUMBER UNITS"
394
  msgstr "過去 NUMBER UNITS の記事だけを表示"
395
 
396
- #: class-widget.php:63
397
- #: options-meta-boxes.php:181
398
- #: options-meta-boxes.php:239
399
  #@ yarpp
400
  msgid "Display using a custom template file"
401
  msgstr "テンプレートを使って表示"
402
 
403
- #: class-widget.php:64
404
- #: options-meta-boxes.php:185
405
- #: options-meta-boxes.php:244
406
  #@ yarpp
407
  msgid "Template file:"
408
  msgstr "テンプレートファイル:"
409
 
410
- #: options-meta-boxes.php:232
411
  #@ yarpp
412
  msgid "This option displays related posts at the end of each item in your RSS and Atom feeds. No template changes are needed."
413
  msgstr "RSSとAtomフィード内に関連記事を表示。テーマの変更は必要ありません。"
414
 
415
- #: options-meta-boxes.php:239
416
  #@ yarpp
417
  msgid "NEW!"
418
  msgstr ""
419
 
420
- #: options-meta-boxes.php:181
421
- #: options-meta-boxes.php:239
422
  #@ yarpp
423
  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."
424
  msgstr "この新機能で関連記事の表示を完全にカスタマイズする事が出来ます。テンプレートファイルは PHP でかき、使用テーマのフォルダにいれます。"
425
 
426
- #: includes.php:21
427
- #: includes.php:32
 
 
428
  #@ yarpp
429
  msgid "Related posts:"
430
  msgstr "関連記事:"
431
 
432
- #: options-meta-boxes.php:195
433
- #: options-meta-boxes.php:196
434
- #: options-meta-boxes.php:204
435
- #: options-meta-boxes.php:255
436
- #: options-meta-boxes.php:256
437
- #: options-meta-boxes.php:261
438
  #@ yarpp
439
  msgid " or "
440
  msgstr "、"
441
 
442
- #: class-admin.php:46
443
- #@ yarpp
444
  msgid "Settings"
445
  msgstr "設定"
446
 
447
- #: class-widget.php:56
448
  #@ default
449
  msgid "Title:"
450
  msgstr ""
451
 
452
- #: class-admin.php:61
453
  #@ yarpp
454
  msgid "Related entries may be displayed once you save your entry"
455
  msgstr "関連記事は保存後更新されます。"
456
 
457
- #: magic.php:236
458
- #: options-meta-boxes.php:216
459
- #: options-meta-boxes.php:268
 
460
  #, php-format
461
  #@ yarpp
462
  msgid "Related posts brought to you by <a href='%s'>Yet Another Related Posts Plugin</a>."
463
  msgstr "関連記事は<a href='%s'>YARPP関連記事プラグイン</a>によって表示されています。"
464
 
465
- #: options-meta-boxes.php:137
466
  #@ yarpp
467
  msgid "YARPP limits the related posts list by (1) a maximum number and (2) a <em>match threshold</em>."
468
  msgstr "この関連記事プラグイン(YARPP)は各対象記事の関連スコアを計算し、ある関連スコア以上の記事だけを表示します。"
469
 
470
- #: options-meta-boxes.php:282
471
  #@ yarpp
472
  msgid "YARPP Forum"
473
  msgstr "YARPP フォーラム"
474
 
475
- #: options-meta-boxes.php:283
476
  #@ yarpp
477
  msgid "YARPP on Twitter"
478
  msgstr "YARPP Twitter"
479
 
480
- #: options-meta-boxes.php:284
481
  #@ yarpp
482
  msgid "YARPP on the Web"
483
  msgstr "ウェブサイト"
484
 
485
- #: options-meta-boxes.php:321
486
  #@ yarpp
487
  msgid "Contact YARPP"
488
  msgstr "YARPP 情報"
@@ -499,31 +498,46 @@ msgstr ""
499
  msgid "There is a new beta (%s) of Yet Another Related Posts Plugin. You can <a href=\"%s\">download it here</a> at your own risk."
500
  msgstr "関連記事プラグイン(YARPP)の新しいベータ(%s)があります。是非<a href=\"%s\">ダウンロード</a>してみてください。"
501
 
502
- #: options.php:84
503
  #, php-format
504
  #@ yarpp
505
  msgid "Please try <a href=\"%s\" target=\"_blank\">manual SQL setup</a>."
506
  msgstr ""
507
 
508
- #: options.php:131
509
  #, php-format
510
  #@ yarpp
511
  msgid "by <a href=\"%s\" target=\"_blank\">mitcho (Michael 芳貴 Erlewine)</a>"
512
  msgstr "by <a href=\"%s\" target=\"_blank\">みっちょ (アーリーワイン・マイケル芳貴)</a>"
513
 
514
- #: options-meta-boxes.php:285
515
  #@ yarpp
516
  msgid "Rate YARPP on WordPress.org"
517
  msgstr "WordPress.org で YARPP を評価する"
518
 
519
- #: class-admin.php:25
520
  #@ default
521
  msgid "Configure"
522
  msgstr ""
523
 
524
- #: options-meta-boxes.php:111
525
  #, php-format
526
  #@ yarpp
527
  msgid "Disallow by %s:"
528
  msgstr "この%sの記事を表示しない"
529
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  "X-Poedit-SearchPath-0: .\n"
20
  "X-Textdomain-Support: yes"
21
 
22
+ #: class-admin.php:42
23
  #@ yarpp
24
  msgid "Related Posts"
25
  msgstr "関連記事"
26
 
27
+ #: options.php:61
28
  #, php-format
29
  #@ yarpp
30
  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."
31
  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>ストーレージエンジンを使用しているので、このふたつのオプションは使えません。"
32
 
33
+ #: options.php:63
34
  #, php-format
35
  #@ yarpp
36
  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."
37
  msgstr "このオプションを使用したければ、<code>%s</code>テーブルに対してこのようなクエリを実行してください:<code>ALTER TABLE `%s` ENGINE = MyISAM;</code>。このクエリはデータは一切消しません。"
38
 
39
+ #: options.php:65
40
  #, php-format
41
  #@ yarpp
42
  msgid "If, despite this check, you are sure that <code>%s</code> is using the MyISAM engine, press this magic button:"
43
  msgstr "<code>%s</code>テーブルが絶対MyISAMを使用していると思う方はこちらの魔法のボタンをどうぞ:"
44
 
45
+ #: options.php:68
46
  #@ yarpp
47
  msgid "Trust me. Let me use MyISAM features."
48
  msgstr "MyISAM を使ってます。嘘じゃないから。"
49
 
50
+ #: options.php:80
51
  #@ yarpp
52
  msgid "The YARPP database had an error but has been fixed."
53
  msgstr "YARPPのデータベースは修正されました。"
54
 
55
+ #: options.php:82
56
  #@ yarpp
57
  msgid "The YARPP database has an error which could not be fixed."
58
  msgstr "YARPPのデータベースに修正できないエラーが発生しました。"
86
  msgid "consider with extra weight"
87
  msgstr "検討する(重要視)"
88
 
89
+ #: options-meta-boxes.php:275
90
  #@ default
91
  #@ yarpp
92
  msgid "Donate to mitcho (Michael Yoshitaka Erlewine) for this plugin via PayPal"
93
  msgstr "YARPPの作成者(ミッチョ)にPayPalで寄付をする"
94
 
95
+ #: options.php:120
96
  #@ yarpp
97
  msgid "Yet Another Related Posts Plugin Options"
98
  msgstr "関連記事 (YARPP) 設定"
99
 
100
+ #: options-meta-boxes.php:126
101
  #@ yarpp
102
  msgid "\"The Pool\""
103
  msgstr "フィルター設定"
104
 
105
+ #: options-meta-boxes.php:100
106
  #@ yarpp
107
  msgid "\"The Pool\" refers to the pool of posts and pages that are candidates for display as related to the current entry."
108
  msgstr "関連記事として表示したい記事を制限します。"
109
 
110
+ #: options-meta-boxes.php:108
111
  #@ yarpp
112
  msgid "Show password protected posts?"
113
  msgstr "パスワードで保護されている記事も表示"
114
 
115
+ #: options-meta-boxes.php:149
116
  #@ yarpp
117
  msgid "Show only previous posts?"
118
  msgstr "過去の記事だけを表示"
119
 
120
+ #: options-meta-boxes.php:157
121
  #@ yarpp
122
  msgid "\"Relatedness\" options"
123
  msgstr "関連スコア設定"
124
 
125
+ #: options-meta-boxes.php:138
126
  #@ yarpp
127
  msgid "Match threshold:"
128
  msgstr "表示する最低関連スコア"
129
 
130
+ #: options-meta-boxes.php:139
131
  #@ yarpp
132
  msgid "Titles: "
133
  msgstr "タイトル:"
134
 
135
+ #: options-meta-boxes.php:141
136
  #@ yarpp
137
  msgid "Bodies: "
138
  msgstr "内容:"
139
 
140
+ #: options-meta-boxes.php:148
141
  #@ yarpp
142
  msgid "Cross-relate posts and pages?"
143
  msgstr "記事とページを関連づける"
144
 
145
+ #: options-meta-boxes.php:148
146
  #@ yarpp
147
  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."
148
  msgstr "「記事とページを関連づける」が有効の場合は <code>related_posts()</code>、 <code>related_pages()</code> と <code>related_entries()</code> は全て記事とページを両方「関連記事/ページ」として表示します。"
149
 
150
+ #: options-meta-boxes.php:212
151
  #@ yarpp
152
  msgid "Display options <small>for your website</small>"
153
  msgstr "表示設定 <small>ウェブサイト用</small>"
154
 
155
+ #: options-meta-boxes.php:166
156
  #@ yarpp
157
  msgid "Automatically display related posts?"
158
  msgstr "自動的に関連記事を表示する"
159
 
160
+ #: options-meta-boxes.php:166
161
  #@ yarpp
162
  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."
163
  msgstr "単体記事表示時に自動的に関連記事を表示します。この自動表示を無効にすると、テーマファイルに<code>related_posts()</code>を入れる必要があります。"
164
 
165
+ #: options-meta-boxes.php:167
166
  #@ yarpp
167
  msgid "Website display code example"
168
  msgstr "ウェブサイト表示のソース例"
169
 
170
+ #: options-meta-boxes.php:167
171
+ #: options-meta-boxes.php:221
172
  #@ yarpp
173
  msgid "(Update options to reload.)"
174
  msgstr "(設定保存時に更新されます)"
175
 
176
+ #: options-meta-boxes.php:169
177
+ #: options-meta-boxes.php:226
178
  #@ yarpp
179
  msgid "Maximum number of related posts:"
180
  msgstr "一度に表示する関連記事数"
181
 
182
+ #: options-meta-boxes.php:184
183
+ #: options-meta-boxes.php:244
184
  #@ yarpp
185
  msgid "Before / after related entries:"
186
  msgstr "関連記事表示を囲むタグ:"
187
 
188
+ #: options-meta-boxes.php:184
189
+ #: options-meta-boxes.php:185
190
+ #: options-meta-boxes.php:193
191
+ #: options-meta-boxes.php:244
192
+ #: options-meta-boxes.php:245
193
+ #: options-meta-boxes.php:250
194
  #@ yarpp
195
  msgid "For example:"
196
  msgstr "例:"
197
 
198
+ #: options-meta-boxes.php:185
199
+ #: options-meta-boxes.php:245
200
  #@ yarpp
201
  msgid "Before / after each related entry:"
202
  msgstr "各関連記事を囲むタグ:"
203
 
204
+ #: options-meta-boxes.php:187
205
+ #: options-meta-boxes.php:247
206
  #@ yarpp
207
  msgid "Show excerpt?"
208
  msgstr "抜粋を表示?"
209
 
210
+ #: options-meta-boxes.php:188
211
+ #: options-meta-boxes.php:248
212
  #@ yarpp
213
  msgid "Excerpt length (No. of words):"
214
  msgstr "抜粋の長さ(単語数):"
215
 
216
+ #: options-meta-boxes.php:192
217
  #@ yarpp
218
  msgid "Before / after (Excerpt):"
219
  msgstr "抜粋を囲むタグ:"
253
  msgid "title (reverse alphabetical)"
254
  msgstr "タイトル順(降順)"
255
 
256
+ #: options-meta-boxes.php:200
257
+ #: options-meta-boxes.php:254
258
  #@ yarpp
259
  msgid "Default display if no results:"
260
  msgstr "関連記事がない時のメッセージ"
261
 
262
+ #: class-widget.php:74
263
+ #: options-meta-boxes.php:203
264
+ #: options-meta-boxes.php:256
265
  #@ yarpp
266
  msgid "Help promote Yet Another Related Posts Plugin?"
267
  msgstr "この関連記事プラグイン(YARPP)を宣伝しますか?"
268
 
269
+ #: options-meta-boxes.php:205
270
+ #: options-meta-boxes.php:257
271
  #, php-format
272
  #@ yarpp
273
  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."
274
  msgstr "関連記事表示の下に「%s」というコードを挿入します。"
275
 
276
+ #: options-meta-boxes.php:264
277
  #@ yarpp
278
  msgid "Display options <small>for RSS</small>"
279
  msgstr "表示設定 <small>RSS/Atom フィード用</small>"
280
 
281
+ #: options-meta-boxes.php:221
282
  #@ yarpp
283
  msgid "Display related posts in feeds?"
284
  msgstr "自動的にフィードで関連記事を表示する"
285
 
286
+ #: options-meta-boxes.php:223
287
  #@ yarpp
288
  msgid "Display related posts in the descriptions?"
289
  msgstr "フィード内の抜粋にも自動的に関連記事を表示する"
290
 
291
+ #: options-meta-boxes.php:223
292
  #@ yarpp
293
  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."
294
  msgstr "フィード内の全文表示に関連記事を表示するだけでなく、フィード内の抜粋でも関連記事が表示されます。WordPressの設定によりフィードに抜粋のみを表示している場合は、このオプションが無効の場合関連記事がフィード内で表示されません。"
295
 
296
+ #: options-meta-boxes.php:221
297
  #@ yarpp
298
  msgid "RSS display code example"
299
  msgstr "RSS表示のソース例"
300
 
301
+ #: options-meta-boxes.php:250
302
  #@ yarpp
303
  msgid "Before / after (excerpt):"
304
  msgstr "抜粋を囲むタグ:"
305
 
306
+ #: template-builtin.php:20
307
  #, php-format
308
  #@ yarpp
309
  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."
310
  msgstr "%fは現在表示の記事とこの関連記事の関連スコアです。この関連スコアはログイン済みのサイト管理者のみに表示されます。"
311
 
312
+ #: class-admin.php:34
313
  #: class-widget.php:7
314
  #: class-widget.php:28
315
  #@ yarpp
321
  msgid "The MyISAM check has been overridden. You may now use the \"consider titles\" and \"consider bodies\" relatedness criteria."
322
  msgstr "MyISAM専用機能を強制的に有効にしました。「タイトルを検討」と「内容を検討」機能が使えるようになりました。"
323
 
324
+ #: options-meta-boxes.php:132
325
+ #: options-meta-boxes.php:148
326
+ #: options-meta-boxes.php:166
327
+ #: options-meta-boxes.php:170
328
+ #: options-meta-boxes.php:204
329
+ #: options-meta-boxes.php:221
330
+ #: options-meta-boxes.php:223
331
+ #: options-meta-boxes.php:228
332
+ #: options-meta-boxes.php:256
333
  #@ yarpp
334
  msgid "more&gt;"
335
  msgstr "(説明)"
336
 
337
+ #: options.php:114
338
  #@ yarpp
339
  msgid "Options saved!"
340
  msgstr "設定の変更は保存されました。"
341
 
342
+ #: options-meta-boxes.php:132
 
 
 
 
 
343
  #@ yarpp
344
  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."
345
  msgstr "より関連性の高い記事だけを表示したい場合は、最低関連スコアを上げてください。初期設定は5です。"
346
 
347
+ #: class-cache.php:460
 
348
  #@ yarpp
349
  msgid "Example post "
350
  msgstr "例:"
351
 
352
+ #: template-metabox.php:12
353
  #@ yarpp
354
  msgid "These are the related entries for this entry. Updating this post may change these related posts."
355
  msgstr "この投稿の関連記事。投稿を更新すると関連記事も変わる可能性があります。"
356
 
357
+ #: template-metabox.php:28
358
  #@ yarpp
359
  msgid "Whether all of these related entries are actually displayed and how they are displayed depends on your YARPP display options."
360
  msgstr "関連記事候補が全て表示されるかどうかは YARPP (関連記事) オプションの表示設定によって異なります。"
361
 
362
+ #: class-core.php:79
363
+ #: class-core.php:90
364
+ #: class-core.php:268
365
+ #: class-core.php:279
366
+ #: template-metabox.php:30
367
  #: template-widget.php:13
368
  #@ yarpp
369
  msgid "No related posts."
370
  msgstr "関連記事はありません。"
371
 
372
+ #: options-meta-boxes.php:113
373
  #@ yarpp
374
  msgid "day(s)"
375
  msgstr "日間"
376
 
377
+ #: options-meta-boxes.php:114
378
  #@ yarpp
379
  msgid "week(s)"
380
  msgstr "週間"
381
 
382
+ #: options-meta-boxes.php:115
383
  #@ yarpp
384
  msgid "month(s)"
385
  msgstr "ヶ月間"
386
 
387
+ #: options-meta-boxes.php:117
388
  #@ yarpp
389
  msgid "Show only posts from the past NUMBER UNITS"
390
  msgstr "過去 NUMBER UNITS の記事だけを表示"
391
 
392
+ #: class-widget.php:65
393
+ #: options-meta-boxes.php:170
394
+ #: options-meta-boxes.php:228
395
  #@ yarpp
396
  msgid "Display using a custom template file"
397
  msgstr "テンプレートを使って表示"
398
 
399
+ #: class-widget.php:66
400
+ #: options-meta-boxes.php:174
401
+ #: options-meta-boxes.php:233
402
  #@ yarpp
403
  msgid "Template file:"
404
  msgstr "テンプレートファイル:"
405
 
406
+ #: options-meta-boxes.php:221
407
  #@ yarpp
408
  msgid "This option displays related posts at the end of each item in your RSS and Atom feeds. No template changes are needed."
409
  msgstr "RSSとAtomフィード内に関連記事を表示。テーマの変更は必要ありません。"
410
 
411
+ #: options-meta-boxes.php:228
412
  #@ yarpp
413
  msgid "NEW!"
414
  msgstr ""
415
 
416
+ #: options-meta-boxes.php:170
417
+ #: options-meta-boxes.php:228
418
  #@ yarpp
419
  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."
420
  msgstr "この新機能で関連記事の表示を完全にカスタマイズする事が出来ます。テンプレートファイルは PHP でかき、使用テーマのフォルダにいれます。"
421
 
422
+ #: class-core.php:77
423
+ #: class-core.php:88
424
+ #: class-core.php:266
425
+ #: class-core.php:277
426
  #@ yarpp
427
  msgid "Related posts:"
428
  msgstr "関連記事:"
429
 
430
+ #: options-meta-boxes.php:184
431
+ #: options-meta-boxes.php:185
432
+ #: options-meta-boxes.php:193
433
+ #: options-meta-boxes.php:244
434
+ #: options-meta-boxes.php:245
435
+ #: options-meta-boxes.php:250
436
  #@ yarpp
437
  msgid " or "
438
  msgstr "、"
439
 
440
+ #: class-admin.php:113
441
+ #@ default
442
  msgid "Settings"
443
  msgstr "設定"
444
 
445
+ #: class-widget.php:58
446
  #@ default
447
  msgid "Title:"
448
  msgstr ""
449
 
450
+ #: class-admin.php:139
451
  #@ yarpp
452
  msgid "Related entries may be displayed once you save your entry"
453
  msgstr "関連記事は保存後更新されます。"
454
 
455
+ #: class-core.php:472
456
+ #: class-core.php:585
457
+ #: options-meta-boxes.php:205
458
+ #: options-meta-boxes.php:257
459
  #, php-format
460
  #@ yarpp
461
  msgid "Related posts brought to you by <a href='%s'>Yet Another Related Posts Plugin</a>."
462
  msgstr "関連記事は<a href='%s'>YARPP関連記事プラグイン</a>によって表示されています。"
463
 
464
+ #: options-meta-boxes.php:132
465
  #@ yarpp
466
  msgid "YARPP limits the related posts list by (1) a maximum number and (2) a <em>match threshold</em>."
467
  msgstr "この関連記事プラグイン(YARPP)は各対象記事の関連スコアを計算し、ある関連スコア以上の記事だけを表示します。"
468
 
469
+ #: options-meta-boxes.php:271
470
  #@ yarpp
471
  msgid "YARPP Forum"
472
  msgstr "YARPP フォーラム"
473
 
474
+ #: options-meta-boxes.php:272
475
  #@ yarpp
476
  msgid "YARPP on Twitter"
477
  msgstr "YARPP Twitter"
478
 
479
+ #: options-meta-boxes.php:273
480
  #@ yarpp
481
  msgid "YARPP on the Web"
482
  msgstr "ウェブサイト"
483
 
484
+ #: options-meta-boxes.php:310
485
  #@ yarpp
486
  msgid "Contact YARPP"
487
  msgstr "YARPP 情報"
498
  msgid "There is a new beta (%s) of Yet Another Related Posts Plugin. You can <a href=\"%s\">download it here</a> at your own risk."
499
  msgstr "関連記事プラグイン(YARPP)の新しいベータ(%s)があります。是非<a href=\"%s\">ダウンロード</a>してみてください。"
500
 
501
+ #: options.php:83
502
  #, php-format
503
  #@ yarpp
504
  msgid "Please try <a href=\"%s\" target=\"_blank\">manual SQL setup</a>."
505
  msgstr ""
506
 
507
+ #: options.php:128
508
  #, php-format
509
  #@ yarpp
510
  msgid "by <a href=\"%s\" target=\"_blank\">mitcho (Michael 芳貴 Erlewine)</a>"
511
  msgstr "by <a href=\"%s\" target=\"_blank\">みっちょ (アーリーワイン・マイケル芳貴)</a>"
512
 
513
+ #: options-meta-boxes.php:274
514
  #@ yarpp
515
  msgid "Rate YARPP on WordPress.org"
516
  msgstr "WordPress.org で YARPP を評価する"
517
 
518
+ #: class-admin.php:42
519
  #@ default
520
  msgid "Configure"
521
  msgstr ""
522
 
523
+ #: options-meta-boxes.php:106
524
  #, php-format
525
  #@ yarpp
526
  msgid "Disallow by %s:"
527
  msgstr "この%sの記事を表示しない"
528
 
529
+ #: class-admin.php:68
530
+ #@ yarpp
531
+ msgid "Thank you for installing <span>Yet Another Related Posts Plugin</span>!"
532
+ msgstr "関連記事プラグイン (YARPP) がインストールされました!"
533
+
534
+ #: class-admin.php:69
535
+ #@ yarpp
536
+ msgid "Make sure to visit the <a>Related Posts settings page</a> to customize YARPP."
537
+ msgstr "<a>関連記事設定ページ</a>をご覧ください。"
538
+
539
+ #: options.php:157
540
+ #@ default
541
+ msgid "Save Changes"
542
+ msgstr ""
543
+
options-meta-boxes.php CHANGED
@@ -79,7 +79,7 @@ class YARPP_Meta_Box_Pool extends YARPP_Meta_Box {
79
  ?>
80
  <tr valign='top'>
81
  <th scope='row'><?php echo $string; ?></th>
82
- <td><div class='scroll_wrapper' style="overflow:auto;max-height:100px;"><div id='exclude_<?php echo $taxonomy; ?>'>
83
  <?php
84
  $exclude_terms = yarpp_get_option('exclude');
85
  if ( !empty($exclude_terms[$taxonomy]) ) {
79
  ?>
80
  <tr valign='top'>
81
  <th scope='row'><?php echo $string; ?></th>
82
+ <td><div class='scroll_wrapper' style="overflow:auto;max-height:100px;"><div class='exclude_terms' id='exclude_<?php echo $taxonomy; ?>'>
83
  <?php
84
  $exclude_terms = yarpp_get_option('exclude');
85
  if ( !empty($exclude_terms[$taxonomy]) ) {
options.css CHANGED
@@ -40,3 +40,7 @@ a.info:hover span {
40
  color:#000;
41
  padding:4px;
42
  }
 
 
 
 
40
  color:#000;
41
  padding:4px;
42
  }
43
+
44
+ .exclude_terms span {
45
+ display: inline-block;
46
+ }
options.php CHANGED
@@ -124,15 +124,15 @@ if (isset($_POST['update_yarpp'])) {
124
 
125
  <form method="post">
126
 
127
- <div id="yarpp_author_text">
128
  <small><?php printf(__('by <a href="%s" target="_blank">mitcho (Michael 芳貴 Erlewine)</a>','yarpp'), 'http://mitcho.com/');?></small>
129
- </div>
130
-
131
- <!-- <div style='border:1px solid #ddd;padding:8px;'>-->
132
 
133
  <?php
134
  wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
135
  wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
 
 
136
  ?>
137
  <div id="poststuff" class="metabox-holder has-right-sidebar">
138
 
124
 
125
  <form method="post">
126
 
127
+ <div id="yarpp_author_text">
128
  <small><?php printf(__('by <a href="%s" target="_blank">mitcho (Michael 芳貴 Erlewine)</a>','yarpp'), 'http://mitcho.com/');?></small>
129
+ </div>
 
 
130
 
131
  <?php
132
  wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
133
  wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
134
+ wp_nonce_field( 'yarpp_display_demo', 'yarpp_display_demo-nonce', false );
135
+ wp_nonce_field( 'yarpp_display_exclude_terms', 'yarpp_display_exclude_terms-nonce', false );
136
  ?>
137
  <div id="poststuff" class="metabox-holder has-right-sidebar">
138
 
readme.txt CHANGED
@@ -198,25 +198,28 @@ If you are a bilingual speaker of English and another language and an avid user
198
 
199
  = 3.4 =
200
  * Major optimizations to the main related posts query, in particular with regard to taxonomy lookups
201
- * Now can consider custom taxonomies (of posts and pages), in addition to tags and cateogories! Custom taxonomies can also be used to exclude certain content.
 
 
202
  * [Bug fix](http://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-version-333-breaks-templates-in-widget): Custom templates could not be used in widget display
203
- * Implement lazy/infinite scrolling for the "disallow tags" and "disallow categories," so the YARPP settings screen doesn't lock up the browser for sites which have a crazy number or tags or categories
204
- * Added `yarpp_get_related()` function can be used similar to `get_posts()`
205
  * Significant code cleanup
206
  * Move many internal functions into a global object `$yarpp` of class `YARPP`; references to the global `$yarpp_cache` should now be to global `$yarpp->cache`
207
  * Created the "bypass" cache engine which is used when custom arguments are specified.
208
  * Switch to bypass cache for demos
209
  * Now only clears cache on post update, and only computes results for actual posts, not revisions (thanks to Andrei Mikhaylov)
210
- * Don't compute related posts for the metabox on the edit screen; display them via ajax instead
211
  * Removed the many different options entries, replacing them with a single `yarpp` option (except `yarpp_version`)
212
  * Fixed issues with display options field data escaping and slashing once and for all
213
- * Performance improvements on pages with "no related posts"
214
  * Streamlined keyword storage in `YARPP_Cache_Postmeta`
215
  * Create `YARPP_Cache` abstract class
216
  * Updated minor bug for computing how many results should be cached
217
- * Adding some filters: yarpp_settings_save, yarpp_blacklist, yarpp_blackmethods, yarpp_keywords_overused_words
218
  * New systematic use of YARPP_ constants to communicate cache status
219
  * Use `get_terms` to load terms
 
 
 
 
 
220
  * Support for [YARPP Experiments](http://wordpress.org/extend/plugins/yarpp-experiments/).
221
  * Added Portuguese stopwords by Leandro Coelho ([Logística Descomplicada](http://www.logisticadescomplicada.com))
222
  * Fix formatting of the Related Posts meta box
198
 
199
  = 3.4 =
200
  * Major optimizations to the main related posts query, in particular with regard to taxonomy lookups
201
+ * Performance improvements on pages with "no related posts"
202
+ * Now can consider custom taxonomies (of posts and pages), in addition to tags and cateogories! Custom taxonomies can also be used to exclude certain content from The Pool.
203
+ * Add welcome message, inviting users to check out the settings page
204
  * [Bug fix](http://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-version-333-breaks-templates-in-widget): Custom templates could not be used in widget display
 
 
205
  * Significant code cleanup
206
  * Move many internal functions into a global object `$yarpp` of class `YARPP`; references to the global `$yarpp_cache` should now be to global `$yarpp->cache`
207
  * Created the "bypass" cache engine which is used when custom arguments are specified.
208
  * Switch to bypass cache for demos
209
  * Now only clears cache on post update, and only computes results for actual posts, not revisions (thanks to Andrei Mikhaylov)
 
210
  * Removed the many different options entries, replacing them with a single `yarpp` option (except `yarpp_version`)
211
  * Fixed issues with display options field data escaping and slashing once and for all
 
212
  * Streamlined keyword storage in `YARPP_Cache_Postmeta`
213
  * Create `YARPP_Cache` abstract class
214
  * Updated minor bug for computing how many results should be cached
215
+ * Adding some filters: yarpp_settings_save, yarpp_blacklist, yarpp_blackmethods, yarpp_keywords_overused_words, yarpp_title_keywords, yarpp_body_keywords, yarpp_extract_keywords
216
  * New systematic use of YARPP_ constants to communicate cache status
217
  * Use `get_terms` to load terms
218
+ * Get lazy and embrace asynchronicity:
219
+ * Implement lazy/infinite scrolling for the "disallow tags" and "disallow categories," so the YARPP settings screen doesn't lock up the browser for sites which have a crazy number or tags or categories
220
+ * Don't compute related posts for the metabox on the edit screen; display them via ajax instead
221
+ * Only clear cache on post save, not recompute
222
+ * Added `yarpp_get_related()` function can be used similar to `get_posts()`
223
  * Support for [YARPP Experiments](http://wordpress.org/extend/plugins/yarpp-experiments/).
224
  * Added Portuguese stopwords by Leandro Coelho ([Logística Descomplicada](http://www.logisticadescomplicada.com))
225
  * Fix formatting of the Related Posts meta box
yarpp.php CHANGED
@@ -3,13 +3,13 @@
3
  Plugin Name: Yet Another Related Posts Plugin
4
  Plugin URI: http://yarpp.org/
5
  Description: Returns a list of related entries based on a unique algorithm for display on your blog and RSS feeds. A templating feature allows customization of the display.
6
- Version: 3.4b10
7
  Author: mitcho (Michael Yoshitaka Erlewine)
8
  Author URI: http://mitcho.com/
9
  Donate link: http://tinyurl.com/donatetomitcho
10
  */
11
 
12
- define('YARPP_VERSION', '3.4b10');
13
  define('YARPP_DIR', dirname(__FILE__));
14
  define('YARPP_NO_RELATED', ':(');
15
  define('YARPP_RELATED', ':)');
@@ -65,3 +65,8 @@ if ( !function_exists( 'self_admin_url' ) ) {
65
  return admin_url($path, $scheme);
66
  }
67
  }
 
 
 
 
 
3
  Plugin Name: Yet Another Related Posts Plugin
4
  Plugin URI: http://yarpp.org/
5
  Description: Returns a list of related entries based on a unique algorithm for display on your blog and RSS feeds. A templating feature allows customization of the display.
6
+ Version: 3.4RC1
7
  Author: mitcho (Michael Yoshitaka Erlewine)
8
  Author URI: http://mitcho.com/
9
  Donate link: http://tinyurl.com/donatetomitcho
10
  */
11
 
12
+ define('YARPP_VERSION', '3.4RC1');
13
  define('YARPP_DIR', dirname(__FILE__));
14
  define('YARPP_NO_RELATED', ':(');
15
  define('YARPP_RELATED', ':)');
65
  return admin_url($path, $scheme);
66
  }
67
  }
68
+
69
+ function yarpp_plugin_activate() {
70
+ update_option( 'yarpp_activated', true );
71
+ }
72
+ add_action( 'activate_' . plugin_basename(__FILE__), 'yarpp_plugin_activate' );