XML format for CCRPetitionURL function in [vault_server].

XML format which is sent by the vault_server process is documented below. The server sends this to the server specified in CCRPetitionURL whenever a user uses one of the CCR petitions below.

UbiSoft was evidently using RightNow Service from RightNow technologies. At this url (http://www.rightnowtech.com/resource/int_white.html) is a sample document which is similar to the one below.

<connector>
   <function name='incident_create'>
      <parameter name='args'>
         <pair name='title'>Uru ingame: general help</pair> 
         <pair name='contact_info' type='string'></pair> 
         <pair name='customer_id' type='integer'>0</pair>
         <pair name='thread' type='pair'>
            <pair name='thread_entry' type='pair'>
            <pair name='entry_type' type='integer'>3</pair> 
            <pair name='note' type='string'>Shard : PrivateShard AcctName : cjkelly1
 PlayerName : cjkelly1 PlayerID : 20007 Language : English CustEmail : CustID : 0 
Chat line petition This is a petition</pair> 
            </pair>
         </pair>
         <pair name='source' type='integer'>3</pair> 
         <pair name='custom_field' type='pair'>
            <pair name='code' type='integer'>16</pair> 
            <pair name='value' type='string'>English</pair> 
         </pair>
      </parameter>
   </function>
</connector>

The line <pair name="title">Uru ingame: general help</pair> is broken in the server. The server actually sends <pair name="title">Uru ingame:80/pair which causes the xml to fail.

The title types below correspond with the commands as follows:

Submitted by - cjkelly1


You can get this info from the database as well using the following query.

select Blob1GUID from Nodes where String64_1='CCR Petition' and NodeType=26

The Blob1GUID is the VaultBlobs file on the hard drive, which contains the actual petition text.

Format of this blob file is:

[Petition]
AcctName=cjkelly1
Content= This is a petition
Language=English
PlayerID=20007
PlayerName=cjkelly1
Title=Chat line petition
Type=0

The Type entry determines what kind of petition it is.

Type 0 = /petition or /generalhelp
Type 1 = /bug
Type 3 = /exploit
Type 4 = /harass
Type 5 = /stuck
Type 6 = /technical


Added by cjkelly1

Here's some scruffy PHP for getting the path to the Blob given a CCR petition IDX. Code expects two parameters: the blob idx and also a 1 or 2 to specify which blob to return. In this case we want '1'. The function returns the absolute path to the given blob. It requires a few defs and another function, also listed below:

File db.inc:

<?php
$user=""; //Set this to the username plasma uses to talk with MySQL.
$host="localhost";
$password=""; //Password for MySQL user
mysql_connect($host,$user,$password);
?>

File defs.inc:

<?php
define ("VAULT", "vaultdb_test"); //edit to use the database names you chose.
define ("AUTH", "authdb_test");
define ("BLOBPATH", "/home/parable/uu/var/VaultBlobs/xxxxxxxxxxxxxxxx/"); //change to the top level blob folder on your shard
?>

Pre requisite functions:

function getdata($database,$query)
{
        mysql_select_db($database);
        $query = stripSlashes($query);
        $result = mysql_query($query);
        if ($result==0) exit("<b>Error in functions.inc (".mysql_errno()."): ".mysql_error()."</b>");
        return $result;
}

The code itself:

function getblobfromidx($idx,$num)
{
        $result=getdata(VAULT, "select distinct Blob".$num."GUID from Nodes where Idx=".$idx." and String64_1='CCR Petition' and NodeType=26");
        $path = mysql_fetch_row($result);
        $blobpath = $path[0];
        $tmp =  substr($blobpath,0,2)."/".
                        substr($blobpath,2,2)."/".
                        substr($blobpath,4,2)."/".
                        substr($blobpath,6,2)."/".
                        substr($blobpath,8,2)."/".
                        substr($blobpath,10,2)."/".
                        substr($blobpath,12,2)."/".
                        substr($blobpath,14,2).".blob";

        return BLOBPATH.$tmp;
}

All this is part of a larger library of useful PHP I'm building up. I'll post more in the PHP section when ready. Most of the code I'm working on is designed to be viewed using a browser, rather than the command line.

Added by Gav (Meeting Place)

CCRPetition (last edited 2008-12-27 16:35:31 by localhost)