Hi Jonathon,
> smLNK has been updated and I would like to update
> DSQD as well.
I've updated it, attached it, and committed changes to CVS.
I added the ability for it to be passed only the 4-digit smLNK code to
search, too, and changed it so that when a key is passed it will add
it to the url in the fashion http://smLNK.com/j2vJ - which is
bookmarkable (just in case).
Regards,
Shawn K. Hall
http://ReliableAnswers.com/
'// ========================================================
What if there were no hypothetical questions?
<search function="smlnk">
<name>smLNK</name>
<description>
smLNK is a link-shortening redirector where the URLs are as short as possible.
If you do not use a switch and the value passed is only four digits long it will
be treated as an smLNK, otherwise it will be treated as a url.<br/>
<div class="helpboxDescLabels">Switches:</div>
<table class="helpboxDescTable">
<tr><td>/url</td><td> - </td><td>The url that is to be shortened</td></tr>
<tr><td>/key</td><td> - </td><td>Get the url that corresponds to the given key</td></tr>
</table>
<div class="helpboxDescLabels">Example:</div>
<table class="helpboxDescTable">
<tr><td>smlnk http://sourceforge.net/project/showfiles.php?group_id=42081&release_id=154228</td></tr>
<tr><td>smlnk /url http://www.dqsd.net/</td></tr>
<tr><td>smlnk biST</td></tr>
<tr><td>smlnk /key biST</td></tr>
</table>
</description>
<category>Functions</category>
<link>http://smlnk.com/</link>
<contributor>Jonathon Marshall</contributor>
<form name="smlnkf"
action="http://smlnk.com/"
method="post">
<input type="hidden" name="url" />
<input type="hidden" name="key" />
</form>
<script><![CDATA[
function smlnk(q)
{
if( nullArgs("smlnk", q) )
return false;
document.smlnkf.key.value = "";
document.smlnkf.url.value = "";
var args = parseArgs(q, "url, key");
if ( args.switches.length > 0 )
{
switch( args.switches[0].name )
{
case "key":
openSearchWindow("http://smlnk.com/" + args.q);
return true;
case "url":
default:
document.smlnkf.url.value = args.q;
break;
}
}else{
if(q.length == 4){
openSearchWindow("http://smlnk.com/" + args.q);
return true;
}else{
document.smlnkf.url.value = q;
}
}
submitForm(smlnkf);
}
]]></script>
<copyright>
Copyright (c) 2002 David Bau
Distributed under the terms of the
GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
</copyright>
</search>