<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://opensimulator.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://opensimulator.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Richardus+Raymaker</id>
		<title>OpenSimulator - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://opensimulator.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Richardus+Raymaker"/>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Special:Contributions/Richardus_Raymaker"/>
		<updated>2026-04-21T05:18:50Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.19.9</generator>

	<entry>
		<id>http://opensimulator.org/wiki/V2_Groups</id>
		<title>V2 Groups</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/V2_Groups"/>
				<updated>2013-10-26T13:25:46Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* Region configuration example for HG enabled robust grid */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of OpenSimulator 0.7.6 Diva implemented the V2 Groups, which are now part of OpenSimulator core. Using the new groups do not need to use any third Party modules any more.&lt;br /&gt;
&lt;br /&gt;
The below script helps, converting existing Flotsam Groups or jOpenSim Groups (which uses Flotsam anyway) to the new Groups. This ensures, that you dont lose any Group information, when you want to switch over.&lt;br /&gt;
&lt;br /&gt;
== Differences between tables names ==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! jOpenSim&lt;br /&gt;
! Flotsam&lt;br /&gt;
! V2&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupactive&lt;br /&gt;
|osagent&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * ActiveGroupID&lt;br /&gt;
|os_groups_principals&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * ActiveGroupID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_group&lt;br /&gt;
|osgroup&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Charter&lt;br /&gt;
 * InsigniaID&lt;br /&gt;
 * FounderID&lt;br /&gt;
 * MemberShipFee&lt;br /&gt;
 * OpenEnrollment&lt;br /&gt;
 * ShowInList&lt;br /&gt;
 * AllowPublish&lt;br /&gt;
 * MaturePublish&lt;br /&gt;
 * OwnerRoleID&lt;br /&gt;
|os_groups_groups&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Charter&lt;br /&gt;
 * InsigniaID&lt;br /&gt;
 * FounderID&lt;br /&gt;
 * MembershipFee&lt;br /&gt;
 * OpenEnrollment&lt;br /&gt;
 * ShowInList&lt;br /&gt;
 * AllowPublish&lt;br /&gt;
 * MaturePublish&lt;br /&gt;
 * OwnerRoleID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupinvite&lt;br /&gt;
|osgroupinvite&lt;br /&gt;
 * InviteID&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
|os_groups_invites&lt;br /&gt;
 * InviteID&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupmembership&lt;br /&gt;
|osgroupmembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * SelectedRoleID&lt;br /&gt;
 * Contribution&lt;br /&gt;
 * ListInProfile&lt;br /&gt;
 * AcceptNotices&lt;br /&gt;
|os_groups_membership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * SelectedRoleID&lt;br /&gt;
 * Contribution&lt;br /&gt;
 * ListInProfile&lt;br /&gt;
 * AcceptNotices&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupnotice&lt;br /&gt;
|osgroupnotice&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * NoticeID&lt;br /&gt;
 * Timestamp&lt;br /&gt;
 * FromName&lt;br /&gt;
 * Subject&lt;br /&gt;
 * Message&lt;br /&gt;
|os_groups_notices&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * NoticeID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
 * FromName&lt;br /&gt;
 * Subject&lt;br /&gt;
 * Message&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_grouprolemembership&lt;br /&gt;
|osgrouprolemembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * AgentID&lt;br /&gt;
|os_groups_rolemembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_grouprole&lt;br /&gt;
|osrole&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Description&lt;br /&gt;
 * Title&lt;br /&gt;
 * Powers&lt;br /&gt;
|os_groups_roles&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Description&lt;br /&gt;
 * Title&lt;br /&gt;
 * Powers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
You do not need to consider the field '''BinaryBucket''' in the flotsam table '''osgroupnotice''' as long as you did not apply the patch attached to [http://opensimulator.org/mantis/view.php?id=6699 Mantis #6699]. If you have applied it, then maybe the following information will help, if you do not want to miss the content in the new tables:&lt;br /&gt;
&lt;br /&gt;
Byte offset and description of bucket data:&lt;br /&gt;
&lt;br /&gt;
* 0:  1 byte indicating if attachment is present&lt;br /&gt;
* 1:  1 byte indicating the type of attachment&lt;br /&gt;
* 2:  16 bytes - Group UUID&lt;br /&gt;
* 18: 16 bytes - UUID of the attachment owner&lt;br /&gt;
* 34: 16 bytes - UUID of the attachment&lt;br /&gt;
* 50: variable - Name of the attachment&lt;br /&gt;
* ??: NUL byte to terminate the attachment name&lt;br /&gt;
&lt;br /&gt;
This information is copied from the original patch and describes the content format of field BinaryBucket.&lt;br /&gt;
&lt;br /&gt;
== Flotsam ==&lt;br /&gt;
Use this script if your are using the Flotsam groups.&lt;br /&gt;
&lt;br /&gt;
The Script (Replace ROBUSTDB with your ROBUST database and FLOTSAMDB with your database, containing your Flotsam tables!):&lt;br /&gt;
&amp;lt;source lang=sql&amp;gt;&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_groups`&lt;br /&gt;
(GroupID, Name, Charter, InsigniaID, FounderID, MembershipFee, OpenEnrollment, ShowInList,&lt;br /&gt;
AllowPublish, MaturePublish, OwnerRoleID)&lt;br /&gt;
SELECT GroupID, Name, Charter, InsigniaID, FounderID, MemberShipFee, OpenEnrollment, ShowInList, AllowPublish,&lt;br /&gt;
MaturePublish, OwnerRoleID&lt;br /&gt;
FROM `FLOTSAMDB`.osgroup;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_invites in ROBUST database with values from osgroupinvite&lt;br /&gt;
or FlotSam osgroupinvite*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_invites`&lt;br /&gt;
(InviteID, GroupID, RoleID, PrincipalID, TMStamp)&lt;br /&gt;
SELECT InviteID, GroupID, RoleID, AgentID, TMStamp&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupinvite;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_membership in ROBUST database with values from osgroupmembership&lt;br /&gt;
or FlotSam osgroupmembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_membership`&lt;br /&gt;
(GroupID, PrincipalID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices)&lt;br /&gt;
SELECT GroupID, AgentID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupmembership;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_notices in ROBUST database with values from osgroupnotice&lt;br /&gt;
or FlotSam osgroupnotice*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_notices`&lt;br /&gt;
(GroupID, NoticeID, TMStamp, FromName, Subject, Message)&lt;br /&gt;
SELECT GroupID, NoticeID, Timestamp, FromName, Subject, Message&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupnotice;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_principals in ROBUST database with values from osagent&lt;br /&gt;
or FlotSam osagent*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_principals`&lt;br /&gt;
(PrincipalID, ActiveGroupID)&lt;br /&gt;
SELECT AgentID, ActiveGroupID&lt;br /&gt;
FROM `FLOTSAMDB`.osagent;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_rolemembership in ROBUST database with values from osrolemembership&lt;br /&gt;
or FlotSam osgrouprolemembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_rolemembership&lt;br /&gt;
(GroupID, RoleID, PrincipalID)&lt;br /&gt;
SELECT GroupID, RoleID, AgentID&lt;br /&gt;
FROM `FLOTSAMDB`.osgrouprolemembership;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from osroles&lt;br /&gt;
or FlotSam osrole*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_roles&lt;br /&gt;
(GroupID, RoleID, Name, Description, Title, Powers)&lt;br /&gt;
SELECT GroupID, RoleID, Name, Description, Title, Powers&lt;br /&gt;
FROM `FLOTSAMDB`.osrole;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
== jOpenSim ==&lt;br /&gt;
Use this script if you are using the jOpenSim groups.&lt;br /&gt;
&lt;br /&gt;
The Script (Replace ROBUSTDB with your ROBUST database and FLOTSAMDB with your database, containing your jOpenSim tables!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=sql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/* SQL script to convert group tables from Flotsam Groups (Group database) or jOpenSim (tables in Joomla Database)&lt;br /&gt;
to new V2 groups, which are part of OpenSimulator core up from 0.7.6 branch*/&lt;br /&gt;
&lt;br /&gt;
/* FlotSam Tables latest version from&lt;br /&gt;
https://github.com/mcortez/flotsam/tree/master/flotsam/Servers/XmlRpcGroupsServer/&lt;br /&gt;
Commit-No.: 18275462c9*/&lt;br /&gt;
&lt;br /&gt;
/* jOpenSim Version: 0.2.6.4*/&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_groups in ROBUST database with values from jos_opensim_groups&lt;br /&gt;
or FlotSam osgroup*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_groups`&lt;br /&gt;
(GroupID, Name, Charter, InsigniaID, FounderID, MembershipFee, OpenEnrollment, ShowInList,&lt;br /&gt;
AllowPublish, MaturePublish, OwnerRoleID)&lt;br /&gt;
select GroupID, Name, Charter, InsigniaID, FounderID, MemberShipFee, OpenEnrollment, ShowInList, AllowPublish,&lt;br /&gt;
MaturePublish, OwnerRoleID&lt;br /&gt;
from `FLOTSAMDB`.jos_opensim_group;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_invites in ROBUST database with values from jos_opensim_groupinvite&lt;br /&gt;
or FlotSam osgroupinvite*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_invites`&lt;br /&gt;
(InviteID, GroupID, RoleID, PrincipalID, TMStamp)&lt;br /&gt;
SELECT InviteID, GroupID, RoleID, AgentID, TMStamp&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupinvite;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_membership in ROBUST database with values from jos_opensim_groupmembership&lt;br /&gt;
or FlotSam osgroupmembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_membership`&lt;br /&gt;
(GroupID, PrincipalID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices)&lt;br /&gt;
SELECT GroupID, AgentID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupmembership;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_notices in ROBUST database with values from jos_opensim_groupnotice&lt;br /&gt;
or FlotSam osgroupnotice*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_notices`&lt;br /&gt;
(GroupID, NoticeID, TMStamp, FromName, Subject, Message)&lt;br /&gt;
SELECT GroupID, NoticeID, Timestamp, FromName, Subject, Message&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupnotice;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_principals in ROBUST database with values from jos_opensim_groupactive&lt;br /&gt;
or FlotSam osagent*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_principals`&lt;br /&gt;
(PrincipalID, ActiveGroupID)&lt;br /&gt;
SELECT AgentID, ActiveGroupID&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupactive;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_rolemembership in ROBUST database with values from jos_opensim_grouprolemembership&lt;br /&gt;
or FlotSam osgrouprolemembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_rolemembership&lt;br /&gt;
(GroupID, RoleID, PrincipalID)&lt;br /&gt;
SELECT GroupID, RoleID, AgentID&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_grouprolemembership;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from jos_opensim_grouproles&lt;br /&gt;
or FlotSam osrole*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_roles&lt;br /&gt;
(GroupID, RoleID, Name, Description, Title, Powers)&lt;br /&gt;
SELECT GroupID, RoleID, Name, Description, Title, Powers&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_grouprole;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from jos_opensim_offlinemessages&lt;br /&gt;
--&amp;gt; no corresponding table in FlotSam  --  only applies to jOpenSim*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.im_offline&lt;br /&gt;
(PrincipalID, Message, TMStamp)&lt;br /&gt;
SELECT fromAgentID, Message, sent&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_offlinemessages;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Region configuration example for HG enabled robust grid ==&lt;br /&gt;
&lt;br /&gt;
This example file is for useing V2 groups on your region thats connected to a grid with robust as grid server.&amp;lt;br&amp;gt;&lt;br /&gt;
This example is enabled for Hypergrid.&amp;lt;br&amp;gt;&lt;br /&gt;
The configuration options you can find in the opensim.ini file under the section [Groups]&lt;br /&gt;
&lt;br /&gt;
'''This help section possible need improvements and corrections !!'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    ;# {Enabled} {} {Enable groups?} {true false} false&lt;br /&gt;
    ;; Enables the groups module&lt;br /&gt;
    &amp;lt;br&amp;gt;'''Enabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {LevelGroupCreate} {Enabled:true} {User level for creating groups} {} 0&lt;br /&gt;
    ;; Minimum user level required to create groups&lt;br /&gt;
    &amp;lt;br&amp;gt;'''LevelGroupCreate = 0'''&lt;br /&gt;
&lt;br /&gt;
    ;# {Module} {Enabled:true} {Groups module to use? (Use GroupsModule to use Flotsam/Simian)} {Default &amp;quot;Groups Module V2&amp;quot;} Default&lt;br /&gt;
    ;; The default module can use a PHP XmlRpc server from the Flotsam project at&lt;br /&gt;
    ;; http://code.google.com/p/flotsam/&lt;br /&gt;
    ;; or from the SimianGrid project at http://code.google.com/p/openmetaverse&lt;br /&gt;
    ; Module = Default&lt;br /&gt;
    ;; or... use Groups Module V2, which works for standalones and robust grids&lt;br /&gt;
    &amp;lt;br&amp;gt;'''Module = &amp;quot;Groups Module V2&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {StorageProvider} {Module:Groups Module V2} {The DLL that provides the storage for V2} {OpenSim.Data.MySQL.dll} &lt;br /&gt;
    &amp;lt;br&amp;gt;'''StorageProvider = OpenSim.Data.MySQL.dll'''&lt;br /&gt;
&lt;br /&gt;
    ;# {ServicesConnectorModule} {Module:GroupsModule Module:Groups Module V2} {Service connector to use for groups} {XmlRpcGroupsServicesConnector SimianGroupsServicesConnector &amp;quot;Groups Local Service Connector&amp;quot; &amp;quot;Groups Remote Service Connector&amp;quot; &amp;quot;Groups HG Service Connector&amp;quot;} XmlRpcGroupsServicesConnector&lt;br /&gt;
    ;; Service connectors to the Groups Service as used in the GroupsModule.  Select one as follows:&lt;br /&gt;
    ;; -- for Flotsam Groups use XmlRpcGroupsServicesConnector&lt;br /&gt;
    ;; -- for Simian Groups use SimianGroupsServicesConnector&lt;br /&gt;
    ;; -- for V2 Groups, standalone, non-HG use &amp;quot;Groups Local Service Connector&amp;quot;&lt;br /&gt;
    ;; -- for V2 Groups, grided sim, non-HG use &amp;quot;Groups Remote Service Connector&amp;quot;&lt;br /&gt;
    ;; -- for V2 Groups, HG, both standalone and grided sim, use &amp;quot;Groups HG Service Connector&amp;quot;&lt;br /&gt;
    ;; Note that the quotes &amp;quot;&amp;quot; around the words are important!&lt;br /&gt;
    ; ServicesConnectorModule = XmlRpcGroupsServicesConnector&lt;br /&gt;
    &amp;lt;br&amp;gt;'''ServicesConnectorModule = &amp;quot;Groups HG Service Connector&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {LocalService} {ServicesConnectorModule:Groups HG Service Connector} {Is the group service in this process or elsewhere?} {local remote} local&lt;br /&gt;
    ;; Used for V2 in HG only. If standalone, set this to local; if grided sim, set this to remote&lt;br /&gt;
    ; LocalService = local&lt;br /&gt;
    &amp;lt;br&amp;gt;'''LocalService = remote'''&lt;br /&gt;
&lt;br /&gt;
    ;# {GroupsServerURI} {Module:GroupsModule (ServicesConnectorModule:Groups Remote Service Connector or (ServicesConnectorModule:Groups HG Service Connector and LocalService:remote))} {Groups Server URI} {}&lt;br /&gt;
    ;; URI for the groups services of this grid&lt;br /&gt;
    ;; e.g. http://yourxmlrpcserver.com/xmlrpc.php for Flotsam XmlRpc&lt;br /&gt;
    ;; or http://mygridserver.com:82/Grid/ for SimianGrid&lt;br /&gt;
    ;; or http:://mygridserver.com:8003 for robust, V2&lt;br /&gt;
    ;; Leave it commented for standalones, V2&lt;br /&gt;
    ; GroupsServerURI = &amp;quot;&amp;quot;&lt;br /&gt;
    &amp;lt;br&amp;gt;'''GroupsServerURI = &amp;quot;http://mygridserver.com:8003&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {HomeURI} {ServicesConnectorModule:Groups HG Service Connector} {What's the home address of this world?} {} &lt;br /&gt;
    ;; Used for V2 in HG only. For example&lt;br /&gt;
    ;; http://mygridserver.com:9000 or http://mygridserver.com:8002&lt;br /&gt;
    ;; If you have this set under [Startup], no need to set it here, leave it commented&lt;br /&gt;
    &amp;lt;br&amp;gt;'''HomeURI = &amp;quot;http://mygridserver.com:8002&amp;quot;''' &lt;br /&gt;
&lt;br /&gt;
    ;# {MessagingEnabled} {Module:GroupsModule Module:Groups Module V2} {Is groups messaging enabled?} {true false} true&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessagingEnabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {MessagingModule} {MessagingEnabled:true} {Module to use for groups messaging} {GroupsMessagingModule &amp;quot;Groups Messaging Module V2&amp;quot;} GroupsMessagingModule&lt;br /&gt;
    ; MessagingModule = GroupsMessagingModule&lt;br /&gt;
    ;; or use V2 for Groups V2&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessagingModule = &amp;quot;Groups Messaging Module V2&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {NoticesEnabled} {Module:GroupsModule Module:Groups Module V2} {Enable group notices?} {true false} true&lt;br /&gt;
    ;; Enable Group Notices&lt;br /&gt;
    &amp;lt;br&amp;gt;'''NoticesEnabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {MessageOnlineUsersOnly} {Module:GroupsModule Module} {Message online users only?} {true false} false&lt;br /&gt;
    ; Experimental option to only message online users rather than all users&lt;br /&gt;
    ; Should make large groups with few online members messaging faster, as the expense of more calls to presence service&lt;br /&gt;
    ; Applies Flotsam Group only. V2 has this always on, no other option&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessageOnlineUsersOnly = True'''&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/V2_Groups</id>
		<title>V2 Groups</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/V2_Groups"/>
				<updated>2013-10-26T13:23:26Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* Region configuration example for HG enabled robust grid */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of OpenSimulator 0.7.6 Diva implemented the V2 Groups, which are now part of OpenSimulator core. Using the new groups do not need to use any third Party modules any more.&lt;br /&gt;
&lt;br /&gt;
The below script helps, converting existing Flotsam Groups or jOpenSim Groups (which uses Flotsam anyway) to the new Groups. This ensures, that you dont lose any Group information, when you want to switch over.&lt;br /&gt;
&lt;br /&gt;
== Differences between tables names ==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! jOpenSim&lt;br /&gt;
! Flotsam&lt;br /&gt;
! V2&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupactive&lt;br /&gt;
|osagent&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * ActiveGroupID&lt;br /&gt;
|os_groups_principals&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * ActiveGroupID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_group&lt;br /&gt;
|osgroup&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Charter&lt;br /&gt;
 * InsigniaID&lt;br /&gt;
 * FounderID&lt;br /&gt;
 * MemberShipFee&lt;br /&gt;
 * OpenEnrollment&lt;br /&gt;
 * ShowInList&lt;br /&gt;
 * AllowPublish&lt;br /&gt;
 * MaturePublish&lt;br /&gt;
 * OwnerRoleID&lt;br /&gt;
|os_groups_groups&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Charter&lt;br /&gt;
 * InsigniaID&lt;br /&gt;
 * FounderID&lt;br /&gt;
 * MembershipFee&lt;br /&gt;
 * OpenEnrollment&lt;br /&gt;
 * ShowInList&lt;br /&gt;
 * AllowPublish&lt;br /&gt;
 * MaturePublish&lt;br /&gt;
 * OwnerRoleID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupinvite&lt;br /&gt;
|osgroupinvite&lt;br /&gt;
 * InviteID&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
|os_groups_invites&lt;br /&gt;
 * InviteID&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupmembership&lt;br /&gt;
|osgroupmembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * SelectedRoleID&lt;br /&gt;
 * Contribution&lt;br /&gt;
 * ListInProfile&lt;br /&gt;
 * AcceptNotices&lt;br /&gt;
|os_groups_membership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * SelectedRoleID&lt;br /&gt;
 * Contribution&lt;br /&gt;
 * ListInProfile&lt;br /&gt;
 * AcceptNotices&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupnotice&lt;br /&gt;
|osgroupnotice&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * NoticeID&lt;br /&gt;
 * Timestamp&lt;br /&gt;
 * FromName&lt;br /&gt;
 * Subject&lt;br /&gt;
 * Message&lt;br /&gt;
|os_groups_notices&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * NoticeID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
 * FromName&lt;br /&gt;
 * Subject&lt;br /&gt;
 * Message&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_grouprolemembership&lt;br /&gt;
|osgrouprolemembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * AgentID&lt;br /&gt;
|os_groups_rolemembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_grouprole&lt;br /&gt;
|osrole&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Description&lt;br /&gt;
 * Title&lt;br /&gt;
 * Powers&lt;br /&gt;
|os_groups_roles&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Description&lt;br /&gt;
 * Title&lt;br /&gt;
 * Powers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
You do not need to consider the field '''BinaryBucket''' in the flotsam table '''osgroupnotice''' as long as you did not apply the patch attached to [http://opensimulator.org/mantis/view.php?id=6699 Mantis #6699]. If you have applied it, then maybe the following information will help, if you do not want to miss the content in the new tables:&lt;br /&gt;
&lt;br /&gt;
Byte offset and description of bucket data:&lt;br /&gt;
&lt;br /&gt;
* 0:  1 byte indicating if attachment is present&lt;br /&gt;
* 1:  1 byte indicating the type of attachment&lt;br /&gt;
* 2:  16 bytes - Group UUID&lt;br /&gt;
* 18: 16 bytes - UUID of the attachment owner&lt;br /&gt;
* 34: 16 bytes - UUID of the attachment&lt;br /&gt;
* 50: variable - Name of the attachment&lt;br /&gt;
* ??: NUL byte to terminate the attachment name&lt;br /&gt;
&lt;br /&gt;
This information is copied from the original patch and describes the content format of field BinaryBucket.&lt;br /&gt;
&lt;br /&gt;
== Flotsam ==&lt;br /&gt;
Use this script if your are using the Flotsam groups.&lt;br /&gt;
&lt;br /&gt;
The Script (Replace ROBUSTDB with your ROBUST database and FLOTSAMDB with your database, containing your Flotsam tables!):&lt;br /&gt;
&amp;lt;source lang=sql&amp;gt;&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_groups`&lt;br /&gt;
(GroupID, Name, Charter, InsigniaID, FounderID, MembershipFee, OpenEnrollment, ShowInList,&lt;br /&gt;
AllowPublish, MaturePublish, OwnerRoleID)&lt;br /&gt;
SELECT GroupID, Name, Charter, InsigniaID, FounderID, MemberShipFee, OpenEnrollment, ShowInList, AllowPublish,&lt;br /&gt;
MaturePublish, OwnerRoleID&lt;br /&gt;
FROM `FLOTSAMDB`.osgroup;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_invites in ROBUST database with values from osgroupinvite&lt;br /&gt;
or FlotSam osgroupinvite*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_invites`&lt;br /&gt;
(InviteID, GroupID, RoleID, PrincipalID, TMStamp)&lt;br /&gt;
SELECT InviteID, GroupID, RoleID, AgentID, TMStamp&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupinvite;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_membership in ROBUST database with values from osgroupmembership&lt;br /&gt;
or FlotSam osgroupmembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_membership`&lt;br /&gt;
(GroupID, PrincipalID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices)&lt;br /&gt;
SELECT GroupID, AgentID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupmembership;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_notices in ROBUST database with values from osgroupnotice&lt;br /&gt;
or FlotSam osgroupnotice*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_notices`&lt;br /&gt;
(GroupID, NoticeID, TMStamp, FromName, Subject, Message)&lt;br /&gt;
SELECT GroupID, NoticeID, Timestamp, FromName, Subject, Message&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupnotice;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_principals in ROBUST database with values from osagent&lt;br /&gt;
or FlotSam osagent*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_principals`&lt;br /&gt;
(PrincipalID, ActiveGroupID)&lt;br /&gt;
SELECT AgentID, ActiveGroupID&lt;br /&gt;
FROM `FLOTSAMDB`.osagent;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_rolemembership in ROBUST database with values from osrolemembership&lt;br /&gt;
or FlotSam osgrouprolemembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_rolemembership&lt;br /&gt;
(GroupID, RoleID, PrincipalID)&lt;br /&gt;
SELECT GroupID, RoleID, AgentID&lt;br /&gt;
FROM `FLOTSAMDB`.osgrouprolemembership;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from osroles&lt;br /&gt;
or FlotSam osrole*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_roles&lt;br /&gt;
(GroupID, RoleID, Name, Description, Title, Powers)&lt;br /&gt;
SELECT GroupID, RoleID, Name, Description, Title, Powers&lt;br /&gt;
FROM `FLOTSAMDB`.osrole;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
== jOpenSim ==&lt;br /&gt;
Use this script if you are using the jOpenSim groups.&lt;br /&gt;
&lt;br /&gt;
The Script (Replace ROBUSTDB with your ROBUST database and FLOTSAMDB with your database, containing your jOpenSim tables!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=sql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/* SQL script to convert group tables from Flotsam Groups (Group database) or jOpenSim (tables in Joomla Database)&lt;br /&gt;
to new V2 groups, which are part of OpenSimulator core up from 0.7.6 branch*/&lt;br /&gt;
&lt;br /&gt;
/* FlotSam Tables latest version from&lt;br /&gt;
https://github.com/mcortez/flotsam/tree/master/flotsam/Servers/XmlRpcGroupsServer/&lt;br /&gt;
Commit-No.: 18275462c9*/&lt;br /&gt;
&lt;br /&gt;
/* jOpenSim Version: 0.2.6.4*/&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_groups in ROBUST database with values from jos_opensim_groups&lt;br /&gt;
or FlotSam osgroup*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_groups`&lt;br /&gt;
(GroupID, Name, Charter, InsigniaID, FounderID, MembershipFee, OpenEnrollment, ShowInList,&lt;br /&gt;
AllowPublish, MaturePublish, OwnerRoleID)&lt;br /&gt;
select GroupID, Name, Charter, InsigniaID, FounderID, MemberShipFee, OpenEnrollment, ShowInList, AllowPublish,&lt;br /&gt;
MaturePublish, OwnerRoleID&lt;br /&gt;
from `FLOTSAMDB`.jos_opensim_group;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_invites in ROBUST database with values from jos_opensim_groupinvite&lt;br /&gt;
or FlotSam osgroupinvite*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_invites`&lt;br /&gt;
(InviteID, GroupID, RoleID, PrincipalID, TMStamp)&lt;br /&gt;
SELECT InviteID, GroupID, RoleID, AgentID, TMStamp&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupinvite;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_membership in ROBUST database with values from jos_opensim_groupmembership&lt;br /&gt;
or FlotSam osgroupmembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_membership`&lt;br /&gt;
(GroupID, PrincipalID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices)&lt;br /&gt;
SELECT GroupID, AgentID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupmembership;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_notices in ROBUST database with values from jos_opensim_groupnotice&lt;br /&gt;
or FlotSam osgroupnotice*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_notices`&lt;br /&gt;
(GroupID, NoticeID, TMStamp, FromName, Subject, Message)&lt;br /&gt;
SELECT GroupID, NoticeID, Timestamp, FromName, Subject, Message&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupnotice;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_principals in ROBUST database with values from jos_opensim_groupactive&lt;br /&gt;
or FlotSam osagent*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_principals`&lt;br /&gt;
(PrincipalID, ActiveGroupID)&lt;br /&gt;
SELECT AgentID, ActiveGroupID&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupactive;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_rolemembership in ROBUST database with values from jos_opensim_grouprolemembership&lt;br /&gt;
or FlotSam osgrouprolemembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_rolemembership&lt;br /&gt;
(GroupID, RoleID, PrincipalID)&lt;br /&gt;
SELECT GroupID, RoleID, AgentID&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_grouprolemembership;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from jos_opensim_grouproles&lt;br /&gt;
or FlotSam osrole*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_roles&lt;br /&gt;
(GroupID, RoleID, Name, Description, Title, Powers)&lt;br /&gt;
SELECT GroupID, RoleID, Name, Description, Title, Powers&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_grouprole;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from jos_opensim_offlinemessages&lt;br /&gt;
--&amp;gt; no corresponding table in FlotSam  --  only applies to jOpenSim*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.im_offline&lt;br /&gt;
(PrincipalID, Message, TMStamp)&lt;br /&gt;
SELECT fromAgentID, Message, sent&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_offlinemessages;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Region configuration example for HG enabled robust grid ==&lt;br /&gt;
&lt;br /&gt;
This example file is for useing V2 groups on your region thats connected to a grid with robust as grid server.&amp;lt;br&amp;gt;&lt;br /&gt;
This example is enabled for Hypergrid.&amp;lt;br&amp;gt;&lt;br /&gt;
The configuration options you can find in the opensim.ini file under the section [Groups]&lt;br /&gt;
&lt;br /&gt;
'''This help section  can use improvements and corrections !!'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    ;# {Enabled} {} {Enable groups?} {true false} false&lt;br /&gt;
    ;; Enables the groups module&lt;br /&gt;
    &amp;lt;br&amp;gt;'''Enabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {LevelGroupCreate} {Enabled:true} {User level for creating groups} {} 0&lt;br /&gt;
    ;; Minimum user level required to create groups&lt;br /&gt;
    &amp;lt;br&amp;gt;'''LevelGroupCreate = 0'''&lt;br /&gt;
&lt;br /&gt;
    ;# {Module} {Enabled:true} {Groups module to use? (Use GroupsModule to use Flotsam/Simian)} {Default &amp;quot;Groups Module V2&amp;quot;} Default&lt;br /&gt;
    ;; The default module can use a PHP XmlRpc server from the Flotsam project at&lt;br /&gt;
    ;; http://code.google.com/p/flotsam/&lt;br /&gt;
    ;; or from the SimianGrid project at http://code.google.com/p/openmetaverse&lt;br /&gt;
    ; Module = Default&lt;br /&gt;
    ;; or... use Groups Module V2, which works for standalones and robust grids&lt;br /&gt;
    &amp;lt;br&amp;gt;'''Module = &amp;quot;Groups Module V2&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {StorageProvider} {Module:Groups Module V2} {The DLL that provides the storage for V2} {OpenSim.Data.MySQL.dll} &lt;br /&gt;
    &amp;lt;br&amp;gt;'''StorageProvider = OpenSim.Data.MySQL.dll'''&lt;br /&gt;
&lt;br /&gt;
    ;# {ServicesConnectorModule} {Module:GroupsModule Module:Groups Module V2} {Service connector to use for groups} {XmlRpcGroupsServicesConnector SimianGroupsServicesConnector &amp;quot;Groups Local Service Connector&amp;quot; &amp;quot;Groups Remote Service Connector&amp;quot; &amp;quot;Groups HG Service Connector&amp;quot;} XmlRpcGroupsServicesConnector&lt;br /&gt;
    ;; Service connectors to the Groups Service as used in the GroupsModule.  Select one as follows:&lt;br /&gt;
    ;; -- for Flotsam Groups use XmlRpcGroupsServicesConnector&lt;br /&gt;
    ;; -- for Simian Groups use SimianGroupsServicesConnector&lt;br /&gt;
    ;; -- for V2 Groups, standalone, non-HG use &amp;quot;Groups Local Service Connector&amp;quot;&lt;br /&gt;
    ;; -- for V2 Groups, grided sim, non-HG use &amp;quot;Groups Remote Service Connector&amp;quot;&lt;br /&gt;
    ;; -- for V2 Groups, HG, both standalone and grided sim, use &amp;quot;Groups HG Service Connector&amp;quot;&lt;br /&gt;
    ;; Note that the quotes &amp;quot;&amp;quot; around the words are important!&lt;br /&gt;
    ; ServicesConnectorModule = XmlRpcGroupsServicesConnector&lt;br /&gt;
    &amp;lt;br&amp;gt;'''ServicesConnectorModule = &amp;quot;Groups HG Service Connector&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {LocalService} {ServicesConnectorModule:Groups HG Service Connector} {Is the group service in this process or elsewhere?} {local remote} local&lt;br /&gt;
    ;; Used for V2 in HG only. If standalone, set this to local; if grided sim, set this to remote&lt;br /&gt;
    ; LocalService = local&lt;br /&gt;
    &amp;lt;br&amp;gt;'''LocalService = remote'''&lt;br /&gt;
&lt;br /&gt;
    ;# {GroupsServerURI} {Module:GroupsModule (ServicesConnectorModule:Groups Remote Service Connector or (ServicesConnectorModule:Groups HG Service Connector and LocalService:remote))} {Groups Server URI} {}&lt;br /&gt;
    ;; URI for the groups services of this grid&lt;br /&gt;
    ;; e.g. http://yourxmlrpcserver.com/xmlrpc.php for Flotsam XmlRpc&lt;br /&gt;
    ;; or http://mygridserver.com:82/Grid/ for SimianGrid&lt;br /&gt;
    ;; or http:://mygridserver.com:8003 for robust, V2&lt;br /&gt;
    ;; Leave it commented for standalones, V2&lt;br /&gt;
    ; GroupsServerURI = &amp;quot;&amp;quot;&lt;br /&gt;
    &amp;lt;br&amp;gt;'''GroupsServerURI = &amp;quot;http://mygridserver.com:8003&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {HomeURI} {ServicesConnectorModule:Groups HG Service Connector} {What's the home address of this world?} {} &lt;br /&gt;
    ;; Used for V2 in HG only. For example&lt;br /&gt;
    ;; http://mygridserver.com:9000 or http://mygridserver.com:8002&lt;br /&gt;
    ;; If you have this set under [Startup], no need to set it here, leave it commented&lt;br /&gt;
    &amp;lt;br&amp;gt;'''HomeURI = &amp;quot;http://mygridserver.com:8002&amp;quot;''' &lt;br /&gt;
&lt;br /&gt;
    ;# {MessagingEnabled} {Module:GroupsModule Module:Groups Module V2} {Is groups messaging enabled?} {true false} true&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessagingEnabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {MessagingModule} {MessagingEnabled:true} {Module to use for groups messaging} {GroupsMessagingModule &amp;quot;Groups Messaging Module V2&amp;quot;} GroupsMessagingModule&lt;br /&gt;
    ; MessagingModule = GroupsMessagingModule&lt;br /&gt;
    ;; or use V2 for Groups V2&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessagingModule = &amp;quot;Groups Messaging Module V2&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {NoticesEnabled} {Module:GroupsModule Module:Groups Module V2} {Enable group notices?} {true false} true&lt;br /&gt;
    ;; Enable Group Notices&lt;br /&gt;
    &amp;lt;br&amp;gt;'''NoticesEnabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {MessageOnlineUsersOnly} {Module:GroupsModule Module} {Message online users only?} {true false} false&lt;br /&gt;
    ; Experimental option to only message online users rather than all users&lt;br /&gt;
    ; Should make large groups with few online members messaging faster, as the expense of more calls to presence service&lt;br /&gt;
    ; Applies Flotsam Group only. V2 has this always on, no other option&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessageOnlineUsersOnly = True'''&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/V2_Groups</id>
		<title>V2 Groups</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/V2_Groups"/>
				<updated>2013-10-26T13:18:29Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* jOpenSim */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of OpenSimulator 0.7.6 Diva implemented the V2 Groups, which are now part of OpenSimulator core. Using the new groups do not need to use any third Party modules any more.&lt;br /&gt;
&lt;br /&gt;
The below script helps, converting existing Flotsam Groups or jOpenSim Groups (which uses Flotsam anyway) to the new Groups. This ensures, that you dont lose any Group information, when you want to switch over.&lt;br /&gt;
&lt;br /&gt;
== Differences between tables names ==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! jOpenSim&lt;br /&gt;
! Flotsam&lt;br /&gt;
! V2&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupactive&lt;br /&gt;
|osagent&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * ActiveGroupID&lt;br /&gt;
|os_groups_principals&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * ActiveGroupID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_group&lt;br /&gt;
|osgroup&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Charter&lt;br /&gt;
 * InsigniaID&lt;br /&gt;
 * FounderID&lt;br /&gt;
 * MemberShipFee&lt;br /&gt;
 * OpenEnrollment&lt;br /&gt;
 * ShowInList&lt;br /&gt;
 * AllowPublish&lt;br /&gt;
 * MaturePublish&lt;br /&gt;
 * OwnerRoleID&lt;br /&gt;
|os_groups_groups&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Charter&lt;br /&gt;
 * InsigniaID&lt;br /&gt;
 * FounderID&lt;br /&gt;
 * MembershipFee&lt;br /&gt;
 * OpenEnrollment&lt;br /&gt;
 * ShowInList&lt;br /&gt;
 * AllowPublish&lt;br /&gt;
 * MaturePublish&lt;br /&gt;
 * OwnerRoleID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupinvite&lt;br /&gt;
|osgroupinvite&lt;br /&gt;
 * InviteID&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
|os_groups_invites&lt;br /&gt;
 * InviteID&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupmembership&lt;br /&gt;
|osgroupmembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * SelectedRoleID&lt;br /&gt;
 * Contribution&lt;br /&gt;
 * ListInProfile&lt;br /&gt;
 * AcceptNotices&lt;br /&gt;
|os_groups_membership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * SelectedRoleID&lt;br /&gt;
 * Contribution&lt;br /&gt;
 * ListInProfile&lt;br /&gt;
 * AcceptNotices&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupnotice&lt;br /&gt;
|osgroupnotice&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * NoticeID&lt;br /&gt;
 * Timestamp&lt;br /&gt;
 * FromName&lt;br /&gt;
 * Subject&lt;br /&gt;
 * Message&lt;br /&gt;
|os_groups_notices&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * NoticeID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
 * FromName&lt;br /&gt;
 * Subject&lt;br /&gt;
 * Message&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_grouprolemembership&lt;br /&gt;
|osgrouprolemembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * AgentID&lt;br /&gt;
|os_groups_rolemembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_grouprole&lt;br /&gt;
|osrole&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Description&lt;br /&gt;
 * Title&lt;br /&gt;
 * Powers&lt;br /&gt;
|os_groups_roles&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Description&lt;br /&gt;
 * Title&lt;br /&gt;
 * Powers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
You do not need to consider the field '''BinaryBucket''' in the flotsam table '''osgroupnotice''' as long as you did not apply the patch attached to [http://opensimulator.org/mantis/view.php?id=6699 Mantis #6699]. If you have applied it, then maybe the following information will help, if you do not want to miss the content in the new tables:&lt;br /&gt;
&lt;br /&gt;
Byte offset and description of bucket data:&lt;br /&gt;
&lt;br /&gt;
* 0:  1 byte indicating if attachment is present&lt;br /&gt;
* 1:  1 byte indicating the type of attachment&lt;br /&gt;
* 2:  16 bytes - Group UUID&lt;br /&gt;
* 18: 16 bytes - UUID of the attachment owner&lt;br /&gt;
* 34: 16 bytes - UUID of the attachment&lt;br /&gt;
* 50: variable - Name of the attachment&lt;br /&gt;
* ??: NUL byte to terminate the attachment name&lt;br /&gt;
&lt;br /&gt;
This information is copied from the original patch and describes the content format of field BinaryBucket.&lt;br /&gt;
&lt;br /&gt;
== Flotsam ==&lt;br /&gt;
Use this script if your are using the Flotsam groups.&lt;br /&gt;
&lt;br /&gt;
The Script (Replace ROBUSTDB with your ROBUST database and FLOTSAMDB with your database, containing your Flotsam tables!):&lt;br /&gt;
&amp;lt;source lang=sql&amp;gt;&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_groups`&lt;br /&gt;
(GroupID, Name, Charter, InsigniaID, FounderID, MembershipFee, OpenEnrollment, ShowInList,&lt;br /&gt;
AllowPublish, MaturePublish, OwnerRoleID)&lt;br /&gt;
SELECT GroupID, Name, Charter, InsigniaID, FounderID, MemberShipFee, OpenEnrollment, ShowInList, AllowPublish,&lt;br /&gt;
MaturePublish, OwnerRoleID&lt;br /&gt;
FROM `FLOTSAMDB`.osgroup;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_invites in ROBUST database with values from osgroupinvite&lt;br /&gt;
or FlotSam osgroupinvite*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_invites`&lt;br /&gt;
(InviteID, GroupID, RoleID, PrincipalID, TMStamp)&lt;br /&gt;
SELECT InviteID, GroupID, RoleID, AgentID, TMStamp&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupinvite;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_membership in ROBUST database with values from osgroupmembership&lt;br /&gt;
or FlotSam osgroupmembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_membership`&lt;br /&gt;
(GroupID, PrincipalID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices)&lt;br /&gt;
SELECT GroupID, AgentID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupmembership;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_notices in ROBUST database with values from osgroupnotice&lt;br /&gt;
or FlotSam osgroupnotice*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_notices`&lt;br /&gt;
(GroupID, NoticeID, TMStamp, FromName, Subject, Message)&lt;br /&gt;
SELECT GroupID, NoticeID, Timestamp, FromName, Subject, Message&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupnotice;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_principals in ROBUST database with values from osagent&lt;br /&gt;
or FlotSam osagent*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_principals`&lt;br /&gt;
(PrincipalID, ActiveGroupID)&lt;br /&gt;
SELECT AgentID, ActiveGroupID&lt;br /&gt;
FROM `FLOTSAMDB`.osagent;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_rolemembership in ROBUST database with values from osrolemembership&lt;br /&gt;
or FlotSam osgrouprolemembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_rolemembership&lt;br /&gt;
(GroupID, RoleID, PrincipalID)&lt;br /&gt;
SELECT GroupID, RoleID, AgentID&lt;br /&gt;
FROM `FLOTSAMDB`.osgrouprolemembership;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from osroles&lt;br /&gt;
or FlotSam osrole*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_roles&lt;br /&gt;
(GroupID, RoleID, Name, Description, Title, Powers)&lt;br /&gt;
SELECT GroupID, RoleID, Name, Description, Title, Powers&lt;br /&gt;
FROM `FLOTSAMDB`.osrole;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
== jOpenSim ==&lt;br /&gt;
Use this script if you are using the jOpenSim groups.&lt;br /&gt;
&lt;br /&gt;
The Script (Replace ROBUSTDB with your ROBUST database and FLOTSAMDB with your database, containing your jOpenSim tables!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=sql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/* SQL script to convert group tables from Flotsam Groups (Group database) or jOpenSim (tables in Joomla Database)&lt;br /&gt;
to new V2 groups, which are part of OpenSimulator core up from 0.7.6 branch*/&lt;br /&gt;
&lt;br /&gt;
/* FlotSam Tables latest version from&lt;br /&gt;
https://github.com/mcortez/flotsam/tree/master/flotsam/Servers/XmlRpcGroupsServer/&lt;br /&gt;
Commit-No.: 18275462c9*/&lt;br /&gt;
&lt;br /&gt;
/* jOpenSim Version: 0.2.6.4*/&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_groups in ROBUST database with values from jos_opensim_groups&lt;br /&gt;
or FlotSam osgroup*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_groups`&lt;br /&gt;
(GroupID, Name, Charter, InsigniaID, FounderID, MembershipFee, OpenEnrollment, ShowInList,&lt;br /&gt;
AllowPublish, MaturePublish, OwnerRoleID)&lt;br /&gt;
select GroupID, Name, Charter, InsigniaID, FounderID, MemberShipFee, OpenEnrollment, ShowInList, AllowPublish,&lt;br /&gt;
MaturePublish, OwnerRoleID&lt;br /&gt;
from `FLOTSAMDB`.jos_opensim_group;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_invites in ROBUST database with values from jos_opensim_groupinvite&lt;br /&gt;
or FlotSam osgroupinvite*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_invites`&lt;br /&gt;
(InviteID, GroupID, RoleID, PrincipalID, TMStamp)&lt;br /&gt;
SELECT InviteID, GroupID, RoleID, AgentID, TMStamp&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupinvite;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_membership in ROBUST database with values from jos_opensim_groupmembership&lt;br /&gt;
or FlotSam osgroupmembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_membership`&lt;br /&gt;
(GroupID, PrincipalID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices)&lt;br /&gt;
SELECT GroupID, AgentID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupmembership;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_notices in ROBUST database with values from jos_opensim_groupnotice&lt;br /&gt;
or FlotSam osgroupnotice*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_notices`&lt;br /&gt;
(GroupID, NoticeID, TMStamp, FromName, Subject, Message)&lt;br /&gt;
SELECT GroupID, NoticeID, Timestamp, FromName, Subject, Message&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupnotice;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_principals in ROBUST database with values from jos_opensim_groupactive&lt;br /&gt;
or FlotSam osagent*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_principals`&lt;br /&gt;
(PrincipalID, ActiveGroupID)&lt;br /&gt;
SELECT AgentID, ActiveGroupID&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupactive;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_rolemembership in ROBUST database with values from jos_opensim_grouprolemembership&lt;br /&gt;
or FlotSam osgrouprolemembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_rolemembership&lt;br /&gt;
(GroupID, RoleID, PrincipalID)&lt;br /&gt;
SELECT GroupID, RoleID, AgentID&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_grouprolemembership;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from jos_opensim_grouproles&lt;br /&gt;
or FlotSam osrole*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_roles&lt;br /&gt;
(GroupID, RoleID, Name, Description, Title, Powers)&lt;br /&gt;
SELECT GroupID, RoleID, Name, Description, Title, Powers&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_grouprole;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from jos_opensim_offlinemessages&lt;br /&gt;
--&amp;gt; no corresponding table in FlotSam  --  only applies to jOpenSim*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.im_offline&lt;br /&gt;
(PrincipalID, Message, TMStamp)&lt;br /&gt;
SELECT fromAgentID, Message, sent&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_offlinemessages;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Region configuration example for HG enabled robust grid ==&lt;br /&gt;
&lt;br /&gt;
This example file is for useing V2 groups on your region thats connected to a grid with robust as grid server.&amp;lt;br&amp;gt;&lt;br /&gt;
This example is enabled for Hypergrid.&amp;lt;br&amp;gt;&lt;br /&gt;
The configuration options you can find in the opensim.ini file under the section [Groups]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    ;# {Enabled} {} {Enable groups?} {true false} false&lt;br /&gt;
    ;; Enables the groups module&lt;br /&gt;
    &amp;lt;br&amp;gt;'''Enabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {LevelGroupCreate} {Enabled:true} {User level for creating groups} {} 0&lt;br /&gt;
    ;; Minimum user level required to create groups&lt;br /&gt;
    &amp;lt;br&amp;gt;'''LevelGroupCreate = 0'''&lt;br /&gt;
&lt;br /&gt;
    ;# {Module} {Enabled:true} {Groups module to use? (Use GroupsModule to use Flotsam/Simian)} {Default &amp;quot;Groups Module V2&amp;quot;} Default&lt;br /&gt;
    ;; The default module can use a PHP XmlRpc server from the Flotsam project at&lt;br /&gt;
    ;; http://code.google.com/p/flotsam/&lt;br /&gt;
    ;; or from the SimianGrid project at http://code.google.com/p/openmetaverse&lt;br /&gt;
    ; Module = Default&lt;br /&gt;
    ;; or... use Groups Module V2, which works for standalones and robust grids&lt;br /&gt;
    &amp;lt;br&amp;gt;'''Module = &amp;quot;Groups Module V2&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {StorageProvider} {Module:Groups Module V2} {The DLL that provides the storage for V2} {OpenSim.Data.MySQL.dll} &lt;br /&gt;
    &amp;lt;br&amp;gt;'''StorageProvider = OpenSim.Data.MySQL.dll'''&lt;br /&gt;
&lt;br /&gt;
    ;# {ServicesConnectorModule} {Module:GroupsModule Module:Groups Module V2} {Service connector to use for groups} {XmlRpcGroupsServicesConnector SimianGroupsServicesConnector &amp;quot;Groups Local Service Connector&amp;quot; &amp;quot;Groups Remote Service Connector&amp;quot; &amp;quot;Groups HG Service Connector&amp;quot;} XmlRpcGroupsServicesConnector&lt;br /&gt;
    ;; Service connectors to the Groups Service as used in the GroupsModule.  Select one as follows:&lt;br /&gt;
    ;; -- for Flotsam Groups use XmlRpcGroupsServicesConnector&lt;br /&gt;
    ;; -- for Simian Groups use SimianGroupsServicesConnector&lt;br /&gt;
    ;; -- for V2 Groups, standalone, non-HG use &amp;quot;Groups Local Service Connector&amp;quot;&lt;br /&gt;
    ;; -- for V2 Groups, grided sim, non-HG use &amp;quot;Groups Remote Service Connector&amp;quot;&lt;br /&gt;
    ;; -- for V2 Groups, HG, both standalone and grided sim, use &amp;quot;Groups HG Service Connector&amp;quot;&lt;br /&gt;
    ;; Note that the quotes &amp;quot;&amp;quot; around the words are important!&lt;br /&gt;
    ; ServicesConnectorModule = XmlRpcGroupsServicesConnector&lt;br /&gt;
    &amp;lt;br&amp;gt;'''ServicesConnectorModule = &amp;quot;Groups HG Service Connector&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {LocalService} {ServicesConnectorModule:Groups HG Service Connector} {Is the group service in this process or elsewhere?} {local remote} local&lt;br /&gt;
    ;; Used for V2 in HG only. If standalone, set this to local; if grided sim, set this to remote&lt;br /&gt;
    ; LocalService = local&lt;br /&gt;
    &amp;lt;br&amp;gt;'''LocalService = remote'''&lt;br /&gt;
&lt;br /&gt;
    ;# {GroupsServerURI} {Module:GroupsModule (ServicesConnectorModule:Groups Remote Service Connector or (ServicesConnectorModule:Groups HG Service Connector and LocalService:remote))} {Groups Server URI} {}&lt;br /&gt;
    ;; URI for the groups services of this grid&lt;br /&gt;
    ;; e.g. http://yourxmlrpcserver.com/xmlrpc.php for Flotsam XmlRpc&lt;br /&gt;
    ;; or http://mygridserver.com:82/Grid/ for SimianGrid&lt;br /&gt;
    ;; or http:://mygridserver.com:8003 for robust, V2&lt;br /&gt;
    ;; Leave it commented for standalones, V2&lt;br /&gt;
    ; GroupsServerURI = &amp;quot;&amp;quot;&lt;br /&gt;
    &amp;lt;br&amp;gt;'''GroupsServerURI = &amp;quot;http://mygridserver.com:8003&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {HomeURI} {ServicesConnectorModule:Groups HG Service Connector} {What's the home address of this world?} {} &lt;br /&gt;
    ;; Used for V2 in HG only. For example&lt;br /&gt;
    ;; http://mygridserver.com:9000 or http://mygridserver.com:8002&lt;br /&gt;
    ;; If you have this set under [Startup], no need to set it here, leave it commented&lt;br /&gt;
    &amp;lt;br&amp;gt;'''HomeURI = &amp;quot;http://mygridserver.com:8002&amp;quot;''' &lt;br /&gt;
&lt;br /&gt;
    ;# {MessagingEnabled} {Module:GroupsModule Module:Groups Module V2} {Is groups messaging enabled?} {true false} true&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessagingEnabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {MessagingModule} {MessagingEnabled:true} {Module to use for groups messaging} {GroupsMessagingModule &amp;quot;Groups Messaging Module V2&amp;quot;} GroupsMessagingModule&lt;br /&gt;
    ; MessagingModule = GroupsMessagingModule&lt;br /&gt;
    ;; or use V2 for Groups V2&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessagingModule = &amp;quot;Groups Messaging Module V2&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {NoticesEnabled} {Module:GroupsModule Module:Groups Module V2} {Enable group notices?} {true false} true&lt;br /&gt;
    ;; Enable Group Notices&lt;br /&gt;
    &amp;lt;br&amp;gt;'''NoticesEnabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {MessageOnlineUsersOnly} {Module:GroupsModule Module} {Message online users only?} {true false} false&lt;br /&gt;
    ; Experimental option to only message online users rather than all users&lt;br /&gt;
    ; Should make large groups with few online members messaging faster, as the expense of more calls to presence service&lt;br /&gt;
    ; Applies Flotsam Group only. V2 has this always on, no other option&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessageOnlineUsersOnly = True'''&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/V2_Groups</id>
		<title>V2 Groups</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/V2_Groups"/>
				<updated>2013-10-26T13:17:58Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* Region configuration example for connecting to robust grid */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of OpenSimulator 0.7.6 Diva implemented the V2 Groups, which are now part of OpenSimulator core. Using the new groups do not need to use any third Party modules any more.&lt;br /&gt;
&lt;br /&gt;
The below script helps, converting existing Flotsam Groups or jOpenSim Groups (which uses Flotsam anyway) to the new Groups. This ensures, that you dont lose any Group information, when you want to switch over.&lt;br /&gt;
&lt;br /&gt;
== Differences between tables names ==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! jOpenSim&lt;br /&gt;
! Flotsam&lt;br /&gt;
! V2&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupactive&lt;br /&gt;
|osagent&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * ActiveGroupID&lt;br /&gt;
|os_groups_principals&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * ActiveGroupID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_group&lt;br /&gt;
|osgroup&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Charter&lt;br /&gt;
 * InsigniaID&lt;br /&gt;
 * FounderID&lt;br /&gt;
 * MemberShipFee&lt;br /&gt;
 * OpenEnrollment&lt;br /&gt;
 * ShowInList&lt;br /&gt;
 * AllowPublish&lt;br /&gt;
 * MaturePublish&lt;br /&gt;
 * OwnerRoleID&lt;br /&gt;
|os_groups_groups&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Charter&lt;br /&gt;
 * InsigniaID&lt;br /&gt;
 * FounderID&lt;br /&gt;
 * MembershipFee&lt;br /&gt;
 * OpenEnrollment&lt;br /&gt;
 * ShowInList&lt;br /&gt;
 * AllowPublish&lt;br /&gt;
 * MaturePublish&lt;br /&gt;
 * OwnerRoleID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupinvite&lt;br /&gt;
|osgroupinvite&lt;br /&gt;
 * InviteID&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
|os_groups_invites&lt;br /&gt;
 * InviteID&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupmembership&lt;br /&gt;
|osgroupmembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * SelectedRoleID&lt;br /&gt;
 * Contribution&lt;br /&gt;
 * ListInProfile&lt;br /&gt;
 * AcceptNotices&lt;br /&gt;
|os_groups_membership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * SelectedRoleID&lt;br /&gt;
 * Contribution&lt;br /&gt;
 * ListInProfile&lt;br /&gt;
 * AcceptNotices&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupnotice&lt;br /&gt;
|osgroupnotice&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * NoticeID&lt;br /&gt;
 * Timestamp&lt;br /&gt;
 * FromName&lt;br /&gt;
 * Subject&lt;br /&gt;
 * Message&lt;br /&gt;
|os_groups_notices&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * NoticeID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
 * FromName&lt;br /&gt;
 * Subject&lt;br /&gt;
 * Message&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_grouprolemembership&lt;br /&gt;
|osgrouprolemembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * AgentID&lt;br /&gt;
|os_groups_rolemembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_grouprole&lt;br /&gt;
|osrole&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Description&lt;br /&gt;
 * Title&lt;br /&gt;
 * Powers&lt;br /&gt;
|os_groups_roles&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Description&lt;br /&gt;
 * Title&lt;br /&gt;
 * Powers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
You do not need to consider the field '''BinaryBucket''' in the flotsam table '''osgroupnotice''' as long as you did not apply the patch attached to [http://opensimulator.org/mantis/view.php?id=6699 Mantis #6699]. If you have applied it, then maybe the following information will help, if you do not want to miss the content in the new tables:&lt;br /&gt;
&lt;br /&gt;
Byte offset and description of bucket data:&lt;br /&gt;
&lt;br /&gt;
* 0:  1 byte indicating if attachment is present&lt;br /&gt;
* 1:  1 byte indicating the type of attachment&lt;br /&gt;
* 2:  16 bytes - Group UUID&lt;br /&gt;
* 18: 16 bytes - UUID of the attachment owner&lt;br /&gt;
* 34: 16 bytes - UUID of the attachment&lt;br /&gt;
* 50: variable - Name of the attachment&lt;br /&gt;
* ??: NUL byte to terminate the attachment name&lt;br /&gt;
&lt;br /&gt;
This information is copied from the original patch and describes the content format of field BinaryBucket.&lt;br /&gt;
&lt;br /&gt;
== Flotsam ==&lt;br /&gt;
Use this script if your are using the Flotsam groups.&lt;br /&gt;
&lt;br /&gt;
The Script (Replace ROBUSTDB with your ROBUST database and FLOTSAMDB with your database, containing your Flotsam tables!):&lt;br /&gt;
&amp;lt;source lang=sql&amp;gt;&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_groups`&lt;br /&gt;
(GroupID, Name, Charter, InsigniaID, FounderID, MembershipFee, OpenEnrollment, ShowInList,&lt;br /&gt;
AllowPublish, MaturePublish, OwnerRoleID)&lt;br /&gt;
SELECT GroupID, Name, Charter, InsigniaID, FounderID, MemberShipFee, OpenEnrollment, ShowInList, AllowPublish,&lt;br /&gt;
MaturePublish, OwnerRoleID&lt;br /&gt;
FROM `FLOTSAMDB`.osgroup;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_invites in ROBUST database with values from osgroupinvite&lt;br /&gt;
or FlotSam osgroupinvite*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_invites`&lt;br /&gt;
(InviteID, GroupID, RoleID, PrincipalID, TMStamp)&lt;br /&gt;
SELECT InviteID, GroupID, RoleID, AgentID, TMStamp&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupinvite;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_membership in ROBUST database with values from osgroupmembership&lt;br /&gt;
or FlotSam osgroupmembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_membership`&lt;br /&gt;
(GroupID, PrincipalID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices)&lt;br /&gt;
SELECT GroupID, AgentID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupmembership;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_notices in ROBUST database with values from osgroupnotice&lt;br /&gt;
or FlotSam osgroupnotice*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_notices`&lt;br /&gt;
(GroupID, NoticeID, TMStamp, FromName, Subject, Message)&lt;br /&gt;
SELECT GroupID, NoticeID, Timestamp, FromName, Subject, Message&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupnotice;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_principals in ROBUST database with values from osagent&lt;br /&gt;
or FlotSam osagent*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_principals`&lt;br /&gt;
(PrincipalID, ActiveGroupID)&lt;br /&gt;
SELECT AgentID, ActiveGroupID&lt;br /&gt;
FROM `FLOTSAMDB`.osagent;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_rolemembership in ROBUST database with values from osrolemembership&lt;br /&gt;
or FlotSam osgrouprolemembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_rolemembership&lt;br /&gt;
(GroupID, RoleID, PrincipalID)&lt;br /&gt;
SELECT GroupID, RoleID, AgentID&lt;br /&gt;
FROM `FLOTSAMDB`.osgrouprolemembership;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from osroles&lt;br /&gt;
or FlotSam osrole*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_roles&lt;br /&gt;
(GroupID, RoleID, Name, Description, Title, Powers)&lt;br /&gt;
SELECT GroupID, RoleID, Name, Description, Title, Powers&lt;br /&gt;
FROM `FLOTSAMDB`.osrole;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
== jOpenSim ==&lt;br /&gt;
Use this script if you are using the jOpenSim groups.&lt;br /&gt;
&lt;br /&gt;
The Script (Replace ROBUSTDB with your ROBUST database and FLOTSAMDB with your database, containing your jOpenSim tables!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=sql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/* SQL script to convert group tables from Flotsam Groups (Group database) or jOpenSim (tables in Joomla Database)&lt;br /&gt;
to new V2 groups, which are part of OpenSimulator core up from 0.7.6 branch*/&lt;br /&gt;
&lt;br /&gt;
/* FlotSam Tables latest version from&lt;br /&gt;
https://github.com/mcortez/flotsam/tree/master/flotsam/Servers/XmlRpcGroupsServer/&lt;br /&gt;
Commit-No.: 18275462c9*/&lt;br /&gt;
&lt;br /&gt;
/* jOpenSim Version: 0.2.6.4*/&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_groups in ROBUST database with values from jos_opensim_groups&lt;br /&gt;
or FlotSam osgroup*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_groups`&lt;br /&gt;
(GroupID, Name, Charter, InsigniaID, FounderID, MembershipFee, OpenEnrollment, ShowInList,&lt;br /&gt;
AllowPublish, MaturePublish, OwnerRoleID)&lt;br /&gt;
select GroupID, Name, Charter, InsigniaID, FounderID, MemberShipFee, OpenEnrollment, ShowInList, AllowPublish,&lt;br /&gt;
MaturePublish, OwnerRoleID&lt;br /&gt;
from `FLOTSAMDB`.jos_opensim_group;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_invites in ROBUST database with values from jos_opensim_groupinvite&lt;br /&gt;
or FlotSam osgroupinvite*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_invites`&lt;br /&gt;
(InviteID, GroupID, RoleID, PrincipalID, TMStamp)&lt;br /&gt;
SELECT InviteID, GroupID, RoleID, AgentID, TMStamp&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupinvite;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_membership in ROBUST database with values from jos_opensim_groupmembership&lt;br /&gt;
or FlotSam osgroupmembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_membership`&lt;br /&gt;
(GroupID, PrincipalID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices)&lt;br /&gt;
SELECT GroupID, AgentID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupmembership;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_notices in ROBUST database with values from jos_opensim_groupnotice&lt;br /&gt;
or FlotSam osgroupnotice*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_notices`&lt;br /&gt;
(GroupID, NoticeID, TMStamp, FromName, Subject, Message)&lt;br /&gt;
SELECT GroupID, NoticeID, Timestamp, FromName, Subject, Message&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupnotice;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_principals in ROBUST database with values from jos_opensim_groupactive&lt;br /&gt;
or FlotSam osagent*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_principals`&lt;br /&gt;
(PrincipalID, ActiveGroupID)&lt;br /&gt;
SELECT AgentID, ActiveGroupID&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupactive;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_rolemembership in ROBUST database with values from jos_opensim_grouprolemembership&lt;br /&gt;
or FlotSam osgrouprolemembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_rolemembership&lt;br /&gt;
(GroupID, RoleID, PrincipalID)&lt;br /&gt;
SELECT GroupID, RoleID, AgentID&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_grouprolemembership;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from jos_opensim_grouproles&lt;br /&gt;
or FlotSam osrole*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_roles&lt;br /&gt;
(GroupID, RoleID, Name, Description, Title, Powers)&lt;br /&gt;
SELECT GroupID, RoleID, Name, Description, Title, Powers&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_grouprole;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from jos_opensim_offlinemessages&lt;br /&gt;
--&amp;gt; no corresponding table in FlotSam  --  only applies to jOpenSim*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.im_offline&lt;br /&gt;
(PrincipalID, Message, TMStamp)&lt;br /&gt;
SELECT fromAgentID, Message, sent&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_offlinemessages;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Region configuration example for HG enabled robust grid ==&lt;br /&gt;
&lt;br /&gt;
This example file is for useing V2 groups on your region thats connected to a grid with robust as grid server.&amp;lt;br&amp;gt;&lt;br /&gt;
This example is enabled for Hypergrid.&amp;lt;br&amp;gt;&lt;br /&gt;
The configuration options you can find in the opensim.ini file under the section [Groups]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    ;# {Enabled} {} {Enable groups?} {true false} false&lt;br /&gt;
    ;; Enables the groups module&lt;br /&gt;
    &amp;lt;br&amp;gt;'''Enabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {LevelGroupCreate} {Enabled:true} {User level for creating groups} {} 0&lt;br /&gt;
    ;; Minimum user level required to create groups&lt;br /&gt;
    &amp;lt;br&amp;gt;'''LevelGroupCreate = 0'''&lt;br /&gt;
&lt;br /&gt;
    ;# {Module} {Enabled:true} {Groups module to use? (Use GroupsModule to use Flotsam/Simian)} {Default &amp;quot;Groups Module V2&amp;quot;} Default&lt;br /&gt;
    ;; The default module can use a PHP XmlRpc server from the Flotsam project at&lt;br /&gt;
    ;; http://code.google.com/p/flotsam/&lt;br /&gt;
    ;; or from the SimianGrid project at http://code.google.com/p/openmetaverse&lt;br /&gt;
    ; Module = Default&lt;br /&gt;
    ;; or... use Groups Module V2, which works for standalones and robust grids&lt;br /&gt;
    &amp;lt;br&amp;gt;'''Module = &amp;quot;Groups Module V2&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {StorageProvider} {Module:Groups Module V2} {The DLL that provides the storage for V2} {OpenSim.Data.MySQL.dll} &lt;br /&gt;
    &amp;lt;br&amp;gt;'''StorageProvider = OpenSim.Data.MySQL.dll'''&lt;br /&gt;
&lt;br /&gt;
    ;# {ServicesConnectorModule} {Module:GroupsModule Module:Groups Module V2} {Service connector to use for groups} {XmlRpcGroupsServicesConnector SimianGroupsServicesConnector &amp;quot;Groups Local Service Connector&amp;quot; &amp;quot;Groups Remote Service Connector&amp;quot; &amp;quot;Groups HG Service Connector&amp;quot;} XmlRpcGroupsServicesConnector&lt;br /&gt;
    ;; Service connectors to the Groups Service as used in the GroupsModule.  Select one as follows:&lt;br /&gt;
    ;; -- for Flotsam Groups use XmlRpcGroupsServicesConnector&lt;br /&gt;
    ;; -- for Simian Groups use SimianGroupsServicesConnector&lt;br /&gt;
    ;; -- for V2 Groups, standalone, non-HG use &amp;quot;Groups Local Service Connector&amp;quot;&lt;br /&gt;
    ;; -- for V2 Groups, grided sim, non-HG use &amp;quot;Groups Remote Service Connector&amp;quot;&lt;br /&gt;
    ;; -- for V2 Groups, HG, both standalone and grided sim, use &amp;quot;Groups HG Service Connector&amp;quot;&lt;br /&gt;
    ;; Note that the quotes &amp;quot;&amp;quot; around the words are important!&lt;br /&gt;
    ; ServicesConnectorModule = XmlRpcGroupsServicesConnector&lt;br /&gt;
    &amp;lt;br&amp;gt;'''ServicesConnectorModule = &amp;quot;Groups HG Service Connector&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {LocalService} {ServicesConnectorModule:Groups HG Service Connector} {Is the group service in this process or elsewhere?} {local remote} local&lt;br /&gt;
    ;; Used for V2 in HG only. If standalone, set this to local; if grided sim, set this to remote&lt;br /&gt;
    ; LocalService = local&lt;br /&gt;
    &amp;lt;br&amp;gt;'''LocalService = remote'''&lt;br /&gt;
&lt;br /&gt;
    ;# {GroupsServerURI} {Module:GroupsModule (ServicesConnectorModule:Groups Remote Service Connector or (ServicesConnectorModule:Groups HG Service Connector and LocalService:remote))} {Groups Server URI} {}&lt;br /&gt;
    ;; URI for the groups services of this grid&lt;br /&gt;
    ;; e.g. http://yourxmlrpcserver.com/xmlrpc.php for Flotsam XmlRpc&lt;br /&gt;
    ;; or http://mygridserver.com:82/Grid/ for SimianGrid&lt;br /&gt;
    ;; or http:://mygridserver.com:8003 for robust, V2&lt;br /&gt;
    ;; Leave it commented for standalones, V2&lt;br /&gt;
    ; GroupsServerURI = &amp;quot;&amp;quot;&lt;br /&gt;
    &amp;lt;br&amp;gt;'''GroupsServerURI = &amp;quot;http://mygridserver.com:8003&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {HomeURI} {ServicesConnectorModule:Groups HG Service Connector} {What's the home address of this world?} {} &lt;br /&gt;
    ;; Used for V2 in HG only. For example&lt;br /&gt;
    ;; http://mygridserver.com:9000 or http://mygridserver.com:8002&lt;br /&gt;
    ;; If you have this set under [Startup], no need to set it here, leave it commented&lt;br /&gt;
    &amp;lt;br&amp;gt;'''HomeURI = &amp;quot;http://mygridserver.com:8002&amp;quot;''' &lt;br /&gt;
&lt;br /&gt;
    ;# {MessagingEnabled} {Module:GroupsModule Module:Groups Module V2} {Is groups messaging enabled?} {true false} true&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessagingEnabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {MessagingModule} {MessagingEnabled:true} {Module to use for groups messaging} {GroupsMessagingModule &amp;quot;Groups Messaging Module V2&amp;quot;} GroupsMessagingModule&lt;br /&gt;
    ; MessagingModule = GroupsMessagingModule&lt;br /&gt;
    ;; or use V2 for Groups V2&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessagingModule = &amp;quot;Groups Messaging Module V2&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {NoticesEnabled} {Module:GroupsModule Module:Groups Module V2} {Enable group notices?} {true false} true&lt;br /&gt;
    ;; Enable Group Notices&lt;br /&gt;
    &amp;lt;br&amp;gt;'''NoticesEnabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {MessageOnlineUsersOnly} {Module:GroupsModule Module} {Message online users only?} {true false} false&lt;br /&gt;
    ; Experimental option to only message online users rather than all users&lt;br /&gt;
    ; Should make large groups with few online members messaging faster, as the expense of more calls to presence service&lt;br /&gt;
    ; Applies Flotsam Group only. V2 has this always on, no other option&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessageOnlineUsersOnly = True'''&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/V2_Groups</id>
		<title>V2 Groups</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/V2_Groups"/>
				<updated>2013-10-26T13:16:16Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* Region configuration example for connecting to robust grid */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of OpenSimulator 0.7.6 Diva implemented the V2 Groups, which are now part of OpenSimulator core. Using the new groups do not need to use any third Party modules any more.&lt;br /&gt;
&lt;br /&gt;
The below script helps, converting existing Flotsam Groups or jOpenSim Groups (which uses Flotsam anyway) to the new Groups. This ensures, that you dont lose any Group information, when you want to switch over.&lt;br /&gt;
&lt;br /&gt;
== Differences between tables names ==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! jOpenSim&lt;br /&gt;
! Flotsam&lt;br /&gt;
! V2&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupactive&lt;br /&gt;
|osagent&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * ActiveGroupID&lt;br /&gt;
|os_groups_principals&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * ActiveGroupID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_group&lt;br /&gt;
|osgroup&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Charter&lt;br /&gt;
 * InsigniaID&lt;br /&gt;
 * FounderID&lt;br /&gt;
 * MemberShipFee&lt;br /&gt;
 * OpenEnrollment&lt;br /&gt;
 * ShowInList&lt;br /&gt;
 * AllowPublish&lt;br /&gt;
 * MaturePublish&lt;br /&gt;
 * OwnerRoleID&lt;br /&gt;
|os_groups_groups&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Charter&lt;br /&gt;
 * InsigniaID&lt;br /&gt;
 * FounderID&lt;br /&gt;
 * MembershipFee&lt;br /&gt;
 * OpenEnrollment&lt;br /&gt;
 * ShowInList&lt;br /&gt;
 * AllowPublish&lt;br /&gt;
 * MaturePublish&lt;br /&gt;
 * OwnerRoleID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupinvite&lt;br /&gt;
|osgroupinvite&lt;br /&gt;
 * InviteID&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
|os_groups_invites&lt;br /&gt;
 * InviteID&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupmembership&lt;br /&gt;
|osgroupmembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * SelectedRoleID&lt;br /&gt;
 * Contribution&lt;br /&gt;
 * ListInProfile&lt;br /&gt;
 * AcceptNotices&lt;br /&gt;
|os_groups_membership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * SelectedRoleID&lt;br /&gt;
 * Contribution&lt;br /&gt;
 * ListInProfile&lt;br /&gt;
 * AcceptNotices&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupnotice&lt;br /&gt;
|osgroupnotice&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * NoticeID&lt;br /&gt;
 * Timestamp&lt;br /&gt;
 * FromName&lt;br /&gt;
 * Subject&lt;br /&gt;
 * Message&lt;br /&gt;
|os_groups_notices&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * NoticeID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
 * FromName&lt;br /&gt;
 * Subject&lt;br /&gt;
 * Message&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_grouprolemembership&lt;br /&gt;
|osgrouprolemembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * AgentID&lt;br /&gt;
|os_groups_rolemembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_grouprole&lt;br /&gt;
|osrole&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Description&lt;br /&gt;
 * Title&lt;br /&gt;
 * Powers&lt;br /&gt;
|os_groups_roles&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Description&lt;br /&gt;
 * Title&lt;br /&gt;
 * Powers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
You do not need to consider the field '''BinaryBucket''' in the flotsam table '''osgroupnotice''' as long as you did not apply the patch attached to [http://opensimulator.org/mantis/view.php?id=6699 Mantis #6699]. If you have applied it, then maybe the following information will help, if you do not want to miss the content in the new tables:&lt;br /&gt;
&lt;br /&gt;
Byte offset and description of bucket data:&lt;br /&gt;
&lt;br /&gt;
* 0:  1 byte indicating if attachment is present&lt;br /&gt;
* 1:  1 byte indicating the type of attachment&lt;br /&gt;
* 2:  16 bytes - Group UUID&lt;br /&gt;
* 18: 16 bytes - UUID of the attachment owner&lt;br /&gt;
* 34: 16 bytes - UUID of the attachment&lt;br /&gt;
* 50: variable - Name of the attachment&lt;br /&gt;
* ??: NUL byte to terminate the attachment name&lt;br /&gt;
&lt;br /&gt;
This information is copied from the original patch and describes the content format of field BinaryBucket.&lt;br /&gt;
&lt;br /&gt;
== Flotsam ==&lt;br /&gt;
Use this script if your are using the Flotsam groups.&lt;br /&gt;
&lt;br /&gt;
The Script (Replace ROBUSTDB with your ROBUST database and FLOTSAMDB with your database, containing your Flotsam tables!):&lt;br /&gt;
&amp;lt;source lang=sql&amp;gt;&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_groups`&lt;br /&gt;
(GroupID, Name, Charter, InsigniaID, FounderID, MembershipFee, OpenEnrollment, ShowInList,&lt;br /&gt;
AllowPublish, MaturePublish, OwnerRoleID)&lt;br /&gt;
SELECT GroupID, Name, Charter, InsigniaID, FounderID, MemberShipFee, OpenEnrollment, ShowInList, AllowPublish,&lt;br /&gt;
MaturePublish, OwnerRoleID&lt;br /&gt;
FROM `FLOTSAMDB`.osgroup;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_invites in ROBUST database with values from osgroupinvite&lt;br /&gt;
or FlotSam osgroupinvite*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_invites`&lt;br /&gt;
(InviteID, GroupID, RoleID, PrincipalID, TMStamp)&lt;br /&gt;
SELECT InviteID, GroupID, RoleID, AgentID, TMStamp&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupinvite;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_membership in ROBUST database with values from osgroupmembership&lt;br /&gt;
or FlotSam osgroupmembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_membership`&lt;br /&gt;
(GroupID, PrincipalID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices)&lt;br /&gt;
SELECT GroupID, AgentID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupmembership;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_notices in ROBUST database with values from osgroupnotice&lt;br /&gt;
or FlotSam osgroupnotice*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_notices`&lt;br /&gt;
(GroupID, NoticeID, TMStamp, FromName, Subject, Message)&lt;br /&gt;
SELECT GroupID, NoticeID, Timestamp, FromName, Subject, Message&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupnotice;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_principals in ROBUST database with values from osagent&lt;br /&gt;
or FlotSam osagent*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_principals`&lt;br /&gt;
(PrincipalID, ActiveGroupID)&lt;br /&gt;
SELECT AgentID, ActiveGroupID&lt;br /&gt;
FROM `FLOTSAMDB`.osagent;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_rolemembership in ROBUST database with values from osrolemembership&lt;br /&gt;
or FlotSam osgrouprolemembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_rolemembership&lt;br /&gt;
(GroupID, RoleID, PrincipalID)&lt;br /&gt;
SELECT GroupID, RoleID, AgentID&lt;br /&gt;
FROM `FLOTSAMDB`.osgrouprolemembership;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from osroles&lt;br /&gt;
or FlotSam osrole*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_roles&lt;br /&gt;
(GroupID, RoleID, Name, Description, Title, Powers)&lt;br /&gt;
SELECT GroupID, RoleID, Name, Description, Title, Powers&lt;br /&gt;
FROM `FLOTSAMDB`.osrole;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
== jOpenSim ==&lt;br /&gt;
Use this script if you are using the jOpenSim groups.&lt;br /&gt;
&lt;br /&gt;
The Script (Replace ROBUSTDB with your ROBUST database and FLOTSAMDB with your database, containing your jOpenSim tables!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=sql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/* SQL script to convert group tables from Flotsam Groups (Group database) or jOpenSim (tables in Joomla Database)&lt;br /&gt;
to new V2 groups, which are part of OpenSimulator core up from 0.7.6 branch*/&lt;br /&gt;
&lt;br /&gt;
/* FlotSam Tables latest version from&lt;br /&gt;
https://github.com/mcortez/flotsam/tree/master/flotsam/Servers/XmlRpcGroupsServer/&lt;br /&gt;
Commit-No.: 18275462c9*/&lt;br /&gt;
&lt;br /&gt;
/* jOpenSim Version: 0.2.6.4*/&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_groups in ROBUST database with values from jos_opensim_groups&lt;br /&gt;
or FlotSam osgroup*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_groups`&lt;br /&gt;
(GroupID, Name, Charter, InsigniaID, FounderID, MembershipFee, OpenEnrollment, ShowInList,&lt;br /&gt;
AllowPublish, MaturePublish, OwnerRoleID)&lt;br /&gt;
select GroupID, Name, Charter, InsigniaID, FounderID, MemberShipFee, OpenEnrollment, ShowInList, AllowPublish,&lt;br /&gt;
MaturePublish, OwnerRoleID&lt;br /&gt;
from `FLOTSAMDB`.jos_opensim_group;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_invites in ROBUST database with values from jos_opensim_groupinvite&lt;br /&gt;
or FlotSam osgroupinvite*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_invites`&lt;br /&gt;
(InviteID, GroupID, RoleID, PrincipalID, TMStamp)&lt;br /&gt;
SELECT InviteID, GroupID, RoleID, AgentID, TMStamp&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupinvite;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_membership in ROBUST database with values from jos_opensim_groupmembership&lt;br /&gt;
or FlotSam osgroupmembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_membership`&lt;br /&gt;
(GroupID, PrincipalID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices)&lt;br /&gt;
SELECT GroupID, AgentID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupmembership;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_notices in ROBUST database with values from jos_opensim_groupnotice&lt;br /&gt;
or FlotSam osgroupnotice*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_notices`&lt;br /&gt;
(GroupID, NoticeID, TMStamp, FromName, Subject, Message)&lt;br /&gt;
SELECT GroupID, NoticeID, Timestamp, FromName, Subject, Message&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupnotice;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_principals in ROBUST database with values from jos_opensim_groupactive&lt;br /&gt;
or FlotSam osagent*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_principals`&lt;br /&gt;
(PrincipalID, ActiveGroupID)&lt;br /&gt;
SELECT AgentID, ActiveGroupID&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupactive;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_rolemembership in ROBUST database with values from jos_opensim_grouprolemembership&lt;br /&gt;
or FlotSam osgrouprolemembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_rolemembership&lt;br /&gt;
(GroupID, RoleID, PrincipalID)&lt;br /&gt;
SELECT GroupID, RoleID, AgentID&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_grouprolemembership;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from jos_opensim_grouproles&lt;br /&gt;
or FlotSam osrole*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_roles&lt;br /&gt;
(GroupID, RoleID, Name, Description, Title, Powers)&lt;br /&gt;
SELECT GroupID, RoleID, Name, Description, Title, Powers&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_grouprole;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from jos_opensim_offlinemessages&lt;br /&gt;
--&amp;gt; no corresponding table in FlotSam  --  only applies to jOpenSim*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.im_offline&lt;br /&gt;
(PrincipalID, Message, TMStamp)&lt;br /&gt;
SELECT fromAgentID, Message, sent&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_offlinemessages;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Region configuration example for connecting to robust grid ==&lt;br /&gt;
&lt;br /&gt;
This example file is for useing V2 groups on your region thats connected to a grid with robust as grid server.&amp;lt;br&amp;gt;&lt;br /&gt;
The configuration options you can find in the opensim.ini file under the section [Groups]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    ;# {Enabled} {} {Enable groups?} {true false} false&lt;br /&gt;
    ;; Enables the groups module&lt;br /&gt;
    &amp;lt;br&amp;gt;'''Enabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {LevelGroupCreate} {Enabled:true} {User level for creating groups} {} 0&lt;br /&gt;
    ;; Minimum user level required to create groups&lt;br /&gt;
    &amp;lt;br&amp;gt;'''LevelGroupCreate = 0'''&lt;br /&gt;
&lt;br /&gt;
    ;# {Module} {Enabled:true} {Groups module to use? (Use GroupsModule to use Flotsam/Simian)} {Default &amp;quot;Groups Module V2&amp;quot;} Default&lt;br /&gt;
    ;; The default module can use a PHP XmlRpc server from the Flotsam project at&lt;br /&gt;
    ;; http://code.google.com/p/flotsam/&lt;br /&gt;
    ;; or from the SimianGrid project at http://code.google.com/p/openmetaverse&lt;br /&gt;
    ; Module = Default&lt;br /&gt;
    ;; or... use Groups Module V2, which works for standalones and robust grids&lt;br /&gt;
    &amp;lt;br&amp;gt;'''Module = &amp;quot;Groups Module V2&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {StorageProvider} {Module:Groups Module V2} {The DLL that provides the storage for V2} {OpenSim.Data.MySQL.dll} &lt;br /&gt;
    &amp;lt;br&amp;gt;'''StorageProvider = OpenSim.Data.MySQL.dll'''&lt;br /&gt;
&lt;br /&gt;
    ;# {ServicesConnectorModule} {Module:GroupsModule Module:Groups Module V2} {Service connector to use for groups} {XmlRpcGroupsServicesConnector SimianGroupsServicesConnector &amp;quot;Groups Local Service Connector&amp;quot; &amp;quot;Groups Remote Service Connector&amp;quot; &amp;quot;Groups HG Service Connector&amp;quot;} XmlRpcGroupsServicesConnector&lt;br /&gt;
    ;; Service connectors to the Groups Service as used in the GroupsModule.  Select one as follows:&lt;br /&gt;
    ;; -- for Flotsam Groups use XmlRpcGroupsServicesConnector&lt;br /&gt;
    ;; -- for Simian Groups use SimianGroupsServicesConnector&lt;br /&gt;
    ;; -- for V2 Groups, standalone, non-HG use &amp;quot;Groups Local Service Connector&amp;quot;&lt;br /&gt;
    ;; -- for V2 Groups, grided sim, non-HG use &amp;quot;Groups Remote Service Connector&amp;quot;&lt;br /&gt;
    ;; -- for V2 Groups, HG, both standalone and grided sim, use &amp;quot;Groups HG Service Connector&amp;quot;&lt;br /&gt;
    ;; Note that the quotes &amp;quot;&amp;quot; around the words are important!&lt;br /&gt;
    ; ServicesConnectorModule = XmlRpcGroupsServicesConnector&lt;br /&gt;
    &amp;lt;br&amp;gt;'''ServicesConnectorModule = &amp;quot;Groups HG Service Connector&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {LocalService} {ServicesConnectorModule:Groups HG Service Connector} {Is the group service in this process or elsewhere?} {local remote} local&lt;br /&gt;
    ;; Used for V2 in HG only. If standalone, set this to local; if grided sim, set this to remote&lt;br /&gt;
    ; LocalService = local&lt;br /&gt;
    &amp;lt;br&amp;gt;'''LocalService = remote'''&lt;br /&gt;
&lt;br /&gt;
    ;# {GroupsServerURI} {Module:GroupsModule (ServicesConnectorModule:Groups Remote Service Connector or (ServicesConnectorModule:Groups HG Service Connector and LocalService:remote))} {Groups Server URI} {}&lt;br /&gt;
    ;; URI for the groups services of this grid&lt;br /&gt;
    ;; e.g. http://yourxmlrpcserver.com/xmlrpc.php for Flotsam XmlRpc&lt;br /&gt;
    ;; or http://mygridserver.com:82/Grid/ for SimianGrid&lt;br /&gt;
    ;; or http:://mygridserver.com:8003 for robust, V2&lt;br /&gt;
    ;; Leave it commented for standalones, V2&lt;br /&gt;
    ; GroupsServerURI = &amp;quot;&amp;quot;&lt;br /&gt;
    &amp;lt;br&amp;gt;'''GroupsServerURI = &amp;quot;http://mygridserver.com:8003&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {HomeURI} {ServicesConnectorModule:Groups HG Service Connector} {What's the home address of this world?} {} &lt;br /&gt;
    ;; Used for V2 in HG only. For example&lt;br /&gt;
    ;; http://mygridserver.com:9000 or http://mygridserver.com:8002&lt;br /&gt;
    ;; If you have this set under [Startup], no need to set it here, leave it commented&lt;br /&gt;
    &amp;lt;br&amp;gt;'''HomeURI = &amp;quot;http://mygridserver.com:8002&amp;quot;''' &lt;br /&gt;
&lt;br /&gt;
    ;# {MessagingEnabled} {Module:GroupsModule Module:Groups Module V2} {Is groups messaging enabled?} {true false} true&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessagingEnabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {MessagingModule} {MessagingEnabled:true} {Module to use for groups messaging} {GroupsMessagingModule &amp;quot;Groups Messaging Module V2&amp;quot;} GroupsMessagingModule&lt;br /&gt;
    ; MessagingModule = GroupsMessagingModule&lt;br /&gt;
    ;; or use V2 for Groups V2&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessagingModule = &amp;quot;Groups Messaging Module V2&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {NoticesEnabled} {Module:GroupsModule Module:Groups Module V2} {Enable group notices?} {true false} true&lt;br /&gt;
    ;; Enable Group Notices&lt;br /&gt;
    &amp;lt;br&amp;gt;'''NoticesEnabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {MessageOnlineUsersOnly} {Module:GroupsModule Module} {Message online users only?} {true false} false&lt;br /&gt;
    ; Experimental option to only message online users rather than all users&lt;br /&gt;
    ; Should make large groups with few online members messaging faster, as the expense of more calls to presence service&lt;br /&gt;
    ; Applies Flotsam Group only. V2 has this always on, no other option&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessageOnlineUsersOnly = True'''&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/V2_Groups</id>
		<title>V2 Groups</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/V2_Groups"/>
				<updated>2013-10-26T13:15:28Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* Region configuration example for connecting to robust grid */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of OpenSimulator 0.7.6 Diva implemented the V2 Groups, which are now part of OpenSimulator core. Using the new groups do not need to use any third Party modules any more.&lt;br /&gt;
&lt;br /&gt;
The below script helps, converting existing Flotsam Groups or jOpenSim Groups (which uses Flotsam anyway) to the new Groups. This ensures, that you dont lose any Group information, when you want to switch over.&lt;br /&gt;
&lt;br /&gt;
== Differences between tables names ==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! jOpenSim&lt;br /&gt;
! Flotsam&lt;br /&gt;
! V2&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupactive&lt;br /&gt;
|osagent&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * ActiveGroupID&lt;br /&gt;
|os_groups_principals&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * ActiveGroupID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_group&lt;br /&gt;
|osgroup&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Charter&lt;br /&gt;
 * InsigniaID&lt;br /&gt;
 * FounderID&lt;br /&gt;
 * MemberShipFee&lt;br /&gt;
 * OpenEnrollment&lt;br /&gt;
 * ShowInList&lt;br /&gt;
 * AllowPublish&lt;br /&gt;
 * MaturePublish&lt;br /&gt;
 * OwnerRoleID&lt;br /&gt;
|os_groups_groups&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Charter&lt;br /&gt;
 * InsigniaID&lt;br /&gt;
 * FounderID&lt;br /&gt;
 * MembershipFee&lt;br /&gt;
 * OpenEnrollment&lt;br /&gt;
 * ShowInList&lt;br /&gt;
 * AllowPublish&lt;br /&gt;
 * MaturePublish&lt;br /&gt;
 * OwnerRoleID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupinvite&lt;br /&gt;
|osgroupinvite&lt;br /&gt;
 * InviteID&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
|os_groups_invites&lt;br /&gt;
 * InviteID&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupmembership&lt;br /&gt;
|osgroupmembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * SelectedRoleID&lt;br /&gt;
 * Contribution&lt;br /&gt;
 * ListInProfile&lt;br /&gt;
 * AcceptNotices&lt;br /&gt;
|os_groups_membership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * SelectedRoleID&lt;br /&gt;
 * Contribution&lt;br /&gt;
 * ListInProfile&lt;br /&gt;
 * AcceptNotices&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupnotice&lt;br /&gt;
|osgroupnotice&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * NoticeID&lt;br /&gt;
 * Timestamp&lt;br /&gt;
 * FromName&lt;br /&gt;
 * Subject&lt;br /&gt;
 * Message&lt;br /&gt;
|os_groups_notices&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * NoticeID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
 * FromName&lt;br /&gt;
 * Subject&lt;br /&gt;
 * Message&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_grouprolemembership&lt;br /&gt;
|osgrouprolemembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * AgentID&lt;br /&gt;
|os_groups_rolemembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_grouprole&lt;br /&gt;
|osrole&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Description&lt;br /&gt;
 * Title&lt;br /&gt;
 * Powers&lt;br /&gt;
|os_groups_roles&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Description&lt;br /&gt;
 * Title&lt;br /&gt;
 * Powers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
You do not need to consider the field '''BinaryBucket''' in the flotsam table '''osgroupnotice''' as long as you did not apply the patch attached to [http://opensimulator.org/mantis/view.php?id=6699 Mantis #6699]. If you have applied it, then maybe the following information will help, if you do not want to miss the content in the new tables:&lt;br /&gt;
&lt;br /&gt;
Byte offset and description of bucket data:&lt;br /&gt;
&lt;br /&gt;
* 0:  1 byte indicating if attachment is present&lt;br /&gt;
* 1:  1 byte indicating the type of attachment&lt;br /&gt;
* 2:  16 bytes - Group UUID&lt;br /&gt;
* 18: 16 bytes - UUID of the attachment owner&lt;br /&gt;
* 34: 16 bytes - UUID of the attachment&lt;br /&gt;
* 50: variable - Name of the attachment&lt;br /&gt;
* ??: NUL byte to terminate the attachment name&lt;br /&gt;
&lt;br /&gt;
This information is copied from the original patch and describes the content format of field BinaryBucket.&lt;br /&gt;
&lt;br /&gt;
== Flotsam ==&lt;br /&gt;
Use this script if your are using the Flotsam groups.&lt;br /&gt;
&lt;br /&gt;
The Script (Replace ROBUSTDB with your ROBUST database and FLOTSAMDB with your database, containing your Flotsam tables!):&lt;br /&gt;
&amp;lt;source lang=sql&amp;gt;&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_groups`&lt;br /&gt;
(GroupID, Name, Charter, InsigniaID, FounderID, MembershipFee, OpenEnrollment, ShowInList,&lt;br /&gt;
AllowPublish, MaturePublish, OwnerRoleID)&lt;br /&gt;
SELECT GroupID, Name, Charter, InsigniaID, FounderID, MemberShipFee, OpenEnrollment, ShowInList, AllowPublish,&lt;br /&gt;
MaturePublish, OwnerRoleID&lt;br /&gt;
FROM `FLOTSAMDB`.osgroup;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_invites in ROBUST database with values from osgroupinvite&lt;br /&gt;
or FlotSam osgroupinvite*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_invites`&lt;br /&gt;
(InviteID, GroupID, RoleID, PrincipalID, TMStamp)&lt;br /&gt;
SELECT InviteID, GroupID, RoleID, AgentID, TMStamp&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupinvite;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_membership in ROBUST database with values from osgroupmembership&lt;br /&gt;
or FlotSam osgroupmembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_membership`&lt;br /&gt;
(GroupID, PrincipalID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices)&lt;br /&gt;
SELECT GroupID, AgentID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupmembership;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_notices in ROBUST database with values from osgroupnotice&lt;br /&gt;
or FlotSam osgroupnotice*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_notices`&lt;br /&gt;
(GroupID, NoticeID, TMStamp, FromName, Subject, Message)&lt;br /&gt;
SELECT GroupID, NoticeID, Timestamp, FromName, Subject, Message&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupnotice;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_principals in ROBUST database with values from osagent&lt;br /&gt;
or FlotSam osagent*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_principals`&lt;br /&gt;
(PrincipalID, ActiveGroupID)&lt;br /&gt;
SELECT AgentID, ActiveGroupID&lt;br /&gt;
FROM `FLOTSAMDB`.osagent;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_rolemembership in ROBUST database with values from osrolemembership&lt;br /&gt;
or FlotSam osgrouprolemembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_rolemembership&lt;br /&gt;
(GroupID, RoleID, PrincipalID)&lt;br /&gt;
SELECT GroupID, RoleID, AgentID&lt;br /&gt;
FROM `FLOTSAMDB`.osgrouprolemembership;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from osroles&lt;br /&gt;
or FlotSam osrole*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_roles&lt;br /&gt;
(GroupID, RoleID, Name, Description, Title, Powers)&lt;br /&gt;
SELECT GroupID, RoleID, Name, Description, Title, Powers&lt;br /&gt;
FROM `FLOTSAMDB`.osrole;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
== jOpenSim ==&lt;br /&gt;
Use this script if you are using the jOpenSim groups.&lt;br /&gt;
&lt;br /&gt;
The Script (Replace ROBUSTDB with your ROBUST database and FLOTSAMDB with your database, containing your jOpenSim tables!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=sql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/* SQL script to convert group tables from Flotsam Groups (Group database) or jOpenSim (tables in Joomla Database)&lt;br /&gt;
to new V2 groups, which are part of OpenSimulator core up from 0.7.6 branch*/&lt;br /&gt;
&lt;br /&gt;
/* FlotSam Tables latest version from&lt;br /&gt;
https://github.com/mcortez/flotsam/tree/master/flotsam/Servers/XmlRpcGroupsServer/&lt;br /&gt;
Commit-No.: 18275462c9*/&lt;br /&gt;
&lt;br /&gt;
/* jOpenSim Version: 0.2.6.4*/&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_groups in ROBUST database with values from jos_opensim_groups&lt;br /&gt;
or FlotSam osgroup*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_groups`&lt;br /&gt;
(GroupID, Name, Charter, InsigniaID, FounderID, MembershipFee, OpenEnrollment, ShowInList,&lt;br /&gt;
AllowPublish, MaturePublish, OwnerRoleID)&lt;br /&gt;
select GroupID, Name, Charter, InsigniaID, FounderID, MemberShipFee, OpenEnrollment, ShowInList, AllowPublish,&lt;br /&gt;
MaturePublish, OwnerRoleID&lt;br /&gt;
from `FLOTSAMDB`.jos_opensim_group;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_invites in ROBUST database with values from jos_opensim_groupinvite&lt;br /&gt;
or FlotSam osgroupinvite*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_invites`&lt;br /&gt;
(InviteID, GroupID, RoleID, PrincipalID, TMStamp)&lt;br /&gt;
SELECT InviteID, GroupID, RoleID, AgentID, TMStamp&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupinvite;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_membership in ROBUST database with values from jos_opensim_groupmembership&lt;br /&gt;
or FlotSam osgroupmembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_membership`&lt;br /&gt;
(GroupID, PrincipalID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices)&lt;br /&gt;
SELECT GroupID, AgentID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupmembership;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_notices in ROBUST database with values from jos_opensim_groupnotice&lt;br /&gt;
or FlotSam osgroupnotice*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_notices`&lt;br /&gt;
(GroupID, NoticeID, TMStamp, FromName, Subject, Message)&lt;br /&gt;
SELECT GroupID, NoticeID, Timestamp, FromName, Subject, Message&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupnotice;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_principals in ROBUST database with values from jos_opensim_groupactive&lt;br /&gt;
or FlotSam osagent*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_principals`&lt;br /&gt;
(PrincipalID, ActiveGroupID)&lt;br /&gt;
SELECT AgentID, ActiveGroupID&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupactive;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_rolemembership in ROBUST database with values from jos_opensim_grouprolemembership&lt;br /&gt;
or FlotSam osgrouprolemembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_rolemembership&lt;br /&gt;
(GroupID, RoleID, PrincipalID)&lt;br /&gt;
SELECT GroupID, RoleID, AgentID&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_grouprolemembership;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from jos_opensim_grouproles&lt;br /&gt;
or FlotSam osrole*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_roles&lt;br /&gt;
(GroupID, RoleID, Name, Description, Title, Powers)&lt;br /&gt;
SELECT GroupID, RoleID, Name, Description, Title, Powers&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_grouprole;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from jos_opensim_offlinemessages&lt;br /&gt;
--&amp;gt; no corresponding table in FlotSam  --  only applies to jOpenSim*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.im_offline&lt;br /&gt;
(PrincipalID, Message, TMStamp)&lt;br /&gt;
SELECT fromAgentID, Message, sent&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_offlinemessages;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Region configuration example for connecting to robust grid ==&lt;br /&gt;
&lt;br /&gt;
This example file is for useing V2 groups on your region thats connected to a grid with robust as grid server.&lt;br /&gt;
The configuration options you can find in the opensim.ini file under the section [Groups]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    ;# {Enabled} {} {Enable groups?} {true false} false&lt;br /&gt;
    ;; Enables the groups module&lt;br /&gt;
    &amp;lt;br&amp;gt;'''Enabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {LevelGroupCreate} {Enabled:true} {User level for creating groups} {} 0&lt;br /&gt;
    ;; Minimum user level required to create groups&lt;br /&gt;
    &amp;lt;br&amp;gt;'''LevelGroupCreate = 0'''&lt;br /&gt;
&lt;br /&gt;
    ;# {Module} {Enabled:true} {Groups module to use? (Use GroupsModule to use Flotsam/Simian)} {Default &amp;quot;Groups Module V2&amp;quot;} Default&lt;br /&gt;
    ;; The default module can use a PHP XmlRpc server from the Flotsam project at&lt;br /&gt;
    ;; http://code.google.com/p/flotsam/&lt;br /&gt;
    ;; or from the SimianGrid project at http://code.google.com/p/openmetaverse&lt;br /&gt;
    ; Module = Default&lt;br /&gt;
    ;; or... use Groups Module V2, which works for standalones and robust grids&lt;br /&gt;
    &amp;lt;br&amp;gt;'''Module = &amp;quot;Groups Module V2&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {StorageProvider} {Module:Groups Module V2} {The DLL that provides the storage for V2} {OpenSim.Data.MySQL.dll} &lt;br /&gt;
    &amp;lt;br&amp;gt;'''StorageProvider = OpenSim.Data.MySQL.dll'''&lt;br /&gt;
&lt;br /&gt;
    ;# {ServicesConnectorModule} {Module:GroupsModule Module:Groups Module V2} {Service connector to use for groups} {XmlRpcGroupsServicesConnector SimianGroupsServicesConnector &amp;quot;Groups Local Service Connector&amp;quot; &amp;quot;Groups Remote Service Connector&amp;quot; &amp;quot;Groups HG Service Connector&amp;quot;} XmlRpcGroupsServicesConnector&lt;br /&gt;
    ;; Service connectors to the Groups Service as used in the GroupsModule.  Select one as follows:&lt;br /&gt;
    ;; -- for Flotsam Groups use XmlRpcGroupsServicesConnector&lt;br /&gt;
    ;; -- for Simian Groups use SimianGroupsServicesConnector&lt;br /&gt;
    ;; -- for V2 Groups, standalone, non-HG use &amp;quot;Groups Local Service Connector&amp;quot;&lt;br /&gt;
    ;; -- for V2 Groups, grided sim, non-HG use &amp;quot;Groups Remote Service Connector&amp;quot;&lt;br /&gt;
    ;; -- for V2 Groups, HG, both standalone and grided sim, use &amp;quot;Groups HG Service Connector&amp;quot;&lt;br /&gt;
    ;; Note that the quotes &amp;quot;&amp;quot; around the words are important!&lt;br /&gt;
    ; ServicesConnectorModule = XmlRpcGroupsServicesConnector&lt;br /&gt;
    &amp;lt;br&amp;gt;'''ServicesConnectorModule = &amp;quot;Groups HG Service Connector&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {LocalService} {ServicesConnectorModule:Groups HG Service Connector} {Is the group service in this process or elsewhere?} {local remote} local&lt;br /&gt;
    ;; Used for V2 in HG only. If standalone, set this to local; if grided sim, set this to remote&lt;br /&gt;
    ; LocalService = local&lt;br /&gt;
    &amp;lt;br&amp;gt;'''LocalService = remote'''&lt;br /&gt;
&lt;br /&gt;
    ;# {GroupsServerURI} {Module:GroupsModule (ServicesConnectorModule:Groups Remote Service Connector or (ServicesConnectorModule:Groups HG Service Connector and LocalService:remote))} {Groups Server URI} {}&lt;br /&gt;
    ;; URI for the groups services of this grid&lt;br /&gt;
    ;; e.g. http://yourxmlrpcserver.com/xmlrpc.php for Flotsam XmlRpc&lt;br /&gt;
    ;; or http://mygridserver.com:82/Grid/ for SimianGrid&lt;br /&gt;
    ;; or http:://mygridserver.com:8003 for robust, V2&lt;br /&gt;
    ;; Leave it commented for standalones, V2&lt;br /&gt;
    ; GroupsServerURI = &amp;quot;&amp;quot;&lt;br /&gt;
    &amp;lt;br&amp;gt;'''GroupsServerURI = &amp;quot;http://mygridserver.com:8003&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {HomeURI} {ServicesConnectorModule:Groups HG Service Connector} {What's the home address of this world?} {} &lt;br /&gt;
    ;; Used for V2 in HG only. For example&lt;br /&gt;
    ;; http://mygridserver.com:9000 or http://mygridserver.com:8002&lt;br /&gt;
    ;; If you have this set under [Startup], no need to set it here, leave it commented&lt;br /&gt;
    &amp;lt;br&amp;gt;'''HomeURI = &amp;quot;http://mygridserver.com:8002&amp;quot;''' &lt;br /&gt;
&lt;br /&gt;
    ;# {MessagingEnabled} {Module:GroupsModule Module:Groups Module V2} {Is groups messaging enabled?} {true false} true&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessagingEnabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {MessagingModule} {MessagingEnabled:true} {Module to use for groups messaging} {GroupsMessagingModule &amp;quot;Groups Messaging Module V2&amp;quot;} GroupsMessagingModule&lt;br /&gt;
    ; MessagingModule = GroupsMessagingModule&lt;br /&gt;
    ;; or use V2 for Groups V2&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessagingModule = &amp;quot;Groups Messaging Module V2&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {NoticesEnabled} {Module:GroupsModule Module:Groups Module V2} {Enable group notices?} {true false} true&lt;br /&gt;
    ;; Enable Group Notices&lt;br /&gt;
    &amp;lt;br&amp;gt;'''NoticesEnabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {MessageOnlineUsersOnly} {Module:GroupsModule Module} {Message online users only?} {true false} false&lt;br /&gt;
    ; Experimental option to only message online users rather than all users&lt;br /&gt;
    ; Should make large groups with few online members messaging faster, as the expense of more calls to presence service&lt;br /&gt;
    ; Applies Flotsam Group only. V2 has this always on, no other option&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessageOnlineUsersOnly = True'''&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/V2_Groups</id>
		<title>V2 Groups</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/V2_Groups"/>
				<updated>2013-10-26T13:13:40Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* Configuration example for robust grid */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of OpenSimulator 0.7.6 Diva implemented the V2 Groups, which are now part of OpenSimulator core. Using the new groups do not need to use any third Party modules any more.&lt;br /&gt;
&lt;br /&gt;
The below script helps, converting existing Flotsam Groups or jOpenSim Groups (which uses Flotsam anyway) to the new Groups. This ensures, that you dont lose any Group information, when you want to switch over.&lt;br /&gt;
&lt;br /&gt;
== Differences between tables names ==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! jOpenSim&lt;br /&gt;
! Flotsam&lt;br /&gt;
! V2&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupactive&lt;br /&gt;
|osagent&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * ActiveGroupID&lt;br /&gt;
|os_groups_principals&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * ActiveGroupID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_group&lt;br /&gt;
|osgroup&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Charter&lt;br /&gt;
 * InsigniaID&lt;br /&gt;
 * FounderID&lt;br /&gt;
 * MemberShipFee&lt;br /&gt;
 * OpenEnrollment&lt;br /&gt;
 * ShowInList&lt;br /&gt;
 * AllowPublish&lt;br /&gt;
 * MaturePublish&lt;br /&gt;
 * OwnerRoleID&lt;br /&gt;
|os_groups_groups&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Charter&lt;br /&gt;
 * InsigniaID&lt;br /&gt;
 * FounderID&lt;br /&gt;
 * MembershipFee&lt;br /&gt;
 * OpenEnrollment&lt;br /&gt;
 * ShowInList&lt;br /&gt;
 * AllowPublish&lt;br /&gt;
 * MaturePublish&lt;br /&gt;
 * OwnerRoleID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupinvite&lt;br /&gt;
|osgroupinvite&lt;br /&gt;
 * InviteID&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
|os_groups_invites&lt;br /&gt;
 * InviteID&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupmembership&lt;br /&gt;
|osgroupmembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * SelectedRoleID&lt;br /&gt;
 * Contribution&lt;br /&gt;
 * ListInProfile&lt;br /&gt;
 * AcceptNotices&lt;br /&gt;
|os_groups_membership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * SelectedRoleID&lt;br /&gt;
 * Contribution&lt;br /&gt;
 * ListInProfile&lt;br /&gt;
 * AcceptNotices&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupnotice&lt;br /&gt;
|osgroupnotice&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * NoticeID&lt;br /&gt;
 * Timestamp&lt;br /&gt;
 * FromName&lt;br /&gt;
 * Subject&lt;br /&gt;
 * Message&lt;br /&gt;
|os_groups_notices&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * NoticeID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
 * FromName&lt;br /&gt;
 * Subject&lt;br /&gt;
 * Message&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_grouprolemembership&lt;br /&gt;
|osgrouprolemembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * AgentID&lt;br /&gt;
|os_groups_rolemembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_grouprole&lt;br /&gt;
|osrole&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Description&lt;br /&gt;
 * Title&lt;br /&gt;
 * Powers&lt;br /&gt;
|os_groups_roles&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Description&lt;br /&gt;
 * Title&lt;br /&gt;
 * Powers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
You do not need to consider the field '''BinaryBucket''' in the flotsam table '''osgroupnotice''' as long as you did not apply the patch attached to [http://opensimulator.org/mantis/view.php?id=6699 Mantis #6699]. If you have applied it, then maybe the following information will help, if you do not want to miss the content in the new tables:&lt;br /&gt;
&lt;br /&gt;
Byte offset and description of bucket data:&lt;br /&gt;
&lt;br /&gt;
* 0:  1 byte indicating if attachment is present&lt;br /&gt;
* 1:  1 byte indicating the type of attachment&lt;br /&gt;
* 2:  16 bytes - Group UUID&lt;br /&gt;
* 18: 16 bytes - UUID of the attachment owner&lt;br /&gt;
* 34: 16 bytes - UUID of the attachment&lt;br /&gt;
* 50: variable - Name of the attachment&lt;br /&gt;
* ??: NUL byte to terminate the attachment name&lt;br /&gt;
&lt;br /&gt;
This information is copied from the original patch and describes the content format of field BinaryBucket.&lt;br /&gt;
&lt;br /&gt;
== Flotsam ==&lt;br /&gt;
Use this script if your are using the Flotsam groups.&lt;br /&gt;
&lt;br /&gt;
The Script (Replace ROBUSTDB with your ROBUST database and FLOTSAMDB with your database, containing your Flotsam tables!):&lt;br /&gt;
&amp;lt;source lang=sql&amp;gt;&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_groups`&lt;br /&gt;
(GroupID, Name, Charter, InsigniaID, FounderID, MembershipFee, OpenEnrollment, ShowInList,&lt;br /&gt;
AllowPublish, MaturePublish, OwnerRoleID)&lt;br /&gt;
SELECT GroupID, Name, Charter, InsigniaID, FounderID, MemberShipFee, OpenEnrollment, ShowInList, AllowPublish,&lt;br /&gt;
MaturePublish, OwnerRoleID&lt;br /&gt;
FROM `FLOTSAMDB`.osgroup;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_invites in ROBUST database with values from osgroupinvite&lt;br /&gt;
or FlotSam osgroupinvite*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_invites`&lt;br /&gt;
(InviteID, GroupID, RoleID, PrincipalID, TMStamp)&lt;br /&gt;
SELECT InviteID, GroupID, RoleID, AgentID, TMStamp&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupinvite;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_membership in ROBUST database with values from osgroupmembership&lt;br /&gt;
or FlotSam osgroupmembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_membership`&lt;br /&gt;
(GroupID, PrincipalID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices)&lt;br /&gt;
SELECT GroupID, AgentID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupmembership;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_notices in ROBUST database with values from osgroupnotice&lt;br /&gt;
or FlotSam osgroupnotice*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_notices`&lt;br /&gt;
(GroupID, NoticeID, TMStamp, FromName, Subject, Message)&lt;br /&gt;
SELECT GroupID, NoticeID, Timestamp, FromName, Subject, Message&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupnotice;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_principals in ROBUST database with values from osagent&lt;br /&gt;
or FlotSam osagent*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_principals`&lt;br /&gt;
(PrincipalID, ActiveGroupID)&lt;br /&gt;
SELECT AgentID, ActiveGroupID&lt;br /&gt;
FROM `FLOTSAMDB`.osagent;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_rolemembership in ROBUST database with values from osrolemembership&lt;br /&gt;
or FlotSam osgrouprolemembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_rolemembership&lt;br /&gt;
(GroupID, RoleID, PrincipalID)&lt;br /&gt;
SELECT GroupID, RoleID, AgentID&lt;br /&gt;
FROM `FLOTSAMDB`.osgrouprolemembership;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from osroles&lt;br /&gt;
or FlotSam osrole*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_roles&lt;br /&gt;
(GroupID, RoleID, Name, Description, Title, Powers)&lt;br /&gt;
SELECT GroupID, RoleID, Name, Description, Title, Powers&lt;br /&gt;
FROM `FLOTSAMDB`.osrole;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
== jOpenSim ==&lt;br /&gt;
Use this script if you are using the jOpenSim groups.&lt;br /&gt;
&lt;br /&gt;
The Script (Replace ROBUSTDB with your ROBUST database and FLOTSAMDB with your database, containing your jOpenSim tables!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=sql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/* SQL script to convert group tables from Flotsam Groups (Group database) or jOpenSim (tables in Joomla Database)&lt;br /&gt;
to new V2 groups, which are part of OpenSimulator core up from 0.7.6 branch*/&lt;br /&gt;
&lt;br /&gt;
/* FlotSam Tables latest version from&lt;br /&gt;
https://github.com/mcortez/flotsam/tree/master/flotsam/Servers/XmlRpcGroupsServer/&lt;br /&gt;
Commit-No.: 18275462c9*/&lt;br /&gt;
&lt;br /&gt;
/* jOpenSim Version: 0.2.6.4*/&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_groups in ROBUST database with values from jos_opensim_groups&lt;br /&gt;
or FlotSam osgroup*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_groups`&lt;br /&gt;
(GroupID, Name, Charter, InsigniaID, FounderID, MembershipFee, OpenEnrollment, ShowInList,&lt;br /&gt;
AllowPublish, MaturePublish, OwnerRoleID)&lt;br /&gt;
select GroupID, Name, Charter, InsigniaID, FounderID, MemberShipFee, OpenEnrollment, ShowInList, AllowPublish,&lt;br /&gt;
MaturePublish, OwnerRoleID&lt;br /&gt;
from `FLOTSAMDB`.jos_opensim_group;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_invites in ROBUST database with values from jos_opensim_groupinvite&lt;br /&gt;
or FlotSam osgroupinvite*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_invites`&lt;br /&gt;
(InviteID, GroupID, RoleID, PrincipalID, TMStamp)&lt;br /&gt;
SELECT InviteID, GroupID, RoleID, AgentID, TMStamp&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupinvite;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_membership in ROBUST database with values from jos_opensim_groupmembership&lt;br /&gt;
or FlotSam osgroupmembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_membership`&lt;br /&gt;
(GroupID, PrincipalID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices)&lt;br /&gt;
SELECT GroupID, AgentID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupmembership;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_notices in ROBUST database with values from jos_opensim_groupnotice&lt;br /&gt;
or FlotSam osgroupnotice*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_notices`&lt;br /&gt;
(GroupID, NoticeID, TMStamp, FromName, Subject, Message)&lt;br /&gt;
SELECT GroupID, NoticeID, Timestamp, FromName, Subject, Message&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupnotice;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_principals in ROBUST database with values from jos_opensim_groupactive&lt;br /&gt;
or FlotSam osagent*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_principals`&lt;br /&gt;
(PrincipalID, ActiveGroupID)&lt;br /&gt;
SELECT AgentID, ActiveGroupID&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupactive;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_rolemembership in ROBUST database with values from jos_opensim_grouprolemembership&lt;br /&gt;
or FlotSam osgrouprolemembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_rolemembership&lt;br /&gt;
(GroupID, RoleID, PrincipalID)&lt;br /&gt;
SELECT GroupID, RoleID, AgentID&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_grouprolemembership;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from jos_opensim_grouproles&lt;br /&gt;
or FlotSam osrole*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_roles&lt;br /&gt;
(GroupID, RoleID, Name, Description, Title, Powers)&lt;br /&gt;
SELECT GroupID, RoleID, Name, Description, Title, Powers&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_grouprole;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from jos_opensim_offlinemessages&lt;br /&gt;
--&amp;gt; no corresponding table in FlotSam  --  only applies to jOpenSim*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.im_offline&lt;br /&gt;
(PrincipalID, Message, TMStamp)&lt;br /&gt;
SELECT fromAgentID, Message, sent&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_offlinemessages;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Region configuration example for connecting to robust grid ==&lt;br /&gt;
&lt;br /&gt;
This example file is for V2 groups in grid setup with robust as grid server.&lt;br /&gt;
This configuration options you can find in the opensim.ini file under the section [Groups]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    ;# {Enabled} {} {Enable groups?} {true false} false&lt;br /&gt;
    ;; Enables the groups module&lt;br /&gt;
    &amp;lt;br&amp;gt;'''Enabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {LevelGroupCreate} {Enabled:true} {User level for creating groups} {} 0&lt;br /&gt;
    ;; Minimum user level required to create groups&lt;br /&gt;
    &amp;lt;br&amp;gt;'''LevelGroupCreate = 0'''&lt;br /&gt;
&lt;br /&gt;
    ;# {Module} {Enabled:true} {Groups module to use? (Use GroupsModule to use Flotsam/Simian)} {Default &amp;quot;Groups Module V2&amp;quot;} Default&lt;br /&gt;
    ;; The default module can use a PHP XmlRpc server from the Flotsam project at&lt;br /&gt;
    ;; http://code.google.com/p/flotsam/&lt;br /&gt;
    ;; or from the SimianGrid project at http://code.google.com/p/openmetaverse&lt;br /&gt;
    ; Module = Default&lt;br /&gt;
    ;; or... use Groups Module V2, which works for standalones and robust grids&lt;br /&gt;
    &amp;lt;br&amp;gt;'''Module = &amp;quot;Groups Module V2&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {StorageProvider} {Module:Groups Module V2} {The DLL that provides the storage for V2} {OpenSim.Data.MySQL.dll} &lt;br /&gt;
    &amp;lt;br&amp;gt;'''StorageProvider = OpenSim.Data.MySQL.dll'''&lt;br /&gt;
&lt;br /&gt;
    ;# {ServicesConnectorModule} {Module:GroupsModule Module:Groups Module V2} {Service connector to use for groups} {XmlRpcGroupsServicesConnector SimianGroupsServicesConnector &amp;quot;Groups Local Service Connector&amp;quot; &amp;quot;Groups Remote Service Connector&amp;quot; &amp;quot;Groups HG Service Connector&amp;quot;} XmlRpcGroupsServicesConnector&lt;br /&gt;
    ;; Service connectors to the Groups Service as used in the GroupsModule.  Select one as follows:&lt;br /&gt;
    ;; -- for Flotsam Groups use XmlRpcGroupsServicesConnector&lt;br /&gt;
    ;; -- for Simian Groups use SimianGroupsServicesConnector&lt;br /&gt;
    ;; -- for V2 Groups, standalone, non-HG use &amp;quot;Groups Local Service Connector&amp;quot;&lt;br /&gt;
    ;; -- for V2 Groups, grided sim, non-HG use &amp;quot;Groups Remote Service Connector&amp;quot;&lt;br /&gt;
    ;; -- for V2 Groups, HG, both standalone and grided sim, use &amp;quot;Groups HG Service Connector&amp;quot;&lt;br /&gt;
    ;; Note that the quotes &amp;quot;&amp;quot; around the words are important!&lt;br /&gt;
    ; ServicesConnectorModule = XmlRpcGroupsServicesConnector&lt;br /&gt;
    &amp;lt;br&amp;gt;'''ServicesConnectorModule = &amp;quot;Groups HG Service Connector&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {LocalService} {ServicesConnectorModule:Groups HG Service Connector} {Is the group service in this process or elsewhere?} {local remote} local&lt;br /&gt;
    ;; Used for V2 in HG only. If standalone, set this to local; if grided sim, set this to remote&lt;br /&gt;
    ; LocalService = local&lt;br /&gt;
    &amp;lt;br&amp;gt;'''LocalService = remote'''&lt;br /&gt;
&lt;br /&gt;
    ;# {GroupsServerURI} {Module:GroupsModule (ServicesConnectorModule:Groups Remote Service Connector or (ServicesConnectorModule:Groups HG Service Connector and LocalService:remote))} {Groups Server URI} {}&lt;br /&gt;
    ;; URI for the groups services of this grid&lt;br /&gt;
    ;; e.g. http://yourxmlrpcserver.com/xmlrpc.php for Flotsam XmlRpc&lt;br /&gt;
    ;; or http://mygridserver.com:82/Grid/ for SimianGrid&lt;br /&gt;
    ;; or http:://mygridserver.com:8003 for robust, V2&lt;br /&gt;
    ;; Leave it commented for standalones, V2&lt;br /&gt;
    ; GroupsServerURI = &amp;quot;&amp;quot;&lt;br /&gt;
    &amp;lt;br&amp;gt;'''GroupsServerURI = &amp;quot;http://mygridserver.com:8003&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {HomeURI} {ServicesConnectorModule:Groups HG Service Connector} {What's the home address of this world?} {} &lt;br /&gt;
    ;; Used for V2 in HG only. For example&lt;br /&gt;
    ;; http://mygridserver.com:9000 or http://mygridserver.com:8002&lt;br /&gt;
    ;; If you have this set under [Startup], no need to set it here, leave it commented&lt;br /&gt;
    &amp;lt;br&amp;gt;'''HomeURI = &amp;quot;http://mygridserver.com:8002&amp;quot;''' &lt;br /&gt;
&lt;br /&gt;
    ;# {MessagingEnabled} {Module:GroupsModule Module:Groups Module V2} {Is groups messaging enabled?} {true false} true&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessagingEnabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {MessagingModule} {MessagingEnabled:true} {Module to use for groups messaging} {GroupsMessagingModule &amp;quot;Groups Messaging Module V2&amp;quot;} GroupsMessagingModule&lt;br /&gt;
    ; MessagingModule = GroupsMessagingModule&lt;br /&gt;
    ;; or use V2 for Groups V2&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessagingModule = &amp;quot;Groups Messaging Module V2&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {NoticesEnabled} {Module:GroupsModule Module:Groups Module V2} {Enable group notices?} {true false} true&lt;br /&gt;
    ;; Enable Group Notices&lt;br /&gt;
    &amp;lt;br&amp;gt;'''NoticesEnabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {MessageOnlineUsersOnly} {Module:GroupsModule Module} {Message online users only?} {true false} false&lt;br /&gt;
    ; Experimental option to only message online users rather than all users&lt;br /&gt;
    ; Should make large groups with few online members messaging faster, as the expense of more calls to presence service&lt;br /&gt;
    ; Applies Flotsam Group only. V2 has this always on, no other option&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessageOnlineUsersOnly = True'''&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/V2_Groups</id>
		<title>V2 Groups</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/V2_Groups"/>
				<updated>2013-10-26T13:11:08Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* V2 groups configuration example for robust grid */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of OpenSimulator 0.7.6 Diva implemented the V2 Groups, which are now part of OpenSimulator core. Using the new groups do not need to use any third Party modules any more.&lt;br /&gt;
&lt;br /&gt;
The below script helps, converting existing Flotsam Groups or jOpenSim Groups (which uses Flotsam anyway) to the new Groups. This ensures, that you dont lose any Group information, when you want to switch over.&lt;br /&gt;
&lt;br /&gt;
== Differences between tables names ==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! jOpenSim&lt;br /&gt;
! Flotsam&lt;br /&gt;
! V2&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupactive&lt;br /&gt;
|osagent&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * ActiveGroupID&lt;br /&gt;
|os_groups_principals&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * ActiveGroupID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_group&lt;br /&gt;
|osgroup&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Charter&lt;br /&gt;
 * InsigniaID&lt;br /&gt;
 * FounderID&lt;br /&gt;
 * MemberShipFee&lt;br /&gt;
 * OpenEnrollment&lt;br /&gt;
 * ShowInList&lt;br /&gt;
 * AllowPublish&lt;br /&gt;
 * MaturePublish&lt;br /&gt;
 * OwnerRoleID&lt;br /&gt;
|os_groups_groups&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Charter&lt;br /&gt;
 * InsigniaID&lt;br /&gt;
 * FounderID&lt;br /&gt;
 * MembershipFee&lt;br /&gt;
 * OpenEnrollment&lt;br /&gt;
 * ShowInList&lt;br /&gt;
 * AllowPublish&lt;br /&gt;
 * MaturePublish&lt;br /&gt;
 * OwnerRoleID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupinvite&lt;br /&gt;
|osgroupinvite&lt;br /&gt;
 * InviteID&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
|os_groups_invites&lt;br /&gt;
 * InviteID&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupmembership&lt;br /&gt;
|osgroupmembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * SelectedRoleID&lt;br /&gt;
 * Contribution&lt;br /&gt;
 * ListInProfile&lt;br /&gt;
 * AcceptNotices&lt;br /&gt;
|os_groups_membership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * SelectedRoleID&lt;br /&gt;
 * Contribution&lt;br /&gt;
 * ListInProfile&lt;br /&gt;
 * AcceptNotices&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupnotice&lt;br /&gt;
|osgroupnotice&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * NoticeID&lt;br /&gt;
 * Timestamp&lt;br /&gt;
 * FromName&lt;br /&gt;
 * Subject&lt;br /&gt;
 * Message&lt;br /&gt;
|os_groups_notices&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * NoticeID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
 * FromName&lt;br /&gt;
 * Subject&lt;br /&gt;
 * Message&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_grouprolemembership&lt;br /&gt;
|osgrouprolemembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * AgentID&lt;br /&gt;
|os_groups_rolemembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_grouprole&lt;br /&gt;
|osrole&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Description&lt;br /&gt;
 * Title&lt;br /&gt;
 * Powers&lt;br /&gt;
|os_groups_roles&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Description&lt;br /&gt;
 * Title&lt;br /&gt;
 * Powers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
You do not need to consider the field '''BinaryBucket''' in the flotsam table '''osgroupnotice''' as long as you did not apply the patch attached to [http://opensimulator.org/mantis/view.php?id=6699 Mantis #6699]. If you have applied it, then maybe the following information will help, if you do not want to miss the content in the new tables:&lt;br /&gt;
&lt;br /&gt;
Byte offset and description of bucket data:&lt;br /&gt;
&lt;br /&gt;
* 0:  1 byte indicating if attachment is present&lt;br /&gt;
* 1:  1 byte indicating the type of attachment&lt;br /&gt;
* 2:  16 bytes - Group UUID&lt;br /&gt;
* 18: 16 bytes - UUID of the attachment owner&lt;br /&gt;
* 34: 16 bytes - UUID of the attachment&lt;br /&gt;
* 50: variable - Name of the attachment&lt;br /&gt;
* ??: NUL byte to terminate the attachment name&lt;br /&gt;
&lt;br /&gt;
This information is copied from the original patch and describes the content format of field BinaryBucket.&lt;br /&gt;
&lt;br /&gt;
== Flotsam ==&lt;br /&gt;
Use this script if your are using the Flotsam groups.&lt;br /&gt;
&lt;br /&gt;
The Script (Replace ROBUSTDB with your ROBUST database and FLOTSAMDB with your database, containing your Flotsam tables!):&lt;br /&gt;
&amp;lt;source lang=sql&amp;gt;&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_groups`&lt;br /&gt;
(GroupID, Name, Charter, InsigniaID, FounderID, MembershipFee, OpenEnrollment, ShowInList,&lt;br /&gt;
AllowPublish, MaturePublish, OwnerRoleID)&lt;br /&gt;
SELECT GroupID, Name, Charter, InsigniaID, FounderID, MemberShipFee, OpenEnrollment, ShowInList, AllowPublish,&lt;br /&gt;
MaturePublish, OwnerRoleID&lt;br /&gt;
FROM `FLOTSAMDB`.osgroup;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_invites in ROBUST database with values from osgroupinvite&lt;br /&gt;
or FlotSam osgroupinvite*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_invites`&lt;br /&gt;
(InviteID, GroupID, RoleID, PrincipalID, TMStamp)&lt;br /&gt;
SELECT InviteID, GroupID, RoleID, AgentID, TMStamp&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupinvite;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_membership in ROBUST database with values from osgroupmembership&lt;br /&gt;
or FlotSam osgroupmembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_membership`&lt;br /&gt;
(GroupID, PrincipalID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices)&lt;br /&gt;
SELECT GroupID, AgentID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupmembership;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_notices in ROBUST database with values from osgroupnotice&lt;br /&gt;
or FlotSam osgroupnotice*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_notices`&lt;br /&gt;
(GroupID, NoticeID, TMStamp, FromName, Subject, Message)&lt;br /&gt;
SELECT GroupID, NoticeID, Timestamp, FromName, Subject, Message&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupnotice;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_principals in ROBUST database with values from osagent&lt;br /&gt;
or FlotSam osagent*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_principals`&lt;br /&gt;
(PrincipalID, ActiveGroupID)&lt;br /&gt;
SELECT AgentID, ActiveGroupID&lt;br /&gt;
FROM `FLOTSAMDB`.osagent;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_rolemembership in ROBUST database with values from osrolemembership&lt;br /&gt;
or FlotSam osgrouprolemembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_rolemembership&lt;br /&gt;
(GroupID, RoleID, PrincipalID)&lt;br /&gt;
SELECT GroupID, RoleID, AgentID&lt;br /&gt;
FROM `FLOTSAMDB`.osgrouprolemembership;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from osroles&lt;br /&gt;
or FlotSam osrole*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_roles&lt;br /&gt;
(GroupID, RoleID, Name, Description, Title, Powers)&lt;br /&gt;
SELECT GroupID, RoleID, Name, Description, Title, Powers&lt;br /&gt;
FROM `FLOTSAMDB`.osrole;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
== jOpenSim ==&lt;br /&gt;
Use this script if you are using the jOpenSim groups.&lt;br /&gt;
&lt;br /&gt;
The Script (Replace ROBUSTDB with your ROBUST database and FLOTSAMDB with your database, containing your jOpenSim tables!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=sql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/* SQL script to convert group tables from Flotsam Groups (Group database) or jOpenSim (tables in Joomla Database)&lt;br /&gt;
to new V2 groups, which are part of OpenSimulator core up from 0.7.6 branch*/&lt;br /&gt;
&lt;br /&gt;
/* FlotSam Tables latest version from&lt;br /&gt;
https://github.com/mcortez/flotsam/tree/master/flotsam/Servers/XmlRpcGroupsServer/&lt;br /&gt;
Commit-No.: 18275462c9*/&lt;br /&gt;
&lt;br /&gt;
/* jOpenSim Version: 0.2.6.4*/&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_groups in ROBUST database with values from jos_opensim_groups&lt;br /&gt;
or FlotSam osgroup*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_groups`&lt;br /&gt;
(GroupID, Name, Charter, InsigniaID, FounderID, MembershipFee, OpenEnrollment, ShowInList,&lt;br /&gt;
AllowPublish, MaturePublish, OwnerRoleID)&lt;br /&gt;
select GroupID, Name, Charter, InsigniaID, FounderID, MemberShipFee, OpenEnrollment, ShowInList, AllowPublish,&lt;br /&gt;
MaturePublish, OwnerRoleID&lt;br /&gt;
from `FLOTSAMDB`.jos_opensim_group;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_invites in ROBUST database with values from jos_opensim_groupinvite&lt;br /&gt;
or FlotSam osgroupinvite*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_invites`&lt;br /&gt;
(InviteID, GroupID, RoleID, PrincipalID, TMStamp)&lt;br /&gt;
SELECT InviteID, GroupID, RoleID, AgentID, TMStamp&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupinvite;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_membership in ROBUST database with values from jos_opensim_groupmembership&lt;br /&gt;
or FlotSam osgroupmembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_membership`&lt;br /&gt;
(GroupID, PrincipalID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices)&lt;br /&gt;
SELECT GroupID, AgentID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupmembership;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_notices in ROBUST database with values from jos_opensim_groupnotice&lt;br /&gt;
or FlotSam osgroupnotice*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_notices`&lt;br /&gt;
(GroupID, NoticeID, TMStamp, FromName, Subject, Message)&lt;br /&gt;
SELECT GroupID, NoticeID, Timestamp, FromName, Subject, Message&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupnotice;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_principals in ROBUST database with values from jos_opensim_groupactive&lt;br /&gt;
or FlotSam osagent*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_principals`&lt;br /&gt;
(PrincipalID, ActiveGroupID)&lt;br /&gt;
SELECT AgentID, ActiveGroupID&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupactive;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_rolemembership in ROBUST database with values from jos_opensim_grouprolemembership&lt;br /&gt;
or FlotSam osgrouprolemembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_rolemembership&lt;br /&gt;
(GroupID, RoleID, PrincipalID)&lt;br /&gt;
SELECT GroupID, RoleID, AgentID&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_grouprolemembership;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from jos_opensim_grouproles&lt;br /&gt;
or FlotSam osrole*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_roles&lt;br /&gt;
(GroupID, RoleID, Name, Description, Title, Powers)&lt;br /&gt;
SELECT GroupID, RoleID, Name, Description, Title, Powers&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_grouprole;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from jos_opensim_offlinemessages&lt;br /&gt;
--&amp;gt; no corresponding table in FlotSam  --  only applies to jOpenSim*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.im_offline&lt;br /&gt;
(PrincipalID, Message, TMStamp)&lt;br /&gt;
SELECT fromAgentID, Message, sent&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_offlinemessages;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Configuration example for robust grid ==&lt;br /&gt;
&lt;br /&gt;
This example file is for V2 groups in grid setup with robust as grid server.&lt;br /&gt;
This configuration options you can find in the opensim.ini file under the section [Groups]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    ;# {Enabled} {} {Enable groups?} {true false} false&lt;br /&gt;
    ;; Enables the groups module&lt;br /&gt;
    &amp;lt;br&amp;gt;'''Enabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {LevelGroupCreate} {Enabled:true} {User level for creating groups} {} 0&lt;br /&gt;
    ;; Minimum user level required to create groups&lt;br /&gt;
    &amp;lt;br&amp;gt;'''LevelGroupCreate = 0'''&lt;br /&gt;
&lt;br /&gt;
    ;# {Module} {Enabled:true} {Groups module to use? (Use GroupsModule to use Flotsam/Simian)} {Default &amp;quot;Groups Module V2&amp;quot;} Default&lt;br /&gt;
    ;; The default module can use a PHP XmlRpc server from the Flotsam project at&lt;br /&gt;
    ;; http://code.google.com/p/flotsam/&lt;br /&gt;
    ;; or from the SimianGrid project at http://code.google.com/p/openmetaverse&lt;br /&gt;
    ; Module = Default&lt;br /&gt;
    ;; or... use Groups Module V2, which works for standalones and robust grids&lt;br /&gt;
    &amp;lt;br&amp;gt;'''Module = &amp;quot;Groups Module V2&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {StorageProvider} {Module:Groups Module V2} {The DLL that provides the storage for V2} {OpenSim.Data.MySQL.dll} &lt;br /&gt;
    &amp;lt;br&amp;gt;'''StorageProvider = OpenSim.Data.MySQL.dll'''&lt;br /&gt;
&lt;br /&gt;
    ;# {ServicesConnectorModule} {Module:GroupsModule Module:Groups Module V2} {Service connector to use for groups} {XmlRpcGroupsServicesConnector SimianGroupsServicesConnector &amp;quot;Groups Local Service Connector&amp;quot; &amp;quot;Groups Remote Service Connector&amp;quot; &amp;quot;Groups HG Service Connector&amp;quot;} XmlRpcGroupsServicesConnector&lt;br /&gt;
    ;; Service connectors to the Groups Service as used in the GroupsModule.  Select one as follows:&lt;br /&gt;
    ;; -- for Flotsam Groups use XmlRpcGroupsServicesConnector&lt;br /&gt;
    ;; -- for Simian Groups use SimianGroupsServicesConnector&lt;br /&gt;
    ;; -- for V2 Groups, standalone, non-HG use &amp;quot;Groups Local Service Connector&amp;quot;&lt;br /&gt;
    ;; -- for V2 Groups, grided sim, non-HG use &amp;quot;Groups Remote Service Connector&amp;quot;&lt;br /&gt;
    ;; -- for V2 Groups, HG, both standalone and grided sim, use &amp;quot;Groups HG Service Connector&amp;quot;&lt;br /&gt;
    ;; Note that the quotes &amp;quot;&amp;quot; around the words are important!&lt;br /&gt;
    ; ServicesConnectorModule = XmlRpcGroupsServicesConnector&lt;br /&gt;
    &amp;lt;br&amp;gt;'''ServicesConnectorModule = &amp;quot;Groups HG Service Connector&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {LocalService} {ServicesConnectorModule:Groups HG Service Connector} {Is the group service in this process or elsewhere?} {local remote} local&lt;br /&gt;
    ;; Used for V2 in HG only. If standalone, set this to local; if grided sim, set this to remote&lt;br /&gt;
    ; LocalService = local&lt;br /&gt;
    &amp;lt;br&amp;gt;'''LocalService = remote'''&lt;br /&gt;
&lt;br /&gt;
    ;# {GroupsServerURI} {Module:GroupsModule (ServicesConnectorModule:Groups Remote Service Connector or (ServicesConnectorModule:Groups HG Service Connector and LocalService:remote))} {Groups Server URI} {}&lt;br /&gt;
    ;; URI for the groups services of this grid&lt;br /&gt;
    ;; e.g. http://yourxmlrpcserver.com/xmlrpc.php for Flotsam XmlRpc&lt;br /&gt;
    ;; or http://mygridserver.com:82/Grid/ for SimianGrid&lt;br /&gt;
    ;; or http:://mygridserver.com:8003 for robust, V2&lt;br /&gt;
    ;; Leave it commented for standalones, V2&lt;br /&gt;
    ; GroupsServerURI = &amp;quot;&amp;quot;&lt;br /&gt;
    &amp;lt;br&amp;gt;'''GroupsServerURI = &amp;quot;http://mygridserver.com:8003&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {HomeURI} {ServicesConnectorModule:Groups HG Service Connector} {What's the home address of this world?} {} &lt;br /&gt;
    ;; Used for V2 in HG only. For example&lt;br /&gt;
    ;; http://mygridserver.com:9000 or http://mygridserver.com:8002&lt;br /&gt;
    ;; If you have this set under [Startup], no need to set it here, leave it commented&lt;br /&gt;
    &amp;lt;br&amp;gt;'''HomeURI = &amp;quot;http://mygridserver.com:8002&amp;quot;''' &lt;br /&gt;
&lt;br /&gt;
    ;# {MessagingEnabled} {Module:GroupsModule Module:Groups Module V2} {Is groups messaging enabled?} {true false} true&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessagingEnabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {MessagingModule} {MessagingEnabled:true} {Module to use for groups messaging} {GroupsMessagingModule &amp;quot;Groups Messaging Module V2&amp;quot;} GroupsMessagingModule&lt;br /&gt;
    ; MessagingModule = GroupsMessagingModule&lt;br /&gt;
    ;; or use V2 for Groups V2&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessagingModule = &amp;quot;Groups Messaging Module V2&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {NoticesEnabled} {Module:GroupsModule Module:Groups Module V2} {Enable group notices?} {true false} true&lt;br /&gt;
    ;; Enable Group Notices&lt;br /&gt;
    &amp;lt;br&amp;gt;'''NoticesEnabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {MessageOnlineUsersOnly} {Module:GroupsModule Module} {Message online users only?} {true false} false&lt;br /&gt;
    ; Experimental option to only message online users rather than all users&lt;br /&gt;
    ; Should make large groups with few online members messaging faster, as the expense of more calls to presence service&lt;br /&gt;
    ; Applies Flotsam Group only. V2 has this always on, no other option&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessageOnlineUsersOnly = True'''&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/V2_Groups</id>
		<title>V2 Groups</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/V2_Groups"/>
				<updated>2013-10-26T13:10:32Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* V2 groups configuration example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of OpenSimulator 0.7.6 Diva implemented the V2 Groups, which are now part of OpenSimulator core. Using the new groups do not need to use any third Party modules any more.&lt;br /&gt;
&lt;br /&gt;
The below script helps, converting existing Flotsam Groups or jOpenSim Groups (which uses Flotsam anyway) to the new Groups. This ensures, that you dont lose any Group information, when you want to switch over.&lt;br /&gt;
&lt;br /&gt;
== Differences between tables names ==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! jOpenSim&lt;br /&gt;
! Flotsam&lt;br /&gt;
! V2&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupactive&lt;br /&gt;
|osagent&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * ActiveGroupID&lt;br /&gt;
|os_groups_principals&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * ActiveGroupID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_group&lt;br /&gt;
|osgroup&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Charter&lt;br /&gt;
 * InsigniaID&lt;br /&gt;
 * FounderID&lt;br /&gt;
 * MemberShipFee&lt;br /&gt;
 * OpenEnrollment&lt;br /&gt;
 * ShowInList&lt;br /&gt;
 * AllowPublish&lt;br /&gt;
 * MaturePublish&lt;br /&gt;
 * OwnerRoleID&lt;br /&gt;
|os_groups_groups&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Charter&lt;br /&gt;
 * InsigniaID&lt;br /&gt;
 * FounderID&lt;br /&gt;
 * MembershipFee&lt;br /&gt;
 * OpenEnrollment&lt;br /&gt;
 * ShowInList&lt;br /&gt;
 * AllowPublish&lt;br /&gt;
 * MaturePublish&lt;br /&gt;
 * OwnerRoleID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupinvite&lt;br /&gt;
|osgroupinvite&lt;br /&gt;
 * InviteID&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
|os_groups_invites&lt;br /&gt;
 * InviteID&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupmembership&lt;br /&gt;
|osgroupmembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * SelectedRoleID&lt;br /&gt;
 * Contribution&lt;br /&gt;
 * ListInProfile&lt;br /&gt;
 * AcceptNotices&lt;br /&gt;
|os_groups_membership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * SelectedRoleID&lt;br /&gt;
 * Contribution&lt;br /&gt;
 * ListInProfile&lt;br /&gt;
 * AcceptNotices&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupnotice&lt;br /&gt;
|osgroupnotice&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * NoticeID&lt;br /&gt;
 * Timestamp&lt;br /&gt;
 * FromName&lt;br /&gt;
 * Subject&lt;br /&gt;
 * Message&lt;br /&gt;
|os_groups_notices&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * NoticeID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
 * FromName&lt;br /&gt;
 * Subject&lt;br /&gt;
 * Message&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_grouprolemembership&lt;br /&gt;
|osgrouprolemembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * AgentID&lt;br /&gt;
|os_groups_rolemembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_grouprole&lt;br /&gt;
|osrole&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Description&lt;br /&gt;
 * Title&lt;br /&gt;
 * Powers&lt;br /&gt;
|os_groups_roles&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Description&lt;br /&gt;
 * Title&lt;br /&gt;
 * Powers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
You do not need to consider the field '''BinaryBucket''' in the flotsam table '''osgroupnotice''' as long as you did not apply the patch attached to [http://opensimulator.org/mantis/view.php?id=6699 Mantis #6699]. If you have applied it, then maybe the following information will help, if you do not want to miss the content in the new tables:&lt;br /&gt;
&lt;br /&gt;
Byte offset and description of bucket data:&lt;br /&gt;
&lt;br /&gt;
* 0:  1 byte indicating if attachment is present&lt;br /&gt;
* 1:  1 byte indicating the type of attachment&lt;br /&gt;
* 2:  16 bytes - Group UUID&lt;br /&gt;
* 18: 16 bytes - UUID of the attachment owner&lt;br /&gt;
* 34: 16 bytes - UUID of the attachment&lt;br /&gt;
* 50: variable - Name of the attachment&lt;br /&gt;
* ??: NUL byte to terminate the attachment name&lt;br /&gt;
&lt;br /&gt;
This information is copied from the original patch and describes the content format of field BinaryBucket.&lt;br /&gt;
&lt;br /&gt;
== Flotsam ==&lt;br /&gt;
Use this script if your are using the Flotsam groups.&lt;br /&gt;
&lt;br /&gt;
The Script (Replace ROBUSTDB with your ROBUST database and FLOTSAMDB with your database, containing your Flotsam tables!):&lt;br /&gt;
&amp;lt;source lang=sql&amp;gt;&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_groups`&lt;br /&gt;
(GroupID, Name, Charter, InsigniaID, FounderID, MembershipFee, OpenEnrollment, ShowInList,&lt;br /&gt;
AllowPublish, MaturePublish, OwnerRoleID)&lt;br /&gt;
SELECT GroupID, Name, Charter, InsigniaID, FounderID, MemberShipFee, OpenEnrollment, ShowInList, AllowPublish,&lt;br /&gt;
MaturePublish, OwnerRoleID&lt;br /&gt;
FROM `FLOTSAMDB`.osgroup;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_invites in ROBUST database with values from osgroupinvite&lt;br /&gt;
or FlotSam osgroupinvite*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_invites`&lt;br /&gt;
(InviteID, GroupID, RoleID, PrincipalID, TMStamp)&lt;br /&gt;
SELECT InviteID, GroupID, RoleID, AgentID, TMStamp&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupinvite;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_membership in ROBUST database with values from osgroupmembership&lt;br /&gt;
or FlotSam osgroupmembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_membership`&lt;br /&gt;
(GroupID, PrincipalID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices)&lt;br /&gt;
SELECT GroupID, AgentID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupmembership;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_notices in ROBUST database with values from osgroupnotice&lt;br /&gt;
or FlotSam osgroupnotice*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_notices`&lt;br /&gt;
(GroupID, NoticeID, TMStamp, FromName, Subject, Message)&lt;br /&gt;
SELECT GroupID, NoticeID, Timestamp, FromName, Subject, Message&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupnotice;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_principals in ROBUST database with values from osagent&lt;br /&gt;
or FlotSam osagent*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_principals`&lt;br /&gt;
(PrincipalID, ActiveGroupID)&lt;br /&gt;
SELECT AgentID, ActiveGroupID&lt;br /&gt;
FROM `FLOTSAMDB`.osagent;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_rolemembership in ROBUST database with values from osrolemembership&lt;br /&gt;
or FlotSam osgrouprolemembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_rolemembership&lt;br /&gt;
(GroupID, RoleID, PrincipalID)&lt;br /&gt;
SELECT GroupID, RoleID, AgentID&lt;br /&gt;
FROM `FLOTSAMDB`.osgrouprolemembership;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from osroles&lt;br /&gt;
or FlotSam osrole*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_roles&lt;br /&gt;
(GroupID, RoleID, Name, Description, Title, Powers)&lt;br /&gt;
SELECT GroupID, RoleID, Name, Description, Title, Powers&lt;br /&gt;
FROM `FLOTSAMDB`.osrole;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
== jOpenSim ==&lt;br /&gt;
Use this script if you are using the jOpenSim groups.&lt;br /&gt;
&lt;br /&gt;
The Script (Replace ROBUSTDB with your ROBUST database and FLOTSAMDB with your database, containing your jOpenSim tables!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=sql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/* SQL script to convert group tables from Flotsam Groups (Group database) or jOpenSim (tables in Joomla Database)&lt;br /&gt;
to new V2 groups, which are part of OpenSimulator core up from 0.7.6 branch*/&lt;br /&gt;
&lt;br /&gt;
/* FlotSam Tables latest version from&lt;br /&gt;
https://github.com/mcortez/flotsam/tree/master/flotsam/Servers/XmlRpcGroupsServer/&lt;br /&gt;
Commit-No.: 18275462c9*/&lt;br /&gt;
&lt;br /&gt;
/* jOpenSim Version: 0.2.6.4*/&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_groups in ROBUST database with values from jos_opensim_groups&lt;br /&gt;
or FlotSam osgroup*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_groups`&lt;br /&gt;
(GroupID, Name, Charter, InsigniaID, FounderID, MembershipFee, OpenEnrollment, ShowInList,&lt;br /&gt;
AllowPublish, MaturePublish, OwnerRoleID)&lt;br /&gt;
select GroupID, Name, Charter, InsigniaID, FounderID, MemberShipFee, OpenEnrollment, ShowInList, AllowPublish,&lt;br /&gt;
MaturePublish, OwnerRoleID&lt;br /&gt;
from `FLOTSAMDB`.jos_opensim_group;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_invites in ROBUST database with values from jos_opensim_groupinvite&lt;br /&gt;
or FlotSam osgroupinvite*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_invites`&lt;br /&gt;
(InviteID, GroupID, RoleID, PrincipalID, TMStamp)&lt;br /&gt;
SELECT InviteID, GroupID, RoleID, AgentID, TMStamp&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupinvite;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_membership in ROBUST database with values from jos_opensim_groupmembership&lt;br /&gt;
or FlotSam osgroupmembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_membership`&lt;br /&gt;
(GroupID, PrincipalID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices)&lt;br /&gt;
SELECT GroupID, AgentID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupmembership;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_notices in ROBUST database with values from jos_opensim_groupnotice&lt;br /&gt;
or FlotSam osgroupnotice*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_notices`&lt;br /&gt;
(GroupID, NoticeID, TMStamp, FromName, Subject, Message)&lt;br /&gt;
SELECT GroupID, NoticeID, Timestamp, FromName, Subject, Message&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupnotice;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_principals in ROBUST database with values from jos_opensim_groupactive&lt;br /&gt;
or FlotSam osagent*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_principals`&lt;br /&gt;
(PrincipalID, ActiveGroupID)&lt;br /&gt;
SELECT AgentID, ActiveGroupID&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupactive;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_rolemembership in ROBUST database with values from jos_opensim_grouprolemembership&lt;br /&gt;
or FlotSam osgrouprolemembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_rolemembership&lt;br /&gt;
(GroupID, RoleID, PrincipalID)&lt;br /&gt;
SELECT GroupID, RoleID, AgentID&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_grouprolemembership;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from jos_opensim_grouproles&lt;br /&gt;
or FlotSam osrole*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_roles&lt;br /&gt;
(GroupID, RoleID, Name, Description, Title, Powers)&lt;br /&gt;
SELECT GroupID, RoleID, Name, Description, Title, Powers&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_grouprole;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from jos_opensim_offlinemessages&lt;br /&gt;
--&amp;gt; no corresponding table in FlotSam  --  only applies to jOpenSim*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.im_offline&lt;br /&gt;
(PrincipalID, Message, TMStamp)&lt;br /&gt;
SELECT fromAgentID, Message, sent&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_offlinemessages;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== V2 groups configuration example for robust grid ==&lt;br /&gt;
&lt;br /&gt;
This example file is for V2 groups in grid setup with robust as grid server.&lt;br /&gt;
This configuration options you can find in the opensim.ini file under the section [Groups]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    ;# {Enabled} {} {Enable groups?} {true false} false&lt;br /&gt;
    ;; Enables the groups module&lt;br /&gt;
    &amp;lt;br&amp;gt;'''Enabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {LevelGroupCreate} {Enabled:true} {User level for creating groups} {} 0&lt;br /&gt;
    ;; Minimum user level required to create groups&lt;br /&gt;
    &amp;lt;br&amp;gt;'''LevelGroupCreate = 0'''&lt;br /&gt;
&lt;br /&gt;
    ;# {Module} {Enabled:true} {Groups module to use? (Use GroupsModule to use Flotsam/Simian)} {Default &amp;quot;Groups Module V2&amp;quot;} Default&lt;br /&gt;
    ;; The default module can use a PHP XmlRpc server from the Flotsam project at&lt;br /&gt;
    ;; http://code.google.com/p/flotsam/&lt;br /&gt;
    ;; or from the SimianGrid project at http://code.google.com/p/openmetaverse&lt;br /&gt;
    ; Module = Default&lt;br /&gt;
    ;; or... use Groups Module V2, which works for standalones and robust grids&lt;br /&gt;
    &amp;lt;br&amp;gt;'''Module = &amp;quot;Groups Module V2&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {StorageProvider} {Module:Groups Module V2} {The DLL that provides the storage for V2} {OpenSim.Data.MySQL.dll} &lt;br /&gt;
    &amp;lt;br&amp;gt;'''StorageProvider = OpenSim.Data.MySQL.dll'''&lt;br /&gt;
&lt;br /&gt;
    ;# {ServicesConnectorModule} {Module:GroupsModule Module:Groups Module V2} {Service connector to use for groups} {XmlRpcGroupsServicesConnector SimianGroupsServicesConnector &amp;quot;Groups Local Service Connector&amp;quot; &amp;quot;Groups Remote Service Connector&amp;quot; &amp;quot;Groups HG Service Connector&amp;quot;} XmlRpcGroupsServicesConnector&lt;br /&gt;
    ;; Service connectors to the Groups Service as used in the GroupsModule.  Select one as follows:&lt;br /&gt;
    ;; -- for Flotsam Groups use XmlRpcGroupsServicesConnector&lt;br /&gt;
    ;; -- for Simian Groups use SimianGroupsServicesConnector&lt;br /&gt;
    ;; -- for V2 Groups, standalone, non-HG use &amp;quot;Groups Local Service Connector&amp;quot;&lt;br /&gt;
    ;; -- for V2 Groups, grided sim, non-HG use &amp;quot;Groups Remote Service Connector&amp;quot;&lt;br /&gt;
    ;; -- for V2 Groups, HG, both standalone and grided sim, use &amp;quot;Groups HG Service Connector&amp;quot;&lt;br /&gt;
    ;; Note that the quotes &amp;quot;&amp;quot; around the words are important!&lt;br /&gt;
    ; ServicesConnectorModule = XmlRpcGroupsServicesConnector&lt;br /&gt;
    &amp;lt;br&amp;gt;'''ServicesConnectorModule = &amp;quot;Groups HG Service Connector&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {LocalService} {ServicesConnectorModule:Groups HG Service Connector} {Is the group service in this process or elsewhere?} {local remote} local&lt;br /&gt;
    ;; Used for V2 in HG only. If standalone, set this to local; if grided sim, set this to remote&lt;br /&gt;
    ; LocalService = local&lt;br /&gt;
    &amp;lt;br&amp;gt;'''LocalService = remote'''&lt;br /&gt;
&lt;br /&gt;
    ;# {GroupsServerURI} {Module:GroupsModule (ServicesConnectorModule:Groups Remote Service Connector or (ServicesConnectorModule:Groups HG Service Connector and LocalService:remote))} {Groups Server URI} {}&lt;br /&gt;
    ;; URI for the groups services of this grid&lt;br /&gt;
    ;; e.g. http://yourxmlrpcserver.com/xmlrpc.php for Flotsam XmlRpc&lt;br /&gt;
    ;; or http://mygridserver.com:82/Grid/ for SimianGrid&lt;br /&gt;
    ;; or http:://mygridserver.com:8003 for robust, V2&lt;br /&gt;
    ;; Leave it commented for standalones, V2&lt;br /&gt;
    ; GroupsServerURI = &amp;quot;&amp;quot;&lt;br /&gt;
    &amp;lt;br&amp;gt;'''GroupsServerURI = &amp;quot;http://mygridserver.com:8003&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {HomeURI} {ServicesConnectorModule:Groups HG Service Connector} {What's the home address of this world?} {} &lt;br /&gt;
    ;; Used for V2 in HG only. For example&lt;br /&gt;
    ;; http://mygridserver.com:9000 or http://mygridserver.com:8002&lt;br /&gt;
    ;; If you have this set under [Startup], no need to set it here, leave it commented&lt;br /&gt;
    &amp;lt;br&amp;gt;'''HomeURI = &amp;quot;http://mygridserver.com:8002&amp;quot;''' &lt;br /&gt;
&lt;br /&gt;
    ;# {MessagingEnabled} {Module:GroupsModule Module:Groups Module V2} {Is groups messaging enabled?} {true false} true&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessagingEnabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {MessagingModule} {MessagingEnabled:true} {Module to use for groups messaging} {GroupsMessagingModule &amp;quot;Groups Messaging Module V2&amp;quot;} GroupsMessagingModule&lt;br /&gt;
    ; MessagingModule = GroupsMessagingModule&lt;br /&gt;
    ;; or use V2 for Groups V2&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessagingModule = &amp;quot;Groups Messaging Module V2&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
    ;# {NoticesEnabled} {Module:GroupsModule Module:Groups Module V2} {Enable group notices?} {true false} true&lt;br /&gt;
    ;; Enable Group Notices&lt;br /&gt;
    &amp;lt;br&amp;gt;'''NoticesEnabled = true'''&lt;br /&gt;
&lt;br /&gt;
    ;# {MessageOnlineUsersOnly} {Module:GroupsModule Module} {Message online users only?} {true false} false&lt;br /&gt;
    ; Experimental option to only message online users rather than all users&lt;br /&gt;
    ; Should make large groups with few online members messaging faster, as the expense of more calls to presence service&lt;br /&gt;
    ; Applies Flotsam Group only. V2 has this always on, no other option&lt;br /&gt;
    &amp;lt;br&amp;gt;'''MessageOnlineUsersOnly = True'''&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/V2_Groups</id>
		<title>V2 Groups</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/V2_Groups"/>
				<updated>2013-10-26T12:53:49Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* jOpenSim */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of OpenSimulator 0.7.6 Diva implemented the V2 Groups, which are now part of OpenSimulator core. Using the new groups do not need to use any third Party modules any more.&lt;br /&gt;
&lt;br /&gt;
The below script helps, converting existing Flotsam Groups or jOpenSim Groups (which uses Flotsam anyway) to the new Groups. This ensures, that you dont lose any Group information, when you want to switch over.&lt;br /&gt;
&lt;br /&gt;
== Differences between tables names ==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! jOpenSim&lt;br /&gt;
! Flotsam&lt;br /&gt;
! V2&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupactive&lt;br /&gt;
|osagent&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * ActiveGroupID&lt;br /&gt;
|os_groups_principals&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * ActiveGroupID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_group&lt;br /&gt;
|osgroup&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Charter&lt;br /&gt;
 * InsigniaID&lt;br /&gt;
 * FounderID&lt;br /&gt;
 * MemberShipFee&lt;br /&gt;
 * OpenEnrollment&lt;br /&gt;
 * ShowInList&lt;br /&gt;
 * AllowPublish&lt;br /&gt;
 * MaturePublish&lt;br /&gt;
 * OwnerRoleID&lt;br /&gt;
|os_groups_groups&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Charter&lt;br /&gt;
 * InsigniaID&lt;br /&gt;
 * FounderID&lt;br /&gt;
 * MembershipFee&lt;br /&gt;
 * OpenEnrollment&lt;br /&gt;
 * ShowInList&lt;br /&gt;
 * AllowPublish&lt;br /&gt;
 * MaturePublish&lt;br /&gt;
 * OwnerRoleID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupinvite&lt;br /&gt;
|osgroupinvite&lt;br /&gt;
 * InviteID&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
|os_groups_invites&lt;br /&gt;
 * InviteID&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupmembership&lt;br /&gt;
|osgroupmembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * AgentID&lt;br /&gt;
 * SelectedRoleID&lt;br /&gt;
 * Contribution&lt;br /&gt;
 * ListInProfile&lt;br /&gt;
 * AcceptNotices&lt;br /&gt;
|os_groups_membership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
 * SelectedRoleID&lt;br /&gt;
 * Contribution&lt;br /&gt;
 * ListInProfile&lt;br /&gt;
 * AcceptNotices&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_groupnotice&lt;br /&gt;
|osgroupnotice&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * NoticeID&lt;br /&gt;
 * Timestamp&lt;br /&gt;
 * FromName&lt;br /&gt;
 * Subject&lt;br /&gt;
 * Message&lt;br /&gt;
|os_groups_notices&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * NoticeID&lt;br /&gt;
 * TMStamp&lt;br /&gt;
 * FromName&lt;br /&gt;
 * Subject&lt;br /&gt;
 * Message&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_grouprolemembership&lt;br /&gt;
|osgrouprolemembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * AgentID&lt;br /&gt;
|os_groups_rolemembership&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * PrincipalID&lt;br /&gt;
|-&lt;br /&gt;
|jos_opensim_grouprole&lt;br /&gt;
|osrole&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Description&lt;br /&gt;
 * Title&lt;br /&gt;
 * Powers&lt;br /&gt;
|os_groups_roles&lt;br /&gt;
 * GroupID&lt;br /&gt;
 * RoleID&lt;br /&gt;
 * Name&lt;br /&gt;
 * Description&lt;br /&gt;
 * Title&lt;br /&gt;
 * Powers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
You do not need to consider the field '''BinaryBucket''' in the flotsam table '''osgroupnotice''' as long as you did not apply the patch attached to [http://opensimulator.org/mantis/view.php?id=6699 Mantis #6699]. If you have applied it, then maybe the following information will help, if you do not want to miss the content in the new tables:&lt;br /&gt;
&lt;br /&gt;
Byte offset and description of bucket data:&lt;br /&gt;
&lt;br /&gt;
* 0:  1 byte indicating if attachment is present&lt;br /&gt;
* 1:  1 byte indicating the type of attachment&lt;br /&gt;
* 2:  16 bytes - Group UUID&lt;br /&gt;
* 18: 16 bytes - UUID of the attachment owner&lt;br /&gt;
* 34: 16 bytes - UUID of the attachment&lt;br /&gt;
* 50: variable - Name of the attachment&lt;br /&gt;
* ??: NUL byte to terminate the attachment name&lt;br /&gt;
&lt;br /&gt;
This information is copied from the original patch and describes the content format of field BinaryBucket.&lt;br /&gt;
&lt;br /&gt;
== Flotsam ==&lt;br /&gt;
Use this script if your are using the Flotsam groups.&lt;br /&gt;
&lt;br /&gt;
The Script (Replace ROBUSTDB with your ROBUST database and FLOTSAMDB with your database, containing your Flotsam tables!):&lt;br /&gt;
&amp;lt;source lang=sql&amp;gt;&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_groups`&lt;br /&gt;
(GroupID, Name, Charter, InsigniaID, FounderID, MembershipFee, OpenEnrollment, ShowInList,&lt;br /&gt;
AllowPublish, MaturePublish, OwnerRoleID)&lt;br /&gt;
SELECT GroupID, Name, Charter, InsigniaID, FounderID, MemberShipFee, OpenEnrollment, ShowInList, AllowPublish,&lt;br /&gt;
MaturePublish, OwnerRoleID&lt;br /&gt;
FROM `FLOTSAMDB`.osgroup;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_invites in ROBUST database with values from osgroupinvite&lt;br /&gt;
or FlotSam osgroupinvite*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_invites`&lt;br /&gt;
(InviteID, GroupID, RoleID, PrincipalID, TMStamp)&lt;br /&gt;
SELECT InviteID, GroupID, RoleID, AgentID, TMStamp&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupinvite;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_membership in ROBUST database with values from osgroupmembership&lt;br /&gt;
or FlotSam osgroupmembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_membership`&lt;br /&gt;
(GroupID, PrincipalID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices)&lt;br /&gt;
SELECT GroupID, AgentID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupmembership;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_notices in ROBUST database with values from osgroupnotice&lt;br /&gt;
or FlotSam osgroupnotice*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_notices`&lt;br /&gt;
(GroupID, NoticeID, TMStamp, FromName, Subject, Message)&lt;br /&gt;
SELECT GroupID, NoticeID, Timestamp, FromName, Subject, Message&lt;br /&gt;
FROM `FLOTSAMDB`.osgroupnotice;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_principals in ROBUST database with values from osagent&lt;br /&gt;
or FlotSam osagent*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_principals`&lt;br /&gt;
(PrincipalID, ActiveGroupID)&lt;br /&gt;
SELECT AgentID, ActiveGroupID&lt;br /&gt;
FROM `FLOTSAMDB`.osagent;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_rolemembership in ROBUST database with values from osrolemembership&lt;br /&gt;
or FlotSam osgrouprolemembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_rolemembership&lt;br /&gt;
(GroupID, RoleID, PrincipalID)&lt;br /&gt;
SELECT GroupID, RoleID, AgentID&lt;br /&gt;
FROM `FLOTSAMDB`.osgrouprolemembership;&lt;br /&gt;
 &lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from osroles&lt;br /&gt;
or FlotSam osrole*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_roles&lt;br /&gt;
(GroupID, RoleID, Name, Description, Title, Powers)&lt;br /&gt;
SELECT GroupID, RoleID, Name, Description, Title, Powers&lt;br /&gt;
FROM `FLOTSAMDB`.osrole;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
== jOpenSim ==&lt;br /&gt;
Use this script if you are using the jOpenSim groups.&lt;br /&gt;
&lt;br /&gt;
The Script (Replace ROBUSTDB with your ROBUST database and FLOTSAMDB with your database, containing your jOpenSim tables!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=sql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/* SQL script to convert group tables from Flotsam Groups (Group database) or jOpenSim (tables in Joomla Database)&lt;br /&gt;
to new V2 groups, which are part of OpenSimulator core up from 0.7.6 branch*/&lt;br /&gt;
&lt;br /&gt;
/* FlotSam Tables latest version from&lt;br /&gt;
https://github.com/mcortez/flotsam/tree/master/flotsam/Servers/XmlRpcGroupsServer/&lt;br /&gt;
Commit-No.: 18275462c9*/&lt;br /&gt;
&lt;br /&gt;
/* jOpenSim Version: 0.2.6.4*/&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_groups in ROBUST database with values from jos_opensim_groups&lt;br /&gt;
or FlotSam osgroup*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_groups`&lt;br /&gt;
(GroupID, Name, Charter, InsigniaID, FounderID, MembershipFee, OpenEnrollment, ShowInList,&lt;br /&gt;
AllowPublish, MaturePublish, OwnerRoleID)&lt;br /&gt;
select GroupID, Name, Charter, InsigniaID, FounderID, MemberShipFee, OpenEnrollment, ShowInList, AllowPublish,&lt;br /&gt;
MaturePublish, OwnerRoleID&lt;br /&gt;
from `FLOTSAMDB`.jos_opensim_group;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_invites in ROBUST database with values from jos_opensim_groupinvite&lt;br /&gt;
or FlotSam osgroupinvite*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_invites`&lt;br /&gt;
(InviteID, GroupID, RoleID, PrincipalID, TMStamp)&lt;br /&gt;
SELECT InviteID, GroupID, RoleID, AgentID, TMStamp&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupinvite;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_membership in ROBUST database with values from jos_opensim_groupmembership&lt;br /&gt;
or FlotSam osgroupmembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_membership`&lt;br /&gt;
(GroupID, PrincipalID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices)&lt;br /&gt;
SELECT GroupID, AgentID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupmembership;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_notices in ROBUST database with values from jos_opensim_groupnotice&lt;br /&gt;
or FlotSam osgroupnotice*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_notices`&lt;br /&gt;
(GroupID, NoticeID, TMStamp, FromName, Subject, Message)&lt;br /&gt;
SELECT GroupID, NoticeID, Timestamp, FromName, Subject, Message&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupnotice;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_principals in ROBUST database with values from jos_opensim_groupactive&lt;br /&gt;
or FlotSam osagent*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.`os_groups_principals`&lt;br /&gt;
(PrincipalID, ActiveGroupID)&lt;br /&gt;
SELECT AgentID, ActiveGroupID&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_groupactive;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_rolemembership in ROBUST database with values from jos_opensim_grouprolemembership&lt;br /&gt;
or FlotSam osgrouprolemembership*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_rolemembership&lt;br /&gt;
(GroupID, RoleID, PrincipalID)&lt;br /&gt;
SELECT GroupID, RoleID, AgentID&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_grouprolemembership;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from jos_opensim_grouproles&lt;br /&gt;
or FlotSam osrole*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.os_groups_roles&lt;br /&gt;
(GroupID, RoleID, Name, Description, Title, Powers)&lt;br /&gt;
SELECT GroupID, RoleID, Name, Description, Title, Powers&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_grouprole;&lt;br /&gt;
&lt;br /&gt;
/*fill os_groups_roles in ROBUST database with values from jos_opensim_offlinemessages&lt;br /&gt;
--&amp;gt; no corresponding table in FlotSam  --  only applies to jOpenSim*/&lt;br /&gt;
INSERT INTO `ROBUSTDB`.im_offline&lt;br /&gt;
(PrincipalID, Message, TMStamp)&lt;br /&gt;
SELECT fromAgentID, Message, sent&lt;br /&gt;
FROM `FLOTSAMDB`.jos_opensim_offlinemessages;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== V2 groups configuration example ==&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/RemoteAdmin:admin_create_region</id>
		<title>RemoteAdmin:admin create region</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/RemoteAdmin:admin_create_region"/>
				<updated>2013-08-09T10:48:26Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* PHP */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''admin_create_region''' remotely allows to create a new regions and adds them to an estate. After creation the region is online and available in the map&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Enabling admin create region ===&lt;br /&gt;
If not all functions are enabled, use admin_create_region to enable the function in the [RemoteAdmin] section&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
enabled_methods = admin_create_region,...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
=== Required Parameters ===&lt;br /&gt;
These parameters are required&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;4&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! parameter&lt;br /&gt;
! Description&lt;br /&gt;
! Values&lt;br /&gt;
|-&lt;br /&gt;
| ''region_name''&lt;br /&gt;
| Name of the new region&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ''listen_ip''&lt;br /&gt;
| listen ip to be used by region&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ''listen_port''&lt;br /&gt;
| integer value of port&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ''external_address''&lt;br /&gt;
| external address to be used by the region&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ''region_x''&lt;br /&gt;
| region x location in grid&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ''region_y''&lt;br /&gt;
| region y location in grid&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ''estate_name''&lt;br /&gt;
| estate name that the new region belongs to. Specify estate owner if the estate does not exist yet&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Optional Parameters ===&lt;br /&gt;
These parameters are optional and do not need to be set&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;4&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! parameter&lt;br /&gt;
! Description&lt;br /&gt;
! Values&lt;br /&gt;
|-&lt;br /&gt;
| ''region_id''&lt;br /&gt;
| region uuid to be used for new region&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| estate_owner_uuid&lt;br /&gt;
| estate owner uuid (optionaly use estate_owner_first and estate_owner_last)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ''estate_owner_first''&lt;br /&gt;
| estate owners first name&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ''estate_owner_last'' &lt;br /&gt;
| estate owners last name&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ''persist''&lt;br /&gt;
| saves new region configs to file e.g. region.ini&lt;br /&gt;
| true, false&lt;br /&gt;
|-&lt;br /&gt;
| ''region_file''&lt;br /&gt;
| when using persist you can specify the file to save region configs to (requires ''persist'' to be used)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ''public''&lt;br /&gt;
| enable/disable public access to new region&lt;br /&gt;
| true, false&lt;br /&gt;
|-&lt;br /&gt;
| ''enable_voice''&lt;br /&gt;
| enable/disable voice to new region&lt;br /&gt;
| true, false&lt;br /&gt;
|-&lt;br /&gt;
| ''heightmap_file''&lt;br /&gt;
| load a heightmap file once the new region has been created&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Returned Parameters ==&lt;br /&gt;
=== Returned Parameters ===&lt;br /&gt;
These parameters are returned by Remote Admin&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;4&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! parameter&lt;br /&gt;
! Description&lt;br /&gt;
! Values&lt;br /&gt;
|-&lt;br /&gt;
| ''success''&lt;br /&gt;
| true when successfull&lt;br /&gt;
| true, false&lt;br /&gt;
|-&lt;br /&gt;
|''error''&lt;br /&gt;
| error message when not successfull &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ''region_name''&lt;br /&gt;
| name of the new region&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ''region_uuid''&lt;br /&gt;
| region uuid of the new region&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Error messages ===&lt;br /&gt;
When an error occures the following error value are returned&lt;br /&gt;
&lt;br /&gt;
* cannot instantiate new region, server capacity {MAX REGION LIMIT} already reached; delete regions first&lt;br /&gt;
* region {UUID} already in use by region {REGION NAME}, UUID {REGION UUID}&lt;br /&gt;
* region name already in use by region {REGION NAME}, UUID {REGION UUID}&lt;br /&gt;
* region location &amp;lt;{X},{Y}&amp;gt; already in use by region {REGION NAME}, UUID {REGION UUID}&lt;br /&gt;
* region internal IP {IP} and port {PORT} already in use by {REGION NAME}, UUID {REGION UUID}&lt;br /&gt;
* Invalid location for region file.&lt;br /&gt;
* Specified user was not found.&lt;br /&gt;
* Estate owner details not provided.&lt;br /&gt;
* Failed to join estate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* When adding a region to a existing estate in the estate database, then one does not need to specify the estate owner. If the estate is does not exist or the estate exists with diffrent estate owners, then one has to use the ''estate_owner_uuid'' or ''estate_owner_first'' + ''estate_owner_last''.&lt;br /&gt;
* When using the optional ''persist'' parameter the region configs will be saved to the default region file. You can specify the file using the parameter region_file if you dont want to use the default&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
=== PHP ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
// Including the RemoteAdmin PHP class.&lt;br /&gt;
include('RemoteAdmin.php');&lt;br /&gt;
&lt;br /&gt;
// Instantiate the class with parameters identical to the Python example above&lt;br /&gt;
$myRemoteAdmin = new RemoteAdmin('127.0.0.1', 9000, 'secret');&lt;br /&gt;
&lt;br /&gt;
// Invoke admin_create_region (multiple parameters)&lt;br /&gt;
$parameters = array('region_name' =&amp;gt; 'My Plaza', 'listen_ip' =&amp;gt; '0.0.0.0', 'listen_port' =&amp;gt; '9001', 'region_x' =&amp;gt; '1000', 'region_y' =&amp;gt; '1000', 'estate_name' =&amp;gt; 'My Estate');&lt;br /&gt;
$myRemoteAdmin-&amp;gt;SendCommand('admin_create_region', $parameters);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[RemoteAdmin]]&lt;br /&gt;
[[RemoteAdmin:Commands]]&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/OpenSimSearch</id>
		<title>OpenSimSearch</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/OpenSimSearch"/>
				<updated>2013-04-14T19:09:24Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* How to setup OSS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Quicklinks}}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OpenSimSearch makes it possible to have working Search included in OpenSimulator. At this moment only the Popular Places, Places, Landsales are fully activate, Events works in basic mode, still working on Classifieds and in the future the &amp;quot;New&amp;quot; search that works with HTML pages.&lt;br /&gt;
&lt;br /&gt;
== How to setup OSS ==&lt;br /&gt;
&lt;br /&gt;
* Make sure you have a Apache/PHP/MySQL configuration ready else Search won't work!!&lt;br /&gt;
&lt;br /&gt;
You can grab the latest version of OpenSimSearch through SVN, use the command below and use 'anonymous' as the username and a blank password to checkout the code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
svn checkout http://forge.opensimulator.org/svn/ossearch&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you can find the ossearch code also at [http://forge.opensimulator.org/gf/project/ossearch/ http://forge.opensimulator.org/gf/project/ossearch/]&lt;br /&gt;
&lt;br /&gt;
Note: For Windows users or those who have not used Subversion before, the [http://www.codinghorror.com/blog/2008/04/setting-up-subversion-on-windows.html instructions to set up the TortoiseSVN client on Windows] may be helpful (scroll down for the client part of the instructions). After you've installed TortoiseSVN, then create a directory in the location of your choosing and then right click - choose &amp;quot;SVN Checkout...&amp;quot; - and enter the URL provided above to download the entire package.&lt;br /&gt;
&lt;br /&gt;
==== Using the Binary ====&lt;br /&gt;
&lt;br /&gt;
===== The following parts are for the Grid owner only =====&lt;br /&gt;
&lt;br /&gt;
* In the trunk/bin folder you can find the latest binary release which you can include into your OpenSim.Just grab the 2 binary files and place them in the '''bin''' folder of OpenSimulator.&lt;br /&gt;
&lt;br /&gt;
* Copy all files in the trunk/webroot to your webserver &lt;br /&gt;
&lt;br /&gt;
* Create a new database called '''ossearch'''&lt;br /&gt;
&lt;br /&gt;
* Import the SQL file ossearch.sql into your database &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
mysql --user --password ossearch &amp;lt; ossearch.sql&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Make sure you change the databaseinfo.php file to reflect your settings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=php&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
$DB_HOST = &amp;quot;&amp;lt;servername&amp;gt;&amp;quot;;&lt;br /&gt;
$DB_USER = &amp;quot;&amp;lt;username&amp;gt;&amp;quot;;&lt;br /&gt;
$DB_PASSWORD = &amp;quot;&amp;lt;password&amp;gt;&amp;quot;;&lt;br /&gt;
$DB_NAME = &amp;quot;&amp;lt;database&amp;gt;&amp;quot;;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== The following parts are for the Region owners =====&lt;br /&gt;
&lt;br /&gt;
* In the trunk/bin folder you can find the latest binary release which you can include into your OpenSim.Just grab the 2 binary files and place them in the '''bin''' folder of OpenSimulator.&lt;br /&gt;
&lt;br /&gt;
* Search needs the DataSnapShot module to be activated, here's how to get it activated:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=text&amp;gt;&lt;br /&gt;
[DataSnapshot]&lt;br /&gt;
; The following set of configs pertains to search.&lt;br /&gt;
; Set index_sims to true to enable search engines to index your searchable data&lt;br /&gt;
; If false, no data will be exposed, DataSnapshot module will be off, and you can ignore the rest of &lt;br /&gt;
; these search-related configs&lt;br /&gt;
index_sims = true&lt;br /&gt;
; The variable data_exposure controls what the regions expose:&lt;br /&gt;
; minimum: exposes only things explicitly marked for search&lt;br /&gt;
; all: exposes everything&lt;br /&gt;
data_exposure = minimum&lt;br /&gt;
; If search is on, change this to your grid name; will be ignored for standalones&lt;br /&gt;
gridname = &amp;quot;&amp;lt;yourgridname&amp;gt;&amp;quot;&lt;br /&gt;
; Period between data snapshots, in seconds. 20 minutes, for starters, so that you see the initial changes fast.&lt;br /&gt;
; Later, you may want to increase this to 3600 (1 hour) or more&lt;br /&gt;
default_snapshot_period = 1200&lt;br /&gt;
; This will be created in bin, if it doesn't exist already. It will hold the data snapshots.&lt;br /&gt;
snapshot_cache_directory = &amp;quot;DataSnapshot&amp;quot;&lt;br /&gt;
; This semicolon-separated string serves to notify specific data services about the existence &lt;br /&gt;
; of this sim. Uncomment if you want to index your data with this and/or other search providers.&lt;br /&gt;
data_services=&amp;quot;http://&amp;lt;yourserver&amp;gt;/search/register.php&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add the following 2 lines to your OpenSim.ini file to get Search activated&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[Search]&amp;lt;br /&amp;gt;&lt;br /&gt;
SearchURL = http://gridserver/search/query.php&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== [Grid owners] =====&lt;br /&gt;
&lt;br /&gt;
* Startup your region server and check your MySQL database table '''hostregister''' if the regionserver registered itself. If it registers, that means the DataSnapShot Module is working and you can use Search.&lt;br /&gt;
&lt;br /&gt;
In the trunk/webroot folder there's a file called parser.php. This file is the parser of the info from the DataSnapShot Module. This file needs to be run with cron or some other way. If this file isn't run, the search tables won't be filled and you won't see anything.&lt;br /&gt;
&lt;br /&gt;
To set up a cron job, take a look at this page:&lt;br /&gt;
&lt;br /&gt;
* http://www.linuxhelp.net/guides/cron/&lt;br /&gt;
&lt;br /&gt;
===== [Region owners] =====&lt;br /&gt;
&lt;br /&gt;
* Startup your region server and have the Grid owner check if your region shows up in the MySQL database table '''hostregister'''. When it does, your region now has Search enabled from the Grid&lt;br /&gt;
&lt;br /&gt;
==== Notes for the Grid Owners ====&lt;br /&gt;
&lt;br /&gt;
* If you're a Grid owner, make sure that regionserver can access your Search URL else the Search on those regions will fail.&lt;br /&gt;
&lt;br /&gt;
* Whenever a sim fails, sometimes the user that has set the cron job up will fire off emails to the root user. These emails can be annoying but only give warnings about it working.&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Profile_based_on_mysqli</id>
		<title>Profile based on mysqli</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Profile_based_on_mysqli"/>
				<updated>2013-03-27T13:07:14Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* STEP 2: profile.php */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Quicklinks}}&lt;br /&gt;
&lt;br /&gt;
The OpenProfileModule makes it possible to create your own Profile and see other peoples' Profiles as well.&amp;lt;br&amp;gt;&lt;br /&gt;
This script is useing mysqli that replace the deprecated mysql commands with PHP 5.5.0&lt;br /&gt;
&lt;br /&gt;
=== Disclaimer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Please note that these are third party modules which you use at your own risk!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenSimulator takes no responsibility for these modules.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OpenProfileModule Configuration Steps ===&lt;br /&gt;
The OpenProfileModule is already compiled and ready for use in current versions of OpenSimulator.&lt;br /&gt;
&lt;br /&gt;
However, you will need to setup the &amp;quot;back-end&amp;quot; database and PHP connector scripts to support the OpenProfileModule. &lt;br /&gt;
&lt;br /&gt;
# Upload the profile.sql (below) to your database server&lt;br /&gt;
# Upload the profile.php (below) to your web server&lt;br /&gt;
# Enable the OpenProfileModule in your OpenSim.ini file&lt;br /&gt;
&lt;br /&gt;
=== STEP 1: profile.sql ===&lt;br /&gt;
Save these SQL commands to a profile.sql file on your MySQL database server.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE IF NOT EXISTS `profile_classifieds` &lt;br /&gt;
(&lt;br /&gt;
  &lt;br /&gt;
`classifieduuid` char(36) NOT NULL,&lt;br /&gt;
  `creatoruuid` char(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`creationdate` int(20) NOT NULL,&lt;br /&gt;
  `expirationdate` int(20) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`category` varchar(20) NOT NULL,&lt;br /&gt;
  `name` varchar(255) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`description` text NOT NULL,&lt;br /&gt;
  `parceluuid` char(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`parentestate` int(11) NOT NULL,&lt;br /&gt;
  `snapshotuuid` char(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`simname` varchar(255) NOT NULL,&lt;br /&gt;
  `posglobal` varchar(255) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`parcelname` varchar(255) NOT NULL,&lt;br /&gt;
  `classifiedflags` int(8) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`priceforlisting` int(5) NOT NULL,&lt;br /&gt;
  PRIMARY KEY (`classifieduuid`)&lt;br /&gt;
) ENGINE=MyISAM DEFAULT CHARSET=latin1;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE IF NOT EXISTS `profile_notes` (&lt;br /&gt;
  &lt;br /&gt;
`useruuid` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`targetuuid` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`notes` text NOT NULL,&lt;br /&gt;
  UNIQUE KEY `useruuid` (`useruuid`,`targetuuid`)&lt;br /&gt;
)&lt;br /&gt;
 ENGINE=MyISAM DEFAULT CHARSET=latin1;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE IF NOT EXISTS `profile_picks` (&lt;br /&gt;
  &lt;br /&gt;
`pickuuid` varchar(36) NOT NULL,&lt;br /&gt;
  `creatoruuid` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`toppick` enum('true','false') NOT NULL,&lt;br /&gt;
  `parceluuid` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`name` varchar(255) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`description` text NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`snapshotuuid` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`user` varchar(255) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`originalname` varchar(255) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`simname` varchar(255) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`posglobal` varchar(255) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`sortorder` int(2) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`enabled` enum('true','false') NOT NULL,&lt;br /&gt;
  PRIMARY KEY (`pickuuid`)&lt;br /&gt;
) ENGINE=MyISAM DEFAULT CHARSET=latin1;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE IF NOT EXISTS `profile` (&lt;br /&gt;
  &lt;br /&gt;
`useruuid` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profilePartner` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileAllowPublish` binary(1) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileMaturePublish` binary(1) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileURL` varchar(255) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileWantToMask` int(3) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileWantToText` text NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileSkillsMask` int(3) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileSkillsText` text NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileLanguages` text NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileImage` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileAboutText` text NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileFirstImage` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileFirstText` text NOT NULL,&lt;br /&gt;
  PRIMARY KEY (`useruuid`)&lt;br /&gt;
) &lt;br /&gt;
ENGINE=MyISAM DEFAULT CHARSET=latin1;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE IF NOT EXISTS `profile_settings` (&lt;br /&gt;
  &lt;br /&gt;
`useruuid` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`imviaemail` enum('true','false') NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`visible` enum('true','false') NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`email` varchar(254) NOT NULL,&lt;br /&gt;
  PRIMARY KEY (`useruuid`)&lt;br /&gt;
) ENGINE=MyISAM DEFAULT CHARSET=latin1;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect to your MySQL (Linux commands shown):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mysql --user=$mysqluser --password=$mysqlpassword $databasename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace $mysqluser, $mysqlpassword, and $databasename with your specific configuration.&lt;br /&gt;
&lt;br /&gt;
At the mysql prompt, source the profile.sql file to configure your database to hold additional profile information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; source profile.sql&lt;br /&gt;
... ensure no error messages appear here ...&lt;br /&gt;
mysql&amp;gt; quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 2: profile.php ===&lt;br /&gt;
&lt;br /&gt;
Copy this PHP script to a file called profile.php and edit the following parameters in the script.&amp;lt;br&amp;gt;&lt;br /&gt;
C_DB_HOST, C_DB_DATABASE, C_DB_USER, C_DB_PASS, Add the required data between the &amp;quot;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
C_DB_HOST = the hostname of the server thats running mysql&lt;br /&gt;
C_DB_DATABASE = is the database where the profile tables are stored&lt;br /&gt;
C_DB_USER = database user you are useing for accesing the profile database&lt;br /&gt;
C_DB_PASS = user passwd that belongs to the use that you set in C_DB_USER&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
/* Script based on the code you can find at http://opensimulator.org/wiki/Profile */&lt;br /&gt;
&lt;br /&gt;
define(&amp;quot;C_DB_HOST&amp;quot;      ,&amp;quot;localhost&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_DATABASE&amp;quot;  ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_USER&amp;quot;      ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_PASS&amp;quot;      ,&amp;quot;&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
$zeroUUID = &amp;quot;00000000-0000-0000-0000-000000000000&amp;quot;;&lt;br /&gt;
$xmlrpc_server = xmlrpc_server_create();&lt;br /&gt;
&lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
function openDB($dbHost,$dbUser,$dbPassword,$dbName)&lt;br /&gt;
{&lt;br /&gt;
    /*Open database*/&lt;br /&gt;
    $link = mysqli_connect($dbHost,$dbUser,$dbPassword,$dbName);&lt;br /&gt;
    if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); exit; } &lt;br /&gt;
    mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    return $link;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
function closeDB($link)&lt;br /&gt;
{&lt;br /&gt;
    /*Close database*/&lt;br /&gt;
    mysqli_close($link); &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
function avatarclassifiedsrequest($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
    $uuid           = $req['uuid'];&lt;br /&gt;
 &lt;br /&gt;
    $result = mysqli_query($link,&amp;quot;SELECT * FROM profile_classifieds WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;creatoruuid = '&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    $data = array();&lt;br /&gt;
 &lt;br /&gt;
    while (($row = mysqli_fetch_assoc($result)))&lt;br /&gt;
    {&lt;br /&gt;
        $data[] = array(&lt;br /&gt;
                &amp;quot;classifiedid&amp;quot; =&amp;gt; $row[&amp;quot;classifieduuid&amp;quot;],&lt;br /&gt;
                &amp;quot;name&amp;quot; =&amp;gt; $row[&amp;quot;name&amp;quot;]);&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
  &lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
/* Classifieds Update */&lt;br /&gt;
function classified_update($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
    &lt;br /&gt;
    global $zeroUUID;&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
 &lt;br /&gt;
    $classifieduuid = $req['classifiedUUID'];&lt;br /&gt;
    $creator        = $req['creatorUUID'];&lt;br /&gt;
    $category       = $req['category'];&lt;br /&gt;
    $name           = $req['name'];&lt;br /&gt;
    $description    = $req['description'];&lt;br /&gt;
    $parceluuid     = $req['parcelUUID'];&lt;br /&gt;
    $parentestate   = $req['parentestate'];&lt;br /&gt;
    $snapshotuuid   = $req['snapshotUUID'];&lt;br /&gt;
    $simname        = $req['sim_name'];&lt;br /&gt;
    $globalpos      = $req['globalpos'];&lt;br /&gt;
    $parcelname     = $req['parcelname'];&lt;br /&gt;
    $classifiedflag = $req['classifiedFlags'];&lt;br /&gt;
    $priceforlist   = $req['classifiedPrice'];&lt;br /&gt;
 &lt;br /&gt;
    /* Check if we already have this one in the database */&lt;br /&gt;
    $check = mysqli_query($link,&amp;quot;SELECT COUNT(*) FROM profile_classifieds WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;classifieduuid = '&amp;quot;. mysqli_real_escape_string($link,$classifieduuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    while ($row = mysqli_fetch_row($check))&lt;br /&gt;
    {&lt;br /&gt;
        $ready = $row[0];&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    if ($ready == 0)&lt;br /&gt;
    {&lt;br /&gt;
        /* Doing some late checking */&lt;br /&gt;
        /* Should be done by the module but let's see what happens when */&lt;br /&gt;
        /* I do it here */&lt;br /&gt;
 &lt;br /&gt;
        if($parcelname == &amp;quot;&amp;quot;)&lt;br /&gt;
            $parcelname = &amp;quot;Unknown&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
        if($parceluuid == &amp;quot;&amp;quot;)&lt;br /&gt;
            $parceluuid = $zeroUUID;&lt;br /&gt;
 &lt;br /&gt;
        if($description == &amp;quot;&amp;quot;)&lt;br /&gt;
            $description = &amp;quot;No Description&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
        if($classifiedflag == 2)&lt;br /&gt;
        {&lt;br /&gt;
            $creationdate = time();&lt;br /&gt;
            $expirationdate = time() + (7 * 24 * 60 * 60);&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            $creationdate = time();&lt;br /&gt;
            $expirationdate = time() + (365 * 24 * 60 * 60);&lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
        $insertquery = &amp;quot;INSERT INTO profile_classifieds VALUES &amp;quot;.&lt;br /&gt;
            &amp;quot;('&amp;quot;. mysqli_real_escape_string($link,$classifieduuid) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$creator) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;&amp;quot;. mysqli_real_escape_string($link,$creationdate) .&amp;quot;,&amp;quot;.&lt;br /&gt;
            &amp;quot;&amp;quot;. mysqli_real_escape_string($link,$expirationdate) .&amp;quot;,&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$category) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$name) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$description) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$parceluuid) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;&amp;quot;. mysqli_real_escape_string($link,$parentestate) .&amp;quot;,&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$snapshotuuid) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$simname) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$globalpos) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$parcelname) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;&amp;quot;. mysqli_real_escape_string($link,$classifiedflag) .&amp;quot;,&amp;quot;.&lt;br /&gt;
            &amp;quot;&amp;quot;. mysqli_real_escape_string($link,$priceforlist) .&amp;quot;)&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
        // Create a new record for this classified&lt;br /&gt;
        $result = mysqli_query($link,$insertquery);&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
 &lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
/* Classifieds Delete */&lt;br /&gt;
function classified_delete($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
 &lt;br /&gt;
    $classifieduuid = $req['classifiedID'];&lt;br /&gt;
 &lt;br /&gt;
    $result = mysqli_query($link,&amp;quot;DELETE FROM profile_classifieds WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;classifieduuid = '&amp;quot;.mysqli_real_escape_string($link,$classifieduuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
/* Avatar Picks Request */&lt;br /&gt;
function avatarpicksrequest($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
    $uuid           = $req['uuid'];&lt;br /&gt;
    $data = array();&lt;br /&gt;
    $result = mysqli_query($link,&amp;quot;SELECT `pickuuid`,`name` FROM profile_picks WHERE &amp;quot;. &amp;quot;creatoruuid = '&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    while (($row = mysqli_fetch_assoc($result)))&lt;br /&gt;
    {&lt;br /&gt;
        $data[] = array(&lt;br /&gt;
                &amp;quot;pickid&amp;quot; =&amp;gt; $row[&amp;quot;pickuuid&amp;quot;],&lt;br /&gt;
                &amp;quot;name&amp;quot; =&amp;gt; $row[&amp;quot;name&amp;quot;]);&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
/* Request Picks for User */&lt;br /&gt;
function pickinforequest($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
    $uuid           = $req['avatar_id'];&lt;br /&gt;
    $pick           = $req['pick_id'];&lt;br /&gt;
 &lt;br /&gt;
    $data = array();&lt;br /&gt;
 &lt;br /&gt;
    $result = mysqli_query($link,&amp;quot;SELECT * FROM profile_picks WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;creatoruuid = '&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;' AND &amp;quot;.&lt;br /&gt;
            &amp;quot;pickuuid = '&amp;quot;. mysqli_real_escape_string($link,$pick) .&amp;quot;'&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    $row = mysqli_fetch_assoc($result);&lt;br /&gt;
    if ($row != False)&lt;br /&gt;
    {&lt;br /&gt;
        if ($row[&amp;quot;description&amp;quot;] == null || $row[&amp;quot;description&amp;quot;] == &amp;quot;&amp;quot;)&lt;br /&gt;
            $row[&amp;quot;description&amp;quot;] = &amp;quot;No description given&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
        $data[] = array(&lt;br /&gt;
                &amp;quot;pickuuid&amp;quot; =&amp;gt; $row[&amp;quot;pickuuid&amp;quot;],&lt;br /&gt;
                &amp;quot;creatoruuid&amp;quot; =&amp;gt; $row[&amp;quot;creatoruuid&amp;quot;],&lt;br /&gt;
                &amp;quot;toppick&amp;quot; =&amp;gt; $row[&amp;quot;toppick&amp;quot;],&lt;br /&gt;
                &amp;quot;parceluuid&amp;quot; =&amp;gt; $row[&amp;quot;parceluuid&amp;quot;],&lt;br /&gt;
                &amp;quot;name&amp;quot; =&amp;gt; $row[&amp;quot;name&amp;quot;],&lt;br /&gt;
                &amp;quot;description&amp;quot; =&amp;gt; $row[&amp;quot;description&amp;quot;],&lt;br /&gt;
                &amp;quot;snapshotuuid&amp;quot; =&amp;gt; $row[&amp;quot;snapshotuuid&amp;quot;],&lt;br /&gt;
                &amp;quot;user&amp;quot; =&amp;gt; $row[&amp;quot;user&amp;quot;],&lt;br /&gt;
                &amp;quot;originalname&amp;quot; =&amp;gt; $row[&amp;quot;originalname&amp;quot;],&lt;br /&gt;
                &amp;quot;simname&amp;quot; =&amp;gt; $row[&amp;quot;simname&amp;quot;],&lt;br /&gt;
                &amp;quot;posglobal&amp;quot; =&amp;gt; $row[&amp;quot;posglobal&amp;quot;],&lt;br /&gt;
                &amp;quot;sortorder&amp;quot;=&amp;gt; $row[&amp;quot;sortorder&amp;quot;],&lt;br /&gt;
                &amp;quot;enabled&amp;quot; =&amp;gt; $row[&amp;quot;enabled&amp;quot;]);&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
/* Picks Update */&lt;br /&gt;
function picks_update($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
&lt;br /&gt;
    global $zeroUUID;&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
 &lt;br /&gt;
    $pickuuid       = $req['pick_id'];&lt;br /&gt;
    $creator        = $req['creator_id'];&lt;br /&gt;
    $toppick        = $req['top_pick'];&lt;br /&gt;
    $name           = $req['name'];&lt;br /&gt;
    $description    = $req['desc'];&lt;br /&gt;
    $parceluuid     = $req['parcel_uuid'];&lt;br /&gt;
    $snapshotuuid   = $req['snapshot_id'];&lt;br /&gt;
    $user           = $req['user'];&lt;br /&gt;
    $simname        = $req['sim_name'];&lt;br /&gt;
    $posglobal      = $req['pos_global'];&lt;br /&gt;
    $sortorder      = $req['sort_order'];&lt;br /&gt;
    $enabled        = $req['enabled'];&lt;br /&gt;
 &lt;br /&gt;
    if($parceluuid == &amp;quot;&amp;quot;)&lt;br /&gt;
        $parceluuid = $zeroUUID;&lt;br /&gt;
 &lt;br /&gt;
    if($description == &amp;quot;&amp;quot;)&lt;br /&gt;
        $description = &amp;quot;No Description&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
    /* Check if we already have this one in the database */&lt;br /&gt;
    $check = mysqli_query($link,&amp;quot;SELECT COUNT(*) FROM profile_picks WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;pickuuid = '&amp;quot;. mysqli_real_escape_string($link,$pickuuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    $row = mysqli_fetch_row($check);&lt;br /&gt;
 &lt;br /&gt;
    if ($row[0] == 0)&lt;br /&gt;
    {&lt;br /&gt;
        if($user == null || $user == &amp;quot;&amp;quot;)&lt;br /&gt;
            $user = &amp;quot;Unknown&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
        /* The original parcel name is the same as the name of the */&lt;br /&gt;
        /* profile pick when a new profile pick is being created. */&lt;br /&gt;
        $original = $name;&lt;br /&gt;
 &lt;br /&gt;
        $query = &amp;quot;INSERT INTO profile_picks VALUES &amp;quot;.&lt;br /&gt;
            &amp;quot;('&amp;quot;. mysqli_real_escape_string($link,$pickuuid) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$creator) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$toppick) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$parceluuid) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$name) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$description) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$snapshotuuid) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$user) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$original) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$simname) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$posglobal) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$sortorder) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$enabled) .&amp;quot;')&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        $query = &amp;quot;UPDATE profile_picks SET &amp;quot; .&lt;br /&gt;
            &amp;quot;parceluuid = '&amp;quot;. mysqli_real_escape_string($link,$parceluuid) . &amp;quot;', &amp;quot; .&lt;br /&gt;
            &amp;quot;name = '&amp;quot;. mysqli_real_escape_string($link,$name) . &amp;quot;', &amp;quot; .&lt;br /&gt;
            &amp;quot;description = '&amp;quot;. mysqli_real_escape_string($link,$description) . &amp;quot;', &amp;quot; .&lt;br /&gt;
            &amp;quot;snapshotuuid = '&amp;quot;. mysqli_real_escape_string($link,$snapshotuuid) . &amp;quot;' WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;pickuuid = '&amp;quot;. mysqli_real_escape_string($link,$pickuuid) .&amp;quot;'&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    $result = mysqli_query($link,$query);&lt;br /&gt;
    if ($result != False)&lt;br /&gt;
        $result = True;&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; $result,&lt;br /&gt;
        'errorMessage' =&amp;gt; mysqli_error($link)&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
/* Picks Delete */&lt;br /&gt;
function picks_delete($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
    $pickuuid       = $req['pick_id'];&lt;br /&gt;
 &lt;br /&gt;
    $result = mysqli_query($link,&amp;quot;DELETE FROM profile_picks WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;pickuuid = '&amp;quot;.mysqli_real_escape_string($link,$pickuuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    if ($result != False)&lt;br /&gt;
        $result = True;&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; $result,&lt;br /&gt;
        'errorMessage' =&amp;gt; mysqli_error($link)&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
/* Avatar Notes Request */&lt;br /&gt;
function avatarnotesrequest($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
    $uuid           = $req['avatar_id'];&lt;br /&gt;
    $targetuuid     = $req['uuid'];&lt;br /&gt;
 &lt;br /&gt;
    $result = mysqli_query($link,&amp;quot;SELECT notes FROM profile_notes WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;useruuid = '&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;' AND &amp;quot;.&lt;br /&gt;
            &amp;quot;targetuuid = '&amp;quot;. mysqli_real_escape_string($link,$targetuuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    $row = mysqli_fetch_row($result);&lt;br /&gt;
    if ($row == False)&lt;br /&gt;
        $notes = &amp;quot;&amp;quot;;&lt;br /&gt;
    else&lt;br /&gt;
        $notes = $row[0];&lt;br /&gt;
 &lt;br /&gt;
    $data[] = array(&lt;br /&gt;
            &amp;quot;targetid&amp;quot; =&amp;gt; $targetuuid,&lt;br /&gt;
            &amp;quot;notes&amp;quot; =&amp;gt; $notes);&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
/* Avatar Notes Update */&lt;br /&gt;
function avatar_notes_update($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
    $uuid           = $req['avatar_id'];&lt;br /&gt;
    $targetuuid     = $req['target_id'];&lt;br /&gt;
    $notes          = $req['notes'];&lt;br /&gt;
 &lt;br /&gt;
    /* Check if we already have this one in the database */&lt;br /&gt;
    $check = mysqli_query($link,&amp;quot;SELECT COUNT(*) FROM profile_notes WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;useruuid = '&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;' AND &amp;quot;.&lt;br /&gt;
            &amp;quot;targetuuid = '&amp;quot;. mysqli_real_escape_string($link,$targetuuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    $row = mysqli_fetch_row($check);&lt;br /&gt;
 &lt;br /&gt;
    if ($row[0] == 0)&lt;br /&gt;
    {&lt;br /&gt;
        /* Create a new record for this avatar note */&lt;br /&gt;
        $result = mysqli_query($link,&amp;quot;INSERT INTO profile_notes VALUES &amp;quot;.&lt;br /&gt;
            &amp;quot;('&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$targetuuid) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$notes) .&amp;quot;')&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    else if ($notes == &amp;quot;&amp;quot;)&lt;br /&gt;
    {&lt;br /&gt;
        /* Delete the record for this avatar note */&lt;br /&gt;
        $result = mysqli_query($link,&amp;quot;DELETE FROM profile_notes WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;useruuid = '&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;' AND &amp;quot;.&lt;br /&gt;
            &amp;quot;targetuuid = '&amp;quot;. mysqli_real_escape_string($link,$targetuuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        /* Update the existing record */&lt;br /&gt;
        $result = mysqli_query($link,&amp;quot;UPDATE profile_notes SET &amp;quot;.&lt;br /&gt;
            &amp;quot;notes = '&amp;quot;. mysqli_real_escape_string($link,$notes) .&amp;quot;' WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;useruuid = '&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;' AND &amp;quot;.&lt;br /&gt;
            &amp;quot;targetuuid = '&amp;quot;. mysqli_real_escape_string($link,$targetuuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; $result,&lt;br /&gt;
        'errorMessage' =&amp;gt; mysqli_error($link)&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
/* Profile bits */ &lt;br /&gt;
function avatar_properties_request($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
&lt;br /&gt;
    global $zeroUUID;&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
    $uuid           = $req['avatar_id'];&lt;br /&gt;
 &lt;br /&gt;
    $result = mysqli_query($link,&amp;quot;SELECT * FROM profile WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;useruuid = '&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
    $row = mysqli_fetch_assoc($result);&lt;br /&gt;
 &lt;br /&gt;
    if ($row != False)&lt;br /&gt;
    {&lt;br /&gt;
        $data[] = array(&lt;br /&gt;
                &amp;quot;ProfileUrl&amp;quot; =&amp;gt; $row[&amp;quot;profileURL&amp;quot;],&lt;br /&gt;
                &amp;quot;Image&amp;quot; =&amp;gt; $row[&amp;quot;profileImage&amp;quot;],&lt;br /&gt;
                &amp;quot;AboutText&amp;quot; =&amp;gt; $row[&amp;quot;profileAboutText&amp;quot;],&lt;br /&gt;
                &amp;quot;FirstLifeImage&amp;quot; =&amp;gt; $row[&amp;quot;profileFirstImage&amp;quot;],&lt;br /&gt;
                &amp;quot;FirstLifeAboutText&amp;quot; =&amp;gt; $row[&amp;quot;profileFirstText&amp;quot;],&lt;br /&gt;
                &amp;quot;Partner&amp;quot; =&amp;gt; $row[&amp;quot;profilePartner&amp;quot;],&lt;br /&gt;
 &lt;br /&gt;
                //Return interest data along with avatar properties&lt;br /&gt;
                &amp;quot;wantmask&amp;quot;   =&amp;gt; $row[&amp;quot;profileWantToMask&amp;quot;],&lt;br /&gt;
                &amp;quot;wanttext&amp;quot;   =&amp;gt; $row[&amp;quot;profileWantToText&amp;quot;],&lt;br /&gt;
                &amp;quot;skillsmask&amp;quot; =&amp;gt; $row[&amp;quot;profileSkillsMask&amp;quot;],&lt;br /&gt;
                &amp;quot;skillstext&amp;quot; =&amp;gt; $row[&amp;quot;profileSkillsText&amp;quot;],&lt;br /&gt;
                &amp;quot;languages&amp;quot;  =&amp;gt; $row[&amp;quot;profileLanguages&amp;quot;]);&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        //Insert empty record for avatar.&lt;br /&gt;
        //FIXME: Should this only be done when asking for ones own profile?&lt;br /&gt;
        $sql = &amp;quot;INSERT INTO profile VALUES ( &amp;quot;.&lt;br /&gt;
                &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;', &amp;quot;.&lt;br /&gt;
                &amp;quot;'$zeroUUID', 0, 0, '', 0, '', 0, '', '', &amp;quot;.&lt;br /&gt;
                &amp;quot;'$zeroUUID', '', '$zeroUUID', '')&amp;quot;;&lt;br /&gt;
        $result = mysqli_query($link,$sql);&lt;br /&gt;
 &lt;br /&gt;
        $data[] = array(&lt;br /&gt;
                &amp;quot;ProfileUrl&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;Image&amp;quot; =&amp;gt; $zeroUUID,&lt;br /&gt;
                &amp;quot;AboutText&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;FirstLifeImage&amp;quot; =&amp;gt; $zeroUUID,&lt;br /&gt;
                &amp;quot;FirstLifeAboutText&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;Partner&amp;quot; =&amp;gt; $zeroUUID,&lt;br /&gt;
 &lt;br /&gt;
                &amp;quot;wantmask&amp;quot;   =&amp;gt; 0,&lt;br /&gt;
                &amp;quot;wanttext&amp;quot;   =&amp;gt; &amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;skillsmask&amp;quot; =&amp;gt; 0,&lt;br /&gt;
                &amp;quot;skillstext&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;languages&amp;quot;  =&amp;gt; &amp;quot;&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
function avatar_properties_update($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
    $uuid           = $req['avatar_id'];&lt;br /&gt;
    $profileURL     = $req['ProfileUrl'];&lt;br /&gt;
    $image          = $req['Image'];&lt;br /&gt;
    $abouttext      = $req['AboutText'];&lt;br /&gt;
    $firstlifeimage = $req['FirstLifeImage'];&lt;br /&gt;
    $firstlifetext  = $req['FirstLifeAboutText'];&lt;br /&gt;
 &lt;br /&gt;
    $result=mysqli_query($link,&amp;quot;UPDATE profile SET &amp;quot;.&lt;br /&gt;
            &amp;quot;profileURL='&amp;quot;. mysqli_real_escape_string($link,$profileURL) .&amp;quot;', &amp;quot;.&lt;br /&gt;
            &amp;quot;profileImage='&amp;quot;. mysqli_real_escape_string($link,$image) .&amp;quot;', &amp;quot;.&lt;br /&gt;
            &amp;quot;profileAboutText='&amp;quot;. mysqli_real_escape_string($link,$abouttext) .&amp;quot;', &amp;quot;.&lt;br /&gt;
            &amp;quot;profileFirstImage='&amp;quot;. mysqli_real_escape_string($link,$firstlifeimage) .&amp;quot;', &amp;quot;.&lt;br /&gt;
            &amp;quot;profileFirstText='&amp;quot;. mysqli_real_escape_string($link,$firstlifetext) .&amp;quot;' &amp;quot;.&lt;br /&gt;
            &amp;quot;WHERE useruuid='&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;'&amp;quot;&lt;br /&gt;
        );&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; $result,&lt;br /&gt;
        'errorMessage' =&amp;gt; mysqli_error($link)&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
/* Profile Interests */&lt;br /&gt;
function avatar_interests_update($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
    $uuid           = $req['avatar_id'];&lt;br /&gt;
    $wanttext       = $req['wanttext'];&lt;br /&gt;
    $wantmask       = $req['wantmask'];&lt;br /&gt;
    $skillstext     = $req['skillstext'];&lt;br /&gt;
    $skillsmask     = $req['skillsmask'];&lt;br /&gt;
    $languages      = $req['languages'];&lt;br /&gt;
 &lt;br /&gt;
    $result = mysqli_query($link,&amp;quot;UPDATE profile SET &amp;quot;.&lt;br /&gt;
            &amp;quot;profileWantToMask = &amp;quot;. mysqli_real_escape_string($link,$wantmask) .&amp;quot;,&amp;quot;.&lt;br /&gt;
            &amp;quot;profileWantToText = '&amp;quot;. mysqli_real_escape_string($link,$wanttext) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;profileSkillsMask = &amp;quot;. mysqli_real_escape_string($link,$skillsmask) .&amp;quot;,&amp;quot;.&lt;br /&gt;
            &amp;quot;profileSkillsText = '&amp;quot;. mysqli_real_escape_string($link,$skillstext) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;profileLanguages = '&amp;quot;. mysqli_real_escape_string($link,$languages) .&amp;quot;' &amp;quot;.&lt;br /&gt;
            &amp;quot;WHERE useruuid = '&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;'&amp;quot;&lt;br /&gt;
        );&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
/*-------------------------*/&lt;br /&gt;
/* User Preferences */&lt;br /&gt;
function user_preferences_request($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
    $uuid           = $req['avatar_id'];&lt;br /&gt;
 &lt;br /&gt;
    $result = mysqli_query($link,&amp;quot;SELECT imviaemail,visible,email FROM profile_settings WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;useruuid = '&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    $row = mysqli_fetch_assoc($result);&lt;br /&gt;
 &lt;br /&gt;
    if ($row != False)&lt;br /&gt;
    {&lt;br /&gt;
        $data[] = array(&lt;br /&gt;
                &amp;quot;imviaemail&amp;quot; =&amp;gt; $row[&amp;quot;imviaemail&amp;quot;],&lt;br /&gt;
                &amp;quot;visible&amp;quot; =&amp;gt; $row[&amp;quot;visible&amp;quot;],&lt;br /&gt;
                &amp;quot;email&amp;quot; =&amp;gt; $row[&amp;quot;email&amp;quot;]);&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        //Insert empty record for avatar.&lt;br /&gt;
        //NOTE: The 'false' values here are enums defined in database&lt;br /&gt;
        $sql = &amp;quot;INSERT INTO profile_settings VALUES &amp;quot;.&lt;br /&gt;
                &amp;quot;('&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;', &amp;quot;.&lt;br /&gt;
                &amp;quot;'false', 'false', '')&amp;quot;;&lt;br /&gt;
        $result = mysqli_query($link,$sql);&lt;br /&gt;
 &lt;br /&gt;
        $data[] = array(&lt;br /&gt;
                &amp;quot;imviaemail&amp;quot; =&amp;gt; False,&lt;br /&gt;
                &amp;quot;visible&amp;quot; =&amp;gt; False,&lt;br /&gt;
                &amp;quot;email&amp;quot; =&amp;gt; &amp;quot;&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
function user_preferences_update($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);    &lt;br /&gt;
 &lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
    $uuid           = $req['avatar_id'];&lt;br /&gt;
    $wantim         = $req['imViaEmail'];&lt;br /&gt;
    $directory      = $req['visible'];&lt;br /&gt;
 &lt;br /&gt;
    $result = mysqli_query($link,&amp;quot;UPDATE profile_settings SET &amp;quot;.&lt;br /&gt;
            &amp;quot;imviaemail = '&amp;quot;.mysqli_real_escape_string($link,$wantim) .&amp;quot;', &amp;quot;.&lt;br /&gt;
            &amp;quot;visible = '&amp;quot;.mysqli_real_escape_string($link,$directory) .&amp;quot;' WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;useruuid = '&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
/*-------------------------*/&lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;avatarclassifiedsrequest&amp;quot;,&amp;quot;avatarclassifiedsrequest&amp;quot;);       &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;classified_update&amp;quot;,&amp;quot;classified_update&amp;quot;);             &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;classified_delete&amp;quot;,&amp;quot;classified_delete&amp;quot;);        &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;avatarpicksrequest&amp;quot;, &amp;quot;avatarpicksrequest&amp;quot;);               &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;pickinforequest&amp;quot;,&amp;quot;pickinforequest&amp;quot;);               &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;picks_update&amp;quot;,&amp;quot;picks_update&amp;quot;);              &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;picks_delete&amp;quot;,&amp;quot;picks_delete&amp;quot;);                &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;avatarnotesrequest&amp;quot;,&amp;quot;avatarnotesrequest&amp;quot;);               &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;avatar_notes_update&amp;quot;, &amp;quot;avatar_notes_update&amp;quot;);        &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;avatar_properties_request&amp;quot;,&amp;quot;avatar_properties_request&amp;quot;);        &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;avatar_properties_update&amp;quot;,&amp;quot;avatar_properties_update&amp;quot;);        &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;avatar_interests_update&amp;quot;,&amp;quot;avatar_interests_update&amp;quot;);                   &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;user_preferences_request&amp;quot;,&amp;quot;user_preferences_request&amp;quot;);        &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;user_preferences_update&amp;quot;,&amp;quot;user_preferences_update&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/* Process the request */ &lt;br /&gt;
$request_xml = $HTTP_RAW_POST_DATA;&lt;br /&gt;
xmlrpc_server_call_method($xmlrpc_server, $request_xml, '');&lt;br /&gt;
xmlrpc_server_destroy($xmlrpc_server);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 3: OpenProfileModule ===&lt;br /&gt;
Shutdown your simulator.&lt;br /&gt;
&lt;br /&gt;
Edit the OpenSim.ini [Profile] block.&lt;br /&gt;
&lt;br /&gt;
An example configuration is shown below:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Profile]&lt;br /&gt;
    Module = &amp;quot;OpenProfileModule&amp;quot;&lt;br /&gt;
    ProfileURL = &amp;quot;http://yourwebserverdomainname/pathto/profile.php&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the edits are made, save your OpenSim.ini and restart your simulator. &lt;br /&gt;
&lt;br /&gt;
=== Using the OpenProfileModule ===&lt;br /&gt;
Login to your simulator and try to create your profile.&lt;br /&gt;
&lt;br /&gt;
Check the database profile table to verify whether or not profile.php has written a record there. &lt;br /&gt;
&lt;br /&gt;
P.D: OpenProfileModule only works while you are on your home grid, not when you are connected to other grids over hypergrid.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
Error shown in Apache error_log:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
PHP Fatal error:  Call to undefined function xmlrpc_server_create() in /var/www/html/opensim/profile.php&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cause:&lt;br /&gt;
&amp;lt;pre&amp;gt;Many Linux distributions may not ship with PHP XML RPC extensions.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Steps to Fix:&lt;br /&gt;
* Fedora 17:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# yum install php-xmlrpc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Profile</id>
		<title>Profile</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Profile"/>
				<updated>2013-03-27T13:03:16Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Quicklinks}}&lt;br /&gt;
&lt;br /&gt;
The OpenProfileModule makes it possible to create your own Profile and see other peoples' Profiles as well.&lt;br /&gt;
&lt;br /&gt;
You can find a newer script thats useing mysqli that replace the deprecated mysql commands with PHP 5.5.0 &lt;br /&gt;
[http://opensimulator.org/wiki/Profile_based_on_mysqli here]&lt;br /&gt;
&lt;br /&gt;
=== Disclaimer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Please note that these are third party modules which you use at your own risk!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenSimulator takes no responsibility for these modules.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OpenProfileModule Configuration Steps ===&lt;br /&gt;
The OpenProfileModule is already compiled and ready for use in current versions of OpenSimulator.&lt;br /&gt;
&lt;br /&gt;
However, you will need to setup the &amp;quot;back-end&amp;quot; database and PHP connector scripts to support the OpenProfileModule. &lt;br /&gt;
&lt;br /&gt;
# Upload the profile.sql (below) to your database server&lt;br /&gt;
# Upload the profile.php (below) to your web server&lt;br /&gt;
# Enable the OpenProfileModule in your OpenSim.ini file&lt;br /&gt;
&lt;br /&gt;
=== STEP 1: profile.sql ===&lt;br /&gt;
Save these SQL commands to a profile.sql file on your MySQL database server.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE IF NOT EXISTS `profile_classifieds` &lt;br /&gt;
(&lt;br /&gt;
  &lt;br /&gt;
`classifieduuid` char(36) NOT NULL,&lt;br /&gt;
  `creatoruuid` char(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`creationdate` int(20) NOT NULL,&lt;br /&gt;
  `expirationdate` int(20) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`category` varchar(20) NOT NULL,&lt;br /&gt;
  `name` varchar(255) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`description` text NOT NULL,&lt;br /&gt;
  `parceluuid` char(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`parentestate` int(11) NOT NULL,&lt;br /&gt;
  `snapshotuuid` char(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`simname` varchar(255) NOT NULL,&lt;br /&gt;
  `posglobal` varchar(255) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`parcelname` varchar(255) NOT NULL,&lt;br /&gt;
  `classifiedflags` int(8) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`priceforlisting` int(5) NOT NULL,&lt;br /&gt;
  PRIMARY KEY (`classifieduuid`)&lt;br /&gt;
) ENGINE=MyISAM DEFAULT CHARSET=latin1;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE IF NOT EXISTS `profile_notes` (&lt;br /&gt;
  &lt;br /&gt;
`useruuid` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`targetuuid` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`notes` text NOT NULL,&lt;br /&gt;
  UNIQUE KEY `useruuid` (`useruuid`,`targetuuid`)&lt;br /&gt;
)&lt;br /&gt;
 ENGINE=MyISAM DEFAULT CHARSET=latin1;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE IF NOT EXISTS `profile_picks` (&lt;br /&gt;
  &lt;br /&gt;
`pickuuid` varchar(36) NOT NULL,&lt;br /&gt;
  `creatoruuid` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`toppick` enum('true','false') NOT NULL,&lt;br /&gt;
  `parceluuid` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`name` varchar(255) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`description` text NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`snapshotuuid` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`user` varchar(255) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`originalname` varchar(255) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`simname` varchar(255) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`posglobal` varchar(255) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`sortorder` int(2) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`enabled` enum('true','false') NOT NULL,&lt;br /&gt;
  PRIMARY KEY (`pickuuid`)&lt;br /&gt;
) ENGINE=MyISAM DEFAULT CHARSET=latin1;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE IF NOT EXISTS `profile` (&lt;br /&gt;
  &lt;br /&gt;
`useruuid` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profilePartner` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileAllowPublish` binary(1) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileMaturePublish` binary(1) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileURL` varchar(255) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileWantToMask` int(3) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileWantToText` text NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileSkillsMask` int(3) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileSkillsText` text NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileLanguages` text NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileImage` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileAboutText` text NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileFirstImage` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileFirstText` text NOT NULL,&lt;br /&gt;
  PRIMARY KEY (`useruuid`)&lt;br /&gt;
) &lt;br /&gt;
ENGINE=MyISAM DEFAULT CHARSET=latin1;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE IF NOT EXISTS `profile_settings` (&lt;br /&gt;
  &lt;br /&gt;
`useruuid` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`imviaemail` enum('true','false') NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`visible` enum('true','false') NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`email` varchar(254) NOT NULL,&lt;br /&gt;
  PRIMARY KEY (`useruuid`)&lt;br /&gt;
) ENGINE=MyISAM DEFAULT CHARSET=latin1;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect to your MySQL (Linux commands shown):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mysql --user=$mysqluser --password=$mysqlpassword $databasename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace $mysqluser, $mysqlpassword, and $databasename with your specific configuration.&lt;br /&gt;
&lt;br /&gt;
At the mysql prompt, source the profile.sql file to configure your database to hold additional profile information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; source profile.sql&lt;br /&gt;
... ensure no error messages appear here ...&lt;br /&gt;
mysql&amp;gt; quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 2: profile.php ===&lt;br /&gt;
Copy this PHP script to a file called profile.php and upload the script file to your web server.&lt;br /&gt;
&lt;br /&gt;
Edit the $dbName, $dbHost, $dbUser, and $dbPassword lines at the top of the script to match your database and server information. &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?PHP&lt;br /&gt;
$dbName = &amp;quot;comunity&amp;quot;;&lt;br /&gt;
$dbHost = &amp;quot;localhost&amp;quot;;&lt;br /&gt;
$dbUser = &amp;quot;root&amp;quot;;&lt;br /&gt;
$dbPassword =&amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
mysql_connect ($dbHost,$dbUser,$dbPassword);&lt;br /&gt;
mysql_select_db ($dbName);&lt;br /&gt;
&lt;br /&gt;
$zeroUUID = &amp;quot;00000000-0000-0000-0000-000000000000&amp;quot;;&lt;br /&gt;
$xmlrpc_server = xmlrpc_server_create();&lt;br /&gt;
&lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;avatarclassifiedsrequest&amp;quot;,&lt;br /&gt;
        &amp;quot;avatarclassifiedsrequest&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function avatarclassifiedsrequest($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
&lt;br /&gt;
    $uuid           = $req['uuid'];&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    $result = mysql_query(&amp;quot;SELECT * FROM profile_classifieds WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;creatoruuid = '&amp;quot;. mysql_escape_string($uuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    $data = array();&lt;br /&gt;
&lt;br /&gt;
    while (($row = mysql_fetch_assoc($result)))&lt;br /&gt;
    {&lt;br /&gt;
        $data[] = array(&lt;br /&gt;
                &amp;quot;classifiedid&amp;quot; =&amp;gt; $row[&amp;quot;classifieduuid&amp;quot;],&lt;br /&gt;
                &amp;quot;name&amp;quot; =&amp;gt; $row[&amp;quot;name&amp;quot;]);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
&lt;br /&gt;
    print $response_xml;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Classifieds Update&lt;br /&gt;
&lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;classified_update&amp;quot;,&lt;br /&gt;
        &amp;quot;classified_update&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function classified_update($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    global $zeroUUID;&lt;br /&gt;
&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
&lt;br /&gt;
    $classifieduuid = $req['classifiedUUID'];&lt;br /&gt;
    $creator        = $req['creatorUUID'];&lt;br /&gt;
    $category       = $req['category'];&lt;br /&gt;
    $name           = $req['name'];&lt;br /&gt;
    $description    = $req['description'];&lt;br /&gt;
    $parceluuid     = $req['parcelUUID'];&lt;br /&gt;
    $parentestate   = $req['parentestate'];&lt;br /&gt;
    $snapshotuuid   = $req['snapshotUUID'];&lt;br /&gt;
    $simname        = $req['sim_name'];&lt;br /&gt;
    $globalpos      = $req['globalpos'];&lt;br /&gt;
    $parcelname     = $req['parcelname'];&lt;br /&gt;
    $classifiedflag = $req['classifiedFlags'];&lt;br /&gt;
    $priceforlist   = $req['classifiedPrice'];&lt;br /&gt;
&lt;br /&gt;
    // Check if we already have this one in the database&lt;br /&gt;
    $check = mysql_query(&amp;quot;SELECT COUNT(*) FROM profile_classifieds WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;classifieduuid = '&amp;quot;. mysql_escape_string($classifieduuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    while ($row = mysql_fetch_row($check))&lt;br /&gt;
    {&lt;br /&gt;
        $ready = $row[0];&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if ($ready == 0)&lt;br /&gt;
    {&lt;br /&gt;
        // Doing some late checking&lt;br /&gt;
        // Should be done by the module but let's see what happens when&lt;br /&gt;
        // I do it here&lt;br /&gt;
&lt;br /&gt;
        if($parcelname == &amp;quot;&amp;quot;)&lt;br /&gt;
            $parcelname = &amp;quot;Unknown&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        if($parceluuid == &amp;quot;&amp;quot;)&lt;br /&gt;
            $parceluuid = $zeroUUID;&lt;br /&gt;
&lt;br /&gt;
        if($description == &amp;quot;&amp;quot;)&lt;br /&gt;
            $description = &amp;quot;No Description&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        if($classifiedflag == 2)&lt;br /&gt;
        {&lt;br /&gt;
            $creationdate = time();&lt;br /&gt;
            $expirationdate = time() + (7 * 24 * 60 * 60);&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            $creationdate = time();&lt;br /&gt;
            $expirationdate = time() + (365 * 24 * 60 * 60);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        $insertquery = &amp;quot;INSERT INTO profile_classifieds VALUES &amp;quot;.&lt;br /&gt;
            &amp;quot;('&amp;quot;. mysql_escape_string($classifieduuid) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysql_escape_string($creator) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;&amp;quot;. mysql_escape_string($creationdate) .&amp;quot;,&amp;quot;.&lt;br /&gt;
            &amp;quot;&amp;quot;. mysql_escape_string($expirationdate) .&amp;quot;,&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysql_escape_string($category) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysql_escape_string($name) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysql_escape_string($description) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysql_escape_string($parceluuid) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;&amp;quot;. mysql_escape_string($parentestate) .&amp;quot;,&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysql_escape_string($snapshotuuid) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysql_escape_string($simname) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysql_escape_string($globalpos) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysql_escape_string($parcelname) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;&amp;quot;. mysql_escape_string($classifiedflag) .&amp;quot;,&amp;quot;.&lt;br /&gt;
            &amp;quot;&amp;quot;. mysql_escape_string($priceforlist) .&amp;quot;)&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        // Create a new record for this classified&lt;br /&gt;
        $result = mysql_query($insertquery);&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
&lt;br /&gt;
    print $response_xml;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Classifieds Delete&lt;br /&gt;
&lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;classified_delete&amp;quot;,&lt;br /&gt;
        &amp;quot;classified_delete&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function classified_delete($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
&lt;br /&gt;
    $classifieduuid = $req['classifiedID'];&lt;br /&gt;
&lt;br /&gt;
    $result = mysql_query(&amp;quot;DELETE FROM profile_classifieds WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;classifieduuid = '&amp;quot;.mysql_escape_string($classifieduuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
&lt;br /&gt;
    print $response_xml;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Picks&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# Avatar Picks Request&lt;br /&gt;
&lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;avatarpicksrequest&amp;quot;, &amp;quot;avatarpicksrequest&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function avatarpicksrequest($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
    $uuid           = $req['uuid'];&lt;br /&gt;
    $data = array();&lt;br /&gt;
    $result = mysql_query(&amp;quot;SELECT `pickuuid`,`name` FROM profile_picks WHERE &amp;quot;. &amp;quot;creatoruuid = '&amp;quot;. mysql_escape_string($uuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    while (($row = mysql_fetch_assoc($result)))&lt;br /&gt;
    {&lt;br /&gt;
        $data[] = array(&lt;br /&gt;
                &amp;quot;pickid&amp;quot; =&amp;gt; $row[&amp;quot;pickuuid&amp;quot;],&lt;br /&gt;
                &amp;quot;name&amp;quot; =&amp;gt; $row[&amp;quot;name&amp;quot;]);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
&lt;br /&gt;
    print $response_xml;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Request Picks for User&lt;br /&gt;
&lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;pickinforequest&amp;quot;,&lt;br /&gt;
        &amp;quot;pickinforequest&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function pickinforequest($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
&lt;br /&gt;
    $uuid           = $req['avatar_id'];&lt;br /&gt;
    $pick           = $req['pick_id'];&lt;br /&gt;
&lt;br /&gt;
    $data = array();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    $result = mysql_query(&amp;quot;SELECT * FROM profile_picks WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;creatoruuid = '&amp;quot;. mysql_escape_string($uuid) .&amp;quot;' AND &amp;quot;.&lt;br /&gt;
            &amp;quot;pickuuid = '&amp;quot;. mysql_escape_string($pick) .&amp;quot;'&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    $row = mysql_fetch_assoc($result);&lt;br /&gt;
    if ($row != False)&lt;br /&gt;
    {&lt;br /&gt;
        if ($row[&amp;quot;description&amp;quot;] == null || $row[&amp;quot;description&amp;quot;] == &amp;quot;&amp;quot;)&lt;br /&gt;
            $row[&amp;quot;description&amp;quot;] = &amp;quot;No description given&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        $data[] = array(&lt;br /&gt;
                &amp;quot;pickuuid&amp;quot; =&amp;gt; $row[&amp;quot;pickuuid&amp;quot;],&lt;br /&gt;
                &amp;quot;creatoruuid&amp;quot; =&amp;gt; $row[&amp;quot;creatoruuid&amp;quot;],&lt;br /&gt;
                &amp;quot;toppick&amp;quot; =&amp;gt; $row[&amp;quot;toppick&amp;quot;],&lt;br /&gt;
                &amp;quot;parceluuid&amp;quot; =&amp;gt; $row[&amp;quot;parceluuid&amp;quot;],&lt;br /&gt;
                &amp;quot;name&amp;quot; =&amp;gt; $row[&amp;quot;name&amp;quot;],&lt;br /&gt;
                &amp;quot;description&amp;quot; =&amp;gt; $row[&amp;quot;description&amp;quot;],&lt;br /&gt;
                &amp;quot;snapshotuuid&amp;quot; =&amp;gt; $row[&amp;quot;snapshotuuid&amp;quot;],&lt;br /&gt;
                &amp;quot;user&amp;quot; =&amp;gt; $row[&amp;quot;user&amp;quot;],&lt;br /&gt;
                &amp;quot;originalname&amp;quot; =&amp;gt; $row[&amp;quot;originalname&amp;quot;],&lt;br /&gt;
                &amp;quot;simname&amp;quot; =&amp;gt; $row[&amp;quot;simname&amp;quot;],&lt;br /&gt;
                &amp;quot;posglobal&amp;quot; =&amp;gt; $row[&amp;quot;posglobal&amp;quot;],&lt;br /&gt;
                &amp;quot;sortorder&amp;quot;=&amp;gt; $row[&amp;quot;sortorder&amp;quot;],&lt;br /&gt;
                &amp;quot;enabled&amp;quot; =&amp;gt; $row[&amp;quot;enabled&amp;quot;]);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
&lt;br /&gt;
    print $response_xml;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Picks Update&lt;br /&gt;
&lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;picks_update&amp;quot;,&lt;br /&gt;
        &amp;quot;picks_update&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function picks_update($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    global $zeroUUID;&lt;br /&gt;
&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
&lt;br /&gt;
    $pickuuid       = $req['pick_id'];&lt;br /&gt;
    $creator        = $req['creator_id'];&lt;br /&gt;
    $toppick        = $req['top_pick'];&lt;br /&gt;
    $name           = $req['name'];&lt;br /&gt;
    $description    = $req['desc'];&lt;br /&gt;
    $parceluuid     = $req['parcel_uuid'];&lt;br /&gt;
    $snapshotuuid   = $req['snapshot_id'];&lt;br /&gt;
    $user           = $req['user'];&lt;br /&gt;
    $simname        = $req['sim_name'];&lt;br /&gt;
    $posglobal      = $req['pos_global'];&lt;br /&gt;
    $sortorder      = $req['sort_order'];&lt;br /&gt;
    $enabled        = $req['enabled'];&lt;br /&gt;
&lt;br /&gt;
    if($parceluuid == &amp;quot;&amp;quot;)&lt;br /&gt;
        $parceluuid = $zeroUUID;&lt;br /&gt;
&lt;br /&gt;
    if($description == &amp;quot;&amp;quot;)&lt;br /&gt;
        $description = &amp;quot;No Description&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    // Check if we already have this one in the database&lt;br /&gt;
    $check = mysql_query(&amp;quot;SELECT COUNT(*) FROM profile_picks WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;pickuuid = '&amp;quot;. mysql_escape_string($pickuuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    $row = mysql_fetch_row($check);&lt;br /&gt;
&lt;br /&gt;
    if ($row[0] == 0)&lt;br /&gt;
    {&lt;br /&gt;
        if($user == null || $user == &amp;quot;&amp;quot;)&lt;br /&gt;
            $user = &amp;quot;Unknown&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        //The original parcel name is the same as the name of the&lt;br /&gt;
        //profile pick when a new profile pick is being created.&lt;br /&gt;
        $original = $name;&lt;br /&gt;
&lt;br /&gt;
        $query = &amp;quot;INSERT INTO profile_picks VALUES &amp;quot;.&lt;br /&gt;
            &amp;quot;('&amp;quot;. mysql_escape_string($pickuuid) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysql_escape_string($creator) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysql_escape_string($toppick) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysql_escape_string($parceluuid) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysql_escape_string($name) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysql_escape_string($description) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysql_escape_string($snapshotuuid) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysql_escape_string($user) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysql_escape_string($original) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysql_escape_string($simname) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysql_escape_string($posglobal) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysql_escape_string($sortorder) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysql_escape_string($enabled) .&amp;quot;')&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        $query = &amp;quot;UPDATE profile_picks SET &amp;quot; .&lt;br /&gt;
            &amp;quot;parceluuid = '&amp;quot;. mysql_escape_string($parceluuid) . &amp;quot;', &amp;quot; .&lt;br /&gt;
            &amp;quot;name = '&amp;quot;. mysql_escape_string($name) . &amp;quot;', &amp;quot; .&lt;br /&gt;
            &amp;quot;description = '&amp;quot;. mysql_escape_string($description) . &amp;quot;', &amp;quot; .&lt;br /&gt;
            &amp;quot;snapshotuuid = '&amp;quot;. mysql_escape_string($snapshotuuid) . &amp;quot;' WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;pickuuid = '&amp;quot;. mysql_escape_string($pickuuid) .&amp;quot;'&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    $result = mysql_query($query);&lt;br /&gt;
    if ($result != False)&lt;br /&gt;
        $result = True;&lt;br /&gt;
&lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; $result,&lt;br /&gt;
        'errorMessage' =&amp;gt; mysql_error()&lt;br /&gt;
    ));&lt;br /&gt;
&lt;br /&gt;
    print $response_xml;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Picks Delete&lt;br /&gt;
&lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;picks_delete&amp;quot;,&lt;br /&gt;
        &amp;quot;picks_delete&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function picks_delete($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
&lt;br /&gt;
    $pickuuid       = $req['pick_id'];&lt;br /&gt;
&lt;br /&gt;
    $result = mysql_query(&amp;quot;DELETE FROM profile_picks WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;pickuuid = '&amp;quot;.mysql_escape_string($pickuuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    if ($result != False)&lt;br /&gt;
        $result = True;&lt;br /&gt;
&lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; $result,&lt;br /&gt;
        'errorMessage' =&amp;gt; mysql_error()&lt;br /&gt;
    ));&lt;br /&gt;
&lt;br /&gt;
    print $response_xml;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Notes&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# Avatar Notes Request&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;avatarnotesrequest&amp;quot;,&lt;br /&gt;
        &amp;quot;avatarnotesrequest&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function avatarnotesrequest($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
&lt;br /&gt;
    $uuid           = $req['avatar_id'];&lt;br /&gt;
    $targetuuid     = $req['uuid'];&lt;br /&gt;
&lt;br /&gt;
    $result = mysql_query(&amp;quot;SELECT notes FROM profile_notes WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;useruuid = '&amp;quot;. mysql_escape_string($uuid) .&amp;quot;' AND &amp;quot;.&lt;br /&gt;
            &amp;quot;targetuuid = '&amp;quot;. mysql_escape_string($targetuuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    $row = mysql_fetch_row($result);&lt;br /&gt;
    if ($row == False)&lt;br /&gt;
        $notes = &amp;quot;&amp;quot;;&lt;br /&gt;
    else&lt;br /&gt;
        $notes = $row[0];&lt;br /&gt;
&lt;br /&gt;
    $data[] = array(&lt;br /&gt;
            &amp;quot;targetid&amp;quot; =&amp;gt; $targetuuid,&lt;br /&gt;
            &amp;quot;notes&amp;quot; =&amp;gt; $notes);&lt;br /&gt;
&lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
&lt;br /&gt;
    print $response_xml;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Avatar Notes Update&lt;br /&gt;
&lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;avatar_notes_update&amp;quot;,&lt;br /&gt;
        &amp;quot;avatar_notes_update&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function avatar_notes_update($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
&lt;br /&gt;
    $uuid           = $req['avatar_id'];&lt;br /&gt;
    $targetuuid     = $req['target_id'];&lt;br /&gt;
    $notes          = $req['notes'];&lt;br /&gt;
&lt;br /&gt;
    // Check if we already have this one in the database&lt;br /&gt;
&lt;br /&gt;
    $check = mysql_query(&amp;quot;SELECT COUNT(*) FROM profile_notes WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;useruuid = '&amp;quot;. mysql_escape_string($uuid) .&amp;quot;' AND &amp;quot;.&lt;br /&gt;
            &amp;quot;targetuuid = '&amp;quot;. mysql_escape_string($targetuuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    $row = mysql_fetch_row($check);&lt;br /&gt;
&lt;br /&gt;
    if ($row[0] == 0)&lt;br /&gt;
    {&lt;br /&gt;
        // Create a new record for this avatar note&lt;br /&gt;
        $result = mysql_query(&amp;quot;INSERT INTO profile_notes VALUES &amp;quot;.&lt;br /&gt;
            &amp;quot;('&amp;quot;. mysql_escape_string($uuid) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysql_escape_string($targetuuid) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysql_escape_string($notes) .&amp;quot;')&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    else if ($notes == &amp;quot;&amp;quot;)&lt;br /&gt;
    {&lt;br /&gt;
        // Delete the record for this avatar note&lt;br /&gt;
        $result = mysql_query(&amp;quot;DELETE FROM profile_notes WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;useruuid = '&amp;quot;. mysql_escape_string($uuid) .&amp;quot;' AND &amp;quot;.&lt;br /&gt;
            &amp;quot;targetuuid = '&amp;quot;. mysql_escape_string($targetuuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        // Update the existing record&lt;br /&gt;
        $result = mysql_query(&amp;quot;UPDATE profile_notes SET &amp;quot;.&lt;br /&gt;
            &amp;quot;notes = '&amp;quot;. mysql_escape_string($notes) .&amp;quot;' WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;useruuid = '&amp;quot;. mysql_escape_string($uuid) .&amp;quot;' AND &amp;quot;.&lt;br /&gt;
            &amp;quot;targetuuid = '&amp;quot;. mysql_escape_string($targetuuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; $result,&lt;br /&gt;
        'errorMessage' =&amp;gt; mysql_error()&lt;br /&gt;
    ));&lt;br /&gt;
&lt;br /&gt;
    print $response_xml;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Profile bits&lt;br /&gt;
&lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;avatar_properties_request&amp;quot;,&lt;br /&gt;
        &amp;quot;avatar_properties_request&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function avatar_properties_request($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    global $zeroUUID;&lt;br /&gt;
&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
&lt;br /&gt;
    $uuid           = $req['avatar_id'];&lt;br /&gt;
&lt;br /&gt;
    $result = mysql_query(&amp;quot;SELECT * FROM profile WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;useruuid = '&amp;quot;. mysql_escape_string($uuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
    $row = mysql_fetch_assoc($result);&lt;br /&gt;
&lt;br /&gt;
    if ($row != False)&lt;br /&gt;
    {&lt;br /&gt;
        $data[] = array(&lt;br /&gt;
                &amp;quot;ProfileUrl&amp;quot; =&amp;gt; $row[&amp;quot;profileURL&amp;quot;],&lt;br /&gt;
                &amp;quot;Image&amp;quot; =&amp;gt; $row[&amp;quot;profileImage&amp;quot;],&lt;br /&gt;
                &amp;quot;AboutText&amp;quot; =&amp;gt; $row[&amp;quot;profileAboutText&amp;quot;],&lt;br /&gt;
                &amp;quot;FirstLifeImage&amp;quot; =&amp;gt; $row[&amp;quot;profileFirstImage&amp;quot;],&lt;br /&gt;
                &amp;quot;FirstLifeAboutText&amp;quot; =&amp;gt; $row[&amp;quot;profileFirstText&amp;quot;],&lt;br /&gt;
                &amp;quot;Partner&amp;quot; =&amp;gt; $row[&amp;quot;profilePartner&amp;quot;],&lt;br /&gt;
&lt;br /&gt;
                //Return interest data along with avatar properties&lt;br /&gt;
                &amp;quot;wantmask&amp;quot;   =&amp;gt; $row[&amp;quot;profileWantToMask&amp;quot;],&lt;br /&gt;
                &amp;quot;wanttext&amp;quot;   =&amp;gt; $row[&amp;quot;profileWantToText&amp;quot;],&lt;br /&gt;
                &amp;quot;skillsmask&amp;quot; =&amp;gt; $row[&amp;quot;profileSkillsMask&amp;quot;],&lt;br /&gt;
                &amp;quot;skillstext&amp;quot; =&amp;gt; $row[&amp;quot;profileSkillsText&amp;quot;],&lt;br /&gt;
                &amp;quot;languages&amp;quot;  =&amp;gt; $row[&amp;quot;profileLanguages&amp;quot;]);&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        //Insert empty record for avatar.&lt;br /&gt;
        //FIXME: Should this only be done when asking for ones own profile?&lt;br /&gt;
        $sql = &amp;quot;INSERT INTO profile VALUES ( &amp;quot;.&lt;br /&gt;
                &amp;quot;'&amp;quot;. mysql_escape_string($uuid) .&amp;quot;', &amp;quot;.&lt;br /&gt;
                &amp;quot;'$zeroUUID', 0, 0, '', 0, '', 0, '', '', &amp;quot;.&lt;br /&gt;
                &amp;quot;'$zeroUUID', '', '$zeroUUID', '')&amp;quot;;&lt;br /&gt;
        $result = mysql_query($sql);&lt;br /&gt;
&lt;br /&gt;
        $data[] = array(&lt;br /&gt;
                &amp;quot;ProfileUrl&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;Image&amp;quot; =&amp;gt; $zeroUUID,&lt;br /&gt;
                &amp;quot;AboutText&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;FirstLifeImage&amp;quot; =&amp;gt; $zeroUUID,&lt;br /&gt;
                &amp;quot;FirstLifeAboutText&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;Partner&amp;quot; =&amp;gt; $zeroUUID,&lt;br /&gt;
&lt;br /&gt;
                &amp;quot;wantmask&amp;quot;   =&amp;gt; 0,&lt;br /&gt;
                &amp;quot;wanttext&amp;quot;   =&amp;gt; &amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;skillsmask&amp;quot; =&amp;gt; 0,&lt;br /&gt;
                &amp;quot;skillstext&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;languages&amp;quot;  =&amp;gt; &amp;quot;&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
&lt;br /&gt;
    print $response_xml;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;avatar_properties_update&amp;quot;,&lt;br /&gt;
        &amp;quot;avatar_properties_update&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function avatar_properties_update($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
&lt;br /&gt;
    $uuid           = $req['avatar_id'];&lt;br /&gt;
    $profileURL     = $req['ProfileUrl'];&lt;br /&gt;
    $image          = $req['Image'];&lt;br /&gt;
    $abouttext      = $req['AboutText'];&lt;br /&gt;
    $firstlifeimage = $req['FirstLifeImage'];&lt;br /&gt;
    $firstlifetext  = $req['FirstLifeAboutText'];&lt;br /&gt;
&lt;br /&gt;
    $result=mysql_query(&amp;quot;UPDATE profile SET &amp;quot;.&lt;br /&gt;
            &amp;quot;profileURL='&amp;quot;. mysql_escape_string($profileURL) .&amp;quot;', &amp;quot;.&lt;br /&gt;
            &amp;quot;profileImage='&amp;quot;. mysql_escape_string($image) .&amp;quot;', &amp;quot;.&lt;br /&gt;
            &amp;quot;profileAboutText='&amp;quot;. mysql_escape_string($abouttext) .&amp;quot;', &amp;quot;.&lt;br /&gt;
            &amp;quot;profileFirstImage='&amp;quot;. mysql_escape_string($firstlifeimage) .&amp;quot;', &amp;quot;.&lt;br /&gt;
            &amp;quot;profileFirstText='&amp;quot;. mysql_escape_string($firstlifetext) .&amp;quot;' &amp;quot;.&lt;br /&gt;
            &amp;quot;WHERE useruuid='&amp;quot;. mysql_escape_string($uuid) .&amp;quot;'&amp;quot;&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; $result,&lt;br /&gt;
        'errorMessage' =&amp;gt; mysql_error()&lt;br /&gt;
    ));&lt;br /&gt;
&lt;br /&gt;
    print $response_xml;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Profile Interests&lt;br /&gt;
&lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;avatar_interests_update&amp;quot;,&lt;br /&gt;
        &amp;quot;avatar_interests_update&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function avatar_interests_update($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
&lt;br /&gt;
    $uuid           = $req['avatar_id'];&lt;br /&gt;
    $wanttext       = $req['wanttext'];&lt;br /&gt;
    $wantmask       = $req['wantmask'];&lt;br /&gt;
    $skillstext     = $req['skillstext'];&lt;br /&gt;
    $skillsmask     = $req['skillsmask'];&lt;br /&gt;
    $languages      = $req['languages'];&lt;br /&gt;
&lt;br /&gt;
    $result = mysql_query(&amp;quot;UPDATE profile SET &amp;quot;.&lt;br /&gt;
            &amp;quot;profileWantToMask = &amp;quot;. mysql_escape_string($wantmask) .&amp;quot;,&amp;quot;.&lt;br /&gt;
            &amp;quot;profileWantToText = '&amp;quot;. mysql_escape_string($wanttext) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;profileSkillsMask = &amp;quot;. mysql_escape_string($skillsmask) .&amp;quot;,&amp;quot;.&lt;br /&gt;
            &amp;quot;profileSkillsText = '&amp;quot;. mysql_escape_string($skillstext) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;profileLanguages = '&amp;quot;. mysql_escape_string($languages) .&amp;quot;' &amp;quot;.&lt;br /&gt;
            &amp;quot;WHERE useruuid = '&amp;quot;. mysql_escape_string($uuid) .&amp;quot;'&amp;quot;&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True&lt;br /&gt;
    ));&lt;br /&gt;
&lt;br /&gt;
    print $response_xml;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// User Preferences&lt;br /&gt;
&lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;user_preferences_request&amp;quot;,&lt;br /&gt;
        &amp;quot;user_preferences_request&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function user_preferences_request($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
&lt;br /&gt;
    $uuid           = $req['avatar_id'];&lt;br /&gt;
&lt;br /&gt;
    $result = mysql_query(&amp;quot;SELECT imviaemail,visible,email FROM profile_settings WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;useruuid = '&amp;quot;. mysql_escape_string($uuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    $row = mysql_fetch_assoc($result);&lt;br /&gt;
&lt;br /&gt;
    if ($row != False)&lt;br /&gt;
    {&lt;br /&gt;
        $data[] = array(&lt;br /&gt;
                &amp;quot;imviaemail&amp;quot; =&amp;gt; $row[&amp;quot;imviaemail&amp;quot;],&lt;br /&gt;
                &amp;quot;visible&amp;quot; =&amp;gt; $row[&amp;quot;visible&amp;quot;],&lt;br /&gt;
                &amp;quot;email&amp;quot; =&amp;gt; $row[&amp;quot;email&amp;quot;]);&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        //Insert empty record for avatar.&lt;br /&gt;
        //NOTE: The 'false' values here are enums defined in database&lt;br /&gt;
        $sql = &amp;quot;INSERT INTO profile_settings VALUES &amp;quot;.&lt;br /&gt;
                &amp;quot;('&amp;quot;. mysql_escape_string($uuid) .&amp;quot;', &amp;quot;.&lt;br /&gt;
                &amp;quot;'false', 'false', '')&amp;quot;;&lt;br /&gt;
        $result = mysql_query($sql);&lt;br /&gt;
&lt;br /&gt;
        $data[] = array(&lt;br /&gt;
                &amp;quot;imviaemail&amp;quot; =&amp;gt; False,&lt;br /&gt;
                &amp;quot;visible&amp;quot; =&amp;gt; False,&lt;br /&gt;
                &amp;quot;email&amp;quot; =&amp;gt; &amp;quot;&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
&lt;br /&gt;
    print $response_xml;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;user_preferences_update&amp;quot;,&lt;br /&gt;
        &amp;quot;user_preferences_update&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function user_preferences_update($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
&lt;br /&gt;
    $uuid           = $req['avatar_id'];&lt;br /&gt;
    $wantim         = $req['imViaEmail'];&lt;br /&gt;
    $directory      = $req['visible'];&lt;br /&gt;
&lt;br /&gt;
    $result = mysql_query(&amp;quot;UPDATE profile_settings SET &amp;quot;.&lt;br /&gt;
            &amp;quot;imviaemail = '&amp;quot;.mysql_escape_string($wantim) .&amp;quot;', &amp;quot;.&lt;br /&gt;
            &amp;quot;visible = '&amp;quot;.mysql_escape_string($directory) .&amp;quot;' WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;useruuid = '&amp;quot;. mysql_escape_string($uuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
&lt;br /&gt;
    print $response_xml;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Process the request&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
$request_xml = $HTTP_RAW_POST_DATA;&lt;br /&gt;
xmlrpc_server_call_method($xmlrpc_server, $request_xml, '');&lt;br /&gt;
xmlrpc_server_destroy($xmlrpc_server);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 3: OpenProfileModule ===&lt;br /&gt;
Shutdown your simulator.&lt;br /&gt;
&lt;br /&gt;
Edit the OpenSim.ini [Profile] block.&lt;br /&gt;
&lt;br /&gt;
An example configuration is shown below:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Profile]&lt;br /&gt;
    Module = &amp;quot;OpenProfileModule&amp;quot;&lt;br /&gt;
    ProfileURL = &amp;quot;http://yourwebserverdomainname/pathto/profile.php&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the edits are made, save your OpenSim.ini and restart your simulator. &lt;br /&gt;
&lt;br /&gt;
=== Using the OpenProfileModule ===&lt;br /&gt;
Login to your simulator and try to create your profile.&lt;br /&gt;
&lt;br /&gt;
Check the database profile table to verify whether or not profile.php has written a record there. &lt;br /&gt;
&lt;br /&gt;
P.D: OpenProfileModule only works while you are on your home grid, not when you are connected to other grids over hypergrid.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
Error shown in Apache error_log:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
PHP Fatal error:  Call to undefined function xmlrpc_server_create() in /var/www/html/opensim/profile.php&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cause:&lt;br /&gt;
&amp;lt;pre&amp;gt;Many Linux distributions may not ship with PHP XML RPC extensions.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Steps to Fix:&lt;br /&gt;
* Fedora 17:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# yum install php-xmlrpc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Testing Notes ===&lt;br /&gt;
These steps and configuration tested working on 2013-Jan-13 with:&lt;br /&gt;
* OpenSimulator 0.7.5 r21607 from 2013-Jan-09&lt;br /&gt;
* Nant 0.90&lt;br /&gt;
* Mono 2.10.8&lt;br /&gt;
* MySQL 5.5.28&lt;br /&gt;
* PHP XMLRPC 5.4.10&lt;br /&gt;
* PHP 5.4.1&lt;br /&gt;
* Apache 2.2.22&lt;br /&gt;
* Linux Kernel 3.6.11&lt;br /&gt;
* Fedora Linux 17 (Beefy Miracle)&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Profile_based_on_mysqli</id>
		<title>Profile based on mysqli</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Profile_based_on_mysqli"/>
				<updated>2013-03-27T13:00:40Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: Created page with &amp;quot;__NOTOC__ {{Quicklinks}}  The OpenProfileModule makes it possible to create your own Profile and see other peoples' Profiles as well.&amp;lt;br&amp;gt; This script is useing mysqli that replac...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Quicklinks}}&lt;br /&gt;
&lt;br /&gt;
The OpenProfileModule makes it possible to create your own Profile and see other peoples' Profiles as well.&amp;lt;br&amp;gt;&lt;br /&gt;
This script is useing mysqli that replace the deprecated mysql commands with PHP 5.5.0&lt;br /&gt;
&lt;br /&gt;
=== Disclaimer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Please note that these are third party modules which you use at your own risk!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenSimulator takes no responsibility for these modules.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OpenProfileModule Configuration Steps ===&lt;br /&gt;
The OpenProfileModule is already compiled and ready for use in current versions of OpenSimulator.&lt;br /&gt;
&lt;br /&gt;
However, you will need to setup the &amp;quot;back-end&amp;quot; database and PHP connector scripts to support the OpenProfileModule. &lt;br /&gt;
&lt;br /&gt;
# Upload the profile.sql (below) to your database server&lt;br /&gt;
# Upload the profile.php (below) to your web server&lt;br /&gt;
# Enable the OpenProfileModule in your OpenSim.ini file&lt;br /&gt;
&lt;br /&gt;
=== STEP 1: profile.sql ===&lt;br /&gt;
Save these SQL commands to a profile.sql file on your MySQL database server.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE IF NOT EXISTS `profile_classifieds` &lt;br /&gt;
(&lt;br /&gt;
  &lt;br /&gt;
`classifieduuid` char(36) NOT NULL,&lt;br /&gt;
  `creatoruuid` char(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`creationdate` int(20) NOT NULL,&lt;br /&gt;
  `expirationdate` int(20) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`category` varchar(20) NOT NULL,&lt;br /&gt;
  `name` varchar(255) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`description` text NOT NULL,&lt;br /&gt;
  `parceluuid` char(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`parentestate` int(11) NOT NULL,&lt;br /&gt;
  `snapshotuuid` char(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`simname` varchar(255) NOT NULL,&lt;br /&gt;
  `posglobal` varchar(255) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`parcelname` varchar(255) NOT NULL,&lt;br /&gt;
  `classifiedflags` int(8) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`priceforlisting` int(5) NOT NULL,&lt;br /&gt;
  PRIMARY KEY (`classifieduuid`)&lt;br /&gt;
) ENGINE=MyISAM DEFAULT CHARSET=latin1;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE IF NOT EXISTS `profile_notes` (&lt;br /&gt;
  &lt;br /&gt;
`useruuid` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`targetuuid` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`notes` text NOT NULL,&lt;br /&gt;
  UNIQUE KEY `useruuid` (`useruuid`,`targetuuid`)&lt;br /&gt;
)&lt;br /&gt;
 ENGINE=MyISAM DEFAULT CHARSET=latin1;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE IF NOT EXISTS `profile_picks` (&lt;br /&gt;
  &lt;br /&gt;
`pickuuid` varchar(36) NOT NULL,&lt;br /&gt;
  `creatoruuid` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`toppick` enum('true','false') NOT NULL,&lt;br /&gt;
  `parceluuid` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`name` varchar(255) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`description` text NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`snapshotuuid` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`user` varchar(255) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`originalname` varchar(255) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`simname` varchar(255) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`posglobal` varchar(255) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`sortorder` int(2) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`enabled` enum('true','false') NOT NULL,&lt;br /&gt;
  PRIMARY KEY (`pickuuid`)&lt;br /&gt;
) ENGINE=MyISAM DEFAULT CHARSET=latin1;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE IF NOT EXISTS `profile` (&lt;br /&gt;
  &lt;br /&gt;
`useruuid` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profilePartner` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileAllowPublish` binary(1) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileMaturePublish` binary(1) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileURL` varchar(255) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileWantToMask` int(3) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileWantToText` text NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileSkillsMask` int(3) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileSkillsText` text NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileLanguages` text NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileImage` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileAboutText` text NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileFirstImage` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`profileFirstText` text NOT NULL,&lt;br /&gt;
  PRIMARY KEY (`useruuid`)&lt;br /&gt;
) &lt;br /&gt;
ENGINE=MyISAM DEFAULT CHARSET=latin1;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE IF NOT EXISTS `profile_settings` (&lt;br /&gt;
  &lt;br /&gt;
`useruuid` varchar(36) NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`imviaemail` enum('true','false') NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`visible` enum('true','false') NOT NULL,&lt;br /&gt;
  &lt;br /&gt;
`email` varchar(254) NOT NULL,&lt;br /&gt;
  PRIMARY KEY (`useruuid`)&lt;br /&gt;
) ENGINE=MyISAM DEFAULT CHARSET=latin1;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect to your MySQL (Linux commands shown):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mysql --user=$mysqluser --password=$mysqlpassword $databasename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace $mysqluser, $mysqlpassword, and $databasename with your specific configuration.&lt;br /&gt;
&lt;br /&gt;
At the mysql prompt, source the profile.sql file to configure your database to hold additional profile information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; source profile.sql&lt;br /&gt;
... ensure no error messages appear here ...&lt;br /&gt;
mysql&amp;gt; quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 2: profile.php ===&lt;br /&gt;
&lt;br /&gt;
Copy this PHP script to a file called profile.php and edit the following parameters in the script.&amp;lt;br&amp;gt;&lt;br /&gt;
C_DB_HOST, C_DB_DATABASE, C_DB_USER, C_DB_PASS, Add the required data between the &amp;quot;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
C_DB_HOST = the hostname of the server thats running mysql&lt;br /&gt;
C_DB_DATABASE = is the database where the profile tables are stored&lt;br /&gt;
C_DB_USER = database user you are useing for accesing the profile database&lt;br /&gt;
C_DB_PASS = user passwd that belongs to the use that you set in C_DB_USER&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
/* Script based on the code you can find at http://opensimulator.org/wiki/Profile */&lt;br /&gt;
&lt;br /&gt;
define(&amp;quot;C_DB_HOST&amp;quot;      ,&amp;quot;localhost&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_DATABASE&amp;quot;  ,&amp;quot;userprofiles&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_USER&amp;quot;      ,&amp;quot;profileuser&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_PASS&amp;quot;      ,&amp;quot;#pro4grd#&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_TABLE&amp;quot;     ,&amp;quot;offline&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
$zeroUUID = &amp;quot;00000000-0000-0000-0000-000000000000&amp;quot;;&lt;br /&gt;
$xmlrpc_server = xmlrpc_server_create();&lt;br /&gt;
&lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
function openDB($dbHost,$dbUser,$dbPassword,$dbName)&lt;br /&gt;
{&lt;br /&gt;
    /*Open database*/&lt;br /&gt;
    $link = mysqli_connect($dbHost,$dbUser,$dbPassword,$dbName);&lt;br /&gt;
    if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); exit; } &lt;br /&gt;
    mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    return $link;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
function closeDB($link)&lt;br /&gt;
{&lt;br /&gt;
    /*Close database*/&lt;br /&gt;
    mysqli_close($link); &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
function avatarclassifiedsrequest($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
    $uuid           = $req['uuid'];&lt;br /&gt;
 &lt;br /&gt;
    $result = mysqli_query($link,&amp;quot;SELECT * FROM profile_classifieds WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;creatoruuid = '&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    $data = array();&lt;br /&gt;
 &lt;br /&gt;
    while (($row = mysqli_fetch_assoc($result)))&lt;br /&gt;
    {&lt;br /&gt;
        $data[] = array(&lt;br /&gt;
                &amp;quot;classifiedid&amp;quot; =&amp;gt; $row[&amp;quot;classifieduuid&amp;quot;],&lt;br /&gt;
                &amp;quot;name&amp;quot; =&amp;gt; $row[&amp;quot;name&amp;quot;]);&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
  &lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
/* Classifieds Update */&lt;br /&gt;
function classified_update($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
    &lt;br /&gt;
    global $zeroUUID;&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
 &lt;br /&gt;
    $classifieduuid = $req['classifiedUUID'];&lt;br /&gt;
    $creator        = $req['creatorUUID'];&lt;br /&gt;
    $category       = $req['category'];&lt;br /&gt;
    $name           = $req['name'];&lt;br /&gt;
    $description    = $req['description'];&lt;br /&gt;
    $parceluuid     = $req['parcelUUID'];&lt;br /&gt;
    $parentestate   = $req['parentestate'];&lt;br /&gt;
    $snapshotuuid   = $req['snapshotUUID'];&lt;br /&gt;
    $simname        = $req['sim_name'];&lt;br /&gt;
    $globalpos      = $req['globalpos'];&lt;br /&gt;
    $parcelname     = $req['parcelname'];&lt;br /&gt;
    $classifiedflag = $req['classifiedFlags'];&lt;br /&gt;
    $priceforlist   = $req['classifiedPrice'];&lt;br /&gt;
 &lt;br /&gt;
    /* Check if we already have this one in the database */&lt;br /&gt;
    $check = mysqli_query($link,&amp;quot;SELECT COUNT(*) FROM profile_classifieds WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;classifieduuid = '&amp;quot;. mysqli_real_escape_string($link,$classifieduuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    while ($row = mysqli_fetch_row($check))&lt;br /&gt;
    {&lt;br /&gt;
        $ready = $row[0];&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    if ($ready == 0)&lt;br /&gt;
    {&lt;br /&gt;
        /* Doing some late checking */&lt;br /&gt;
        /* Should be done by the module but let's see what happens when */&lt;br /&gt;
        /* I do it here */&lt;br /&gt;
 &lt;br /&gt;
        if($parcelname == &amp;quot;&amp;quot;)&lt;br /&gt;
            $parcelname = &amp;quot;Unknown&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
        if($parceluuid == &amp;quot;&amp;quot;)&lt;br /&gt;
            $parceluuid = $zeroUUID;&lt;br /&gt;
 &lt;br /&gt;
        if($description == &amp;quot;&amp;quot;)&lt;br /&gt;
            $description = &amp;quot;No Description&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
        if($classifiedflag == 2)&lt;br /&gt;
        {&lt;br /&gt;
            $creationdate = time();&lt;br /&gt;
            $expirationdate = time() + (7 * 24 * 60 * 60);&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            $creationdate = time();&lt;br /&gt;
            $expirationdate = time() + (365 * 24 * 60 * 60);&lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
        $insertquery = &amp;quot;INSERT INTO profile_classifieds VALUES &amp;quot;.&lt;br /&gt;
            &amp;quot;('&amp;quot;. mysqli_real_escape_string($link,$classifieduuid) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$creator) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;&amp;quot;. mysqli_real_escape_string($link,$creationdate) .&amp;quot;,&amp;quot;.&lt;br /&gt;
            &amp;quot;&amp;quot;. mysqli_real_escape_string($link,$expirationdate) .&amp;quot;,&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$category) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$name) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$description) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$parceluuid) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;&amp;quot;. mysqli_real_escape_string($link,$parentestate) .&amp;quot;,&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$snapshotuuid) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$simname) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$globalpos) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$parcelname) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;&amp;quot;. mysqli_real_escape_string($link,$classifiedflag) .&amp;quot;,&amp;quot;.&lt;br /&gt;
            &amp;quot;&amp;quot;. mysqli_real_escape_string($link,$priceforlist) .&amp;quot;)&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
        // Create a new record for this classified&lt;br /&gt;
        $result = mysqli_query($link,$insertquery);&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
 &lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
/* Classifieds Delete */&lt;br /&gt;
function classified_delete($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
 &lt;br /&gt;
    $classifieduuid = $req['classifiedID'];&lt;br /&gt;
 &lt;br /&gt;
    $result = mysqli_query($link,&amp;quot;DELETE FROM profile_classifieds WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;classifieduuid = '&amp;quot;.mysqli_real_escape_string($link,$classifieduuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
/* Avatar Picks Request */&lt;br /&gt;
function avatarpicksrequest($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
    $uuid           = $req['uuid'];&lt;br /&gt;
    $data = array();&lt;br /&gt;
    $result = mysqli_query($link,&amp;quot;SELECT `pickuuid`,`name` FROM profile_picks WHERE &amp;quot;. &amp;quot;creatoruuid = '&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    while (($row = mysqli_fetch_assoc($result)))&lt;br /&gt;
    {&lt;br /&gt;
        $data[] = array(&lt;br /&gt;
                &amp;quot;pickid&amp;quot; =&amp;gt; $row[&amp;quot;pickuuid&amp;quot;],&lt;br /&gt;
                &amp;quot;name&amp;quot; =&amp;gt; $row[&amp;quot;name&amp;quot;]);&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
/* Request Picks for User */&lt;br /&gt;
function pickinforequest($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
    $uuid           = $req['avatar_id'];&lt;br /&gt;
    $pick           = $req['pick_id'];&lt;br /&gt;
 &lt;br /&gt;
    $data = array();&lt;br /&gt;
 &lt;br /&gt;
    $result = mysqli_query($link,&amp;quot;SELECT * FROM profile_picks WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;creatoruuid = '&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;' AND &amp;quot;.&lt;br /&gt;
            &amp;quot;pickuuid = '&amp;quot;. mysqli_real_escape_string($link,$pick) .&amp;quot;'&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    $row = mysqli_fetch_assoc($result);&lt;br /&gt;
    if ($row != False)&lt;br /&gt;
    {&lt;br /&gt;
        if ($row[&amp;quot;description&amp;quot;] == null || $row[&amp;quot;description&amp;quot;] == &amp;quot;&amp;quot;)&lt;br /&gt;
            $row[&amp;quot;description&amp;quot;] = &amp;quot;No description given&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
        $data[] = array(&lt;br /&gt;
                &amp;quot;pickuuid&amp;quot; =&amp;gt; $row[&amp;quot;pickuuid&amp;quot;],&lt;br /&gt;
                &amp;quot;creatoruuid&amp;quot; =&amp;gt; $row[&amp;quot;creatoruuid&amp;quot;],&lt;br /&gt;
                &amp;quot;toppick&amp;quot; =&amp;gt; $row[&amp;quot;toppick&amp;quot;],&lt;br /&gt;
                &amp;quot;parceluuid&amp;quot; =&amp;gt; $row[&amp;quot;parceluuid&amp;quot;],&lt;br /&gt;
                &amp;quot;name&amp;quot; =&amp;gt; $row[&amp;quot;name&amp;quot;],&lt;br /&gt;
                &amp;quot;description&amp;quot; =&amp;gt; $row[&amp;quot;description&amp;quot;],&lt;br /&gt;
                &amp;quot;snapshotuuid&amp;quot; =&amp;gt; $row[&amp;quot;snapshotuuid&amp;quot;],&lt;br /&gt;
                &amp;quot;user&amp;quot; =&amp;gt; $row[&amp;quot;user&amp;quot;],&lt;br /&gt;
                &amp;quot;originalname&amp;quot; =&amp;gt; $row[&amp;quot;originalname&amp;quot;],&lt;br /&gt;
                &amp;quot;simname&amp;quot; =&amp;gt; $row[&amp;quot;simname&amp;quot;],&lt;br /&gt;
                &amp;quot;posglobal&amp;quot; =&amp;gt; $row[&amp;quot;posglobal&amp;quot;],&lt;br /&gt;
                &amp;quot;sortorder&amp;quot;=&amp;gt; $row[&amp;quot;sortorder&amp;quot;],&lt;br /&gt;
                &amp;quot;enabled&amp;quot; =&amp;gt; $row[&amp;quot;enabled&amp;quot;]);&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
/* Picks Update */&lt;br /&gt;
function picks_update($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
&lt;br /&gt;
    global $zeroUUID;&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
 &lt;br /&gt;
    $pickuuid       = $req['pick_id'];&lt;br /&gt;
    $creator        = $req['creator_id'];&lt;br /&gt;
    $toppick        = $req['top_pick'];&lt;br /&gt;
    $name           = $req['name'];&lt;br /&gt;
    $description    = $req['desc'];&lt;br /&gt;
    $parceluuid     = $req['parcel_uuid'];&lt;br /&gt;
    $snapshotuuid   = $req['snapshot_id'];&lt;br /&gt;
    $user           = $req['user'];&lt;br /&gt;
    $simname        = $req['sim_name'];&lt;br /&gt;
    $posglobal      = $req['pos_global'];&lt;br /&gt;
    $sortorder      = $req['sort_order'];&lt;br /&gt;
    $enabled        = $req['enabled'];&lt;br /&gt;
 &lt;br /&gt;
    if($parceluuid == &amp;quot;&amp;quot;)&lt;br /&gt;
        $parceluuid = $zeroUUID;&lt;br /&gt;
 &lt;br /&gt;
    if($description == &amp;quot;&amp;quot;)&lt;br /&gt;
        $description = &amp;quot;No Description&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
    /* Check if we already have this one in the database */&lt;br /&gt;
    $check = mysqli_query($link,&amp;quot;SELECT COUNT(*) FROM profile_picks WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;pickuuid = '&amp;quot;. mysqli_real_escape_string($link,$pickuuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    $row = mysqli_fetch_row($check);&lt;br /&gt;
 &lt;br /&gt;
    if ($row[0] == 0)&lt;br /&gt;
    {&lt;br /&gt;
        if($user == null || $user == &amp;quot;&amp;quot;)&lt;br /&gt;
            $user = &amp;quot;Unknown&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
        /* The original parcel name is the same as the name of the */&lt;br /&gt;
        /* profile pick when a new profile pick is being created. */&lt;br /&gt;
        $original = $name;&lt;br /&gt;
 &lt;br /&gt;
        $query = &amp;quot;INSERT INTO profile_picks VALUES &amp;quot;.&lt;br /&gt;
            &amp;quot;('&amp;quot;. mysqli_real_escape_string($link,$pickuuid) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$creator) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$toppick) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$parceluuid) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$name) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$description) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$snapshotuuid) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$user) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$original) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$simname) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$posglobal) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$sortorder) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$enabled) .&amp;quot;')&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        $query = &amp;quot;UPDATE profile_picks SET &amp;quot; .&lt;br /&gt;
            &amp;quot;parceluuid = '&amp;quot;. mysqli_real_escape_string($link,$parceluuid) . &amp;quot;', &amp;quot; .&lt;br /&gt;
            &amp;quot;name = '&amp;quot;. mysqli_real_escape_string($link,$name) . &amp;quot;', &amp;quot; .&lt;br /&gt;
            &amp;quot;description = '&amp;quot;. mysqli_real_escape_string($link,$description) . &amp;quot;', &amp;quot; .&lt;br /&gt;
            &amp;quot;snapshotuuid = '&amp;quot;. mysqli_real_escape_string($link,$snapshotuuid) . &amp;quot;' WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;pickuuid = '&amp;quot;. mysqli_real_escape_string($link,$pickuuid) .&amp;quot;'&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    $result = mysqli_query($link,$query);&lt;br /&gt;
    if ($result != False)&lt;br /&gt;
        $result = True;&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; $result,&lt;br /&gt;
        'errorMessage' =&amp;gt; mysqli_error($link)&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
/* Picks Delete */&lt;br /&gt;
function picks_delete($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
    $pickuuid       = $req['pick_id'];&lt;br /&gt;
 &lt;br /&gt;
    $result = mysqli_query($link,&amp;quot;DELETE FROM profile_picks WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;pickuuid = '&amp;quot;.mysqli_real_escape_string($link,$pickuuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    if ($result != False)&lt;br /&gt;
        $result = True;&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; $result,&lt;br /&gt;
        'errorMessage' =&amp;gt; mysqli_error($link)&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
/* Avatar Notes Request */&lt;br /&gt;
function avatarnotesrequest($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
    $uuid           = $req['avatar_id'];&lt;br /&gt;
    $targetuuid     = $req['uuid'];&lt;br /&gt;
 &lt;br /&gt;
    $result = mysqli_query($link,&amp;quot;SELECT notes FROM profile_notes WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;useruuid = '&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;' AND &amp;quot;.&lt;br /&gt;
            &amp;quot;targetuuid = '&amp;quot;. mysqli_real_escape_string($link,$targetuuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    $row = mysqli_fetch_row($result);&lt;br /&gt;
    if ($row == False)&lt;br /&gt;
        $notes = &amp;quot;&amp;quot;;&lt;br /&gt;
    else&lt;br /&gt;
        $notes = $row[0];&lt;br /&gt;
 &lt;br /&gt;
    $data[] = array(&lt;br /&gt;
            &amp;quot;targetid&amp;quot; =&amp;gt; $targetuuid,&lt;br /&gt;
            &amp;quot;notes&amp;quot; =&amp;gt; $notes);&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
/* Avatar Notes Update */&lt;br /&gt;
function avatar_notes_update($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
    $uuid           = $req['avatar_id'];&lt;br /&gt;
    $targetuuid     = $req['target_id'];&lt;br /&gt;
    $notes          = $req['notes'];&lt;br /&gt;
 &lt;br /&gt;
    /* Check if we already have this one in the database */&lt;br /&gt;
    $check = mysqli_query($link,&amp;quot;SELECT COUNT(*) FROM profile_notes WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;useruuid = '&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;' AND &amp;quot;.&lt;br /&gt;
            &amp;quot;targetuuid = '&amp;quot;. mysqli_real_escape_string($link,$targetuuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    $row = mysqli_fetch_row($check);&lt;br /&gt;
 &lt;br /&gt;
    if ($row[0] == 0)&lt;br /&gt;
    {&lt;br /&gt;
        /* Create a new record for this avatar note */&lt;br /&gt;
        $result = mysqli_query($link,&amp;quot;INSERT INTO profile_notes VALUES &amp;quot;.&lt;br /&gt;
            &amp;quot;('&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$targetuuid) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$notes) .&amp;quot;')&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    else if ($notes == &amp;quot;&amp;quot;)&lt;br /&gt;
    {&lt;br /&gt;
        /* Delete the record for this avatar note */&lt;br /&gt;
        $result = mysqli_query($link,&amp;quot;DELETE FROM profile_notes WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;useruuid = '&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;' AND &amp;quot;.&lt;br /&gt;
            &amp;quot;targetuuid = '&amp;quot;. mysqli_real_escape_string($link,$targetuuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        /* Update the existing record */&lt;br /&gt;
        $result = mysqli_query($link,&amp;quot;UPDATE profile_notes SET &amp;quot;.&lt;br /&gt;
            &amp;quot;notes = '&amp;quot;. mysqli_real_escape_string($link,$notes) .&amp;quot;' WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;useruuid = '&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;' AND &amp;quot;.&lt;br /&gt;
            &amp;quot;targetuuid = '&amp;quot;. mysqli_real_escape_string($link,$targetuuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; $result,&lt;br /&gt;
        'errorMessage' =&amp;gt; mysqli_error($link)&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
/* Profile bits */ &lt;br /&gt;
function avatar_properties_request($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
&lt;br /&gt;
    global $zeroUUID;&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
    $uuid           = $req['avatar_id'];&lt;br /&gt;
 &lt;br /&gt;
    $result = mysqli_query($link,&amp;quot;SELECT * FROM profile WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;useruuid = '&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
    $row = mysqli_fetch_assoc($result);&lt;br /&gt;
 &lt;br /&gt;
    if ($row != False)&lt;br /&gt;
    {&lt;br /&gt;
        $data[] = array(&lt;br /&gt;
                &amp;quot;ProfileUrl&amp;quot; =&amp;gt; $row[&amp;quot;profileURL&amp;quot;],&lt;br /&gt;
                &amp;quot;Image&amp;quot; =&amp;gt; $row[&amp;quot;profileImage&amp;quot;],&lt;br /&gt;
                &amp;quot;AboutText&amp;quot; =&amp;gt; $row[&amp;quot;profileAboutText&amp;quot;],&lt;br /&gt;
                &amp;quot;FirstLifeImage&amp;quot; =&amp;gt; $row[&amp;quot;profileFirstImage&amp;quot;],&lt;br /&gt;
                &amp;quot;FirstLifeAboutText&amp;quot; =&amp;gt; $row[&amp;quot;profileFirstText&amp;quot;],&lt;br /&gt;
                &amp;quot;Partner&amp;quot; =&amp;gt; $row[&amp;quot;profilePartner&amp;quot;],&lt;br /&gt;
 &lt;br /&gt;
                //Return interest data along with avatar properties&lt;br /&gt;
                &amp;quot;wantmask&amp;quot;   =&amp;gt; $row[&amp;quot;profileWantToMask&amp;quot;],&lt;br /&gt;
                &amp;quot;wanttext&amp;quot;   =&amp;gt; $row[&amp;quot;profileWantToText&amp;quot;],&lt;br /&gt;
                &amp;quot;skillsmask&amp;quot; =&amp;gt; $row[&amp;quot;profileSkillsMask&amp;quot;],&lt;br /&gt;
                &amp;quot;skillstext&amp;quot; =&amp;gt; $row[&amp;quot;profileSkillsText&amp;quot;],&lt;br /&gt;
                &amp;quot;languages&amp;quot;  =&amp;gt; $row[&amp;quot;profileLanguages&amp;quot;]);&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        //Insert empty record for avatar.&lt;br /&gt;
        //FIXME: Should this only be done when asking for ones own profile?&lt;br /&gt;
        $sql = &amp;quot;INSERT INTO profile VALUES ( &amp;quot;.&lt;br /&gt;
                &amp;quot;'&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;', &amp;quot;.&lt;br /&gt;
                &amp;quot;'$zeroUUID', 0, 0, '', 0, '', 0, '', '', &amp;quot;.&lt;br /&gt;
                &amp;quot;'$zeroUUID', '', '$zeroUUID', '')&amp;quot;;&lt;br /&gt;
        $result = mysqli_query($link,$sql);&lt;br /&gt;
 &lt;br /&gt;
        $data[] = array(&lt;br /&gt;
                &amp;quot;ProfileUrl&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;Image&amp;quot; =&amp;gt; $zeroUUID,&lt;br /&gt;
                &amp;quot;AboutText&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;FirstLifeImage&amp;quot; =&amp;gt; $zeroUUID,&lt;br /&gt;
                &amp;quot;FirstLifeAboutText&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;Partner&amp;quot; =&amp;gt; $zeroUUID,&lt;br /&gt;
 &lt;br /&gt;
                &amp;quot;wantmask&amp;quot;   =&amp;gt; 0,&lt;br /&gt;
                &amp;quot;wanttext&amp;quot;   =&amp;gt; &amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;skillsmask&amp;quot; =&amp;gt; 0,&lt;br /&gt;
                &amp;quot;skillstext&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,&lt;br /&gt;
                &amp;quot;languages&amp;quot;  =&amp;gt; &amp;quot;&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
function avatar_properties_update($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
    $uuid           = $req['avatar_id'];&lt;br /&gt;
    $profileURL     = $req['ProfileUrl'];&lt;br /&gt;
    $image          = $req['Image'];&lt;br /&gt;
    $abouttext      = $req['AboutText'];&lt;br /&gt;
    $firstlifeimage = $req['FirstLifeImage'];&lt;br /&gt;
    $firstlifetext  = $req['FirstLifeAboutText'];&lt;br /&gt;
 &lt;br /&gt;
    $result=mysqli_query($link,&amp;quot;UPDATE profile SET &amp;quot;.&lt;br /&gt;
            &amp;quot;profileURL='&amp;quot;. mysqli_real_escape_string($link,$profileURL) .&amp;quot;', &amp;quot;.&lt;br /&gt;
            &amp;quot;profileImage='&amp;quot;. mysqli_real_escape_string($link,$image) .&amp;quot;', &amp;quot;.&lt;br /&gt;
            &amp;quot;profileAboutText='&amp;quot;. mysqli_real_escape_string($link,$abouttext) .&amp;quot;', &amp;quot;.&lt;br /&gt;
            &amp;quot;profileFirstImage='&amp;quot;. mysqli_real_escape_string($link,$firstlifeimage) .&amp;quot;', &amp;quot;.&lt;br /&gt;
            &amp;quot;profileFirstText='&amp;quot;. mysqli_real_escape_string($link,$firstlifetext) .&amp;quot;' &amp;quot;.&lt;br /&gt;
            &amp;quot;WHERE useruuid='&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;'&amp;quot;&lt;br /&gt;
        );&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; $result,&lt;br /&gt;
        'errorMessage' =&amp;gt; mysqli_error($link)&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
/* Profile Interests */&lt;br /&gt;
function avatar_interests_update($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
    $uuid           = $req['avatar_id'];&lt;br /&gt;
    $wanttext       = $req['wanttext'];&lt;br /&gt;
    $wantmask       = $req['wantmask'];&lt;br /&gt;
    $skillstext     = $req['skillstext'];&lt;br /&gt;
    $skillsmask     = $req['skillsmask'];&lt;br /&gt;
    $languages      = $req['languages'];&lt;br /&gt;
 &lt;br /&gt;
    $result = mysqli_query($link,&amp;quot;UPDATE profile SET &amp;quot;.&lt;br /&gt;
            &amp;quot;profileWantToMask = &amp;quot;. mysqli_real_escape_string($link,$wantmask) .&amp;quot;,&amp;quot;.&lt;br /&gt;
            &amp;quot;profileWantToText = '&amp;quot;. mysqli_real_escape_string($link,$wanttext) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;profileSkillsMask = &amp;quot;. mysqli_real_escape_string($link,$skillsmask) .&amp;quot;,&amp;quot;.&lt;br /&gt;
            &amp;quot;profileSkillsText = '&amp;quot;. mysqli_real_escape_string($link,$skillstext) .&amp;quot;',&amp;quot;.&lt;br /&gt;
            &amp;quot;profileLanguages = '&amp;quot;. mysqli_real_escape_string($link,$languages) .&amp;quot;' &amp;quot;.&lt;br /&gt;
            &amp;quot;WHERE useruuid = '&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;'&amp;quot;&lt;br /&gt;
        );&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
/*-------------------------*/&lt;br /&gt;
/* User Preferences */&lt;br /&gt;
function user_preferences_request($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
&lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
    $uuid           = $req['avatar_id'];&lt;br /&gt;
 &lt;br /&gt;
    $result = mysqli_query($link,&amp;quot;SELECT imviaemail,visible,email FROM profile_settings WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;useruuid = '&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    $row = mysqli_fetch_assoc($result);&lt;br /&gt;
 &lt;br /&gt;
    if ($row != False)&lt;br /&gt;
    {&lt;br /&gt;
        $data[] = array(&lt;br /&gt;
                &amp;quot;imviaemail&amp;quot; =&amp;gt; $row[&amp;quot;imviaemail&amp;quot;],&lt;br /&gt;
                &amp;quot;visible&amp;quot; =&amp;gt; $row[&amp;quot;visible&amp;quot;],&lt;br /&gt;
                &amp;quot;email&amp;quot; =&amp;gt; $row[&amp;quot;email&amp;quot;]);&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        //Insert empty record for avatar.&lt;br /&gt;
        //NOTE: The 'false' values here are enums defined in database&lt;br /&gt;
        $sql = &amp;quot;INSERT INTO profile_settings VALUES &amp;quot;.&lt;br /&gt;
                &amp;quot;('&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;', &amp;quot;.&lt;br /&gt;
                &amp;quot;'false', 'false', '')&amp;quot;;&lt;br /&gt;
        $result = mysqli_query($link,$sql);&lt;br /&gt;
 &lt;br /&gt;
        $data[] = array(&lt;br /&gt;
                &amp;quot;imviaemail&amp;quot; =&amp;gt; False,&lt;br /&gt;
                &amp;quot;visible&amp;quot; =&amp;gt; False,&lt;br /&gt;
                &amp;quot;email&amp;quot; =&amp;gt; &amp;quot;&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*-------------------------*/ &lt;br /&gt;
function user_preferences_update($method_name, $params, $app_data)&lt;br /&gt;
{&lt;br /&gt;
    $link=$link=openDB(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);    &lt;br /&gt;
 &lt;br /&gt;
    $req            = $params[0];&lt;br /&gt;
    $uuid           = $req['avatar_id'];&lt;br /&gt;
    $wantim         = $req['imViaEmail'];&lt;br /&gt;
    $directory      = $req['visible'];&lt;br /&gt;
 &lt;br /&gt;
    $result = mysqli_query($link,&amp;quot;UPDATE profile_settings SET &amp;quot;.&lt;br /&gt;
            &amp;quot;imviaemail = '&amp;quot;.mysqli_real_escape_string($link,$wantim) .&amp;quot;', &amp;quot;.&lt;br /&gt;
            &amp;quot;visible = '&amp;quot;.mysqli_real_escape_string($link,$directory) .&amp;quot;' WHERE &amp;quot;.&lt;br /&gt;
            &amp;quot;useruuid = '&amp;quot;. mysqli_real_escape_string($link,$uuid) .&amp;quot;'&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    $response_xml = xmlrpc_encode(array(&lt;br /&gt;
        'success' =&amp;gt; True,&lt;br /&gt;
        'data' =&amp;gt; $data&lt;br /&gt;
    ));&lt;br /&gt;
 &lt;br /&gt;
    print $response_xml;&lt;br /&gt;
    closeDB($link);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
/*-------------------------*/&lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;avatarclassifiedsrequest&amp;quot;,&amp;quot;avatarclassifiedsrequest&amp;quot;);       &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;classified_update&amp;quot;,&amp;quot;classified_update&amp;quot;);             &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;classified_delete&amp;quot;,&amp;quot;classified_delete&amp;quot;);        &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;avatarpicksrequest&amp;quot;, &amp;quot;avatarpicksrequest&amp;quot;);               &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;pickinforequest&amp;quot;,&amp;quot;pickinforequest&amp;quot;);               &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;picks_update&amp;quot;,&amp;quot;picks_update&amp;quot;);              &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;picks_delete&amp;quot;,&amp;quot;picks_delete&amp;quot;);                &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;avatarnotesrequest&amp;quot;,&amp;quot;avatarnotesrequest&amp;quot;);               &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;avatar_notes_update&amp;quot;, &amp;quot;avatar_notes_update&amp;quot;);        &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;avatar_properties_request&amp;quot;,&amp;quot;avatar_properties_request&amp;quot;);        &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;avatar_properties_update&amp;quot;,&amp;quot;avatar_properties_update&amp;quot;);        &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;avatar_interests_update&amp;quot;,&amp;quot;avatar_interests_update&amp;quot;);                   &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;user_preferences_request&amp;quot;,&amp;quot;user_preferences_request&amp;quot;);        &lt;br /&gt;
xmlrpc_server_register_method($xmlrpc_server, &amp;quot;user_preferences_update&amp;quot;,&amp;quot;user_preferences_update&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/* Process the request */ &lt;br /&gt;
$request_xml = $HTTP_RAW_POST_DATA;&lt;br /&gt;
xmlrpc_server_call_method($xmlrpc_server, $request_xml, '');&lt;br /&gt;
xmlrpc_server_destroy($xmlrpc_server);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== STEP 3: OpenProfileModule ===&lt;br /&gt;
Shutdown your simulator.&lt;br /&gt;
&lt;br /&gt;
Edit the OpenSim.ini [Profile] block.&lt;br /&gt;
&lt;br /&gt;
An example configuration is shown below:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Profile]&lt;br /&gt;
    Module = &amp;quot;OpenProfileModule&amp;quot;&lt;br /&gt;
    ProfileURL = &amp;quot;http://yourwebserverdomainname/pathto/profile.php&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the edits are made, save your OpenSim.ini and restart your simulator. &lt;br /&gt;
&lt;br /&gt;
=== Using the OpenProfileModule ===&lt;br /&gt;
Login to your simulator and try to create your profile.&lt;br /&gt;
&lt;br /&gt;
Check the database profile table to verify whether or not profile.php has written a record there. &lt;br /&gt;
&lt;br /&gt;
P.D: OpenProfileModule only works while you are on your home grid, not when you are connected to other grids over hypergrid.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
Error shown in Apache error_log:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
PHP Fatal error:  Call to undefined function xmlrpc_server_create() in /var/www/html/opensim/profile.php&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cause:&lt;br /&gt;
&amp;lt;pre&amp;gt;Many Linux distributions may not ship with PHP XML RPC extensions.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Steps to Fix:&lt;br /&gt;
* Fedora 17:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# yum install php-xmlrpc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli</id>
		<title>Offline Instant Messaging with php Mysqli</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli"/>
				<updated>2013-03-26T13:46:39Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* STEP 1: offline.sql */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Offline Messaging makes it possible to send IM's to people who are not online.&lt;br /&gt;
&lt;br /&gt;
Instead, the messages are saved to a database and delivered the next time the recipient logs in.&lt;br /&gt;
&lt;br /&gt;
=== Disclaimer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Please note that these are third party modules which you use at your own risk!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenSimulator takes no responsibility for these modules.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 1: offline.sql ===&lt;br /&gt;
Save these SQL commands to an offline.sql file on your MySQL server.&amp;lt;br&amp;gt;&lt;br /&gt;
Or copy the sql query to phpmyadmin and after execute the query, go to step 2.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `offline` (&lt;br /&gt;
  `ID` MEDIUMINT NOT NULL AUTO_INCREMENT,&lt;br /&gt;
  `PrincipalID` char(36) NOT NULL DEFAULT '',&lt;br /&gt;
  `Message` text NOT NULL,&lt;br /&gt;
  `TMStamp` INT,&lt;br /&gt;
  PRIMARY KEY  (`ID`),&lt;br /&gt;
  KEY `PrincipalID` (`PrincipalID`)&lt;br /&gt;
) ENGINE=MyISAM; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect to your MySQL (Linux commands shown):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mysql --user=$mysqluser --password=$mysqlpassword $databasename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace $mysqluser, $mysqlpassword, and $databasename with your specific configuration.&lt;br /&gt;
&lt;br /&gt;
At the mysql prompt, source the offline.sql file to configure your database to hold offline IMs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; source offline.sql&lt;br /&gt;
... ensure no error messages appear here ...&lt;br /&gt;
mysql&amp;gt; quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 2: offline.php ===&lt;br /&gt;
Copy this PHP script to a file called offline.php and upload the script file to your web server.&lt;br /&gt;
&lt;br /&gt;
Open the offline.php file to set the following parameters.&amp;lt;br&amp;gt; &lt;br /&gt;
C_DB_HOST, C_DB_DATABASE, C_DB_USER, C_DB_PASS, C_DB_TABLE&amp;lt;br&amp;gt;&lt;br /&gt;
Add the required data between the &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
C_DB_HOST = the hostname of the server thats running mysql&lt;br /&gt;
C_DB_DATABASE = is the database where the offline table is stored&lt;br /&gt;
C_DB_USER = database user you are useing for accesing the offline table&lt;br /&gt;
C_DB_PASS = user passwd that belongs to the use that you set in C_DB_USER&lt;br /&gt;
C_DB_TABLE = table name for offline.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/* Script based on the code you can find at http://opensimulator.org/wiki/Offline_Messaging &lt;br /&gt;
 * @author: Richardus Raymaker -&amp;gt; http:\\www.simsquaremetaverse.nl&lt;br /&gt;
 * @date: 2013-03-23&lt;br /&gt;
 * @date: 2013-03-26 -&amp;gt; Changed way timestamp get stored in the database, change in table structure.&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
define(&amp;quot;C_DB_HOST&amp;quot;      ,&amp;quot;localhost&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_DATABASE&amp;quot;  ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_USER&amp;quot;      ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_PASS&amp;quot;      ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_TABLE&amp;quot;     ,&amp;quot;offline&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/*---*/&lt;br /&gt;
    function SplitIM($httpRaw)&lt;br /&gt;
    {&lt;br /&gt;
        $ImHeaderStartFunc = strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($ImHeaderStartFunc!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $ImHeaderStartFunc+=2;&lt;br /&gt;
            $httpRawFunc = substr($httpRaw,$ImHeaderStartFunc);&lt;br /&gt;
            $ImPartsFunc = preg_split('[&amp;lt;|&amp;gt;]',$httpRaw);&lt;br /&gt;
            &lt;br /&gt;
            return $ImPartsFunc;&lt;br /&gt;
        }    &lt;br /&gt;
    }&lt;br /&gt;
/*---*/&lt;br /&gt;
&lt;br /&gt;
/*----------*/&lt;br /&gt;
if (isset($_SERVER[&amp;quot;PATH_INFO&amp;quot;]))&lt;br /&gt;
{&lt;br /&gt;
    $urlPath = $_SERVER[&amp;quot;PATH_INFO&amp;quot;];&lt;br /&gt;
    $httpRaw = $HTTP_RAW_POST_DATA;&lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/SaveMessage/&amp;quot;)&lt;br /&gt;
    {&lt;br /&gt;
        $start=strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($start!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $httpRaw=substr($httpRaw,$start+2);&lt;br /&gt;
        &lt;br /&gt;
            /*Open offline database*/&lt;br /&gt;
            $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
            if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); exit; } &lt;br /&gt;
            mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
            &lt;br /&gt;
            /*find toAgent UUID*/&lt;br /&gt;
            $ImParts = SplitIM($httpRaw);&lt;br /&gt;
            $toAgentID=$ImParts[array_search(&amp;quot;toAgentID&amp;quot;,$ImParts)+1];&lt;br /&gt;
            $TMStamp=$ImParts[array_search(&amp;quot;timestamp&amp;quot;,$ImParts)+1];&lt;br /&gt;
&lt;br /&gt;
            /* Store messgae in database and inform user the message is saved */&lt;br /&gt;
            mysqli_query($link,&amp;quot;insert into &amp;quot;.C_DB_TABLE.&amp;quot; (PrincipalID, Message, TMStamp) values ('&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$httpRaw). &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$TMStamp) . &amp;quot;')&amp;quot;);&lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;true&amp;lt;/boolean&amp;gt;&amp;quot;;            &lt;br /&gt;
&lt;br /&gt;
            /*Close offline database*/&lt;br /&gt;
            mysqli_close($link);      &lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {   &lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;false&amp;lt;/boolean&amp;gt;&amp;quot;;&lt;br /&gt;
        }    &lt;br /&gt;
        exit;   &lt;br /&gt;
    } &lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/RetrieveMessages/&amp;quot;)&lt;br /&gt;
    { &lt;br /&gt;
        $ImParts = SplitIM($httpRaw);&lt;br /&gt;
        $toAgentID=$ImParts[array_search(&amp;quot;Guid&amp;quot;,$ImParts)+1];&lt;br /&gt;
        &lt;br /&gt;
        /*Open offline database*/&lt;br /&gt;
        $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
        if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); exit; } &lt;br /&gt;
        mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;select Message from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;' ORDER BY ID ASC, TMStamp ASC&amp;quot;);        &lt;br /&gt;
        &lt;br /&gt;
        /* Send offline IM messgaes to user */&lt;br /&gt;
        echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;ArrayOfGridInstantMessage xmlns:xsi=\&amp;quot;http://www.w3.org/2001/XMLSchema-instance\&amp;quot; xmlns:xsd=\&amp;quot;http://www.w3.org/2001/XMLSchema\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        while ($row =  mysqli_fetch_array($queryresult, MYSQL_NUM)) &lt;br /&gt;
        {&lt;br /&gt;
            echo $row[0];&lt;br /&gt;
        }&lt;br /&gt;
        echo &amp;quot;&amp;lt;/ArrayOfGridInstantMessage&amp;gt;&amp;quot;; &lt;br /&gt;
        &lt;br /&gt;
        /* Delete message after send it to user */&lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;delete from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;'&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        /*Close offline database*/&lt;br /&gt;
        mysqli_close($link); &lt;br /&gt;
        &lt;br /&gt;
        exit;          &lt;br /&gt;
    }     &lt;br /&gt;
}  &lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 3: OfflineMessageModule ===&lt;br /&gt;
Shutdown your simulator.&lt;br /&gt;
&lt;br /&gt;
Edit the OpenSim.ini [Messaging] block.&lt;br /&gt;
&lt;br /&gt;
An example configuration is shown below:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Messaging]&lt;br /&gt;
; Control which region module is used for instant messaging.&lt;br /&gt;
; Default is InstantMessageModule (this is the name of the core IM module as well as the setting)&lt;br /&gt;
InstantMessageModule = InstantMessageModule&lt;br /&gt;
; MessageTransferModule = MessageTransferModule&lt;br /&gt;
OfflineMessageModule = OfflineMessageModule&lt;br /&gt;
OfflineMessageURL = http://yourserver/offline.php&lt;br /&gt;
MuteListModule = MuteListModule&lt;br /&gt;
MuteListURL = http://yourserver/mute.php&lt;br /&gt;
ForwardOfflineGroupMessages = true&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
P.D: The MuteListModule and URL must be uncommented in order for the offline module to work, even if there is no mute.php file in the web folder.&lt;br /&gt;
&lt;br /&gt;
Once the edits are made, save your OpenSim.ini and restart your simulator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Using the OfflineMessageModule ===&lt;br /&gt;
&lt;br /&gt;
Login and try to send a message to an offline person.&lt;br /&gt;
You should see the message: &amp;quot;System: User is not logged in. Message saved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you see &amp;quot;Message not saved.&amp;quot; check your web server error log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are using XAMPP or WAMP or other apache based webserver and you get error&lt;br /&gt;
&lt;br /&gt;
messages like, ''File does not exist: /var/www/offline_im/RetrieveMessages/''.&lt;br /&gt;
&lt;br /&gt;
Then you need to enable the ''mod_rewrite.so'' module in apache.&lt;br /&gt;
&lt;br /&gt;
You also need to create .htaccess file that's placed inside the directory where you have also the offline php files.&lt;br /&gt;
&lt;br /&gt;
the .htaccess file would look like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_URI}  &amp;quot;!^/index.php$&amp;quot;&lt;br /&gt;
RewriteRule &amp;quot;^(.*)$&amp;quot; &amp;quot;index.php&amp;quot; [L]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli</id>
		<title>Offline Instant Messaging with php Mysqli</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli"/>
				<updated>2013-03-26T13:46:17Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* STEP 2: offline.php */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Offline Messaging makes it possible to send IM's to people who are not online.&lt;br /&gt;
&lt;br /&gt;
Instead, the messages are saved to a database and delivered the next time the recipient logs in.&lt;br /&gt;
&lt;br /&gt;
=== Disclaimer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Please note that these are third party modules which you use at your own risk!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenSimulator takes no responsibility for these modules.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 1: offline.sql ===&lt;br /&gt;
Save these SQL commands to an offline.sql file on your MySQL server.&amp;lt;br&amp;gt;&lt;br /&gt;
Or copy the sql query to phpmyadmin and after execute the query, go to step 2.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `offline` (&lt;br /&gt;
  `ID` MEDIUMINT NOT NULL AUTO_INCREMENT,&lt;br /&gt;
  `PrincipalID` char(36) NOT NULL DEFAULT '',&lt;br /&gt;
  `Message` text NOT NULL,&lt;br /&gt;
  `TMStamp` char(14) NOT NULL DEFAULT '',&lt;br /&gt;
  PRIMARY KEY  (`ID`),&lt;br /&gt;
  KEY `PrincipalID` (`PrincipalID`)&lt;br /&gt;
) ENGINE=MyISAM;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect to your MySQL (Linux commands shown):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mysql --user=$mysqluser --password=$mysqlpassword $databasename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace $mysqluser, $mysqlpassword, and $databasename with your specific configuration.&lt;br /&gt;
&lt;br /&gt;
At the mysql prompt, source the offline.sql file to configure your database to hold offline IMs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; source offline.sql&lt;br /&gt;
... ensure no error messages appear here ...&lt;br /&gt;
mysql&amp;gt; quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 2: offline.php ===&lt;br /&gt;
Copy this PHP script to a file called offline.php and upload the script file to your web server.&lt;br /&gt;
&lt;br /&gt;
Open the offline.php file to set the following parameters.&amp;lt;br&amp;gt; &lt;br /&gt;
C_DB_HOST, C_DB_DATABASE, C_DB_USER, C_DB_PASS, C_DB_TABLE&amp;lt;br&amp;gt;&lt;br /&gt;
Add the required data between the &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
C_DB_HOST = the hostname of the server thats running mysql&lt;br /&gt;
C_DB_DATABASE = is the database where the offline table is stored&lt;br /&gt;
C_DB_USER = database user you are useing for accesing the offline table&lt;br /&gt;
C_DB_PASS = user passwd that belongs to the use that you set in C_DB_USER&lt;br /&gt;
C_DB_TABLE = table name for offline.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/* Script based on the code you can find at http://opensimulator.org/wiki/Offline_Messaging &lt;br /&gt;
 * @author: Richardus Raymaker -&amp;gt; http:\\www.simsquaremetaverse.nl&lt;br /&gt;
 * @date: 2013-03-23&lt;br /&gt;
 * @date: 2013-03-26 -&amp;gt; Changed way timestamp get stored in the database, change in table structure.&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
define(&amp;quot;C_DB_HOST&amp;quot;      ,&amp;quot;localhost&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_DATABASE&amp;quot;  ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_USER&amp;quot;      ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_PASS&amp;quot;      ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_TABLE&amp;quot;     ,&amp;quot;offline&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/*---*/&lt;br /&gt;
    function SplitIM($httpRaw)&lt;br /&gt;
    {&lt;br /&gt;
        $ImHeaderStartFunc = strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($ImHeaderStartFunc!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $ImHeaderStartFunc+=2;&lt;br /&gt;
            $httpRawFunc = substr($httpRaw,$ImHeaderStartFunc);&lt;br /&gt;
            $ImPartsFunc = preg_split('[&amp;lt;|&amp;gt;]',$httpRaw);&lt;br /&gt;
            &lt;br /&gt;
            return $ImPartsFunc;&lt;br /&gt;
        }    &lt;br /&gt;
    }&lt;br /&gt;
/*---*/&lt;br /&gt;
&lt;br /&gt;
/*----------*/&lt;br /&gt;
if (isset($_SERVER[&amp;quot;PATH_INFO&amp;quot;]))&lt;br /&gt;
{&lt;br /&gt;
    $urlPath = $_SERVER[&amp;quot;PATH_INFO&amp;quot;];&lt;br /&gt;
    $httpRaw = $HTTP_RAW_POST_DATA;&lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/SaveMessage/&amp;quot;)&lt;br /&gt;
    {&lt;br /&gt;
        $start=strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($start!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $httpRaw=substr($httpRaw,$start+2);&lt;br /&gt;
        &lt;br /&gt;
            /*Open offline database*/&lt;br /&gt;
            $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
            if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); exit; } &lt;br /&gt;
            mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
            &lt;br /&gt;
            /*find toAgent UUID*/&lt;br /&gt;
            $ImParts = SplitIM($httpRaw);&lt;br /&gt;
            $toAgentID=$ImParts[array_search(&amp;quot;toAgentID&amp;quot;,$ImParts)+1];&lt;br /&gt;
            $TMStamp=$ImParts[array_search(&amp;quot;timestamp&amp;quot;,$ImParts)+1];&lt;br /&gt;
&lt;br /&gt;
            /* Store messgae in database and inform user the message is saved */&lt;br /&gt;
            mysqli_query($link,&amp;quot;insert into &amp;quot;.C_DB_TABLE.&amp;quot; (PrincipalID, Message, TMStamp) values ('&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$httpRaw). &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$TMStamp) . &amp;quot;')&amp;quot;);&lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;true&amp;lt;/boolean&amp;gt;&amp;quot;;            &lt;br /&gt;
&lt;br /&gt;
            /*Close offline database*/&lt;br /&gt;
            mysqli_close($link);      &lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {   &lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;false&amp;lt;/boolean&amp;gt;&amp;quot;;&lt;br /&gt;
        }    &lt;br /&gt;
        exit;   &lt;br /&gt;
    } &lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/RetrieveMessages/&amp;quot;)&lt;br /&gt;
    { &lt;br /&gt;
        $ImParts = SplitIM($httpRaw);&lt;br /&gt;
        $toAgentID=$ImParts[array_search(&amp;quot;Guid&amp;quot;,$ImParts)+1];&lt;br /&gt;
        &lt;br /&gt;
        /*Open offline database*/&lt;br /&gt;
        $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
        if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); exit; } &lt;br /&gt;
        mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;select Message from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;' ORDER BY ID ASC, TMStamp ASC&amp;quot;);        &lt;br /&gt;
        &lt;br /&gt;
        /* Send offline IM messgaes to user */&lt;br /&gt;
        echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;ArrayOfGridInstantMessage xmlns:xsi=\&amp;quot;http://www.w3.org/2001/XMLSchema-instance\&amp;quot; xmlns:xsd=\&amp;quot;http://www.w3.org/2001/XMLSchema\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        while ($row =  mysqli_fetch_array($queryresult, MYSQL_NUM)) &lt;br /&gt;
        {&lt;br /&gt;
            echo $row[0];&lt;br /&gt;
        }&lt;br /&gt;
        echo &amp;quot;&amp;lt;/ArrayOfGridInstantMessage&amp;gt;&amp;quot;; &lt;br /&gt;
        &lt;br /&gt;
        /* Delete message after send it to user */&lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;delete from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;'&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        /*Close offline database*/&lt;br /&gt;
        mysqli_close($link); &lt;br /&gt;
        &lt;br /&gt;
        exit;          &lt;br /&gt;
    }     &lt;br /&gt;
}  &lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 3: OfflineMessageModule ===&lt;br /&gt;
Shutdown your simulator.&lt;br /&gt;
&lt;br /&gt;
Edit the OpenSim.ini [Messaging] block.&lt;br /&gt;
&lt;br /&gt;
An example configuration is shown below:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Messaging]&lt;br /&gt;
; Control which region module is used for instant messaging.&lt;br /&gt;
; Default is InstantMessageModule (this is the name of the core IM module as well as the setting)&lt;br /&gt;
InstantMessageModule = InstantMessageModule&lt;br /&gt;
; MessageTransferModule = MessageTransferModule&lt;br /&gt;
OfflineMessageModule = OfflineMessageModule&lt;br /&gt;
OfflineMessageURL = http://yourserver/offline.php&lt;br /&gt;
MuteListModule = MuteListModule&lt;br /&gt;
MuteListURL = http://yourserver/mute.php&lt;br /&gt;
ForwardOfflineGroupMessages = true&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
P.D: The MuteListModule and URL must be uncommented in order for the offline module to work, even if there is no mute.php file in the web folder.&lt;br /&gt;
&lt;br /&gt;
Once the edits are made, save your OpenSim.ini and restart your simulator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Using the OfflineMessageModule ===&lt;br /&gt;
&lt;br /&gt;
Login and try to send a message to an offline person.&lt;br /&gt;
You should see the message: &amp;quot;System: User is not logged in. Message saved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you see &amp;quot;Message not saved.&amp;quot; check your web server error log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are using XAMPP or WAMP or other apache based webserver and you get error&lt;br /&gt;
&lt;br /&gt;
messages like, ''File does not exist: /var/www/offline_im/RetrieveMessages/''.&lt;br /&gt;
&lt;br /&gt;
Then you need to enable the ''mod_rewrite.so'' module in apache.&lt;br /&gt;
&lt;br /&gt;
You also need to create .htaccess file that's placed inside the directory where you have also the offline php files.&lt;br /&gt;
&lt;br /&gt;
the .htaccess file would look like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_URI}  &amp;quot;!^/index.php$&amp;quot;&lt;br /&gt;
RewriteRule &amp;quot;^(.*)$&amp;quot; &amp;quot;index.php&amp;quot; [L]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Offline_Messaging</id>
		<title>Offline Messaging</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Offline_Messaging"/>
				<updated>2013-03-25T09:57:22Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Quicklinks}}&lt;br /&gt;
&lt;br /&gt;
Offline Messaging makes it possible to send IM's to people who are not online.&lt;br /&gt;
&lt;br /&gt;
Instead, the messages are saved to a database and delivered the next time the recipient logs in.&lt;br /&gt;
&lt;br /&gt;
NOTE: Diva Canto has contributed a new [[Offline Instant Messaging v2]] module in 0.7.6 dev revision r/22086 which does not need an external PHP script.&lt;br /&gt;
&lt;br /&gt;
You can find a newer script thats useing mysqli that replace the deprecated mysql commands with PHP 5.5.0 &lt;br /&gt;
[http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli here]&lt;br /&gt;
&lt;br /&gt;
=== Disclaimer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Please note that these are third party modules which you use at your own risk!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenSimulator takes no responsibility for these modules.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OfflineMessagingModule Configuration Steps ===&lt;br /&gt;
The OfflineMessagingModule is already compiled and ready for use in current versions of OpenSimulator.&lt;br /&gt;
&lt;br /&gt;
However, you will need to setup the &amp;quot;back-end&amp;quot; database and PHP connector scripts to support the OfflineMessagingModule.&lt;br /&gt;
&lt;br /&gt;
# Configure the Offline_IM database table in your MySQL using commands in Offline_IM.sql (below)&lt;br /&gt;
# Upload the mysql.php (below) into your web server&lt;br /&gt;
# Upload the offline.php (below) into your web server&lt;br /&gt;
# Enable the OfflineMessagingModule in your OpenSim.ini file&lt;br /&gt;
&lt;br /&gt;
=== STEP 1: Offline_IM.sql ===&lt;br /&gt;
Save these SQL commands to an Offline_IM.sql file on your MySQL server.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE IF NOT EXISTS `Offline_IM` (&lt;br /&gt;
 `uuid` varchar(36) NOT NULL,&lt;br /&gt;
 `message` text NOT NULL,&lt;br /&gt;
  KEY `uuid` (`uuid`)&lt;br /&gt;
) ENGINE=MyISAM DEFAULT CHARSET=latin1;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect to your MySQL (Linux commands shown):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mysql --user=$mysqluser --password=$mysqlpassword $databasename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace $mysqluser, $mysqlpassword, and $databasename with your specific configuration.&lt;br /&gt;
&lt;br /&gt;
At the mysql prompt, source the Offline_IM.sql file to configure your database to hold offline IMs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; source Offline_IM.sql&lt;br /&gt;
... ensure no error messages appear here ...&lt;br /&gt;
mysql&amp;gt; quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 2: mysql.php ===&lt;br /&gt;
Copy this PHP script to a file called mysql.php and upload the script file to your web server.&lt;br /&gt;
&lt;br /&gt;
No edits of the script should be necessary.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/*&lt;br /&gt;
 * Copyright (c) 2007, 2008 Contributors, http://opensimulator.org/&lt;br /&gt;
 * See CONTRIBUTORS for a full list of copyright holders.&lt;br /&gt;
 *&lt;br /&gt;
 * See LICENSE for the full licensing terms of this file.&lt;br /&gt;
 *&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
// This looks like its lifted from http://www.weberdev.com/get_example-4372.html&lt;br /&gt;
// I'd contact the original developer for licensing info, but his website is broken.&lt;br /&gt;
&lt;br /&gt;
class DB&lt;br /&gt;
{&lt;br /&gt;
	var $Host = C_DB_HOST;				// Hostname of our MySQL server&lt;br /&gt;
	var $Database = C_DB_NAME;			// Logical database name on that server&lt;br /&gt;
	var $User = C_DB_USER;				// Database user&lt;br /&gt;
	var $Password = C_DB_PASS;			// Database user's password&lt;br /&gt;
	var $Link_ID = 0;				// Result of mysql_connect()&lt;br /&gt;
	var $Query_ID = 0;				// Result of most recent mysql_query()&lt;br /&gt;
	var $Record	= array();			// Current mysql_fetch_array()-result&lt;br /&gt;
	var $Row;					// Current row number&lt;br /&gt;
	var $Errno = 0;					// Error state of query&lt;br /&gt;
	var $Error = &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	function halt($msg)&lt;br /&gt;
	{&lt;br /&gt;
		echo(&amp;quot;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&amp;lt;/TABLE&amp;gt;&amp;lt;B&amp;gt;Database error:&amp;lt;/B&amp;gt; $msg&amp;lt;BR&amp;gt;\n&amp;quot;);&lt;br /&gt;
		echo(&amp;quot;&amp;lt;B&amp;gt;MySQL error&amp;lt;/B&amp;gt;: $this-&amp;gt;Errno ($this-&amp;gt;Error)&amp;lt;BR&amp;gt;\n&amp;quot;);&lt;br /&gt;
		die(&amp;quot;Session halted.&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function connect()&lt;br /&gt;
	{&lt;br /&gt;
		if($this-&amp;gt;Link_ID == 0)&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;Link_ID = mysql_connect($this-&amp;gt;Host, $this-&amp;gt;User, $this-&amp;gt;Password);&lt;br /&gt;
			if (!$this-&amp;gt;Link_ID)&lt;br /&gt;
			{&lt;br /&gt;
				$this-&amp;gt;halt(&amp;quot;Link_ID == false, connect failed&amp;quot;);&lt;br /&gt;
			}&lt;br /&gt;
			$SelectResult = mysql_select_db($this-&amp;gt;Database, $this-&amp;gt;Link_ID);&lt;br /&gt;
			if(!$SelectResult)&lt;br /&gt;
			{&lt;br /&gt;
				$this-&amp;gt;Errno = mysql_errno($this-&amp;gt;Link_ID);&lt;br /&gt;
				$this-&amp;gt;Error = mysql_error($this-&amp;gt;Link_ID);&lt;br /&gt;
				$this-&amp;gt;halt(&amp;quot;cannot select database &amp;lt;I&amp;gt;&amp;quot;.$this-&amp;gt;Database.&amp;quot;&amp;lt;/I&amp;gt;&amp;quot;);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
 	function escape($String)&lt;br /&gt;
 	{&lt;br /&gt;
 		return mysql_escape_string($String);&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
	function query($Query_String)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;connect();&lt;br /&gt;
		$this-&amp;gt;Query_ID = mysql_query($Query_String,$this-&amp;gt;Link_ID);&lt;br /&gt;
		$this-&amp;gt;Row = 0;&lt;br /&gt;
		$this-&amp;gt;Errno = mysql_errno();&lt;br /&gt;
		$this-&amp;gt;Error = mysql_error();&lt;br /&gt;
		if (!$this-&amp;gt;Query_ID)&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;halt(&amp;quot;Invalid SQL: &amp;quot;.$Query_String);&lt;br /&gt;
		}&lt;br /&gt;
		return $this-&amp;gt;Query_ID;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function next_record()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;Record = @mysql_fetch_array($this-&amp;gt;Query_ID);&lt;br /&gt;
		$this-&amp;gt;Row += 1;&lt;br /&gt;
		$this-&amp;gt;Errno = mysql_errno();&lt;br /&gt;
		$this-&amp;gt;Error = mysql_error();&lt;br /&gt;
		$stat = is_array($this-&amp;gt;Record);&lt;br /&gt;
		if (!$stat)&lt;br /&gt;
		{&lt;br /&gt;
			@mysql_free_result($this-&amp;gt;Query_ID);&lt;br /&gt;
			$this-&amp;gt;Query_ID = 0;&lt;br /&gt;
		}&lt;br /&gt;
		return $this-&amp;gt;Record;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function num_rows()&lt;br /&gt;
	{&lt;br /&gt;
		return mysql_num_rows($this-&amp;gt;Query_ID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function affected_rows()&lt;br /&gt;
	{&lt;br /&gt;
		return mysql_affected_rows($this-&amp;gt;Link_ID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function optimize($tbl_name)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;connect();&lt;br /&gt;
		$this-&amp;gt;Query_ID = @mysql_query(&amp;quot;OPTIMIZE TABLE $tbl_name&amp;quot;,$this-&amp;gt;Link_ID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function clean_results()&lt;br /&gt;
	{&lt;br /&gt;
		if($this-&amp;gt;Query_ID != 0) mysql_freeresult($this-&amp;gt;Query_ID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function close()&lt;br /&gt;
	{&lt;br /&gt;
		if($this-&amp;gt;Link_ID != 0) mysql_close($this-&amp;gt;Link_ID);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 3: offline.php ===&lt;br /&gt;
Copy this PHP script to a file called offline.php and upload the script file to your web server.&lt;br /&gt;
&lt;br /&gt;
Edit the $dbName, $dbHost, $dbUser, and $dbPassword lines at the top of the script to match your database and server information.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
$dbName = &amp;quot;comunity&amp;quot;;&lt;br /&gt;
$dbHost = &amp;quot;localhost&amp;quot;;&lt;br /&gt;
$dbUser = &amp;quot;root&amp;quot;;&lt;br /&gt;
$dbPassword =&amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
define(&amp;quot;C_DB_TYPE&amp;quot;,&amp;quot;mysql&amp;quot;);&lt;br /&gt;
define(&amp;quot;C_DB_HOST&amp;quot;,$dbHost);&lt;br /&gt;
define(&amp;quot;C_DB_NAME&amp;quot;,$dbName);&lt;br /&gt;
define(&amp;quot;C_DB_USER&amp;quot;,$dbUser);&lt;br /&gt;
define(&amp;quot;C_DB_PASS&amp;quot;,$dbPassword);&lt;br /&gt;
define(&amp;quot;C_OFFLINE_IM_TBL&amp;quot;, &amp;quot;Offline_IM&amp;quot;);&lt;br /&gt;
include(&amp;quot;mysql.php&amp;quot;);&lt;br /&gt;
$DbLink = new DB;&lt;br /&gt;
$method = $_SERVER[&amp;quot;PATH_INFO&amp;quot;];&lt;br /&gt;
if ($method == &amp;quot;/SaveMessage/&amp;quot;)&lt;br /&gt;
{&lt;br /&gt;
$msg = $HTTP_RAW_POST_DATA;&lt;br /&gt;
$start = strpos($msg, &amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
if ($start != -1)&lt;br /&gt;
{&lt;br /&gt;
$start+=2;&lt;br /&gt;
$msg = substr($msg, $start);&lt;br /&gt;
$parts = split(&amp;quot;[&amp;lt;&amp;gt;]&amp;quot;, $msg);&lt;br /&gt;
$to_agent = $parts[12];&lt;br /&gt;
$DbLink-&amp;gt;query(&amp;quot;insert into &amp;quot;.C_OFFLINE_IM_TBL.&amp;quot; (uuid, message) values ('&amp;quot; .&lt;br /&gt;
mysql_escape_string($to_agent) . &amp;quot;', '&amp;quot; .&lt;br /&gt;
mysql_escape_string($msg) . &amp;quot;')&amp;quot;);&lt;br /&gt;
echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;true&amp;lt;/boolean&amp;gt;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;false&amp;lt;/boolean&amp;gt;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
exit;&lt;br /&gt;
}&lt;br /&gt;
if ($method == &amp;quot;/RetrieveMessages/&amp;quot;)&lt;br /&gt;
{&lt;br /&gt;
$parms = $HTTP_RAW_POST_DATA;&lt;br /&gt;
$parts = split(&amp;quot;[&amp;lt;&amp;gt;]&amp;quot;, $parms);&lt;br /&gt;
$agent_id = $parts[6];&lt;br /&gt;
$DbLink-&amp;gt;query(&amp;quot;select message from &amp;quot;.C_OFFLINE_IM_TBL.&amp;quot; where uuid='&amp;quot; .&lt;br /&gt;
mysql_escape_string($agent_id) . &amp;quot;'&amp;quot;);&lt;br /&gt;
echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;ArrayOfGridInstantMessage xmlns:xsi=\&amp;quot;http://www.w3.org/2001/XMLSchema-instance\&amp;quot; xmlns:xsd=\&amp;quot;http://www.w3.org/2001/XMLSchema\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
while(list($message) = $DbLink-&amp;gt;next_record())&lt;br /&gt;
{&lt;br /&gt;
echo $message;&lt;br /&gt;
}&lt;br /&gt;
echo &amp;quot;&amp;lt;/ArrayOfGridInstantMessage&amp;gt;&amp;quot;;&lt;br /&gt;
$DbLink-&amp;gt;query(&amp;quot;delete from &amp;quot;.C_OFFLINE_IM_TBL.&amp;quot; where uuid='&amp;quot; .&lt;br /&gt;
mysql_escape_string($agent_id) . &amp;quot;'&amp;quot;);&lt;br /&gt;
exit;&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 4: OfflineMessageModule ===&lt;br /&gt;
Shutdown your simulator.&lt;br /&gt;
&lt;br /&gt;
Edit the OpenSim.ini [Messaging] block.&lt;br /&gt;
&lt;br /&gt;
An example configuration is shown below:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Messaging]&lt;br /&gt;
; Control which region module is used for instant messaging.&lt;br /&gt;
; Default is InstantMessageModule (this is the name of the core IM module as well as the setting)&lt;br /&gt;
InstantMessageModule = InstantMessageModule&lt;br /&gt;
; MessageTransferModule = MessageTransferModule&lt;br /&gt;
OfflineMessageModule = OfflineMessageModule&lt;br /&gt;
OfflineMessageURL = http://yourserver/offline.php&lt;br /&gt;
MuteListModule = MuteListModule&lt;br /&gt;
MuteListURL = http://yourserver/mute.php&lt;br /&gt;
ForwardOfflineGroupMessages = true&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
P.D: The MuteListModule and URL must be uncommented in order for the offline module to work, even if there is no mute.php file in the web folder.&lt;br /&gt;
&lt;br /&gt;
Once the edits are made, save your OpenSim.ini and restart your simulator.&lt;br /&gt;
&lt;br /&gt;
=== Using the OfflineMessageModule ===&lt;br /&gt;
&lt;br /&gt;
Login and try to send a message to an offline person.&lt;br /&gt;
You should see the message: &amp;quot;System: User is not logged in. Message saved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you see &amp;quot;Message not saved.&amp;quot; check your web server error log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are using XAMPP or WAMP or other apache based webserver and you get error&lt;br /&gt;
&lt;br /&gt;
messages like, ''File does not exist: /var/www/offline_im/RetrieveMessages/''.&lt;br /&gt;
&lt;br /&gt;
Then you need to enable the ''mod_rewrite.so'' module in apache.&lt;br /&gt;
&lt;br /&gt;
You also need to create .htaccess file that's placed inside the directory where you have also the offline php files.&lt;br /&gt;
&lt;br /&gt;
the .htaccess file would look like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_URI}  &amp;quot;!^/index.php$&amp;quot;&lt;br /&gt;
RewriteRule &amp;quot;^(.*)$&amp;quot; &amp;quot;index.php&amp;quot; [L]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check the database Offline_IM table to verify whether or not offline.php has written a record there.&lt;br /&gt;
&lt;br /&gt;
Next time the person you messaged logs in, they will get the message and the database will be updated.&lt;br /&gt;
&lt;br /&gt;
=== Testing Notes ===&lt;br /&gt;
These steps and configuration tested working on 2013-Jan-13 with:&lt;br /&gt;
* OpenSimulator 0.7.5 r21607 from 2013-Jan-09&lt;br /&gt;
* Nant 0.90&lt;br /&gt;
* Mono 2.10.8&lt;br /&gt;
* MySQL 5.5.28&lt;br /&gt;
* PHP XMLRPC 5.4.10&lt;br /&gt;
* PHP 5.4.1&lt;br /&gt;
* Apache 2.2.22&lt;br /&gt;
* Linux Kernel 3.6.11&lt;br /&gt;
* Fedora Linux 17 (Beefy Miracle)&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Offline_Messaging</id>
		<title>Offline Messaging</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Offline_Messaging"/>
				<updated>2013-03-25T09:53:53Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Quicklinks}}&lt;br /&gt;
&lt;br /&gt;
Offline Messaging makes it possible to send IM's to people who are not online.&lt;br /&gt;
&lt;br /&gt;
Instead, the messages are saved to a database and delivered the next time the recipient logs in.&lt;br /&gt;
&lt;br /&gt;
NOTE: Diva Canto has contributed a new [[Offline Instant Messaging v2]] module in 0.7.6 dev revision r/22086 which does not need an external PHP script.&lt;br /&gt;
&lt;br /&gt;
You can find a newer script thats useing mysqli that replace the deprecated mysql commands with PHP 5.5.0 [[help:http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli|here]]&lt;br /&gt;
&lt;br /&gt;
=== Disclaimer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Please note that these are third party modules which you use at your own risk!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenSimulator takes no responsibility for these modules.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OfflineMessagingModule Configuration Steps ===&lt;br /&gt;
The OfflineMessagingModule is already compiled and ready for use in current versions of OpenSimulator.&lt;br /&gt;
&lt;br /&gt;
However, you will need to setup the &amp;quot;back-end&amp;quot; database and PHP connector scripts to support the OfflineMessagingModule.&lt;br /&gt;
&lt;br /&gt;
# Configure the Offline_IM database table in your MySQL using commands in Offline_IM.sql (below)&lt;br /&gt;
# Upload the mysql.php (below) into your web server&lt;br /&gt;
# Upload the offline.php (below) into your web server&lt;br /&gt;
# Enable the OfflineMessagingModule in your OpenSim.ini file&lt;br /&gt;
&lt;br /&gt;
=== STEP 1: Offline_IM.sql ===&lt;br /&gt;
Save these SQL commands to an Offline_IM.sql file on your MySQL server.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE IF NOT EXISTS `Offline_IM` (&lt;br /&gt;
 `uuid` varchar(36) NOT NULL,&lt;br /&gt;
 `message` text NOT NULL,&lt;br /&gt;
  KEY `uuid` (`uuid`)&lt;br /&gt;
) ENGINE=MyISAM DEFAULT CHARSET=latin1;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect to your MySQL (Linux commands shown):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mysql --user=$mysqluser --password=$mysqlpassword $databasename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace $mysqluser, $mysqlpassword, and $databasename with your specific configuration.&lt;br /&gt;
&lt;br /&gt;
At the mysql prompt, source the Offline_IM.sql file to configure your database to hold offline IMs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; source Offline_IM.sql&lt;br /&gt;
... ensure no error messages appear here ...&lt;br /&gt;
mysql&amp;gt; quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 2: mysql.php ===&lt;br /&gt;
Copy this PHP script to a file called mysql.php and upload the script file to your web server.&lt;br /&gt;
&lt;br /&gt;
No edits of the script should be necessary.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/*&lt;br /&gt;
 * Copyright (c) 2007, 2008 Contributors, http://opensimulator.org/&lt;br /&gt;
 * See CONTRIBUTORS for a full list of copyright holders.&lt;br /&gt;
 *&lt;br /&gt;
 * See LICENSE for the full licensing terms of this file.&lt;br /&gt;
 *&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
// This looks like its lifted from http://www.weberdev.com/get_example-4372.html&lt;br /&gt;
// I'd contact the original developer for licensing info, but his website is broken.&lt;br /&gt;
&lt;br /&gt;
class DB&lt;br /&gt;
{&lt;br /&gt;
	var $Host = C_DB_HOST;				// Hostname of our MySQL server&lt;br /&gt;
	var $Database = C_DB_NAME;			// Logical database name on that server&lt;br /&gt;
	var $User = C_DB_USER;				// Database user&lt;br /&gt;
	var $Password = C_DB_PASS;			// Database user's password&lt;br /&gt;
	var $Link_ID = 0;				// Result of mysql_connect()&lt;br /&gt;
	var $Query_ID = 0;				// Result of most recent mysql_query()&lt;br /&gt;
	var $Record	= array();			// Current mysql_fetch_array()-result&lt;br /&gt;
	var $Row;					// Current row number&lt;br /&gt;
	var $Errno = 0;					// Error state of query&lt;br /&gt;
	var $Error = &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	function halt($msg)&lt;br /&gt;
	{&lt;br /&gt;
		echo(&amp;quot;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&amp;lt;/TABLE&amp;gt;&amp;lt;B&amp;gt;Database error:&amp;lt;/B&amp;gt; $msg&amp;lt;BR&amp;gt;\n&amp;quot;);&lt;br /&gt;
		echo(&amp;quot;&amp;lt;B&amp;gt;MySQL error&amp;lt;/B&amp;gt;: $this-&amp;gt;Errno ($this-&amp;gt;Error)&amp;lt;BR&amp;gt;\n&amp;quot;);&lt;br /&gt;
		die(&amp;quot;Session halted.&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function connect()&lt;br /&gt;
	{&lt;br /&gt;
		if($this-&amp;gt;Link_ID == 0)&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;Link_ID = mysql_connect($this-&amp;gt;Host, $this-&amp;gt;User, $this-&amp;gt;Password);&lt;br /&gt;
			if (!$this-&amp;gt;Link_ID)&lt;br /&gt;
			{&lt;br /&gt;
				$this-&amp;gt;halt(&amp;quot;Link_ID == false, connect failed&amp;quot;);&lt;br /&gt;
			}&lt;br /&gt;
			$SelectResult = mysql_select_db($this-&amp;gt;Database, $this-&amp;gt;Link_ID);&lt;br /&gt;
			if(!$SelectResult)&lt;br /&gt;
			{&lt;br /&gt;
				$this-&amp;gt;Errno = mysql_errno($this-&amp;gt;Link_ID);&lt;br /&gt;
				$this-&amp;gt;Error = mysql_error($this-&amp;gt;Link_ID);&lt;br /&gt;
				$this-&amp;gt;halt(&amp;quot;cannot select database &amp;lt;I&amp;gt;&amp;quot;.$this-&amp;gt;Database.&amp;quot;&amp;lt;/I&amp;gt;&amp;quot;);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
 	function escape($String)&lt;br /&gt;
 	{&lt;br /&gt;
 		return mysql_escape_string($String);&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
	function query($Query_String)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;connect();&lt;br /&gt;
		$this-&amp;gt;Query_ID = mysql_query($Query_String,$this-&amp;gt;Link_ID);&lt;br /&gt;
		$this-&amp;gt;Row = 0;&lt;br /&gt;
		$this-&amp;gt;Errno = mysql_errno();&lt;br /&gt;
		$this-&amp;gt;Error = mysql_error();&lt;br /&gt;
		if (!$this-&amp;gt;Query_ID)&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;halt(&amp;quot;Invalid SQL: &amp;quot;.$Query_String);&lt;br /&gt;
		}&lt;br /&gt;
		return $this-&amp;gt;Query_ID;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function next_record()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;Record = @mysql_fetch_array($this-&amp;gt;Query_ID);&lt;br /&gt;
		$this-&amp;gt;Row += 1;&lt;br /&gt;
		$this-&amp;gt;Errno = mysql_errno();&lt;br /&gt;
		$this-&amp;gt;Error = mysql_error();&lt;br /&gt;
		$stat = is_array($this-&amp;gt;Record);&lt;br /&gt;
		if (!$stat)&lt;br /&gt;
		{&lt;br /&gt;
			@mysql_free_result($this-&amp;gt;Query_ID);&lt;br /&gt;
			$this-&amp;gt;Query_ID = 0;&lt;br /&gt;
		}&lt;br /&gt;
		return $this-&amp;gt;Record;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function num_rows()&lt;br /&gt;
	{&lt;br /&gt;
		return mysql_num_rows($this-&amp;gt;Query_ID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function affected_rows()&lt;br /&gt;
	{&lt;br /&gt;
		return mysql_affected_rows($this-&amp;gt;Link_ID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function optimize($tbl_name)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;connect();&lt;br /&gt;
		$this-&amp;gt;Query_ID = @mysql_query(&amp;quot;OPTIMIZE TABLE $tbl_name&amp;quot;,$this-&amp;gt;Link_ID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function clean_results()&lt;br /&gt;
	{&lt;br /&gt;
		if($this-&amp;gt;Query_ID != 0) mysql_freeresult($this-&amp;gt;Query_ID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function close()&lt;br /&gt;
	{&lt;br /&gt;
		if($this-&amp;gt;Link_ID != 0) mysql_close($this-&amp;gt;Link_ID);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 3: offline.php ===&lt;br /&gt;
Copy this PHP script to a file called offline.php and upload the script file to your web server.&lt;br /&gt;
&lt;br /&gt;
Edit the $dbName, $dbHost, $dbUser, and $dbPassword lines at the top of the script to match your database and server information.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
$dbName = &amp;quot;comunity&amp;quot;;&lt;br /&gt;
$dbHost = &amp;quot;localhost&amp;quot;;&lt;br /&gt;
$dbUser = &amp;quot;root&amp;quot;;&lt;br /&gt;
$dbPassword =&amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
define(&amp;quot;C_DB_TYPE&amp;quot;,&amp;quot;mysql&amp;quot;);&lt;br /&gt;
define(&amp;quot;C_DB_HOST&amp;quot;,$dbHost);&lt;br /&gt;
define(&amp;quot;C_DB_NAME&amp;quot;,$dbName);&lt;br /&gt;
define(&amp;quot;C_DB_USER&amp;quot;,$dbUser);&lt;br /&gt;
define(&amp;quot;C_DB_PASS&amp;quot;,$dbPassword);&lt;br /&gt;
define(&amp;quot;C_OFFLINE_IM_TBL&amp;quot;, &amp;quot;Offline_IM&amp;quot;);&lt;br /&gt;
include(&amp;quot;mysql.php&amp;quot;);&lt;br /&gt;
$DbLink = new DB;&lt;br /&gt;
$method = $_SERVER[&amp;quot;PATH_INFO&amp;quot;];&lt;br /&gt;
if ($method == &amp;quot;/SaveMessage/&amp;quot;)&lt;br /&gt;
{&lt;br /&gt;
$msg = $HTTP_RAW_POST_DATA;&lt;br /&gt;
$start = strpos($msg, &amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
if ($start != -1)&lt;br /&gt;
{&lt;br /&gt;
$start+=2;&lt;br /&gt;
$msg = substr($msg, $start);&lt;br /&gt;
$parts = split(&amp;quot;[&amp;lt;&amp;gt;]&amp;quot;, $msg);&lt;br /&gt;
$to_agent = $parts[12];&lt;br /&gt;
$DbLink-&amp;gt;query(&amp;quot;insert into &amp;quot;.C_OFFLINE_IM_TBL.&amp;quot; (uuid, message) values ('&amp;quot; .&lt;br /&gt;
mysql_escape_string($to_agent) . &amp;quot;', '&amp;quot; .&lt;br /&gt;
mysql_escape_string($msg) . &amp;quot;')&amp;quot;);&lt;br /&gt;
echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;true&amp;lt;/boolean&amp;gt;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;false&amp;lt;/boolean&amp;gt;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
exit;&lt;br /&gt;
}&lt;br /&gt;
if ($method == &amp;quot;/RetrieveMessages/&amp;quot;)&lt;br /&gt;
{&lt;br /&gt;
$parms = $HTTP_RAW_POST_DATA;&lt;br /&gt;
$parts = split(&amp;quot;[&amp;lt;&amp;gt;]&amp;quot;, $parms);&lt;br /&gt;
$agent_id = $parts[6];&lt;br /&gt;
$DbLink-&amp;gt;query(&amp;quot;select message from &amp;quot;.C_OFFLINE_IM_TBL.&amp;quot; where uuid='&amp;quot; .&lt;br /&gt;
mysql_escape_string($agent_id) . &amp;quot;'&amp;quot;);&lt;br /&gt;
echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;ArrayOfGridInstantMessage xmlns:xsi=\&amp;quot;http://www.w3.org/2001/XMLSchema-instance\&amp;quot; xmlns:xsd=\&amp;quot;http://www.w3.org/2001/XMLSchema\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
while(list($message) = $DbLink-&amp;gt;next_record())&lt;br /&gt;
{&lt;br /&gt;
echo $message;&lt;br /&gt;
}&lt;br /&gt;
echo &amp;quot;&amp;lt;/ArrayOfGridInstantMessage&amp;gt;&amp;quot;;&lt;br /&gt;
$DbLink-&amp;gt;query(&amp;quot;delete from &amp;quot;.C_OFFLINE_IM_TBL.&amp;quot; where uuid='&amp;quot; .&lt;br /&gt;
mysql_escape_string($agent_id) . &amp;quot;'&amp;quot;);&lt;br /&gt;
exit;&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 4: OfflineMessageModule ===&lt;br /&gt;
Shutdown your simulator.&lt;br /&gt;
&lt;br /&gt;
Edit the OpenSim.ini [Messaging] block.&lt;br /&gt;
&lt;br /&gt;
An example configuration is shown below:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Messaging]&lt;br /&gt;
; Control which region module is used for instant messaging.&lt;br /&gt;
; Default is InstantMessageModule (this is the name of the core IM module as well as the setting)&lt;br /&gt;
InstantMessageModule = InstantMessageModule&lt;br /&gt;
; MessageTransferModule = MessageTransferModule&lt;br /&gt;
OfflineMessageModule = OfflineMessageModule&lt;br /&gt;
OfflineMessageURL = http://yourserver/offline.php&lt;br /&gt;
MuteListModule = MuteListModule&lt;br /&gt;
MuteListURL = http://yourserver/mute.php&lt;br /&gt;
ForwardOfflineGroupMessages = true&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
P.D: The MuteListModule and URL must be uncommented in order for the offline module to work, even if there is no mute.php file in the web folder.&lt;br /&gt;
&lt;br /&gt;
Once the edits are made, save your OpenSim.ini and restart your simulator.&lt;br /&gt;
&lt;br /&gt;
=== Using the OfflineMessageModule ===&lt;br /&gt;
&lt;br /&gt;
Login and try to send a message to an offline person.&lt;br /&gt;
You should see the message: &amp;quot;System: User is not logged in. Message saved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you see &amp;quot;Message not saved.&amp;quot; check your web server error log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are using XAMPP or WAMP or other apache based webserver and you get error&lt;br /&gt;
&lt;br /&gt;
messages like, ''File does not exist: /var/www/offline_im/RetrieveMessages/''.&lt;br /&gt;
&lt;br /&gt;
Then you need to enable the ''mod_rewrite.so'' module in apache.&lt;br /&gt;
&lt;br /&gt;
You also need to create .htaccess file that's placed inside the directory where you have also the offline php files.&lt;br /&gt;
&lt;br /&gt;
the .htaccess file would look like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_URI}  &amp;quot;!^/index.php$&amp;quot;&lt;br /&gt;
RewriteRule &amp;quot;^(.*)$&amp;quot; &amp;quot;index.php&amp;quot; [L]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check the database Offline_IM table to verify whether or not offline.php has written a record there.&lt;br /&gt;
&lt;br /&gt;
Next time the person you messaged logs in, they will get the message and the database will be updated.&lt;br /&gt;
&lt;br /&gt;
=== Testing Notes ===&lt;br /&gt;
These steps and configuration tested working on 2013-Jan-13 with:&lt;br /&gt;
* OpenSimulator 0.7.5 r21607 from 2013-Jan-09&lt;br /&gt;
* Nant 0.90&lt;br /&gt;
* Mono 2.10.8&lt;br /&gt;
* MySQL 5.5.28&lt;br /&gt;
* PHP XMLRPC 5.4.10&lt;br /&gt;
* PHP 5.4.1&lt;br /&gt;
* Apache 2.2.22&lt;br /&gt;
* Linux Kernel 3.6.11&lt;br /&gt;
* Fedora Linux 17 (Beefy Miracle)&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli</id>
		<title>Offline Instant Messaging with php Mysqli</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli"/>
				<updated>2013-03-24T14:16:36Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* STEP 2: offline.php */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Offline Messaging makes it possible to send IM's to people who are not online.&lt;br /&gt;
&lt;br /&gt;
Instead, the messages are saved to a database and delivered the next time the recipient logs in.&lt;br /&gt;
&lt;br /&gt;
=== Disclaimer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Please note that these are third party modules which you use at your own risk!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenSimulator takes no responsibility for these modules.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 1: offline.sql ===&lt;br /&gt;
Save these SQL commands to an offline.sql file on your MySQL server.&amp;lt;br&amp;gt;&lt;br /&gt;
Or copy the sql query to phpmyadmin and after execute the query, go to step 2.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `offline` (&lt;br /&gt;
  `ID` MEDIUMINT NOT NULL AUTO_INCREMENT,&lt;br /&gt;
  `PrincipalID` char(36) NOT NULL DEFAULT '',&lt;br /&gt;
  `Message` text NOT NULL,&lt;br /&gt;
  `TMStamp` char(14) NOT NULL DEFAULT '',&lt;br /&gt;
  PRIMARY KEY  (`ID`),&lt;br /&gt;
  KEY `PrincipalID` (`PrincipalID`)&lt;br /&gt;
) ENGINE=MyISAM;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect to your MySQL (Linux commands shown):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mysql --user=$mysqluser --password=$mysqlpassword $databasename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace $mysqluser, $mysqlpassword, and $databasename with your specific configuration.&lt;br /&gt;
&lt;br /&gt;
At the mysql prompt, source the offline.sql file to configure your database to hold offline IMs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; source offline.sql&lt;br /&gt;
... ensure no error messages appear here ...&lt;br /&gt;
mysql&amp;gt; quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 2: offline.php ===&lt;br /&gt;
Copy this PHP script to a file called offline.php and upload the script file to your web server.&lt;br /&gt;
&lt;br /&gt;
Open the offline.php file to set the following parameters.&amp;lt;br&amp;gt; &lt;br /&gt;
C_DB_HOST, C_DB_DATABASE, C_DB_USER, C_DB_PASS, C_DB_TABLE&amp;lt;br&amp;gt;&lt;br /&gt;
Add the required data between the &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
C_DB_HOST = the hostname of the server thats running mysql&lt;br /&gt;
C_DB_DATABASE = is the database where the offline table is stored&lt;br /&gt;
C_DB_USER = database user you are useing for accesing the offline table&lt;br /&gt;
C_DB_PASS = user passwd that belongs to the use that you set in C_DB_USER&lt;br /&gt;
C_DB_TABLE = table name for offline.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/* Script based on the code you can find at http://opensimulator.org/wiki/Offline_Messaging &lt;br /&gt;
 * @author: Richardus Raymaker -&amp;gt; http:\\www.simsquaremetaverse.nl&lt;br /&gt;
 * @date: 2013-03-23&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
define(&amp;quot;C_DB_HOST&amp;quot;      ,&amp;quot;localhost&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_DATABASE&amp;quot;  ,&amp;quot;gridservices&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_USER&amp;quot;      ,&amp;quot;offline&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_PASS&amp;quot;      ,&amp;quot;#off4me#&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_TABLE&amp;quot;     ,&amp;quot;offline&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/*---*/&lt;br /&gt;
    function SplitIM($httpRaw)&lt;br /&gt;
    {&lt;br /&gt;
        $ImHeaderStartFunc = strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($ImHeaderStartFunc!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $ImHeaderStartFunc+=2;&lt;br /&gt;
            $httpRawFunc = substr($httpRaw,$ImHeaderStartFunc);&lt;br /&gt;
            $ImPartsFunc = preg_split('[&amp;lt;|&amp;gt;]',$httpRaw);&lt;br /&gt;
            &lt;br /&gt;
            return $ImPartsFunc;&lt;br /&gt;
        }    &lt;br /&gt;
    }&lt;br /&gt;
/*---*/&lt;br /&gt;
&lt;br /&gt;
/*----------*/&lt;br /&gt;
if (isset($_SERVER[&amp;quot;PATH_INFO&amp;quot;]))&lt;br /&gt;
{&lt;br /&gt;
    $urlPath = $_SERVER[&amp;quot;PATH_INFO&amp;quot;];&lt;br /&gt;
    $httpRaw = $HTTP_RAW_POST_DATA;&lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/SaveMessage/&amp;quot;)&lt;br /&gt;
    {&lt;br /&gt;
        $start=strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($start!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $httpRaw=substr($httpRaw,$start+2);&lt;br /&gt;
        &lt;br /&gt;
            /*Open offline database*/&lt;br /&gt;
            $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
            if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); exit; } &lt;br /&gt;
            mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
            &lt;br /&gt;
            /*find toAgent UUID*/&lt;br /&gt;
            $ImParts = SplitIM($httpRaw);&lt;br /&gt;
            $toAgentID=$ImParts[array_search(&amp;quot;toAgentID&amp;quot;,$ImParts)+1];&lt;br /&gt;
            $TMStamp=$ImParts[array_search(&amp;quot;timestamp&amp;quot;,$ImParts)+1];&lt;br /&gt;
&lt;br /&gt;
            /* Store messgae in database and inform user the message is saved */&lt;br /&gt;
            mysqli_query($link,&amp;quot;insert into &amp;quot;.C_DB_TABLE.&amp;quot; (PrincipalID, Message, TMStamp) values ('&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$httpRaw). &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$TMStamp) . &amp;quot;')&amp;quot;);&lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;true&amp;lt;/boolean&amp;gt;&amp;quot;;            &lt;br /&gt;
&lt;br /&gt;
            /*Close offline database*/&lt;br /&gt;
            mysqli_close($link);      &lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {   &lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;false&amp;lt;/boolean&amp;gt;&amp;quot;;&lt;br /&gt;
        }    &lt;br /&gt;
        exit;   &lt;br /&gt;
    } &lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/RetrieveMessages/&amp;quot;)&lt;br /&gt;
    { &lt;br /&gt;
        $ImParts = SplitIM($httpRaw);&lt;br /&gt;
        $toAgentID=$ImParts[array_search(&amp;quot;Guid&amp;quot;,$ImParts)+1];&lt;br /&gt;
        &lt;br /&gt;
        /*Open offline database*/&lt;br /&gt;
        $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
        if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); exit; } &lt;br /&gt;
        mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;select Message from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;' ORDER BY ID ASC, TMStamp ASC&amp;quot;);        &lt;br /&gt;
        &lt;br /&gt;
        /* Send offline IM messgaes to user */&lt;br /&gt;
        echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;ArrayOfGridInstantMessage xmlns:xsi=\&amp;quot;http://www.w3.org/2001/XMLSchema-instance\&amp;quot; xmlns:xsd=\&amp;quot;http://www.w3.org/2001/XMLSchema\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        while ($row =  mysqli_fetch_array($queryresult, MYSQL_NUM)) &lt;br /&gt;
        {&lt;br /&gt;
            echo $row[0];&lt;br /&gt;
        }&lt;br /&gt;
        echo &amp;quot;&amp;lt;/ArrayOfGridInstantMessage&amp;gt;&amp;quot;; &lt;br /&gt;
        &lt;br /&gt;
        /* Delete message after send it to user */&lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;delete from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;'&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        /*Close offline database*/&lt;br /&gt;
        mysqli_close($link); &lt;br /&gt;
        &lt;br /&gt;
        exit;          &lt;br /&gt;
    }     &lt;br /&gt;
}  &lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 3: OfflineMessageModule ===&lt;br /&gt;
Shutdown your simulator.&lt;br /&gt;
&lt;br /&gt;
Edit the OpenSim.ini [Messaging] block.&lt;br /&gt;
&lt;br /&gt;
An example configuration is shown below:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Messaging]&lt;br /&gt;
; Control which region module is used for instant messaging.&lt;br /&gt;
; Default is InstantMessageModule (this is the name of the core IM module as well as the setting)&lt;br /&gt;
InstantMessageModule = InstantMessageModule&lt;br /&gt;
; MessageTransferModule = MessageTransferModule&lt;br /&gt;
OfflineMessageModule = OfflineMessageModule&lt;br /&gt;
OfflineMessageURL = http://yourserver/offline.php&lt;br /&gt;
MuteListModule = MuteListModule&lt;br /&gt;
MuteListURL = http://yourserver/mute.php&lt;br /&gt;
ForwardOfflineGroupMessages = true&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
P.D: The MuteListModule and URL must be uncommented in order for the offline module to work, even if there is no mute.php file in the web folder.&lt;br /&gt;
&lt;br /&gt;
Once the edits are made, save your OpenSim.ini and restart your simulator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Using the OfflineMessageModule ===&lt;br /&gt;
&lt;br /&gt;
Login and try to send a message to an offline person.&lt;br /&gt;
You should see the message: &amp;quot;System: User is not logged in. Message saved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you see &amp;quot;Message not saved.&amp;quot; check your web server error log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are using XAMPP or WAMP or other apache based webserver and you get error&lt;br /&gt;
&lt;br /&gt;
messages like, ''File does not exist: /var/www/offline_im/RetrieveMessages/''.&lt;br /&gt;
&lt;br /&gt;
Then you need to enable the ''mod_rewrite.so'' module in apache.&lt;br /&gt;
&lt;br /&gt;
You also need to create .htaccess file that's placed inside the directory where you have also the offline php files.&lt;br /&gt;
&lt;br /&gt;
the .htaccess file would look like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_URI}  &amp;quot;!^/index.php$&amp;quot;&lt;br /&gt;
RewriteRule &amp;quot;^(.*)$&amp;quot; &amp;quot;index.php&amp;quot; [L]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli</id>
		<title>Offline Instant Messaging with php Mysqli</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli"/>
				<updated>2013-03-24T14:11:23Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* STEP 2: offline.php */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Offline Messaging makes it possible to send IM's to people who are not online.&lt;br /&gt;
&lt;br /&gt;
Instead, the messages are saved to a database and delivered the next time the recipient logs in.&lt;br /&gt;
&lt;br /&gt;
=== Disclaimer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Please note that these are third party modules which you use at your own risk!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenSimulator takes no responsibility for these modules.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 1: offline.sql ===&lt;br /&gt;
Save these SQL commands to an offline.sql file on your MySQL server.&amp;lt;br&amp;gt;&lt;br /&gt;
Or copy the sql query to phpmyadmin and after execute the query, go to step 2.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `offline` (&lt;br /&gt;
  `ID` MEDIUMINT NOT NULL AUTO_INCREMENT,&lt;br /&gt;
  `PrincipalID` char(36) NOT NULL DEFAULT '',&lt;br /&gt;
  `Message` text NOT NULL,&lt;br /&gt;
  `TMStamp` char(14) NOT NULL DEFAULT '',&lt;br /&gt;
  PRIMARY KEY  (`ID`),&lt;br /&gt;
  KEY `PrincipalID` (`PrincipalID`)&lt;br /&gt;
) ENGINE=MyISAM;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect to your MySQL (Linux commands shown):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mysql --user=$mysqluser --password=$mysqlpassword $databasename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace $mysqluser, $mysqlpassword, and $databasename with your specific configuration.&lt;br /&gt;
&lt;br /&gt;
At the mysql prompt, source the offline.sql file to configure your database to hold offline IMs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; source offline.sql&lt;br /&gt;
... ensure no error messages appear here ...&lt;br /&gt;
mysql&amp;gt; quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 2: offline.php ===&lt;br /&gt;
Copy this PHP script to a file called offline.php and upload the script file to your web server.&lt;br /&gt;
&lt;br /&gt;
Open the offline.php file to set the following parameters.&amp;lt;br&amp;gt; &lt;br /&gt;
C_DB_HOST, C_DB_DATABASE, C_DB_USER, C_DB_PASS, C_DB_TABLE&amp;lt;br&amp;gt;&lt;br /&gt;
Add the required data between the &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
C_DB_HOST = the hostname of the server thats running mysql&lt;br /&gt;
C_DB_DATABASE = is the database where the offline table is stored&lt;br /&gt;
C_DB_USER = database user you are useing for accesing the offline table&lt;br /&gt;
C_DB_PASS = user passwd that belongs to the use that you set in C_DB_USER&lt;br /&gt;
C_DB_TABLE = table name for offline. default it's offline.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/* Script based on the code you can find at http://opensimulator.org/wiki/Offline_Messaging &lt;br /&gt;
 * @author: Richardus Raymaker -&amp;gt; http:\\www.simsquaremetaverse.nl&lt;br /&gt;
 * @date: 2013-03-23&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
define(&amp;quot;C_DB_HOST&amp;quot;      ,&amp;quot;localhost&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_DATABASE&amp;quot;  ,&amp;quot;gridservices&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_USER&amp;quot;      ,&amp;quot;offline&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_PASS&amp;quot;      ,&amp;quot;#off4me#&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_TABLE&amp;quot;     ,&amp;quot;offline&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/*---*/&lt;br /&gt;
    function SplitIM($httpRaw)&lt;br /&gt;
    {&lt;br /&gt;
        $ImHeaderStartFunc = strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($ImHeaderStartFunc!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $ImHeaderStartFunc+=2;&lt;br /&gt;
            $httpRawFunc = substr($httpRaw,$ImHeaderStartFunc);&lt;br /&gt;
            $ImPartsFunc = preg_split('[&amp;lt;|&amp;gt;]',$httpRaw);&lt;br /&gt;
            &lt;br /&gt;
            return $ImPartsFunc;&lt;br /&gt;
        }    &lt;br /&gt;
    }&lt;br /&gt;
/*---*/&lt;br /&gt;
&lt;br /&gt;
/*----------*/&lt;br /&gt;
if (isset($_SERVER[&amp;quot;PATH_INFO&amp;quot;]))&lt;br /&gt;
{&lt;br /&gt;
    $urlPath = $_SERVER[&amp;quot;PATH_INFO&amp;quot;];&lt;br /&gt;
    $httpRaw = $HTTP_RAW_POST_DATA;&lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/SaveMessage/&amp;quot;)&lt;br /&gt;
    {&lt;br /&gt;
        $start=strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($start!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $httpRaw=substr($httpRaw,$start+2);&lt;br /&gt;
        &lt;br /&gt;
            /*Open offline database*/&lt;br /&gt;
            $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
            if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); exit; } &lt;br /&gt;
            mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
            &lt;br /&gt;
            /*find toAgent UUID*/&lt;br /&gt;
            $ImParts = SplitIM($httpRaw);&lt;br /&gt;
            $toAgentID=$ImParts[array_search(&amp;quot;toAgentID&amp;quot;,$ImParts)+1];&lt;br /&gt;
            $TMStamp=$ImParts[array_search(&amp;quot;timestamp&amp;quot;,$ImParts)+1];&lt;br /&gt;
&lt;br /&gt;
            /* Store messgae in database and inform user the message is saved */&lt;br /&gt;
            mysqli_query($link,&amp;quot;insert into &amp;quot;.C_DB_TABLE.&amp;quot; (PrincipalID, Message, TMStamp) values ('&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$httpRaw). &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$TMStamp) . &amp;quot;')&amp;quot;);&lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;true&amp;lt;/boolean&amp;gt;&amp;quot;;            &lt;br /&gt;
&lt;br /&gt;
            /*Close offline database*/&lt;br /&gt;
            mysqli_close($link);      &lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {   &lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;false&amp;lt;/boolean&amp;gt;&amp;quot;;&lt;br /&gt;
        }    &lt;br /&gt;
        exit;   &lt;br /&gt;
    } &lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/RetrieveMessages/&amp;quot;)&lt;br /&gt;
    { &lt;br /&gt;
        $ImParts = SplitIM($httpRaw);&lt;br /&gt;
        $toAgentID=$ImParts[array_search(&amp;quot;Guid&amp;quot;,$ImParts)+1];&lt;br /&gt;
        &lt;br /&gt;
        /*Open offline database*/&lt;br /&gt;
        $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
        if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); exit; } &lt;br /&gt;
        mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;select Message from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;' ORDER BY ID ASC, TMStamp ASC&amp;quot;);        &lt;br /&gt;
        &lt;br /&gt;
        /* Send offline IM messgaes to user */&lt;br /&gt;
        echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;ArrayOfGridInstantMessage xmlns:xsi=\&amp;quot;http://www.w3.org/2001/XMLSchema-instance\&amp;quot; xmlns:xsd=\&amp;quot;http://www.w3.org/2001/XMLSchema\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        while ($row =  mysqli_fetch_array($queryresult, MYSQL_NUM)) &lt;br /&gt;
        {&lt;br /&gt;
            echo $row[0];&lt;br /&gt;
        }&lt;br /&gt;
        echo &amp;quot;&amp;lt;/ArrayOfGridInstantMessage&amp;gt;&amp;quot;; &lt;br /&gt;
        &lt;br /&gt;
        /* Delete message after send it to user */&lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;delete from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;'&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        /*Close offline database*/&lt;br /&gt;
        mysqli_close($link); &lt;br /&gt;
        &lt;br /&gt;
        exit;          &lt;br /&gt;
    }     &lt;br /&gt;
}  &lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 3: OfflineMessageModule ===&lt;br /&gt;
Shutdown your simulator.&lt;br /&gt;
&lt;br /&gt;
Edit the OpenSim.ini [Messaging] block.&lt;br /&gt;
&lt;br /&gt;
An example configuration is shown below:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Messaging]&lt;br /&gt;
; Control which region module is used for instant messaging.&lt;br /&gt;
; Default is InstantMessageModule (this is the name of the core IM module as well as the setting)&lt;br /&gt;
InstantMessageModule = InstantMessageModule&lt;br /&gt;
; MessageTransferModule = MessageTransferModule&lt;br /&gt;
OfflineMessageModule = OfflineMessageModule&lt;br /&gt;
OfflineMessageURL = http://yourserver/offline.php&lt;br /&gt;
MuteListModule = MuteListModule&lt;br /&gt;
MuteListURL = http://yourserver/mute.php&lt;br /&gt;
ForwardOfflineGroupMessages = true&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
P.D: The MuteListModule and URL must be uncommented in order for the offline module to work, even if there is no mute.php file in the web folder.&lt;br /&gt;
&lt;br /&gt;
Once the edits are made, save your OpenSim.ini and restart your simulator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Using the OfflineMessageModule ===&lt;br /&gt;
&lt;br /&gt;
Login and try to send a message to an offline person.&lt;br /&gt;
You should see the message: &amp;quot;System: User is not logged in. Message saved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you see &amp;quot;Message not saved.&amp;quot; check your web server error log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are using XAMPP or WAMP or other apache based webserver and you get error&lt;br /&gt;
&lt;br /&gt;
messages like, ''File does not exist: /var/www/offline_im/RetrieveMessages/''.&lt;br /&gt;
&lt;br /&gt;
Then you need to enable the ''mod_rewrite.so'' module in apache.&lt;br /&gt;
&lt;br /&gt;
You also need to create .htaccess file that's placed inside the directory where you have also the offline php files.&lt;br /&gt;
&lt;br /&gt;
the .htaccess file would look like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_URI}  &amp;quot;!^/index.php$&amp;quot;&lt;br /&gt;
RewriteRule &amp;quot;^(.*)$&amp;quot; &amp;quot;index.php&amp;quot; [L]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli</id>
		<title>Offline Instant Messaging with php Mysqli</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli"/>
				<updated>2013-03-24T14:09:25Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* STEP 2: offline.php */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Offline Messaging makes it possible to send IM's to people who are not online.&lt;br /&gt;
&lt;br /&gt;
Instead, the messages are saved to a database and delivered the next time the recipient logs in.&lt;br /&gt;
&lt;br /&gt;
=== Disclaimer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Please note that these are third party modules which you use at your own risk!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenSimulator takes no responsibility for these modules.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 1: offline.sql ===&lt;br /&gt;
Save these SQL commands to an offline.sql file on your MySQL server.&amp;lt;br&amp;gt;&lt;br /&gt;
Or copy the sql query to phpmyadmin and after execute the query, go to step 2.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `offline` (&lt;br /&gt;
  `ID` MEDIUMINT NOT NULL AUTO_INCREMENT,&lt;br /&gt;
  `PrincipalID` char(36) NOT NULL DEFAULT '',&lt;br /&gt;
  `Message` text NOT NULL,&lt;br /&gt;
  `TMStamp` char(14) NOT NULL DEFAULT '',&lt;br /&gt;
  PRIMARY KEY  (`ID`),&lt;br /&gt;
  KEY `PrincipalID` (`PrincipalID`)&lt;br /&gt;
) ENGINE=MyISAM;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect to your MySQL (Linux commands shown):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mysql --user=$mysqluser --password=$mysqlpassword $databasename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace $mysqluser, $mysqlpassword, and $databasename with your specific configuration.&lt;br /&gt;
&lt;br /&gt;
At the mysql prompt, source the offline.sql file to configure your database to hold offline IMs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; source offline.sql&lt;br /&gt;
... ensure no error messages appear here ...&lt;br /&gt;
mysql&amp;gt; quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 2: offline.php ===&lt;br /&gt;
Copy this PHP script to a file called offline.php and upload the script file to your web server.&lt;br /&gt;
&lt;br /&gt;
Open the offline.php file to set the following parameters.&amp;lt;br&amp;gt; &lt;br /&gt;
C_DB_HOST, C_DB_DATABASE, C_DB_USER, C_DB_PASS, C_DB_TABLE&amp;lt;br&amp;gt;&lt;br /&gt;
Add the required data between the &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
C_DB_HOST = the hostname of the server thats running mysql&lt;br /&gt;
C_DB_DATABASE = is the database where the offline table is stored&lt;br /&gt;
C_DB_USER = database user you are useing for accesing the offline table&lt;br /&gt;
C_DB_PASS = user passwd that belongs to the use that you set in C_DB_USER&lt;br /&gt;
C_DB_TABLE = table name for offline. default it's offline.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
/* Script based on the code you can find at http://opensimulator.org/wiki/Offline_Messaging &lt;br /&gt;
 * @author: Richardus Raymaker -&amp;gt; http:\\www.simsquaremetaverse.nl&lt;br /&gt;
 * @date: 2013-03-23&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
define(&amp;quot;C_DB_HOST&amp;quot;      ,&amp;quot;localhost&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_DATABASE&amp;quot;  ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_USER&amp;quot;      ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_PASS&amp;quot;      ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_TABLE&amp;quot;     ,&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/*---*/&lt;br /&gt;
    function SplitIM($httpRaw)&lt;br /&gt;
    {&lt;br /&gt;
        $ImHeaderStartFunc = strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($ImHeaderStartFunc!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $ImHeaderStartFunc+=2;&lt;br /&gt;
            $httpRawFunc = substr($httpRaw,$ImHeaderStartFunc);&lt;br /&gt;
            $ImPartsFunc = preg_split('[&amp;lt;|&amp;gt;]',$httpRaw);&lt;br /&gt;
            &lt;br /&gt;
            return $ImPartsFunc;&lt;br /&gt;
        }    &lt;br /&gt;
    }&lt;br /&gt;
/*---*/&lt;br /&gt;
&lt;br /&gt;
/*----------*/&lt;br /&gt;
if (isset($_SERVER[&amp;quot;PATH_INFO&amp;quot;]))&lt;br /&gt;
{&lt;br /&gt;
    $urlPath = $_SERVER[&amp;quot;PATH_INFO&amp;quot;];&lt;br /&gt;
    $httpRaw = $HTTP_RAW_POST_DATA;&lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/SaveMessage/&amp;quot;)&lt;br /&gt;
    {&lt;br /&gt;
        $start=strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($start!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $httpRaw=substr($httpRaw,$start+2);&lt;br /&gt;
        &lt;br /&gt;
            /*Open offline database*/&lt;br /&gt;
            $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
            if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); exit; } &lt;br /&gt;
            mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
            &lt;br /&gt;
            /*find toAgent UUID*/&lt;br /&gt;
            $ImParts = SplitIM($httpRaw);&lt;br /&gt;
            $toAgentID=$ImParts[array_search(&amp;quot;toAgentID&amp;quot;,$ImParts)+1];&lt;br /&gt;
            $TMStamp=$ImParts[array_search(&amp;quot;timestamp&amp;quot;,$ImParts)+1];&lt;br /&gt;
&lt;br /&gt;
            /* Store messgae in database and inform user the message is saved */&lt;br /&gt;
            mysqli_query($link,&amp;quot;insert into &amp;quot;.C_DB_TABLE.&amp;quot; (PrincipalID, Message, TMStamp) values ('&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$httpRaw). &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$TMStamp) . &amp;quot;')&amp;quot;);&lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;true&amp;lt;/boolean&amp;gt;&amp;quot;;            &lt;br /&gt;
&lt;br /&gt;
            /*Close offline database*/&lt;br /&gt;
            mysqli_close($link);      &lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {   &lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;false&amp;lt;/boolean&amp;gt;&amp;quot;;&lt;br /&gt;
        }    &lt;br /&gt;
        exit;   &lt;br /&gt;
    } &lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/RetrieveMessages/&amp;quot;)&lt;br /&gt;
    { &lt;br /&gt;
        error_log($httpRaw);&lt;br /&gt;
        $ImParts = SplitIM($httpRaw);&lt;br /&gt;
        $toAgentID=$ImParts[array_search(&amp;quot;Guid&amp;quot;,$ImParts)+1];&lt;br /&gt;
        error_log($toAgentID);     &lt;br /&gt;
        &lt;br /&gt;
        /*Open offline database*/&lt;br /&gt;
        $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
        if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); exit; } &lt;br /&gt;
        mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;select Message from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;' ORDER BY ID ASC, TMStamp ASC&amp;quot;);        &lt;br /&gt;
        &lt;br /&gt;
        /* Send offline IM messgaes to user */&lt;br /&gt;
        echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;ArrayOfGridInstantMessage xmlns:xsi=\&amp;quot;http://www.w3.org/2001/XMLSchema-instance\&amp;quot; xmlns:xsd=\&amp;quot;http://www.w3.org/2001/XMLSchema\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        while ($row =  mysqli_fetch_array($queryresult, MYSQL_NUM)) &lt;br /&gt;
        {&lt;br /&gt;
            echo $row[0];&lt;br /&gt;
        }&lt;br /&gt;
        echo &amp;quot;&amp;lt;/ArrayOfGridInstantMessage&amp;gt;&amp;quot;; &lt;br /&gt;
        &lt;br /&gt;
        /* Delete message after send it to user */&lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;delete from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;'&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        /*Close offline database*/&lt;br /&gt;
        mysqli_close($link); &lt;br /&gt;
        &lt;br /&gt;
        exit;          &lt;br /&gt;
    }     &lt;br /&gt;
}  &lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 3: OfflineMessageModule ===&lt;br /&gt;
Shutdown your simulator.&lt;br /&gt;
&lt;br /&gt;
Edit the OpenSim.ini [Messaging] block.&lt;br /&gt;
&lt;br /&gt;
An example configuration is shown below:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Messaging]&lt;br /&gt;
; Control which region module is used for instant messaging.&lt;br /&gt;
; Default is InstantMessageModule (this is the name of the core IM module as well as the setting)&lt;br /&gt;
InstantMessageModule = InstantMessageModule&lt;br /&gt;
; MessageTransferModule = MessageTransferModule&lt;br /&gt;
OfflineMessageModule = OfflineMessageModule&lt;br /&gt;
OfflineMessageURL = http://yourserver/offline.php&lt;br /&gt;
MuteListModule = MuteListModule&lt;br /&gt;
MuteListURL = http://yourserver/mute.php&lt;br /&gt;
ForwardOfflineGroupMessages = true&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
P.D: The MuteListModule and URL must be uncommented in order for the offline module to work, even if there is no mute.php file in the web folder.&lt;br /&gt;
&lt;br /&gt;
Once the edits are made, save your OpenSim.ini and restart your simulator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Using the OfflineMessageModule ===&lt;br /&gt;
&lt;br /&gt;
Login and try to send a message to an offline person.&lt;br /&gt;
You should see the message: &amp;quot;System: User is not logged in. Message saved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you see &amp;quot;Message not saved.&amp;quot; check your web server error log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are using XAMPP or WAMP or other apache based webserver and you get error&lt;br /&gt;
&lt;br /&gt;
messages like, ''File does not exist: /var/www/offline_im/RetrieveMessages/''.&lt;br /&gt;
&lt;br /&gt;
Then you need to enable the ''mod_rewrite.so'' module in apache.&lt;br /&gt;
&lt;br /&gt;
You also need to create .htaccess file that's placed inside the directory where you have also the offline php files.&lt;br /&gt;
&lt;br /&gt;
the .htaccess file would look like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_URI}  &amp;quot;!^/index.php$&amp;quot;&lt;br /&gt;
RewriteRule &amp;quot;^(.*)$&amp;quot; &amp;quot;index.php&amp;quot; [L]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli</id>
		<title>Offline Instant Messaging with php Mysqli</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli"/>
				<updated>2013-03-24T13:29:12Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* STEP 1: offline.sql */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Offline Messaging makes it possible to send IM's to people who are not online.&lt;br /&gt;
&lt;br /&gt;
Instead, the messages are saved to a database and delivered the next time the recipient logs in.&lt;br /&gt;
&lt;br /&gt;
=== Disclaimer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Please note that these are third party modules which you use at your own risk!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenSimulator takes no responsibility for these modules.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 1: offline.sql ===&lt;br /&gt;
Save these SQL commands to an offline.sql file on your MySQL server.&amp;lt;br&amp;gt;&lt;br /&gt;
Or copy the sql query to phpmyadmin and after execute the query, go to step 2.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `offline` (&lt;br /&gt;
  `ID` MEDIUMINT NOT NULL AUTO_INCREMENT,&lt;br /&gt;
  `PrincipalID` char(36) NOT NULL DEFAULT '',&lt;br /&gt;
  `Message` text NOT NULL,&lt;br /&gt;
  `TMStamp` char(14) NOT NULL DEFAULT '',&lt;br /&gt;
  PRIMARY KEY  (`ID`),&lt;br /&gt;
  KEY `PrincipalID` (`PrincipalID`)&lt;br /&gt;
) ENGINE=MyISAM;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect to your MySQL (Linux commands shown):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mysql --user=$mysqluser --password=$mysqlpassword $databasename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace $mysqluser, $mysqlpassword, and $databasename with your specific configuration.&lt;br /&gt;
&lt;br /&gt;
At the mysql prompt, source the offline.sql file to configure your database to hold offline IMs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; source offline.sql&lt;br /&gt;
... ensure no error messages appear here ...&lt;br /&gt;
mysql&amp;gt; quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 2: offline.php ===&lt;br /&gt;
Copy this PHP script to a file called offline.php and upload the script file to your web server.&lt;br /&gt;
&lt;br /&gt;
Open the offline.php file to set the following parameters.&amp;lt;br&amp;gt; &lt;br /&gt;
C_DB_HOST, C_DB_DATABASE, C_DB_USER, C_DB_PASS, C_DB_TABLE&amp;lt;br&amp;gt;&lt;br /&gt;
Add the required data between the &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
C_DB_HOST = the hostname of the server thats running mysql&lt;br /&gt;
C_DB_DATABASE = is the database where the offline table is stored&lt;br /&gt;
C_DB_USER = database user you are useing for accesing the offline table&lt;br /&gt;
C_DB_PASS = user passwd that belongs to the use that you set in C_DB_USER&lt;br /&gt;
C_DB_TABLE = table name for offline. default it's offline.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
/* Script based on the code you can find at http://opensimulator.org/wiki/Offline_Messaging &lt;br /&gt;
 * @author: Richardus Raymaker -&amp;gt; http:\\www.simsquaremetaverse.nl&lt;br /&gt;
 * @date: 2013-03-23&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
define(&amp;quot;C_DB_HOST&amp;quot;      ,&amp;quot;localhost&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_DATABASE&amp;quot;  ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_USER&amp;quot;      ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_PASS&amp;quot;      ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_TABLE&amp;quot;     ,&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/*---*/&lt;br /&gt;
    function SplitIM($httpRaw)&lt;br /&gt;
    {&lt;br /&gt;
        $ImHeaderStartFunc = strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($ImHeaderStartFunc!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $ImHeaderStartFunc+=2;&lt;br /&gt;
            $httpRawFunc = substr($httpRaw,$ImHeaderStartFunc);&lt;br /&gt;
            $ImPartsFunc = preg_split('[&amp;lt;|&amp;gt;]',$httpRaw);&lt;br /&gt;
            &lt;br /&gt;
            return $ImPartsFunc;&lt;br /&gt;
        }    &lt;br /&gt;
    }&lt;br /&gt;
/*---*/&lt;br /&gt;
&lt;br /&gt;
/*----------*/&lt;br /&gt;
if (isset($_SERVER[&amp;quot;PATH_INFO&amp;quot;]))&lt;br /&gt;
{&lt;br /&gt;
    $urlPath = $_SERVER[&amp;quot;PATH_INFO&amp;quot;];&lt;br /&gt;
    $httpRaw = $HTTP_RAW_POST_DATA;&lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/SaveMessage/&amp;quot;)&lt;br /&gt;
    {&lt;br /&gt;
        $start=strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($start!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $httpRaw=substr($httpRaw,$start+2);&lt;br /&gt;
        &lt;br /&gt;
            /*Open offline database*/&lt;br /&gt;
            $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
            if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); error_log(&amp;quot;SaveMessage died&amp;quot;); exit; } &lt;br /&gt;
            mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
            &lt;br /&gt;
            /*find toAgent UUID*/&lt;br /&gt;
            $ImParts = SplitIM($httpRaw);&lt;br /&gt;
            $toAgentID=$ImParts[array_search(&amp;quot;toAgentID&amp;quot;,$ImParts)+1];&lt;br /&gt;
            $TMStamp=$ImParts[array_search(&amp;quot;timestamp&amp;quot;,$ImParts)+1];&lt;br /&gt;
&lt;br /&gt;
            /* Store messgae in database and inform user the message is saved */&lt;br /&gt;
            mysqli_query($link,&amp;quot;insert into &amp;quot;.C_DB_TABLE.&amp;quot; (PrincipalID, Message, TMStamp) values ('&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$httpRaw). &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$TMStamp) . &amp;quot;')&amp;quot;);&lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;true&amp;lt;/boolean&amp;gt;&amp;quot;;            &lt;br /&gt;
&lt;br /&gt;
            /*Close offline database*/&lt;br /&gt;
            mysqli_close($link);      &lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {   &lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;false&amp;lt;/boolean&amp;gt;&amp;quot;;&lt;br /&gt;
        }    &lt;br /&gt;
        exit;   &lt;br /&gt;
    } &lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/RetrieveMessages/&amp;quot;)&lt;br /&gt;
    { &lt;br /&gt;
        error_log($httpRaw);&lt;br /&gt;
        $ImParts = SplitIM($httpRaw);&lt;br /&gt;
        $toAgentID=$ImParts[array_search(&amp;quot;Guid&amp;quot;,$ImParts)+1];&lt;br /&gt;
        error_log($toAgentID);     &lt;br /&gt;
        &lt;br /&gt;
        /*Open offline database*/&lt;br /&gt;
        $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
        if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); error_log(&amp;quot;RecieveMessage died&amp;quot;); exit; } &lt;br /&gt;
        mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;select Message from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;' ORDER BY ID ASC, TMStamp ASC&amp;quot;);        &lt;br /&gt;
        &lt;br /&gt;
        /* Send offline IM messgaes to user */&lt;br /&gt;
        echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;ArrayOfGridInstantMessage xmlns:xsi=\&amp;quot;http://www.w3.org/2001/XMLSchema-instance\&amp;quot; xmlns:xsd=\&amp;quot;http://www.w3.org/2001/XMLSchema\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        while ($row =  mysqli_fetch_array($queryresult, MYSQL_NUM)) &lt;br /&gt;
        {&lt;br /&gt;
            echo $row[0];&lt;br /&gt;
        }&lt;br /&gt;
        echo &amp;quot;&amp;lt;/ArrayOfGridInstantMessage&amp;gt;&amp;quot;; &lt;br /&gt;
        &lt;br /&gt;
        /* Delete message after send it to user */&lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;delete from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;'&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        /*Close offline database*/&lt;br /&gt;
        mysqli_close($link); &lt;br /&gt;
        &lt;br /&gt;
        exit;          &lt;br /&gt;
    }     &lt;br /&gt;
}  &lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 3: OfflineMessageModule ===&lt;br /&gt;
Shutdown your simulator.&lt;br /&gt;
&lt;br /&gt;
Edit the OpenSim.ini [Messaging] block.&lt;br /&gt;
&lt;br /&gt;
An example configuration is shown below:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Messaging]&lt;br /&gt;
; Control which region module is used for instant messaging.&lt;br /&gt;
; Default is InstantMessageModule (this is the name of the core IM module as well as the setting)&lt;br /&gt;
InstantMessageModule = InstantMessageModule&lt;br /&gt;
; MessageTransferModule = MessageTransferModule&lt;br /&gt;
OfflineMessageModule = OfflineMessageModule&lt;br /&gt;
OfflineMessageURL = http://yourserver/offline.php&lt;br /&gt;
MuteListModule = MuteListModule&lt;br /&gt;
MuteListURL = http://yourserver/mute.php&lt;br /&gt;
ForwardOfflineGroupMessages = true&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
P.D: The MuteListModule and URL must be uncommented in order for the offline module to work, even if there is no mute.php file in the web folder.&lt;br /&gt;
&lt;br /&gt;
Once the edits are made, save your OpenSim.ini and restart your simulator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Using the OfflineMessageModule ===&lt;br /&gt;
&lt;br /&gt;
Login and try to send a message to an offline person.&lt;br /&gt;
You should see the message: &amp;quot;System: User is not logged in. Message saved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you see &amp;quot;Message not saved.&amp;quot; check your web server error log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are using XAMPP or WAMP or other apache based webserver and you get error&lt;br /&gt;
&lt;br /&gt;
messages like, ''File does not exist: /var/www/offline_im/RetrieveMessages/''.&lt;br /&gt;
&lt;br /&gt;
Then you need to enable the ''mod_rewrite.so'' module in apache.&lt;br /&gt;
&lt;br /&gt;
You also need to create .htaccess file that's placed inside the directory where you have also the offline php files.&lt;br /&gt;
&lt;br /&gt;
the .htaccess file would look like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_URI}  &amp;quot;!^/index.php$&amp;quot;&lt;br /&gt;
RewriteRule &amp;quot;^(.*)$&amp;quot; &amp;quot;index.php&amp;quot; [L]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli</id>
		<title>Offline Instant Messaging with php Mysqli</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli"/>
				<updated>2013-03-24T13:28:16Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* STEP 2: offline.php */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Offline Messaging makes it possible to send IM's to people who are not online.&lt;br /&gt;
&lt;br /&gt;
Instead, the messages are saved to a database and delivered the next time the recipient logs in.&lt;br /&gt;
&lt;br /&gt;
=== Disclaimer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Please note that these are third party modules which you use at your own risk!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenSimulator takes no responsibility for these modules.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 1: offline.sql ===&lt;br /&gt;
Save these SQL commands to an offline.sql file on your MySQL server.&amp;lt;br&amp;gt;&lt;br /&gt;
Or copy the sql query to phpmyadmin and after execute the query, go to step 2.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `offline` (&lt;br /&gt;
  `ID` MEDIUMINT NOT NULL AUTO_INCREMENT,&lt;br /&gt;
  `PrincipalID` char(36) NOT NULL DEFAULT '',&lt;br /&gt;
  `Message` text NOT NULL,&lt;br /&gt;
  `TMStamp` char(14) NOT NULL DEFAULT '',&lt;br /&gt;
  PRIMARY KEY  (`ID`),&lt;br /&gt;
  KEY `PrincipalID` (`PrincipalID`)&lt;br /&gt;
) ENGINE=MyISAM;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect to your MySQL (Linux commands shown):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mysql --user=$mysqluser --password=$mysqlpassword $databasename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace $mysqluser, $mysqlpassword, and $databasename with your specific configuration.&lt;br /&gt;
&lt;br /&gt;
At the mysql prompt, source the offline.sql file to configure your database to hold offline IMs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; source offline.sql&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 2: offline.php ===&lt;br /&gt;
Copy this PHP script to a file called offline.php and upload the script file to your web server.&lt;br /&gt;
&lt;br /&gt;
Open the offline.php file to set the following parameters.&amp;lt;br&amp;gt; &lt;br /&gt;
C_DB_HOST, C_DB_DATABASE, C_DB_USER, C_DB_PASS, C_DB_TABLE&amp;lt;br&amp;gt;&lt;br /&gt;
Add the required data between the &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
C_DB_HOST = the hostname of the server thats running mysql&lt;br /&gt;
C_DB_DATABASE = is the database where the offline table is stored&lt;br /&gt;
C_DB_USER = database user you are useing for accesing the offline table&lt;br /&gt;
C_DB_PASS = user passwd that belongs to the use that you set in C_DB_USER&lt;br /&gt;
C_DB_TABLE = table name for offline. default it's offline.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
/* Script based on the code you can find at http://opensimulator.org/wiki/Offline_Messaging &lt;br /&gt;
 * @author: Richardus Raymaker -&amp;gt; http:\\www.simsquaremetaverse.nl&lt;br /&gt;
 * @date: 2013-03-23&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
define(&amp;quot;C_DB_HOST&amp;quot;      ,&amp;quot;localhost&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_DATABASE&amp;quot;  ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_USER&amp;quot;      ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_PASS&amp;quot;      ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_TABLE&amp;quot;     ,&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/*---*/&lt;br /&gt;
    function SplitIM($httpRaw)&lt;br /&gt;
    {&lt;br /&gt;
        $ImHeaderStartFunc = strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($ImHeaderStartFunc!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $ImHeaderStartFunc+=2;&lt;br /&gt;
            $httpRawFunc = substr($httpRaw,$ImHeaderStartFunc);&lt;br /&gt;
            $ImPartsFunc = preg_split('[&amp;lt;|&amp;gt;]',$httpRaw);&lt;br /&gt;
            &lt;br /&gt;
            return $ImPartsFunc;&lt;br /&gt;
        }    &lt;br /&gt;
    }&lt;br /&gt;
/*---*/&lt;br /&gt;
&lt;br /&gt;
/*----------*/&lt;br /&gt;
if (isset($_SERVER[&amp;quot;PATH_INFO&amp;quot;]))&lt;br /&gt;
{&lt;br /&gt;
    $urlPath = $_SERVER[&amp;quot;PATH_INFO&amp;quot;];&lt;br /&gt;
    $httpRaw = $HTTP_RAW_POST_DATA;&lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/SaveMessage/&amp;quot;)&lt;br /&gt;
    {&lt;br /&gt;
        $start=strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($start!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $httpRaw=substr($httpRaw,$start+2);&lt;br /&gt;
        &lt;br /&gt;
            /*Open offline database*/&lt;br /&gt;
            $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
            if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); error_log(&amp;quot;SaveMessage died&amp;quot;); exit; } &lt;br /&gt;
            mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
            &lt;br /&gt;
            /*find toAgent UUID*/&lt;br /&gt;
            $ImParts = SplitIM($httpRaw);&lt;br /&gt;
            $toAgentID=$ImParts[array_search(&amp;quot;toAgentID&amp;quot;,$ImParts)+1];&lt;br /&gt;
            $TMStamp=$ImParts[array_search(&amp;quot;timestamp&amp;quot;,$ImParts)+1];&lt;br /&gt;
&lt;br /&gt;
            /* Store messgae in database and inform user the message is saved */&lt;br /&gt;
            mysqli_query($link,&amp;quot;insert into &amp;quot;.C_DB_TABLE.&amp;quot; (PrincipalID, Message, TMStamp) values ('&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$httpRaw). &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$TMStamp) . &amp;quot;')&amp;quot;);&lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;true&amp;lt;/boolean&amp;gt;&amp;quot;;            &lt;br /&gt;
&lt;br /&gt;
            /*Close offline database*/&lt;br /&gt;
            mysqli_close($link);      &lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {   &lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;false&amp;lt;/boolean&amp;gt;&amp;quot;;&lt;br /&gt;
        }    &lt;br /&gt;
        exit;   &lt;br /&gt;
    } &lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/RetrieveMessages/&amp;quot;)&lt;br /&gt;
    { &lt;br /&gt;
        error_log($httpRaw);&lt;br /&gt;
        $ImParts = SplitIM($httpRaw);&lt;br /&gt;
        $toAgentID=$ImParts[array_search(&amp;quot;Guid&amp;quot;,$ImParts)+1];&lt;br /&gt;
        error_log($toAgentID);     &lt;br /&gt;
        &lt;br /&gt;
        /*Open offline database*/&lt;br /&gt;
        $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
        if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); error_log(&amp;quot;RecieveMessage died&amp;quot;); exit; } &lt;br /&gt;
        mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;select Message from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;' ORDER BY ID ASC, TMStamp ASC&amp;quot;);        &lt;br /&gt;
        &lt;br /&gt;
        /* Send offline IM messgaes to user */&lt;br /&gt;
        echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;ArrayOfGridInstantMessage xmlns:xsi=\&amp;quot;http://www.w3.org/2001/XMLSchema-instance\&amp;quot; xmlns:xsd=\&amp;quot;http://www.w3.org/2001/XMLSchema\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        while ($row =  mysqli_fetch_array($queryresult, MYSQL_NUM)) &lt;br /&gt;
        {&lt;br /&gt;
            echo $row[0];&lt;br /&gt;
        }&lt;br /&gt;
        echo &amp;quot;&amp;lt;/ArrayOfGridInstantMessage&amp;gt;&amp;quot;; &lt;br /&gt;
        &lt;br /&gt;
        /* Delete message after send it to user */&lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;delete from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;'&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        /*Close offline database*/&lt;br /&gt;
        mysqli_close($link); &lt;br /&gt;
        &lt;br /&gt;
        exit;          &lt;br /&gt;
    }     &lt;br /&gt;
}  &lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 3: OfflineMessageModule ===&lt;br /&gt;
Shutdown your simulator.&lt;br /&gt;
&lt;br /&gt;
Edit the OpenSim.ini [Messaging] block.&lt;br /&gt;
&lt;br /&gt;
An example configuration is shown below:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Messaging]&lt;br /&gt;
; Control which region module is used for instant messaging.&lt;br /&gt;
; Default is InstantMessageModule (this is the name of the core IM module as well as the setting)&lt;br /&gt;
InstantMessageModule = InstantMessageModule&lt;br /&gt;
; MessageTransferModule = MessageTransferModule&lt;br /&gt;
OfflineMessageModule = OfflineMessageModule&lt;br /&gt;
OfflineMessageURL = http://yourserver/offline.php&lt;br /&gt;
MuteListModule = MuteListModule&lt;br /&gt;
MuteListURL = http://yourserver/mute.php&lt;br /&gt;
ForwardOfflineGroupMessages = true&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
P.D: The MuteListModule and URL must be uncommented in order for the offline module to work, even if there is no mute.php file in the web folder.&lt;br /&gt;
&lt;br /&gt;
Once the edits are made, save your OpenSim.ini and restart your simulator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Using the OfflineMessageModule ===&lt;br /&gt;
&lt;br /&gt;
Login and try to send a message to an offline person.&lt;br /&gt;
You should see the message: &amp;quot;System: User is not logged in. Message saved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you see &amp;quot;Message not saved.&amp;quot; check your web server error log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are using XAMPP or WAMP or other apache based webserver and you get error&lt;br /&gt;
&lt;br /&gt;
messages like, ''File does not exist: /var/www/offline_im/RetrieveMessages/''.&lt;br /&gt;
&lt;br /&gt;
Then you need to enable the ''mod_rewrite.so'' module in apache.&lt;br /&gt;
&lt;br /&gt;
You also need to create .htaccess file that's placed inside the directory where you have also the offline php files.&lt;br /&gt;
&lt;br /&gt;
the .htaccess file would look like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_URI}  &amp;quot;!^/index.php$&amp;quot;&lt;br /&gt;
RewriteRule &amp;quot;^(.*)$&amp;quot; &amp;quot;index.php&amp;quot; [L]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli</id>
		<title>Offline Instant Messaging with php Mysqli</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli"/>
				<updated>2013-03-24T13:27:26Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* STEP 2: offline.php */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Offline Messaging makes it possible to send IM's to people who are not online.&lt;br /&gt;
&lt;br /&gt;
Instead, the messages are saved to a database and delivered the next time the recipient logs in.&lt;br /&gt;
&lt;br /&gt;
=== Disclaimer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Please note that these are third party modules which you use at your own risk!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenSimulator takes no responsibility for these modules.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 1: offline.sql ===&lt;br /&gt;
Save these SQL commands to an offline.sql file on your MySQL server.&amp;lt;br&amp;gt;&lt;br /&gt;
Or copy the sql query to phpmyadmin and after execute the query, go to step 2.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `offline` (&lt;br /&gt;
  `ID` MEDIUMINT NOT NULL AUTO_INCREMENT,&lt;br /&gt;
  `PrincipalID` char(36) NOT NULL DEFAULT '',&lt;br /&gt;
  `Message` text NOT NULL,&lt;br /&gt;
  `TMStamp` char(14) NOT NULL DEFAULT '',&lt;br /&gt;
  PRIMARY KEY  (`ID`),&lt;br /&gt;
  KEY `PrincipalID` (`PrincipalID`)&lt;br /&gt;
) ENGINE=MyISAM;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect to your MySQL (Linux commands shown):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mysql --user=$mysqluser --password=$mysqlpassword $databasename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace $mysqluser, $mysqlpassword, and $databasename with your specific configuration.&lt;br /&gt;
&lt;br /&gt;
At the mysql prompt, source the offline.sql file to configure your database to hold offline IMs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; source offline.sql&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 2: offline.php ===&lt;br /&gt;
Copy this PHP script to a file called offline.php and upload the script file to your web server.&lt;br /&gt;
&lt;br /&gt;
Open the offline.php file to set the following parameters.&amp;lt;br&amp;gt; &lt;br /&gt;
C_DB_HOST, C_DB_DATABASE, C_DB_USER, C_DB_PASS, C_DB_TABLE&amp;lt;br&amp;gt;&lt;br /&gt;
Add the required data between the &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
C_DB_HOST = the hostname of the server thats running mysql&lt;br /&gt;
C_DB_DATABASE = is the database where the offline table is stored&lt;br /&gt;
C_DB_USER = database user you are useing for accesing the offline table&lt;br /&gt;
C_DB_PASS = user passwd that belongs to the use that you set in C_DB_USER&lt;br /&gt;
C_DB_TABLE = table name for offline. default it's offline.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
/* Script based on the code you can find at http://opensimulator.org/wiki/Offline_Messaging &lt;br /&gt;
 * @author: Richardus Raymaker -&amp;gt; http:\\www.simsquaremetaverse.nl&lt;br /&gt;
 * @date: 2013-03-23&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
define(&amp;quot;C_DB_HOST&amp;quot;      ,&amp;quot;localhost&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_DATABASE&amp;quot;  ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_USER&amp;quot;      ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_PASS&amp;quot;      ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_TABLE&amp;quot;     ,&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/*---*/&lt;br /&gt;
    function SplitIM($httpRaw)&lt;br /&gt;
    {&lt;br /&gt;
        $ImHeaderStartFunc = strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($ImHeaderStartFunc!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $ImHeaderStartFunc+=2;&lt;br /&gt;
            $httpRawFunc = substr($httpRaw,$ImHeaderStartFunc);&lt;br /&gt;
            $ImPartsFunc = preg_split('[&amp;lt;|&amp;gt;]',$httpRaw);&lt;br /&gt;
            &lt;br /&gt;
            return $ImPartsFunc;&lt;br /&gt;
        }    &lt;br /&gt;
    }&lt;br /&gt;
/*---*/&lt;br /&gt;
&lt;br /&gt;
/*----------*/&lt;br /&gt;
if (isset($_SERVER[&amp;quot;PATH_INFO&amp;quot;]))&lt;br /&gt;
{&lt;br /&gt;
    $urlPath = $_SERVER[&amp;quot;PATH_INFO&amp;quot;];&lt;br /&gt;
    $httpRaw = $HTTP_RAW_POST_DATA;&lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/SaveMessage/&amp;quot;)&lt;br /&gt;
    {&lt;br /&gt;
        $start=strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($start!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $httpRaw=substr($httpRaw,$start+2);&lt;br /&gt;
        &lt;br /&gt;
            /*Open offline database*/&lt;br /&gt;
            $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
            if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); error_log(&amp;quot;SaveMessage died&amp;quot;); exit; } &lt;br /&gt;
            mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
            &lt;br /&gt;
            /*find toAgent UUID*/&lt;br /&gt;
            $ImParts = SplitIM($httpRaw);&lt;br /&gt;
            $toAgentID=$ImParts[array_search(&amp;quot;toAgentID&amp;quot;,$ImParts)+1];&lt;br /&gt;
            $TMStamp=$ImParts[array_search(&amp;quot;timestamp&amp;quot;,$ImParts)+1];&lt;br /&gt;
&lt;br /&gt;
            /* Store messgae in database and inform user the message is saved */&lt;br /&gt;
            mysqli_query($link,&amp;quot;insert into &amp;quot;.C_DB_TABLE.&amp;quot; (PrincipalID, Message, TMStamp) values ('&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$httpRaw). &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$TMStamp) . &amp;quot;')&amp;quot;);&lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;true&amp;lt;/boolean&amp;gt;&amp;quot;;            &lt;br /&gt;
&lt;br /&gt;
            /*Close offline database*/&lt;br /&gt;
            mysqli_close($link);      &lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {   &lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;false&amp;lt;/boolean&amp;gt;&amp;quot;;&lt;br /&gt;
        }    &lt;br /&gt;
        exit;   &lt;br /&gt;
    } &lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/RetrieveMessages/&amp;quot;)&lt;br /&gt;
    { &lt;br /&gt;
        error_log($httpRaw);&lt;br /&gt;
        $ImParts = SplitIM($httpRaw);&lt;br /&gt;
        $toAgentID=$ImParts[array_search(&amp;quot;Guid&amp;quot;,$ImParts)+1];&lt;br /&gt;
        error_log($toAgentID);     &lt;br /&gt;
        &lt;br /&gt;
        /*Open offline database*/&lt;br /&gt;
        $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
        if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); error_log(&amp;quot;RecieveMessage died&amp;quot;); exit; } &lt;br /&gt;
        mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;select Message from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;' ORDER BY ID ASC, TMStamp ASC&amp;quot;);        &lt;br /&gt;
        &lt;br /&gt;
        /* Send offline IM messgaes to user */&lt;br /&gt;
        echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;ArrayOfGridInstantMessage xmlns:xsi=\&amp;quot;http://www.w3.org/2001/XMLSchema-instance\&amp;quot; xmlns:xsd=\&amp;quot;http://www.w3.org/2001/XMLSchema\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        while ($row =  mysqli_fetch_array($queryresult, MYSQL_NUM)) &lt;br /&gt;
        {&lt;br /&gt;
            echo $row[0];&lt;br /&gt;
        }&lt;br /&gt;
        echo &amp;quot;&amp;lt;/ArrayOfGridInstantMessage&amp;gt;&amp;quot;; &lt;br /&gt;
        &lt;br /&gt;
        /* Delete message after send it to user */&lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;delete from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;'&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        /*Close offline database*/&lt;br /&gt;
        mysqli_close($link); &lt;br /&gt;
        &lt;br /&gt;
        exit;          &lt;br /&gt;
    }     &lt;br /&gt;
}  &lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
... ensure no error messages appear here ...&lt;br /&gt;
mysql&amp;gt; quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 3: OfflineMessageModule ===&lt;br /&gt;
Shutdown your simulator.&lt;br /&gt;
&lt;br /&gt;
Edit the OpenSim.ini [Messaging] block.&lt;br /&gt;
&lt;br /&gt;
An example configuration is shown below:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Messaging]&lt;br /&gt;
; Control which region module is used for instant messaging.&lt;br /&gt;
; Default is InstantMessageModule (this is the name of the core IM module as well as the setting)&lt;br /&gt;
InstantMessageModule = InstantMessageModule&lt;br /&gt;
; MessageTransferModule = MessageTransferModule&lt;br /&gt;
OfflineMessageModule = OfflineMessageModule&lt;br /&gt;
OfflineMessageURL = http://yourserver/offline.php&lt;br /&gt;
MuteListModule = MuteListModule&lt;br /&gt;
MuteListURL = http://yourserver/mute.php&lt;br /&gt;
ForwardOfflineGroupMessages = true&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
P.D: The MuteListModule and URL must be uncommented in order for the offline module to work, even if there is no mute.php file in the web folder.&lt;br /&gt;
&lt;br /&gt;
Once the edits are made, save your OpenSim.ini and restart your simulator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Using the OfflineMessageModule ===&lt;br /&gt;
&lt;br /&gt;
Login and try to send a message to an offline person.&lt;br /&gt;
You should see the message: &amp;quot;System: User is not logged in. Message saved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you see &amp;quot;Message not saved.&amp;quot; check your web server error log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are using XAMPP or WAMP or other apache based webserver and you get error&lt;br /&gt;
&lt;br /&gt;
messages like, ''File does not exist: /var/www/offline_im/RetrieveMessages/''.&lt;br /&gt;
&lt;br /&gt;
Then you need to enable the ''mod_rewrite.so'' module in apache.&lt;br /&gt;
&lt;br /&gt;
You also need to create .htaccess file that's placed inside the directory where you have also the offline php files.&lt;br /&gt;
&lt;br /&gt;
the .htaccess file would look like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_URI}  &amp;quot;!^/index.php$&amp;quot;&lt;br /&gt;
RewriteRule &amp;quot;^(.*)$&amp;quot; &amp;quot;index.php&amp;quot; [L]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli</id>
		<title>Offline Instant Messaging with php Mysqli</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli"/>
				<updated>2013-03-24T13:26:44Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* STEP 1: offline.sql */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Offline Messaging makes it possible to send IM's to people who are not online.&lt;br /&gt;
&lt;br /&gt;
Instead, the messages are saved to a database and delivered the next time the recipient logs in.&lt;br /&gt;
&lt;br /&gt;
=== Disclaimer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Please note that these are third party modules which you use at your own risk!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenSimulator takes no responsibility for these modules.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 1: offline.sql ===&lt;br /&gt;
Save these SQL commands to an offline.sql file on your MySQL server.&amp;lt;br&amp;gt;&lt;br /&gt;
Or copy the sql query to phpmyadmin and after execute the query, go to step 2.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `offline` (&lt;br /&gt;
  `ID` MEDIUMINT NOT NULL AUTO_INCREMENT,&lt;br /&gt;
  `PrincipalID` char(36) NOT NULL DEFAULT '',&lt;br /&gt;
  `Message` text NOT NULL,&lt;br /&gt;
  `TMStamp` char(14) NOT NULL DEFAULT '',&lt;br /&gt;
  PRIMARY KEY  (`ID`),&lt;br /&gt;
  KEY `PrincipalID` (`PrincipalID`)&lt;br /&gt;
) ENGINE=MyISAM;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect to your MySQL (Linux commands shown):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mysql --user=$mysqluser --password=$mysqlpassword $databasename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace $mysqluser, $mysqlpassword, and $databasename with your specific configuration.&lt;br /&gt;
&lt;br /&gt;
At the mysql prompt, source the offline.sql file to configure your database to hold offline IMs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; source offline.sql&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 2: offline.php ===&lt;br /&gt;
Copy this PHP script to a file called offline.php and upload the script file to your web server.&lt;br /&gt;
&lt;br /&gt;
Open the offline.php file to set the following parameters. &lt;br /&gt;
C_DB_HOST, C_DB_DATABASE, C_DB_USER, C_DB_PASS, C_DB_TABLE&lt;br /&gt;
Add the required data between the &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
C_DB_HOST = the hostname of the server thats running mysql&lt;br /&gt;
C_DB_DATABASE = is the database where the offline table is stored&lt;br /&gt;
C_DB_USER = database user you are useing for accesing the offline table&lt;br /&gt;
C_DB_PASS = user passwd that belongs to the use that you set in C_DB_USER&lt;br /&gt;
C_DB_TABLE = table name for offline. default it's offline.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
/* Script based on the code you can find at http://opensimulator.org/wiki/Offline_Messaging &lt;br /&gt;
 * @author: Richardus Raymaker -&amp;gt; http:\\www.simsquaremetaverse.nl&lt;br /&gt;
 * @date: 2013-03-23&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
define(&amp;quot;C_DB_HOST&amp;quot;      ,&amp;quot;localhost&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_DATABASE&amp;quot;  ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_USER&amp;quot;      ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_PASS&amp;quot;      ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_TABLE&amp;quot;     ,&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/*---*/&lt;br /&gt;
    function SplitIM($httpRaw)&lt;br /&gt;
    {&lt;br /&gt;
        $ImHeaderStartFunc = strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($ImHeaderStartFunc!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $ImHeaderStartFunc+=2;&lt;br /&gt;
            $httpRawFunc = substr($httpRaw,$ImHeaderStartFunc);&lt;br /&gt;
            $ImPartsFunc = preg_split('[&amp;lt;|&amp;gt;]',$httpRaw);&lt;br /&gt;
            &lt;br /&gt;
            return $ImPartsFunc;&lt;br /&gt;
        }    &lt;br /&gt;
    }&lt;br /&gt;
/*---*/&lt;br /&gt;
&lt;br /&gt;
/*----------*/&lt;br /&gt;
if (isset($_SERVER[&amp;quot;PATH_INFO&amp;quot;]))&lt;br /&gt;
{&lt;br /&gt;
    $urlPath = $_SERVER[&amp;quot;PATH_INFO&amp;quot;];&lt;br /&gt;
    $httpRaw = $HTTP_RAW_POST_DATA;&lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/SaveMessage/&amp;quot;)&lt;br /&gt;
    {&lt;br /&gt;
        $start=strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($start!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $httpRaw=substr($httpRaw,$start+2);&lt;br /&gt;
        &lt;br /&gt;
            /*Open offline database*/&lt;br /&gt;
            $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
            if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); error_log(&amp;quot;SaveMessage died&amp;quot;); exit; } &lt;br /&gt;
            mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
            &lt;br /&gt;
            /*find toAgent UUID*/&lt;br /&gt;
            $ImParts = SplitIM($httpRaw);&lt;br /&gt;
            $toAgentID=$ImParts[array_search(&amp;quot;toAgentID&amp;quot;,$ImParts)+1];&lt;br /&gt;
            $TMStamp=$ImParts[array_search(&amp;quot;timestamp&amp;quot;,$ImParts)+1];&lt;br /&gt;
&lt;br /&gt;
            /* Store messgae in database and inform user the message is saved */&lt;br /&gt;
            mysqli_query($link,&amp;quot;insert into &amp;quot;.C_DB_TABLE.&amp;quot; (PrincipalID, Message, TMStamp) values ('&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$httpRaw). &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$TMStamp) . &amp;quot;')&amp;quot;);&lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;true&amp;lt;/boolean&amp;gt;&amp;quot;;            &lt;br /&gt;
&lt;br /&gt;
            /*Close offline database*/&lt;br /&gt;
            mysqli_close($link);      &lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {   &lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;false&amp;lt;/boolean&amp;gt;&amp;quot;;&lt;br /&gt;
        }    &lt;br /&gt;
        exit;   &lt;br /&gt;
    } &lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/RetrieveMessages/&amp;quot;)&lt;br /&gt;
    { &lt;br /&gt;
        error_log($httpRaw);&lt;br /&gt;
        $ImParts = SplitIM($httpRaw);&lt;br /&gt;
        $toAgentID=$ImParts[array_search(&amp;quot;Guid&amp;quot;,$ImParts)+1];&lt;br /&gt;
        error_log($toAgentID);     &lt;br /&gt;
        &lt;br /&gt;
        /*Open offline database*/&lt;br /&gt;
        $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
        if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); error_log(&amp;quot;RecieveMessage died&amp;quot;); exit; } &lt;br /&gt;
        mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;select Message from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;' ORDER BY ID ASC, TMStamp ASC&amp;quot;);        &lt;br /&gt;
        &lt;br /&gt;
        /* Send offline IM messgaes to user */&lt;br /&gt;
        echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;ArrayOfGridInstantMessage xmlns:xsi=\&amp;quot;http://www.w3.org/2001/XMLSchema-instance\&amp;quot; xmlns:xsd=\&amp;quot;http://www.w3.org/2001/XMLSchema\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        while ($row =  mysqli_fetch_array($queryresult, MYSQL_NUM)) &lt;br /&gt;
        {&lt;br /&gt;
            echo $row[0];&lt;br /&gt;
        }&lt;br /&gt;
        echo &amp;quot;&amp;lt;/ArrayOfGridInstantMessage&amp;gt;&amp;quot;; &lt;br /&gt;
        &lt;br /&gt;
        /* Delete message after send it to user */&lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;delete from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;'&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        /*Close offline database*/&lt;br /&gt;
        mysqli_close($link); &lt;br /&gt;
        &lt;br /&gt;
        exit;          &lt;br /&gt;
    }     &lt;br /&gt;
}  &lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
... ensure no error messages appear here ...&lt;br /&gt;
mysql&amp;gt; quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 3: OfflineMessageModule ===&lt;br /&gt;
Shutdown your simulator.&lt;br /&gt;
&lt;br /&gt;
Edit the OpenSim.ini [Messaging] block.&lt;br /&gt;
&lt;br /&gt;
An example configuration is shown below:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Messaging]&lt;br /&gt;
; Control which region module is used for instant messaging.&lt;br /&gt;
; Default is InstantMessageModule (this is the name of the core IM module as well as the setting)&lt;br /&gt;
InstantMessageModule = InstantMessageModule&lt;br /&gt;
; MessageTransferModule = MessageTransferModule&lt;br /&gt;
OfflineMessageModule = OfflineMessageModule&lt;br /&gt;
OfflineMessageURL = http://yourserver/offline.php&lt;br /&gt;
MuteListModule = MuteListModule&lt;br /&gt;
MuteListURL = http://yourserver/mute.php&lt;br /&gt;
ForwardOfflineGroupMessages = true&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
P.D: The MuteListModule and URL must be uncommented in order for the offline module to work, even if there is no mute.php file in the web folder.&lt;br /&gt;
&lt;br /&gt;
Once the edits are made, save your OpenSim.ini and restart your simulator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Using the OfflineMessageModule ===&lt;br /&gt;
&lt;br /&gt;
Login and try to send a message to an offline person.&lt;br /&gt;
You should see the message: &amp;quot;System: User is not logged in. Message saved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you see &amp;quot;Message not saved.&amp;quot; check your web server error log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are using XAMPP or WAMP or other apache based webserver and you get error&lt;br /&gt;
&lt;br /&gt;
messages like, ''File does not exist: /var/www/offline_im/RetrieveMessages/''.&lt;br /&gt;
&lt;br /&gt;
Then you need to enable the ''mod_rewrite.so'' module in apache.&lt;br /&gt;
&lt;br /&gt;
You also need to create .htaccess file that's placed inside the directory where you have also the offline php files.&lt;br /&gt;
&lt;br /&gt;
the .htaccess file would look like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_URI}  &amp;quot;!^/index.php$&amp;quot;&lt;br /&gt;
RewriteRule &amp;quot;^(.*)$&amp;quot; &amp;quot;index.php&amp;quot; [L]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli</id>
		<title>Offline Instant Messaging with php Mysqli</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli"/>
				<updated>2013-03-24T13:26:13Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* STEP 1: offline.sql */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Offline Messaging makes it possible to send IM's to people who are not online.&lt;br /&gt;
&lt;br /&gt;
Instead, the messages are saved to a database and delivered the next time the recipient logs in.&lt;br /&gt;
&lt;br /&gt;
=== Disclaimer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Please note that these are third party modules which you use at your own risk!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenSimulator takes no responsibility for these modules.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 1: offline.sql ===&lt;br /&gt;
Save these SQL commands to an offline.sql file on your MySQL server.&amp;lt;br&amp;gt;&lt;br /&gt;
Or copy the sql query to phpmyadmin and after execute the querry goto step 2.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `offline` (&lt;br /&gt;
  `ID` MEDIUMINT NOT NULL AUTO_INCREMENT,&lt;br /&gt;
  `PrincipalID` char(36) NOT NULL DEFAULT '',&lt;br /&gt;
  `Message` text NOT NULL,&lt;br /&gt;
  `TMStamp` char(14) NOT NULL DEFAULT '',&lt;br /&gt;
  PRIMARY KEY  (`ID`),&lt;br /&gt;
  KEY `PrincipalID` (`PrincipalID`)&lt;br /&gt;
) ENGINE=MyISAM;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect to your MySQL (Linux commands shown):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mysql --user=$mysqluser --password=$mysqlpassword $databasename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace $mysqluser, $mysqlpassword, and $databasename with your specific configuration.&lt;br /&gt;
&lt;br /&gt;
At the mysql prompt, source the offline.sql file to configure your database to hold offline IMs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; source offline.sql&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 2: offline.php ===&lt;br /&gt;
Copy this PHP script to a file called offline.php and upload the script file to your web server.&lt;br /&gt;
&lt;br /&gt;
Open the offline.php file to set the following parameters. &lt;br /&gt;
C_DB_HOST, C_DB_DATABASE, C_DB_USER, C_DB_PASS, C_DB_TABLE&lt;br /&gt;
Add the required data between the &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
C_DB_HOST = the hostname of the server thats running mysql&lt;br /&gt;
C_DB_DATABASE = is the database where the offline table is stored&lt;br /&gt;
C_DB_USER = database user you are useing for accesing the offline table&lt;br /&gt;
C_DB_PASS = user passwd that belongs to the use that you set in C_DB_USER&lt;br /&gt;
C_DB_TABLE = table name for offline. default it's offline.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
/* Script based on the code you can find at http://opensimulator.org/wiki/Offline_Messaging &lt;br /&gt;
 * @author: Richardus Raymaker -&amp;gt; http:\\www.simsquaremetaverse.nl&lt;br /&gt;
 * @date: 2013-03-23&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
define(&amp;quot;C_DB_HOST&amp;quot;      ,&amp;quot;localhost&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_DATABASE&amp;quot;  ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_USER&amp;quot;      ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_PASS&amp;quot;      ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_TABLE&amp;quot;     ,&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/*---*/&lt;br /&gt;
    function SplitIM($httpRaw)&lt;br /&gt;
    {&lt;br /&gt;
        $ImHeaderStartFunc = strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($ImHeaderStartFunc!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $ImHeaderStartFunc+=2;&lt;br /&gt;
            $httpRawFunc = substr($httpRaw,$ImHeaderStartFunc);&lt;br /&gt;
            $ImPartsFunc = preg_split('[&amp;lt;|&amp;gt;]',$httpRaw);&lt;br /&gt;
            &lt;br /&gt;
            return $ImPartsFunc;&lt;br /&gt;
        }    &lt;br /&gt;
    }&lt;br /&gt;
/*---*/&lt;br /&gt;
&lt;br /&gt;
/*----------*/&lt;br /&gt;
if (isset($_SERVER[&amp;quot;PATH_INFO&amp;quot;]))&lt;br /&gt;
{&lt;br /&gt;
    $urlPath = $_SERVER[&amp;quot;PATH_INFO&amp;quot;];&lt;br /&gt;
    $httpRaw = $HTTP_RAW_POST_DATA;&lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/SaveMessage/&amp;quot;)&lt;br /&gt;
    {&lt;br /&gt;
        $start=strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($start!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $httpRaw=substr($httpRaw,$start+2);&lt;br /&gt;
        &lt;br /&gt;
            /*Open offline database*/&lt;br /&gt;
            $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
            if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); error_log(&amp;quot;SaveMessage died&amp;quot;); exit; } &lt;br /&gt;
            mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
            &lt;br /&gt;
            /*find toAgent UUID*/&lt;br /&gt;
            $ImParts = SplitIM($httpRaw);&lt;br /&gt;
            $toAgentID=$ImParts[array_search(&amp;quot;toAgentID&amp;quot;,$ImParts)+1];&lt;br /&gt;
            $TMStamp=$ImParts[array_search(&amp;quot;timestamp&amp;quot;,$ImParts)+1];&lt;br /&gt;
&lt;br /&gt;
            /* Store messgae in database and inform user the message is saved */&lt;br /&gt;
            mysqli_query($link,&amp;quot;insert into &amp;quot;.C_DB_TABLE.&amp;quot; (PrincipalID, Message, TMStamp) values ('&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$httpRaw). &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$TMStamp) . &amp;quot;')&amp;quot;);&lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;true&amp;lt;/boolean&amp;gt;&amp;quot;;            &lt;br /&gt;
&lt;br /&gt;
            /*Close offline database*/&lt;br /&gt;
            mysqli_close($link);      &lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {   &lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;false&amp;lt;/boolean&amp;gt;&amp;quot;;&lt;br /&gt;
        }    &lt;br /&gt;
        exit;   &lt;br /&gt;
    } &lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/RetrieveMessages/&amp;quot;)&lt;br /&gt;
    { &lt;br /&gt;
        error_log($httpRaw);&lt;br /&gt;
        $ImParts = SplitIM($httpRaw);&lt;br /&gt;
        $toAgentID=$ImParts[array_search(&amp;quot;Guid&amp;quot;,$ImParts)+1];&lt;br /&gt;
        error_log($toAgentID);     &lt;br /&gt;
        &lt;br /&gt;
        /*Open offline database*/&lt;br /&gt;
        $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
        if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); error_log(&amp;quot;RecieveMessage died&amp;quot;); exit; } &lt;br /&gt;
        mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;select Message from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;' ORDER BY ID ASC, TMStamp ASC&amp;quot;);        &lt;br /&gt;
        &lt;br /&gt;
        /* Send offline IM messgaes to user */&lt;br /&gt;
        echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;ArrayOfGridInstantMessage xmlns:xsi=\&amp;quot;http://www.w3.org/2001/XMLSchema-instance\&amp;quot; xmlns:xsd=\&amp;quot;http://www.w3.org/2001/XMLSchema\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        while ($row =  mysqli_fetch_array($queryresult, MYSQL_NUM)) &lt;br /&gt;
        {&lt;br /&gt;
            echo $row[0];&lt;br /&gt;
        }&lt;br /&gt;
        echo &amp;quot;&amp;lt;/ArrayOfGridInstantMessage&amp;gt;&amp;quot;; &lt;br /&gt;
        &lt;br /&gt;
        /* Delete message after send it to user */&lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;delete from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;'&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        /*Close offline database*/&lt;br /&gt;
        mysqli_close($link); &lt;br /&gt;
        &lt;br /&gt;
        exit;          &lt;br /&gt;
    }     &lt;br /&gt;
}  &lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
... ensure no error messages appear here ...&lt;br /&gt;
mysql&amp;gt; quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 3: OfflineMessageModule ===&lt;br /&gt;
Shutdown your simulator.&lt;br /&gt;
&lt;br /&gt;
Edit the OpenSim.ini [Messaging] block.&lt;br /&gt;
&lt;br /&gt;
An example configuration is shown below:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Messaging]&lt;br /&gt;
; Control which region module is used for instant messaging.&lt;br /&gt;
; Default is InstantMessageModule (this is the name of the core IM module as well as the setting)&lt;br /&gt;
InstantMessageModule = InstantMessageModule&lt;br /&gt;
; MessageTransferModule = MessageTransferModule&lt;br /&gt;
OfflineMessageModule = OfflineMessageModule&lt;br /&gt;
OfflineMessageURL = http://yourserver/offline.php&lt;br /&gt;
MuteListModule = MuteListModule&lt;br /&gt;
MuteListURL = http://yourserver/mute.php&lt;br /&gt;
ForwardOfflineGroupMessages = true&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
P.D: The MuteListModule and URL must be uncommented in order for the offline module to work, even if there is no mute.php file in the web folder.&lt;br /&gt;
&lt;br /&gt;
Once the edits are made, save your OpenSim.ini and restart your simulator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Using the OfflineMessageModule ===&lt;br /&gt;
&lt;br /&gt;
Login and try to send a message to an offline person.&lt;br /&gt;
You should see the message: &amp;quot;System: User is not logged in. Message saved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you see &amp;quot;Message not saved.&amp;quot; check your web server error log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are using XAMPP or WAMP or other apache based webserver and you get error&lt;br /&gt;
&lt;br /&gt;
messages like, ''File does not exist: /var/www/offline_im/RetrieveMessages/''.&lt;br /&gt;
&lt;br /&gt;
Then you need to enable the ''mod_rewrite.so'' module in apache.&lt;br /&gt;
&lt;br /&gt;
You also need to create .htaccess file that's placed inside the directory where you have also the offline php files.&lt;br /&gt;
&lt;br /&gt;
the .htaccess file would look like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_URI}  &amp;quot;!^/index.php$&amp;quot;&lt;br /&gt;
RewriteRule &amp;quot;^(.*)$&amp;quot; &amp;quot;index.php&amp;quot; [L]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli</id>
		<title>Offline Instant Messaging with php Mysqli</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli"/>
				<updated>2013-03-24T13:25:12Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* STEP 1: offline.sql */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Offline Messaging makes it possible to send IM's to people who are not online.&lt;br /&gt;
&lt;br /&gt;
Instead, the messages are saved to a database and delivered the next time the recipient logs in.&lt;br /&gt;
&lt;br /&gt;
=== Disclaimer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Please note that these are third party modules which you use at your own risk!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenSimulator takes no responsibility for these modules.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 1: offline.sql ===&lt;br /&gt;
Save these SQL commands to an offline.sql file on your MySQL server.&lt;br /&gt;
Or copy the sql query to phpmyadmin.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `offline` (&lt;br /&gt;
  `ID` MEDIUMINT NOT NULL AUTO_INCREMENT,&lt;br /&gt;
  `PrincipalID` char(36) NOT NULL DEFAULT '',&lt;br /&gt;
  `Message` text NOT NULL,&lt;br /&gt;
  `TMStamp` char(14) NOT NULL DEFAULT '',&lt;br /&gt;
  PRIMARY KEY  (`ID`),&lt;br /&gt;
  KEY `PrincipalID` (`PrincipalID`)&lt;br /&gt;
) ENGINE=MyISAM;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect to your MySQL (Linux commands shown):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mysql --user=$mysqluser --password=$mysqlpassword $databasename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace $mysqluser, $mysqlpassword, and $databasename with your specific configuration.&lt;br /&gt;
&lt;br /&gt;
At the mysql prompt, source the offline.sql file to configure your database to hold offline IMs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; source offline.sql&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 2: offline.php ===&lt;br /&gt;
Copy this PHP script to a file called offline.php and upload the script file to your web server.&lt;br /&gt;
&lt;br /&gt;
Open the offline.php file to set the following parameters. &lt;br /&gt;
C_DB_HOST, C_DB_DATABASE, C_DB_USER, C_DB_PASS, C_DB_TABLE&lt;br /&gt;
Add the required data between the &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
C_DB_HOST = the hostname of the server thats running mysql&lt;br /&gt;
C_DB_DATABASE = is the database where the offline table is stored&lt;br /&gt;
C_DB_USER = database user you are useing for accesing the offline table&lt;br /&gt;
C_DB_PASS = user passwd that belongs to the use that you set in C_DB_USER&lt;br /&gt;
C_DB_TABLE = table name for offline. default it's offline.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
/* Script based on the code you can find at http://opensimulator.org/wiki/Offline_Messaging &lt;br /&gt;
 * @author: Richardus Raymaker -&amp;gt; http:\\www.simsquaremetaverse.nl&lt;br /&gt;
 * @date: 2013-03-23&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
define(&amp;quot;C_DB_HOST&amp;quot;      ,&amp;quot;localhost&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_DATABASE&amp;quot;  ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_USER&amp;quot;      ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_PASS&amp;quot;      ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_TABLE&amp;quot;     ,&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/*---*/&lt;br /&gt;
    function SplitIM($httpRaw)&lt;br /&gt;
    {&lt;br /&gt;
        $ImHeaderStartFunc = strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($ImHeaderStartFunc!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $ImHeaderStartFunc+=2;&lt;br /&gt;
            $httpRawFunc = substr($httpRaw,$ImHeaderStartFunc);&lt;br /&gt;
            $ImPartsFunc = preg_split('[&amp;lt;|&amp;gt;]',$httpRaw);&lt;br /&gt;
            &lt;br /&gt;
            return $ImPartsFunc;&lt;br /&gt;
        }    &lt;br /&gt;
    }&lt;br /&gt;
/*---*/&lt;br /&gt;
&lt;br /&gt;
/*----------*/&lt;br /&gt;
if (isset($_SERVER[&amp;quot;PATH_INFO&amp;quot;]))&lt;br /&gt;
{&lt;br /&gt;
    $urlPath = $_SERVER[&amp;quot;PATH_INFO&amp;quot;];&lt;br /&gt;
    $httpRaw = $HTTP_RAW_POST_DATA;&lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/SaveMessage/&amp;quot;)&lt;br /&gt;
    {&lt;br /&gt;
        $start=strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($start!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $httpRaw=substr($httpRaw,$start+2);&lt;br /&gt;
        &lt;br /&gt;
            /*Open offline database*/&lt;br /&gt;
            $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
            if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); error_log(&amp;quot;SaveMessage died&amp;quot;); exit; } &lt;br /&gt;
            mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
            &lt;br /&gt;
            /*find toAgent UUID*/&lt;br /&gt;
            $ImParts = SplitIM($httpRaw);&lt;br /&gt;
            $toAgentID=$ImParts[array_search(&amp;quot;toAgentID&amp;quot;,$ImParts)+1];&lt;br /&gt;
            $TMStamp=$ImParts[array_search(&amp;quot;timestamp&amp;quot;,$ImParts)+1];&lt;br /&gt;
&lt;br /&gt;
            /* Store messgae in database and inform user the message is saved */&lt;br /&gt;
            mysqli_query($link,&amp;quot;insert into &amp;quot;.C_DB_TABLE.&amp;quot; (PrincipalID, Message, TMStamp) values ('&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$httpRaw). &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$TMStamp) . &amp;quot;')&amp;quot;);&lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;true&amp;lt;/boolean&amp;gt;&amp;quot;;            &lt;br /&gt;
&lt;br /&gt;
            /*Close offline database*/&lt;br /&gt;
            mysqli_close($link);      &lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {   &lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;false&amp;lt;/boolean&amp;gt;&amp;quot;;&lt;br /&gt;
        }    &lt;br /&gt;
        exit;   &lt;br /&gt;
    } &lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/RetrieveMessages/&amp;quot;)&lt;br /&gt;
    { &lt;br /&gt;
        error_log($httpRaw);&lt;br /&gt;
        $ImParts = SplitIM($httpRaw);&lt;br /&gt;
        $toAgentID=$ImParts[array_search(&amp;quot;Guid&amp;quot;,$ImParts)+1];&lt;br /&gt;
        error_log($toAgentID);     &lt;br /&gt;
        &lt;br /&gt;
        /*Open offline database*/&lt;br /&gt;
        $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
        if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); error_log(&amp;quot;RecieveMessage died&amp;quot;); exit; } &lt;br /&gt;
        mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;select Message from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;' ORDER BY ID ASC, TMStamp ASC&amp;quot;);        &lt;br /&gt;
        &lt;br /&gt;
        /* Send offline IM messgaes to user */&lt;br /&gt;
        echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;ArrayOfGridInstantMessage xmlns:xsi=\&amp;quot;http://www.w3.org/2001/XMLSchema-instance\&amp;quot; xmlns:xsd=\&amp;quot;http://www.w3.org/2001/XMLSchema\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        while ($row =  mysqli_fetch_array($queryresult, MYSQL_NUM)) &lt;br /&gt;
        {&lt;br /&gt;
            echo $row[0];&lt;br /&gt;
        }&lt;br /&gt;
        echo &amp;quot;&amp;lt;/ArrayOfGridInstantMessage&amp;gt;&amp;quot;; &lt;br /&gt;
        &lt;br /&gt;
        /* Delete message after send it to user */&lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;delete from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;'&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        /*Close offline database*/&lt;br /&gt;
        mysqli_close($link); &lt;br /&gt;
        &lt;br /&gt;
        exit;          &lt;br /&gt;
    }     &lt;br /&gt;
}  &lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
... ensure no error messages appear here ...&lt;br /&gt;
mysql&amp;gt; quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 3: OfflineMessageModule ===&lt;br /&gt;
Shutdown your simulator.&lt;br /&gt;
&lt;br /&gt;
Edit the OpenSim.ini [Messaging] block.&lt;br /&gt;
&lt;br /&gt;
An example configuration is shown below:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Messaging]&lt;br /&gt;
; Control which region module is used for instant messaging.&lt;br /&gt;
; Default is InstantMessageModule (this is the name of the core IM module as well as the setting)&lt;br /&gt;
InstantMessageModule = InstantMessageModule&lt;br /&gt;
; MessageTransferModule = MessageTransferModule&lt;br /&gt;
OfflineMessageModule = OfflineMessageModule&lt;br /&gt;
OfflineMessageURL = http://yourserver/offline.php&lt;br /&gt;
MuteListModule = MuteListModule&lt;br /&gt;
MuteListURL = http://yourserver/mute.php&lt;br /&gt;
ForwardOfflineGroupMessages = true&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
P.D: The MuteListModule and URL must be uncommented in order for the offline module to work, even if there is no mute.php file in the web folder.&lt;br /&gt;
&lt;br /&gt;
Once the edits are made, save your OpenSim.ini and restart your simulator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Using the OfflineMessageModule ===&lt;br /&gt;
&lt;br /&gt;
Login and try to send a message to an offline person.&lt;br /&gt;
You should see the message: &amp;quot;System: User is not logged in. Message saved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you see &amp;quot;Message not saved.&amp;quot; check your web server error log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are using XAMPP or WAMP or other apache based webserver and you get error&lt;br /&gt;
&lt;br /&gt;
messages like, ''File does not exist: /var/www/offline_im/RetrieveMessages/''.&lt;br /&gt;
&lt;br /&gt;
Then you need to enable the ''mod_rewrite.so'' module in apache.&lt;br /&gt;
&lt;br /&gt;
You also need to create .htaccess file that's placed inside the directory where you have also the offline php files.&lt;br /&gt;
&lt;br /&gt;
the .htaccess file would look like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_URI}  &amp;quot;!^/index.php$&amp;quot;&lt;br /&gt;
RewriteRule &amp;quot;^(.*)$&amp;quot; &amp;quot;index.php&amp;quot; [L]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli</id>
		<title>Offline Instant Messaging with php Mysqli</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli"/>
				<updated>2013-03-24T13:19:58Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* STEP 2: offline.php */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Offline Messaging makes it possible to send IM's to people who are not online.&lt;br /&gt;
&lt;br /&gt;
Instead, the messages are saved to a database and delivered the next time the recipient logs in.&lt;br /&gt;
&lt;br /&gt;
=== Disclaimer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Please note that these are third party modules which you use at your own risk!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenSimulator takes no responsibility for these modules.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 1: offline.sql ===&lt;br /&gt;
Save these SQL commands to an Offline_IM.sql file on your MySQL server.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `offline` (&lt;br /&gt;
  `ID` MEDIUMINT NOT NULL AUTO_INCREMENT,&lt;br /&gt;
  `PrincipalID` char(36) NOT NULL DEFAULT '',&lt;br /&gt;
  `Message` text NOT NULL,&lt;br /&gt;
  `TMStamp` char(14) NOT NULL DEFAULT '',&lt;br /&gt;
  PRIMARY KEY  (`ID`),&lt;br /&gt;
  KEY `PrincipalID` (`PrincipalID`)&lt;br /&gt;
) ENGINE=MyISAM;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect to your MySQL (Linux commands shown):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mysql --user=$mysqluser --password=$mysqlpassword $databasename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace $mysqluser, $mysqlpassword, and $databasename with your specific configuration.&lt;br /&gt;
&lt;br /&gt;
At the mysql prompt, source the offline.sql file to configure your database to hold offline IMs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; source offline.sql&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 2: offline.php ===&lt;br /&gt;
Copy this PHP script to a file called offline.php and upload the script file to your web server.&lt;br /&gt;
&lt;br /&gt;
Open the offline.php file to set the following parameters. &lt;br /&gt;
C_DB_HOST, C_DB_DATABASE, C_DB_USER, C_DB_PASS, C_DB_TABLE&lt;br /&gt;
Add the required data between the &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
C_DB_HOST = the hostname of the server thats running mysql&lt;br /&gt;
C_DB_DATABASE = is the database where the offline table is stored&lt;br /&gt;
C_DB_USER = database user you are useing for accesing the offline table&lt;br /&gt;
C_DB_PASS = user passwd that belongs to the use that you set in C_DB_USER&lt;br /&gt;
C_DB_TABLE = table name for offline. default it's offline.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
/* Script based on the code you can find at http://opensimulator.org/wiki/Offline_Messaging &lt;br /&gt;
 * @author: Richardus Raymaker -&amp;gt; http:\\www.simsquaremetaverse.nl&lt;br /&gt;
 * @date: 2013-03-23&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
define(&amp;quot;C_DB_HOST&amp;quot;      ,&amp;quot;localhost&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_DATABASE&amp;quot;  ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_USER&amp;quot;      ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_PASS&amp;quot;      ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_TABLE&amp;quot;     ,&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/*---*/&lt;br /&gt;
    function SplitIM($httpRaw)&lt;br /&gt;
    {&lt;br /&gt;
        $ImHeaderStartFunc = strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($ImHeaderStartFunc!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $ImHeaderStartFunc+=2;&lt;br /&gt;
            $httpRawFunc = substr($httpRaw,$ImHeaderStartFunc);&lt;br /&gt;
            $ImPartsFunc = preg_split('[&amp;lt;|&amp;gt;]',$httpRaw);&lt;br /&gt;
            &lt;br /&gt;
            return $ImPartsFunc;&lt;br /&gt;
        }    &lt;br /&gt;
    }&lt;br /&gt;
/*---*/&lt;br /&gt;
&lt;br /&gt;
/*----------*/&lt;br /&gt;
if (isset($_SERVER[&amp;quot;PATH_INFO&amp;quot;]))&lt;br /&gt;
{&lt;br /&gt;
    $urlPath = $_SERVER[&amp;quot;PATH_INFO&amp;quot;];&lt;br /&gt;
    $httpRaw = $HTTP_RAW_POST_DATA;&lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/SaveMessage/&amp;quot;)&lt;br /&gt;
    {&lt;br /&gt;
        $start=strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($start!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $httpRaw=substr($httpRaw,$start+2);&lt;br /&gt;
        &lt;br /&gt;
            /*Open offline database*/&lt;br /&gt;
            $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
            if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); error_log(&amp;quot;SaveMessage died&amp;quot;); exit; } &lt;br /&gt;
            mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
            &lt;br /&gt;
            /*find toAgent UUID*/&lt;br /&gt;
            $ImParts = SplitIM($httpRaw);&lt;br /&gt;
            $toAgentID=$ImParts[array_search(&amp;quot;toAgentID&amp;quot;,$ImParts)+1];&lt;br /&gt;
            $TMStamp=$ImParts[array_search(&amp;quot;timestamp&amp;quot;,$ImParts)+1];&lt;br /&gt;
&lt;br /&gt;
            /* Store messgae in database and inform user the message is saved */&lt;br /&gt;
            mysqli_query($link,&amp;quot;insert into &amp;quot;.C_DB_TABLE.&amp;quot; (PrincipalID, Message, TMStamp) values ('&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$httpRaw). &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$TMStamp) . &amp;quot;')&amp;quot;);&lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;true&amp;lt;/boolean&amp;gt;&amp;quot;;            &lt;br /&gt;
&lt;br /&gt;
            /*Close offline database*/&lt;br /&gt;
            mysqli_close($link);      &lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {   &lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;false&amp;lt;/boolean&amp;gt;&amp;quot;;&lt;br /&gt;
        }    &lt;br /&gt;
        exit;   &lt;br /&gt;
    } &lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/RetrieveMessages/&amp;quot;)&lt;br /&gt;
    { &lt;br /&gt;
        error_log($httpRaw);&lt;br /&gt;
        $ImParts = SplitIM($httpRaw);&lt;br /&gt;
        $toAgentID=$ImParts[array_search(&amp;quot;Guid&amp;quot;,$ImParts)+1];&lt;br /&gt;
        error_log($toAgentID);     &lt;br /&gt;
        &lt;br /&gt;
        /*Open offline database*/&lt;br /&gt;
        $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
        if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); error_log(&amp;quot;RecieveMessage died&amp;quot;); exit; } &lt;br /&gt;
        mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;select Message from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;' ORDER BY ID ASC, TMStamp ASC&amp;quot;);        &lt;br /&gt;
        &lt;br /&gt;
        /* Send offline IM messgaes to user */&lt;br /&gt;
        echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;ArrayOfGridInstantMessage xmlns:xsi=\&amp;quot;http://www.w3.org/2001/XMLSchema-instance\&amp;quot; xmlns:xsd=\&amp;quot;http://www.w3.org/2001/XMLSchema\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        while ($row =  mysqli_fetch_array($queryresult, MYSQL_NUM)) &lt;br /&gt;
        {&lt;br /&gt;
            echo $row[0];&lt;br /&gt;
        }&lt;br /&gt;
        echo &amp;quot;&amp;lt;/ArrayOfGridInstantMessage&amp;gt;&amp;quot;; &lt;br /&gt;
        &lt;br /&gt;
        /* Delete message after send it to user */&lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;delete from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;'&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        /*Close offline database*/&lt;br /&gt;
        mysqli_close($link); &lt;br /&gt;
        &lt;br /&gt;
        exit;          &lt;br /&gt;
    }     &lt;br /&gt;
}  &lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
... ensure no error messages appear here ...&lt;br /&gt;
mysql&amp;gt; quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 3: OfflineMessageModule ===&lt;br /&gt;
Shutdown your simulator.&lt;br /&gt;
&lt;br /&gt;
Edit the OpenSim.ini [Messaging] block.&lt;br /&gt;
&lt;br /&gt;
An example configuration is shown below:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Messaging]&lt;br /&gt;
; Control which region module is used for instant messaging.&lt;br /&gt;
; Default is InstantMessageModule (this is the name of the core IM module as well as the setting)&lt;br /&gt;
InstantMessageModule = InstantMessageModule&lt;br /&gt;
; MessageTransferModule = MessageTransferModule&lt;br /&gt;
OfflineMessageModule = OfflineMessageModule&lt;br /&gt;
OfflineMessageURL = http://yourserver/offline.php&lt;br /&gt;
MuteListModule = MuteListModule&lt;br /&gt;
MuteListURL = http://yourserver/mute.php&lt;br /&gt;
ForwardOfflineGroupMessages = true&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
P.D: The MuteListModule and URL must be uncommented in order for the offline module to work, even if there is no mute.php file in the web folder.&lt;br /&gt;
&lt;br /&gt;
Once the edits are made, save your OpenSim.ini and restart your simulator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Using the OfflineMessageModule ===&lt;br /&gt;
&lt;br /&gt;
Login and try to send a message to an offline person.&lt;br /&gt;
You should see the message: &amp;quot;System: User is not logged in. Message saved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you see &amp;quot;Message not saved.&amp;quot; check your web server error log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are using XAMPP or WAMP or other apache based webserver and you get error&lt;br /&gt;
&lt;br /&gt;
messages like, ''File does not exist: /var/www/offline_im/RetrieveMessages/''.&lt;br /&gt;
&lt;br /&gt;
Then you need to enable the ''mod_rewrite.so'' module in apache.&lt;br /&gt;
&lt;br /&gt;
You also need to create .htaccess file that's placed inside the directory where you have also the offline php files.&lt;br /&gt;
&lt;br /&gt;
the .htaccess file would look like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_URI}  &amp;quot;!^/index.php$&amp;quot;&lt;br /&gt;
RewriteRule &amp;quot;^(.*)$&amp;quot; &amp;quot;index.php&amp;quot; [L]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli</id>
		<title>Offline Instant Messaging with php Mysqli</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli"/>
				<updated>2013-03-24T13:18:20Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* Using the OfflineMessageModule */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Offline Messaging makes it possible to send IM's to people who are not online.&lt;br /&gt;
&lt;br /&gt;
Instead, the messages are saved to a database and delivered the next time the recipient logs in.&lt;br /&gt;
&lt;br /&gt;
=== Disclaimer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Please note that these are third party modules which you use at your own risk!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenSimulator takes no responsibility for these modules.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 1: offline.sql ===&lt;br /&gt;
Save these SQL commands to an Offline_IM.sql file on your MySQL server.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `offline` (&lt;br /&gt;
  `ID` MEDIUMINT NOT NULL AUTO_INCREMENT,&lt;br /&gt;
  `PrincipalID` char(36) NOT NULL DEFAULT '',&lt;br /&gt;
  `Message` text NOT NULL,&lt;br /&gt;
  `TMStamp` char(14) NOT NULL DEFAULT '',&lt;br /&gt;
  PRIMARY KEY  (`ID`),&lt;br /&gt;
  KEY `PrincipalID` (`PrincipalID`)&lt;br /&gt;
) ENGINE=MyISAM;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect to your MySQL (Linux commands shown):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mysql --user=$mysqluser --password=$mysqlpassword $databasename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace $mysqluser, $mysqlpassword, and $databasename with your specific configuration.&lt;br /&gt;
&lt;br /&gt;
At the mysql prompt, source the offline.sql file to configure your database to hold offline IMs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; source offline.sql&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 2: offline.php ===&lt;br /&gt;
Copy this PHP script to a file called offline.php and upload the script file to your web server.&lt;br /&gt;
&lt;br /&gt;
Open the offline.php file to set the following parameters. &lt;br /&gt;
C_DB_HOST, C_DB_DATABASE, C_DB_USER, C_DB_PASS, C_DB_TABLE&lt;br /&gt;
Add the required data between the &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
C_DB_HOST = the hostname of the server thats running mysql&lt;br /&gt;
C_DB_DATABASE = is the database where the offline table is stored&lt;br /&gt;
C_DB_USER = database user you are useing for accesing the offline table&lt;br /&gt;
C_DB_PASS = user passwd that belongs to the use that you set in C_DB_USER&lt;br /&gt;
C_DB_TABLE = table name for offline. default it's offline.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
/* Script based on the code you can find at http://opensimulator.org/wiki/Offline_Messaging &lt;br /&gt;
 * @author: Richardus Raymaker -&amp;gt; http:\\www.simsquaremetaverse.nl&lt;br /&gt;
 * @date: 2013-03-23&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
define(&amp;quot;C_DB_HOST&amp;quot;      ,&amp;quot;localhost&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_DATABASE&amp;quot;  ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_USER&amp;quot;      ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_PASS&amp;quot;      ,&amp;quot;&amp;quot;); &lt;br /&gt;
define(&amp;quot;C_DB_TABLE&amp;quot;     ,&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/*---*/&lt;br /&gt;
    function SplitIM($httpRaw)&lt;br /&gt;
    {&lt;br /&gt;
        $ImHeaderStartFunc = strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($ImHeaderStartFunc!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $ImHeaderStartFunc+=2;&lt;br /&gt;
            $httpRawFunc = substr($httpRaw,$ImHeaderStartFunc);&lt;br /&gt;
            $ImPartsFunc = preg_split('[&amp;lt;|&amp;gt;]',$httpRaw);&lt;br /&gt;
            &lt;br /&gt;
            return $ImPartsFunc;&lt;br /&gt;
        }    &lt;br /&gt;
    }&lt;br /&gt;
/*---*/&lt;br /&gt;
&lt;br /&gt;
/*----------*/&lt;br /&gt;
if (isset($_SERVER[&amp;quot;PATH_INFO&amp;quot;]))&lt;br /&gt;
{&lt;br /&gt;
    $urlPath = $_SERVER[&amp;quot;PATH_INFO&amp;quot;];&lt;br /&gt;
    $httpRaw = $HTTP_RAW_POST_DATA;&lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/SaveMessage/&amp;quot;)&lt;br /&gt;
    {&lt;br /&gt;
        $start=strpos($httpRaw,&amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
        if ($start!=-1)&lt;br /&gt;
        {&lt;br /&gt;
            $httpRaw=substr($httpRaw,$start+2);&lt;br /&gt;
        &lt;br /&gt;
            /*Open offline database*/&lt;br /&gt;
            $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
            if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); error_log(&amp;quot;SaveMessage died&amp;quot;); exit; } &lt;br /&gt;
            mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
            &lt;br /&gt;
            /*find toAgent UUID*/&lt;br /&gt;
            $ImParts = SplitIM($httpRaw);&lt;br /&gt;
            $toAgentID=$ImParts[array_search(&amp;quot;toAgentID&amp;quot;,$ImParts)+1];&lt;br /&gt;
            $TMStamp=$ImParts[array_search(&amp;quot;timestamp&amp;quot;,$ImParts)+1];&lt;br /&gt;
&lt;br /&gt;
            /* Store messgae in database and inform user the message is saved */&lt;br /&gt;
            mysqli_query($link,&amp;quot;insert into &amp;quot;.C_DB_TABLE.&amp;quot; (PrincipalID, Message, TMStamp) values ('&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$httpRaw). &amp;quot;',&lt;br /&gt;
                                                                                                   '&amp;quot; . mysqli_real_escape_string($link,$TMStamp) . &amp;quot;')&amp;quot;);&lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;true&amp;lt;/boolean&amp;gt;&amp;quot;;            &lt;br /&gt;
&lt;br /&gt;
            /*Close offline database*/&lt;br /&gt;
            mysqli_close($link);      &lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {   &lt;br /&gt;
            echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;false&amp;lt;/boolean&amp;gt;&amp;quot;;&lt;br /&gt;
        }    &lt;br /&gt;
        exit;   &lt;br /&gt;
    } &lt;br /&gt;
    &lt;br /&gt;
    if ($urlPath==&amp;quot;/RetrieveMessages/&amp;quot;)&lt;br /&gt;
    { &lt;br /&gt;
        error_log($httpRaw);&lt;br /&gt;
        $ImParts = SplitIM($httpRaw);&lt;br /&gt;
        $toAgentID=$ImParts[array_search(&amp;quot;Guid&amp;quot;,$ImParts)+1];&lt;br /&gt;
        error_log($toAgentID);     &lt;br /&gt;
        &lt;br /&gt;
        /*Open offline database*/&lt;br /&gt;
        $link = mysqli_connect(C_DB_HOST, C_DB_USER, C_DB_PASS, C_DB_DATABASE);&lt;br /&gt;
        if (!$link) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); error_log(&amp;quot;RecieveMessage died&amp;quot;); exit; } &lt;br /&gt;
        mysqli_set_charset($link, &amp;quot;utf8&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;select Message from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;' ORDER BY ID ASC, TMStamp ASC&amp;quot;);        &lt;br /&gt;
        &lt;br /&gt;
        /* Send offline IM messgaes to user */&lt;br /&gt;
        echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;ArrayOfGridInstantMessage xmlns:xsi=\&amp;quot;http://www.w3.org/2001/XMLSchema-instance\&amp;quot; xmlns:xsd=\&amp;quot;http://www.w3.org/2001/XMLSchema\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        while ($row =  mysqli_fetch_array($queryresult, MYSQL_NUM)) &lt;br /&gt;
        {&lt;br /&gt;
            echo $row[0];&lt;br /&gt;
        }&lt;br /&gt;
        echo &amp;quot;&amp;lt;/ArrayOfGridInstantMessage&amp;gt;&amp;quot;; &lt;br /&gt;
        &lt;br /&gt;
        /* Delete message after send it to user */&lt;br /&gt;
        $queryresult=mysqli_query($link,&amp;quot;delete from &amp;quot;.C_DB_TABLE.&amp;quot; where PrincipalID='&amp;quot; . mysqli_real_escape_string($link,$toAgentID) . &amp;quot;'&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        /*Close offline database*/&lt;br /&gt;
        mysqli_close($link); &lt;br /&gt;
        &lt;br /&gt;
        exit;          &lt;br /&gt;
    }     &lt;br /&gt;
}  &lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
... ensure no error messages appear here ...&lt;br /&gt;
mysql&amp;gt; quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== STEP 3: OfflineMessageModule ===&lt;br /&gt;
Shutdown your simulator.&lt;br /&gt;
&lt;br /&gt;
Edit the OpenSim.ini [Messaging] block.&lt;br /&gt;
&lt;br /&gt;
An example configuration is shown below:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Messaging]&lt;br /&gt;
; Control which region module is used for instant messaging.&lt;br /&gt;
; Default is InstantMessageModule (this is the name of the core IM module as well as the setting)&lt;br /&gt;
InstantMessageModule = InstantMessageModule&lt;br /&gt;
; MessageTransferModule = MessageTransferModule&lt;br /&gt;
OfflineMessageModule = OfflineMessageModule&lt;br /&gt;
OfflineMessageURL = http://yourserver/offline.php&lt;br /&gt;
MuteListModule = MuteListModule&lt;br /&gt;
MuteListURL = http://yourserver/mute.php&lt;br /&gt;
ForwardOfflineGroupMessages = true&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
P.D: The MuteListModule and URL must be uncommented in order for the offline module to work, even if there is no mute.php file in the web folder.&lt;br /&gt;
&lt;br /&gt;
Once the edits are made, save your OpenSim.ini and restart your simulator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Using the OfflineMessageModule ===&lt;br /&gt;
&lt;br /&gt;
Login and try to send a message to an offline person.&lt;br /&gt;
You should see the message: &amp;quot;System: User is not logged in. Message saved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you see &amp;quot;Message not saved.&amp;quot; check your web server error log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are using XAMPP or WAMP or other apache based webserver and you get error&lt;br /&gt;
&lt;br /&gt;
messages like, ''File does not exist: /var/www/offline_im/RetrieveMessages/''.&lt;br /&gt;
&lt;br /&gt;
Then you need to enable the ''mod_rewrite.so'' module in apache.&lt;br /&gt;
&lt;br /&gt;
You also need to create .htaccess file that's placed inside the directory where you have also the offline php files.&lt;br /&gt;
&lt;br /&gt;
the .htaccess file would look like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_URI}  &amp;quot;!^/index.php$&amp;quot;&lt;br /&gt;
RewriteRule &amp;quot;^(.*)$&amp;quot; &amp;quot;index.php&amp;quot; [L]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli</id>
		<title>Offline Instant Messaging with php Mysqli</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Offline_Instant_Messaging_with_php_Mysqli"/>
				<updated>2013-03-24T13:01:40Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: Created page with &amp;quot;=== Disclaimer === &amp;lt;b&amp;gt;Please note that these are third party modules which you use at your own risk!&amp;lt;br /&amp;gt; OpenSimulator takes no responsibility for these modules.&amp;lt;/b&amp;gt;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Disclaimer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Please note that these are third party modules which you use at your own risk!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenSimulator takes no responsibility for these modules.&amp;lt;/b&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Offline_Messaging</id>
		<title>Offline Messaging</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Offline_Messaging"/>
				<updated>2013-03-15T20:50:38Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* Using the OfflineMessageModule */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Quicklinks}}&lt;br /&gt;
&lt;br /&gt;
Offline Messaging makes it possible to send IM's to people who are not online.&lt;br /&gt;
&lt;br /&gt;
Instead, the messages are saved to a database and delivered the next time the recipient logs in.&lt;br /&gt;
&lt;br /&gt;
NOTE: Diva Canto has contributed a new [[Offline Instant Messaging v2]] module in 0.7.6 dev revision r/22086 which does not need an external PHP script.&lt;br /&gt;
&lt;br /&gt;
=== Disclaimer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Please note that these are third party modules which you use at your own risk!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenSimulator takes no responsibility for these modules.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OfflineMessagingModule Configuration Steps ===&lt;br /&gt;
The OfflineMessagingModule is already compiled and ready for use in current versions of OpenSimulator.&lt;br /&gt;
&lt;br /&gt;
However, you will need to setup the &amp;quot;back-end&amp;quot; database and PHP connector scripts to support the OfflineMessagingModule.&lt;br /&gt;
&lt;br /&gt;
# Configure the Offline_IM database table in your MySQL using commands in Offline_IM.sql (below)&lt;br /&gt;
# Upload the mysql.php (below) into your web server&lt;br /&gt;
# Upload the offline.php (below) into your web server&lt;br /&gt;
# Enable the OfflineMessagingModule in your OpenSim.ini file&lt;br /&gt;
&lt;br /&gt;
=== STEP 1: Offline_IM.sql ===&lt;br /&gt;
Save these SQL commands to an Offline_IM.sql file on your MySQL server.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE IF NOT EXISTS `Offline_IM` (&lt;br /&gt;
 `uuid` varchar(36) NOT NULL,&lt;br /&gt;
 `message` text NOT NULL,&lt;br /&gt;
  KEY `uuid` (`uuid`)&lt;br /&gt;
) ENGINE=MyISAM DEFAULT CHARSET=latin1;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect to your MySQL (Linux commands shown):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mysql --user=$mysqluser --password=$mysqlpassword $databasename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace $mysqluser, $mysqlpassword, and $databasename with your specific configuration.&lt;br /&gt;
&lt;br /&gt;
At the mysql prompt, source the Offline_IM.sql file to configure your database to hold offline IMs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; source Offline_IM.sql&lt;br /&gt;
... ensure no error messages appear here ...&lt;br /&gt;
mysql&amp;gt; quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 2: mysql.php ===&lt;br /&gt;
Copy this PHP script to a file called mysql.php and upload the script file to your web server.&lt;br /&gt;
&lt;br /&gt;
No edits of the script should be necessary.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/*&lt;br /&gt;
 * Copyright (c) 2007, 2008 Contributors, http://opensimulator.org/&lt;br /&gt;
 * See CONTRIBUTORS for a full list of copyright holders.&lt;br /&gt;
 *&lt;br /&gt;
 * See LICENSE for the full licensing terms of this file.&lt;br /&gt;
 *&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
// This looks like its lifted from http://www.weberdev.com/get_example-4372.html&lt;br /&gt;
// I'd contact the original developer for licensing info, but his website is broken.&lt;br /&gt;
&lt;br /&gt;
class DB&lt;br /&gt;
{&lt;br /&gt;
	var $Host = C_DB_HOST;				// Hostname of our MySQL server&lt;br /&gt;
	var $Database = C_DB_NAME;			// Logical database name on that server&lt;br /&gt;
	var $User = C_DB_USER;				// Database user&lt;br /&gt;
	var $Password = C_DB_PASS;			// Database user's password&lt;br /&gt;
	var $Link_ID = 0;				// Result of mysql_connect()&lt;br /&gt;
	var $Query_ID = 0;				// Result of most recent mysql_query()&lt;br /&gt;
	var $Record	= array();			// Current mysql_fetch_array()-result&lt;br /&gt;
	var $Row;					// Current row number&lt;br /&gt;
	var $Errno = 0;					// Error state of query&lt;br /&gt;
	var $Error = &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	function halt($msg)&lt;br /&gt;
	{&lt;br /&gt;
		echo(&amp;quot;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&amp;lt;/TABLE&amp;gt;&amp;lt;B&amp;gt;Database error:&amp;lt;/B&amp;gt; $msg&amp;lt;BR&amp;gt;\n&amp;quot;);&lt;br /&gt;
		echo(&amp;quot;&amp;lt;B&amp;gt;MySQL error&amp;lt;/B&amp;gt;: $this-&amp;gt;Errno ($this-&amp;gt;Error)&amp;lt;BR&amp;gt;\n&amp;quot;);&lt;br /&gt;
		die(&amp;quot;Session halted.&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function connect()&lt;br /&gt;
	{&lt;br /&gt;
		if($this-&amp;gt;Link_ID == 0)&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;Link_ID = mysql_connect($this-&amp;gt;Host, $this-&amp;gt;User, $this-&amp;gt;Password);&lt;br /&gt;
			if (!$this-&amp;gt;Link_ID)&lt;br /&gt;
			{&lt;br /&gt;
				$this-&amp;gt;halt(&amp;quot;Link_ID == false, connect failed&amp;quot;);&lt;br /&gt;
			}&lt;br /&gt;
			$SelectResult = mysql_select_db($this-&amp;gt;Database, $this-&amp;gt;Link_ID);&lt;br /&gt;
			if(!$SelectResult)&lt;br /&gt;
			{&lt;br /&gt;
				$this-&amp;gt;Errno = mysql_errno($this-&amp;gt;Link_ID);&lt;br /&gt;
				$this-&amp;gt;Error = mysql_error($this-&amp;gt;Link_ID);&lt;br /&gt;
				$this-&amp;gt;halt(&amp;quot;cannot select database &amp;lt;I&amp;gt;&amp;quot;.$this-&amp;gt;Database.&amp;quot;&amp;lt;/I&amp;gt;&amp;quot;);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
 	function escape($String)&lt;br /&gt;
 	{&lt;br /&gt;
 		return mysql_escape_string($String);&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
	function query($Query_String)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;connect();&lt;br /&gt;
		$this-&amp;gt;Query_ID = mysql_query($Query_String,$this-&amp;gt;Link_ID);&lt;br /&gt;
		$this-&amp;gt;Row = 0;&lt;br /&gt;
		$this-&amp;gt;Errno = mysql_errno();&lt;br /&gt;
		$this-&amp;gt;Error = mysql_error();&lt;br /&gt;
		if (!$this-&amp;gt;Query_ID)&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;halt(&amp;quot;Invalid SQL: &amp;quot;.$Query_String);&lt;br /&gt;
		}&lt;br /&gt;
		return $this-&amp;gt;Query_ID;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function next_record()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;Record = @mysql_fetch_array($this-&amp;gt;Query_ID);&lt;br /&gt;
		$this-&amp;gt;Row += 1;&lt;br /&gt;
		$this-&amp;gt;Errno = mysql_errno();&lt;br /&gt;
		$this-&amp;gt;Error = mysql_error();&lt;br /&gt;
		$stat = is_array($this-&amp;gt;Record);&lt;br /&gt;
		if (!$stat)&lt;br /&gt;
		{&lt;br /&gt;
			@mysql_free_result($this-&amp;gt;Query_ID);&lt;br /&gt;
			$this-&amp;gt;Query_ID = 0;&lt;br /&gt;
		}&lt;br /&gt;
		return $this-&amp;gt;Record;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function num_rows()&lt;br /&gt;
	{&lt;br /&gt;
		return mysql_num_rows($this-&amp;gt;Query_ID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function affected_rows()&lt;br /&gt;
	{&lt;br /&gt;
		return mysql_affected_rows($this-&amp;gt;Link_ID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function optimize($tbl_name)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;connect();&lt;br /&gt;
		$this-&amp;gt;Query_ID = @mysql_query(&amp;quot;OPTIMIZE TABLE $tbl_name&amp;quot;,$this-&amp;gt;Link_ID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function clean_results()&lt;br /&gt;
	{&lt;br /&gt;
		if($this-&amp;gt;Query_ID != 0) mysql_freeresult($this-&amp;gt;Query_ID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function close()&lt;br /&gt;
	{&lt;br /&gt;
		if($this-&amp;gt;Link_ID != 0) mysql_close($this-&amp;gt;Link_ID);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 3: offline.php ===&lt;br /&gt;
Copy this PHP script to a file called offline.php and upload the script file to your web server.&lt;br /&gt;
&lt;br /&gt;
Edit the $dbName, $dbHost, $dbUser, and $dbPassword lines at the top of the script to match your database and server information.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
$dbName = &amp;quot;comunity&amp;quot;;&lt;br /&gt;
$dbHost = &amp;quot;localhost&amp;quot;;&lt;br /&gt;
$dbUser = &amp;quot;root&amp;quot;;&lt;br /&gt;
$dbPassword =&amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
define(&amp;quot;C_DB_TYPE&amp;quot;,&amp;quot;mysql&amp;quot;);&lt;br /&gt;
define(&amp;quot;C_DB_HOST&amp;quot;,$dbHost);&lt;br /&gt;
define(&amp;quot;C_DB_NAME&amp;quot;,$dbName);&lt;br /&gt;
define(&amp;quot;C_DB_USER&amp;quot;,$dbUser);&lt;br /&gt;
define(&amp;quot;C_DB_PASS&amp;quot;,$dbPassword);&lt;br /&gt;
define(&amp;quot;C_OFFLINE_IM_TBL&amp;quot;, &amp;quot;Offline_IM&amp;quot;);&lt;br /&gt;
include(&amp;quot;mysql.php&amp;quot;);&lt;br /&gt;
$DbLink = new DB;&lt;br /&gt;
$method = $_SERVER[&amp;quot;PATH_INFO&amp;quot;];&lt;br /&gt;
if ($method == &amp;quot;/SaveMessage/&amp;quot;)&lt;br /&gt;
{&lt;br /&gt;
$msg = $HTTP_RAW_POST_DATA;&lt;br /&gt;
$start = strpos($msg, &amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
if ($start != -1)&lt;br /&gt;
{&lt;br /&gt;
$start+=2;&lt;br /&gt;
$msg = substr($msg, $start);&lt;br /&gt;
$parts = split(&amp;quot;[&amp;lt;&amp;gt;]&amp;quot;, $msg);&lt;br /&gt;
$to_agent = $parts[12];&lt;br /&gt;
$DbLink-&amp;gt;query(&amp;quot;insert into &amp;quot;.C_OFFLINE_IM_TBL.&amp;quot; (uuid, message) values ('&amp;quot; .&lt;br /&gt;
mysql_escape_string($to_agent) . &amp;quot;', '&amp;quot; .&lt;br /&gt;
mysql_escape_string($msg) . &amp;quot;')&amp;quot;);&lt;br /&gt;
echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;true&amp;lt;/boolean&amp;gt;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;false&amp;lt;/boolean&amp;gt;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
exit;&lt;br /&gt;
}&lt;br /&gt;
if ($method == &amp;quot;/RetrieveMessages/&amp;quot;)&lt;br /&gt;
{&lt;br /&gt;
$parms = $HTTP_RAW_POST_DATA;&lt;br /&gt;
$parts = split(&amp;quot;[&amp;lt;&amp;gt;]&amp;quot;, $parms);&lt;br /&gt;
$agent_id = $parts[6];&lt;br /&gt;
$DbLink-&amp;gt;query(&amp;quot;select message from &amp;quot;.C_OFFLINE_IM_TBL.&amp;quot; where uuid='&amp;quot; .&lt;br /&gt;
mysql_escape_string($agent_id) . &amp;quot;'&amp;quot;);&lt;br /&gt;
echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;ArrayOfGridInstantMessage xmlns:xsi=\&amp;quot;http://www.w3.org/2001/XMLSchema-instance\&amp;quot; xmlns:xsd=\&amp;quot;http://www.w3.org/2001/XMLSchema\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
while(list($message) = $DbLink-&amp;gt;next_record())&lt;br /&gt;
{&lt;br /&gt;
echo $message;&lt;br /&gt;
}&lt;br /&gt;
echo &amp;quot;&amp;lt;/ArrayOfGridInstantMessage&amp;gt;&amp;quot;;&lt;br /&gt;
$DbLink-&amp;gt;query(&amp;quot;delete from &amp;quot;.C_OFFLINE_IM_TBL.&amp;quot; where uuid='&amp;quot; .&lt;br /&gt;
mysql_escape_string($agent_id) . &amp;quot;'&amp;quot;);&lt;br /&gt;
exit;&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 4: OfflineMessageModule ===&lt;br /&gt;
Shutdown your simulator.&lt;br /&gt;
&lt;br /&gt;
Edit the OpenSim.ini [Messaging] block.&lt;br /&gt;
&lt;br /&gt;
An example configuration is shown below:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Messaging]&lt;br /&gt;
; Control which region module is used for instant messaging.&lt;br /&gt;
; Default is InstantMessageModule (this is the name of the core IM module as well as the setting)&lt;br /&gt;
InstantMessageModule = InstantMessageModule&lt;br /&gt;
; MessageTransferModule = MessageTransferModule&lt;br /&gt;
OfflineMessageModule = OfflineMessageModule&lt;br /&gt;
OfflineMessageURL = http://yourserver/offline.php&lt;br /&gt;
MuteListModule = MuteListModule&lt;br /&gt;
MuteListURL = http://yourserver/mute.php&lt;br /&gt;
ForwardOfflineGroupMessages = true&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
P.D: The MuteListModule and URL must be uncommented in order for the offline module to work, even if there is no mute.php file in the web folder.&lt;br /&gt;
&lt;br /&gt;
Once the edits are made, save your OpenSim.ini and restart your simulator.&lt;br /&gt;
&lt;br /&gt;
=== Using the OfflineMessageModule ===&lt;br /&gt;
&lt;br /&gt;
Login and try to send a message to an offline person.&lt;br /&gt;
You should see the message: &amp;quot;System: User is not logged in. Message saved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you see &amp;quot;Message not saved.&amp;quot; check your web server error log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are using XAMPP or WAMP or other apache based webserver and you get error&lt;br /&gt;
&lt;br /&gt;
messages like, ''File does not exist: /var/www/offline_im/RetrieveMessages/''.&lt;br /&gt;
&lt;br /&gt;
Then you need to enable the ''mod_rewrite.so'' module in apache.&lt;br /&gt;
&lt;br /&gt;
You also need to create .htaccess file that's placed inside the directory where you have also the offline php files.&lt;br /&gt;
&lt;br /&gt;
the .htaccess file would look like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_URI}  &amp;quot;!^/index.php$&amp;quot;&lt;br /&gt;
RewriteRule &amp;quot;^(.*)$&amp;quot; &amp;quot;index.php&amp;quot; [L]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check the database Offline_IM table to verify whether or not offline.php has written a record there.&lt;br /&gt;
&lt;br /&gt;
Next time the person you messaged logs in, they will get the message and the database will be updated.&lt;br /&gt;
&lt;br /&gt;
=== Testing Notes ===&lt;br /&gt;
These steps and configuration tested working on 2013-Jan-13 with:&lt;br /&gt;
* OpenSimulator 0.7.5 r21607 from 2013-Jan-09&lt;br /&gt;
* Nant 0.90&lt;br /&gt;
* Mono 2.10.8&lt;br /&gt;
* MySQL 5.5.28&lt;br /&gt;
* PHP XMLRPC 5.4.10&lt;br /&gt;
* PHP 5.4.1&lt;br /&gt;
* Apache 2.2.22&lt;br /&gt;
* Linux Kernel 3.6.11&lt;br /&gt;
* Fedora Linux 17 (Beefy Miracle)&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Offline_Messaging</id>
		<title>Offline Messaging</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Offline_Messaging"/>
				<updated>2013-03-15T20:49:10Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* Using the OfflineMessageModule */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Quicklinks}}&lt;br /&gt;
&lt;br /&gt;
Offline Messaging makes it possible to send IM's to people who are not online.&lt;br /&gt;
&lt;br /&gt;
Instead, the messages are saved to a database and delivered the next time the recipient logs in.&lt;br /&gt;
&lt;br /&gt;
NOTE: Diva Canto has contributed a new [[Offline Instant Messaging v2]] module in 0.7.6 dev revision r/22086 which does not need an external PHP script.&lt;br /&gt;
&lt;br /&gt;
=== Disclaimer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Please note that these are third party modules which you use at your own risk!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenSimulator takes no responsibility for these modules.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OfflineMessagingModule Configuration Steps ===&lt;br /&gt;
The OfflineMessagingModule is already compiled and ready for use in current versions of OpenSimulator.&lt;br /&gt;
&lt;br /&gt;
However, you will need to setup the &amp;quot;back-end&amp;quot; database and PHP connector scripts to support the OfflineMessagingModule.&lt;br /&gt;
&lt;br /&gt;
# Configure the Offline_IM database table in your MySQL using commands in Offline_IM.sql (below)&lt;br /&gt;
# Upload the mysql.php (below) into your web server&lt;br /&gt;
# Upload the offline.php (below) into your web server&lt;br /&gt;
# Enable the OfflineMessagingModule in your OpenSim.ini file&lt;br /&gt;
&lt;br /&gt;
=== STEP 1: Offline_IM.sql ===&lt;br /&gt;
Save these SQL commands to an Offline_IM.sql file on your MySQL server.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE IF NOT EXISTS `Offline_IM` (&lt;br /&gt;
 `uuid` varchar(36) NOT NULL,&lt;br /&gt;
 `message` text NOT NULL,&lt;br /&gt;
  KEY `uuid` (`uuid`)&lt;br /&gt;
) ENGINE=MyISAM DEFAULT CHARSET=latin1;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect to your MySQL (Linux commands shown):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mysql --user=$mysqluser --password=$mysqlpassword $databasename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace $mysqluser, $mysqlpassword, and $databasename with your specific configuration.&lt;br /&gt;
&lt;br /&gt;
At the mysql prompt, source the Offline_IM.sql file to configure your database to hold offline IMs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; source Offline_IM.sql&lt;br /&gt;
... ensure no error messages appear here ...&lt;br /&gt;
mysql&amp;gt; quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 2: mysql.php ===&lt;br /&gt;
Copy this PHP script to a file called mysql.php and upload the script file to your web server.&lt;br /&gt;
&lt;br /&gt;
No edits of the script should be necessary.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/*&lt;br /&gt;
 * Copyright (c) 2007, 2008 Contributors, http://opensimulator.org/&lt;br /&gt;
 * See CONTRIBUTORS for a full list of copyright holders.&lt;br /&gt;
 *&lt;br /&gt;
 * See LICENSE for the full licensing terms of this file.&lt;br /&gt;
 *&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
// This looks like its lifted from http://www.weberdev.com/get_example-4372.html&lt;br /&gt;
// I'd contact the original developer for licensing info, but his website is broken.&lt;br /&gt;
&lt;br /&gt;
class DB&lt;br /&gt;
{&lt;br /&gt;
	var $Host = C_DB_HOST;				// Hostname of our MySQL server&lt;br /&gt;
	var $Database = C_DB_NAME;			// Logical database name on that server&lt;br /&gt;
	var $User = C_DB_USER;				// Database user&lt;br /&gt;
	var $Password = C_DB_PASS;			// Database user's password&lt;br /&gt;
	var $Link_ID = 0;				// Result of mysql_connect()&lt;br /&gt;
	var $Query_ID = 0;				// Result of most recent mysql_query()&lt;br /&gt;
	var $Record	= array();			// Current mysql_fetch_array()-result&lt;br /&gt;
	var $Row;					// Current row number&lt;br /&gt;
	var $Errno = 0;					// Error state of query&lt;br /&gt;
	var $Error = &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	function halt($msg)&lt;br /&gt;
	{&lt;br /&gt;
		echo(&amp;quot;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&amp;lt;/TABLE&amp;gt;&amp;lt;B&amp;gt;Database error:&amp;lt;/B&amp;gt; $msg&amp;lt;BR&amp;gt;\n&amp;quot;);&lt;br /&gt;
		echo(&amp;quot;&amp;lt;B&amp;gt;MySQL error&amp;lt;/B&amp;gt;: $this-&amp;gt;Errno ($this-&amp;gt;Error)&amp;lt;BR&amp;gt;\n&amp;quot;);&lt;br /&gt;
		die(&amp;quot;Session halted.&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function connect()&lt;br /&gt;
	{&lt;br /&gt;
		if($this-&amp;gt;Link_ID == 0)&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;Link_ID = mysql_connect($this-&amp;gt;Host, $this-&amp;gt;User, $this-&amp;gt;Password);&lt;br /&gt;
			if (!$this-&amp;gt;Link_ID)&lt;br /&gt;
			{&lt;br /&gt;
				$this-&amp;gt;halt(&amp;quot;Link_ID == false, connect failed&amp;quot;);&lt;br /&gt;
			}&lt;br /&gt;
			$SelectResult = mysql_select_db($this-&amp;gt;Database, $this-&amp;gt;Link_ID);&lt;br /&gt;
			if(!$SelectResult)&lt;br /&gt;
			{&lt;br /&gt;
				$this-&amp;gt;Errno = mysql_errno($this-&amp;gt;Link_ID);&lt;br /&gt;
				$this-&amp;gt;Error = mysql_error($this-&amp;gt;Link_ID);&lt;br /&gt;
				$this-&amp;gt;halt(&amp;quot;cannot select database &amp;lt;I&amp;gt;&amp;quot;.$this-&amp;gt;Database.&amp;quot;&amp;lt;/I&amp;gt;&amp;quot;);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
 	function escape($String)&lt;br /&gt;
 	{&lt;br /&gt;
 		return mysql_escape_string($String);&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
	function query($Query_String)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;connect();&lt;br /&gt;
		$this-&amp;gt;Query_ID = mysql_query($Query_String,$this-&amp;gt;Link_ID);&lt;br /&gt;
		$this-&amp;gt;Row = 0;&lt;br /&gt;
		$this-&amp;gt;Errno = mysql_errno();&lt;br /&gt;
		$this-&amp;gt;Error = mysql_error();&lt;br /&gt;
		if (!$this-&amp;gt;Query_ID)&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;halt(&amp;quot;Invalid SQL: &amp;quot;.$Query_String);&lt;br /&gt;
		}&lt;br /&gt;
		return $this-&amp;gt;Query_ID;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function next_record()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;Record = @mysql_fetch_array($this-&amp;gt;Query_ID);&lt;br /&gt;
		$this-&amp;gt;Row += 1;&lt;br /&gt;
		$this-&amp;gt;Errno = mysql_errno();&lt;br /&gt;
		$this-&amp;gt;Error = mysql_error();&lt;br /&gt;
		$stat = is_array($this-&amp;gt;Record);&lt;br /&gt;
		if (!$stat)&lt;br /&gt;
		{&lt;br /&gt;
			@mysql_free_result($this-&amp;gt;Query_ID);&lt;br /&gt;
			$this-&amp;gt;Query_ID = 0;&lt;br /&gt;
		}&lt;br /&gt;
		return $this-&amp;gt;Record;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function num_rows()&lt;br /&gt;
	{&lt;br /&gt;
		return mysql_num_rows($this-&amp;gt;Query_ID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function affected_rows()&lt;br /&gt;
	{&lt;br /&gt;
		return mysql_affected_rows($this-&amp;gt;Link_ID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function optimize($tbl_name)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;connect();&lt;br /&gt;
		$this-&amp;gt;Query_ID = @mysql_query(&amp;quot;OPTIMIZE TABLE $tbl_name&amp;quot;,$this-&amp;gt;Link_ID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function clean_results()&lt;br /&gt;
	{&lt;br /&gt;
		if($this-&amp;gt;Query_ID != 0) mysql_freeresult($this-&amp;gt;Query_ID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function close()&lt;br /&gt;
	{&lt;br /&gt;
		if($this-&amp;gt;Link_ID != 0) mysql_close($this-&amp;gt;Link_ID);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 3: offline.php ===&lt;br /&gt;
Copy this PHP script to a file called offline.php and upload the script file to your web server.&lt;br /&gt;
&lt;br /&gt;
Edit the $dbName, $dbHost, $dbUser, and $dbPassword lines at the top of the script to match your database and server information.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
$dbName = &amp;quot;comunity&amp;quot;;&lt;br /&gt;
$dbHost = &amp;quot;localhost&amp;quot;;&lt;br /&gt;
$dbUser = &amp;quot;root&amp;quot;;&lt;br /&gt;
$dbPassword =&amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
define(&amp;quot;C_DB_TYPE&amp;quot;,&amp;quot;mysql&amp;quot;);&lt;br /&gt;
define(&amp;quot;C_DB_HOST&amp;quot;,$dbHost);&lt;br /&gt;
define(&amp;quot;C_DB_NAME&amp;quot;,$dbName);&lt;br /&gt;
define(&amp;quot;C_DB_USER&amp;quot;,$dbUser);&lt;br /&gt;
define(&amp;quot;C_DB_PASS&amp;quot;,$dbPassword);&lt;br /&gt;
define(&amp;quot;C_OFFLINE_IM_TBL&amp;quot;, &amp;quot;Offline_IM&amp;quot;);&lt;br /&gt;
include(&amp;quot;mysql.php&amp;quot;);&lt;br /&gt;
$DbLink = new DB;&lt;br /&gt;
$method = $_SERVER[&amp;quot;PATH_INFO&amp;quot;];&lt;br /&gt;
if ($method == &amp;quot;/SaveMessage/&amp;quot;)&lt;br /&gt;
{&lt;br /&gt;
$msg = $HTTP_RAW_POST_DATA;&lt;br /&gt;
$start = strpos($msg, &amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
if ($start != -1)&lt;br /&gt;
{&lt;br /&gt;
$start+=2;&lt;br /&gt;
$msg = substr($msg, $start);&lt;br /&gt;
$parts = split(&amp;quot;[&amp;lt;&amp;gt;]&amp;quot;, $msg);&lt;br /&gt;
$to_agent = $parts[12];&lt;br /&gt;
$DbLink-&amp;gt;query(&amp;quot;insert into &amp;quot;.C_OFFLINE_IM_TBL.&amp;quot; (uuid, message) values ('&amp;quot; .&lt;br /&gt;
mysql_escape_string($to_agent) . &amp;quot;', '&amp;quot; .&lt;br /&gt;
mysql_escape_string($msg) . &amp;quot;')&amp;quot;);&lt;br /&gt;
echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;true&amp;lt;/boolean&amp;gt;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;false&amp;lt;/boolean&amp;gt;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
exit;&lt;br /&gt;
}&lt;br /&gt;
if ($method == &amp;quot;/RetrieveMessages/&amp;quot;)&lt;br /&gt;
{&lt;br /&gt;
$parms = $HTTP_RAW_POST_DATA;&lt;br /&gt;
$parts = split(&amp;quot;[&amp;lt;&amp;gt;]&amp;quot;, $parms);&lt;br /&gt;
$agent_id = $parts[6];&lt;br /&gt;
$DbLink-&amp;gt;query(&amp;quot;select message from &amp;quot;.C_OFFLINE_IM_TBL.&amp;quot; where uuid='&amp;quot; .&lt;br /&gt;
mysql_escape_string($agent_id) . &amp;quot;'&amp;quot;);&lt;br /&gt;
echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;ArrayOfGridInstantMessage xmlns:xsi=\&amp;quot;http://www.w3.org/2001/XMLSchema-instance\&amp;quot; xmlns:xsd=\&amp;quot;http://www.w3.org/2001/XMLSchema\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
while(list($message) = $DbLink-&amp;gt;next_record())&lt;br /&gt;
{&lt;br /&gt;
echo $message;&lt;br /&gt;
}&lt;br /&gt;
echo &amp;quot;&amp;lt;/ArrayOfGridInstantMessage&amp;gt;&amp;quot;;&lt;br /&gt;
$DbLink-&amp;gt;query(&amp;quot;delete from &amp;quot;.C_OFFLINE_IM_TBL.&amp;quot; where uuid='&amp;quot; .&lt;br /&gt;
mysql_escape_string($agent_id) . &amp;quot;'&amp;quot;);&lt;br /&gt;
exit;&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 4: OfflineMessageModule ===&lt;br /&gt;
Shutdown your simulator.&lt;br /&gt;
&lt;br /&gt;
Edit the OpenSim.ini [Messaging] block.&lt;br /&gt;
&lt;br /&gt;
An example configuration is shown below:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Messaging]&lt;br /&gt;
; Control which region module is used for instant messaging.&lt;br /&gt;
; Default is InstantMessageModule (this is the name of the core IM module as well as the setting)&lt;br /&gt;
InstantMessageModule = InstantMessageModule&lt;br /&gt;
; MessageTransferModule = MessageTransferModule&lt;br /&gt;
OfflineMessageModule = OfflineMessageModule&lt;br /&gt;
OfflineMessageURL = http://yourserver/offline.php&lt;br /&gt;
MuteListModule = MuteListModule&lt;br /&gt;
MuteListURL = http://yourserver/mute.php&lt;br /&gt;
ForwardOfflineGroupMessages = true&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
P.D: The MuteListModule and URL must be uncommented in order for the offline module to work, even if there is no mute.php file in the web folder.&lt;br /&gt;
&lt;br /&gt;
Once the edits are made, save your OpenSim.ini and restart your simulator.&lt;br /&gt;
&lt;br /&gt;
=== Using the OfflineMessageModule ===&lt;br /&gt;
&lt;br /&gt;
Login and try to send a message to an offline person.&lt;br /&gt;
You should see the message: &amp;quot;System: User is not logged in. Message saved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you see &amp;quot;Message not saved.&amp;quot; check your web server error log.&lt;br /&gt;
&lt;br /&gt;
Check the database Offline_IM table to verify whether or not offline.php has written a record there.&lt;br /&gt;
&lt;br /&gt;
Next time the person you messaged logs in, they will get the message and the database will be updated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are using XAMPP or WAMP or other apache based webserver and you get error&lt;br /&gt;
&lt;br /&gt;
messages like, ''File does not exist: /var/www/offline_im/RetrieveMessages/''.&lt;br /&gt;
&lt;br /&gt;
Then you need to enable the ''mod_rewrite.so'' module in apache.&lt;br /&gt;
&lt;br /&gt;
You also need to create .htaccess file that's placed inside the directory where you have also the offline php files.&lt;br /&gt;
&lt;br /&gt;
the .htaccess file would look like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_URI}  &amp;quot;!^/index.php$&amp;quot;&lt;br /&gt;
RewriteRule &amp;quot;^(.*)$&amp;quot; &amp;quot;index.php&amp;quot; [L]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Testing Notes ===&lt;br /&gt;
These steps and configuration tested working on 2013-Jan-13 with:&lt;br /&gt;
* OpenSimulator 0.7.5 r21607 from 2013-Jan-09&lt;br /&gt;
* Nant 0.90&lt;br /&gt;
* Mono 2.10.8&lt;br /&gt;
* MySQL 5.5.28&lt;br /&gt;
* PHP XMLRPC 5.4.10&lt;br /&gt;
* PHP 5.4.1&lt;br /&gt;
* Apache 2.2.22&lt;br /&gt;
* Linux Kernel 3.6.11&lt;br /&gt;
* Fedora Linux 17 (Beefy Miracle)&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Offline_Messaging</id>
		<title>Offline Messaging</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Offline_Messaging"/>
				<updated>2013-03-15T20:48:45Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* Using the OfflineMessageModule */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Quicklinks}}&lt;br /&gt;
&lt;br /&gt;
Offline Messaging makes it possible to send IM's to people who are not online.&lt;br /&gt;
&lt;br /&gt;
Instead, the messages are saved to a database and delivered the next time the recipient logs in.&lt;br /&gt;
&lt;br /&gt;
NOTE: Diva Canto has contributed a new [[Offline Instant Messaging v2]] module in 0.7.6 dev revision r/22086 which does not need an external PHP script.&lt;br /&gt;
&lt;br /&gt;
=== Disclaimer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Please note that these are third party modules which you use at your own risk!&amp;lt;br /&amp;gt;&lt;br /&gt;
OpenSimulator takes no responsibility for these modules.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OfflineMessagingModule Configuration Steps ===&lt;br /&gt;
The OfflineMessagingModule is already compiled and ready for use in current versions of OpenSimulator.&lt;br /&gt;
&lt;br /&gt;
However, you will need to setup the &amp;quot;back-end&amp;quot; database and PHP connector scripts to support the OfflineMessagingModule.&lt;br /&gt;
&lt;br /&gt;
# Configure the Offline_IM database table in your MySQL using commands in Offline_IM.sql (below)&lt;br /&gt;
# Upload the mysql.php (below) into your web server&lt;br /&gt;
# Upload the offline.php (below) into your web server&lt;br /&gt;
# Enable the OfflineMessagingModule in your OpenSim.ini file&lt;br /&gt;
&lt;br /&gt;
=== STEP 1: Offline_IM.sql ===&lt;br /&gt;
Save these SQL commands to an Offline_IM.sql file on your MySQL server.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE IF NOT EXISTS `Offline_IM` (&lt;br /&gt;
 `uuid` varchar(36) NOT NULL,&lt;br /&gt;
 `message` text NOT NULL,&lt;br /&gt;
  KEY `uuid` (`uuid`)&lt;br /&gt;
) ENGINE=MyISAM DEFAULT CHARSET=latin1;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect to your MySQL (Linux commands shown):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mysql --user=$mysqluser --password=$mysqlpassword $databasename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace $mysqluser, $mysqlpassword, and $databasename with your specific configuration.&lt;br /&gt;
&lt;br /&gt;
At the mysql prompt, source the Offline_IM.sql file to configure your database to hold offline IMs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql&amp;gt; source Offline_IM.sql&lt;br /&gt;
... ensure no error messages appear here ...&lt;br /&gt;
mysql&amp;gt; quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 2: mysql.php ===&lt;br /&gt;
Copy this PHP script to a file called mysql.php and upload the script file to your web server.&lt;br /&gt;
&lt;br /&gt;
No edits of the script should be necessary.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/*&lt;br /&gt;
 * Copyright (c) 2007, 2008 Contributors, http://opensimulator.org/&lt;br /&gt;
 * See CONTRIBUTORS for a full list of copyright holders.&lt;br /&gt;
 *&lt;br /&gt;
 * See LICENSE for the full licensing terms of this file.&lt;br /&gt;
 *&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
// This looks like its lifted from http://www.weberdev.com/get_example-4372.html&lt;br /&gt;
// I'd contact the original developer for licensing info, but his website is broken.&lt;br /&gt;
&lt;br /&gt;
class DB&lt;br /&gt;
{&lt;br /&gt;
	var $Host = C_DB_HOST;				// Hostname of our MySQL server&lt;br /&gt;
	var $Database = C_DB_NAME;			// Logical database name on that server&lt;br /&gt;
	var $User = C_DB_USER;				// Database user&lt;br /&gt;
	var $Password = C_DB_PASS;			// Database user's password&lt;br /&gt;
	var $Link_ID = 0;				// Result of mysql_connect()&lt;br /&gt;
	var $Query_ID = 0;				// Result of most recent mysql_query()&lt;br /&gt;
	var $Record	= array();			// Current mysql_fetch_array()-result&lt;br /&gt;
	var $Row;					// Current row number&lt;br /&gt;
	var $Errno = 0;					// Error state of query&lt;br /&gt;
	var $Error = &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	function halt($msg)&lt;br /&gt;
	{&lt;br /&gt;
		echo(&amp;quot;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&amp;lt;/TABLE&amp;gt;&amp;lt;B&amp;gt;Database error:&amp;lt;/B&amp;gt; $msg&amp;lt;BR&amp;gt;\n&amp;quot;);&lt;br /&gt;
		echo(&amp;quot;&amp;lt;B&amp;gt;MySQL error&amp;lt;/B&amp;gt;: $this-&amp;gt;Errno ($this-&amp;gt;Error)&amp;lt;BR&amp;gt;\n&amp;quot;);&lt;br /&gt;
		die(&amp;quot;Session halted.&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function connect()&lt;br /&gt;
	{&lt;br /&gt;
		if($this-&amp;gt;Link_ID == 0)&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;Link_ID = mysql_connect($this-&amp;gt;Host, $this-&amp;gt;User, $this-&amp;gt;Password);&lt;br /&gt;
			if (!$this-&amp;gt;Link_ID)&lt;br /&gt;
			{&lt;br /&gt;
				$this-&amp;gt;halt(&amp;quot;Link_ID == false, connect failed&amp;quot;);&lt;br /&gt;
			}&lt;br /&gt;
			$SelectResult = mysql_select_db($this-&amp;gt;Database, $this-&amp;gt;Link_ID);&lt;br /&gt;
			if(!$SelectResult)&lt;br /&gt;
			{&lt;br /&gt;
				$this-&amp;gt;Errno = mysql_errno($this-&amp;gt;Link_ID);&lt;br /&gt;
				$this-&amp;gt;Error = mysql_error($this-&amp;gt;Link_ID);&lt;br /&gt;
				$this-&amp;gt;halt(&amp;quot;cannot select database &amp;lt;I&amp;gt;&amp;quot;.$this-&amp;gt;Database.&amp;quot;&amp;lt;/I&amp;gt;&amp;quot;);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
 	function escape($String)&lt;br /&gt;
 	{&lt;br /&gt;
 		return mysql_escape_string($String);&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
	function query($Query_String)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;connect();&lt;br /&gt;
		$this-&amp;gt;Query_ID = mysql_query($Query_String,$this-&amp;gt;Link_ID);&lt;br /&gt;
		$this-&amp;gt;Row = 0;&lt;br /&gt;
		$this-&amp;gt;Errno = mysql_errno();&lt;br /&gt;
		$this-&amp;gt;Error = mysql_error();&lt;br /&gt;
		if (!$this-&amp;gt;Query_ID)&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;halt(&amp;quot;Invalid SQL: &amp;quot;.$Query_String);&lt;br /&gt;
		}&lt;br /&gt;
		return $this-&amp;gt;Query_ID;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function next_record()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;Record = @mysql_fetch_array($this-&amp;gt;Query_ID);&lt;br /&gt;
		$this-&amp;gt;Row += 1;&lt;br /&gt;
		$this-&amp;gt;Errno = mysql_errno();&lt;br /&gt;
		$this-&amp;gt;Error = mysql_error();&lt;br /&gt;
		$stat = is_array($this-&amp;gt;Record);&lt;br /&gt;
		if (!$stat)&lt;br /&gt;
		{&lt;br /&gt;
			@mysql_free_result($this-&amp;gt;Query_ID);&lt;br /&gt;
			$this-&amp;gt;Query_ID = 0;&lt;br /&gt;
		}&lt;br /&gt;
		return $this-&amp;gt;Record;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function num_rows()&lt;br /&gt;
	{&lt;br /&gt;
		return mysql_num_rows($this-&amp;gt;Query_ID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function affected_rows()&lt;br /&gt;
	{&lt;br /&gt;
		return mysql_affected_rows($this-&amp;gt;Link_ID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function optimize($tbl_name)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;connect();&lt;br /&gt;
		$this-&amp;gt;Query_ID = @mysql_query(&amp;quot;OPTIMIZE TABLE $tbl_name&amp;quot;,$this-&amp;gt;Link_ID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function clean_results()&lt;br /&gt;
	{&lt;br /&gt;
		if($this-&amp;gt;Query_ID != 0) mysql_freeresult($this-&amp;gt;Query_ID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function close()&lt;br /&gt;
	{&lt;br /&gt;
		if($this-&amp;gt;Link_ID != 0) mysql_close($this-&amp;gt;Link_ID);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 3: offline.php ===&lt;br /&gt;
Copy this PHP script to a file called offline.php and upload the script file to your web server.&lt;br /&gt;
&lt;br /&gt;
Edit the $dbName, $dbHost, $dbUser, and $dbPassword lines at the top of the script to match your database and server information.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
$dbName = &amp;quot;comunity&amp;quot;;&lt;br /&gt;
$dbHost = &amp;quot;localhost&amp;quot;;&lt;br /&gt;
$dbUser = &amp;quot;root&amp;quot;;&lt;br /&gt;
$dbPassword =&amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
define(&amp;quot;C_DB_TYPE&amp;quot;,&amp;quot;mysql&amp;quot;);&lt;br /&gt;
define(&amp;quot;C_DB_HOST&amp;quot;,$dbHost);&lt;br /&gt;
define(&amp;quot;C_DB_NAME&amp;quot;,$dbName);&lt;br /&gt;
define(&amp;quot;C_DB_USER&amp;quot;,$dbUser);&lt;br /&gt;
define(&amp;quot;C_DB_PASS&amp;quot;,$dbPassword);&lt;br /&gt;
define(&amp;quot;C_OFFLINE_IM_TBL&amp;quot;, &amp;quot;Offline_IM&amp;quot;);&lt;br /&gt;
include(&amp;quot;mysql.php&amp;quot;);&lt;br /&gt;
$DbLink = new DB;&lt;br /&gt;
$method = $_SERVER[&amp;quot;PATH_INFO&amp;quot;];&lt;br /&gt;
if ($method == &amp;quot;/SaveMessage/&amp;quot;)&lt;br /&gt;
{&lt;br /&gt;
$msg = $HTTP_RAW_POST_DATA;&lt;br /&gt;
$start = strpos($msg, &amp;quot;?&amp;gt;&amp;quot;);&lt;br /&gt;
if ($start != -1)&lt;br /&gt;
{&lt;br /&gt;
$start+=2;&lt;br /&gt;
$msg = substr($msg, $start);&lt;br /&gt;
$parts = split(&amp;quot;[&amp;lt;&amp;gt;]&amp;quot;, $msg);&lt;br /&gt;
$to_agent = $parts[12];&lt;br /&gt;
$DbLink-&amp;gt;query(&amp;quot;insert into &amp;quot;.C_OFFLINE_IM_TBL.&amp;quot; (uuid, message) values ('&amp;quot; .&lt;br /&gt;
mysql_escape_string($to_agent) . &amp;quot;', '&amp;quot; .&lt;br /&gt;
mysql_escape_string($msg) . &amp;quot;')&amp;quot;);&lt;br /&gt;
echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;true&amp;lt;/boolean&amp;gt;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;boolean&amp;gt;false&amp;lt;/boolean&amp;gt;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
exit;&lt;br /&gt;
}&lt;br /&gt;
if ($method == &amp;quot;/RetrieveMessages/&amp;quot;)&lt;br /&gt;
{&lt;br /&gt;
$parms = $HTTP_RAW_POST_DATA;&lt;br /&gt;
$parts = split(&amp;quot;[&amp;lt;&amp;gt;]&amp;quot;, $parms);&lt;br /&gt;
$agent_id = $parts[6];&lt;br /&gt;
$DbLink-&amp;gt;query(&amp;quot;select message from &amp;quot;.C_OFFLINE_IM_TBL.&amp;quot; where uuid='&amp;quot; .&lt;br /&gt;
mysql_escape_string($agent_id) . &amp;quot;'&amp;quot;);&lt;br /&gt;
echo &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot;?&amp;gt;&amp;lt;ArrayOfGridInstantMessage xmlns:xsi=\&amp;quot;http://www.w3.org/2001/XMLSchema-instance\&amp;quot; xmlns:xsd=\&amp;quot;http://www.w3.org/2001/XMLSchema\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
while(list($message) = $DbLink-&amp;gt;next_record())&lt;br /&gt;
{&lt;br /&gt;
echo $message;&lt;br /&gt;
}&lt;br /&gt;
echo &amp;quot;&amp;lt;/ArrayOfGridInstantMessage&amp;gt;&amp;quot;;&lt;br /&gt;
$DbLink-&amp;gt;query(&amp;quot;delete from &amp;quot;.C_OFFLINE_IM_TBL.&amp;quot; where uuid='&amp;quot; .&lt;br /&gt;
mysql_escape_string($agent_id) . &amp;quot;'&amp;quot;);&lt;br /&gt;
exit;&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== STEP 4: OfflineMessageModule ===&lt;br /&gt;
Shutdown your simulator.&lt;br /&gt;
&lt;br /&gt;
Edit the OpenSim.ini [Messaging] block.&lt;br /&gt;
&lt;br /&gt;
An example configuration is shown below:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Messaging]&lt;br /&gt;
; Control which region module is used for instant messaging.&lt;br /&gt;
; Default is InstantMessageModule (this is the name of the core IM module as well as the setting)&lt;br /&gt;
InstantMessageModule = InstantMessageModule&lt;br /&gt;
; MessageTransferModule = MessageTransferModule&lt;br /&gt;
OfflineMessageModule = OfflineMessageModule&lt;br /&gt;
OfflineMessageURL = http://yourserver/offline.php&lt;br /&gt;
MuteListModule = MuteListModule&lt;br /&gt;
MuteListURL = http://yourserver/mute.php&lt;br /&gt;
ForwardOfflineGroupMessages = true&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
P.D: The MuteListModule and URL must be uncommented in order for the offline module to work, even if there is no mute.php file in the web folder.&lt;br /&gt;
&lt;br /&gt;
Once the edits are made, save your OpenSim.ini and restart your simulator.&lt;br /&gt;
&lt;br /&gt;
=== Using the OfflineMessageModule ===&lt;br /&gt;
&lt;br /&gt;
Login and try to send a message to an offline person.&lt;br /&gt;
You should see the message: &amp;quot;System: User is not logged in. Message saved.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you see &amp;quot;Message not saved.&amp;quot; check your web server error log.&lt;br /&gt;
&lt;br /&gt;
Check the database Offline_IM table to verify whether or not offline.php has written a record there.&lt;br /&gt;
&lt;br /&gt;
Next time the person you messaged logs in, they will get the message and the database will be updated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are using XAMPP or WAMP or other apache based webserver and you get error&lt;br /&gt;
&lt;br /&gt;
messages like, ''File does not exist: /var/www/offline_im/RetrieveMessages/''.&lt;br /&gt;
&lt;br /&gt;
Then you need to enable the ''mod_rewrite.so'' module in apache.&lt;br /&gt;
&lt;br /&gt;
You also need to create .htaccess file that's placed inside the directory where you have also the offline php files.&lt;br /&gt;
&lt;br /&gt;
the .htaccess file would look like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_URI}  &amp;quot;!^/index.php$&amp;quot;&lt;br /&gt;
RewriteRule &amp;quot;^(.*)$&amp;quot; &amp;quot;index.php&amp;quot; [L]&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Testing Notes ===&lt;br /&gt;
These steps and configuration tested working on 2013-Jan-13 with:&lt;br /&gt;
* OpenSimulator 0.7.5 r21607 from 2013-Jan-09&lt;br /&gt;
* Nant 0.90&lt;br /&gt;
* Mono 2.10.8&lt;br /&gt;
* MySQL 5.5.28&lt;br /&gt;
* PHP XMLRPC 5.4.10&lt;br /&gt;
* PHP 5.4.1&lt;br /&gt;
* Apache 2.2.22&lt;br /&gt;
* Linux Kernel 3.6.11&lt;br /&gt;
* Fedora Linux 17 (Beefy Miracle)&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Setting_Up_Mega-Regions</id>
		<title>Setting Up Mega-Regions</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Setting_Up_Mega-Regions"/>
				<updated>2012-06-21T00:30:01Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* Layout Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quicklinks}}&lt;br /&gt;
{{needsexample}}&lt;br /&gt;
{{ambox&lt;br /&gt;
| type = content&lt;br /&gt;
| text = There are still some outstanding issues being addressed by the Dev team. If you wish to incorporate your existing regions into a megaregion, make OARS and do Full Backups of everything on the current regions. Restoring OAR will deposit the restored region on the most South West Corner ONLY. This is being worked out at the time of this writing. (more information needs to be put in this area...) Updated October 26, 2010}}&lt;br /&gt;
&lt;br /&gt;
= Layout Diagram =&lt;br /&gt;
&lt;br /&gt;
Here is a diagram of possible configurations. This is not all inclusive but is a good example of layout for the regions. &lt;br /&gt;
&lt;br /&gt;
'''SPECIAL NOTE''' - Most Viewers still suffer the 4096 Teleport Bug where people cannot teleport more than 4096 regions away. OSGrid is centered @ 10000 10000. Some Viewers, such as MeerKat or Imprudence, have addressed this recently, others will likely follow suit. This bug applies to HyperGrided regions as well as Non-Hypergrid regions. &lt;br /&gt;
&lt;br /&gt;
Do not place Mega regions and normal regions any closer than 2 regions spaces apart, as they WILL interfere with each other.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MegaReg Layout.png|center|512x512px|Mega region Layout Example]]&lt;br /&gt;
&lt;br /&gt;
= Steps =&lt;br /&gt;
&lt;br /&gt;
=== Step 0: Back Up Regions ===&lt;br /&gt;
&lt;br /&gt;
If your OpenSimulator instance doesn't have currently any contents, then skip to [[#Step 1: Edit the File &amp;quot;OpenSim.ini&amp;quot;]].&lt;br /&gt;
&lt;br /&gt;
If your regions have existing content, joining them may be dangerous -- you risk losing content. By way of precaution,&lt;br /&gt;
&lt;br /&gt;
# Make a backup of your database. See [[Backups]] for instructions.&lt;br /&gt;
# Make an OAR for EACH REGION which you intend integrate into a megaregion. See [[OpenSim Archives]] for instructions.&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Edit the File &amp;quot;OpenSim.ini&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Modify your OpenSim.ini. In &amp;lt;nowiki&amp;gt;[Startup]&amp;lt;/nowiki&amp;gt; section, change&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
    ; CombineContiguousRegions = false&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
to&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
    CombineContiguousRegions = true&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Edit the File &amp;quot;Regions.ini&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Edit the file Region.ini which is located in &amp;quot;bin/Regions&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The example provided in [[#Example of Regions.ini File]] below is for a Mega-Region consists of 3x3, 9 simulator. Fill in the correct information in all the required fields. Remember to order your regions from '''South-West to North-East ''' in your Regions.ini.&lt;br /&gt;
&lt;br /&gt;
=== Step 3 : Start OpenSimulator Instance ===&lt;br /&gt;
&lt;br /&gt;
Start Opensimulator. If your regions have no contents, then you already have it! If not, &lt;br /&gt;
&lt;br /&gt;
# You will see a number of error messages -- ignore them. &lt;br /&gt;
# Wait for a while before console activity stopping, then type: '''fix-phantoms''' &lt;br /&gt;
# Wait before process completing. It can take several minutes for the backup thread to store everything.&lt;br /&gt;
# When the console activity stops, type: '''backup''' (This will persist the data into the Database again as a precaution).&lt;br /&gt;
# Restart Opensim, and check that all the objects are in their right places. &lt;br /&gt;
&lt;br /&gt;
See Also: [http://www.metaverseink.com/blog/?p=28 Importing OARs into megaregions (Diva's blog post)]&lt;br /&gt;
&lt;br /&gt;
= Example of Regions.ini File =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;; 9 Simulator 3x3 Mega-Region Example&lt;br /&gt;
; Supply a unique UUID for each region&lt;br /&gt;
; Unique InternalPort for Each Region&lt;br /&gt;
; &lt;br /&gt;
;************************************************&lt;br /&gt;
[RegionName_SW]&lt;br /&gt;
RegionUUID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
Location = 5000,5000&lt;br /&gt;
InternalAddress = 0.0.0.0&lt;br /&gt;
InternalPort = 9001&lt;br /&gt;
AllowAlternatePorts = False&lt;br /&gt;
ExternalHostName = YourIP_DNSname&lt;br /&gt;
;&lt;br /&gt;
;NonphysicalPrimMax = 0&lt;br /&gt;
;PhysicalPrimMax = 0&lt;br /&gt;
ClampPrimSize = False&lt;br /&gt;
;MaxPrims = 15000&lt;br /&gt;
;&lt;br /&gt;
;ScopeID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
;************************************************&lt;br /&gt;
[RegionName_W]&lt;br /&gt;
RegionUUID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
Location = 5000,5001&lt;br /&gt;
InternalAddress = 0.0.0.0&lt;br /&gt;
InternalPort = 9002&lt;br /&gt;
AllowAlternatePorts = False&lt;br /&gt;
ExternalHostName = YourIP_DNSname&lt;br /&gt;
;&lt;br /&gt;
;NonphysicalPrimMax = 0&lt;br /&gt;
;PhysicalPrimMax = 0&lt;br /&gt;
ClampPrimSize = False&lt;br /&gt;
;MaxPrims = 15000&lt;br /&gt;
; &lt;br /&gt;
;ScopeID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
;************************************************&lt;br /&gt;
[RegionName_NW]&lt;br /&gt;
RegionUUID = 84b41485-6884-412d-b4a2-2f6941559924&lt;br /&gt;
Location = 5000,5002&lt;br /&gt;
InternalAddress = 0.0.0.0&lt;br /&gt;
InternalPort = 9003&lt;br /&gt;
AllowAlternatePorts = False&lt;br /&gt;
ExternalHostName = YourIP_DNSname&lt;br /&gt;
; &lt;br /&gt;
;NonphysicalPrimMax = 0&lt;br /&gt;
;PhysicalPrimMax = 0&lt;br /&gt;
ClampPrimSize = False&lt;br /&gt;
;MaxPrims = 15000&lt;br /&gt;
; &lt;br /&gt;
;ScopeID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
;&lt;br /&gt;
;************************************************&lt;br /&gt;
[RegionName_S]&lt;br /&gt;
RegionUUID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
Location = 5001,5000&lt;br /&gt;
InternalAddress = 0.0.0.0&lt;br /&gt;
InternalPort = 9004&lt;br /&gt;
AllowAlternatePorts = False&lt;br /&gt;
ExternalHostName = YourIP_DNSname&lt;br /&gt;
; &lt;br /&gt;
;NonphysicalPrimMax = 0&lt;br /&gt;
;PhysicalPrimMax = 0&lt;br /&gt;
ClampPrimSize = False&lt;br /&gt;
;MaxPrims = 15000&lt;br /&gt;
; &lt;br /&gt;
;ScopeID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
;&lt;br /&gt;
;************************************************&lt;br /&gt;
[RegionName_Centre]&lt;br /&gt;
RegionUUID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
Location = 5001,5001&lt;br /&gt;
InternalAddress = 0.0.0.0&lt;br /&gt;
InternalPort = 9005&lt;br /&gt;
AllowAlternatePorts = False&lt;br /&gt;
ExternalHostName = YourIP_DNSname&lt;br /&gt;
; &lt;br /&gt;
;NonphysicalPrimMax = 0&lt;br /&gt;
;PhysicalPrimMax = 0&lt;br /&gt;
ClampPrimSize = False&lt;br /&gt;
;MaxPrims = 15000&lt;br /&gt;
; &lt;br /&gt;
;ScopeID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
;************************************************&lt;br /&gt;
[RegionName_N]&lt;br /&gt;
RegionUUID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
Location = 5001,5002&lt;br /&gt;
InternalAddress = 0.0.0.0&lt;br /&gt;
InternalPort = 9006&lt;br /&gt;
AllowAlternatePorts = False&lt;br /&gt;
ExternalHostName = YourIP_DNSname&lt;br /&gt;
; &lt;br /&gt;
;NonphysicalPrimMax = 0&lt;br /&gt;
;PhysicalPrimMax = 0&lt;br /&gt;
ClampPrimSize = False&lt;br /&gt;
;MaxPrims = 15000&lt;br /&gt;
;ScopeID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
;&lt;br /&gt;
;************************************************&lt;br /&gt;
;&lt;br /&gt;
[RegionName_SE]&lt;br /&gt;
RegionUUID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
Location = 5002,5000&lt;br /&gt;
InternalAddress = 0.0.0.0&lt;br /&gt;
InternalPort = 9007&lt;br /&gt;
AllowAlternatePorts = False&lt;br /&gt;
ExternalHostName = YourIP_DNSname&lt;br /&gt;
; &lt;br /&gt;
;NonphysicalPrimMax = 0&lt;br /&gt;
;PhysicalPrimMax = 0&lt;br /&gt;
ClampPrimSize = False&lt;br /&gt;
;MaxPrims = 15000&lt;br /&gt;
; &lt;br /&gt;
;ScopeID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
;&lt;br /&gt;
;************************************************&lt;br /&gt;
[RegionName_E]&lt;br /&gt;
RegionUUID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
Location = 5002,5001&lt;br /&gt;
InternalAddress = 0.0.0.0&lt;br /&gt;
InternalPort = 9008&lt;br /&gt;
AllowAlternatePorts = False&lt;br /&gt;
ExternalHostName = YourIP_DNSname&lt;br /&gt;
;&lt;br /&gt;
;NonphysicalPrimMax = 0&lt;br /&gt;
;PhysicalPrimMax = 0&lt;br /&gt;
ClampPrimSize = False&lt;br /&gt;
;MaxPrims = 15000&lt;br /&gt;
; &lt;br /&gt;
;ScopeID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
;&lt;br /&gt;
;************************************************&lt;br /&gt;
[RegionName_NE]&lt;br /&gt;
RegionUUID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
Location = 5002,5002&lt;br /&gt;
InternalAddress = 0.0.0.0&lt;br /&gt;
InternalPort = 9009&lt;br /&gt;
AllowAlternatePorts = False&lt;br /&gt;
ExternalHostName = YourIP_DNSname&lt;br /&gt;
; &lt;br /&gt;
;NonphysicalPrimMax = 0&lt;br /&gt;
;PhysicalPrimMax = 0&lt;br /&gt;
ClampPrimSize = False&lt;br /&gt;
;MaxPrims = 15000&lt;br /&gt;
; &lt;br /&gt;
;ScopeID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
;&lt;br /&gt;
;************************************************&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Setting_Up_Mega-Regions</id>
		<title>Setting Up Mega-Regions</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Setting_Up_Mega-Regions"/>
				<updated>2012-06-21T00:29:49Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* Layout Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quicklinks}}&lt;br /&gt;
{{needsexample}}&lt;br /&gt;
{{ambox&lt;br /&gt;
| type = content&lt;br /&gt;
| text = There are still some outstanding issues being addressed by the Dev team. If you wish to incorporate your existing regions into a megaregion, make OARS and do Full Backups of everything on the current regions. Restoring OAR will deposit the restored region on the most South West Corner ONLY. This is being worked out at the time of this writing. (more information needs to be put in this area...) Updated October 26, 2010}}&lt;br /&gt;
&lt;br /&gt;
= Layout Diagram =&lt;br /&gt;
&lt;br /&gt;
Here is a diagram of possible configurations. This is not all inclusive but is a good example of layout for the regions. &lt;br /&gt;
&lt;br /&gt;
'''SPECIAL NOTE''' - Most Viewers still suffer the 4096 Teleport Bug where people cannot teleport more than 4096 regions away. OSGrid is centered @ 10000 10000. Some Viewers, such as MeerKat or Imprudence, have addressed this recently, others will likely follow suit. This bug applies to HyperGrided regions as well as Non-Hypergrid regions. &lt;br /&gt;
&lt;br /&gt;
Do not place Mega regions and normal regions any closer than 2 regions spaces apart, as they WILL interfere with each other.&lt;br /&gt;
&lt;br /&gt;
[[Image:MegaReg Layout.png|center|512x512px|Mega region Layout Example]]&lt;br /&gt;
&lt;br /&gt;
= Steps =&lt;br /&gt;
&lt;br /&gt;
=== Step 0: Back Up Regions ===&lt;br /&gt;
&lt;br /&gt;
If your OpenSimulator instance doesn't have currently any contents, then skip to [[#Step 1: Edit the File &amp;quot;OpenSim.ini&amp;quot;]].&lt;br /&gt;
&lt;br /&gt;
If your regions have existing content, joining them may be dangerous -- you risk losing content. By way of precaution,&lt;br /&gt;
&lt;br /&gt;
# Make a backup of your database. See [[Backups]] for instructions.&lt;br /&gt;
# Make an OAR for EACH REGION which you intend integrate into a megaregion. See [[OpenSim Archives]] for instructions.&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Edit the File &amp;quot;OpenSim.ini&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Modify your OpenSim.ini. In &amp;lt;nowiki&amp;gt;[Startup]&amp;lt;/nowiki&amp;gt; section, change&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
    ; CombineContiguousRegions = false&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
to&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
    CombineContiguousRegions = true&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Edit the File &amp;quot;Regions.ini&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Edit the file Region.ini which is located in &amp;quot;bin/Regions&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The example provided in [[#Example of Regions.ini File]] below is for a Mega-Region consists of 3x3, 9 simulator. Fill in the correct information in all the required fields. Remember to order your regions from '''South-West to North-East ''' in your Regions.ini.&lt;br /&gt;
&lt;br /&gt;
=== Step 3 : Start OpenSimulator Instance ===&lt;br /&gt;
&lt;br /&gt;
Start Opensimulator. If your regions have no contents, then you already have it! If not, &lt;br /&gt;
&lt;br /&gt;
# You will see a number of error messages -- ignore them. &lt;br /&gt;
# Wait for a while before console activity stopping, then type: '''fix-phantoms''' &lt;br /&gt;
# Wait before process completing. It can take several minutes for the backup thread to store everything.&lt;br /&gt;
# When the console activity stops, type: '''backup''' (This will persist the data into the Database again as a precaution).&lt;br /&gt;
# Restart Opensim, and check that all the objects are in their right places. &lt;br /&gt;
&lt;br /&gt;
See Also: [http://www.metaverseink.com/blog/?p=28 Importing OARs into megaregions (Diva's blog post)]&lt;br /&gt;
&lt;br /&gt;
= Example of Regions.ini File =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;; 9 Simulator 3x3 Mega-Region Example&lt;br /&gt;
; Supply a unique UUID for each region&lt;br /&gt;
; Unique InternalPort for Each Region&lt;br /&gt;
; &lt;br /&gt;
;************************************************&lt;br /&gt;
[RegionName_SW]&lt;br /&gt;
RegionUUID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
Location = 5000,5000&lt;br /&gt;
InternalAddress = 0.0.0.0&lt;br /&gt;
InternalPort = 9001&lt;br /&gt;
AllowAlternatePorts = False&lt;br /&gt;
ExternalHostName = YourIP_DNSname&lt;br /&gt;
;&lt;br /&gt;
;NonphysicalPrimMax = 0&lt;br /&gt;
;PhysicalPrimMax = 0&lt;br /&gt;
ClampPrimSize = False&lt;br /&gt;
;MaxPrims = 15000&lt;br /&gt;
;&lt;br /&gt;
;ScopeID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
;************************************************&lt;br /&gt;
[RegionName_W]&lt;br /&gt;
RegionUUID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
Location = 5000,5001&lt;br /&gt;
InternalAddress = 0.0.0.0&lt;br /&gt;
InternalPort = 9002&lt;br /&gt;
AllowAlternatePorts = False&lt;br /&gt;
ExternalHostName = YourIP_DNSname&lt;br /&gt;
;&lt;br /&gt;
;NonphysicalPrimMax = 0&lt;br /&gt;
;PhysicalPrimMax = 0&lt;br /&gt;
ClampPrimSize = False&lt;br /&gt;
;MaxPrims = 15000&lt;br /&gt;
; &lt;br /&gt;
;ScopeID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
;************************************************&lt;br /&gt;
[RegionName_NW]&lt;br /&gt;
RegionUUID = 84b41485-6884-412d-b4a2-2f6941559924&lt;br /&gt;
Location = 5000,5002&lt;br /&gt;
InternalAddress = 0.0.0.0&lt;br /&gt;
InternalPort = 9003&lt;br /&gt;
AllowAlternatePorts = False&lt;br /&gt;
ExternalHostName = YourIP_DNSname&lt;br /&gt;
; &lt;br /&gt;
;NonphysicalPrimMax = 0&lt;br /&gt;
;PhysicalPrimMax = 0&lt;br /&gt;
ClampPrimSize = False&lt;br /&gt;
;MaxPrims = 15000&lt;br /&gt;
; &lt;br /&gt;
;ScopeID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
;&lt;br /&gt;
;************************************************&lt;br /&gt;
[RegionName_S]&lt;br /&gt;
RegionUUID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
Location = 5001,5000&lt;br /&gt;
InternalAddress = 0.0.0.0&lt;br /&gt;
InternalPort = 9004&lt;br /&gt;
AllowAlternatePorts = False&lt;br /&gt;
ExternalHostName = YourIP_DNSname&lt;br /&gt;
; &lt;br /&gt;
;NonphysicalPrimMax = 0&lt;br /&gt;
;PhysicalPrimMax = 0&lt;br /&gt;
ClampPrimSize = False&lt;br /&gt;
;MaxPrims = 15000&lt;br /&gt;
; &lt;br /&gt;
;ScopeID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
;&lt;br /&gt;
;************************************************&lt;br /&gt;
[RegionName_Centre]&lt;br /&gt;
RegionUUID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
Location = 5001,5001&lt;br /&gt;
InternalAddress = 0.0.0.0&lt;br /&gt;
InternalPort = 9005&lt;br /&gt;
AllowAlternatePorts = False&lt;br /&gt;
ExternalHostName = YourIP_DNSname&lt;br /&gt;
; &lt;br /&gt;
;NonphysicalPrimMax = 0&lt;br /&gt;
;PhysicalPrimMax = 0&lt;br /&gt;
ClampPrimSize = False&lt;br /&gt;
;MaxPrims = 15000&lt;br /&gt;
; &lt;br /&gt;
;ScopeID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
;************************************************&lt;br /&gt;
[RegionName_N]&lt;br /&gt;
RegionUUID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
Location = 5001,5002&lt;br /&gt;
InternalAddress = 0.0.0.0&lt;br /&gt;
InternalPort = 9006&lt;br /&gt;
AllowAlternatePorts = False&lt;br /&gt;
ExternalHostName = YourIP_DNSname&lt;br /&gt;
; &lt;br /&gt;
;NonphysicalPrimMax = 0&lt;br /&gt;
;PhysicalPrimMax = 0&lt;br /&gt;
ClampPrimSize = False&lt;br /&gt;
;MaxPrims = 15000&lt;br /&gt;
;ScopeID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
;&lt;br /&gt;
;************************************************&lt;br /&gt;
;&lt;br /&gt;
[RegionName_SE]&lt;br /&gt;
RegionUUID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
Location = 5002,5000&lt;br /&gt;
InternalAddress = 0.0.0.0&lt;br /&gt;
InternalPort = 9007&lt;br /&gt;
AllowAlternatePorts = False&lt;br /&gt;
ExternalHostName = YourIP_DNSname&lt;br /&gt;
; &lt;br /&gt;
;NonphysicalPrimMax = 0&lt;br /&gt;
;PhysicalPrimMax = 0&lt;br /&gt;
ClampPrimSize = False&lt;br /&gt;
;MaxPrims = 15000&lt;br /&gt;
; &lt;br /&gt;
;ScopeID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
;&lt;br /&gt;
;************************************************&lt;br /&gt;
[RegionName_E]&lt;br /&gt;
RegionUUID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
Location = 5002,5001&lt;br /&gt;
InternalAddress = 0.0.0.0&lt;br /&gt;
InternalPort = 9008&lt;br /&gt;
AllowAlternatePorts = False&lt;br /&gt;
ExternalHostName = YourIP_DNSname&lt;br /&gt;
;&lt;br /&gt;
;NonphysicalPrimMax = 0&lt;br /&gt;
;PhysicalPrimMax = 0&lt;br /&gt;
ClampPrimSize = False&lt;br /&gt;
;MaxPrims = 15000&lt;br /&gt;
; &lt;br /&gt;
;ScopeID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
;&lt;br /&gt;
;************************************************&lt;br /&gt;
[RegionName_NE]&lt;br /&gt;
RegionUUID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
Location = 5002,5002&lt;br /&gt;
InternalAddress = 0.0.0.0&lt;br /&gt;
InternalPort = 9009&lt;br /&gt;
AllowAlternatePorts = False&lt;br /&gt;
ExternalHostName = YourIP_DNSname&lt;br /&gt;
; &lt;br /&gt;
;NonphysicalPrimMax = 0&lt;br /&gt;
;PhysicalPrimMax = 0&lt;br /&gt;
ClampPrimSize = False&lt;br /&gt;
;MaxPrims = 15000&lt;br /&gt;
; &lt;br /&gt;
;ScopeID = 00000000-0000-0000-0000-000000000000&lt;br /&gt;
;&lt;br /&gt;
;************************************************&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/RemoteAdmin:admin_broadcast</id>
		<title>RemoteAdmin:admin broadcast</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/RemoteAdmin:admin_broadcast"/>
				<updated>2012-05-03T20:58:33Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: /* C# */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''admin_broadcast''' remotely allows to broadcast a general alert to all agents in a region&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Enabling admin_broadcast ===&lt;br /&gt;
If not all functions are enabled, use admin_dbroadcast to enable the function in the [RemoteAdmin] section&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
enabled_methods = admin_broadcast,...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
=== Required Parameters ===&lt;br /&gt;
These parameters are required&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;4&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! parameter&lt;br /&gt;
! Description&lt;br /&gt;
! Values&lt;br /&gt;
|-&lt;br /&gt;
| ''message ''&lt;br /&gt;
| Message to be broadcasted&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Optional Parameters ===&lt;br /&gt;
There are no optional parameters&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Returned Parameters ==&lt;br /&gt;
=== Returned Parameters ===&lt;br /&gt;
These parameters are returned by Remote Admin&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;4&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! parameter&lt;br /&gt;
! Description&lt;br /&gt;
! Values&lt;br /&gt;
|-&lt;br /&gt;
| ''success''&lt;br /&gt;
| true when successfull&lt;br /&gt;
| true, false&lt;br /&gt;
|-&lt;br /&gt;
|''error''&lt;br /&gt;
| error message when not successfull &lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Error messages ===&lt;br /&gt;
No error Messages&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* ''accepted'' is an optional returned parameter, probably used prior to ''success''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
=== PHP ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
// Including the RemoteAdmin PHP class.&lt;br /&gt;
include('RemoteAdmin.php');&lt;br /&gt;
&lt;br /&gt;
// Instantiate the class with parameters identical to the Python example above&lt;br /&gt;
$myRemoteAdmin = new RemoteAdmin('127.0.0.1', 9000, 'secret');&lt;br /&gt;
&lt;br /&gt;
// Invoke admin_create_user (multiple parameters)&lt;br /&gt;
$parameters = array('message' =&amp;gt; 'Welcome in my region');&lt;br /&gt;
$myRemoteAdmin-&amp;gt;SendCommand('admin_broadcast', $parameters);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Python ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Author : DrScofield &lt;br /&gt;
# Source : http://xyzzyxyzzy.net/2008/01/23/using-pythons-xmlrpclib-with-opensim/&lt;br /&gt;
# License : BSD License&lt;br /&gt;
 &lt;br /&gt;
#!/usr/bin/python &lt;br /&gt;
import xmlrpclib &lt;br /&gt;
 &lt;br /&gt;
# XML-RPC URL (http_listener_port) &lt;br /&gt;
simulatorUrl = &amp;quot;http://127.0.0.1:9000&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
# instantiate server object &lt;br /&gt;
simulator = xmlrpclib.Server(simulatorUrl) &lt;br /&gt;
 &lt;br /&gt;
# invoke admin_alert: requires password and message &lt;br /&gt;
simulator.admin_broadcast({'password': 'secret', 'message': 'the answer is 42'})&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== C# ===&lt;br /&gt;
&lt;br /&gt;
This C# example is made as console project.&lt;br /&gt;
you need to use the XMLRPC.DLL that you can find in the opensim packadge.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Linq;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using Nwc.XmlRpc;&lt;br /&gt;
&lt;br /&gt;
namespace ConsoleApplication1&lt;br /&gt;
{&lt;br /&gt;
    class Program&lt;br /&gt;
    {&lt;br /&gt;
        static void Main(string[] args)&lt;br /&gt;
        {&lt;br /&gt;
            var ht = new Hashtable();&lt;br /&gt;
            ht[&amp;quot;password&amp;quot;] = &amp;quot;password&amp;quot;;&lt;br /&gt;
            ht[&amp;quot;message&amp;quot;] = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
            var parameters = new List&amp;lt;Hashtable&amp;gt; { ht };&lt;br /&gt;
            var rpc = new XmlRpcRequest(&amp;quot;admin_broadcast&amp;quot;, parameters);&lt;br /&gt;
            rpc.Invoke(&amp;quot;http://127.0.0.1:9999&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[RemoteAdmin]]&lt;br /&gt;
[[RemoteAdmin:Commands]]&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/RemoteAdmin:admin_broadcast</id>
		<title>RemoteAdmin:admin broadcast</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/RemoteAdmin:admin_broadcast"/>
				<updated>2012-05-03T20:56:02Z</updated>
		
		<summary type="html">&lt;p&gt;Richardus Raymaker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''admin_broadcast''' remotely allows to broadcast a general alert to all agents in a region&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Enabling admin_broadcast ===&lt;br /&gt;
If not all functions are enabled, use admin_dbroadcast to enable the function in the [RemoteAdmin] section&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
enabled_methods = admin_broadcast,...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
=== Required Parameters ===&lt;br /&gt;
These parameters are required&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;4&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! parameter&lt;br /&gt;
! Description&lt;br /&gt;
! Values&lt;br /&gt;
|-&lt;br /&gt;
| ''message ''&lt;br /&gt;
| Message to be broadcasted&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Optional Parameters ===&lt;br /&gt;
There are no optional parameters&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Returned Parameters ==&lt;br /&gt;
=== Returned Parameters ===&lt;br /&gt;
These parameters are returned by Remote Admin&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;4&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! parameter&lt;br /&gt;
! Description&lt;br /&gt;
! Values&lt;br /&gt;
|-&lt;br /&gt;
| ''success''&lt;br /&gt;
| true when successfull&lt;br /&gt;
| true, false&lt;br /&gt;
|-&lt;br /&gt;
|''error''&lt;br /&gt;
| error message when not successfull &lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Error messages ===&lt;br /&gt;
No error Messages&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* ''accepted'' is an optional returned parameter, probably used prior to ''success''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
=== PHP ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
// Including the RemoteAdmin PHP class.&lt;br /&gt;
include('RemoteAdmin.php');&lt;br /&gt;
&lt;br /&gt;
// Instantiate the class with parameters identical to the Python example above&lt;br /&gt;
$myRemoteAdmin = new RemoteAdmin('127.0.0.1', 9000, 'secret');&lt;br /&gt;
&lt;br /&gt;
// Invoke admin_create_user (multiple parameters)&lt;br /&gt;
$parameters = array('message' =&amp;gt; 'Welcome in my region');&lt;br /&gt;
$myRemoteAdmin-&amp;gt;SendCommand('admin_broadcast', $parameters);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Python ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Author : DrScofield &lt;br /&gt;
# Source : http://xyzzyxyzzy.net/2008/01/23/using-pythons-xmlrpclib-with-opensim/&lt;br /&gt;
# License : BSD License&lt;br /&gt;
 &lt;br /&gt;
#!/usr/bin/python &lt;br /&gt;
import xmlrpclib &lt;br /&gt;
 &lt;br /&gt;
# XML-RPC URL (http_listener_port) &lt;br /&gt;
simulatorUrl = &amp;quot;http://127.0.0.1:9000&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
# instantiate server object &lt;br /&gt;
simulator = xmlrpclib.Server(simulatorUrl) &lt;br /&gt;
 &lt;br /&gt;
# invoke admin_alert: requires password and message &lt;br /&gt;
simulator.admin_broadcast({'password': 'secret', 'message': 'the answer is 42'})&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== C# ===&lt;br /&gt;
&lt;br /&gt;
This C# example is made with the consoleapplication. &lt;br /&gt;
you need to use the XMLRPC.DLL that you can find in the opensim packadge.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Linq;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using Nwc.XmlRpc;&lt;br /&gt;
&lt;br /&gt;
namespace ConsoleApplication1&lt;br /&gt;
{&lt;br /&gt;
    class Program&lt;br /&gt;
    {&lt;br /&gt;
        static void Main(string[] args)&lt;br /&gt;
        {&lt;br /&gt;
            var ht = new Hashtable();&lt;br /&gt;
            ht[&amp;quot;password&amp;quot;] = &amp;quot;password&amp;quot;;&lt;br /&gt;
            ht[&amp;quot;message&amp;quot;] = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
            var parameters = new List&amp;lt;Hashtable&amp;gt; { ht };&lt;br /&gt;
            var rpc = new XmlRpcRequest(&amp;quot;admin_broadcast&amp;quot;, parameters);&lt;br /&gt;
            rpc.Invoke(&amp;quot;http://127.0.0.1:9999&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[RemoteAdmin]]&lt;br /&gt;
[[RemoteAdmin:Commands]]&lt;/div&gt;</summary>
		<author><name>Richardus Raymaker</name></author>	</entry>

	</feed>