Pages: [1]   Go Down

Author Topic: Firefox Keyword search for LL  (Read 5800 times)

mjdl

  • Newbie
  • *
  • Offline Offline
  • Posts: 11
  • I press the camera shutter; I scream.
Firefox Keyword search for LL
« on: October 23, 2009, 02:30:29 pm »

I've just registered for posting to these forums, although I've been reading them for several years.

One thing I've found is that the forum software's search function (even advanced) is a bit weak: you really have to use a plus sign in front of each term if you are using multiple terms, since otherwise the results are too numerous. Also, the results list seems in purely chronological order, I think most people want relevance order to rapidly zero in on what postings to read.

Google's indexing of the forums is far better, I think: query results are sorted by relevance, they can be re-sorted in a variety of ways by using the "Show options" panel on every Google results page, query terms are joined in a Boolean conjunction by default.

The Firefox web browser allows the creation of keywords for bookmarks, so that typing e.g. luf high iso luminance noise in the browser's address field runs the URL of the Firefox bookmark with the keyword luf and replaces every instance of %s in the bookmark URL with the rest of the terms after luf.

Such an URL to Google search the LL forums can take the form (using Google's site: and inurl: operators) http://www.google.ca/search?hl=en&q=site:luminous-landscape.com%20inurl:forum%20inurl:lofiversion%20%s which 1) restricts Google results to those from luminous-landscape.com and 2) only displays those with forum and lofiversion in the URL. Since the lofiversion of the forum contains just text, this may be a more accurate search--I haven't really done extensive testing.

This is how such a bookmark looks in the Firefox bookmarks manager:[attachment=17424:FirefoxLLforums.jpg]

And another similar keyword search can be set up to search just LL editorial content: just replace inurl:forum and inurl:lofiversion with -inurl:forum and -inurl:lofiversion

I find these bookmarks very useful for searching LL. (You can also use the Google search operators in the Google custom search box on the LL front page.)
« Last Edit: November 02, 2009, 03:30:56 pm by mjdl »
Logged

mjdl

  • Newbie
  • *
  • Offline Offline
  • Posts: 11
  • I press the camera shutter; I scream.
Firefox Keyword search for LL
« Reply #1 on: October 23, 2009, 05:05:53 pm »

Something similar can also be done for Microsoft Internet Explorer 7 and 8 by adding a custom search provider for the Google search.

The IE visitor can do this on their own, but this requires a little more work:

1) Go to Create Your own Search Provider
2) Use http://www.google.ca/search?hl=en&source=hp&q=site%3Aluminous-landscape.com+inurl%3Aforum+inurl%3Alofiversion+TEST&meta=&aq=f&oq= for the URL
3) Give it a short name like LL Forums
4) click on the button and OK the resulting dialog.

The search provider will have the Google and not the LL icon, however. Correcting that requires the cooperation of the LL forum site admins.

According to the Microsoft developer site at http://msdn.microsoft.com/en-us/library/cc848862(VS.85).aspx and the equivalent page on the Mozilla developer site https://developer.mozilla.org/en/Creating_O...ins_for_Firefox the LL site admin need to serve the following XML file from a forum server URL, say http://luminous-landscape.com/forum/LLForumSearch.xml
[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:ie="http://schemas.microsoft.com/Search/2008/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
   <ShortName>LL Forum Search</ShortName>
   <Description>LL Forum Search</Description>
   <Image height="16" width="16" type="image/icon">http://luminous-landscape.com/forum/favicon.ico</Image>
   <InputEncoding>UTF-8</InputEncoding><Url type="text/html" template="http://www.google.ca/search?hl=en&amp;source=hp&amp;q=site%3Aluminous-landscape.com+inurl%3Aforum+inurl%3Alofiversion+{searchTerms}&amp;meta=&amp;aq=f&amp;oq="/></OpenSearchDescription>

I'm attaching that as an XML file:[attachment=17430:LLForumS...Combined.xml]

Then, in the HEAD element of every forum page served to forum visitors, a LINK element is inserted, like
[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']<link title="LL Forum Search" rel="search"
   type="application/opensearchdescription+xml"
   href="http://luminous-landscape.com/forum/LLForumSearchCombined.xml">

I have attached an example:[attachment=17431:LLForumS...Combined.html]

In IE8 (I don't have IE7 to test), this will temporarily add the LL search provider to the visitors' choice of search providers for the current browser session and it can be installed if visitors choose to do so. The MSDN page cited above shows how that is done by the visitor.

I've tested the attached code on both Firefox 3.0.x and MS IE 8. Unfortunately, I can't figure out why the XML search provider won't work when referenced by script in the web page to add it to the visitor's search providers--but it does work via the autodiscovery method described above on both browsers.

I know that the URLs from LL's custom Google search could be substituted, but I'm not doing that for two major reasons: 1) the custom results page is lacking the "Show options" of the regular Google results page, and 2) (a personal preference) I find the dark background and coloured text not very easy to quickly scan. (Can I be really heretical and ask that a black text on white background style choice be added to all LL pages? Maybe some kind of preference stored in a cookie? I know I can and do use the "No Style" choice in the Firefox View menu, but that does destroy the page formatting.)
« Last Edit: October 23, 2009, 06:59:22 pm by mjdl »
Logged
Pages: [1]   Go Up