Difference between revisions of "Talk:N2K"

From Second Life Wiki
Jump to navigation Jump to search
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
===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 :
<code>
            integer pos=llSubStringIndex(body,"http://world.secondlife.com/resident/");
            if (pos != -1) {
                pos +=37;
                bkey = (key)llGetSubString(body,pos,pos+35);
</code>
works in about half of the tests. In the other half the garbage pushes the key over the 2k limit.
[[User:Si Shinn|Si Shinn]] ([[User talk:Si Shinn|talk]]) 09:46, 31 May 2015 (PDT)
: <nowiki>secondlife:///</nowiki>app/agent/''key-goes-here''/about still works fine. It's a viewer feature and was never an external web site.  The attempt in this script to use the session parameter with that w3.org service does fail at present, and the http_response is looking for a string that it will not find. Not sure why this whole category of scripts is even still here, it's all dubious, but I'll quickly patch up this script so at least it's not totally broken.
: The 2K response limit is no longer a hard limit, by the way. You can grab up to 16K now, using HTTP_BODY_MAXLENGTH in your llHTTPREquest call. --[[User:Cerise Sorbet|Cerise Sorbet]] ([[User talk:Cerise Sorbet|talk]]) 10:38, 31 May 2015 (PDT)
===Needs "Resident" as a last name for newer names?===
===Needs "Resident" as a last name for newer names?===
Thanks so much.  This is a great help.
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
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
<lsl>
<source lang="lsl2">
default
default
{     
{     
Line 16: Line 38:
     }
     }
}
}
</lsl>
</source>
[[User:Innula Zenovka|Innula Zenovka]] 08:50, 22 November 2011 (PST)
[[User:Innula Zenovka|Innula Zenovka]] 08:50, 22 November 2011 (PST)


Line 29: Line 51:


[[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:
<lsl>
<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), [], "");
</lsl>
</source>
[[User:Vladan Highwater|Vladan Highwater]] 02:08, 6 April 2012 (PDT)
[[User:Vladan Highwater|Vladan Highwater]] 02:08, 6 April 2012 (PDT)

Latest revision as of 10:13, 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)

secondlife:///app/agent/key-goes-here/about still works fine. It's a viewer feature and was never an external web site. The attempt in this script to use the session parameter with that w3.org service does fail at present, and the http_response is looking for a string that it will not find. Not sure why this whole category of scripts is even still here, it's all dubious, but I'll quickly patch up this script so at least it's not totally broken.
The 2K response limit is no longer a hard limit, by the way. You can grab up to 16K now, using HTTP_BODY_MAXLENGTH in your llHTTPREquest call. --Cerise Sorbet (talk) 10:38, 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)