Updated layout file format to XML
Fixed config & install inconstinstencies Fixed form management updates Signed-off-by: Gregory PLANCHAT <g.planchat@gmail.com>
This commit is contained in:
parent
66805034a6
commit
d40313279a
29 changed files with 692 additions and 918 deletions
93
admin.php
93
admin.php
|
|
@ -1,93 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* This file is part of Wootook
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.txt
|
||||
* @see http://www.wootook.com/
|
||||
*
|
||||
* Copyright (c) 2009-Present, Wootook Support Team <http://www.xnova-ng.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* --> NOTICE <--
|
||||
* This file is part of the core development branch, changing its contents will
|
||||
* make you unable to use the automatic updates manager. Please refer to the
|
||||
* documentation for further information about customizing Wootook.
|
||||
*
|
||||
*/
|
||||
define('DISABLE_IDENTITY_CHECK', true);
|
||||
define('IN_ADMIN', true);
|
||||
require_once dirname(__FILE__) .'/application/bootstrap.php';
|
||||
|
||||
$moduleList = array(
|
||||
'admin' => array(
|
||||
'Wootook_Admin_' => 'Wootook/Admin'
|
||||
),
|
||||
'core' => array(
|
||||
'Wootook_Core_' => 'Wootook/Core'
|
||||
)
|
||||
);
|
||||
|
||||
$request = Wootook::getRequest();
|
||||
$response = Wootook::getResponse();
|
||||
|
||||
$request->setModuleName('admin');
|
||||
|
||||
$dispatchCount = 0;
|
||||
$classReflector = array();
|
||||
$instances = array();
|
||||
while (true) {
|
||||
$module = $request->getModuleName();
|
||||
$controller = $request->getControllerName();
|
||||
$action = $request->getActionName();
|
||||
|
||||
if ($dispatchCount >= 100) {
|
||||
throw new Wootook_Core_Exception_RuntimeException(sprintf('Maximum of %d dispatched actions reached.', $dispatchCount));
|
||||
}
|
||||
|
||||
$controllerClassSuffix = str_replace(' ', '', ucwords(str_replace('-', ' ', $controller))) . 'Controller';
|
||||
|
||||
$moduleConfig = $moduleList[$module];
|
||||
$controllerFile = current($moduleConfig) . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR . $controllerClassSuffix . '.php';
|
||||
$controllerClass = key($moduleConfig) . $controllerClassSuffix;
|
||||
$actionMethod = str_replace(' ', '', ucwords(str_replace('-', ' ', $action))) . 'Action';
|
||||
|
||||
if (!class_exists($controllerClass, false)) {
|
||||
if (!Wootook::fileExists($controllerFile)) {
|
||||
$request->setModuleName('core')
|
||||
->setControllerName('error')
|
||||
->setActionName('error');
|
||||
continue;
|
||||
}
|
||||
include $controllerFile;
|
||||
}
|
||||
|
||||
if (!isset($classReflector[$controllerClass])) {
|
||||
$classReflector[$controllerClass] = new ReflectionClass($controllerClass);
|
||||
}
|
||||
|
||||
$instance = $classReflector[$controllerClass]->newInstance($request, $response);
|
||||
$instance->init();
|
||||
|
||||
$request->setIsDispatched(true);
|
||||
$instance->preDispatch();
|
||||
$reflector = $instance->$actionMethod();
|
||||
$instance->postDispatch();
|
||||
|
||||
if ($request->isDispatched()) {
|
||||
echo $response->sendHeaders()->sendBody();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -40,6 +40,11 @@ class Wootook_Core_Config_Node
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function getParent()
|
||||
{
|
||||
return $this->_parent;
|
||||
}
|
||||
|
||||
public function setConfig($path, $value)
|
||||
{
|
||||
$explodedPath = explode('/', $path);
|
||||
|
|
@ -131,6 +136,9 @@ class Wootook_Core_Config_Node
|
|||
|
||||
private function _resolveAttributeName($key)
|
||||
{
|
||||
if (is_numeric($key)) {
|
||||
return $key;
|
||||
}
|
||||
if (!isset(self::$_attributeNameCache[$key])) {
|
||||
self::$_attributeNameCache[$key] = str_replace(' ', '-', strtolower(preg_replace('#[A-Z]#', ' \\1', $key)));
|
||||
}
|
||||
|
|
@ -183,7 +191,11 @@ class Wootook_Core_Config_Node
|
|||
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
$this->_children[$offset] = $value;
|
||||
if ($offset === null) {
|
||||
$this->_children[] = $value;
|
||||
} else {
|
||||
$this->_children[$offset] = $value;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,15 +76,17 @@ class Wootook_Core_Form
|
|||
public function addElement($name, $type = 'text', Array $validators = array())
|
||||
{
|
||||
if ($type instanceof Wootook_Core_Form_ElementAbstract) {
|
||||
$this->_elements[$name] = $name;
|
||||
$this->_elements[$name] = $type;
|
||||
$this->_elements[$name]->setForm($this);
|
||||
} else {
|
||||
$element = $this->_elementLoader->load($type);
|
||||
|
||||
if ($element === null) {
|
||||
trigger_error(sprintf('Element %1$s (type: %2$s) could not be created.', $name, $type), E_USER_WARNING);
|
||||
Wootook_Core_ErrorProfiler::getSingleton()
|
||||
->addException(new Wootook_Core_Exception_RuntimeException(sprintf('Element %1$s (type: %2$s) could not be created.', $name, $type)));
|
||||
return $this;
|
||||
}
|
||||
$element->setForm($this);
|
||||
$this->_elements[$name] = $element;
|
||||
}
|
||||
$this->_elements[$name]->setName($name);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ abstract class Wootook_Core_Form_ElementAbstract
|
|||
}
|
||||
|
||||
$this->setName($name);
|
||||
$this->setParams($params);
|
||||
$this->setAllParams($params);
|
||||
}
|
||||
|
||||
abstract public function getType();
|
||||
|
|
|
|||
|
|
@ -3,17 +3,16 @@
|
|||
class Wootook_Core_Form_Validator_Alnum
|
||||
extends Wootook_Core_Form_Validator_Regex
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct('#[^[:alnum:]]#');
|
||||
}
|
||||
|
||||
public function validate(Wootook_Core_Form_FieldAbstract $field, $data)
|
||||
public function validate(Wootook_Core_Form_ElementAbstract $element, $data)
|
||||
{
|
||||
if ($this->_validate($field, $data)) {
|
||||
$this->_getSession($field)
|
||||
->addError('Field "%s" should only contain alphanumeric characters.', $field->getName());
|
||||
if ($this->_validate($element, $data)) {
|
||||
$this->_getSession($element)
|
||||
->addError('Field "%s" should only contain alphanumeric characters.', $element->getName());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,17 +3,16 @@
|
|||
class Wootook_Core_Form_Validator_Alnum
|
||||
extends Wootook_Core_Form_Validator_Regex
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct('#[^[:alpha:]]#');
|
||||
}
|
||||
|
||||
public function validate(Wootook_Core_Form_FieldAbstract $field, $data)
|
||||
public function validate(Wootook_Core_Form_ElementAbstract $element, $data)
|
||||
{
|
||||
if ($this->_validate($field, $data)) {
|
||||
$this->_getSession($field)
|
||||
->addError('Field "%s" should only contain alphabetic characters.', $field->getName());
|
||||
if ($this->_validate($element, $data)) {
|
||||
$this->_getSession($element)
|
||||
->addError('Field "%s" should only contain alphabetic characters.', $element->getName());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@ class Wootook_Core_Form_Validator_Email
|
|||
parent::__construct('#^[[:alnum:]\._\-]@[[:alnum:]\._\-]\.[a-z]{2,}$#');
|
||||
}
|
||||
|
||||
public function validate(Wootook_Core_Form_FieldAbstract $field, $data)
|
||||
public function validate(Wootook_Core_Form_ElementAbstract $element, $data)
|
||||
{
|
||||
if (!$this->_validate($field, $data)) {
|
||||
$this->_getSession($field)
|
||||
->addError('Field "%s" should contain an email.', $field->getName());
|
||||
if (!$this->_validate($element, $data)) {
|
||||
$this->_getSession($element)
|
||||
->addError('Field "%s" should contain an email.', $element->getName());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
class Wootook_Core_Form_Validator_FormKey
|
||||
extends Wootook_Core_Form_ValidatorAbstract
|
||||
{
|
||||
public function validate(Wootook_Core_Form_FieldAbstract $field, $data)
|
||||
public function validate(Wootook_Core_Form_ElementAbstract $element, $data)
|
||||
{
|
||||
$form = $field->getForm();
|
||||
$form = $element->getForm();
|
||||
$session = $form->getSession();
|
||||
|
||||
if ($session->getFormKey(false) == $data) {
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@ class Wootook_Core_Form_Validator_Hex
|
|||
parent::__construct('#(?:0x)?[^0-9a-f]#i');
|
||||
}
|
||||
|
||||
public function validate(Wootook_Core_Form_FieldAbstract $field, $data)
|
||||
public function validate(Wootook_Core_Form_ElementAbstract $element, $data)
|
||||
{
|
||||
if ($this->_validate($field, $data)) {
|
||||
$this->_getSession($field)
|
||||
->addError('Field "%s" should only contain numeric characters.', $field->getName());
|
||||
if ($this->_validate($element, $data)) {
|
||||
$this->_getSession($element)
|
||||
->addError('Field "%s" should only contain numeric characters.', $element->getName());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@ class Wootook_Core_Form_Validator_Email
|
|||
parent::__construct('#^[[:alnum:]\._\-]\.[a-z]{2,}$#');
|
||||
}
|
||||
|
||||
public function validate(Wootook_Core_Form_FieldAbstract $field, $data)
|
||||
public function validate(Wootook_Core_Form_ElementAbstract $element, $data)
|
||||
{
|
||||
if (!$this->_validate($field, $data)) {
|
||||
$this->_getSession($field)
|
||||
->addError('Field "%s" should contain a host name.', $field->getName());
|
||||
if (!$this->_validate($element, $data)) {
|
||||
$this->_getSession($element)
|
||||
->addError('Field "%s" should contain a host name.', $element->getName());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@ class Wootook_Core_Form_Validator_Numeric
|
|||
parent::__construct('#[^[:digit:]]#');
|
||||
}
|
||||
|
||||
public function validate(Wootook_Core_Form_FieldAbstract $field, $data)
|
||||
public function validate(Wootook_Core_Form_ElementAbstract $element, $data)
|
||||
{
|
||||
if ($this->_validate($field, $data)) {
|
||||
$this->_getSession($field)
|
||||
->addError('Field "%s" should only contain numeric characters.', $field->getName());
|
||||
if ($this->_validate($element, $data)) {
|
||||
$this->_getSession($element)
|
||||
->addError('Field "%s" should only contain numeric characters.', $element->getName());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,18 +10,18 @@ class Wootook_Core_Form_Validator_Regex
|
|||
$this->_expression = $expression;
|
||||
}
|
||||
|
||||
public function validate(Wootook_Core_Form_FieldAbstract $field, $data)
|
||||
public function validate(Wootook_Core_Form_ElementAbstract $element, $data)
|
||||
{
|
||||
if (!$this->_validate($field, $data)) {
|
||||
$this->_getSession($field)
|
||||
->addError('Field "%s" does not match the validation pattern.', $field->getName());
|
||||
if (!$this->_validate($element, $data)) {
|
||||
$this->_getSession($element)
|
||||
->addError('Field "%s" does not match the validation pattern.', $element->getName());
|
||||
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function _validate(Wootook_Core_Form_FieldAbstract $field, $data)
|
||||
protected function _validate(Wootook_Core_Form_ElementAbstract $element, $data)
|
||||
{
|
||||
return preg_match($this->_expression, $data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
abstract class Wootook_Core_Form_ValidatorAbstract
|
||||
{
|
||||
abstract public function validate(Wootook_Core_Form_FieldAbstract $field, $data);
|
||||
abstract public function validate(Wootook_Core_Form_ElementAbstract $element, $data);
|
||||
|
||||
protected function _getSession(Wootook_Core_Form_FieldAbstract $field)
|
||||
protected function _getSession(Wootook_Core_Form_ElementAbstract $element)
|
||||
{
|
||||
$form = $field->getForm();
|
||||
$form = $element->getForm();
|
||||
if (!$form instanceof Wootook_Core_Form) {
|
||||
return null;
|
||||
}
|
||||
return $form->getSession();
|
||||
return $element->getSession();
|
||||
}
|
||||
}
|
||||
|
|
@ -70,9 +70,14 @@ class Wootook_Core_Layout
|
|||
$this->setPackage(Wootook::getWebsiteConfig('package'));
|
||||
$this->setTheme(Wootook::getGameConfig('theme'));
|
||||
|
||||
$parser = new Wootook_Core_Layout_Parser();
|
||||
foreach ($fileList as $layoutFile) {
|
||||
try {
|
||||
$layoutData = include $this->_getLayoutPath($layoutFile);
|
||||
if (preg_match('#\.php$#', $layoutFile)) {
|
||||
$layoutData = include $this->_getLayoutPath($layoutFile);
|
||||
} else {
|
||||
$layoutData = $parser->parse($this->_getLayoutPath($layoutFile), $this->_getLayoutCachePath($layoutFile), 3600);
|
||||
}
|
||||
} catch (Wootook_Core_Exception_LayoutException $e) {
|
||||
Wootook_Core_ErrorProfiler::getSingleton()->addException($e);
|
||||
continue;
|
||||
|
|
@ -444,6 +449,22 @@ class Wootook_Core_Layout
|
|||
return $this->_view->render();
|
||||
}
|
||||
|
||||
protected function _getLayoutCachePath($file)
|
||||
{
|
||||
$package = $this->getPackage();
|
||||
$theme = $this->getTheme();
|
||||
$pattern = APPLICATION_PATH . "cache/" . __CLASS__ . "--{$this->getDomain()}-%s-%s-{$file}.cache";
|
||||
|
||||
if (empty($package)) {
|
||||
$package = self::DEFAULT_PACKAGE;
|
||||
}
|
||||
if (empty($theme)) {
|
||||
$theme = self::DEFAULT_THEME;
|
||||
}
|
||||
|
||||
return sprintf($pattern, $package, $theme);
|
||||
}
|
||||
|
||||
protected function _getLayoutPath($file)
|
||||
{
|
||||
$package = $this->getPackage();
|
||||
|
|
|
|||
132
application/code/core/Wootook/Core/Layout/Parser.php
Normal file
132
application/code/core/Wootook/Core/Layout/Parser.php
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
<?php
|
||||
|
||||
class Wootook_Core_Layout_Parser
|
||||
{
|
||||
/**
|
||||
*
|
||||
* Enter description here ...
|
||||
* @param unknown_type $filename
|
||||
*/
|
||||
public function parse($filename, $cachePath = null, $cacheLifetime = 86400)
|
||||
{
|
||||
if ($cachePath !== null && Wootook::fileExists($cachePath) && $cacheLifetime > 0 && (time() - filemtime($cachePath) > $cacheLifetime)) {
|
||||
return include $cachePath;
|
||||
}
|
||||
|
||||
$parsedData = $this->_parse($filename);
|
||||
|
||||
if ($cachePath !== null) {
|
||||
$parsedData->save($cachePath);
|
||||
}
|
||||
|
||||
return $parsedData->toArray();
|
||||
}
|
||||
|
||||
protected function _parse($filename)
|
||||
{
|
||||
$layout = simplexml_load_file($filename);
|
||||
|
||||
if ($layout->getName() !== 'layout') {
|
||||
return array();
|
||||
}
|
||||
|
||||
$result = new Wootook_Core_Config_Adapter_Array();
|
||||
foreach ($layout->handle as $handle) {
|
||||
$name = (string) $handle['name'];
|
||||
if (empty($name)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$handleNode = new Wootook_Core_Config_Node(array(), $result);
|
||||
$result->$name = $handleNode;
|
||||
|
||||
if (isset($handle->update) && isset($handle->update[0]['name'])) {
|
||||
$handleNode->update = (string) $handle->update[0]['name'];
|
||||
}
|
||||
|
||||
if (isset($handle->block)) {
|
||||
$this->_parseBlock($handle->block[0], $handleNode);
|
||||
}
|
||||
|
||||
if (isset($handle->reference)) {
|
||||
$referenceListNode = new Wootook_Core_Config_Node(array(), $handleNode);
|
||||
$handleNode->reference = $referenceListNode;
|
||||
|
||||
foreach ($handle->reference as $reference) {
|
||||
$referenceName = (string) $reference['name'];
|
||||
if (empty($referenceName)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$referenceNode = new Wootook_Core_Config_Node(array(), $referenceListNode);
|
||||
$referenceListNode->$referenceName = $referenceNode;
|
||||
|
||||
$this->_parseBlockBody($reference, $referenceNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
protected function _parseBlock(SimpleXMLElement $handle, Wootook_Core_Config_Node $blockNode)
|
||||
{
|
||||
foreach ($handle->attributes() as $attributeName => $attributeValue) {
|
||||
$blockNode->$attributeName = (string) $attributeValue;
|
||||
}
|
||||
|
||||
$this->_parseBlockBody($handle, $blockNode);
|
||||
}
|
||||
|
||||
protected function _parseBlockBody(SimpleXMLElement $handle, Wootook_Core_Config_Node $blockNode)
|
||||
{
|
||||
if (isset($handle->block)) {
|
||||
$childrenNode = new Wootook_Core_Config_Node(array(), $blockNode);
|
||||
$blockNode->children = $childrenNode;
|
||||
|
||||
foreach ($handle->block as $block) {
|
||||
$blockName = (string) $block['name'];
|
||||
if (empty($blockName)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$childNode = new Wootook_Core_Config_Node(array(), $childrenNode);
|
||||
$childrenNode->$blockName = $childNode;
|
||||
|
||||
$this->_parseBlock($block, $childNode);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($handle->action)) {
|
||||
$actionListNode = new Wootook_Core_Config_Node(array(), $blockNode);
|
||||
$blockNode->actions = $actionListNode;
|
||||
|
||||
foreach ($handle->action as $action) {
|
||||
$methodName = (string) $action['method'];
|
||||
if (empty($methodName)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$actionNode = new Wootook_Core_Config_Node(array(
|
||||
'method' => $methodName,
|
||||
'params' => array()
|
||||
), $actionListNode);
|
||||
|
||||
$actionListNode[] = $actionNode;
|
||||
|
||||
if (isset($action->params)) {
|
||||
$paramsNode = $actionNode->params;
|
||||
|
||||
foreach ($action->params[0]->param as $param) {
|
||||
$paramName = (string) $param['name'];
|
||||
if (empty($paramName)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$paramsNode->$paramName = (string) $param;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@ class Wootook_Database
|
|||
|
||||
$dsn = "mysql:dbname={$params->database};host={$params->hostname}";
|
||||
if (is_numeric($params->port)) {
|
||||
$dsn .= ";port={$params->database}";
|
||||
$dsn .= ";port={$params->port}";
|
||||
}
|
||||
|
||||
$event = Wootook::dispatchEvent('database.prepare-options', array(
|
||||
|
|
|
|||
|
|
@ -8,25 +8,4 @@ class Wootook_Empire_Model_Galaxy_Position
|
|||
$this->_tableName = 'galaxy';
|
||||
$this->_idFieldNames = array('id_planet');
|
||||
}
|
||||
|
||||
static function initPlanetListerner($eventData)
|
||||
{
|
||||
if (!isset($eventData['planet'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
$planet = $eventData['planet'];
|
||||
if (!$planet->isPlanet()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$galaxy = new self();
|
||||
$galaxy
|
||||
->setData('galaxy', $planet->getGalaxy())
|
||||
->setData('system', $planet->getSystem())
|
||||
->setData('planet', $planet->getPosition())
|
||||
->setData('id_planet', $planet->getId())
|
||||
->save()
|
||||
;
|
||||
}
|
||||
}
|
||||
|
|
@ -376,6 +376,17 @@ class Wootook_Empire_Model_User
|
|||
|
||||
$planet->save();
|
||||
|
||||
if ($planet->isPlanet()) {
|
||||
$galaxy = new Wootook_Empire_Model_Galaxy_Position();
|
||||
$galaxy
|
||||
->setData('galaxy', $planet->getGalaxy())
|
||||
->setData('system', $planet->getSystem())
|
||||
->setData('planet', $planet->getPosition())
|
||||
->setData('id_planet', $planet->getId())
|
||||
->save()
|
||||
;
|
||||
}
|
||||
|
||||
Wootook::dispatchEvent('planet.init', array(
|
||||
'planet' => $planet,
|
||||
'user' => $this
|
||||
|
|
|
|||
|
|
@ -70,15 +70,15 @@
|
|||
'episode' => 'default',
|
||||
),
|
||||
'core' => array(
|
||||
'use_large_numbers' => (bool) $request->getPost('use_large_numbers')
|
||||
'use_large_numbers' => true
|
||||
),
|
||||
'universe' => array(
|
||||
'galaxies' => $request->getPost('galaxies'),
|
||||
'systems' => $request->getPost('systems'),
|
||||
'positions' => $request->getPost('positions')
|
||||
'galaxies' => 3,
|
||||
'systems' => 100,
|
||||
'positions' => 15
|
||||
),
|
||||
'combat' => array(
|
||||
'allow_spy_drone_attacks' => (bool) $request->getPost('allow_spy_drone_attacks')
|
||||
'allow_spy_drone_attacks' => true
|
||||
)
|
||||
),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -47,46 +47,15 @@
|
|||
),
|
||||
),
|
||||
'frontend' => array(
|
||||
'web' => array(
|
||||
'url' => array(
|
||||
'base' => null,
|
||||
'skin' => null,
|
||||
'js' => null,
|
||||
'css' => null,
|
||||
)
|
||||
),
|
||||
'system' => array(
|
||||
'path' => array(
|
||||
'base' => null,
|
||||
'skin' => null,
|
||||
'js' => null,
|
||||
'css' => null,
|
||||
)
|
||||
),
|
||||
'layout' => array(
|
||||
'page' => 'page.php',
|
||||
'page' => 'page.xml',
|
||||
'user' => 'user.xml',
|
||||
'empire' => 'empire.php'
|
||||
),
|
||||
),
|
||||
'backend' => array(
|
||||
'web' => array(
|
||||
'url' => array(
|
||||
'base' => null,
|
||||
'skin' => null,
|
||||
'js' => null,
|
||||
'css' => null,
|
||||
)
|
||||
),
|
||||
'system' => array(
|
||||
'path' => array(
|
||||
'base' => null,
|
||||
'skin' => null,
|
||||
'js' => null,
|
||||
'css' => null,
|
||||
)
|
||||
),
|
||||
'layout' => array(
|
||||
'page' => 'page.php',
|
||||
'page' => 'page.xml',
|
||||
'admin' => 'admin.php'
|
||||
),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,183 +0,0 @@
|
|||
<?php return array(
|
||||
'1column' => array(
|
||||
'update' => 'default'
|
||||
),
|
||||
|
||||
'2columns-left' => array(
|
||||
'update' => 'default',
|
||||
'template' => 'page/2columns-left.phtml',
|
||||
'reference' => array(
|
||||
'root' => array(
|
||||
'children' => array(
|
||||
'left' => array(
|
||||
'type' => 'core/concat'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'2columns-right' => array(
|
||||
'update' => 'default',
|
||||
'template' => 'page/2columns-right.phtml',
|
||||
'reference' => array(
|
||||
'root' => array(
|
||||
'children' => array(
|
||||
'right' => array(
|
||||
'type' => 'core/concat'
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'3columns' => array(
|
||||
'update' => 'default',
|
||||
'template' => 'page/3columns.phtml',
|
||||
'reference' => array(
|
||||
'root' => array(
|
||||
'children' => array(
|
||||
'left' => array(
|
||||
'type' => 'core/concat'
|
||||
),
|
||||
'right' => array(
|
||||
'type' => 'core/concat'
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'default' => array(
|
||||
'type' => 'core/html.page',
|
||||
'template' => 'page/1column.phtml',
|
||||
'children' => array(
|
||||
'head' => array(
|
||||
'type' => 'core/html.head',
|
||||
'template' => 'page/html/head.phtml',
|
||||
'actions' => array(
|
||||
array(
|
||||
'method' => 'addCss',
|
||||
'params' => array(
|
||||
'stylesheet' => 'css/base.css'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addJs',
|
||||
'params' => array(
|
||||
'script' => 'scripts/jquery/jquery-1.6.4.js'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'header' => array(
|
||||
'type' => 'core/concat'
|
||||
),
|
||||
'footer' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'page/html/footer.phtml'
|
||||
),
|
||||
'content' => array(
|
||||
'type' => 'core/concat'
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'ajax' => array(
|
||||
'type' => 'core/html.page',
|
||||
'template' => 'page/empty.phtml',
|
||||
'children' => array(
|
||||
'content' => array(
|
||||
'type' => 'core/concat'
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'empty' => array(
|
||||
'type' => 'core/html.page',
|
||||
'template' => 'page/empty.phtml',
|
||||
'children' => array(
|
||||
'head' => array(
|
||||
'type' => 'core/html.head',
|
||||
'template' => 'page/html/head.phtml'
|
||||
),
|
||||
'content' => array(
|
||||
'type' => 'core/concat'
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'message' => array(
|
||||
'update' => 'default',
|
||||
'reference' => array(
|
||||
'content' => array(
|
||||
'children' => array(
|
||||
'message' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'page/html/message.phtml'
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'login' => array(
|
||||
'update' => '1column',
|
||||
'reference' => array(
|
||||
'content' => array(
|
||||
'children' => array(
|
||||
'login' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'user/login.phtml'
|
||||
),
|
||||
)
|
||||
),
|
||||
'head' => array(
|
||||
'actions' => array(
|
||||
array(
|
||||
'method' => 'addCss',
|
||||
'params' => array(
|
||||
'stylesheet' => 'css/deprecated/styles.css'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addCss',
|
||||
'params' => array(
|
||||
'stylesheet' => 'css/deprecated/about.css'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'registration' => array(
|
||||
'update' => '1column',
|
||||
'reference' => array(
|
||||
'content' => array(
|
||||
'children' => array(
|
||||
'registration' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'user/registration.phtml'
|
||||
),
|
||||
)
|
||||
),
|
||||
'head' => array(
|
||||
'actions' => array(
|
||||
array(
|
||||
'method' => 'addCss',
|
||||
'params' => array(
|
||||
'stylesheet' => 'css/deprecated/styles.css'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addCss',
|
||||
'params' => array(
|
||||
'stylesheet' => 'css/deprecated/about.css'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
80
application/design/backend/base/default/layouts/page.xml
Normal file
80
application/design/backend/base/default/layouts/page.xml
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<layout version="1.0">
|
||||
<handle name="1column">
|
||||
<update name="default" />
|
||||
</handle>
|
||||
<handle name="2columns-left">
|
||||
<update name="default" />
|
||||
|
||||
<reference name="root">
|
||||
<action method="setTemplate">
|
||||
<params>
|
||||
<param name="template">page/2columns-left.phtml</param>
|
||||
</params>
|
||||
</action>
|
||||
<block name="left" type="core/concat" />
|
||||
</reference>
|
||||
</handle>
|
||||
<handle name="2columns-right">
|
||||
<update name="default" />
|
||||
|
||||
<reference name="root">
|
||||
<action method="setTemplate">
|
||||
<params>
|
||||
<param name="template">page/2columns-right.phtml</param>
|
||||
</params>
|
||||
</action>
|
||||
<block name="right" type="core/concat" />
|
||||
</reference>
|
||||
</handle>
|
||||
<handle name="3columns">
|
||||
<update name="default" />
|
||||
|
||||
<reference name="root">
|
||||
<action method="setTemplate">
|
||||
<params>
|
||||
<param name="template">page/3columns.phtml</param>
|
||||
</params>
|
||||
</action>
|
||||
<block name="left" type="core/concat" />
|
||||
<block name="right" type="core/concat" />
|
||||
</reference>
|
||||
</handle>
|
||||
<handle name="default">
|
||||
<block name="root" type="core/html.page" template="page/1column.phtml">
|
||||
<block name="head" type="core/html.head" template="page/html/head.phtml">
|
||||
<action method="addCss">
|
||||
<params>
|
||||
<param name="stylesheet">css/base.css</param>
|
||||
</params>
|
||||
</action>
|
||||
<action method="addJs">
|
||||
<params>
|
||||
<param name="script">scripts/jquery/jquery-1.6.4.js</param>
|
||||
</params>
|
||||
</action>
|
||||
</block>
|
||||
<block name="header" type="core/concat" />
|
||||
<block name="content" type="core/concat" />
|
||||
<block name="footer" type="core/template" />
|
||||
</block>
|
||||
</handle>
|
||||
<handle name="ajax">
|
||||
<block name="root" type="core/html.page" template="page/empty.phtml">
|
||||
<block name="content" type="core/concat" />
|
||||
</block>
|
||||
</handle>
|
||||
<handle name="empty">
|
||||
<block name="root" type="core/html.page" template="page/empty.phtml">
|
||||
<block name="head" type="core/html.head" template="page/html/head.phtml" />
|
||||
<block name="content" type="core/concat" />
|
||||
</block>
|
||||
</handle>
|
||||
<handle name="message">
|
||||
<update name="default" />
|
||||
|
||||
<reference name="content">
|
||||
<block name="message" type="core/template" template="page/html/message.phtml" />
|
||||
</reference>
|
||||
</handle>
|
||||
</layout>
|
||||
|
|
@ -1,195 +0,0 @@
|
|||
<?php return array(
|
||||
'1column' => array(
|
||||
'update' => 'default'
|
||||
),
|
||||
|
||||
'2columns-left' => array(
|
||||
'update' => 'default',
|
||||
'template' => 'page/2columns-left.phtml',
|
||||
'reference' => array(
|
||||
'root' => array(
|
||||
'children' => array(
|
||||
'left' => array(
|
||||
'type' => 'core/concat'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'2columns-right' => array(
|
||||
'update' => 'default',
|
||||
'template' => 'page/2columns-right.phtml',
|
||||
'reference' => array(
|
||||
'root' => array(
|
||||
'children' => array(
|
||||
'right' => array(
|
||||
'type' => 'core/concat'
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'3columns' => array(
|
||||
'update' => 'default',
|
||||
'template' => 'page/3columns.phtml',
|
||||
'reference' => array(
|
||||
'root' => array(
|
||||
'children' => array(
|
||||
'left' => array(
|
||||
'type' => 'core/concat'
|
||||
),
|
||||
'right' => array(
|
||||
'type' => 'core/concat'
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'default' => array(
|
||||
'type' => 'core/html.page',
|
||||
'template' => 'page/1column.phtml',
|
||||
'children' => array(
|
||||
'head' => array(
|
||||
'type' => 'core/html.head',
|
||||
'template' => 'page/html/head.phtml',
|
||||
'actions' => array(
|
||||
array(
|
||||
'method' => 'addCss',
|
||||
'params' => array(
|
||||
'stylesheet' => 'css/deprecated/default.css'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addCss',
|
||||
'params' => array(
|
||||
'stylesheet' => 'css/deprecated/formate.css'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addCss',
|
||||
'params' => array(
|
||||
'stylesheet' => 'css/base.css'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addJs',
|
||||
'params' => array(
|
||||
'script' => 'scripts/jquery/jquery-1.6.4.js'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'header' => array(
|
||||
'type' => 'core/concat'
|
||||
),
|
||||
'footer' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'page/html/footer.phtml'
|
||||
),
|
||||
'content' => array(
|
||||
'type' => 'core/concat'
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'ajax' => array(
|
||||
'type' => 'core/html.page',
|
||||
'template' => 'page/empty.phtml',
|
||||
'children' => array(
|
||||
'content' => array(
|
||||
'type' => 'core/concat'
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'empty' => array(
|
||||
'type' => 'core/html.page',
|
||||
'template' => 'page/empty.phtml',
|
||||
'children' => array(
|
||||
'head' => array(
|
||||
'type' => 'core/html.head',
|
||||
'template' => 'page/html/head.phtml'
|
||||
),
|
||||
'content' => array(
|
||||
'type' => 'core/concat'
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'message' => array(
|
||||
'update' => 'default',
|
||||
'reference' => array(
|
||||
'content' => array(
|
||||
'children' => array(
|
||||
'message' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'page/html/message.phtml'
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'login' => array(
|
||||
'update' => '1column',
|
||||
'reference' => array(
|
||||
'content' => array(
|
||||
'children' => array(
|
||||
'login' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'user/login.phtml'
|
||||
),
|
||||
)
|
||||
),
|
||||
'head' => array(
|
||||
'actions' => array(
|
||||
array(
|
||||
'method' => 'addCss',
|
||||
'params' => array(
|
||||
'stylesheet' => 'css/deprecated/styles.css'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addCss',
|
||||
'params' => array(
|
||||
'stylesheet' => 'css/deprecated/about.css'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'registration' => array(
|
||||
'update' => '1column',
|
||||
'reference' => array(
|
||||
'content' => array(
|
||||
'children' => array(
|
||||
'registration' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'user/registration.phtml'
|
||||
),
|
||||
)
|
||||
),
|
||||
'head' => array(
|
||||
'actions' => array(
|
||||
array(
|
||||
'method' => 'addCss',
|
||||
'params' => array(
|
||||
'stylesheet' => 'css/deprecated/styles.css'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addCss',
|
||||
'params' => array(
|
||||
'stylesheet' => 'css/deprecated/about.css'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
90
application/design/frontend/base/default/layouts/page.xml
Normal file
90
application/design/frontend/base/default/layouts/page.xml
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<layout version="1.0">
|
||||
<handle name="1column">
|
||||
<update name="default" />
|
||||
</handle>
|
||||
<handle name="2columns-left">
|
||||
<update name="default" />
|
||||
|
||||
<reference name="root">
|
||||
<action method="setTemplate">
|
||||
<params>
|
||||
<param name="template">page/2columns-left.phtml</param>
|
||||
</params>
|
||||
</action>
|
||||
<block name="left" type="core/concat" />
|
||||
</reference>
|
||||
</handle>
|
||||
<handle name="2columns-right">
|
||||
<update name="default" />
|
||||
|
||||
<reference name="root">
|
||||
<action method="setTemplate">
|
||||
<params>
|
||||
<param name="template">page/2columns-right.phtml</param>
|
||||
</params>
|
||||
</action>
|
||||
<block name="right" type="core/concat" />
|
||||
</reference>
|
||||
</handle>
|
||||
<handle name="3columns">
|
||||
<update name="default" />
|
||||
|
||||
<reference name="root">
|
||||
<action method="setTemplate">
|
||||
<params>
|
||||
<param name="template">page/3columns.phtml</param>
|
||||
</params>
|
||||
</action>
|
||||
<block name="left" type="core/concat" />
|
||||
<block name="right" type="core/concat" />
|
||||
</reference>
|
||||
</handle>
|
||||
<handle name="default">
|
||||
<block name="root" type="core/html.page" template="page/1column.phtml">
|
||||
<block name="head" type="core/html.head" template="page/html/head.phtml">
|
||||
<action method="addCss">
|
||||
<params>
|
||||
<param name="stylesheet">css/deprecated/default.css</param>
|
||||
</params>
|
||||
</action>
|
||||
<action method="addCss">
|
||||
<params>
|
||||
<param name="stylesheet">css/deprecated/formate.css</param>
|
||||
</params>
|
||||
</action>
|
||||
<action method="addCss">
|
||||
<params>
|
||||
<param name="stylesheet">css/base.css</param>
|
||||
</params>
|
||||
</action>
|
||||
<action method="addJs">
|
||||
<params>
|
||||
<param name="script">scripts/jquery/jquery-1.6.4.js</param>
|
||||
</params>
|
||||
</action>
|
||||
</block>
|
||||
<block name="header" type="core/concat" />
|
||||
<block name="content" type="core/concat" />
|
||||
<block name="footer" type="core/template" />
|
||||
</block>
|
||||
</handle>
|
||||
<handle name="ajax">
|
||||
<block name="root" type="core/html.page" template="page/empty.phtml">
|
||||
<block name="content" type="core/concat" />
|
||||
</block>
|
||||
</handle>
|
||||
<handle name="empty">
|
||||
<block name="root" type="core/html.page" template="page/empty.phtml">
|
||||
<block name="head" type="core/html.head" template="page/html/head.phtml" />
|
||||
<block name="content" type="core/concat" />
|
||||
</block>
|
||||
</handle>
|
||||
<handle name="message">
|
||||
<update name="default" />
|
||||
|
||||
<reference name="content">
|
||||
<block name="message" type="core/template" template="page/html/message.phtml" />
|
||||
</reference>
|
||||
</handle>
|
||||
</layout>
|
||||
44
application/design/frontend/base/default/layouts/user.xml
Normal file
44
application/design/frontend/base/default/layouts/user.xml
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<layout version="1.0">
|
||||
<handle name="login">
|
||||
<update name="1column" />
|
||||
|
||||
<reference name="content">
|
||||
<block name="login" type="core/template" template="user/login.phtml" />
|
||||
</reference>
|
||||
|
||||
<reference name="head">
|
||||
<action method="addCss">
|
||||
<params>
|
||||
<param name="template">css/deprecated/styles.css</param>
|
||||
</params>
|
||||
</action>
|
||||
<action method="addCss">
|
||||
<params>
|
||||
<param name="template">css/deprecated/about.css</param>
|
||||
</params>
|
||||
</action>
|
||||
</reference>
|
||||
</handle>
|
||||
|
||||
<handle name="registration">
|
||||
<update name="1column" />
|
||||
|
||||
<reference name="content">
|
||||
<block name="registration" type="core/template" template="user/registration.phtml" />
|
||||
</reference>
|
||||
|
||||
<reference name="head">
|
||||
<action method="addCss">
|
||||
<params>
|
||||
<param name="template">css/deprecated/styles.css</param>
|
||||
</params>
|
||||
</action>
|
||||
<action method="addCss">
|
||||
<params>
|
||||
<param name="template">css/deprecated/about.css</param>
|
||||
</params>
|
||||
</action>
|
||||
</reference>
|
||||
</handle>
|
||||
</layout>
|
||||
154
application/design/install/base/default/layouts/install.php
Normal file
154
application/design/install/base/default/layouts/install.php
Normal file
|
|
@ -0,0 +1,154 @@
|
|||
<?php return array(
|
||||
'install' => array(
|
||||
'update' => '2columns-left',
|
||||
'reference' => array(
|
||||
'content' => array(
|
||||
'children' => array(
|
||||
'status' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'status.phtml'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'install.intro' => array(
|
||||
'update' => 'install',
|
||||
'reference' => array(
|
||||
'content' => array(
|
||||
'children' => array(
|
||||
'overview' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'intro.phtml'
|
||||
),
|
||||
)
|
||||
),
|
||||
'status' => array(
|
||||
'actions' => array(
|
||||
array(
|
||||
'method' => 'setData',
|
||||
'params' => array(
|
||||
'key' => 'step',
|
||||
'value' => 0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'install.step.system' => array(
|
||||
'update' => 'install',
|
||||
'reference' => array(
|
||||
'content' => array(
|
||||
'children' => array(
|
||||
'overview' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'step/system.phtml'
|
||||
),
|
||||
)
|
||||
),
|
||||
'status' => array(
|
||||
'actions' => array(
|
||||
array(
|
||||
'method' => 'setData',
|
||||
'params' => array(
|
||||
'key' => 'step',
|
||||
'value' => 1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'install.step.database' => array(
|
||||
'update' => 'install',
|
||||
'reference' => array(
|
||||
'content' => array(
|
||||
'children' => array(
|
||||
'overview' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'step/database.phtml'
|
||||
),
|
||||
)
|
||||
),
|
||||
'status' => array(
|
||||
'actions' => array(
|
||||
array(
|
||||
'method' => 'setData',
|
||||
'params' => array(
|
||||
'key' => 'step',
|
||||
'value' => 2
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'install.step.universe' => array(
|
||||
'update' => 'install',
|
||||
'reference' => array(
|
||||
'content' => array(
|
||||
'children' => array(
|
||||
'overview' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'step/universe.phtml'
|
||||
),
|
||||
)
|
||||
),
|
||||
'status' => array(
|
||||
'actions' => array(
|
||||
array(
|
||||
'method' => 'setData',
|
||||
'params' => array(
|
||||
'key' => 'step',
|
||||
'value' => 3
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'install.step.profile' => array(
|
||||
'update' => 'install',
|
||||
'reference' => array(
|
||||
'content' => array(
|
||||
'children' => array(
|
||||
'overview' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'step/profile.phtml'
|
||||
),
|
||||
)
|
||||
),
|
||||
'status' => array(
|
||||
'actions' => array(
|
||||
array(
|
||||
'method' => 'setData',
|
||||
'params' => array(
|
||||
'key' => 'step',
|
||||
'value' => 4
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'install.summary' => array(
|
||||
'update' => 'install',
|
||||
'reference' => array(
|
||||
'content' => array(
|
||||
'children' => array(
|
||||
'overview' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'summary.phtml'
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
);
|
||||
|
|
@ -1,337 +0,0 @@
|
|||
<?php return array(
|
||||
'1column' => array(
|
||||
'update' => 'default'
|
||||
),
|
||||
|
||||
'2columns-left' => array(
|
||||
'update' => 'default',
|
||||
'template' => 'page/2columns-left.phtml',
|
||||
'reference' => array(
|
||||
'root' => array(
|
||||
'children' => array(
|
||||
'left' => array(
|
||||
'type' => 'core/concat'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'2columns-right' => array(
|
||||
'update' => 'default',
|
||||
'template' => 'page/2columns-right.phtml',
|
||||
'reference' => array(
|
||||
'root' => array(
|
||||
'children' => array(
|
||||
'right' => array(
|
||||
'type' => 'core/concat'
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'3columns' => array(
|
||||
'update' => 'default',
|
||||
'template' => 'page/3columns.phtml',
|
||||
'reference' => array(
|
||||
'root' => array(
|
||||
'children' => array(
|
||||
'left' => array(
|
||||
'type' => 'core/concat'
|
||||
),
|
||||
'right' => array(
|
||||
'type' => 'core/concat'
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'default' => array(
|
||||
'type' => 'core/html.page',
|
||||
'template' => 'page/1column.phtml',
|
||||
'children' => array(
|
||||
'head' => array(
|
||||
'type' => 'core/html.head',
|
||||
'template' => 'page/html/head.phtml',
|
||||
'actions' => array(
|
||||
array(
|
||||
'method' => 'addCss',
|
||||
'params' => array(
|
||||
'stylesheet' => 'css/base.css'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addJs',
|
||||
'params' => array(
|
||||
'script' => 'scripts/jquery/jquery-1.6.4.js'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'header' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'page/html/header.phtml'
|
||||
),
|
||||
'footer' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'page/html/footer.phtml'
|
||||
),
|
||||
'content' => array(
|
||||
'type' => 'core/concat'
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'ajax' => array(
|
||||
'type' => 'core/html.page',
|
||||
'template' => 'page/empty.phtml',
|
||||
'children' => array(
|
||||
'content' => array(
|
||||
'type' => 'core/concat'
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'empty' => array(
|
||||
'type' => 'core/html.page',
|
||||
'template' => 'page/empty.phtml',
|
||||
'children' => array(
|
||||
'head' => array(
|
||||
'type' => 'core/html.head',
|
||||
'template' => 'page/html/head.phtml'
|
||||
),
|
||||
'content' => array(
|
||||
'type' => 'core/concat'
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'message' => array(
|
||||
'update' => 'default',
|
||||
'reference' => array(
|
||||
'content' => array(
|
||||
'children' => array(
|
||||
'message' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'page/html/message.phtml'
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'login' => array(
|
||||
'update' => '1column',
|
||||
'reference' => array(
|
||||
'content' => array(
|
||||
'children' => array(
|
||||
'login' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'user/login.phtml'
|
||||
),
|
||||
)
|
||||
),
|
||||
'head' => array(
|
||||
'actions' => array(
|
||||
array(
|
||||
'method' => 'addCss',
|
||||
'params' => array(
|
||||
'stylesheet' => 'css/deprecated/styles.css'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addCss',
|
||||
'params' => array(
|
||||
'stylesheet' => 'css/deprecated/about.css'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'registration' => array(
|
||||
'update' => '1column',
|
||||
'reference' => array(
|
||||
'content' => array(
|
||||
'children' => array(
|
||||
'registration' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'user/registration.phtml'
|
||||
),
|
||||
)
|
||||
),
|
||||
'head' => array(
|
||||
'actions' => array(
|
||||
array(
|
||||
'method' => 'addCss',
|
||||
'params' => array(
|
||||
'stylesheet' => 'css/deprecated/styles.css'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addCss',
|
||||
'params' => array(
|
||||
'stylesheet' => 'css/deprecated/about.css'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'install' => array(
|
||||
'update' => '2columns-left',
|
||||
'reference' => array(
|
||||
'content' => array(
|
||||
'children' => array(
|
||||
'status' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'status.phtml'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'install.intro' => array(
|
||||
'update' => 'install',
|
||||
'reference' => array(
|
||||
'content' => array(
|
||||
'children' => array(
|
||||
'overview' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'intro.phtml'
|
||||
),
|
||||
)
|
||||
),
|
||||
'status' => array(
|
||||
'actions' => array(
|
||||
array(
|
||||
'method' => 'setData',
|
||||
'params' => array(
|
||||
'key' => 'step',
|
||||
'value' => 0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'install.step.system' => array(
|
||||
'update' => 'install',
|
||||
'reference' => array(
|
||||
'content' => array(
|
||||
'children' => array(
|
||||
'overview' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'step/system.phtml'
|
||||
),
|
||||
)
|
||||
),
|
||||
'status' => array(
|
||||
'actions' => array(
|
||||
array(
|
||||
'method' => 'setData',
|
||||
'params' => array(
|
||||
'key' => 'step',
|
||||
'value' => 1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'install.step.database' => array(
|
||||
'update' => 'install',
|
||||
'reference' => array(
|
||||
'content' => array(
|
||||
'children' => array(
|
||||
'overview' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'step/database.phtml'
|
||||
),
|
||||
)
|
||||
),
|
||||
'status' => array(
|
||||
'actions' => array(
|
||||
array(
|
||||
'method' => 'setData',
|
||||
'params' => array(
|
||||
'key' => 'step',
|
||||
'value' => 2
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'install.step.universe' => array(
|
||||
'update' => 'install',
|
||||
'reference' => array(
|
||||
'content' => array(
|
||||
'children' => array(
|
||||
'overview' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'step/universe.phtml'
|
||||
),
|
||||
)
|
||||
),
|
||||
'status' => array(
|
||||
'actions' => array(
|
||||
array(
|
||||
'method' => 'setData',
|
||||
'params' => array(
|
||||
'key' => 'step',
|
||||
'value' => 3
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'install.step.profile' => array(
|
||||
'update' => 'install',
|
||||
'reference' => array(
|
||||
'content' => array(
|
||||
'children' => array(
|
||||
'overview' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'step/profile.phtml'
|
||||
),
|
||||
)
|
||||
),
|
||||
'status' => array(
|
||||
'actions' => array(
|
||||
array(
|
||||
'method' => 'setData',
|
||||
'params' => array(
|
||||
'key' => 'step',
|
||||
'value' => 4
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'install.summary' => array(
|
||||
'update' => 'install',
|
||||
'reference' => array(
|
||||
'content' => array(
|
||||
'children' => array(
|
||||
'overview' => array(
|
||||
'type' => 'core/template',
|
||||
'template' => 'summary.phtml'
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
);
|
||||
90
application/design/install/base/default/layouts/page.xml
Normal file
90
application/design/install/base/default/layouts/page.xml
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<layout version="1.0">
|
||||
<handle name="1column">
|
||||
<update name="default" />
|
||||
</handle>
|
||||
<handle name="2columns-left">
|
||||
<update name="default" />
|
||||
|
||||
<reference name="root">
|
||||
<action method="setTemplate">
|
||||
<params>
|
||||
<param name="template">page/2columns-left.phtml</param>
|
||||
</params>
|
||||
</action>
|
||||
<block name="left" type="core/concat" />
|
||||
</reference>
|
||||
</handle>
|
||||
<handle name="2columns-right">
|
||||
<update name="default" />
|
||||
|
||||
<reference name="root">
|
||||
<action method="setTemplate">
|
||||
<params>
|
||||
<param name="template">page/2columns-right.phtml</param>
|
||||
</params>
|
||||
</action>
|
||||
<block name="right" type="core/concat" />
|
||||
</reference>
|
||||
</handle>
|
||||
<handle name="3columns">
|
||||
<update name="default" />
|
||||
|
||||
<reference name="root">
|
||||
<action method="setTemplate">
|
||||
<params>
|
||||
<param name="template">page/3columns.phtml</param>
|
||||
</params>
|
||||
</action>
|
||||
<block name="left" type="core/concat" />
|
||||
<block name="right" type="core/concat" />
|
||||
</reference>
|
||||
</handle>
|
||||
<handle name="default">
|
||||
<block name="root" type="core/html.page" template="page/1column.phtml">
|
||||
<block name="head" type="core/html.head" template="page/html/head.phtml">
|
||||
<action method="addCss">
|
||||
<params>
|
||||
<param name="stylesheet">css/deprecated/default.css</param>
|
||||
</params>
|
||||
</action>
|
||||
<action method="addCss">
|
||||
<params>
|
||||
<param name="stylesheet">css/deprecated/formate.css</param>
|
||||
</params>
|
||||
</action>
|
||||
<action method="addCss">
|
||||
<params>
|
||||
<param name="stylesheet">css/base.css</param>
|
||||
</params>
|
||||
</action>
|
||||
<action method="addJs">
|
||||
<params>
|
||||
<param name="script">scripts/jquery/jquery-1.6.4.js</param>
|
||||
</params>
|
||||
</action>
|
||||
</block>
|
||||
<block name="header" type="core/concat" />
|
||||
<block name="content" type="core/concat" />
|
||||
<block name="footer" type="core/template" />
|
||||
</block>
|
||||
</handle>
|
||||
<handle name="ajax">
|
||||
<block name="root" type="core/html.page" template="page/empty.phtml">
|
||||
<block name="content" type="core/concat" />
|
||||
</block>
|
||||
</handle>
|
||||
<handle name="empty">
|
||||
<block name="root" type="core/html.page" template="page/empty.phtml">
|
||||
<block name="head" type="core/html.head" template="page/html/head.phtml" />
|
||||
<block name="content" type="core/concat" />
|
||||
</block>
|
||||
</handle>
|
||||
<handle name="message">
|
||||
<update name="default" />
|
||||
|
||||
<reference name="content">
|
||||
<block name="message" type="core/template" template="page/html/message.phtml" />
|
||||
</reference>
|
||||
</handle>
|
||||
</layout>
|
||||
|
|
@ -137,7 +137,8 @@ $configRewrites = array(
|
|||
'package' => 'default',
|
||||
'theme' => 'default',
|
||||
'layout' => array(
|
||||
'page' => 'page.php'
|
||||
'page' => 'page.xml',
|
||||
'install' => 'install.php'
|
||||
),
|
||||
'storyline' => array(
|
||||
'universe' => 'legacies',
|
||||
|
|
@ -147,8 +148,11 @@ $configRewrites = array(
|
|||
);
|
||||
|
||||
$config = unserialize($session->getData('config'));
|
||||
$config = array_merge_recursive($config, $configRewrites);
|
||||
Wootook::loadConfig($config);
|
||||
if (is_array($config)) {
|
||||
Wootook::loadConfig(array_merge_recursive($config, $configRewrites));
|
||||
} else {
|
||||
Wootook::loadConfig($configRewrites);
|
||||
}
|
||||
|
||||
$layout = new Wootook_Core_Layout('install');
|
||||
|
||||
|
|
@ -229,10 +233,6 @@ case 'install':
|
|||
'allow_spy_drone_attacks' => true
|
||||
)
|
||||
),
|
||||
'layout' => array(
|
||||
'page' => 'page.php',
|
||||
'empire' => 'empire.php'
|
||||
),
|
||||
'locales' => array(
|
||||
'fr' => 'fr_FR',
|
||||
'fr_FR' => 'fr_FR',
|
||||
|
|
|
|||
Loading…
Reference in a new issue