Explanation: You login to your user account on the "main" server: ancientbrain.com
Runs take place on the "run" server: run.ancientbrain.com where there is no user login.
However, some runs can have a form of "login" where they are linked to your account. The run can take certain very carefully controlled actions. It cannot take any normal user actions like delete World, change password, etc. No run page can take those actions.
|Run situation||Is the run logged in?|
|User is not logged in.||No|
|User is logged in. Run is launched from World page (or Mind page or Edit page).||Yes|
|User is logged in. Run is launched from other page.||No|
var AB_arg_NEWARG = "VALUE";The World can then either process it or ignore it.
Both NEWARG and VALUE must be alphanumeric.
See the AB variables used in calls which tells us the information needed for a World to "save data" to the server is:
AB.worldid AB.myuserid AB.dataticketWorld 1 sets up a link to a run of World 2 with this extra data as parameters:
var url ="run.php?args&w=" + AB.worldid + "&u=" + AB.myuserid + "&d=" + AB.dataticket; // write a link with this URL for the user to click: AB.msg ( "<a href='" + url + "'>link</a>" );World 2 retrieves the data and uses it to pretend to be World 1 to make the server call:
AB.worldid = AB_arg_w; AB.myuserid = AB_arg_u; AB.dataticket = AB_arg_d; // if other parts of the code look at AB.runloggedin, it will be set to false // so we might ignore that check, or set it manually: AB.runloggedin = true;World 2 is now "logged in" as World 1 and can save data to World 1's space. World 1 has basically delegated its authority to World 2.
You can modify these as needed, but the ticket must match the call you are trying to make.
|Server call||AB variables used|