Page MenuHomeCode

No OneTemporary

diff --git a/includes/geo/scene.php b/includes/geo/scene.php
index 71fee9a..264b45a 100644
--- a/includes/geo/scene.php
+++ b/includes/geo/scene.php
@@ -1,128 +1,129 @@
<?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');
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->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/lang/fr/core.conf b/lang/fr/core.conf
index dcfc7bf..c1224d5 100644
--- a/lang/fr/core.conf
+++ b/lang/fr/core.conf
@@ -1,109 +1,109 @@
#Zed language config file
#Language: English
#Code: fr
#Author: Dereckson
###
### Site configuration
###
SiteTitle = Zed
Product = "<strong>Zed 0.1</strong>, alpha technical preview"
###
### General stuff
###
_t = " :"
###
### Login
###
Login = Login
Password = Password
OK = OK
LoginNotFound = Login introuvable.
IncorrectPassword = Mot de passe incorrect.
JaMata = Ja mata!
WelcomeBack = Welcome back.
OpenID = OpenID
Logout = Déconnexion
###
### Homepage
###
Welcome = Bienvenue
WelcomeText = "<p>Bienvenue sur la version alpha de Zed, un hybride un peu étrange entre une galerie, un endroit où rencontrer ses amis ou s'en faire de nouveaux, avec une légère inspiration RPG, dans un environnement galactique inspiré des romans de la Culture de Iain M. Banks.</p>
-<p>Le concept est d'expérimenter ce qui se passe lorsque chaque information est dans un espace précis, un peu comme la vision cyberpunk des années 80 du cyberespace. Un autre but est de créer une communauté partagant des valeurs de respect, de coopération, de liberté et d'éthique.</p>"
+ <p>Le concept est d'expérimenter ce qui se passe lorsque chaque information est dans un espace précis, un peu comme la vision cyberpunk des années 80 du cyberespace. Un autre but est de créer une communauté partagant des valeurs de respect, de coopération, de liberté et d'éthique.</p>"
###
### Homepage - Messages
###
#messages.tpl, Reply
Reply = Répondre
#messages.tpl, the X link title
DeleteThisMessage = Effacer ce message
#home.php, messages error
MessageDeleted = Message effacé.
NotYourMessage = Hey, ce message appartient à autrui !
MessageAlreadyDeleted = Message déjà effacé
###
### Errors
###
UnauthorizedAccess = "Accès non autorisé"
SQLError = "Erreur dans la requête SQL"
line = ligne
Error = Erreur
BackToHome = "Retour à la page d'accueil"
FatalErrorScreen = Fatal error screen
FatalErrorInterrupt = Fatal error screen (interruption)
GeneralError = "Erreur"
PageNotFound = "Cette page n'existe pas."
###
### Perso create/select
###
NewCharacterCreated = Nouveau perso créé.
CreateCharacter = Nouveau perso
EditCharacter = Éditer les infos de %s
NoSexSpecified = "Pick a sex, or '<em>Neutral</em>' if you don't want to tell it."
NoNicknameSpecified = "You must pick a nickname, it's like your login to identify your character."
NoFullnameSpecified = "All beings must have a name."
NoRaceSpecified = "You've to specify a race: '<em>humanoid</em>' for human and co.<br />If you don't want to specify a race, use the generic '<em>being</em>'."
NicknameUnavailable = "This nickname is already used.<br />Choose a more original one."
PickPerso = "Sélectionnez votre perso"
SwapPerso = "Changer de perso (déco %s)"
NewLocationNotify = "Vous vous réveillez lentement dans un endroit inconnu"
###
### Places
###
UnknownBody = "Astéroïde inconnu"
UnknownPlace = "Endroit inconnu"
WherePlace = "%2$s, %1$s."
SpaceAround = "%s et l'espace autour"
hypership = hypership
asteroid = astéroïde
moon = lune
planet = planète
star = étoile
orbital = orbitale
\ No newline at end of file
diff --git a/scenes/B00001001.tpl b/scenes/B00001001.tpl
index ee75d0e..ce87d2d 100644
--- a/scenes/B00001001.tpl
+++ b/scenes/B00001001.tpl
@@ -1,59 +1,63 @@
-<script src="/js/jquery-1.3.2.min.js"></script>
-<style>
-#tower {
- background-image: url(/scenes/{$CurrentPerso->location_global}/all.png);
- background-position: left;
- background-repeat: no-repeat;
- height: 442px;
-}
-
-#tower_hl {
- position: relative;
-}
-</style>
-<div id="tower"></div>
-<script>
-var tower = {
- //The source to highlight picture
- hl: '/scenes/{$CurrentPerso->location_global}/hl.png',
+ <!-- JQuery -->
+ <script src="/js/jquery-1.3.2.min.js"></script>
- //The highlighted corridor (1-6). 0 = no hl
- i: 0,
+ <!-- Tower navigation CSS -->
+ <style>
+ #tower {
+ background-image: url(/scenes/{$CurrentPerso->location_global}/all.png);
+ background-position: left;
+ background-repeat: no-repeat;
+ height: 442px;
+ }
- //The corridor 4 (top) hl starts at:
- hlStartPosition: [163, 93],
+ #tower_hl {
+ position: relative;
+ }
+ </style>
- //Gets CurrentPerso html code
- getHighlightCode: function () {
- return "<img id='tower_hl' src='/scenes/{$CurrentPerso->location_global}/hl.png' alt='Corridor " + this.i + "' />";
- },
+ <div id="tower"></div>
- highlight: function (i) {
- //If already there, nothing to do
- if (this.i == i) return;
+ <!-- Tower navigation JQuery code -->
+ <script>
+ var tower = {
+ //The source to highlight picture
+ hl: '/scenes/{$CurrentPerso->location_global}/hl.png',
- //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 highlighted corridor (1-6). 0 = no hl
+ i: 0,
- //The 4 is okay
- if (i == 4) return;
+ //The corridor 4 (top) hl starts at:
+ hlStartPosition: [163, 93],
- //Gets rotation angle
- if (i > 4) {
- angle = 60 * (i - 4);
- } else {
- angle = 180 + (i -1) * 60;
+ //Gets CurrentPerso html code
+ getHighlightCode: function () {
+ return "<img id='tower_hl' src='/scenes/{$CurrentPerso->location_global}/hl.png' 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
+
+ $(document).ready(function() {
+ tower.highlight(3);
+ });
+ </script>
\ No newline at end of file
diff --git a/scenes/B00002.tpl b/scenes/B00002.tpl
index 2909d4b..83d45eb 100644
--- a/scenes/B00002.tpl
+++ b/scenes/B00002.tpl
@@ -1,5 +1,6 @@
{$code = substr($CurrentPerso->location_global, 0, 6)}
-<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
+ <!-- {$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
index d026893..3fa8e96 100644
--- a/scenes/B00003.tpl
+++ b/scenes/B00003.tpl
@@ -1,5 +1,6 @@
{$code = substr($CurrentPerso->location_global, 0, 6)}
-<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
+ <!-- {$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
diff --git a/skins/zed/footer.tpl b/skins/zed/footer.tpl
index c5274e0..d611d4e 100644
--- a/skins/zed/footer.tpl
+++ b/skins/zed/footer.tpl
@@ -1,14 +1,18 @@
+
+
<div class="clear"></div>
{include file="smartline.tpl"}
+
+ <!-- Footer -->
<hr />
<div id="footer">
<div class="grid_8 alpha">
<p>[ {#Product#} / {$CurrentPerso->location_global} {$CurrentPerso->location_local} / {if $screen}{$screen}{else}Untitled screen{/if} ]</p>
</div>
<div class="grid_8 omega" style="float: right">
<p style="text-align: right">[ {if $MultiPerso}<a href="/?action=perso.logout">{sprintf(#SwapPerso#, $CurrentPerso->name)}</a> | {/if}<a href="/?action=user.logout">{#Logout#}</a> ]</p>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
diff --git a/skins/zed/header.tpl b/skins/zed/header.tpl
index 4856531..295feaf 100644
--- a/skins/zed/header.tpl
+++ b/skins/zed/header.tpl
@@ -1,53 +1,56 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$PAGE_TITLE} - {#SiteTitle#}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="/css/960.css" media="screen" />
<link rel="stylesheet" href="/css/zed/theme.css" />
<script type="text/javascript" src="/js/misc.js"></script>
{foreach from=$PAGE_CSS item=css}
<link rel="stylesheet" href="/css/{$css}" />
{/foreach}
{foreach from=$PAGE_JS item=js}
<script src="/js/{$js}"></script>
{/foreach}
{if $DOJO}
<script type="text/javascript" src="/js/dojo/dojo/dojo.js" djConfig="isDebug:false, parseOnLoad: true" ></script>
{/if}
</head>
<body{if $DIJIT} class="tundra"{/if}>
<div class="container_16">
<!-- Header -->
<div class="grid_16">
<div class="wall">
<p>
{$WALL_TEXT}
<br /><span class="wall_info">-- <a href="{$WALL_USER_URL}">{$WALL_USER}</a></span>
</p>
</div>
</div>
<div class="clear"></div>
{if $WAP}
<!-- WAP -->
<div class="grid_16 alpha omega">
<div class="wap">{$WAP}</div>
</div>
<div class="clear"></div>
{/if}
{if $NOTIFY}
<!-- Notify -->
<div class="grid_16 alpha omega">
<div class="notify">{$NOTIFY}</div>
</div>
<div class="clear"></div>
{/if}
-<p class="info">
- <strong>Current location</strong> {$CurrentPerso->where()}<br />
- <strong>Hypership time</strong> <span id="HypershipTime">{get_hypership_time()}</span>
-</p>
+
+ <!-- Where? When? -->
+ <p class="info">
+ <strong>Current location</strong> {$CurrentPerso->where()}<br />
+ <strong>Hypership time</strong> <span id="HypershipTime">{get_hypership_time()}</span>
+ </p>
{if $SmartLine_STDOUT || $SmartLine_STDERR}
{include file="smartline_results.tpl"}
-{/if}
\ No newline at end of file
+{/if}
+
diff --git a/skins/zed/home.tpl b/skins/zed/home.tpl
index 4891b30..414a2e9 100644
--- a/skins/zed/home.tpl
+++ b/skins/zed/home.tpl
@@ -1,2 +1,5 @@
-<h1>{#Welcome#}</h1>
-<div style="text-align: justify; text-indent: 2em;">{#WelcomeText#}</div>
\ No newline at end of file
+ <!-- Welcome -->
+ <h1>{#Welcome#}</h1>
+ <div style="text-align: justify; text-indent: 2em;">
+ {#WelcomeText#}
+ </div>
\ No newline at end of file
diff --git a/skins/zed/messages.tpl b/skins/zed/messages.tpl
index bb19cb3..86adae8 100644
--- a/skins/zed/messages.tpl
+++ b/skins/zed/messages.tpl
@@ -1,11 +1,13 @@
-<div class="grid_16 alpha omega">
+
+
<!-- Messages -->
+ <div class="grid_16 alpha omega">
{foreach from=$MESSAGES item=message}
{$who = get_name($message->from)}
{$url = get_url('user', $who)}
- <div class="message {cycle values="light,dark"}">
- <div class="message_info"><a href="{$url}">{$who}</a> | {get_hypership_time($message->date)} | <a href="{$url}#Message">{#Reply#}</a> | <a href="?action=msg_delete&id={$message->id}" title="{#DeleteThisMessage#}">X</a></div>
- <div class="message_text">{$message->text|text2html}</div>
- </div>
+ <div class="message {cycle values="light,dark"}">
+ <div class="message_info"><a href="{$url}">{$who}</a> | {get_hypership_time($message->date)} | <a href="{$url}#Message">{#Reply#}</a> | <a href="?action=msg_delete&id={$message->id}" title="{#DeleteThisMessage#}">X</a></div>
+ <div class="message_text">{$message->text|text2html}</div>
+ </div>
{/foreach}
-</div>
\ No newline at end of file
+ </div>
\ No newline at end of file
diff --git a/skins/zed/smartline.tpl b/skins/zed/smartline.tpl
index 37f84f2..80299f0 100644
--- a/skins/zed/smartline.tpl
+++ b/skins/zed/smartline.tpl
@@ -1,23 +1,26 @@
+
<!-- SmartLine -->
<div class="grid_16 alpha omega" id="SmartLine">
- <!-- SmartLine line -->
<form method="post" name="SmartLine" action="{get_url()}">
{if $SmartLineHistory}
+ <!-- SmartLine history -->
<div class="grid_4 left alpha">
<select name="SmartLineHistory" id="SmartLineHistory" class="black" onChange=UpdateSmartLine()>
<option value="">[ {#SmartLineHistory#} ]</option>
{foreach from=$SmartLineHistory item=command}
<option value="{$command->text|escape}">{$command->time} | {$command->text|escape}</option>
{/foreach}
</select>
</div>
+ <!-- SmartLine line -->
<div class="grid_12 right omega">
{else}
+ <!-- SmartLine line -->
<div class="grid_16 alpha omega left" style="width: 100.2%">
{/if}
<input name="C" type="text" id="SmartLineBar" maxlength=255 class="black" style="text-align: left;">
</div>
</form>
</div>
- <div class="clear"></div>
\ No newline at end of file
+ <div class="clear"></div>
diff --git a/skins/zed/tutorial/dojo.tpl b/skins/zed/tutorial/dojo.tpl
index f160ae1..b7b73da 100644
--- a/skins/zed/tutorial/dojo.tpl
+++ b/skins/zed/tutorial/dojo.tpl
@@ -1,2 +1,4 @@
+
+
<!-- DOJO -->
- <script type="text/javascript" src="/js/dojo/dojo/dojo.js" djConfig="isDebug:false, parseOnLoad: true" ></script>
\ No newline at end of file
+ <script type="text/javascript" src="/js/dojo/dojo/dojo.js" djConfig="isDebug:false, parseOnLoad: true" ></script>

File Metadata

Mime Type
text/x-diff
Expires
Sat, Nov 23, 09:41 (1 d, 10 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
20718
Default Alt Text
(19 KB)

Event Timeline