Gossamer Forum
Home : Products : Links 2.0 : Customization :

Sherlock plug-in for Links 2

Quote Reply
Sherlock plug-in for Links 2
Has anyone developed a Sherlock Plugin (Mac OS Search engine) and can share the code and some infos how to configure the sherlock comments in Links.
Would be cool to give away a Sherlock-Plugin for the Mac community for free.
Thank you

Quote Reply
Re: Sherlock plug-in for Links 2 In reply to
Someone did about a year and half ago...Search for Sherlock Mac and make sure that you select ALL POSTS in the DATE RANGE field and also put in more HITS in the HITS field via the forum's search form.

Regards,

Eliot Lee
Quote Reply
Re: Sherlock plug-in for Links 2 In reply to
Yes I searched that before posting my message but but nothing was useful...

Quote Reply
Re: Sherlock plug-in for Links 2 In reply to
Time for an eye doctor appointment! Tongue

READ the following Threads!

* http://www.gossamer-threads.com/...500&Old=allposts

The "plug-in" is located HERE:

http://www.industrialhygiene.com/links/plugin.shtml

Regards,

Eliot Lee
Quote Reply
Re: Sherlock plug-in for Links 2 In reply to
Yes but I told you that i searched for that and in the resulsts were also this! So I downloaded this plugin but were a LOTS of errors and pratically is unuseful..
Thank's for the time (I still have my problem)

Quote Reply
Re: Sherlock plug-in for Links 2 In reply to
Well, did it cross your mind to contact the MOD Author via the web site where you downloaded the plug-in??? Might be a good starting point.

And BTW: You were quite vague about "searching the forums and not finding anything useful" in your previous post. May be it would be a better approach to describe the problems you are having, like,"Hey, I found the Sherlock plug-in and it doesn't seem to work very well. I was wondering if anyone could assist me with possibly de-bugging the Mod. Thanks." RATHER than what you posted.

Regards,

Eliot Lee
Quote Reply
Re: Sherlock plug-in for Links 2 In reply to
Yes, you're not wrong... ^_^

Quote Reply
Re: Sherlock plug-in for Links 2 In reply to
The Apple site that talks about creating a Sherlock plugin is here:

http://developer.apple.com/...notes/tn/tn1141.html.

But a quick overview...here's my file:
Code:
<search
name = "Some Moore Cat Diet, Fitness, and Exercise Resources Directory"
action = "http://www.somemoorecats.com/cgi-bin/wwlinks/search.cgi"
update="http://www.somemoorecats.com/SomeMooreCatsWW.src.sit.hqx"
updateCheckDays = 3
method = get
description = "Search our directory with Sherlock"
routeType = "reference">

<input name="query" user>


<interpret

resultListStart="< !-- Links -- >"
resultListEnd="< !-- Search Bar -- >"

resultItemStart="< ul >< li >"
resultItemEnd="< /ul >"

relevanceStart="< !--Relevance Start--"
relevanceEnd ="--Relevance End -- >"

>
</search>
Spacing between < ! -- > added to display in forum....please remove spaces to use this code.

You need to create this in a text editor, such as BBEdit. Then you need to open it in ResEdit and change the file type to "issp" (from "TEXT") and the creator to "fndf".

Please note that you may need to fiddle with this to match html code in your own links directory. You'll notice I have the search start at "< ! --Links -- >" .. I added the comment fields in my links html templates to facilitate the Sherlock plug in.

I couldn't get SimpleText to open the document, even after converting back to file type "TEXT" via ResEdit. But BBEdit doesn't seem to have any problems with it.


Melanie
http://www.somemoorecats.com/ww/
http://www.okhima.org/
Quote Reply
Re: Sherlock plug-in for Links 2 In reply to
EXCUSE ME! Mad

Regards,

Eliot Lee
Quote Reply
Re: Sherlock plug-in for Links 2 In reply to
No it's all fine... There was a "Qui pro quo".

Quote Reply
Re: Sherlock plug-in for Links 2 In reply to
WOW that was the help I searched. Thank you SO much! I will notice you about my results in the creation of the plugin... :))

