corrade-http-templates
/downloadTexture/README.txt |
@@ -8,26 +8,18 @@ |
* A modern browser: Chome, Opera, Firefox, Safari... |
* A webserver. |
* PHP version 5 and beyond. |
* the PHP curl extension. |
* the PHP gd extension (libgd). |
* PHP composer |
* the curl extension. |
* the gd extension (libgd). |
|
-:[ 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: |
* interact |
3.) Place the all the files in a directory on your webserver. |
4.) Navigate to downloadTexture.html in your browser and enjoy. |
|
4.) Place the all the files in a directory on your webserver. |
5.) Navigate to downloadTexture.html in your browser and enjoy. |
|
-:[ References ]:- |
|
[1] Corrade - http://grimore.org/secondlife/scripted_agents/corrade |
/downloadTexture/downloadTexture.html |
@@ -10,7 +10,7 @@ |
<meta name="description" content="Retrieving and Displaying an In-World Texture"> |
<meta name="author" content="Wizardry and Steamworks"> |
|
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> |
<script type="text/javascript"> |
$(document).ready(function() { |
$("#download").click(function(e) { |
/downloadTexture/downloadTexture.php |
@@ -12,7 +12,7 @@ |
########################################################################### |
|
require_once('config.php'); |
require_once('vendor/was/utilities/src/formats/kvp/kvp.php'); |
require_once('functions.php'); |
|
########################################################################### |
## INTERNALS ## |
@@ -65,7 +65,6 @@ |
die; |
} |
|
|
#### |
# II. Convert the image data to a PNG of size 512x512 |
$im = imagescale( |
/downloadTexture/functions.php |
@@ -0,0 +1,18 @@ |
<?php |
|
########################################################################### |
## 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 |
); |
} |