Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Integrate Second Life with my blog/website?

Samuel Stonecutter
Registered User
Join date: 31 Aug 2005
Posts: 4
09-05-2005 09:21
Hi,

I want to integrate Second Life with my blog - basically I'd like to have a link on my site which takes people straight to where my av is in SL. I've seen links online which launch SL automatically (so long as you have it installed), so I'm sure this can be done. I'd also like to have a presence indicator, which shows whether I'm in SL or not, and a link which allows people to add me as a friend from outside the game - is this possible?

Many thanks in advance!
Iron Perth
Registered User
Join date: 9 Mar 2005
Posts: 802
09-05-2005 09:27
Do you have access to the server running the blog?

Or are you using blogger or one of the other systems where all you get is a web interface?

If the latter, I'm afraid your hands are somewhat tied.

If the former, you could send an email to your server which would change a web page on your blog to update your last known location and the time you were there.
_____________________
http://ironperth.com - Games for SecondLife and more.
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
09-05-2005 09:36
Or, even better, you could set up an XML-RPC stream with an attachment on you and do so.
Samuel Stonecutter
Registered User
Join date: 31 Aug 2005
Posts: 4
Re: Integration with blog.
09-05-2005 09:44
Hi,

Thanks for the quick reply. Yes, I have access to all the code - I'm running Wordpress, and I have some experience of editing the code.
Iron Perth
Registered User
Join date: 9 Mar 2005
Posts: 802
09-05-2005 09:55
Well, if you have a linux box then you could try something like this:

adduser mypos

In the mypos home dir, change the .forward file to:

"|/home/mypos/process.sh"

Add this file in your home dir

go to /etc/smrsh and

ln -s /home/mypos/process.sh

(if you're using sendmail securely, this is necessary, if not.. I can't help you)

process.sh looks something like this:

#!/bin/sh
awk '{if ($1=="Location:";) {printf "cd /var/www/htm; cat mypos.html | sed \"s/LOCATION/%s\" > mypost.html.bak; cp -f mypos.html.bak mypos.html\", $2}' | sh

And then have an attachment which calls llEmail() to [email]mypos@example.com[/email] every hour or something.

Probably won't compile, I wrote it all out of my head, but should be pretty much the thing to do. Or, at the very least, it should get you started..
_____________________
http://ironperth.com - Games for SecondLife and more.
Samuel Stonecutter
Registered User
Join date: 31 Aug 2005
Posts: 4
Hmmm..
09-05-2005 10:41
Wow...that seems kinda heavy. Let's start here: how do you add a link to sl from a web page, assuming that your users have sl installed? (I expect that part is pretty simple.)

Is it any easier if I forget about a presence indicator (online/offline) and just link to my avatar's location? Maybe I could just link to my SL home?
Iron Perth
Registered User
Join date: 9 Mar 2005
Posts: 802
09-05-2005 10:49
To your home is cool.

Just put this in:

<a href=secondlife://<home sim>/<x>/<y>>Come visit me in SecondLife!</a>

Eg:

<a href=secondlife://Dalton/128/128>Come visit me in SecondLife!</a>

or better

Come visit me in SecondLife!
_____________________
http://ironperth.com - Games for SecondLife and more.
Enabran Templar
Capitalist Pig
Join date: 26 Aug 2004
Posts: 4,506
09-05-2005 10:51
From: Samuel Stonecutter
Wow...that seems kinda heavy. Let's start here: how do you add a link to sl from a web page, assuming that your users have sl installed? (I expect that part is pretty simple.)

Is it any easier if I forget about a presence indicator (online/offline) and just link to my avatar's location? Maybe I could just link to my SL home?


Linking to any static location is easy:

secondlife://Bonifacio/128/128

Just replace Bonifacio with the simulator you want to link to, and the numbers afterward with the coordinates you see reported in the minimap. When someone clicks that link, if they have SL installed, their client will open and they'll be prompted to log in. Once logged in, they'll be at the telehub nearest those coordinates, with the destination you've provided marked on their map.
_____________________
From: Hiro Pendragon
Furthermore, as Second Life goes to the Metaverse, and this becomes an open platform, Linden Lab risks lawsuit in court and [attachment culling] will, I repeat WILL be reverse in court.


Second Life Forums: Who needs Reason when you can use bold tags?
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
09-05-2005 11:15
From: Keknehv Psaltery
Or, even better, you could set up an XML-RPC stream with an attachment on you and do so.

AngryBeth Shortbread does that with her blog :) Maybe see with her for help on setting such a thing up ?
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
Samuel Stonecutter
Registered User
Join date: 31 Aug 2005
Posts: 4
Thanks
09-06-2005 12:05
Thanks everyone for your comments and suggestions. I'll try them out.
Moss Talamasca
Serpent & Thistle
Join date: 20 Aug 2005
Posts: 367
Online Status Indicator
09-06-2005 13:04
I've been hoping i could have a status online indicator. Other systems i use which have logins send information via php indicating online status. Does SL have something like this?
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
09-06-2005 13:55
Status indicator is very easy:

CODE

integer online;
key req;

default
{
state_entry()
{
llSetColor(<1,0,0>, ALL_SIDES);
online = FALSE;
llSetTimerEvent(30.0);
}

timer()
{
req = llRequestAgentData(llGetOwner(), DATA_ONLINE);
}

dataserver(key query, string data)
{
if (req != query) return;
integer result = (integer)data;
if (online == result) return;
online = result;
if (result)
{
llSetColor(<0,1,0>, ALL_SIDES);
} else {
llSetColor(<1,0,0>, ALL_SIDES);
}
}
}

Stick this script in a white prim on your land ;)

[Edit]
Woops, you meant a status indicator on your website :o That'd require a PHP script... XML-RPC is broken in SL (you can only send commands to SL and not from SL) so you'd need to use email to indicate your status...
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
Torley Linden
Enlightenment!
Join date: 15 Sep 2004
Posts: 16,530
09-06-2005 14:02
Little tip... remember, with regions with more than one word, in the link it'd be an underscore to sub. For example:

secondlife://Sandbox_Island/128/128

NOT

secondlife://Sandbox Island/128/128

Interestingly enough I think secondlife.com messes this up on the photos on their page (o the irony), not sure if it's been corrected yet.

Ah o, it's not fixed, if this link is still valid:

http://secondlife.com/go/?sim=Sandbox%20Island&x=6&y=14&postcard=9a1b5fa8-4308-fc89-7b45-d587d0834b09

See how it's broken? :)
_____________________
Frans Charming
You only need one Frans
Join date: 28 Jan 2005
Posts: 1,847
09-10-2005 11:14
Max Case has a online indicator on his blog. Maybe he can help you out.
http://www.maxcase.info/
_____________________