Quote Reply
Re: Sherlock plug-in for Links 2 In reply to
I have made the plugin but sherlock take an error: no items found (my Mac OS is in italian and this translation probably is not apropriate...)
But the template wich must be modified with the comments is search_results.html ? I have put the comments (< !-- Links -- > and < !-- Search bar -- >) in this template but there was the same error on sherlock :( I haven't understand this part
relevanceStart="< !--Relevance Start--"
relevanceEnd ="--Relevance End -- >
where I should put this on the template? ...There is not a final > on relevance start and a initial < at relevance end...
Thank you

Quote Reply
Re: Sherlock plug-in for Links 2 In reply to
Yes, it's the search_results.html template that needs modification or at least reviewing to match up code with the plugin. I'm not sure that you need the Relevance Start and End since there's not a relevance searching in the links script. I copied my plugin from someone else (from the links Eliot mentioned earlier) who had it in there, and I think I just never took it out. However, I think I remember having trouble getting the plugin to work without it. You might try it both ways. I know it had to be used exactly as I have it, without the final > on relevance start and initial < at relevance end. But it's been a longlong time since I did this and I just don't remember. Try it both ways and see what happens. A couple times I had problems with one of my plugins giving the "no items found" error but it seemed to have more to do with a corrupt file than anything else. Try downloading my plugin at http://www.somemoorecats.com/ww/links/ (in left hand column under nav buttons then modify it appropriately. See if that will work.

Melanie
http://www.somemoorecats.com/ww/
http://www.okhima.org/
Quote Reply
Re: Sherlock plug-in for Links 2 In reply to
Ah ok... I have downloaded your plugin but it wan't working! I get the error "no items found"...
So you don't remember where you placed those comments in the templates?
Thank you.

Quote Reply
Re: Sherlock plug-in for Links 2 In reply to
I just downloaded the plugin again and replaced the one in my Internet Search Sites folder with the one I downloaded. I did a search on "weight watchers" and found 16 links. What OS are you using? I'm using 9.1. If you're using Sherlock 1 and an older OS, you might try removing the "routeType="reference"" part but I don't think that's the problem.

The < !-- Links -- > comment is placed at the beginning of the actual Links listing (after the category listing). Then, my links are displayed using < ul > < li > tags so that's what I show as the beginning of the result item. You need to compare your individual link output code and see what is specific enough to tell Sherlock it's found the beginning and end of each search result.

Melanie
http://www.somemoorecats.com/ww/
http://www.okhima.org/
Quote Reply
Re: Sherlock plug-in for Links 2 In reply to
Yes I tried to search with a stupid keyword "cats". It seems to be a network problem (I have Mac OS 9.1)...
But, for my plugin, i have tried so many times that... But it still wan't work... Can I view you source template?
Thank's

Quote Reply
Re: Sherlock plug-in for Links 2 In reply to
Well, the keyword "cats" would work in my cats directory but that sherlock plugin needs work. I recall that it took me a long time adjusting the plugin script until it worked for me.

My source template? For search_results.html? I'm not sure how that would help much....but also remember that the link results are formatted in link.html (where the < ul > < li > < / ul > tags are mentioned in the sherlock plugin).

But the pertinent parts of my templates are:

Search_results.html:

Code:
<%if cat_hits gt 1%><strong><%cat_hits%></strong>

<%if link_results%>

<tr bgcolor="#3366CC"><td colspan="3">
<FONT SIZE="2" FACE="Verdana, Arial" COLOR="ffffff"><B> Links:</B></FONT></td></tr>
<TR><td align=left><FONT SIZE="2" FACE="Verdana, Arial" COLOR="000000">

< !-- Links -- >
<%link_results%>
</FONT>
</TD></TR>
<%endif%>

<%if next%>
<TR>
<td align=left><FONT SIZE="2" FACE="Verdana, Arial" COLOR="000000">
< !-- Next -- >
Pages: <%next%>
</font></TD>
</TR>
<%endif%>
and link.html:
Code:
<ul><li><a href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>" Target="New"><%Title%></a>

<%rate_img%>

<%if new_mod_img%>
<%new_mod_img%>
<%endif%>

<%if isPick%>
<FONT SIZE="2" FACE="Verdana, Arial" COLOR="660099"><B>Editor's Pick</b></FONT>
<%endif%>

<%if isPopular%>
<FONT SIZE="2" FACE="Verdana, Arial" COLOR="0000FF"><B>cool</b></FONT>
<%endif%>




<%if Description%>
- <%Description%>

<%endif%>

<small>(Added: <%Date%> Hits: <%Hits%>
Rating: <%Rating%>
Votes: <%Votes%>
<%if Reviews%> <a href="<%db_cgi_url%>/review.cgi?ID=<%ID%>">Reviews:</a> <%Reviews%>
<%endif%>)

[<a href="http://www.somemoorecats.com/cgi-bin/wwlinks/mylinks.cgi?add=<%ID%>">Bookmark It!</a>]
[<a href="<%db_cgi_url%>/review.cgi?ID=<%ID%>">Rate or Review this Site</a>]
[<a href="/cgi-bin/birdcast3.cgi?ID=<%ID%>">Recommend this Site</a>]
[<a href="<%db_cgi_url%>/deadlink.cgi?ID=<%ID%>">Report Broken Link</a>]
</SMALL>

</ul>
I don' t think I have the < !--Search Bar -- > tag anymore in my template....it works without it. That just tells Sherlock where to stop looking for results. This will give you a match up with the other tags, though. Other than that, I don't think there's anything else I can tell you about making it work. Make sure you check out the Apple TIL I gave the url for yestereday. It's quite helpful.


Melanie
http://www.somemoorecats.com/ww/
http://www.okhima.org/
Quote Reply
Re: Sherlock plug-in for Links 2 In reply to
Thank you very much... I will do many tests...
^_^