user profile helpers

ssm2017 Binder - June 11, 2009 - 05:31
Project:Second Life framework
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

hello
here is a ptch to add some usefull function to get infos from the user profile in the linden website
this patch is made for the actual 1.4.2.3 cvs version

what is a profile :
In SecondLife and OpenSim worlds, we are using "profiles".
a "profile" is a page that contains informations about a user.
we can see profiles "inworld" and we can also see profiles on the linden website.

about the profile picture key :

profiles can have a picture to represent the avatar.

every element in these worlds are represented by a unique key called uuid
( http://www.lslwiki.net/lslwiki/wakka.php?wakka=key )

the profile picture is represented by a uuid.

Linden is not providing an easy way to get the uuid from a profile.
The only way that lsl scripters are using is to get the picture from the linden's website

here is an example code in lsl : http://www.lslwiki.net/lslwiki/wakka.php?wakka=LibraryDisplayProfilePic

to get this 'image key' we need to buffer the html page and look for the key inside.

im using this function in some of my scripts and i think that this is a good idea to put it inside this framework to prevent the future coders to dont rewrite it all the time.

about the profile username :
sometimes, we need to get the username from a user uuid key.
sometimes, it is not possible to get it from inworld because of absence of script, lag, bugs...
this function is helping me sometimes to get the username from the profile in the website
if im asking the username to an inworld script and it answered a blank string, im asking to the website.

the 3 functions i/o :

secondlife_get_linden_user_profile($user_key) :
input : a string containing the user uuid key
output : a string containing the html page

secondlife_extract_picture_key($profile_page) :
input : a string containing the profile html page
output : the image profile uuid key

secondlife_extract_username($profile_page) :
input : a string containing the profile html page
output : the profile user name

AttachmentSize
secondlife.module.1.4.2.3.user_profile.patch1.29 KB

#1

kbahey - June 11, 2009 - 15:57
Status:active» fixed

Committed.

#2

ssm2017 Binder - June 12, 2009 - 05:42
Category:feature request» bug report
Status:fixed» patch (to be ported)

there was an error with this patch
the lines numbers were not right
here is a correction to apply against version cvs 1.4.2.7
sorry for the convenience

AttachmentSize
secondlife.module.1.4.2.7.patch_correction.patch 1.29 KB

#3

kbahey - June 12, 2009 - 14:42
Status:patch (to be ported)» fixed

#4

System Message - June 26, 2009 - 14:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.