// CFG: NEWS-READER-LOGIN-AREA-CLASS
$cfg->setConfigEntry('news_reader_login_area_class', 'DefaultNewsReader');
+// CFG: NEWS-READER-LOGIN-AREA-PROFILE-CLASS
+$cfg->setConfigEntry('news_reader_login_area_profile_class', 'DefaultNewsReader');
+
+// CFG: NEWS-READER-LOGIN-AREA-STATUS-PROBLEM-CLASS
+$cfg->setConfigEntry('news_reader_login_area_status_problem_class', 'DefaultNewsReader');
+
// CFG: NEWS-HOME-LIMIT
$cfg->setConfigEntry('news_home_limit', 10);
// CFG: IMAGE-TEMPLATE-CLASS
$cfg->setConfigEntry('image_template_class', 'ImageTemplateEngine');
-// CFG: CAPTCHA-ENCRYPT-VALIDATOR-FILTER
-$cfg->setConfigEntry('captcha_encrypt_validator_filter', 'CaptchaEncryptFilter');
+// CFG: MAIL-TEMPLATE-CLASS
+$cfg->setConfigEntry('mail_template_class', 'MailTemplateEngine');
-// CFG: CITY-HTML-CMD-DO-FORM-RESOLVER-CLASS
-$cfg->setConfigEntry('city_html_cmd_do_form_resolver_class', 'HtmlCommandResolver');
-
-// CFG: CITY-HTML-CMD-LOGIN-AREA-RESOLVER-CLASS
-$cfg->setConfigEntry('city_html_cmd_login_area_resolver_class', 'HtmlCommandResolver');
+// CFG EMAIl-TPL-RESEND-LINK
+$cfg->setConfigEntry('email_tpl_resend_link', 'text');
-// CFG: CITY-HTML-CMD-CONFIRM-RESOLVER-CLASS
-$cfg->setConfigEntry('city_html_cmd_confirm_resolver_class', 'HtmlCommandResolver');
+// CFG: ADMIN-EMAIL
+$cfg->setConfigEntry('admin_email', 'you@some-hoster.invalid');
-// CFG: CITY-HTML-CMD-PROBLEM-RESOLVER-CLASS
-$cfg->setConfigEntry('city_html_cmd_problem_resolver_class', 'HtmlCommandResolver');
+// CFG: CAPTCHA-ENCRYPT-VALIDATOR-FILTER
+$cfg->setConfigEntry('captcha_encrypt_validator_filter', 'CaptchaEncryptFilter');
-// CFG: CITY-HTML-CMD-LOGOUT-RESOLVER-CLASS
-$cfg->setConfigEntry('city_html_cmd_logout_resolver_class', 'HtmlCommandResolver');
+// CFG: USER-STATUS-CONFIRMED-FILTER
+$cfg->setConfigEntry('user_status_confirmed_filter', 'UserStatusConfimedUpdateFilter');
// CFG: CAPTCHA-GUEST-VERIFIER-FILTER
$cfg->setConfigEntry('captcha_guest_verifier_filter', 'GraphicalCodeCaptchaVerifierFilter');
// CFG: BIRTHDAY-PROFILE-VERIFIER-FILTER
$cfg->setConfigEntry('birthday_profile_verifier_filter', 'BirthdayVerifierFilter');
+// CFG: CITY-HTML-CMD-DO-FORM-RESOLVER-CLASS
+$cfg->setConfigEntry('city_html_cmd_do_form_resolver_class', 'HtmlCommandResolver');
+
+// CFG: CITY-HTML-CMD-LOGIN-AREA-RESOLVER-CLASS
+$cfg->setConfigEntry('city_html_cmd_login_area_resolver_class', 'HtmlCommandResolver');
+
+// CFG: CITY-HTML-CMD-CONFIRM-RESOLVER-CLASS
+$cfg->setConfigEntry('city_html_cmd_confirm_resolver_class', 'HtmlCommandResolver');
+
+// CFG: CITY-HTML-CMD-PROBLEM-RESOLVER-CLASS
+$cfg->setConfigEntry('city_html_cmd_problem_resolver_class', 'HtmlCommandResolver');
+
+// CFG: CITY-HTML-CMD-LOGOUT-RESOLVER-CLASS
+$cfg->setConfigEntry('city_html_cmd_logout_resolver_class', 'HtmlCommandResolver');
+
+// CFG: EMAIL-CHANGE-ALLOWED
+$cfg->setConfigEntry('email_change_allowed', 'Y');
+
+// CFG: EMAIL-CHANGE-CONFIRMATION
+$cfg->setConfigEntry('email_change_confirmation', 'Y');
+
+// CFG: GUEST-LOGIN-ALLOWED
+$cfg->setConfigEntry('guest_login_allowed', 'Y');
+
// CFG: GUEST-LOGIN-USERNAME
$cfg->setConfigEntry('guest_login_user', 'guest');
--- /dev/null
+<?php
+/**
+ * An action for profile (editing) page
+ *
+ * @author Roland Haeder <webmaster@shipsimu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2015 City Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.shipsimu.org
+ *
+ * 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/>.
+ */
+class HtmlCityLoginProfileAction extends BaseCityAction implements Commandable, Registerable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this action
+ *
+ * @param $resolverInstance An instance of an action resolver
+ * @return $actionInstance An instance of this action class
+ */
+ public static final function createHtmlCityLoginProfileAction (ActionResolver $resolverInstance) {
+ // Get a new instance
+ $actionInstance = new HtmlCityLoginProfileAction();
+
+ // Set the resolver instance
+ $actionInstance->setResolverInstance($resolverInstance);
+
+ // Return the instance
+ return $actionInstance;
+ }
+
+ /**
+ * Executes the command with given request and response objects
+ *
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
+ * @return void
+ * @todo 0% done
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Call parent execute method
+ parent::execute($requestInstance, $responseInstance);
+
+ // Add your code here...
+ }
+
+ /**
+ * Adds extra filters to the given controller instance
+ *
+ * @param $controllerInstance A controller instance
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @return void
+ * @todo Add some filters here
+ */
+ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+ // Check for user status by default
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter'));
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * An action for status problem handling
+ *
+ * @author Roland Haeder <webmaster@shipsimu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2015 City Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.shipsimu.org
+ *
+ * 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/>.
+ */
+class HtmlCityLoginStatusProblemAction extends BaseCityAction implements Commandable, Registerable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this action
+ *
+ * @param $resolverInstance An instance of an action resolver
+ * @return $actionInstance An instance of this action class
+ */
+ public static final function createHtmlCityLoginStatusProblemAction (ActionResolver $resolverInstance) {
+ // Get a new instance
+ $actionInstance = new HtmlCityLoginStatusProblemAction();
+
+ // Set the resolver instance
+ $actionInstance->setResolverInstance($resolverInstance);
+
+ // Return the instance
+ return $actionInstance;
+ }
+
+ /**
+ * Executes the command with given request and response objects
+ *
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
+ * @return void
+ * @todo 0% done
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Call parent method
+ parent::execute($requestInstance, $responseInstance);
+
+ // Add your code
+ }
+
+ /**
+ * Adds extra filters to the given controller instance
+ *
+ * @param $controllerInstance A controller instance
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @return void
+ * @todo Add some filters here
+ */
+ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+ // Check for user status by default
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter'));
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * Controller for confirmation link
+ *
+ * @author Roland Haeder <webmaster@shipsimu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2015 City Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.shipsimu.org
+ *
+ * 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/>.
+ */
+class CityHtmlConfirmController extends BaseController implements Controller {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this class
+ *
+ * @param $resolverInstance An instance of a command resolver class
+ * @return $controllerInstance A prepared instance of this class
+ * @todo Add some filters to this controller
+ */
+ public static final function createCityHtmlConfirmController (CommandResolver $resolverInstance) {
+ // Create the instance
+ $controllerInstance = new CityHtmlConfirmController();
+
+ // Set the command resolver
+ $controllerInstance->setResolverInstance($resolverInstance);
+
+ // Add filters for handling confirmation code and username
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_verifier_filter'));
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_unconfirmed_filter'));
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('confirm_code_verifier_filter'));
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_confirmed_filter'));
+
+ // Return the prepared instance
+ return $controllerInstance;
+ }
+
+ /**
+ * Handles the given request and response
+ *
+ * @param $requestInstance An instance of a request class
+ * @param $responseInstance An instance of a response class
+ * @return void
+ */
+ public function handleRequest (Requestable $requestInstance, Responseable $responseInstance) {
+ // Generic pre-post command execution
+ $this->executeGenericPrePostCommand($requestInstance, $responseInstance);
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+// Get helper instance
+$helperInstance = ObjectFactory::createObjectByConfiguredName('html_link_helper_class', array($this, 'direct_login'));
+
+// Set link text
+$helperInstance->addLinkWithTextById('direct_login');
+
+// Flush the content
+$helperInstance->flushContent();
+
+// [EOC]
+?>
+<div id="content_header">
+ Bestätigung Deiner Email-Adresse:
+</div>
+
+<div id="content_body">
+ Hallo <span class="data_username">{?username?}</span>! Du hast heute deine
+ Email-Addresse bestätigt, wodurch alle Spielefunktionen entsperrt
+ worden sind. Viel Spass beim Spielen!
+</div>
+
+<div id="content_footer">
+ {?direct_login?}
+</div>
--- /dev/null
+<div class="debug_header">
+ Mail-Debug-Ausgabe:
+</div>
+
+<div class="mail_header">
+ <div class="mail_header_line">
+ <span class="mail_sender">Von:</span> <span class="mail_info">{?sender?}</span>
+ </div>
+ <div class="mail_header_line">
+ <span class="mail_recipient">An:</span> <span class="mail_info">{?recipient?}</span>
+ </div>
+ <div class="mail_header_line">
+ <span class="mail_subject">Betreff:</span> <span class="mail_info">{?subject?}</span>
+ </div>
+</div>
+
+<div class="mail_text_box">
+ <div class="mail_message">
+ Nachricht:
+ </div>
+
+ <div class="mail_content">
+ {?message?}
+ </div>
+</div>
--- /dev/null
+Deny from all
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<text-mail>
+ <mail-data>
+ <sender-address value="{?admin_email?}" />
+ <subject-line><![CDATA[Anforderung deines Bestätigungslinks]]></subject-line>
+ <recipient-address value="{?email?}" />
+ <message>
+ <![CDATA[Hallo {?username?}!
+
+Du (oder ein anderer) hattest soeben deinen Bestätigungslink erneut angefordert. Solltest du dies nicht gewesen sein, bitten wir dich den Vorfall zu entschuldigen.
+
+Hier ist nun dein Bestätigungslink. Der alte aus der Anmeldemail ist somit nicht mehr gültig!
+
+{?base_url?}/index.php?app={?app_short_name?}&command=confirm&username={?username?}&confirm={?confirm_hash?}
+
+Solltest du die URL nicht anklicken können, versuche diese in die Adresszeile deines Browsers zu kopieren.
+
+Alternativ kannst du im Spielebereich unter Bestätigungscode den folgenden Code reinkopieren oder eingeben:
+
+{?confirm_hash?}
+
+Solltest du Fragen dazu oder Probleme mit der Bestätigung haben, so melde dich bitte beim Support-Team.
+
+Mit freundlichen Grüßen,
+ Dein {?app_short_name?}-Team
+
+{?mail_footer?}]]>
+ </message>
+ </mail-data>
+</text-mail>
<title-text><![CDATA[Home:]]></title-text>
</title>
</block-header>
+
<entry-list entry-count="{?entry_count?}">
<entry>
<entry-id><![CDATA[home_entry]]></entry-id>
<anchor-href><![CDATA[index.php?app={?app_short_name?}]]></anchor-href>
</anchor>
</entry>
+
<entry>
<entry-id><![CDATA[login_entry]]></entry-id>
<anchor>
<anchor-href><![CDATA[index.php?app={?app_short_name?}&command=login]]></anchor-href>
</anchor>
</entry>
+
<entry>
<entry-id><![CDATA[register_entry]]></entry-id>
<anchor>
<anchor-href><![CDATA[index.php?app={?app_short_name?}&command=register]]></anchor-href>
</anchor>
</entry>
+
<entry>
<entry-id><![CDATA[infos_entry]]></entry-id>
<anchor>
<anchor-href><![CDATA[index.php?app={?app_short_name?}&command=infos]]></anchor-href>
</anchor>
</entry>
+
<entry>
<entry-id><![CDATA[pillory_entry]]></entry-id>
<anchor>
</anchor>
</entry>
</entry-list>
+
<block-footer>
<footer-id><![CDATA[home_menu_footer]]></footer-id>
<footer-class><![CDATA[menu_footer]]></footer-class>
<footer-text><![CDATA[Unterhalb Hauptauswahl]]></footer-text>
</block-footer>
</block>
+
<block>
<block-header>
<title>
<title-text><![CDATA[Rechtliches:]]></title-text>
</title>
</block-header>
+
<entry-list entry-count="{?entry_count?}">
<entry>
<entry-id><![CDATA[imprint_entry]]></entry-id>
<anchor-href><![CDATA[index.php?app={?app_short_name?}&command=imprint]]></anchor-href>
</anchor>
</entry>
+
<entry>
<entry-id><![CDATA[terms_entry]]></entry-id>
<anchor>
</anchor>
</entry>
</entry-list>
+
<block-footer>
<footer-id><![CDATA[law_menu_footer]]></footer-id>
<footer-class><![CDATA[menu_footer]]></footer-class>
<title-text><![CDATA[Home:]]></title-text>
</title>
</block-header>
+
<entry-list entry-count="{?entry_count?}">
<entry>
<entry-id><![CDATA[welcome_entry]]></entry-id>
<anchor-href><![CDATA[index.php?app={?app_short_name?}&command=login_area]]></anchor-href>
</anchor>
</entry>
+
+ <entry>
+ <entry-id><![CDATA[city_map_entry]]></entry-id>
+ <anchor>
+ <anchor-id><![CDATA[menu_city_map]]></anchor-id>
+ <anchor-text><![CDATA[Stadtkarte]]></anchor-text>
+ <anchor-title><![CDATA[Zur Stadtkarte]]></anchor-title>
+ <anchor-href><![CDATA[index.php?app={?app_short_name?}&command=login_area&action=city_map]]></anchor-href>
+ </anchor>
+ </entry>
+
+ <entry>
+ <entry-id><![CDATA[region_map_entry]]></entry-id>
+ <anchor>
+ <anchor-id><![CDATA[menu_region_map]]></anchor-id>
+ <anchor-text><![CDATA[Gebietskarte]]></anchor-text>
+ <anchor-title><![CDATA[Zur Gebietskarte]]></anchor-title>
+ <anchor-href><![CDATA[index.php?app={?app_short_name?}&command=login_area&action=region_map]]></anchor-href>
+ </anchor>
+ </entry>
+
+ <entry>
+ <entry-id><![CDATA[government_entry]]></entry-id>
+ <anchor>
+ <anchor-id><![CDATA[menu_government]]></anchor-id>
+ <anchor-text><![CDATA[Staat]]></anchor-text>
+ <anchor-title><![CDATA[Zum fiktiven Staat gehen]]></anchor-title>
+ <anchor-href><![CDATA[index.php?app={?app_short_name?}&command=login_area&action=government]]></anchor-href>
+ </anchor>
+ </entry>
+
+ <entry>
+ <entry-id><![CDATA[profile_entry]]></entry-id>
+ <anchor>
+ <anchor-id><![CDATA[menu_profile]]></anchor-id>
+ <anchor-text><![CDATA[Mein Profil]]></anchor-text>
+ <anchor-title><![CDATA[Zum Spielerprofil]]></anchor-title>
+ <anchor-href><![CDATA[index.php?app={?app_short_name?}&command=login_area&action=profile]]></anchor-href>
+ </anchor>
+ </entry>
</entry-list>
+
<block-footer>
<footer-id><![CDATA[overview_menu_footer]]></footer-id>
<footer-class><![CDATA[menu_footer]]></footer-class>
<footer-text><![CDATA[Unterhalb Hauptauswahl]]></footer-text>
</block-footer>
</block>
+
<block>
<block-header>
<title>
<title-text><![CDATA[Weiteres:]]></title-text>
</title>
</block-header>
+
<entry-list entry-count="{?entry_count?}">
- <entry>
- <entry-id><![CDATA[pillory_entry]]></entry-id>
- <anchor>
- <anchor-id><![CDATA[menu_pillory]]></anchor-id>
- <anchor-text><![CDATA[Pranger]]></anchor-text>
- <anchor-title><![CDATA[Zum Pranger]]></anchor-title>
- <anchor-href><![CDATA[index.php?app={?app_short_name?}&command=pillory]]></anchor-href>
- </anchor>
- </entry>
<entry>
<entry-id><![CDATA[support_entry]]></entry-id>
<anchor>
<anchor-href><![CDATA[index.php?app={?app_short_name?}&command=support]]></anchor-href>
</anchor>
</entry>
+
<entry>
<entry-id><![CDATA[terms_entry]]></entry-id>
<anchor>
<anchor-href><![CDATA[index.php?app={?app_short_name?}&command=terms]]></anchor-href>
</anchor>
</entry>
+
+ <entry>
+ <entry-id><![CDATA[pillory_entry]]></entry-id>
+ <anchor>
+ <anchor-id><![CDATA[menu_pillory]]></anchor-id>
+ <anchor-text><![CDATA[Pranger]]></anchor-text>
+ <anchor-title><![CDATA[Zum Pranger]]></anchor-title>
+ <anchor-href><![CDATA[index.php?app={?app_short_name?}&command=pillory]]></anchor-href>
+ </anchor>
+ </entry>
</entry-list>
+
<block-footer>
<footer-id><![CDATA[law_menu_footer]]></footer-id>
<footer-class><![CDATA[menu_footer]]></footer-class>
-Subproject commit b2f9b3f98dad63c32b07b891f3e19135398090ad
+Subproject commit c00f2069057fcaa301bb045f5801e8bc0ff7c658