This project is not covered by Drupal’s security advisory policy.

This module is a simple Second Life framework, allowing objects inside Second Life, written in LSL script, to interact with applications on your Drupal web site, and do neat things.

To discuss this module, and other aspects of Drupal and Second Life integration, you can subscribe to this group.

Requirements

This module requires Drupal 5.x, and PHP 5.1.x.

Installation

To install this module, Upload or copy the the entire secondlife directory and all its contents to your modules directory.

Configuration

To enable this module go to Administer -> Site Building -> Modules, and enable second life.

Developing for Second Life

Second Life objects are written in a language called Linden Scripting Language (LSL). For more on how to use this language, refer to this wiki http://wiki.secondlife.com/wiki/LSL_Portal.

A good tutorial on LSL can be found in this Dr Dobbs Journal article using the Linden Scripting Language.

The Second Life framework Drupal module interfaces with Second Life using the llHTTPRequest() function.

See details here for llHTTPRequest.

In order to write a Drupal application that interfaces with Second Life, you need to create a new module. See the sltest module in the samples directory for an example.

The app is the application name, and is also the module name. The cmd is a command that your module/app must handle. The args vary from one cmd to the other.

The $sl object contains the Second Life info you need to know, such as region, location in the grid, user name, user key, ...etc. The $args is an array that is passed from the LSL script to you.

Settings

The following setting options are available:

Timing

A configuration setting is available to turn on timer tracking of all request/response pairs from the time it hits the second life framework, until the response is about to be sent back. This allows the client side to determine which queries are slow. This info is also logged in the debugging output.

Debugging

You can define a path to a file to have debugging information written to for each request/response. The path has to be writable by your web server.

Client emulator

A test client emulator script is provided, called slclient.php. It allows you to do some of the development without the need to be running the Second Life client. It is designed to run from the command line, and takes two arguments: the server name, and the handler.

$ php slclient.php localhost /secondlife

It can be easily adapted to run from the web.

To use it, modify the app and cmd array near the bottom to the application you are developing. The app will be your module name, and /secondlife should remain the same.

To Do

- Limit IP address range to accept requests from to Linden Labs servers.
- Map Second Life users to Drupal users.

Author

This module was sponsored by SocialSignal, and written by Khalid Baheyeldin of 2bits.com.

The author can also be contacted for paid customizations of this and other modules.

Project information

Releases