Difference between revisions of "Online Indicator"
Jump to navigation
Jump to search
(another :p) |
(web-1383 futureproofing attempt) |
||
Line 49: | Line 49: | ||
key toucher; | key toucher; | ||
string status; | string status; | ||
// VD 2009-11-24 workaround for WEB-1383, use <meta> instead of <img> | // VD 2009-11-24 workaround for WEB-1383, use <meta> instead of <img> | ||
// VD 2009-11-25 try <img> if meta tag gets removed in the future | |||
string profile_key_prefix = "<meta name=\"imageid\" content=\""; | string profile_key_prefix = "<meta name=\"imageid\" content=\""; | ||
integer s1l; | string profile_img_prefix = "<img alt=\"profile image\" src=\"http://secondlife.com/app/image/"; | ||
integer profile_key_prefix_length; // calculated from profile_key_prefix in state_entry() | |||
integer profile_img_prefix_length; // calculated from profile_img_prefix in state_entry() | |||
//string profile_key_prefix = "<meta name=\"imageid\" content=\""; | |||
//integer s1l; | |||
default | default | ||
{ | { | ||
state_entry() | state_entry() | ||
{ | { | ||
profile_key_prefix_length = llStringLength(profile_key_prefix); | |||
profile_img_prefix_length = llStringLength(profile_img_prefix); | |||
llSetText("", <1,0,0>, 1.0); | llSetText("", <1,0,0>, 1.0); | ||
llSetTexture(blank, ALL_SIDES); | llSetTexture(blank, ALL_SIDES); | ||
Line 73: | Line 81: | ||
state_entry() | state_entry() | ||
{ | { | ||
llSetTimerEvent(10); | llSetTimerEvent(10); | ||
} | } | ||
Line 90: | Line 97: | ||
string profile_pic; | string profile_pic; | ||
integer s1 = llSubStringIndex(body, profile_key_prefix); | integer s1 = llSubStringIndex(body, profile_key_prefix); | ||
if (s1 == -1) { | integer s1l = profile_key_prefix_length; | ||
if(s1 == -1) | |||
{ // second try | |||
s1 = llSubStringIndex(body, profile_img_prefix); | |||
s1l = profile_img_prefix_length; | |||
} | |||
if (s1 == -1) | |||
{ // still no match? | |||
profile_pic = blank; | profile_pic = blank; | ||
} | } |
Revision as of 03:12, 26 November 2009
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Copying Permission
Copyright © 2008 by Kristy Fanshaw
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
To get a copy of the GNU General Public License, see <http://www.gnu.org/licenses/>.