Online Status inSL

Contributors: gwynethllewelyn
Donate link:
Tags: second life, online, status, profile, sl
Requires at least: 3.0
Tested up to: 4.5
Stable tag: trunk
License: GPLv2 or later
License URI:

Allows you to show your Second Life online status on any WordPress blog (multiple widgets and shortcodes are possible)


This simple plugin with associated widget allows you to show your online status in Second Life.

It also includes a LSL script to place inside an in-world script, which is available from the Settings menu.

Warning: Versions 1.3.X and above are utterly incompatible with previous versions; you will need to add the new script to all your in-world scripted objects or your blog will not display the status at all!

Warning: Version 1.3.8 and above might make it impossible for you to delete old tracking objects. 1.4.0 adds a way to delete all of the tracking objects, but there have been plenty of changes that this simply might not work any longer.


  1. After installing the plugin, go to the Settings menu and look at the option for "Online Status inSL". You should be shown a pre-formatted LSL script.
  2. Launch SL.
  3. Create an object in your land.
  4. Open the object, and go to the Contents tab.
  5. Create a new script inside (just click on the button).
  6. Delete everything in that script.
  7. Now go back to the WordPress admin page you've opened, and copy the script and paste it inside your LSL script in SL.
  8. Save the LSL script in SL; it should recompile.
  9. The LSL script will now try to contact your blog and register itself.
  10. You can go back to WordPress, go to Appearance > Widgets, and select the widget "Online Status inSL" by dragging it to one sidebar.
  11. Select the avatar name and (optionally) change the text that gets displayed.
  12. If you wish a SL profile picture, select "left", "right", or "center" for alignment. If you don't wish it, just leave the setting to "none".
  13. Refresh your blog; it should now show your online status!

To have multiple widgets for multiple avatars, just drag & drop a few more. In-world, each avatar needs to have their own scripted object. You can have two or more widgets for a single avatar (although this is pointless...).

Styling of each widget is possible via additional CSS (see FAQ).

From version 1.1.0 onwards, this plugin incorporates the Shortcode API. You can now embed tags inside posts and pages like this:

[osinsl avatar="Avatar Name"]

See the section on Shortcodes for more information.

1.2 includes the ability to delete tracked avatars from the admin page. This is mostly needed if you're doing a lot of tests, lost an in-world object and need to create a new one for the same avatar, and so forth. Note that you can have several online status indicators on different sims for the same avatar.

1.2 also allows an optional SL profile picture to be shown on the widget (or via shortcodes on any page or post). For this to work, you need to have set your SL profile to visible on the Web.

From 1.3.0 onwards, the plugin has been rewritten from scratch and the previous in-world scripts will not work any longer. Now the widget won't contact the in-world object any longer; instead, it works the other way round: every minute, the in-world object will see if the status has changed. If it has, it will send an update to the blog. If not, it won't do anything and just patiently wait. The blog will just read stored information from the WP database but not initiate any new communication. This should get pages with this widget to display much faster.

Thanks to Celebrity Trollop for the suggestion for changing this, and to the ever-patient Puitia for the many tests!

1.4.0 changed the way the list of tracked objects are displayed, using an internal WP API. It also includes more communication with the in-world objects, allowing them to be resetted, deleted, or simply tested to see if they're alive.

Frequently Asked Questions

Uh oh! I have tried out earlier versions before, I did an upgrade, and now nothing works!

Sorry about that. The code was completely rewritten and now uses HTTP-in instead of XML-RPC, retrieves a bit more data from in-world (to be used on future versions), and stores information on the blog itself instead of external files on the upload directory (and even has some caching).

These were simply too many changes, and it was next-to-impossible to make the plugin backwards-compatible with 0.9.X. You will need to go back to your scripted object and drop the new script inside.

Updating to 1.2 will probably get a profile picture by default; change your widget and save again.

1.0-1.2.1 scripts might still work with 1.3.X widgets, but it's a safer bet to use the new LSL script.

1.3.X scripts should still work with 1.4.X widgets, but you will not get the ability to reset or delete the objects remotely. Pings should work.

I get a "status unknown" error

This happens when the dataserver in Second Life is slow in responding; there is a limit to the number of successive queries that it replies to. Usually, after the next refresh (every minute or so), it should retrieve the correct status (online/offline) and start working again. Since the in-world object caches entries, this might mean waiting for about one minute for the error to disappear.

I upgraded and now the widget does not update the status

Go in-world and touch the in-world object. It should re-register and everything should work fine again.

The LSL script cannot contact the webserver!

This might happen if you have a very unusual WordPress installation. You'll have to change the line in the LSL script saying "http://your-domain-name/wp-content/plugins/online-status-insl/save-channel.php" to whatever is appropriate for your blog.

I get errors on the LSL script

Make sure you really, really have copied it correctly... in some cases, quotes might be changed into typographical quotes; ampersands into \&amp\; or something like that. If all failed, contact me in-world, I'll give you a copy of the script (you'll have to change the appropriate URL for your blog though)

Nothing works!

Email me at, I'll try to do my best to help, but take into account that some of your configurations might be very tough to debug and I might not be able to help you.

I get a lot of errors, but it sort of works...

I need more people like you to help debug me this! I have a rather standard configuration at Dreamhost and this works well with my blogs there. But I can imagine that stranger configurations will be harder to debug! Please try to figure out what version of WordPress you're using, what version of PHP is installed on your host, and if you have writing permissions to the "uploads" directory under wp-content

I want to style my messages, but the widget doesn't allow HTML tags

This is mostly for security reasons and to prevent users to make serious mistakes. You can use CSS to style your Online Status inSL widget instead; see the section on CSS.

When I deactivate the plugin and activate it again, the widget stops working/my avatar names disappear

If you deactivate the plugin and activate it again, all internal data with the online status is lost. You will need to go back in-world and touch the objects (or reset them) to send the information back to your blog. Note that the widgets will still be at the same places and keep the overall configuration except for the avatar name they're bound to.

Sometimes more than one status indicator gets deleted, but I just clicked on one

This should have been fixed now. Just go back in-world and touch your objects to re-activate them on WordPress.

I can't delete one of the status indicators on WordPress, even if I have removed the in-world object manually

From 1.4.0 onwards, you have more options to delete the status indicators (either just on WordPress, just in-world, or both). Keeping them in sync across plugin versions is a formidable task! Be patient...

The list of tracked objects is completely out of sync with what WordPress displays and I cannot delete some of the old objects

This will definitely happen if you have been using this plugin for a long, long time, and have several different versions. To make matters worse, the way the list of tracked objects is stored in WordPress has changed for 1.4.0, so many of your objects might become undeletable. In this case, all you can do is de-install and re-install the plugin, go in-world, and reset all your objects by touching on them.

I'm a relatively recent user and my profile picture didn't work

My apologies. New users have a "fake" last name, "Resident", which is however never used on profile pictures. 1.3.5 should fix this.

Can I get translations in different languages?

Starting with 1.3.5, you can. A default English .po file is supplied, so you can tweak it to your own language. I've added Portuguese as an example. More translations are welcome!

Will this work for OpenSimulator-based grids?

Not quite, but almost. Basically, you can certainly track if an avatar is online/offline on any grid (the tracking code is grid-independent). However, each OpenSimulator grid operator stores avatar profiles differently. This means that you won't get any fancy pictures, links to profiles, or to location — these are hard-coded to work with the Second Life grid.

If you just wish to have a text message saying "my avatar is online on grid X", then this plugin will certainly work.

In future versions, the options to extract profile data from OpenSimulator grids might have some extra settings, but it still won't work with every grid. Each grid really does this differently!


Plugin README Parser: Could not find screenshot-1 image file

Plugin README Parser: Could not find screenshot-2 image file

Plugin README Parser: Could not find screenshot-3 image file

Plugin README Parser: Could not find screenshot-4 image file

Plugin README Parser: Could not find screenshot-5 image file

Plugin README Parser: Could not find screenshot-6 image file



  • New backoffice display, using WP_List_Table. This makes it more portable to future versions and is 100% compatible with the overall look & feel of WordPress
  • In-world script now allows remote reset/deletion requests. Older objects will silently fail with reset/deletion requests, but the rest of the functionality will still work!
  • You can now ping in-world objects to see if they're active and/or your WP database is in sync. This will work with older scripts, too
  • Objects that have the current version will have its version number coloured green; older (but functional) versions will be displayed in yellow; ancient versions (which will not work) will be displayed red
  • Status display on the plugin backoffice is coloured green for online, red for offline
  • You can now use bulk actions to ping/delete/reset/destroy objects
  • Several sections of the code were reshuffled, and lots of comments added


  • Changed the way avatar names are selected: now it's by object key, not avatar name (to allow avatars on OpenSim grids to be tracked)
  • Because 1.3.7 didn't fix the deletion error, new code was developed using the above changes; this might invalidate previous versions! (Because objects are now tracked by object key and not avatar name, previous settings might have invalid data)
  • Avatar profile pictures do not use align=XXX tags but instead the class gets aligncenter, alignleft, alignright for consistency with WP, current themes, and recent CSS versions
  • When selecting an avatar name on the Widget, it displays region and position (to allow avatars with the same name in different grids to be easily selected)
  • Added objectkey option for the shortcode (to deal with avatars with the same name in different grids)
  • Added fancy banner
  • Added a few extra translations (they only appeared on in-world HTTP-in responses, not on WP)
  • Confirmed compatibility with WP 3.9
  • Users upgrading directly from 1.0 (or earlier versions) should now manually delete the file under wp-content/uploads


  • Minor retweaking of the logic for deleting online status indicators from the admin page


  • Fixed tiny bug with incompatible function names with other plugins of mine


  • Added support for multiple languages. Portuguese was added. Translators welcome!
  • Fixed issue for avatars with "Resident" as their last name (links to profile images were broken)
  • Fixed minor programming issues and alt/title tags for the images for full HTML compliance


  • Completely changed the communications protocol. Now no HTTP-in calls are used. This makes the widget much faster to show on pages, and should lead to less "status unknown errors". Thanks to Celebrity Trollop for proposing a much simpler way to the code design!
  • Additionally, shortcodes were not really working unless there was also a widget on the blog. The change should now fix this.


  • Fixed lack of return code on HTTP requests to in-world objects, probably caused by timeouts. Thanks for Puilia for checking it and to Celebrity Trollop for providing a simple fix (I've also added 60 seconds of timeout instead of the default of 5)


  • Adds SL profile picture to the widget, to the backoffice, and to shortcodes
  • Added the ability to delete entries from the database
  • Changed LSL script to be inside a textarea for better layout
  • Fixed shortcode bugs and added new options
  • Fixed incorrect saving of serialized settings and added maybe_unserialize to deal with warnings when serialization was not required (happened when multiple widgets were used)
  • Added target="_blank" on links to avatar profile and object location
  • Removed dependency on cURL


  • More URL bug fixes, solved with rawurlencode


  • Fixes a bug on links when in-world object names have single quotes in the names


  • Implements the Shortcode API for embedding the status on a page or post (with its own CSS classes)
  • Added further snapshots to help out the installation process in Second Life


Major upgrade! Note that the old version of the LSL script will not work any longer! You need to replace all in-world scripted objects manually

  • Uses HTTPRequest and HTTP-in instead of XML-RPC
  • Supports multiple avatars and multiple widgets
  • Options are now saved using the WP mechanism instead of using external files
  • Uses a caching mechanism to reduce the number of requests to the simulators
  • Added CSS div and span for the widget to allow restyling


  • Added some contributed code by SignpostMarv replacing obsolete attribute escaping code
  • Added smaller screenshot
  • Added a FAQ Q&A for "status unknown"


  • First release.

Upgrade Notice


If you had problems in deleting unused items, this version might fix them for you. Notice that things changed in the way the list of objects/avatars are tracked. You might have problems when upgrading this plugin and trying to delete previous objects! Sorry for that, there was a nasty bug in the code.

If you cannot keep your objects in-sync with WordPress, uninstall and reinstall the plugin, which should give you an empty table of tracked objects. Now go in-world and touch each of them in turn, to get them re-registering again with your WordPress site. Remember to change their LSL scripts to the latest version!


To allow styling of the plugin, the following styles are emitted by the widget:

The whole content of the widget is included inside a <div class='osinsl'>

The text before the status is a span with class osinsl-before-status. The status itself is osinsl-status and the text afterwards is osinsl-after-status.

Status unknown (i.e. SL dataserver issues) is styled as osinsl-problems and the text for an unconfigured widget is styled osinsl-unconfigured.

The profile picture (if visible) will have the class osinsl-profile-picture. Users can set the horizontal alignment (using the standard alignleft, aligncenter, alignright classes) but nothing else. Size is limited to 80x80 (all this might be changed).

To style embedded shortcode, change the CSS class for osinsl-shortcode.


1.2 and onwards support shortcodes, to embed online status and SL profile pictures inside posts and pages.

The overall syntax is:

[osinsl avatar="<avatar name>" picture="[none|center|right|left]" status="[on|off]" profilelink="[on|off]"]
or [osinsl objectkey="<UUID>" picture="[none|center|right|left]" status="[on|off]" profilelink="[on|off]"]

avatar should have a valid Second Life/OpenSimulator avatar name which has an associated online status indicator in SL/OpenSimulator. This will expand to show the online status (e.g. usually online, offline, or an error message if no widget was configured or if the avatar is not being tracked). Note that if you have avatars with the same name on different grids, this will just get you one of them.

objectkey should be the Object Key of an in-world online status tracking object. This should be used alternatively to avatar and is useful if you have several objects tracking your avatar across different grids, all for the same avatar name. Note that object keys may change over time (when they get copied, duplicated, taken back to inventory and rezzed again, etc.) so this should be used only as a last alternative, when you really have several avatars in different grids, all with the same name.

picture is optional and defaults to none (i.e. profile picture is not shown); if the user has set the SL web profile to be visible, this will retrieve their profile picture, and resize it to 80x80. Options are left, right, and center which will provide minimal formatting (additional styling requires CSS; image size is fixed for now; see the CSS section for more information).

If the picture is set, status can be set to off (just show the picture but not the actual status).

If the picture is set, profilelink can be set to on (default is off) to link the picture to SL's web profile page.

Print Friendly, PDF & Email
  • Shadowz Greymoon

    I tried to install this plug in, and when copying the script over to SL, I get (283,24) :ERROR : Name not defined within scope. I get that error when I hit save and it opens up the Preprocessed window in Firestorm Viewer.

  • Now that is VERY weird! (283,24) looks like being line 283, column 24. But the script only has 179 lines…! Did you, by any chance, copy it twice? That would certainly explain the error…

  • Shadowz Greymoon

    I was able to get it, apparently there are still some minor bugs in Firestorm, so used the official SL viewer, and it worked like a charm!!

  • Shadowz Greymoon

    Loved this plug in, but sadly when I finally moved to my own webhosting provided through byethost, and ifast. their techs and I have spent numerous hours trying to debug this one plug in. Now when I set up my inworld script I get this in second life. SL Online Status Indicator: PermURL NOT sent. Status was 403; error message:

    403 Forbidden


    You don’t have permission to access /wp-content/plugins/online-status-insl/save-channel.php
    on this server.

    Additionally, a 404 Not Found
    error was encountered while trying to use an ErrorDocument to handle the request.

    and it renders the whole thing funky. Even though all the permissions are set right, it leaves the save-channel.php inactive. Any suggestions?

  • Ok… to be absolutely sure that the permissions are, indeed, right, there is no choice but to call that script from a browser (Firefox, Chrome, Safari, IE…). But because there is quite an amount of checks (to prevent anything else but SL/OpenSim to call the script), you will need to do the following:

    1) Make a copy of save-channel.php
    2) Now edit it, and add the two lines at the very top, just after the 1st line (where the php tag is)


    3) Save it.

    4) Now call the script directly on the browser, i.e. http://your.domain.address/wp-content/plugins/online-status-insl/save-channel.php

    You should just get a mostly blank page with ‘hi’ displayed on it. If so, then your server is properly configured. You can restore the copy. The problem is not there.

    Check Settings > Online Status inSL and make sure you copy & paste the code exactly as it is to your in-world script. Maybe, when switching providers, there was some change of URL (e.g. formerly you had something like and now you just have, or

    If you still get a 503 — Forbidden or 404 — Not found error, then:
    a) Either your server has a special configuration that prevents WP scripts to be called (not unlikely, if you have some extra security settings). This might be tricky to figure out. It could be a security plugin preventing things to be called. Or it might be your new provider’s own security measures filtering incoming calls to WP. Either way, I might be unable to help you out much 🙁 You could eventually ask them if there are some ‘safe’ directories inside WP to place code that can be remotely called, but, depending where they allow this to work, the save-channel.php script might require a few changes. This means that every time there is an upgrade, you might need to make those changes again 🙁
    b) There was a mistake made on step 2 above 🙁

  • Shadowz Greymoon

    Did that and got the “hi” on the blank page. So am thinking it’s the hosting. It works on byethost which is where my free account sits, I know because I made a new sub domain and installed it and it worked. This one is from Ifast and it’s paid monthly. So now I’m going to contact them and show them the steps I took and maybe they can help me figure it out. I did everything exactly as you instructed and still get the “You do not have permission” Thanks for trying though

  • Shadowz Greymoon

    It’s on their end for sure, I just need to explain what it is, and I may just try to move the plug in to another directory to see if it works.

  • Ok, that’s actually very interesting. So it works from a web browser, but not from Second Life. I can only wonder why!

    Can you try something else? Again, something very simple. First change your save-channel.php again, to have those two lines as before (just to write “hi” again). Test it from a browser to make sure it’s fine.

    Then log-in to SL and place the following script in a prim, on a script-enabled area:

    key webResponse;

    touch_start(integer total_number)
    webResponse = llHTTPRequest("", [HTTP_METHOD, "GET"], "");

    llOwnerSay("Sending request...");


    http_response(key request_id, integer status, list metadata, string body)

    if (request_id == webResponse)
    llOwnerSay("Status is: " + (string) status);
    llOwnerSay("Data follows:");


    changing your webserver address of course.

    Touch it, and you should get on the console:

    Your Object Name: Sending request...
    Your Object Name: Status is: 200
    Your Object Name: Data follows:
    Your Object Name: hi

    Let me know if that’s what you get or if you’re getting some other error!

  • Shadowz Greymoon

    It’s not that. It’s from their end they have security blocking the “/wp-content/” and “wp-admin” files ..Say they are doing it to prevent hacking. They won’t allow access to those two files for it run, but yet when I had their free hosting, they didn’t care all that much about their hacking those two folders. Go figure.

    I did get this when I did try it in SL just now

    [08:11] Object: Sending request…
    [08:11] Object: Status is: 405
    [08:11] Object: Data follows:
    [08:11] Object: No PermURL specified on registration

    So it’s their end totally. I can re-write the entire thing, but they are blocking that plug in from being read inside SL, due to hackers using the admin, and content files. (they are a strange company) I was even thinking of making a duplicate files, and tryin to see if I alter the “http” a little that it would read, but not sure about that.