Difference between revisions of "Talk:N2K"
m (markup) |
|||
Line 22: | Line 22: | ||
However, the only way I could get it to work for my newer alts (that is, ones with only one name) was to change it to | However, the only way I could get it to work for my newer alts (that is, ones with only one name) was to change it to | ||
< | <source lang="lsl2"> | ||
default | default | ||
{ | { | ||
Line 35: | Line 35: | ||
} | } | ||
} | } | ||
</ | </source> | ||
[[User:Innula Zenovka|Innula Zenovka]] 08:50, 22 November 2011 (PST) | [[User:Innula Zenovka|Innula Zenovka]] 08:50, 22 November 2011 (PST) | ||
Line 48: | Line 48: | ||
[[User:Augren Ferguson|Augren Ferguson]] 00:51, 6 January 2012 (PST) | [[User:Augren Ferguson|Augren Ferguson]] 00:51, 6 January 2012 (PST) | ||
===Minor fixes=== | ===Minor fixes=== | ||
In order to get it working, I had to change LINK_THIS to LINK_ALL_OTHERS in the Tester, and had to change the URL in the N2K script, so it looks like this now: | In order to get it working, I had to change LINK_THIS to LINK_ALL_OTHERS in the Tester, and had to change the URL in the N2K script, so it looks like this now: | ||
< | <source lang="lsl2"> | ||
kReq = llHTTPRequest("http://www.w3.org/services/html2txt?url=http%3A%2F%2Fvwrsearch.secondlife.com%2Fclient_search.php%3Fsession%3D00000000-0000-0000-0000-000000000000%26q%3D" + llEscapeURL(kReq), [], ""); | kReq = llHTTPRequest("http://www.w3.org/services/html2txt?url=http%3A%2F%2Fvwrsearch.secondlife.com%2Fclient_search.php%3Fsession%3D00000000-0000-0000-0000-000000000000%26q%3D" + llEscapeURL(kReq), [], ""); | ||
</ | </source> | ||
[[User:Vladan Highwater|Vladan Highwater]] 02:08, 6 April 2012 (PDT) | [[User:Vladan Highwater|Vladan Highwater]] 02:08, 6 April 2012 (PDT) |
Revision as of 09:16, 31 May 2015
Does not work anymore (may-31-2015)
Because of changes in the SL website the results are different.
there is no "secondlife:///app/agent/" link anymore.
it is replaced by : "http://world.secondlife.com/resident/"
loads of Paid Classifieds on top of the list make it very well likely that the 2k byte return limit is exceeded.
for me extraction of the key with :
integer pos=llSubStringIndex(body,"http://world.secondlife.com/resident/");
if (pos != -1) {
pos +=37;
bkey = (key)llGetSubString(body,pos,pos+35);
works in about half of the tests. In the other half the garbage pushes the key over the 2k limit.
Si Shinn (talk) 09:46, 31 May 2015 (PDT)
Needs "Resident" as a last name for newer names?
Thanks so much. This is a great help.
However, the only way I could get it to work for my newer alts (that is, ones with only one name) was to change it to
default
{
link_message(integer sender_num, integer num, string str, key id) {
lReqNum = sender_num;
if(llGetListLength(llParseString2List(str,[" "],[""]))==1){//test for legacy name or new one
str+=" Resident";//if it's a new name
}
// llOwnerSay(str);
kReq = str;
state kn2k;
}
}
Innula Zenovka 08:50, 22 November 2011 (PST)
No problem. Yes, very true. "new members" *do* have second names. It's just that they are all "Resident". In fact, if you pass the _full name_ to the script (including the "Resident" last name), it would work out of the box. Added a note, ty.
Kira Komarov 08:47, 23 November 2011 (PST)
SL Search API limits and More
Note that keys of people who choose to not list their avatars in search are not available via the vwrsearch API. You may want to add a fallback of some sort, or update your recommendation that for any critical system the operation of one's own caching database with multiple sources may be the safest option.
There is also the risk of W3C blacklisting SL IP ranges if using their service becomes overly popular, in which case it's again safer to run the same functionality on one's own server. This incurs costs, of course, which makes that route viable only for commercial applications.
Augren Ferguson 00:51, 6 January 2012 (PST)
Minor fixes
In order to get it working, I had to change LINK_THIS to LINK_ALL_OTHERS in the Tester, and had to change the URL in the N2K script, so it looks like this now:
kReq = llHTTPRequest("http://www.w3.org/services/html2txt?url=http%3A%2F%2Fvwrsearch.secondlife.com%2Fclient_search.php%3Fsession%3D00000000-0000-0000-0000-000000000000%26q%3D" + llEscapeURL(kReq), [], "");
Vladan Highwater 02:08, 6 April 2012 (PDT)