Relevanssi and Pages
-
Is there any news of an update to Relevanssi that fixes the problem with pages listed on its page in the Plugin Directory on the Other Notes tab?
-
No, I haven’t yet figured it out. Then again, I’ve been too busy with other projects to really try and tackle it.
It’s a nasty problem, particularly as most of the code it relates to is pretty much copied from wpSearch, which doesn’t have the problem.
I’ll release a new version once I get the bug fixed.
Thanks for giving me a push. The bug is now fixed. The version 1.1 (just uploaded to the repository) handles pages correctly.
Terrific! I’ll give it a go.
Uh oh. Using WP 2.8 I get the following error on activation:
Plugin could not be activated because it triggered a fatal error.
Parse error: parse error in C:\Program Files\EasyPHP 3.0\www\wp\wp-content\plugins\relevanssi\relevanssi.php on line 452
Fixing that by removing the if test (since I know I have later than 2.8dev) I get another error:
Plugin could not be activated because it triggered a fatal error.
$stopwords = array( “a”, “about”, “above”, “above”, “across”, “after”, “afterwards”, “again”, “against”, “all”, “almost”, “alone”, “along”, “already”, “also”, “although”, “always”, “am”, “among”, “amongst”, “amoungst”, “amount”, “an”, “and”, “another”, “any”, “anyhow”, “anyone”, “anything”, “anyway”, “anywhere”, “are”, “around”, “as”, “at”, “back”, “be”, “became”, “because”, “become”, “becomes”, “becoming”, “been”, “before”, “beforehand”, “behind”, “being”, “below”, “beside”, “besides”, “between”, “beyond”, “bill”, “both”, “bottom”, “but”, “by”, “call”, “can”, “cannot”, “cant”, “co”, “con”, “could”, “couldnt”, “cry”, “de”, “describe”, “detail”, “do”, “done”, “down”, “due”, “during”, “each”, “eg”, “eight”, “either”, “eleven”, “else”, “elsewhere”, “empty”, “enough”, “etc”, “even”, “ever”, “every”, “everyone”, “everything”, “everywhere”, “except”, “few”, “fifteen”, “fify”, “fill”, “find”, “fire”, “first”, “five”, “for”, “former”, “formerly”, “forty”, “found”, “four”, “from”, “front”, “full”, “further”, “get”, “give”, “go”, “had”, “has”, “hasnt”, “have”, “he”, “hence”, “her”, “here”, “hereafter”, “hereby”, “herein”, “hereupon”, “hers”, “herself”, “him”, “himself”, “his”, “how”, “however”, “hundred”, “ie”, “if”, “in”, “inc”, “indeed”, “interest”, “into”, “is”, “it”, “its”, “itself”, “keep”, “last”, “latter”, “latterly”, “least”, “less”, “ltd”, “made”, “many”, “may”, “me”, “meanwhile”, “might”, “mill”, “mine”, “more”, “moreover”, “most”, “mostly”, “move”, “much”, “must”, “my”, “myself”, “name”, “namely”, “neither”, “never”, “nevertheless”, “next”, “nine”, “no”, “nobody”, “none”, “noone”, “nor”, “not”, “nothing”, “now”, “nowhere”, “of”, “off”, “often”, “on”, “once”, “one”, “only”, “onto”, “or”, “other”, “others”, “otherwise”, “our”, “ours”, “ourselves”, “out”, “over”, “own”, “part”, “per”, “perhaps”, “please”, “put”, “rather”, “re”, “same”, “see”, “seem”, “seemed”, “seeming”, “seems”, “serious”, “several”, “she”, “should”, “show”, “side”, “since”, “sincere”, “six”, “sixty”, “so”, “some”, “somehow”, “someone”, “something”, “sometime”, “sometimes”, “somewhere”, “still”, “such”, “system”, “take”, “ten”, “than”, “that”, “the”, “their”, “them”, “themselves”, “then”, “thence”, “there”, “thereafter”, “thereby”, “therefore”, “therein”, “thereupon”, “these”, “they”, “thickv”, “thin”, “third”, “this”, “those”, “though”, “three”, “through”, “throughout”, “thru”, “thus”, “to”, “together”, “too”, “top”, “toward”, “towards”, “twelve”, “twenty”, “two”, “un”, “under”, “until”, “up”, “upon”, “us”, “very”, “via”, “was”, “we”, “well”, “were”, “what”, “whatever”, “when”, “whence”, “whenever”, “where”, “whereafter”, “whereas”, “whereby”, “wherein”, “whereupon”, “wherever”, “whether”, “which”, “while”, “whither”, “who”, “whoever”, “whole”, “whom”, “whose”, “why”, “will”, “with”, “within”, “without”, “would”, “yet”, “you”, “your”, “yours”, “yourself”, “yourselves”, “the” ); ?>
I’ve just committed another small bug fix release. The English stopword file was missing
<?php
from the beginning. Hadn’t run into that before as I had only tested this on my Finnish-language blogs.Can you tell me I’m a newbie developer?
So, either install the 1.1.2 version or manually add
<?php
to the beginning of the stopwords file. Sorry for the trouble =)1.1.2 no longer throws those errors but I’m not sure the index building is doing the right thing. I have zero posts and about a dozen pages (none of which has all that much text) but 20 minutes after clicking the build index button the Options page is still blank.
Ok, maybe I was too fast to post that last comment ??
I refreshed the options page, clicked the Continue Indexing button and it finished a few seconds later.
However I would suggest adding some sort of Ajax progress indicator, if only to show that work is actually being done.
Also, is there a means to make the search results show an except that includes the text which caused the result to be included rather than the default first 55 characters?
I’ll have to take a look at the progress indicator, sounds like a good idea.
The plugin doesn’t do anything about the presentation of results, it just returns a list of post objects and the search result template does the rest.
However, a possible approach would be to modify the posts a bit, perhaps change the excerpt… But yes, I think it’s feasible.
I just committed 1.2 to the repository. It still doesn’t have the progress indicator, but:
It can create custom search result snippets that show the part (well, a part) of the post which caused the post to get caught. It can also highlight query terms in the results.
Check it out, I think it turned out quite well.
Very nice change! One small tweak I would appreciate is wrapping the search term in a span with a specific class (e.g.
<span class="actual-search-term">example</span>
so it can be styled to match our site.Thanks much! When this site is published I will let you know so you can point to it as an English language example (if you wish, I’m just responding to the plugin page note about wanting some).
You can do whatever styling you want if you choose the CSS option, but using a class is a somewhat cleaner option, especially if you want to do more than one or two things. It did cross my mind after I released the current version, and I’ll add it in the next version.
I’m on vacation this week and have some things I want to add to the plugin before I get back to work next week, so there’ll be at least one release in the next few days.
Sure, let me know and I’ll add the site on the list. I really appreciate your activity and feedback, it makes development so much more interesting to have responsive users (responsive, but not too demanding, hah).
Enjoy the vacation! I’ll look forward to this when you have the chance to update.
Note that I agree a class is best, but I think the span is also necessary, otherwise (and I may misunderstand you here, and you already agree with me) what is the span applied to?
The current CSS option asks for style and wraps the search term with a
<span style='custom css style here'>search term</span>
. So you can use any CSS style you want.What you’re suggesting,
<span class='custom css class here'>search term</span>
, does pretty much the same thing, but some users might prefer this way to do it. Allowing both is trivial, so of course that’s the best way.
- The topic ‘Relevanssi and Pages’ is closed to new replies.