Search_behavior and ruby-lang.org

I’ve added search to a website I’m working on using the
search_behavior plugin, and everything is working fine. I noticed on
the ruby-lang.org site that the search there is a lot nicer though. It
includes a bit of content from each page it finds with the search
phrase highlighted. I think it’s also excluding some pages (I couldn’t
get it to list the “page missing” page in its results). Is anyone here
familiar with how that page on ruby-lang.org works? Is it still using
search_behavior? Is it possible to get the search_behavior in the
radiant subversion repository working like that?

Thanks,
Wes Bangerter

Wes Bangerter wrote:

I’ve added search to a website I’m working on using the
search_behavior plugin, and everything is working fine. I noticed on
the ruby-lang.org site that the search there is a lot nicer though. It
includes a bit of content from each page it finds with the search
phrase highlighted. I think it’s also excluding some pages (I couldn’t
get it to list the “page missing” page in its results). Is anyone here
familiar with how that page on ruby-lang.org works? Is it still using
search_behavior? Is it possible to get the search_behavior in the
radiant subversion repository working like that?

Ruby-Lang is using a modified version of Oliver B.'s search
behavior:

http://rubyidentity.org/ruby-lang.org/browser/ruby-lang.org/trunk/www/vendor/plugins/search_behavior/

Here’s the code that makes it work:

<r:search>
<r:if_query>
<r:empty>

No matches.


</r:empty>
 <r:results:each>
   <h3><r:link><r:excerpt><r:title/></r:excerpt></r:link></h3>
   <p><r:excerpt radius="200"><r:content /></r:excerpt></p>
 </r:results:each>

 <hr class="hidden" />

 <form id="search-again-form" action="<r:url />" method="get">
   <p><r:input /> <input type="submit" value="Search Again" /></p>
 </form>

</r:if_query>
<r:unless_query>

<r:input />



</r:unless_query>
</r:search>


John L.
http://wiseheartdesign.com

On 24 Oct 2006, at 17:59, John W. Long wrote:

familiar with how that page on ruby-lang.org works? Is it still using
search_behavior? Is it possible to get the search_behavior in the
radiant subversion repository working like that?

Ruby-Lang is using a modified version of Oliver B.'s search
behavior:

http://rubyidentity.org/ruby-lang.org/browser/ruby-lang.org/trunk/
www/vendor/plugins/search_behavior/

the modifications look very useful. thanks for posting the link.
I can browse the code but I can’t get at the plugin, though: script/
plugin throws a 500 error and SVN does this:

$ svn co http://rubyidentity.org/ruby-lang.org/browser/ruby-lang.org/
trunk/www/vendor/plugins/search_behavior/
svn: PROPFIND request failed on ‘/ruby-lang.org/browser/ruby-lang.org/
trunk/www/vendor/plugins/search_behavior’
svn: PROPFIND of ‘/ruby-lang.org/browser/ruby-lang.org/trunk/www/
vendor/plugins/search_behavior’: 501 Unsupported method (‘PROPFIND’)
(http://rubyidentity.org)

is there a glitch or am I just doing something wrong?

thanks,

will

William Ross wrote:

$ svn co http://rubyidentity.org/ruby-lang.org/browser/ruby-lang.org/
trunk/www/vendor/plugins/search_behavior/
svn: PROPFIND request failed on ‘/ruby-lang.org/browser/ruby-lang.org/
trunk/www/vendor/plugins/search_behavior’
svn: PROPFIND of ‘/ruby-lang.org/browser/ruby-lang.org/trunk/www/
vendor/plugins/search_behavior’: 501 Unsupported method (‘PROPFIND’)
(http://rubyidentity.org)

is there a glitch or am I just doing something wrong?

You are using the path for the Trac browser. For svn, try this one:

http://rubyidentity.org/svn/ruby-lang/ruby-lang.org/trunk/www/vendor/plugins/search_behavior/


John L.
http://wiseheartdesign.com

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs