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.
To allow styling of the plugin, the following styles are emitted by the widget:
The whole content of the widget is included inside a
The text before the status is a
span with class
osinsl-before-status. The status itself is
osinsl-status and the text afterwards is
Status unknown (i.e. SL dataserver issues) is styled as
osinsl-problems and the text for an unconfigured widget is styled
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 80×80 (all this might be changed).
To style embedded shortcode, change the CSS class for
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]"]
[osinsl objectkey=”” 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 80×80. 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.
- 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 \&\; 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 email@example.com, 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!
This plugin is great, perfect for what I need. Customers can now view my webpage with the knowledge if I am online or not.
- 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 channel.inc 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.