Version Description
Download this release
Release Info
Developer | mitchoyoshitaka |
Plugin | Yet Another Related Posts Plugin (YARPP) |
Version | 1.5.1 |
Comparing to | |
See all releases |
Code changes from version 1.5 to 1.5.1
- includes.php +3 -2
- options.php +1 -1
- readme.txt +17 -19
- yarpp.php +1 -1
includes.php
CHANGED
@@ -36,7 +36,8 @@ function yarpp_activate() {
|
|
36 |
if (!yarpp_enabled()) {
|
37 |
$wpdb->query("ALTER TABLE $wpdb->posts ADD FULLTEXT `post_related` ( `post_name` , `post_content` )");
|
38 |
}
|
39 |
-
add_option('yarpp_version',1.5);
|
|
|
40 |
return 1;
|
41 |
}
|
42 |
|
@@ -49,7 +50,7 @@ function yarpp_upgrade_check() {
|
|
49 |
}
|
50 |
|
51 |
function yarpp_admin_menu() {
|
52 |
-
if (function_exists('add_submenu_page')) add_submenu_page('options-general.php',
|
53 |
}
|
54 |
|
55 |
function yarpp_default($content) {
|
36 |
if (!yarpp_enabled()) {
|
37 |
$wpdb->query("ALTER TABLE $wpdb->posts ADD FULLTEXT `post_related` ( `post_name` , `post_content` )");
|
38 |
}
|
39 |
+
add_option('yarpp_version','1.5.1');
|
40 |
+
update_option('yarpp_version','1.5.1');
|
41 |
return 1;
|
42 |
}
|
43 |
|
50 |
}
|
51 |
|
52 |
function yarpp_admin_menu() {
|
53 |
+
if (function_exists('add_submenu_page')) add_submenu_page('options-general.php', 'Related Posts (YARPP)', 'Related Posts (YARPP)', 8, 'yet-another-related-posts-plugin/options.php');
|
54 |
}
|
55 |
|
56 |
function yarpp_default($content) {
|
options.php
CHANGED
@@ -39,7 +39,7 @@ function textbox($option,$desc,$size=2,$tr="<tr>
|
|
39 |
var css=document.createElement("link");
|
40 |
css.setAttribute("rel", "stylesheet");
|
41 |
css.setAttribute("type", "text/css");
|
42 |
-
css.setAttribute("href", "../wp-content/plugins/
|
43 |
document.getElementsByTagName("head")[0].appendChild(css);
|
44 |
</script>
|
45 |
|
39 |
var css=document.createElement("link");
|
40 |
css.setAttribute("rel", "stylesheet");
|
41 |
css.setAttribute("type", "text/css");
|
42 |
+
css.setAttribute("href", "../wp-content/plugins/yet-another-related-posts-plugin/options.css");
|
43 |
document.getElementsByTagName("head")[0].appendChild(css);
|
44 |
</script>
|
45 |
|
readme.txt
CHANGED
@@ -7,11 +7,11 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mitcho%4
|
|
7 |
Tags: related, posts, post, pages, page
|
8 |
Requires at least: 2.1
|
9 |
Tested up to: 2.3.2
|
10 |
-
Stable tag: 1.5
|
11 |
|
12 |
Returns a list of the related entries based on keyword matches, limited by a certain relatedness threshold. Like the tried and true Related Posts plugins�just better!
|
13 |
|
14 |
-
|
15 |
|
16 |
Yet Another Related Posts Plugin (YARPP) gives you a list of posts and/or pages related to the current entry, introducing the reader to other relevant content on your site. YARPP is based on the work of [Peter Bowyer](http://peter.mapledesign.co.uk/weblog/archives/wordpress-related-posts-plugin), [Alexander Malov, and Mike Lu](http://wasabi.pbwiki.com/Related%20Entries). Key features include:
|
17 |
|
@@ -20,46 +20,42 @@ Yet Another Related Posts Plugin (YARPP) gives you a list of posts and/or pages
|
|
20 |
3. *Simple installation*: **New in 1.5!** Automatically displays related posts after content on single entry pages without any theme tinkering.
|
21 |
4. *Miscellany*: a nicer options screen, displaying the fulltext match score on output for admins, an option to allow related posts from the future, a couple bug fixes, etc.
|
22 |
|
23 |
-
|
24 |
|
25 |
-
|
26 |
|
27 |
With YARPP 1.5, you can just put the `yarpp` directory in your `/wp-content/plugins/` directory, activate the plugin, and you're set! You'll see related posts in single entry (permalink) pages. If all your pages say "no related posts," see the FAQ.
|
28 |
|
29 |
-
|
30 |
|
31 |
If you would like to put the related posts display in another part of your theme, or display them in pages other than single entry pages, turn off "auto display" in the YARPP Options, then drop `related_posts()`, `related_pages()`, or `related_entries()` (see below) in your [WP loop](http://codex.wordpress.org/The_Loop). Change any options in the Related Posts (YARPP) Options pane in Admin > Plugins. See Examples in Other Notes for sample code you can drop into your theme.
|
32 |
|
33 |
There're also `related_posts_exist()`, `related_pages_exist()`, and `related_entries_exist()` functions, which return a boolean as expected.
|
34 |
|
35 |
-
|
36 |
|
37 |
By default, `related_posts()` gives you back posts only, `related_pages()` gives you pages, and there's `related_entries()` gives you posts and pages. When the "cross-relate posts and pages" option is checked in the YARPP options panel, `related_posts()`, `related_pages()`, and `related_entries()` will give you exactly the same output.
|
38 |
|
39 |
-
|
40 |
|
41 |
-
|
42 |
|
43 |
-
Most likely you have "no related posts" right now as the default "match threshold" is too high. Here's what I recommend to find an appropriate match threshold:
|
44 |
-
1. lower your match threshold in the YARPP prefs to something ridiculously low, like 1 or 0.5.
|
45 |
-
2. Make sure the last option "show admins the match scores" is on.
|
46 |
-
3. Most likely the really low threshold will pull up many posts that aren't actually related (false positives), so look at some of your posts' related posts and their match scores.
|
47 |
-
4. This will help you find an appropriate threshold. You want it lower than what you have now, but high enough so it doesn't have many false positives. Set this new match threshold in the Options.
|
48 |
|
49 |
-
|
50 |
|
51 |
-
YARPP currently doesn't use tags to compare posts
|
52 |
|
53 |
-
|
54 |
|
55 |
I highly recommend you disactivate YARPP, replace it with the new one, and then reactivate it.
|
56 |
|
57 |
-
|
58 |
|
59 |
1. Incorporation of tags and categories in the algorithm. I've gotten the code working, but I still need to think about what the most natural algorithm would be for weighing these factors against the mysql fulltext score currently used (and works pretty well, I must say).
|
60 |
2. Um, something else! Let me know if you have any suggestions for improvement. ^^
|
61 |
|
62 |
-
|
63 |
|
64 |
* 1.0
|
65 |
* Initial upload
|
@@ -71,4 +67,6 @@ I highly recommend you disactivate YARPP, replace it with the new one, and then
|
|
71 |
* 1.5
|
72 |
* Simple installation: automatic display of a basic related posts install
|
73 |
* code and variable cleanup
|
74 |
-
* FAQ in the documentation
|
|
|
|
7 |
Tags: related, posts, post, pages, page
|
8 |
Requires at least: 2.1
|
9 |
Tested up to: 2.3.2
|
10 |
+
Stable tag: 1.5.1
|
11 |
|
12 |
Returns a list of the related entries based on keyword matches, limited by a certain relatedness threshold. Like the tried and true Related Posts plugins�just better!
|
13 |
|
14 |
+
## Description
|
15 |
|
16 |
Yet Another Related Posts Plugin (YARPP) gives you a list of posts and/or pages related to the current entry, introducing the reader to other relevant content on your site. YARPP is based on the work of [Peter Bowyer](http://peter.mapledesign.co.uk/weblog/archives/wordpress-related-posts-plugin), [Alexander Malov, and Mike Lu](http://wasabi.pbwiki.com/Related%20Entries). Key features include:
|
17 |
|
20 |
3. *Simple installation*: **New in 1.5!** Automatically displays related posts after content on single entry pages without any theme tinkering.
|
21 |
4. *Miscellany*: a nicer options screen, displaying the fulltext match score on output for admins, an option to allow related posts from the future, a couple bug fixes, etc.
|
22 |
|
23 |
+
## Installation
|
24 |
|
25 |
+
### Auto display
|
26 |
|
27 |
With YARPP 1.5, you can just put the `yarpp` directory in your `/wp-content/plugins/` directory, activate the plugin, and you're set! You'll see related posts in single entry (permalink) pages. If all your pages say "no related posts," see the FAQ.
|
28 |
|
29 |
+
### Manual installation
|
30 |
|
31 |
If you would like to put the related posts display in another part of your theme, or display them in pages other than single entry pages, turn off "auto display" in the YARPP Options, then drop `related_posts()`, `related_pages()`, or `related_entries()` (see below) in your [WP loop](http://codex.wordpress.org/The_Loop). Change any options in the Related Posts (YARPP) Options pane in Admin > Plugins. See Examples in Other Notes for sample code you can drop into your theme.
|
32 |
|
33 |
There're also `related_posts_exist()`, `related_pages_exist()`, and `related_entries_exist()` functions, which return a boolean as expected.
|
34 |
|
35 |
+
### The "related" functions
|
36 |
|
37 |
By default, `related_posts()` gives you back posts only, `related_pages()` gives you pages, and there's `related_entries()` gives you posts and pages. When the "cross-relate posts and pages" option is checked in the YARPP options panel, `related_posts()`, `related_pages()`, and `related_entries()` will give you exactly the same output.
|
38 |
|
39 |
+
## FAQ
|
40 |
|
41 |
+
### Every page just says "no related posts"! What's up with that?
|
42 |
|
43 |
+
Most likely you have "no related posts" right now as the default "match threshold" is too high. Here's what I recommend to find an appropriate match threshold: first, lower your match threshold in the YARPP prefs to something ridiculously low, like 1 or 0.5. Make sure the last option "show admins the match scores" is on. Most likely the really low threshold will pull up many posts that aren't actually related (false positives), so look at some of your posts' related posts and their match scores. This will help you find an appropriate threshold. You want it lower than what you have now, but high enough so it doesn't have many false positives.
|
|
|
|
|
|
|
|
|
44 |
|
45 |
+
### Why doesn't YARPP use tags to find related posts?
|
46 |
|
47 |
+
YARPP currently doesn't use tags to compare posts�it uses the actual content of the posts. Tag comparison as part of the "relatedness algorithm" will come soon but, in the mean time, I've found the current algorithm to work very well for many situations.
|
48 |
|
49 |
+
### Things are weird after I upgraded. Ack!
|
50 |
|
51 |
I highly recommend you disactivate YARPP, replace it with the new one, and then reactivate it.
|
52 |
|
53 |
+
## Coming soon
|
54 |
|
55 |
1. Incorporation of tags and categories in the algorithm. I've gotten the code working, but I still need to think about what the most natural algorithm would be for weighing these factors against the mysql fulltext score currently used (and works pretty well, I must say).
|
56 |
2. Um, something else! Let me know if you have any suggestions for improvement. ^^
|
57 |
|
58 |
+
## Version log
|
59 |
|
60 |
* 1.0
|
61 |
* Initial upload
|
67 |
* 1.5
|
68 |
* Simple installation: automatic display of a basic related posts install
|
69 |
* code and variable cleanup
|
70 |
+
* FAQ in the documentation
|
71 |
+
* 1.5.1
|
72 |
+
* Bugfix: standardized directory references to `yet-another-related-posts-plugin`
|
yarpp.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Yet Another Related Posts Plugin
|
4 |
Plugin URI: http://mitcho.com/code/yarpp/
|
5 |
Description: Returns a list of the related entries based on keyword matches, limited by a certain relatedness threshold. Like the tried and true Related Posts plugins—just better!
|
6 |
-
Version: 1.5
|
7 |
Author: mitcho (Michael Yoshitaka Erlewine)
|
8 |
*/
|
9 |
|
3 |
Plugin Name: Yet Another Related Posts Plugin
|
4 |
Plugin URI: http://mitcho.com/code/yarpp/
|
5 |
Description: Returns a list of the related entries based on keyword matches, limited by a certain relatedness threshold. Like the tried and true Related Posts plugins—just better!
|
6 |
+
Version: 1.5.1
|
7 |
Author: mitcho (Michael Yoshitaka Erlewine)
|
8 |
*/
|
9 |
|