Yet Another Related Posts Plugin (YARPP) - Version 3.2b3

Version Description

Download this release

Release Info

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

Code changes from version 3.2b2 to 3.2b3

cache-postmeta.php ADDED
@@ -0,0 +1,226 @@
1
+ <?php
2
+
3
+ $yarpp_storage_class = 'YARPP_Cache_Postmeta';
4
+
5
+ define('YARPP_POSTMETA_TITLE_KEYWORDS_KEY','_yarpp_title_keywords');
6
+ define('YARPP_POSTMETA_BODY_KEYWORDS_KEY','_yarpp_body_keywords');
7
+ define('YARPP_POSTMETA_RELATED_KEY', '_yarpp_related');
8
+ define('YARPP_NO_RELATED', ':(');
9
+
10
+ class YARPP_Cache_Postmeta {
11
+ // variables used for lookup
12
+ var $related_postdata = array();
13
+ var $related_IDs = array();
14
+ var $name = "postmeta";
15
+
16
+ /**
17
+ * SETUP/STATUS
18
+ */
19
+ function YARPP_Cache_Postmeta() {
20
+ $this->name = __($this->name, 'yarpp');
21
+ add_filter('posts_where',array(&$this,'where_filter'));
22
+ add_filter('posts_orderby',array(&$this,'orderby_filter'));
23
+ add_filter('posts_fields',array(&$this,'fields_filter'));
24
+ add_filter('posts_request',array(&$this,'demo_request_filter'));
25
+ add_filter('post_limits',array(&$this,'limit_filter'));
26
+ }
27
+
28
+ function is_enabled() {
29
+ return true; // always enabled.
30
+ }
31
+
32
+ function setup() {
33
+ }
34
+
35
+ function cache_status() {
36
+ global $wpdb;
37
+ return $wpdb->get_var("select (count(p.ID)-sum(m.meta_value IS NULL))/count(p.ID)
38
+ FROM `{$wpdb->posts}` as p
39
+ LEFT JOIN `{$wpdb->postmeta}` as m ON (p.ID = m.post_id and m.meta_key = '" . YARPP_POSTMETA_RELATED_KEY . "')
40
+ WHERE p.post_status = 'publish'");
41
+ }
42
+
43
+ function uncached($limit = 20, $offset = 0) {
44
+ global $wpdb;
45
+ return $wpdb->get_col("select SQL_CALC_FOUND_ROWS p.ID
46
+ FROM `{$wpdb->posts}` as p
47
+ LEFT JOIN `{$wpdb->postmeta}` as m ON (p.ID = m.post_id and m.meta_key = '" . YARPP_POSTMETA_RELATED_KEY . "')
48
+ WHERE p.post_status = 'publish' and m.meta_value IS NULL
49
+ LIMIT $limit OFFSET $offset");
50
+ }
51
+
52
+ /**
53
+ * MAGIC FILTERS
54
+ */
55
+ function where_filter($arg) {
56
+ global $wpdb, $yarpp_time;
57
+ $threshold = yarpp_get_option('threshold');
58
+ if ($yarpp_time) {
59
+ // modify the where clause to use the related ID list.
60
+ if (!count($this->related_IDs))
61
+ $this->related_IDs = array(0);
62
+ $arg = preg_replace("!{$wpdb->posts}.ID = \d+!","{$wpdb->posts}.ID in (".join(',',$this->related_IDs).")",$arg);
63
+
64
+ // if we have "recent only" set, add an additional condition
65
+ if (yarpp_get_option("recent_only"))
66
+ $arg .= " and post_date > date_sub(now(), interval ".yarpp_get_option("recent_number")." ".yarpp_get_option("recent_units").") ";
67
+ }
68
+ return $arg;
69
+ }
70
+
71
+ function orderby_filter($arg) {
72
+ global $wpdb, $yarpp_time, $yarpp_score_override;
73
+ if ($yarpp_time and $yarpp_score_override)
74
+ return str_replace("$wpdb->posts.post_date","score",$arg);
75
+ return $arg;
76
+ }
77
+
78
+ function fields_filter($arg) {
79
+ global $wpdb, $yarpp_time, $wpdb;
80
+ if ($yarpp_time && is_array($this->related_postdata) && count($this->related_postdata)) {
81
+ $scores = array();
82
+ foreach ($this->related_postdata as $related_entry) {
83
+ $scores[] = " WHEN {$related_entry['ID']} THEN {$related_entry['score']}";
84
+ }
85
+ $arg .= ", CASE {$wpdb->posts}.ID" . join('',$scores) ." END as score";
86
+ }
87
+ return $arg;
88
+ }
89
+
90
+ function demo_request_filter($arg) {
91
+ global $wpdb, $yarpp_demo_time, $yarpp_limit;
92
+ if ($yarpp_demo_time) {
93
+ $wpdb->query("set @count = 0;");
94
+ return "SELECT SQL_CALC_FOUND_ROWS ID + $yarpp_limit as ID, post_author, post_date, post_date_gmt, '" . LOREMIPSUM . "' as post_content,
95
+ 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
96
+ FROM $wpdb->posts
97
+ ORDER BY ID DESC LIMIT 0, $yarpp_limit";
98
+ }
99
+ return $arg;
100
+ }
101
+
102
+ function limit_filter($arg) {
103
+ global $wpdb, $yarpp_time, $yarpp_online_limit;
104
+ if ($yarpp_time and $yarpp_online_limit)
105
+ return " limit $yarpp_online_limit ";
106
+ return $arg;
107
+ }
108
+
109
+ /**
110
+ * RELATEDNESS CACHE CONTROL
111
+ */
112
+ function begin_yarpp_time($reference_ID) {
113
+ // get the related posts from postdata, and also construct the relate_IDs array
114
+ $this->related_postdata = get_post_meta($reference_ID,YARPP_POSTMETA_RELATED_KEY,true);
115
+ if (is_array($this->related_postdata) && count($this->related_postdata))
116
+ $this->related_IDs = array_map(create_function('$x','return $x["ID"];'), $this->related_postdata);
117
+ }
118
+
119
+ function end_yarpp_time() {
120
+ $this->related_IDs = array();
121
+ $this->related_postdata = array();
122
+ }
123
+
124
+ function is_cached($reference_ID) {
125
+ // error_log('hit:' . print_r(debug_backtrace(), true));
126
+ return get_post_meta($reference_ID, YARPP_POSTMETA_RELATED_KEY, true) != false;
127
+ }
128
+
129
+ function clear($reference_ID) {
130
+ if (is_int($reference_ID))
131
+ $reference_ID = array($reference_ID);
132
+ // make sure that we have a non-trivial array
133
+ if (!is_array($reference_ID) || !count($reference_ID))
134
+ return;
135
+ // clear each cache
136
+ foreach($reference_ID as $id) {
137
+ delete_post_meta( $id, YARPP_POSTMETA_RELATED_KEY );
138
+ }
139
+ }
140
+
141
+ function update($reference_ID, $types) {
142
+ global $wpdb, $yarpp_debug;
143
+
144
+ $original_related = $this->related($reference_ID);
145
+ // error_log('original:' . implode(':', $original_related));
146
+
147
+ $related = $wpdb->get_results(yarpp_sql($types,array(),true,$reference_ID), ARRAY_A);
148
+ // error_log('debug:' . print_r($related, true));
149
+ $new_related = array_map(create_function('$x','return $x["ID"];'), $related);
150
+
151
+ if (count($new_related)) {
152
+ // error_log('new:' . implode(':', $new_related));
153
+ update_post_meta($reference_ID, YARPP_POSTMETA_RELATED_KEY, $related);
154
+ if ($yarpp_debug) echo "<!--YARPP just set the cache for post $reference_ID-->";
155
+
156
+ // Clear the caches of any items which are no longer related or are newly related.
157
+ if (count($original_related)) {
158
+ $this->clear(array_diff($original_related, $new_related));
159
+ // error_log('clear:' . implode(':', array_diff($original_related, $new_related)));
160
+ $this->clear(array_diff($new_related, $original_related));
161
+ // error_log('clear:' . implode(':', array_diff($new_related, $original_related)));
162
+ }
163
+ } else {
164
+ update_post_meta($reference_ID, YARPP_POSTMETA_RELATED_KEY, YARPP_NO_RELATED);
165
+ // Clear the caches of those which are no longer related.
166
+ if (count($original_related)) {
167
+ $this->clear($original_related);
168
+ // error_log('clear:' . implode(':', $original_related));
169
+ }
170
+ }
171
+ }
172
+
173
+ function flush() {
174
+ global $wpdb;
175
+ return $wpdb->query("delete from `{$wpdb->postmeta}` where meta_key = '" . YARPP_POSTMETA_RELATED_KEY . "'");
176
+ }
177
+
178
+ function related($reference_ID = null, $related_ID = null) {
179
+ global $wpdb;
180
+ if (!is_null($reference_ID) && !is_null($related_ID)) {
181
+ $results = get_post_meta($reference_ID,YARPP_POSTMETA_RELATED_KEY,true);
182
+ foreach($results as $result) {
183
+ if ($result['ID'] == $related_ID)
184
+ return true;
185
+ }
186
+ return false;
187
+ }
188
+
189
+ // return a list of ID's of "related" entries
190
+ if (!is_null($reference_ID)) {
191
+ $results = get_post_meta($reference_ID,YARPP_POSTMETA_RELATED_KEY,true);
192
+ // error_log('debug:' . print_r($results, true));
193
+ if (!$results || $results == YARPP_NO_RELATED)
194
+ return array();
195
+ return array_map(create_function('$x','return $x["ID"];'), $results);
196
+ }
197
+
198
+ // return a list of entities which list this post as "related"
199
+ if (!is_null($related_ID)) {
200
+ return $wpdb->get_col("select post_id from `{$wpdb->postmeta}` where meta_key = '" . YARPP_POSTMETA_RELATED_KEY . "' and meta_value regexp 's:2:\"ID\";s:\d+:\"{$related_ID}\"'");
201
+ }
202
+
203
+ return false;
204
+ }
205
+
206
+ /**
207
+ * KEYWORDS CACHE CONTROL
208
+ */
209
+ function cache_keywords($ID) {
210
+ update_post_meta($ID, YARPP_POSTMETA_BODY_KEYWORDS_KEY, post_body_keywords($ID));
211
+ update_post_meta($ID, YARPP_POSTMETA_TITLE_KEYWORDS_KEY, post_title_keywords($ID));
212
+ }
213
+
214
+ function get_keywords($ID, $type='body') {
215
+ $key = $type == 'body' ? YARPP_POSTMETA_BODY_KEYWORDS_KEY : YARPP_POSTMETA_TITLE_KEYWORDS_KEY;
216
+ $out = get_post_meta($ID, $key, true);
217
+
218
+ // if empty, try caching them first
219
+ if ($out === false) {
220
+ yarpp_cache_keywords($ID);
221
+ $out = get_post_meta($ID, $key, true);
222
+ }
223
+
224
+ return $out;
225
+ }
226
+ }
cache-tables.php ADDED
@@ -0,0 +1,256 @@
1
+ <?php
2
+
3
+ $yarpp_storage_class = 'YARPP_Cache_Tables';
4
+
5
+ class YARPP_Cache_Tables {
6
+ var $name = "custom tables";
7
+
8
+ /**
9
+ * SETUP/STATUS
10
+ */
11
+ function YARPP_Cache_Tables() {
12
+ $this->name = __($this->name, 'yarpp');
13
+ add_filter('posts_join',array(&$this,'join_filter'));
14
+ add_filter('posts_where',array(&$this,'where_filter'));
15
+ add_filter('posts_orderby',array(&$this,'orderby_filter'));
16
+ add_filter('posts_fields',array(&$this,'fields_filter'));
17
+ add_filter('posts_request',array(&$this,'demo_request_filter'));
18
+ add_filter('post_limits',array(&$this,'limit_filter'));
19
+ }
20
+
21
+ function is_enabled() {
22
+ global $wpdb;
23
+ // now check for the cache tables
24
+ $tabledata = $wpdb->get_col("show tables");
25
+ if (array_search("{$wpdb->prefix}yarpp_related_cache",$tabledata) !== false &&
26
+ array_search("{$wpdb->prefix}yarpp_keyword_cache",$tabledata) !== false)
27
+ return true;
28
+ else
29
+ return false;
30
+ }
31
+
32
+ function setup() {
33
+ global $wpdb;
34
+ if (!$wpdb->query("CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}yarpp_keyword_cache` (
35
+ `ID` bigint(20) unsigned NOT NULL default '0',
36
+ `body` text collate utf8_unicode_ci NOT NULL,
37
+ `title` text collate utf8_unicode_ci NOT NULL,
38
+ `date` timestamp NOT NULL default CURRENT_TIMESTAMP,
39
+ PRIMARY KEY (`ID`)
40
+ ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='YARPP''s keyword cache table';")) {
41
+ echo "<!--MySQL error on creating yarpp_keyword_cache table: ";
42
+ $wpdb->print_error();
43
+ echo "-->";
44
+ }
45
+ if (!$wpdb->query("CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}yarpp_related_cache` (
46
+ `reference_ID` bigint(20) unsigned NOT NULL default '0',
47
+ `ID` bigint(20) unsigned NOT NULL default '0',
48
+ `score` float unsigned NOT NULL default '0',
49
+ `date` timestamp NOT NULL default CURRENT_TIMESTAMP,
50
+ PRIMARY KEY ( `score` , `date` , `reference_ID` , `ID` )
51
+ ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;")) {
52
+ echo "<!--MySQL error on creating yarpp_related_cache table: ";
53
+ $wpdb->print_error();
54
+ echo "-->";
55
+ }
56
+ }
57
+
58
+ function cache_status() {
59
+ global $wpdb;
60
+ return $wpdb->get_var("select (count(p.ID)-sum(c.ID IS NULL))/count(p.ID)
61
+ FROM `{$wpdb->posts}` as p
62
+ LEFT JOIN `{$wpdb->prefix}yarpp_related_cache` as c ON (p.ID = c.reference_ID)
63
+ WHERE p.post_status = 'publish' ");
64
+ }
65
+
66
+ function uncached($limit = 20, $offset = 0) {
67
+ global $wpdb;
68
+ return $wpdb->get_col("select SQL_CALC_FOUND_ROWS p.ID
69
+ FROM `{$wpdb->posts}` as p
70
+ LEFT JOIN `{$wpdb->prefix}yarpp_related_cache` as c ON (p.ID = c.reference_ID)
71
+ WHERE p.post_status = 'publish' and c.ID IS NULL
72
+ LIMIT $limit OFFSET $offset");
73
+ }
74
+
75
+ /**
76
+ * MAGIC FILTERS
77
+ */
78
+ function join_filter($arg) {
79
+ global $wpdb, $yarpp_time;
80
+ if ($yarpp_time)
81
+ $arg .= " join {$wpdb->prefix}yarpp_related_cache as yarpp on {$wpdb->posts}.ID = yarpp.ID";
82
+ return $arg;
83
+ }
84
+
85
+ function where_filter($arg) {
86
+ global $wpdb, $yarpp_time;
87
+ $threshold = yarpp_get_option('threshold');
88
+ if ($yarpp_time) {
89
+
90
+ $arg = str_replace("$wpdb->posts.ID = ","yarpp.score >= $threshold and yarpp.reference_ID = ",$arg);
91
+
92
+
93
+ if (yarpp_get_option("recent_only"))
94
+ $arg .= " and post_date > date_sub(now(), interval ".yarpp_get_option("recent_number")." ".yarpp_get_option("recent_units").") ";
95
+ //echo "<!--YARPP TEST: $arg-->";
96
+ }
97
+ return $arg;
98
+ }
99
+
100
+ function orderby_filter($arg) {
101
+ global $wpdb, $yarpp_time, $yarpp_score_override;
102
+ if ($yarpp_time and $yarpp_score_override) {
103
+ $arg = str_replace("$wpdb->posts.post_date","yarpp.score",$arg);
104
+ }
105
+ return $arg;
106
+ }
107
+
108
+ function fields_filter($arg) {
109
+ global $wpdb, $yarpp_time;
110
+ if ($yarpp_time)
111
+ $arg .= ", yarpp.score";
112
+ return $arg;
113
+ }
114
+
115
+ function demo_request_filter($arg) {
116
+ global $wpdb, $yarpp_demo_time, $yarpp_limit;
117
+ if ($yarpp_demo_time) {
118
+ $wpdb->query("set @count = 0;");
119
+ $arg = "SELECT SQL_CALC_FOUND_ROWS ID + $yarpp_limit as ID, post_author, post_date, post_date_gmt, '" . LOREMIPSUM . "' as post_content,
120
+ 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
121
+ FROM $wpdb->posts
122
+ ORDER BY ID DESC LIMIT 0, $yarpp_limit";
123
+ }
124
+ return $arg;
125
+ }
126
+
127
+ function limit_filter($arg) {
128
+ global $wpdb, $yarpp_time, $yarpp_online_limit;
129
+ if ($yarpp_time and $yarpp_online_limit) {
130
+ return " limit $yarpp_online_limit ";
131
+ }
132
+ return $arg;
133
+ }
134
+
135
+ /**
136
+ * RELATEDNESS CACHE CONTROL
137
+ */
138
+ function begin_yarpp_time() {
139
+ }
140
+
141
+ function end_yarpp_time() {
142
+ }
143
+
144
+ function is_cached($reference_ID) {
145
+ global $wpdb;
146
+ return $wpdb->get_var("select count(*) as count from {$wpdb->prefix}yarpp_related_cache where reference_ID = $reference_ID");
147
+ }
148
+
149
+ function clear($reference_ID) {
150
+ global $wpdb;
151
+ if (is_array($reference_ID) && count($reference_ID))
152
+ $wpdb->query("delete from {$wpdb->prefix}yarpp_related_cache where reference_ID in (".implode(',',$reference_ID).")");
153
+ else if (is_int($reference_ID))
154
+ $wpdb->query("delete from {$wpdb->prefix}yarpp_related_cache where reference_ID = {$reference_ID}");
155
+ }
156
+
157
+ function update($reference_ID, $types) {
158
+ global $wpdb, $yarpp_debug;
159
+
160
+ $original_related = $this->related($reference_ID);
161
+ //error_log('original:' . implode(':', $original_related));
162
+
163
+ // clear out the cruft
164
+ $this->clear($reference_ID);
165
+
166
+ $wpdb->query("insert into {$wpdb->prefix}yarpp_related_cache (reference_ID,ID,score) ".yarpp_sql($types,array(),true,$reference_ID)." on duplicate key update date = now()");
167
+
168
+ if ($wpdb->rows_affected) {
169
+ $new_related = $this->related($reference_ID);
170
+ //error_log('new:' . implode(':', $new_related));
171
+ if ($yarpp_debug) echo "<!--YARPP just set the cache for post $reference_ID-->";
172
+
173
+ // Clear the caches of any items which are no longer related or are newly related.
174
+ if (count($original_related)) {
175
+ $this->clear(array_diff($original_related, $new_related));
176
+ //error_log('clear:' . implode(':', array_diff($original_related, $new_related)));
177
+ $this->clear(array_diff($new_related, $original_related));
178
+ //error_log('clear:' . implode(':', array_diff($new_related, $original_related)));
179
+ }
180
+ } else {
181
+ $wpdb->query("insert into {$wpdb->prefix}yarpp_related_cache (reference_ID,ID,score) values ($reference_ID,0,0) on duplicate key update date = now()");
182
+ if (!$wpdb->rows_affected)
183
+ return false;
184
+ // Clear the caches of those which are no longer related.
185
+ if (count($original_related)) {
186
+ $this->clear($original_related);
187
+ //error_log('clear:' . implode(':', $original_related));
188
+ }
189
+ }
190
+ }
191
+
192
+ function flush() {
193
+ global $wpdb;
194
+ return $wpdb->query("truncate table `{$wpdb->prefix}yarpp_related_cache`");
195
+ }
196
+
197
+ function related($reference_ID = null, $related_ID = null) {
198
+ global $wpdb;
199
+ if (!is_null($reference_ID) && !is_null($related_ID)) {
200
+ $results = $wpdb->get_col("select ID from {$wpdb->prefix}yarpp_related_cache where reference_ID = $reference_ID and ID = $related_ID");
201
+ return count($results) > 0;
202
+ }
203
+
204
+ // return a list of ID's of "related" entries
205
+ if (!is_null($reference_ID)) {
206
+ return $wpdb->get_col("select distinct ID from {$wpdb->prefix}yarpp_related_cache where reference_ID = $reference_ID and ID != 0");
207
+ }
208
+
209
+ // return a list of entities which list this post as "related"
210
+ if (!is_null($related_ID)) {
211
+ return $wpdb->get_col("select distinct reference_ID from {$wpdb->prefix}yarpp_related_cache where ID = $related_ID");
212
+ }
213
+
214
+ return false;
215
+ }
216
+
217
+ /**
218
+ * KEYWORDS CACHE CONTROL
219
+ */
220
+ function cache_keywords($ID) {
221
+ global $wpdb;
222
+ $body_terms = post_body_keywords($ID);
223
+ $title_terms = post_title_keywords($ID);
224
+ /*
225
+ CREATE TABLE `wp_yarpp_keyword_cache` (
226
+ `ID` BIGINT( 20 ) UNSIGNED NOT NULL ,
227
+ `body` TEXT NOT NULL ,
228
+ `title` TEXT NOT NULL ,
229
+ `date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ,
230
+ PRIMARY KEY ( `ID` )
231
+ ) ENGINE = MYISAM COMMENT = 'YARPP\'s keyword cache table'
232
+ */
233
+
234
+ if (defined('DB_CHARSET') && DB_CHARSET) {
235
+ $wpdb->query('set names '.DB_CHARSET);
236
+ }
237
+
238
+ $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 '");
239
+
240
+ }
241
+
242
+ function get_keywords($ID, $type='body') {
243
+ global $wpdb;
244
+ $out = $wpdb->get_var("select $type from {$wpdb->prefix}yarpp_keyword_cache where ID = $ID");
245
+ if ($out === false or $out == '') { // if empty, try caching them first.
246
+ $this->cache_keywords($ID);
247
+ $out = $wpdb->get_var("select $type from {$wpdb->prefix}yarpp_keyword_cache where ID = $ID");
248
+ }
249
+ if ($out === false or $out == '') { // if still empty... return false
250
+ //echo "<!--YARPP ERROR: couldn't select/create yarpp $type keywords for $ID-->";
251
+ return false;
252
+ } else {
253
+ return $out;
254
+ }
255
+ }
256
+ }
i/close.gif DELETED
Binary file
i/spin.gif DELETED
Binary file
includes.php CHANGED
@@ -10,7 +10,7 @@ if ( !defined('WP_CONTENT_URL') )
10
if ( !defined('WP_CONTENT_DIR') )
11
define('WP_CONTENT_DIR', ABSPATH . 'wp-content');
12
13
- global $yarpp_value_options, $yarpp_binary_options;
14
// 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.
15
$yarpp_value_options = array('threshold' => 5,
16
'limit' => 5,
@@ -56,10 +56,13 @@ $yarpp_binary_options = array('past_only' => true,
56
'rss_excerpt_display' => true,
57
'promote_yarpp' => false,
58
'rss_promote_yarpp' => false);
59
$yarpp_clear_cache_options = array('distags','discats','show_pass_post','recent_only','threshold','title','body','categories','tags');
60
61
function yarpp_enabled() {
62
- global $wpdb;
63
$indexdata = $wpdb->get_results("show index from $wpdb->posts");
64
foreach ($indexdata as $index) {
65
if ($index->Key_name == 'yarpp_title')
@@ -75,7 +78,7 @@ function yarpp_reinforce() {
75
}
76
77
function yarpp_activate() {
78
- global $yarpp_version, $wpdb, $yarpp_binary_options, $yarpp_value_options;
79
foreach (array_keys($yarpp_value_options) as $option) {
80
if (get_option("yarpp_$option") === false)
81
add_option("yarpp_$option",$yarpp_value_options[$option] . ' ');
@@ -84,17 +87,28 @@ function yarpp_activate() {
84
if (get_option("yarpp_$option") === false)
85
add_option("yarpp_$option",$yarpp_binary_options[$option]);
86
}
87
- if (!yarpp_enabled()) {
88
if (!$wpdb->query("ALTER TABLE $wpdb->posts ADD FULLTEXT `yarpp_title` ( `post_title`)")) {
89
- echo "<!--".__('MySQL error on adding yarpp_title','yarpp').": ";
90
$wpdb->print_error();
91
echo "-->";
92
}
93
if (!$wpdb->query("ALTER TABLE $wpdb->posts ADD FULLTEXT `yarpp_content` ( `post_content`)")) {
94
echo "<!--".__('MySQL error on adding yarpp_content','yarpp').": ";
95
$wpdb->print_error();
96
echo "-->";
97
}
98
if (!yarpp_enabled())
99
return 0;
100
}
@@ -132,21 +146,22 @@ function yarpp_upgrade_check($inuse = false) {
132
yarpp_upgrade_one_five();
133
update_option('yarpp_version','1.5');
134
}
135
-
136
if (version_compare('3.2',get_option('yarpp_version')) > 0) {
137
// check for unnecessary cache tables
138
- $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'yarpp_related_cache');
139
- $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'yarpp_keyword_cache');
140
}
141
142
- update_option('yarpp_version',YARPP_VERSION);
143
144
- // just in case, try to add the index one more time.
145
if (!yarpp_enabled()) {
146
$wpdb->query("ALTER TABLE $wpdb->posts ADD FULLTEXT `yarpp_title` ( `post_title`)");
147
$wpdb->query("ALTER TABLE $wpdb->posts ADD FULLTEXT `yarpp_content` ( `post_content`)");
148
}
149
-
150
}
151
152
function yarpp_admin_menu() {
@@ -185,19 +200,19 @@ class YARPP_Widget extends WP_Widget {
185
function YARPP_Widget() {
186
parent::WP_Widget(false, $name = __('Related Posts (YARPP)','yarpp'));
187
}
188
-
189
function widget($args, $instance) {
190
global $post;
191
if (!is_single())
192
return;
193
-
194
extract($args);
195
-
196
$type = ($post->post_type == 'page' ? array('page') : array('post'));
197
if (yarpp_get_option('cross_relate'))
198
$type = array('post','page');
199
-
200
- $title = apply_filters('widget_title', $instance['title']);
201
echo $before_widget;
202
if ( !$instance['use_template'] ) {
203
echo $before_title;
@@ -211,7 +226,7 @@ class YARPP_Widget extends WP_Widget {
211
echo yarpp_related($type,$instance,false,false,'widget');
212
echo $after_widget;
213
}
214
-
215
function update($new_instance, $old_instance) {
216
// this starts with default values.
217
$instance = array( 'promote_yarpp' => 0, 'use_template' => 0 );
@@ -228,8 +243,8 @@ class YARPP_Widget extends WP_Widget {
228
}
229
return $instance;
230
}
231
-
232
- function form($instance) {
233
$title = esc_attr($instance['title']);
234
$template_file = $instance['template_file'];
235
?>
@@ -272,14 +287,14 @@ class YARPP_Widget extends WP_Widget {
272
273
function yarpp_default($content) {
274
global $wpdb, $post;
275
-
276
if (is_feed())
277
- return yarpp_rss($content,$type);
278
-
279
$type = ($post->post_type == 'page' ? array('page') : array('post'));
280
if (yarpp_get_option('cross_relate'))
281
$type = array('post','page');
282
-
283
if (yarpp_get_option('auto_display') and is_single())
284
return $content.yarpp_related($type,array(),false,false,'website');
285
else
@@ -288,11 +303,11 @@ function yarpp_default($content) {
288
289
function yarpp_rss($content) {
290
global $wpdb, $post;
291
-
292
$type = ($post->post_type == 'page' ? array('page') : array('post'));
293
if (yarpp_get_option('cross_relate'))
294
$type = array('post','page');
295
-
296
if (yarpp_get_option('rss_display'))
297
return $content.yarpp_related($type,array(),false,false,'rss');
298
else
@@ -410,7 +425,8 @@ function yarpp_upgrade_one_five() {
410
unset($yarpp_version);
411
}
412
413
- define('LOREMIPSUM','Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras tincidunt justo a urna. Ut turpis. Phasellus convallis, odio sit amet cursus convallis, eros orci scelerisque velit, ut sodales neque nisl at ante. Suspendisse metus. Curabitur auctor pede quis mi. Pellentesque lorem justo, condimentum ac, dapibus sit amet, ornare et, erat. Quisque velit. Etiam sodales dui feugiat neque suscipit bibendum. Integer mattis. Nullam et ante non sem commodo malesuada. Pellentesque ultrices fermentum lectus. Maecenas hendrerit neque ac est. Fusce tortor mi, tristique sed, cursus at, pellentesque non, dui. Suspendisse potenti.');
414
415
function yarpp_excerpt($content,$length) {
416
$content = strip_tags( (string) $content );
@@ -419,14 +435,14 @@ function yarpp_excerpt($content,$length) {
419
}
420
421
function yarpp_set_option($option,$value) {
422
- global $yarpp_value_options, $yarpp_clear_cache_options;
423
if (array_search($option,array_keys($yarpp_value_options)) !== false)
424
update_option("yarpp_$option",$value.' ');
425
else
426
update_option("yarpp_$option",$value);
427
// new in 3.1: clear cache when updating certain settings.
428
- if (array_search($option,yarpp_clear_cache_options) !== false)
429
- yarpp_clear_cache();
430
}
431
432
function yarpp_get_option($option,$escapehtml = false) {
@@ -440,13 +456,7 @@ function yarpp_get_option($option,$escapehtml = false) {
440
return $return;
441
}
442
443
- function yarpp_clear_cache() {
444
- global $wpdb;
445
- return $wpdb->query("delete from `{$wpdb->postmeta}` where meta_key = '" . YARPP_POSTMETA_RELATED_KEY . "'");
446
- }
447
-
448
- function yarpp_microtime_float()
449
- {
450
list($usec, $sec) = explode(" ", microtime());
451
return ((float)$usec + (float)$sec);
452
}
10
if ( !defined('WP_CONTENT_DIR') )
11
define('WP_CONTENT_DIR', ABSPATH . 'wp-content');
12
13
+ global $yarpp_value_options, $yarpp_binary_options, $yarpp_clear_cache_options;
14
// 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.
15
$yarpp_value_options = array('threshold' => 5,
16
'limit' => 5,
56
'rss_excerpt_display' => true,
57
'promote_yarpp' => false,
58
'rss_promote_yarpp' => false);
59
+ // These are options which, when updated, will trigger a clearing of the cache
60
$yarpp_clear_cache_options = array('distags','discats','show_pass_post','recent_only','threshold','title','body','categories','tags');
61
62
function yarpp_enabled() {
63
+ global $wpdb, $yarpp_cache;
64
+ if ($yarpp_cache->is_enabled() === false)
65
+ return false;
66
$indexdata = $wpdb->get_results("show index from $wpdb->posts");
67
foreach ($indexdata as $index) {
68
if ($index->Key_name == 'yarpp_title')
78
}
79
80
function yarpp_activate() {
81
+ global $yarpp_version, $wpdb, $yarpp_binary_options, $yarpp_value_options, $yarpp_cache;
82
foreach (array_keys($yarpp_value_options) as $option) {
83
if (get_option("yarpp_$option") === false)
84
add_option("yarpp_$option",$yarpp_value_options[$option] . ' ');
87
if (get_option("yarpp_$option") === false)
88
add_option("yarpp_$option",$yarpp_binary_options[$option]);
89
}
90
+
91
+ $wpdb->get_results("show index from $wpdb->posts where Key_name='yarpp_title'");
92
+ if (!$wpdb->num_rows) {
93
if (!$wpdb->query("ALTER TABLE $wpdb->posts ADD FULLTEXT `yarpp_title` ( `post_title`)")) {
94
+ echo "<!--MySQL error on adding yarpp_title: ";
95
$wpdb->print_error();
96
echo "-->";
97
}
98
+ }
99
+
100
+ $wpdb->get_results("show index from $wpdb->posts where Key_name='yarpp_content'");
101
+ if (!$wpdb->num_rows) {
102
if (!$wpdb->query("ALTER TABLE $wpdb->posts ADD FULLTEXT `yarpp_content` ( `post_content`)")) {
103
echo "<!--".__('MySQL error on adding yarpp_content','yarpp').": ";
104
$wpdb->print_error();
105
echo "-->";
106
}
107
+ }
108
+ if (!yarpp_enabled()) {
109
+ // If we are still not enabled, run the cache abstraction's setup method.
110
+ $yarpp_cache->setup();
111
+ // If we're still not enabled, give up.
112
if (!yarpp_enabled())
113
return 0;
114
}
146
yarpp_upgrade_one_five();
147
update_option('yarpp_version','1.5');
148
}
149
+
150
if (version_compare('3.2',get_option('yarpp_version')) > 0) {
151
// check for unnecessary cache tables
152
+ // Currently commented out because this depends on the cache engine
153
+ // $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'yarpp_related_cache');
154
+ // $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'yarpp_keyword_cache');
155
}
156
157
+ update_option('yarpp_version',YARPP_VERSION);
158
159
+ // just in case, try to add the index one more time.
160
if (!yarpp_enabled()) {
161
$wpdb->query("ALTER TABLE $wpdb->posts ADD FULLTEXT `yarpp_title` ( `post_title`)");
162
$wpdb->query("ALTER TABLE $wpdb->posts ADD FULLTEXT `yarpp_content` ( `post_content`)");
163
}
164
+
165
}
166
167
function yarpp_admin_menu() {
200
function YARPP_Widget() {
201
parent::WP_Widget(false, $name = __('Related Posts (YARPP)','yarpp'));
202
}
203
+
204
function widget($args, $instance) {
205
global $post;
206
if (!is_single())
207
return;
208
+
209
extract($args);
210
+
211
$type = ($post->post_type == 'page' ? array('page') : array('post'));
212
if (yarpp_get_option('cross_relate'))
213
$type = array('post','page');
214
+
215
+ $title = apply_filters('widget_title', $instance['title']);
216
echo $before_widget;
217
if ( !$instance['use_template'] ) {
218
echo $before_title;
226
echo yarpp_related($type,$instance,false,false,'widget');
227
echo $after_widget;
228
}
229
+
230
function update($new_instance, $old_instance) {
231
// this starts with default values.
232
$instance = array( 'promote_yarpp' => 0, 'use_template' => 0 );
243
}
244
return $instance;
245
}
246
+
247
+ function form($instance) {
248
$title = esc_attr($instance['title']);
249
$template_file = $instance['template_file'];
250
?>
287
288
function yarpp_default($content) {
289
global $wpdb, $post;
290
+
291
if (is_feed())
292
+ return yarpp_rss($content);
293
+
294
$type = ($post->post_type == 'page' ? array('page') : array('post'));
295
if (yarpp_get_option('cross_relate'))
296
$type = array('post','page');
297
+
298
if (yarpp_get_option('auto_display') and is_single())
299
return $content.yarpp_related($type,array(),false,false,'website');
300
else
303
304
function yarpp_rss($content) {
305
global $wpdb, $post;
306
+
307
$type = ($post->post_type == 'page' ? array('page') : array('post'));
308
if (yarpp_get_option('cross_relate'))
309
$type = array('post','page');
310
+
311
if (yarpp_get_option('rss_display'))
312
return $content.yarpp_related($type,array(),false,false,'rss');
313
else
425
unset($yarpp_version);
426
}
427
428
+ if (!defined('LOREMIPSUM'))
429
+ define('LOREMIPSUM','Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras tincidunt justo a urna. Ut turpis. Phasellus convallis, odio sit amet cursus convallis, eros orci scelerisque velit, ut sodales neque nisl at ante. Suspendisse metus. Curabitur auctor pede quis mi. Pellentesque lorem justo, condimentum ac, dapibus sit amet, ornare et, erat. Quisque velit. Etiam sodales dui feugiat neque suscipit bibendum. Integer mattis. Nullam et ante non sem commodo malesuada. Pellentesque ultrices fermentum lectus. Maecenas hendrerit neque ac est. Fusce tortor mi, tristique sed, cursus at, pellentesque non, dui. Suspendisse potenti.');
430
431
function yarpp_excerpt($content,$length) {
432
$content = strip_tags( (string) $content );
435
}
436
437
function yarpp_set_option($option,$value) {
438
+ global $yarpp_value_options, $yarpp_clear_cache_options, $yarpp_cache;
439
if (array_search($option,array_keys($yarpp_value_options)) !== false)
440
update_option("yarpp_$option",$value.' ');
441
else
442
update_option("yarpp_$option",$value);
443
// new in 3.1: clear cache when updating certain settings.
444
+ if (array_search($option,$yarpp_clear_cache_options) !== false)
445
+ $yarpp_cache->flush();
446
}
447
448
function yarpp_get_option($option,$escapehtml = false) {
456
return $return;
457
}
458
459
+ function yarpp_microtime_float() {
460
list($usec, $sec) = explode(" ", microtime());
461
return ((float)$usec + (float)$sec);
462
}
keywords.php CHANGED
@@ -2,16 +2,16 @@
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'));
8
$wordlist = mb_split('\s*\W+\s*', mb_strtolower($source));
9
} else
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]);
@@ -23,11 +23,11 @@ function yarpp_extract_keywords($source,$max = 20) {
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);
@@ -52,21 +52,3 @@ function post_body_keywords($ID,$max = 20) {
52
$content = html_entity_strip($content);
53
return yarpp_extract_keywords($content,$max);
54
}
55
-
56
- function yarpp_cache_keywords($ID) {
57
- update_post_meta($ID, YARPP_POSTMETA_BODY_KEYWORDS_KEY, post_body_keywords($ID));
58
- update_post_meta($ID, YARPP_POSTMETA_TITLE_KEYWORDS_KEY, post_title_keywords($ID));
59
- }
60
-
61
- function yarpp_get_cached_keywords($ID, $type='body') {
62
- $key = $type == 'body' ? YARPP_POSTMETA_BODY_KEYWORDS_KEY : YARPP_POSTMETA_TITLE_KEYWORDS_KEY;
63
- $out = get_post_meta($ID, $key, true);
64
-
65
- // if empty, try caching them first
66
- if ($out === false) {
67
- yarpp_cache_keywords($ID);
68
- $out = get_post_meta($ID, $key, true);
69
- }
70
-
71
- return $out;
72
- }
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'));
8
$wordlist = mb_split('\s*\W+\s*', mb_strtolower($source));
9
} else
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]);
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);
52
$content = html_entity_strip($content);
53
return yarpp_extract_keywords($content,$max);
54
}
lang/yarpp-fa_IR.mo ADDED
Binary file
lang/yarpp-fa_IR.po ADDED
@@ -0,0 +1,609 @@
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: doctorbeta <doctorbeta@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 "yarpp_title در افزودن MySQL مشکل "
23
+
24
+ #: includes.php:99
25
+ msgid "MySQL error on adding yarpp_content"
26
+ msgstr "yarpp_content در افزودن MySQL مشکل "
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>یک پیام مهم از YARPP:</h3><p>با تشکر از شما به خاطر به هنگام سازی به نسخه YARPP 2."
31
+
32
+ #: includes.php:224
33
+ #: yarpp.php:31
34
+ msgid "Related Posts"
35
+ msgstr "پست های مرتبط"
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 ""
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 ""
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 "اگر فکر می کنید که<code>%s</code> از MyISAM استفاده می کند، روی این تکمه کلیک کنید"
55
+
56
+ #: options.php:42
57
+ msgid "Trust me. Let me use MyISAM features."
58
+ msgstr " استفاده کنم MyISAM به من اطمینان کم. اجازه بده از ویژگیهای "
59
+
60
+ #: options.php:65
61
+ msgid "The YARPP database had an error but has been fixed."
62
+ msgstr " با یک اشکال مواجه شده که ترمیم شد YARPP پایگاه داده"
63
+
64
+ #: options.php:67
65
+ msgid "The YARPP database has an error which could not be fixed."
66
+ msgstr " با یک اشکال مواجه شده که قابل ترمیم نیست YARPP پایگاه داده "
67
+
68
+ #: options.php:150
69
+ msgid "word"
70
+ msgstr "واژه"
71
+
72
+ #: options.php:151
73
+ msgid "tag"
74
+ msgstr "برچسب"
75
+
76
+ #: options.php:152
77
+ msgid "category"
78
+ msgstr "دسته"
79
+
80
+ #: options.php:156
81
+ #: options.php:173
82
+ #: options.php:185
83
+ msgid "do not consider"
84
+ msgstr "درنظر گرفته نشود"
85
+
86
+ #: options.php:157
87
+ #: options.php:174
88
+ #: options.php:187
89
+ msgid "consider"
90
+ msgstr "درنظر بگیر"
91
+
92
+ #: options.php:159
93
+ #: options.php:189
94
+ #, php-format
95
+ msgid "require at least one %s in common"
96
+ msgstr "حداقل یک %s لازم است"
97
+
98
+ #: options.php:161
99
+ #: options.php:191
100
+ #, php-format
101
+ msgid "require more than one %s in common"
102
+ msgstr "بیش از یک %s لازم است"
103
+
104
+ #: options.php:175
105
+ msgid "consider with extra weight"
106
+ msgstr "بسیارمهم در نظر گرفته شود"
107
+
108
+ #: options.php:203
109
+ msgid "Yet Another Related Posts Plugin version history (RSS 2.0)"
110
+ msgstr " (RSS 2.0) تاریخچه تغییرات افزونه سایر پست های مرتبط"
111
+
112
+ #: options.php:273
113
+ msgid "Donate to mitcho (Michael Yoshitaka Erlewine) for this plugin via PayPal"
114
+ msgstr "کمک مالی به mitcho برای این افزونه از طریق PayPal"
115
+
116
+ #: options.php:257
117
+ msgid "Yet Another Related Posts Plugin Options"
118
+ msgstr "تـنظیمات افزونه YARPP"
119
+
120
+ #: options.php:280
121
+ msgid "\"The Pool\""
122
+ msgstr "\"مخزن\""
123
+
124
+ #: options.php:281
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 "مخزن شامل پست ها و صفحاتی است که برای موضوع فعلی میتوانند به عنوان پست مرتبط نشان داده شود"
127
+
128
+ #: options.php:286
129
+ msgid "Disallow by category:"
130
+ msgstr "از کدام دسته ها صرفنظر شود؟"
131
+
132
+ #: options.php:288
133
+ msgid "Disallow by tag:"
134
+ msgstr "از کدام برچسب ها صرفنظر شود؟"
135
+
136
+ #: options.php:290
137
+ msgid "Show password protected posts?"
138
+ msgstr "پست های رمزدار نمایش داده شوند؟"
139
+
140
+ #: options.php:291
141
+ msgid "Show only previous posts?"
142
+ msgstr "فقط پست های قبلی نمایش داده شود؟"
143
+
144
+ #: options.php:308
145
+ msgid "\"Relatedness\" options"
146
+ msgstr "\"میزان ارتباط\" تنظیمات"
147
+
148
+ #: options.php:310
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\">precedenti plugin</a>."
152
+
153
+ #: options.php:315
154
+ msgid "Match threshold:"
155
+ msgstr "حداقل تطبیق:"
156
+
157
+ #: options.php:316
158
+ msgid "Titles: "
159
+ msgstr "عنوان ها:"
160
+
161
+ #: options.php:318
162
+ msgid "Bodies: "
163
+ msgstr "محتواها:"
164
+
165
+ #: options.php:320
166
+ msgid "Tags: "
167
+ msgstr "برچسب ها:"
168
+
169
+ #: options.php:322
170
+ msgid "Categories: "
171
+ msgstr "دسته ها:"
172
+
173
+ #: options.php:324
174
+ msgid "Cross-relate posts and pages?"
175
+ msgstr "ارتباط متقابل پست و صفحات؟"
176
+
177
+ #: options.php:324
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:403
182
+ msgid "Display options <small>for your website</small>"
183
+ msgstr "نمایش تنظیمات <small>برای وب سایت شما</small>"
184
+
185
+ #: magic.php:322
186
+ #: options.php:460
187
+ #: options.php:523
188
+ msgid "Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>."
189
+ msgstr "سازنده سایر پست های مرتبط <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts</a>."
190
+
191
+ #: options.php:407
192
+ msgid "Automatically display related posts?"
193
+ msgstr "نمایش خودکار پست های مرتبط؟"
194
+
195
+ #: options.php:407
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 ""
198
+
199
+ #: options.php:408
200
+ msgid "Website display code example"
201
+ msgstr "الگوی نمایش کد وب سایت به صورت زیر است:"
202
+
203
+ #: options.php:408
204
+ #: options.php:473
205
+ msgid "(Update options to reload.)"
206
+ msgstr "(تنظیمات را برای فعال سازی به هنگام کنید.)"
207
+
208
+ #: options.php:411
209
+ #: options.php:475
210
+ msgid "Maximum number of related posts:"
211
+ msgstr "حداکثر تعداد پست های مرتبط"
212
+
213
+ #: options.php:424
214
+ msgid "Before / after related entries:"
215
+ msgstr "قبل / بعد از موضوعات مرتبط:"
216
+
217
+ #: options.php:425
218
+ #: options.php:430
219
+ #: options.php:439
220
+ #: options.php:489
221
+ #: options.php:494
222
+ #: options.php:503
223
+ msgid "For example:"
224
+ msgstr "مثلا:"
225
+
226
+ #: options.php:429
227
+ #: options.php:493
228
+ msgid "Before / after each related entry:"
229
+ msgstr "قبل / بعد از هر موضوع مرتبط"
230
+
231
+ #: options.php:433
232
+ #: options.php:497
233
+ msgid "Show excerpt?"
234
+ msgstr "چکیده ها را نمایش بده؟"
235
+
236
+ #: options.php:434
237
+ #: options.php:498
238
+ msgid "Excerpt length (No. of words):"
239
+ msgstr "طول چکیده (تعداد واژه ها):"
240
+
241
+ #: options.php:438
242
+ msgid "Before / after (Excerpt):"
243
+ msgstr "قبل / بعد (چکیده):"
244
+
245
+ #: options.php:444
246
+ #: options.php:508
247
+ msgid "Order results:"
248
+ msgstr "ترتیب نتایج:"
249
+
250
+ #: options.php:446
251
+ #: options.php:510
252
+ msgid "score (high relevance to low)"
253
+ msgstr "امتیاز (از بیشترین ارتباط به کمتریت ارتباط)"
254
+
255
+ #: options.php:447
256
+ #: options.php:511
257
+ msgid "score (low relevance to high)"
258
+ msgstr "امتیاز (از کمترین ارتباط به بیشترین ارتباط)"
259
+
260
+ #: options.php:448
261
+ #: options.php:512
262
+ msgid "date (new to old)"
263
+ msgstr "تاریخ (جدید به قدیم)"
264
+
265
+ #: options.php:449
266
+ #: options.php:513
267
+ msgid "date (old to new)"
268
+ msgstr "تاریخ (قدیم به جدید)"
269
+
270
+ #: options.php:450
271
+ #: options.php:514
272
+ msgid "title (alphabetical)"
273
+ msgstr "عنوان (به ترتیب الفبا)"
274
+
275
+ #: options.php:451
276
+ #: options.php:515
277
+ msgid "title (reverse alphabetical)"
278
+ msgstr "عنوان (برعکس ترتیب الفبا)"
279
+
280
+ #: options.php:456
281
+ #: options.php:520
282
+ msgid "Default display if no results:"
283
+ msgstr "در صورت عدم وجود نتیجه این را نشان بده:"
284
+
285
+ #: options.php:458
286
+ #: options.php:522
287
+ msgid "Help promote Yet Another Related Posts Plugin?"
288
+ msgstr "کمک به ترقی این افزونه ؟"
289
+
290
+ #: options.php:460
291
+ #: options.php:523
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 "این گزینه کد %s را اضافه می کند. با روشن کردن آن می توانید کد را در سمت راست ملاحظه کنید."
295
+
296
+ #: options.php:466
297
+ msgid "Display options <small>for RSS</small>"
298
+ msgstr "نمایش تنظیمات برای <small>آر اس اس</small>"
299
+
300
+ #: options.php:471
301
+ msgid "Display related posts in feeds?"
302
+ msgstr "نمایش پست های مرتبط در خوراک سایت"
303
+
304
+ #: options.php:472
305
+ msgid "Display related posts in the descriptions?"
306
+ msgstr "نمایش پست های مرتبط در توضیحات؟"
307
+
308
+ #: options.php:472
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 "این گزینه، پست های مرتبط را در محل توضیحات آر اس اس (نه تنها محتوا) به نمایش در می آورد. اگر خوراک را به صورتی تنظیم کنید که فقط چکیده را نشان دهد، تنها قسمت توضیحات مورد استفاده قرار می گیرد."
311
+
312
+ #: options.php:473
313
+ msgid "RSS display code example"
314
+ msgstr "نمونه کد آر اس اس نمایش داده شده"
315
+
316
+ #: options.php:488
317
+ msgid "Before / after related entries display:"
318
+ msgstr "نمایش قبل/ بعد از موضوعات مرتبط:"
319
+
320
+ #: options.php:502
321
+ msgid "Before / after (excerpt):"
322
+ msgstr "قبل/ بعد از (چکیده):"
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 امتیاز تطبیق بین پست فعلی و پست مرتبط به آن است. شما این پیغام را دریافت کردید زیرا به عنوان مدیر وارد وردپرس شده اید"
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 ""
336
+
337
+ #: options.php:310
338
+ #: options.php:324
339
+ #: options.php:407
340
+ #: options.php:412
341
+ #: options.php:459
342
+ #: options.php:471
343
+ #: options.php:472
344
+ #: options.php:476
345
+ #: options.php:522
346
+ #: options.php:533
347
+ msgid "more&gt;"
348
+ msgstr "بیشتر&gt;"
349
+
350
+ #: options.php:128
351
+ msgid "Options saved!"
352
+ msgstr "تنظیمات ذخیره شد!"
353
+
354
+ #: options.php:609
355
+ msgid "Do you really want to reset your configuration?"
356
+ msgstr "آیا واقعا می خواهید تنظیمات را به پیش فرض برگردانید؟"
357
+
358
+ #: options.php:608
359
+ msgid "Update options"
360
+ msgstr "ذخیره تنظیمات"
361
+
362
+ #: options.php:310
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:609
367
+ msgid "Reset options"
368
+ msgstr "تنظیمات از نو"
369
+
370
+ #: magic.php:71
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
+ #: includes.php:26
383
+ #: includes.php:37
384
+ #: template-metabox.php:27
385
+ msgid "No related posts."
386
+ msgstr "بدون پست مرتبط."
387
+
388
+ #: options.php:83
389
+ #: options.php:86
390
+ #: options.php:129
391
+ #: options.php:532
392
+ msgid "Related posts cache status"
393
+ msgstr "وضعیت ذخیره سازی پست های مرتبط"
394
+
395
+ #: options.php:83
396
+ msgid "Your related posts cache is incomplete. Please build your cache from the <A>related posts status pane</a>."
397
+ msgstr "صفحه ذخیره (cache) پست های شما تکمیل نشده است. لطفا آن را <A>نوار وضعیت پست های مرتبط</a> از دوباره بسازید."
398
+
399
+ #: options.php:86
400
+ msgid "Your related posts cache is empty. Please build your cache from the <A>related posts status pane</a>."
401
+ msgstr "cache پست های مرتبط شما خالی است. لطفا آن را از <A>نوار وضعیت پست های مرتبط</a>دوباره بسازید."
402
+
403
+ #: options.php:130
404
+ msgid "If you updated the \"pool\" options or \"relatedness\" options displayed, please rebuild your cache now from the <A>related posts status pane</a>."
405
+ msgstr "اگر تنظیمات \"pool\" یا \"pool\" را تغییر داده اید، لطفا cache را از طریق <A>related posts status pane</a>.دوباره بسازید "
406
+
407
+ #: options.php:275
408
+ msgid "by <a href=\"http://mitcho.com/code/\">mitcho (Michael 芳貴 Erlewine)</a>"
409
+ msgstr "توسط <a href=\"http://mitcho.com/code/\">mitcho</a>"
410
+
411
+ #: options.php:275
412
+ msgid "Follow <a href=\"http://twitter.com/yarpp/\">Yet Another Related Posts Plugin on Twitter</a>"
413
+ msgstr "دنبال کردن <a href=\"http://twitter.com/yarpp/\">افزونه در توییتر</a>"
414
+
415
+ #: options.php:296
416
+ msgid "day(s)"
417
+ msgstr "روز"
418
+
419
+ #: options.php:297
420
+ msgid "week(s)"
421
+ msgstr "هفته"
422
+
423
+ #: options.php:298
424
+ msgid "month(s)"
425
+ msgstr "ماه"
426
+
427
+ #: options.php:300
428
+ msgid "Show only posts from the past NUMBER UNITS"
429
+ msgstr "نمایش پست ها از NUMBER UNITS پیش"
430
+
431
+ #: options.php:390
432
+ msgid "There is a new beta (VERSION) of Yet Another Related Posts Plugin. You can <A>download it here</a> at your own risk."
433
+ msgstr "نسخه بتای جدید این افزونه در دسترس است. در صورتی که مایلید می توانید آن را <A>از اینجا دریافت کنید</a> و با مسئولیت خود از آن استفاده کنید"
434
+
435
+ #: options.php:392
436
+ msgid "There is a new version (VERSION) of Yet Another Related Posts Plugin available! You can <A>download it here</a>."
437
+ msgstr "نسخه جدید افزونه در دسترس است! می توانید آن را <A>از اینجا دریافت کنید</a>"
438
+
439
+ #: options.php:412
440
+ #: options.php:476
441
+ msgid "Display using a custom template file"
442
+ msgstr "نمایش به صورت قالب دلخواه شما"
443
+
444
+ #: options.php:414
445
+ #: options.php:478
446
+ msgid "Template file:"
447
+ msgstr "پرونده قالب:"
448
+
449
+ #: options.php:471
450
+ msgid "This option displays related posts at the end of each item in your RSS and Atom feeds. No template changes are needed."
451
+ msgstr "این گزینه، پست های مرتبط رادر آخر خوراک های آر اس اس و اتم شما نمایش می دهد. هیچ نیازی به تغییر قالب نیست."
452
+
453
+ #: options.php:529
454
+ msgid "Advanced"
455
+ msgstr "پیشرفته"
456
+
457
+ #: options.php:532
458
+ msgid "Show cache status"
459
+ msgstr "نمایش وضعیت ذخیره سازی"
460
+
461
+ #: options.php:533
462
+ msgid "When the cache is incomplete, compute related posts on the fly?"
463
+ msgstr "تا وقتی ذخیره سازی تکمیل نشده، محاسبات پست های مرتبط به صورت مستقیم انجام شود"
464
+
465
+ #: options.php:564
466
+ msgid "'MIN minute(s) and SEC second(s) remaining'"
467
+ msgstr "'MINدقیقه و SEC ثانیه باقی مانده'"
468
+
469
+ #: options.php:566
470
+ msgid "'SEC second(s) remaining'"
471
+ msgstr "'SEC ثانیه باقیماندهi'"
472
+
473
+ #: options.php:570
474
+ msgid "Your related posts cache is now complete."
475
+ msgstr "ذخیره سازی پست های مرتبط شما به تکمیل شد. "
476
+
477
+ #: options.php:570
478
+ msgid "The SQL queries took SEC seconds."
479
+ msgstr "محاسبات SQL SEC ثانیه طول کشید"
480
+
481
+ #: options.php:577
482
+ msgid "There was an error while constructing the related posts for TITLE"
483
+ msgstr "هنگام ایجاد پست های مرتبط برای عنوان مشکلی به وجود آمد."
484
+
485
+ #: options.php:595
486
+ msgid "Your related posts cache is PERCENT% complete."
487
+ msgstr "ذخیره سازی پست های مرتبط شما PERCENT% تکمیل شده است."
488
+
489
+ #: options.php:601
490
+ msgid "starting..."
491
+ msgstr "در حال شروع..."
492
+
493
+ #: includes.php:110
494
+ msgid "MySQL error on creating yarpp_keyword_cache table"
495
+ msgstr "مشکل MySQL در ایجادجدول yarpp_keyword_cache رخ داد"
496
+
497
+ #: includes.php:121
498
+ msgid "MySQL error on creating yarpp_related_cache table"
499
+ msgstr "مشکل MySQL در ایجادجدول yarpp_related_cache رخ داد"
500
+
501
+ #: services.php:59
502
+ msgid "You cannot rebuild the YARPP cache."
503
+ msgstr "شما نمی توانید دوباره ذخیره سازی کنید."
504
+
505
+ #: options.php:10
506
+ 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."
507
+ msgstr "لطفا پرونده های قالب افزونه را برای تکمیل نصب به پوشه قالب کنونی وبلاگتان منتقل کنید. پرونده های موجود در (<code>wp-content/plugins/yet-another-related-posts-plugin/yarpp-templates/</code>) رابه <code>TEMPLATEPATH</code> انتقال دهید.<code "
508
+
509
+ #: options.php:15
510
+ msgid "No YARPP template files were found in your theme (<code>TEMPLATEPATH</code>) so the templating feature has been turned off."
511
+ msgstr "چون هیچی قالبی برای افزونه در (<code>TEMPLATEPATH</code>) یافت نشد ویژگی ایجاد قالب غیرفعال شد."
512
+
513
+ #: options.php:412
514
+ #: options.php:476
515
+ #: options.php:529
516
+ msgid "NEW!"
517
+ msgstr "جدید!"
518
+
519
+ #: options.php:412
520
+ #: options.php:476
521
+ 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."
522
+ msgstr "این امکان پیشرفته به شما اختیار کامل جهت شخصی سازی محل نمایش پست های مرتبط را می دهد."
523
+
524
+ #: includes.php:24
525
+ #: includes.php:35
526
+ msgid "Related posts:"
527
+ msgstr "پست های مرتبط:"
528
+
529
+ #: options.php:68
530
+ msgid "Please try <A>manual SQL setup</a>."
531
+ msgstr "لطفا سعی کنید <A>manual SQL setup</a>."
532
+
533
+ #: options.php:425
534
+ #: options.php:430
535
+ #: options.php:439
536
+ #: options.php:489
537
+ #: options.php:494
538
+ #: options.php:503
539
+ msgid " or "
540
+ msgstr "یا"
541
+
542
+ #: options.php:534
543
+ msgid "If a displayed post's related posts are not cached and this option is on, YARPP will compute them on the fly.<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."
544
+ msgstr "تا وقتی ذخیره سازی تکمیل نشده و این گزینه روشن باشد، محاسبات پست های مرتبط به صورت مستقیم انجام شود<br /> اگر این گزینه خاموش باشدو هنوز ذخیره سازی تکمیل نشده باشد، همان چیزی نمایش داده می شود که انگار هیچ پست مرتبطی وجود ندارد."
545
+
546
+ #: options.php:579
547
+ #: options.php:585
548
+ msgid "Constructing the related posts timed out."
549
+ msgstr "در حال ایجاد زمان انقضای پست ها"
550
+
551
+ #: options.php:582
552
+ #: options.php:587
553
+ msgid "Try to continue..."
554
+ msgstr "برای ادامه تلاش کنید..."
555
+
556
+ #~ msgid "Edit Catalog Entry"
557
+ #~ msgstr "modifica elenco articoli"
558
+
559
+ #~ msgid "close"
560
+ #~ msgstr "chiudi"
561
+
562
+ #~ msgid "You do not have the permission to write the file '%s'."
563
+ #~ msgstr "Non hai i permessi per la scrittura del file '%s'."
564
+
565
+ #~ msgid ""
566
+ #~ "by <a href=\"http://mitcho.com/code/\">mitcho (Michael 芳貴 Erlewine)</a> "
567
+ #~ "and based on the fabulous work of <a href=\"http://peter.mapledesign.co."
568
+ #~ "uk/weblog/archives/wordpress-related-posts-plugin\">Peter Bower</a>, <a "
569
+ #~ "href=\"http://wasabi.pbwiki.com/Related%20Entries\">Alexander Malov &amp; "
570
+ #~ "Mike Lu</a>."
571
+ #~ msgstr ""
572
+ #~ "Il Team: <a href=\"http://mitcho.com/code/\">mitcho (Michael 芳貴 "
573
+ #~ "Erlewine)</a> ha sviluppato questo plugin grazie al favoloso lavoro di <a "
574
+ #~ "href=\"http://peter.mapledesign.co.uk/weblog/archives/wordpress-related-"
575
+ #~ "posts-plugin\">Peter Bower</a> e <a href=\"http://wasabi.pbwiki.com/"
576
+ #~ "Related%20Entries\">Alexander Malov &amp; Mike Lu</a>. Traduzione "
577
+ #~ "italiana a cura di <a href=\"http://gidibao.net/\">Gianni Diurno</a>."
578
+
579
+ #~ msgid "PERMALINK"
580
+ #~ msgstr "PERMALINK"
581
+
582
+ #~ msgid "RELATED TITLE"
583
+ #~ msgstr "TITOLO CORRELATO"
584
+
585
+ #~ msgid ""
586
+ #~ "The higher the match threshold, the more restrictive, and you get less "
587
+ #~ "related posts overall. The default match threshold is 5. If you want to "
588
+ #~ "find an appropriate match threshhold, I recommend you turn on the \"show "
589
+ #~ "admins the match scores\" setting below. That way, you can see what kinds "
590
+ #~ "of related posts are being picked up and with what kind of match scores, "
591
+ #~ "and determine an appropriate threshold for your site."
592
+ #~ msgstr ""
593
+ #~ "Je höher Sie den Wert \"Relevanz\" setzen, desto restriktiver arbeitet "
594
+ #~ "YARPP. Der Standardwert liegt bei 5. Wenn gar keine oder zuwenige Artikel "
595
+ #~ "angezeigt werden, setzen Sie ihn auf 3.5 oder gar 1 herunter. Für die "
596
+ #~ "Feinabstimmung aktivieren Sie die Option \"Administratoren den Wert der "
597
+ #~ "Relevanz anzeigen\" und stimmen den Wert auf Ihre Anforderungen ab."
598
+
599
+ #~ msgid "Show admins (user level > 8) the match scores?"
600
+ #~ msgstr "Administratoren (User Level > 8) den Wert der Relevanz anzeigen?"
601
+
602
+ #~ msgid ""
603
+ #~ "With this option on, each related entry's total 'match score' (all above "
604
+ #~ "the threshold, set above) are displayed after each entry title, <em>if "
605
+ #~ "you are an administrator and logged in.</em> Even if you see these "
606
+ #~ "values, your visitors will not."
607
+ #~ msgstr ""
608
+ #~ "Wenn aktiviert, sehen nur eingeloggte Administratoren (nicht die "
609
+ #~ "Besucher!) neben jeder Beitragsüberschrift den Übereinstimmungswert."
lang/yarpp-pt_PT.mo ADDED
Binary file
lang/yarpp-pt_PT.po ADDED
@@ -0,0 +1,558 @@
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: YARPP_PT\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date:\n"
6
+ "PO-Revision-Date: \n"
7
+ "Last-Translator: Stefan Mueller <stefan.mueller@gmail.com>\n"
8
+ "Language-Team: Stefan Mueller <stefan.mueller@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: Portuguese\n"
13
+ "X-Poedit-Country: Portugal\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 "MySQL-Erro ao adicionar \"yarpp_title\""
23
+
24
+ #: includes.php:99
25
+ msgid "MySQL error on adding yarpp_content"
26
+ msgstr "MySQL-Erro ao adicionar \"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>Mensagem de YARPP</h3><p>Obrigado por actualizar para o YARPP 2. Esta vers�o inclui melhorias no algoritmo m�gico, permite-lhe configurar op��es na quantifica��o das v�rias palavras-chave ou categoria, tem em considera��o as op��es da utiliza��o de determinadas regras de exclus�o e permite-lhe determinar a for�a das vari�veis \"Conte�do\", \"Sobret�tulo\", \"Palavras-chave\" und \"Categorias\". Para mais informa��es, consulte <a href=\"http://mitcho.com/code/yarpp/\">Documenta��o YARPP </a>.</p><p>Esta mensagem nunca mais aparecer�!</p>"
31
+
32
+ #: includes.php:197
33
+ #: includes.php:197
34
+ msgid "Related Posts (YARPP)"
35
+ msgstr "Contribui��es parecidas (YARPP)"
36
+
37
+ #: includes.php:224
38
+ #: yarpp.php:31
39
+ #: yarpp.php:31
40
+ msgid "Related Posts"
41
+ msgstr "Contribui��es parecidas"
42
+
43
+ #: includes.php:229
44
+ msgid "YARPP"
45
+ msgstr "YARPP"
46
+
47
+ #: template-builtin.php:35
48
+ #, php-format
49
+ 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."
50
+ msgstr "%f � a concord�ncia determinada pelo YARPP entre este artigo e o artigo parecido (Valor de relev�ncia). Consegue ver este artigo porque est� a utilizar uma conta de administrador da WordPress. Visitantes normais n�o o v�em."
51
+
52
+ #: magic.php:322
53
+ #: options.php:458
54
+ #: options.php:521
55
+ msgid "Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>."
56
+ msgstr "Artigos parecidos fornecidos por <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>."
57
+
58
+ #: options.php:26
59
+ msgid "The MyISAM check has been overridden. You may now use the \"consider titles\" and \"consider bodies\" relatedness criteria."
60
+ msgstr "O MyISAM-Check foi suspenso. Pode agora utilizar \"consider titles\" e \"consider bodies\" como crit�rio de relev�ncia."
61
+
62
+ #: options.php:35
63
+ #, php-format
64
+ 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."
65
+ msgstr "YARPPs \"consider titles\" und \"consider bodies\" Os crit�rios \"consider titles\" und \"consider bodies\" de relev�ncia da YARPP requerem que a sua tabela <code>%s</code> utilize a <a href='http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html'>MyISAM Storage Engine</a>, mas a tabela parece utilizar a <code>%s</code>-Engine. As duas op��es foram desactivadas."
66
+
67
+ #: options.php:37
68
+ #, php-format
69
+ 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."
70
+ msgstr "Para reactivar esta fun��o, execute o c�digo <code>%s</code> com o comando SQL: <code>ALTER TABLE `%s` ENGINE = MyISAM;</code>."
71
+
72
+ #: options.php:39
73
+ #, php-format
74
+ msgid "If, despite this check, you are sure that <code>%s</code> is using the MyISAM engine, press this magic button:"
75
+ msgstr "Se, mesmo depois desta verifica��o, tiver a certeza de que <code>%s</code> utiliza a MyISAM-Engine, clique no bot�o m�gico:"
76
+
77
+ #: options.php:42
78
+ msgid "Trust me. Let me use MyISAM features."
79
+ msgstr "Acredite em mim. Deixe-me usar as MyISAM-Features."
80
+
81
+ #: options.php:65
82
+ msgid "The YARPP database had an error but has been fixed."
83
+ msgstr "Ocorreu um erro na base de dados da YARPP que pode contudo ser corrigido."
84
+
85
+ #: options.php:67
86
+ msgid "The YARPP database has an error which could not be fixed."
87
+ msgstr "Ocorreu um erro na base de dados da YARPP que n�o pode ser corrigido."
88
+
89
+ #: options.php:154
90
+ #: options.php:171
91
+ #: options.php:183
92
+ msgid "do not consider"
93
+ msgstr ""n�o ter em conta""
94
+
95
+ #: options.php:155
96
+ #: options.php:172
97
+ #: options.php:185
98
+ msgid "consider"
99
+ msgstr "ter em conta"
100
+
101
+ #: options.php:173
102
+ msgid "consider with extra weight"
103
+ msgstr "ter especialmente em conta"
104
+
105
+ #: options.php:201
106
+ msgid "Yet Another Related Posts Plugin version history (RSS 2.0)"
107
+ msgstr "Hist�rico da vers�o YARPP (RSS 2.0)"
108
+
109
+ #: options.php:271
110
+ #: options.php:271
111
+ msgid "Donate to mitcho (Michael Yoshitaka Erlewine) for this plugin via PayPal"
112
+ msgstr "Fazer uma doa��o via PayPal a mitcho (Michael Yoshitaka Erlewine) pelo desenvolvimento do plugin"
113
+
114
+ #: options.php:255
115
+ msgid "Yet Another Related Posts Plugin Options"
116
+ msgstr "Op��es da YARPP"
117
+
118
+ #: options.php:278
119
+ msgid "\"The Pool\""
120
+ msgstr "\"Pool\""
121
+
122
+ #: options.php:279
123
+ msgid "\"The Pool\" refers to the pool of posts and pages that are candidates for display as related to the current entry."
124
+ msgstr "O plugin tem em conta todos os artigos e p�ginas que s�o mencionados (ou n�o exclu�dos) neste \"Pool\"."
125
+
126
+ #: options.php:284
127
+ msgid "Disallow by category:"
128
+ msgstr "Excluir categorias:"
129
+
130
+ #: options.php:286
131
+ msgid "Disallow by tag:"
132
+ msgstr "Excluir etiquetas:"
133
+
134
+ #: options.php:288
135
+ msgid "Show password protected posts?"
136
+ msgstr "Inserir palavra-chave para mostrar artigos protegidos?"
137
+
138
+ #: options.php:289
139
+ msgid "Show only previous posts?"
140
+ msgstr "Ter em conta apenas artigos passados?"
141
+
142
+ #: options.php:306
143
+ msgid "\"Relatedness\" options"
144
+ msgstr "Op��es de parecen�a"
145
+
146
+ #: options.php:308
147
+ #, php-format
148
+ 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>."
149
+ msgstr "YA YARPP funciona de um modo um pouco diferente do que [a href=\"http://wasabi.pbwiki.com/Related%20Entries\"]outros plugins de funcionalidade semelhante[/a]: A YARPP tem em conta n�o s� a quantidade de contribui��es por si inserida, como tamb�m o valor \"Relev�ncia\"."
150
+
151
+ #: options.php:308
152
+ #: options.php:322
153
+ #: options.php:405
154
+ #: options.php:410
155
+ #: options.php:457
156
+ #: options.php:469
157
+ #: options.php:470
158
+ #: options.php:474
159
+ #: options.php:520
160
+ #: options.php:531
161
+ msgid "more&gt;"
162
+ msgstr "?"
163
+
164
+ #: options.php:313
165
+ msgid "Match threshold:"
166
+ msgstr "Relev�ncia:"
167
+
168
+ #: options.php:314
169
+ msgid "Titles: "
170
+ msgstr "Sobret�tulos:"
171
+
172
+ #: options.php:316
173
+ msgid "Bodies: "
174
+ msgstr "Corpo do texto:"
175
+
176
+ #: options.php:318
177
+ msgid "Tags: "
178
+ msgstr "Tags:"
179
+
180
+ #: options.php:320
181
+ msgid "Categories: "
182
+ msgstr "Categorias:"
183
+
184
+ #: options.php:322
185
+ msgid "Cross-relate posts and pages?"
186
+ msgstr "Emitir artigos e p�ginas em conjunto?"
187
+
188
+ #: options.php:322
189
+ 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."
190
+ msgstr "Se a op��o \"Emitir artigos e p�ginas em conjunto \" estiver activa, as fun��es <code>related_posts()</code>, <code>related_pages()</code>, e <code>related_entries()</code> emitem o mesmo: Nas contribui��es parecidas n�o aparecem artigos nem p�ginas!"
191
+
192
+ #: options.php:401
193
+ msgid "Display options <small>for your website</small>"
194
+ msgstr "Apresenta��o <small>(Website)</small>"
195
+
196
+ #: options.php:405
197
+ msgid "Automatically display related posts?"
198
+ msgstr "Mostrar contribui��es parecidas automaticamente?"
199
+
200
+ #: options.php:405
201
+ 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."
202
+ msgstr "Quando activada, a YARPP anexa apenas a emiss�o de contribui��es parecidas aos artigos actuais. Se estiver desactivada, ter� de tratar da apresenta��o no modelo com as fun��es <code>related_posts()</code> ou variantes (<code>related_pages()</code> ou <code>related_entries()</code>).
203
+
204
+ #: options.php:406
205
+ msgid "Website display code example"
206
+ msgstr "Exemplo de um c�digo-fonte para o an�ncio da p�gina"
207
+
208
+ #: options.php:406
209
+ #: options.php:471
210
+ msgid "(Update options to reload.)"
211
+ msgstr "Para ver as suas op��es aqui, ter� de guardar primeiro as op��es!"
212
+
213
+ #: options.php:409
214
+ #: options.php:473
215
+ msgid "Maximum number of related posts:"
216
+ msgstr "Quantidade m�xima de contribui��es:"
217
+
218
+ #: options.php:422
219
+ msgid "Before / after related entries:"
220
+ msgstr "C�digo-fonte antes / depois das contribui��es parecidas:"
221
+
222
+ #: options.php:423
223
+ #: options.php:428
224
+ #: options.php:437
225
+ #: options.php:487
226
+ #: options.php:492
227
+ #: options.php:501
228
+ msgid "For example:"
229
+ msgstr "Ex.:"
230
+
231
+ #: options.php:427
232
+ #: options.php:491
233
+ msgid "Before / after each related entry:"
234
+ msgstr "C�digo-fonte antes / depois das respectivas contribui��es:"
235
+
236
+ #: options.php:431
237
+ #: options.php:495
238
+ msgid "Show excerpt?"
239
+ msgstr "Mostrar excerto?"
240
+
241
+ #: options.php:432
242
+ #: options.php:496
243
+ msgid "Excerpt length (No. of words):"
244
+ msgstr "Comprimento do excerto (Quantidade de palavras):"
245
+
246
+ #: options.php:436
247
+ msgid "Before / after (Excerpt):"
248
+ msgstr "C�digo-fonte antes / depois dos respectivos excertos:"
249
+
250
+ #: options.php:442
251
+ #: options.php:506
252
+ msgid "Order results:"
253
+ msgstr "Sequ�ncia dos an�ncios:"
254
+
255
+ #: options.php:444
256
+ #: options.php:508
257
+ msgid "score (high relevance to low)"
258
+ msgstr "Relev�ncia (da maior � mais pequena)"
259
+
260
+ #: options.php:445
261
+ #: options.php:509
262
+ msgid "score (low relevance to high)"
263
+ msgstr "Relev�ncia (da mais pequena � maior)"
264
+
265
+ #: options.php:446
266
+ #: options.php:510
267
+ msgid "date (new to old)"
268
+ msgstr "Estampa da hora (da mais actual � mais velha)"
269
+
270
+ #: options.php:447
271
+ #: options.php:511
272
+ msgid "date (old to new)"
273
+ msgstr "Estampa da hora (da mais antiga � mais actual)"
274
+
275
+ #: options.php:448
276
+ #: options.php:512
277
+ msgid "title (alphabetical)"
278
+ msgstr "Sobret�tulo (A-Z)"
279
+
280
+ #: options.php:449
281
+ #: options.php:513
282
+ msgid "title (reverse alphabetical)"
283
+ msgstr "Sobret�tulo (Z-A)"
284
+
285
+ #: options.php:454
286
+ #: options.php:518
287
+ msgid "Default display if no results:"
288
+ msgstr "C�digo-fonte quando forem encontrados 0 artigos relevantes:"
289
+
290
+ #: options.php:456
291
+ #: options.php:520
292
+ msgid "Help promote Yet Another Related Posts Plugin?"
293
+ msgstr "Aplicar a YARPP discretamente?"
294
+
295
+ #: options.php:458
296
+ #: options.php:521
297
+ #, php-format
298
+ 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."
299
+ msgstr "Quando activado, aparece nos resultados uma pequena informa��o em rela��o ao autor e plugin das contribui��es parecidas. Adiciona o c�digo %s."
300
+
301
+ #: options.php:464
302
+ msgid "Display options <small>for RSS</small>"
303
+ msgstr "Apresenta��o <small>(RSS)</small>"
304
+
305
+ #: options.php:469
306
+ msgid "Display related posts in feeds?"
307
+ msgstr "Mostrar contribui��es parecidas nos feeds de not�cias?"
308
+
309
+ #: options.php:470
310
+ msgid "Display related posts in the descriptions?"
311
+ msgstr "Mostrar contribui��es em Descriptions?"
312
+
313
+ #: options.php:470
314
+ 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."
315
+ msgstr "Mostra as contribui��es parecidas tamb�m em RSS-Descriptions, n�o s� em Content."
316
+
317
+ #: options.php:471
318
+ msgid "RSS display code example"
319
+ msgstr "Exemplos de an�ncios RSS"
320
+
321
+ #: options.php:486
322
+ msgid "Before / after related entries display:"
323
+ msgstr "C�digo-fonte antes / depois das contribui��es parecidas:"
324
+
325
+ #: options.php:500
326
+ msgid "Before / after (excerpt):"
327
+ msgstr "C�digo-fonte antes / depois do excerto:"
328
+
329
+ #: options.php:148
330
+ msgid "word"
331
+ msgstr "Palavra"
332
+
333
+ #: options.php:149
334
+ msgid "tag"
335
+ msgstr "Etiqueta"
336
+
337
+ #: options.php:150
338
+ msgid "category"
339
+ msgstr "Categoria"
340
+
341
+ #: options.php:157
342
+ #: options.php:187
343
+ #, php-format
344
+ msgid "require at least one %s in common"
345
+ msgstr "pelo menos igual a %s"
346
+
347
+ #: options.php:159
348
+ #: options.php:189
349
+ #, php-format
350
+ msgid "require more than one %s in common"
351
+ msgstr "mais do que igual a %s"
352
+
353
+ #: options.php:126
354
+ msgid "Options saved!"
355
+ msgstr "Op��es gravadas!"
356
+
357
+ #: options.php:308
358
+ 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."
359
+ msgstr ""
360
+
361
+ #: options.php:606
362
+ msgid "Update options"
363
+ msgstr "Actualizar op��es"
364
+
365
+ #: options.php:607
366
+ msgid "Do you really want to reset your configuration?"
367
+ msgstr "Deseja mesmo reverter as op��es?"
368
+
369
+ #: options.php:607
370
+ msgid "Reset options"
371
+ msgstr "Reverter op��es"
372
+
373
+ #: includes.php:24
374
+ #: includes.php:35
375
+ msgid "Related posts:"
376
+ msgstr ""
377
+
378
+ #: includes.php:26
379
+ #: includes.php:37
380
+ #: template-metabox.php:27
381
+ msgid "No related posts."
382
+ msgstr ""
383
+
384
+ #: includes.php:110
385
+ msgid "MySQL error on creating yarpp_keyword_cache table"
386
+ msgstr ""
387
+
388
+ #: includes.php:121
389
+ msgid "MySQL error on creating yarpp_related_cache table"
390
+ msgstr ""
391
+
392
+ #: magic.php:71
393
+ msgid "Example post "
394
+ msgstr ""
395
+
396
+ #: options.php:10
397
+ 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."
398
+ msgstr ""
399
+
400
+ #: options.php:15
401
+ msgid "No YARPP template files were found in your theme (<code>TEMPLATEPATH</code>) so the templating feature has been turned off."
402
+ msgstr ""
403
+
404
+ #: options.php:68
405
+ msgid "Please try <A>manual SQL setup</a>."
406
+ msgstr "Bitte aktualisieren Sie die <A>SQL-Datenbank manuell</a>."
407
+
408
+ #: options.php:82
409
+ #: options.php:85
410
+ #: options.php:127
411
+ #: options.php:530
412
+ msgid "Related posts cache status"
413
+ msgstr ""
414
+
415
+ #: options.php:82
416
+ msgid "Your related posts cache is incomplete. Please build your cache from the <A>related posts status pane</a>."
417
+ msgstr ""
418
+
419
+ #: options.php:85
420
+ msgid "Your related posts cache is empty. Please build your cache from the <A>related posts status pane</a>."
421
+ msgstr ""
422
+
423
+ #: options.php:128
424
+ msgid "If you updated the \"pool\" options or \"relatedness\" options displayed, please rebuild your cache now from the <A>related posts status pane</a>."
425
+ msgstr ""
426
+
427
+ #: options.php:273
428
+ msgid "by <a href=\"http://mitcho.com/code/\">mitcho (Michael 芳貴 Erlewine)</a>"
429
+ msgstr ""
430
+
431
+ #: options.php:273
432
+ msgid "Follow <a href=\"http://twitter.com/yarpp/\">Yet Another Related Posts Plugin on Twitter</a>"
433
+ msgstr ""
434
+
435
+ #: options.php:294
436
+ msgid "day(s)"
437
+ msgstr ""
438
+
439
+ #: options.php:295
440
+ msgid "week(s)"
441
+ msgstr ""
442
+
443
+ #: options.php:296
444
+ msgid "month(s)"
445
+ msgstr ""
446
+
447
+ #: options.php:298
448
+ msgid "Show only posts from the past NUMBER UNITS"
449
+ msgstr ""
450
+
451
+ #: options.php:388
452
+ msgid "There is a new beta (VERSION) of Yet Another Related Posts Plugin. You can <A>download it here</a> at your own risk."
453
+ msgstr ""
454
+
455
+ #: options.php:390
456
+ msgid "There is a new version (VERSION) of Yet Another Related Posts Plugin available! You can <A>download it here</a>."
457
+ msgstr ""
458
+
459
+ #: options.php:410
460
+ #: options.php:474
461
+ msgid "Display using a custom template file"
462
+ msgstr ""
463
+
464
+ #: options.php:410
465
+ #: options.php:474
466
+ #: options.php:527
467
+ msgid "NEW!"
468
+ msgstr ""
469
+
470
+ #: options.php:410
471
+ #: options.php:474
472
+ 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."
473
+ msgstr ""
474
+
475
+ #: options.php:412
476
+ #: options.php:476
477
+ msgid "Template file:"
478
+ msgstr ""
479
+
480
+ #: options.php:423
481
+ #: options.php:428
482
+ #: options.php:437
483
+ #: options.php:487
484
+ #: options.php:492
485
+ #: options.php:501
486
+ msgid " or "
487
+ msgstr ""
488
+
489
+ #: options.php:469
490
+ msgid "This option displays related posts at the end of each item in your RSS and Atom feeds. No template changes are needed."
491
+ msgstr ""
492
+
493
+ #: options.php:527
494
+ msgid "Advanced"
495
+ msgstr ""
496
+
497
+ #: options.php:530
498
+ msgid "Show cache status"
499
+ msgstr ""
500
+
501
+ #: options.php:531
502
+ msgid "When the cache is incomplete, compute related posts on the fly?"
503
+ msgstr ""
504
+
505
+ #: options.php:532
506
+ 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."
507
+ msgstr ""
508
+
509
+ #: options.php:562
510
+ msgid "'MIN minute(s) and SEC second(s) remaining'"
511
+ msgstr ""
512
+
513
+ #: options.php:564
514
+ msgid "'SEC second(s) remaining'"
515
+ msgstr ""
516
+
517
+ #: options.php:568
518
+ msgid "Your related posts cache is now complete."
519
+ msgstr ""
520
+
521
+ #: options.php:568
522
+ msgid "The SQL queries took SEC seconds."
523
+ msgstr ""
524
+
525
+ #: options.php:575
526
+ msgid "There was an error while constructing the related posts for TITLE"
527
+ msgstr ""
528
+
529
+ #: options.php:577
530
+ #: options.php:583
531
+ msgid "Constructing the related posts timed out."
532
+ msgstr ""
533
+
534
+ #: options.php:580
535
+ #: options.php:585
536
+ msgid "Try to continue..."
537
+ msgstr ""
538
+
539
+ #: options.php:593
540
+ msgid "Your related posts cache is PERCENT% complete."
541
+ msgstr ""
542
+
543
+ #: options.php:599
544
+ msgid "starting..."
545
+ msgstr ""
546
+
547
+ #: services.php:59
548
+ msgid "You cannot rebuild the YARPP cache."
549
+ msgstr ""
550
+
551
+ #: template-metabox.php:12
552
+ msgid "These are the related entries for this entry. Updating this post may change these related posts."
553
+ msgstr ""
554
+