Page MenuHomeCode

No OneTemporary

diff --git a/controllers/ship.php b/controllers/ship.php
--- a/controllers/ship.php
+++ b/controllers/ship.php
@@ -1,64 +1,71 @@
<?php
/*
* Zed
* (c) 2010, Dereckson, some rights reserved
* Released under BSD license
*
* Raw text or HTML content
*/
//
+// Load library and language file
+//
+
+require_once('includes/objects/ship.php');
+lang_load('ships.conf');
+
+//
// Ship information
//
//Gets ship from URL
if (count($url) < 2) {
//No parameter, gets ship perso is onboard
if (!$code = $CurrentPerso->location->ship_code) {
message_die(GENERAL_ERROR, "/ship/ must be followed by valid ship code.<br />/ship alone only works when you're aboard a ship", "URL error");
}
$code = 'S' . $code;
} else {
//Code have been specified
$code = $url[1];
if (!preg_match("/^S[0-9]{5}$/", $code)) {
message_die(GENERAL_ERROR, "/ship/ must be followed by valid ship code", "URL error");
}
}
//Gets ship information
$ship = Ship::get($code);
//Gets perso note about this ship
$note = $CurrentPerso->get_note($code);
//Determines the spatial relation between perso and ship
//dieprint_r($CurrentPerso->location->ship_code);
//
// Actions handling
//
if ($_REQUEST['action'] == 'ship.setnote' && $_REQUEST['note'] != $note) {
//Updates note content
$CurrentPerso->set_note($code, $_REQUEST['note']);
$note = $_REQUEST['note'];
}
//
// HTML output
//
//Serves header
$smarty->assign('PAGE_TITLE', $ship->name);
include('header.php');
//Serves content
$smarty->assign('note', $note);
$smarty->assign('ship', $ship);
$smarty->display('ship.tpl');
//Serves footer
include('footer.php');
?>
\ No newline at end of file
diff --git a/skins/zed/ship.tpl b/skins/zed/ship.tpl
--- a/skins/zed/ship.tpl
+++ b/skins/zed/ship.tpl
@@ -1,30 +1,30 @@
<!-- Ship CSS -->
<style>
.content textarea {
background-color: inherit;
color: white;
border: dashed #343434 2px;
width: 100%;
background-image: url("/img/zed/opaque_20.png");
}
</style>
<!-- Ship content -->
<div class="content_wrapper">
<h1>{$ship->name}</h1>
<div class="content">
<p>Lorem ipsum dolor</p>
- <h2>Your notes</h2>
+ <h2>{#PersonalNotes#}</h2>
<form method="POST">
<input type="hidden" name="action" value="ship.setnote">
<textarea id="ShipNote" name="note" rows="8" onfocus="set_opacity(this.id, 20)" onBlur="set_opacity(this.id, 0)">{$note}</textarea>
<br />
- <input type="submit" value="Save note" />
+ <input type="submit" value="{#SaveNote#}" />
</form>
</div>
</div>
<script>
//Sets the focus on note textarea
document.getElementById('ShipNote').focus();
</script>
\ No newline at end of file
diff --git a/skins/zed/tutorial/hypership_reach.tpl b/skins/zed/tutorial/hypership_reach.tpl
--- a/skins/zed/tutorial/hypership_reach.tpl
+++ b/skins/zed/tutorial/hypership_reach.tpl
@@ -1,32 +1,29 @@
-{if $DOJO}
-
-{/if}
<!-- Floating panes -->
<script type="text/javascript" src="{#StaticContentURL#}/js/dojo/dojox/layout/FloatingPane.js"></script>
<link rel="stylesheet" type="text/css" href="{#StaticContentURL#}/js/dojo/dojox/layout/resources/FloatingPane.css" />
<link rel="stylesheet" type="text/css" href="{#StaticContentURL#}/js/dojo/dojox/layout/resources/ResizeHandle.css" />
<!-- Dock -->
<style type="text/css">
@import "{#StaticContentURL#}/js/dojo/dijit/themes/dijit.css";
</style>
<!-- Help to reach the hypership -->
- <div dojoType="dojox.layout.FloatingPane" title="Join the hypership" resizable="true" id="floaterHypershipReach" class="floatingPaneTutorial" duration="300">
+ <div dojoType="dojox.layout.FloatingPane" title="{#JoinHypership#}" resizable="true" id="floaterHypershipReach" class="floatingPaneTutorial" duration="300">
{if $CurrentPerso->location_global[0] == "S"}
<p>Congratulations! You found a ship.</p>
<p>You're aboard the {$CurrentPerso->location->ship->name}.</p>
{if $controller == "ship"}
<p>In the future, you will able to explore the ship, but this is not yet implemented yet in this alpha preview.</p>
{if $note == ""}
<p>Your notes is the only information generally available about ships. For reference, you should note something like "Took the {$CurrentPerso->location->ship->name} at {get_hypership_time()} from ... to the hypership."</p>
{/if}
{/if}
{else}
<p>{sprintf(#WhereYouAre#, $CurrentPerso->where(), lang_get($CurrentPerso->location->body_kind))}</p>
<p>{#WhereTheHypershipIs#}</p>
<p>{#HowToJoinIt#}</p>
{/if}
</div>

File Metadata

Mime Type
text/x-diff
Expires
Sun, Nov 24, 11:31 (9 h, 7 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
21157
Default Alt Text
(4 KB)

Event Timeline