corrade-http-templates

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 71  →  ?path2? @ 70
File deleted
/groupChat/composer.lock
File deleted
/groupChat/composer.json
/groupChat/sendGroupMessage.php
@@ -11,7 +11,7 @@
###########################################################################
 
require_once('config.php');
require_once('vendor/was/utilities/src/formats/kvp/kvp.php');
require_once('functions.php');
 
###########################################################################
## INTERNALS ##
/groupChat/installGroup.php
@@ -11,12 +11,28 @@
###########################################################################
 
require_once('config.php');
require_once('vendor/was/utilities/src/formats/kvp/kvp.php');
 
###########################################################################
## INTERNALS ##
###########################################################################
###########################################################################
## Copyright (C) Wizardry and Steamworks 2015 - License: GNU GPLv3 ##
###########################################################################
function wasKeyValueGet($key, $data) {
return array_reduce(
explode(
"&",
$data
),
function($o, $p) {
$x = explode("=", $p);
return array_shift($x) != $o ? $o : array_shift($x);
},
$key
);
}
####
# I. Build the POST array to send to Corrade.
$params = array(
/groupChat/storeGroupMessage.php
@@ -15,7 +15,7 @@
###########################################################################
 
require_once('config.php');
require_once('vendor/was/utilities/src/IO/IO.php');
require_once('functions.php');
 
###########################################################################
## INTERNALS ##
/groupChat/README.txt
@@ -8,35 +8,23 @@
* A modern browser: Chome, Opera, Firefox, Safari...
* A webserver.
* PHP version 5 and beyond.
* the PHP curl extension.
* PHP composer
* the curl extension.
 
-:[ Setup ]:-
 
1.) Run the following command inside the directory:
 
composer require was/utilities:dev-trunk
 
in order to install all the requirements.
2.) Rename "config.php.dist" to "config.php" and edit "config.php"
to reflect your Corrade settings.
3.) Enable the Corrade permissions for your configured group:
 
1.) Rename "config.php.dist" to "config.php" and edit "config.php"
to reflect your settings in Corrade.ini
2.) Enable the Corrade permissions for your configured group:
* talk
* notifications
 
4.) Enable the notifications for your configured group:
 
3.) Enable the notifications for your configured group:
* group
 
5.) Run the installGroup.php file from a console (you only need to
4.) Run the installGroup.php file from a console (you only need to
do this once):
 
php installGroup.php
5.) Place the all the files in a directory on your webserver.
6.) Navigate to groupChat.html in your browser and enjoy.
 
6.) Place the all the files in a directory on your webserver.
7.) Navigate to groupChat.html in your browser and enjoy.
 
-:[ References ]:-
 
[1] Corrade - http://grimore.org/secondlife/scripted_agents/corrade
/groupChat/functions.php
@@ -0,0 +1,47 @@
<?php
 
###########################################################################
## Copyright (C) Wizardry and Steamworks 2015 - License: GNU GPLv3 ##
###########################################################################
function atomized_put_contents($file, $data) {
$fp = fopen($file, "w+");
if (flock($fp, LOCK_EX)) {
fwrite($fp, $data);
fflush($fp);
flock($fp, LOCK_UN);
}
fclose($fp);
}
###########################################################################
## Copyright (C) Wizardry and Steamworks 2015 - License: GNU GPLv3 ##
###########################################################################
function atomized_get_contents($file) {
$fp = fopen($file, "r+");
$ct = '';
if (flock($fp, LOCK_SH)) {
if (filesize($file)) {
$ct = fread($fp, filesize($file));
}
flock($fp, LOCK_UN);
}
fclose($fp);
return $ct;
}
 
###########################################################################
## Copyright (C) Wizardry and Steamworks 2015 - License: GNU GPLv3 ##
###########################################################################
function wasKeyValueGet($key, $data) {
return array_reduce(
explode(
"&",
$data
),
function($o, $p) {
$x = explode("=", $p);
return array_shift($x) != $o ? $o : array_shift($x);
},
$key
);
}