Page MenuHomeCode

No OneTemporary

diff --git a/scenes/B00001001.tpl b/content/scenes/B00001001.tpl
similarity index 81%
rename from scenes/B00001001.tpl
rename to content/scenes/B00001001.tpl
index ce87d2d..b6505d0 100644
--- a/scenes/B00001001.tpl
+++ b/content/scenes/B00001001.tpl
@@ -1,63 +1,63 @@
<!-- JQuery -->
<script src="/js/jquery-1.3.2.min.js"></script>
<!-- Tower navigation CSS -->
<style>
#tower {
- background-image: url(/scenes/{$CurrentPerso->location_global}/all.png);
+ background-image: url(/{$SCENE_URL}/{$CurrentPerso->location_global}/all.png);
background-position: left;
background-repeat: no-repeat;
height: 442px;
}
#tower_hl {
position: relative;
}
</style>
<div id="tower"></div>
<!-- Tower navigation JQuery code -->
<script>
var tower = {
//The source to highlight picture
- hl: '/scenes/{$CurrentPerso->location_global}/hl.png',
+ hl: '/{$SCENE_URL}/{$CurrentPerso->location_global}/hl.png',
//The highlighted corridor (1-6). 0 = no hl
i: 0,
//The corridor 4 (top) hl starts at:
hlStartPosition: [163, 93],
//Gets CurrentPerso html code
getHighlightCode: function () {
- return "<img id='tower_hl' src='/scenes/{$CurrentPerso->location_global}/hl.png' alt='Corridor " + this.i + "' />";
+ return "<img id='tower_hl' src='" + this.hl + "' alt='Corridor " + this.i + "' />";
},
highlight: function (i) {
//If already there, nothing to do
if (this.i == i) return;
//Puts hl
this.i = i;
$('#tower').html(this.getHighlightCode());
var o = document.getElementById("tower_hl");
o.style.left = this.hlStartPosition[0] + "px";
o.style.top = this.hlStartPosition[1] + "px";
//The 4 is okay
if (i == 4) return;
//Gets rotation angle
if (i > 4) {
angle = 60 * (i - 4);
} else {
angle = 180 + (i -1) * 60;
}
}
}
$(document).ready(function() {
tower.highlight(3);
});
</script>
\ No newline at end of file
diff --git a/scenes/B00001001/all.png b/content/scenes/B00001001/all.png
similarity index 100%
rename from scenes/B00001001/all.png
rename to content/scenes/B00001001/all.png
diff --git a/scenes/B00001001/hl.ai b/content/scenes/B00001001/hl.ai
similarity index 100%
rename from scenes/B00001001/hl.ai
rename to content/scenes/B00001001/hl.ai
diff --git a/scenes/B00001001/hl.png b/content/scenes/B00001001/hl.png
similarity index 100%
rename from scenes/B00001001/hl.png
rename to content/scenes/B00001001/hl.png
diff --git a/scenes/B00002.jpg b/content/scenes/B00002.jpg
similarity index 100%
rename from scenes/B00002.jpg
rename to content/scenes/B00002.jpg
diff --git a/scenes/B00002.png b/content/scenes/B00002.png
similarity index 100%
rename from scenes/B00002.png
rename to content/scenes/B00002.png
diff --git a/content/scenes/B00002.tpl b/content/scenes/B00002.tpl
new file mode 100644
index 0000000..326296c
--- /dev/null
+++ b/content/scenes/B00002.tpl
@@ -0,0 +1,6 @@
+{$code = substr($CurrentPerso->location_global, 0, 6)}
+ <!-- {$code} -->
+ <img src="/{$SCENE_URL}/{$code}.png" alt="{sprintf(#SpaceAround#, $CurrentPerso->location->body->name)}" border="0" usemap="#SceneMap" />
+ <map name="SceneMap" id="SceneMap">
+ <area shape="circle" coords="155,144,93" href="{get_url('explore')}" alt="{$CurrentPerso->location->body->name}" />
+ </map>
\ No newline at end of file
diff --git a/scenes/B00003.jpg b/content/scenes/B00003.jpg
similarity index 100%
rename from scenes/B00003.jpg
rename to content/scenes/B00003.jpg
diff --git a/content/scenes/B00003.tpl b/content/scenes/B00003.tpl
new file mode 100644
index 0000000..2db8d78
--- /dev/null
+++ b/content/scenes/B00003.tpl
@@ -0,0 +1,6 @@
+{$code = substr($CurrentPerso->location_global, 0, 6)}
+ <!-- {$code} -->
+ <img src="/{$SCENE_URL}/{$code}.jpg" alt="{sprintf(#SpaceAround#, $CurrentPerso->location->body->name)}" border="0" usemap="#SceneMap" />
+ <map name="SceneMap" id="SceneMap">
+ <area shape="circle" coords="732,207,129" href="{get_url('explore')}" alt="{$CurrentPerso->location->body->name}" />
+ </map>
\ No newline at end of file
diff --git a/users/1148/BlueMetalDrakes.png b/content/users/1148/BlueMetalDrakes.png
similarity index 100%
rename from users/1148/BlueMetalDrakes.png
rename to content/users/1148/BlueMetalDrakes.png
diff --git a/users/1148/FireAnim.jpg b/content/users/1148/FireAnim.jpg
similarity index 100%
rename from users/1148/FireAnim.jpg
rename to content/users/1148/FireAnim.jpg
diff --git a/users/1148/FireAnimSquare.jpg b/content/users/1148/FireAnimSquare.jpg
similarity index 100%
rename from users/1148/FireAnimSquare.jpg
rename to content/users/1148/FireAnimSquare.jpg
diff --git a/users/1148/NeonDcK.jpg b/content/users/1148/NeonDcK.jpg
similarity index 100%
rename from users/1148/NeonDcK.jpg
rename to content/users/1148/NeonDcK.jpg
diff --git a/users/1148/NeonDcKSquare.jpg b/content/users/1148/NeonDcKSquare.jpg
similarity index 100%
rename from users/1148/NeonDcKSquare.jpg
rename to content/users/1148/NeonDcKSquare.jpg
diff --git a/users/1148/NeuromancerIceDream1440x900.jpg b/content/users/1148/NeuromancerIceDream1440x900.jpg
similarity index 100%
rename from users/1148/NeuromancerIceDream1440x900.jpg
rename to content/users/1148/NeuromancerIceDream1440x900.jpg
diff --git a/users/1148/ktor.png b/content/users/1148/ktor.png
similarity index 100%
rename from users/1148/ktor.png
rename to content/users/1148/ktor.png
diff --git a/users/1148/plate.jpg b/content/users/1148/plate.jpg
similarity index 100%
rename from users/1148/plate.jpg
rename to content/users/1148/plate.jpg
diff --git a/users/1148/warning.mp3 b/content/users/1148/warning.mp3
similarity index 100%
rename from users/1148/warning.mp3
rename to content/users/1148/warning.mp3
diff --git a/users/6200/ghostmetro-A-01.jpg b/content/users/6200/ghostmetro-A-01.jpg
similarity index 100%
rename from users/6200/ghostmetro-A-01.jpg
rename to content/users/6200/ghostmetro-A-01.jpg
diff --git a/users/6200/ghostmetro-A-02.jpg b/content/users/6200/ghostmetro-A-02.jpg
similarity index 100%
rename from users/6200/ghostmetro-A-02.jpg
rename to content/users/6200/ghostmetro-A-02.jpg
diff --git a/users/6200/ghostmetro-A-03.jpg b/content/users/6200/ghostmetro-A-03.jpg
similarity index 100%
rename from users/6200/ghostmetro-A-03.jpg
rename to content/users/6200/ghostmetro-A-03.jpg
diff --git a/users/6200/ghostmetro-A-04.jpg b/content/users/6200/ghostmetro-A-04.jpg
similarity index 100%
rename from users/6200/ghostmetro-A-04.jpg
rename to content/users/6200/ghostmetro-A-04.jpg
diff --git a/users/6200/ghostmetro-A-05-a.jpg b/content/users/6200/ghostmetro-A-05-a.jpg
similarity index 100%
rename from users/6200/ghostmetro-A-05-a.jpg
rename to content/users/6200/ghostmetro-A-05-a.jpg
diff --git a/users/6200/ghostmetro-A-05-b.jpg b/content/users/6200/ghostmetro-A-05-b.jpg
similarity index 100%
rename from users/6200/ghostmetro-A-05-b.jpg
rename to content/users/6200/ghostmetro-A-05-b.jpg
diff --git a/users/6200/ghostmetro-A-05-c.jpg b/content/users/6200/ghostmetro-A-05-c.jpg
similarity index 100%
rename from users/6200/ghostmetro-A-05-c.jpg
rename to content/users/6200/ghostmetro-A-05-c.jpg
diff --git a/users/6200/ghostmetro-A-06.png b/content/users/6200/ghostmetro-A-06.png
similarity index 100%
rename from users/6200/ghostmetro-A-06.png
rename to content/users/6200/ghostmetro-A-06.png
diff --git a/users/6200/ghostmetro-A-07.jpg b/content/users/6200/ghostmetro-A-07.jpg
similarity index 100%
rename from users/6200/ghostmetro-A-07.jpg
rename to content/users/6200/ghostmetro-A-07.jpg
diff --git a/users/6200/ghostmetro-A-08.jpg b/content/users/6200/ghostmetro-A-08.jpg
similarity index 100%
rename from users/6200/ghostmetro-A-08.jpg
rename to content/users/6200/ghostmetro-A-08.jpg
diff --git a/users/6200/ghostmetro-A-09.jpg b/content/users/6200/ghostmetro-A-09.jpg
similarity index 100%
rename from users/6200/ghostmetro-A-09.jpg
rename to content/users/6200/ghostmetro-A-09.jpg
diff --git a/users/6200/ghostmetro-A-10.jpg b/content/users/6200/ghostmetro-A-10.jpg
similarity index 100%
rename from users/6200/ghostmetro-A-10.jpg
rename to content/users/6200/ghostmetro-A-10.jpg
diff --git a/users/6200/ghostmetro-A-11.jpg b/content/users/6200/ghostmetro-A-11.jpg
similarity index 100%
rename from users/6200/ghostmetro-A-11.jpg
rename to content/users/6200/ghostmetro-A-11.jpg
diff --git a/includes/geo/scene.php b/includes/geo/scene.php
index 264b45a..89d15c2 100644
--- a/includes/geo/scene.php
+++ b/includes/geo/scene.php
@@ -1,129 +1,130 @@
<?php
/*
* Geo scene class
*
* 0.1 2010-01-30 17:42 DcK
*
* @package Zed
* @subpackage Geo
* @copyright Copyright (c) 2010, Dereckson
* @license Released under BSD license
* @version 0.1
*
*/
require_once('location.php');
-if (!defined('SCENE_DIR')) define('SCENE_DIR', 'scenes');
+if (!defined('SCENE_DIR')) define('SCENE_DIR', 'content/scenes');
class GeoScene {
/*
* @var string Last error warning
*/
public $lastError;
/*
* @var string File scene to serve
*/
public $sceneFile;
/*
* @var GeoLocation the location to print the scene
*/
public $location;
/*
* Initializes a new GeoScene instance
* @param GeoLocation $location location the scene is to print
*/
function __construct ($location) {
$this->location = $location;
//Gets local scene
if ($location->containsLocalLocation) {
if ($this->get_local_scene()) return;
}
//Gets global scene
if ($location->containsGlobalLocation) {
if ($this->get_global_scene()) return;
}
//If not scene found, let's set a warning
$this->lastError = "No scene found.";
}
/*
* Gets local scene
* @return boolean true if a scene have been found ; otherwise, false.
*/
private function get_local_scene () {
return false;
}
/*
* Gets global scene
* @return boolean true if a scene have been found ; otherwise, false.
*/
private function get_global_scene () {
$location = $this->location;
if ($location->place) {
if ($this->try_get_scene($location->global)) {
return true;
}
}
if ($location->body) {
if ($this->try_get_scene('B' . $location->body->code)) {
return true;
}
}
return false;
}
public static function get_file_extension ($file) {
$pathinfo = pathinfo($file);
return $pathinfo['extension'];
}
public function render () {
if ($file = $this->sceneFile) {
switch ($ext = GeoScene::get_file_extension($file)) {
case 'png':
case 'jpg':
case 'gif':
case 'bmp':
echo "<img src=\"$file\" />";
break;
case 'tpl':
global $smarty;
$template_dir = $smarty->template_dir;
$smarty->template_dir = getcwd();
+ $smarty->assign("SCENE_URL", SCENE_DIR);
$smarty->display($file);
$smarty->template_dir = $template_dir;
break;
case 'php':
message_die(HACK_ERROR, ".php scene files not allowed without review", '', __LINE__, __FILE__);
default:
message_die(GENERAL_ERROR, "Can't handle $ext extension for $file scene", 'GeoScene render error', __LINE__, __FILE__);
}
echo "\n\n";
}
}
private function try_get_scene ($code) {
$file = SCENE_DIR . "/$code";
$extensions = array('tpl', 'png', 'jpg', 'gif', 'bmp', 'swf', 'html', 'php');
foreach ($extensions as $ext) {
if (file_exists("$file.$ext")) {
$this->sceneFile = "$file.$ext";
return true;
}
}
return false;
}
}
?>
\ No newline at end of file
diff --git a/scenes/B00002.tpl b/scenes/B00002.tpl
deleted file mode 100644
index 83d45eb..0000000
--- a/scenes/B00002.tpl
+++ /dev/null
@@ -1,6 +0,0 @@
-{$code = substr($CurrentPerso->location_global, 0, 6)}
- <!-- {$code} -->
- <img src="/scenes/{$code}.png" alt="{sprintf(#SpaceAround#, $CurrentPerso->location->body->name)}" border="0" usemap="#SceneMap" />
- <map name="SceneMap" id="SceneMap">
- <area shape="circle" coords="155,144,93" href="{get_url('explore', $code)}" alt="{$CurrentPerso->location->body->name}" />
- </map>
\ No newline at end of file
diff --git a/scenes/B00003.tpl b/scenes/B00003.tpl
deleted file mode 100644
index 3fa8e96..0000000
--- a/scenes/B00003.tpl
+++ /dev/null
@@ -1,6 +0,0 @@
-{$code = substr($CurrentPerso->location_global, 0, 6)}
- <!-- {$code} -->
- <img src="/scenes/{$code}.jpg" alt="{sprintf(#SpaceAround#, $CurrentPerso->location->body->name)}" border="0" usemap="#SceneMap" />
- <map name="SceneMap" id="SceneMap">
- <area shape="circle" coords="732,207,129" href="{get_url('explore', $code)}" alt="{$CurrentPerso->location->body->name}" />
- </map>
\ No newline at end of file

File Metadata

Mime Type
text/x-diff
Expires
Sun, Nov 3, 23:55 (3 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
21243
Default Alt Text
(13 KB)

Event Timeline