From: Roland Häder Date: Tue, 18 Nov 2008 17:32:21 +0000 (+0000) Subject: Filteres rewritten, birthday added, some fixes: X-Git-Url: https://git.mxchange.org/?p=shipsimu.git;a=commitdiff_plain;h=3fa969fe802f144628b970758cc974e50f04f9dc Filteres rewritten, birthday added, some fixes: - Birthday (day and month as 2-digit number and year as 4-digit number) added - All filters now extends the BaseFilter class - Typo (Startuphilfe -> Starthilfe) fixed - Minor improvements --- diff --git a/.gitattributes b/.gitattributes index ca83c33..0754e3c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -218,6 +218,8 @@ application/ship-simu/main/filter/page/.htaccess -text application/ship-simu/main/filter/page/class_RefillPageFilter.php -text application/ship-simu/main/filter/validator/.htaccess -text application/ship-simu/main/filter/validator/class_RefillRequestValidatorFilter.php -text +application/ship-simu/main/filter/verifier/.htaccess -text +application/ship-simu/main/filter/verifier/class_BirthdayVerifierFilter.php -text application/ship-simu/main/goverment/.htaccess -text application/ship-simu/main/goverment/class_SimplifiedGoverment.php -text application/ship-simu/main/login/.htaccess -text diff --git a/application/admin/templates/de/code/action_admin_login_profile.ctp b/application/admin/templates/de/code/action_admin_login_profile.ctp index a506218..8957cf9 100644 --- a/application/admin/templates/de/code/action_admin_login_profile.ctp +++ b/application/admin/templates/de/code/action_admin_login_profile.ctp @@ -16,7 +16,7 @@ $helper->addFieldText('pass2', "Neues Passwort, Wiederholung:"); $helper->addInputPasswordField('pass2'); // Display current email -$helper->addFormNote('current_email', "Derzeitige Email-Adresse: ".$helper->getValueField('email').""); +$helper->addFormNote('current_email', "Derzeitige Email-Adresse: ".$helper->getValueField('email').""); // Only for changing email address if ($helper->ifEmailChangeAllowed()) { diff --git a/application/admin/templates/de/code/login_form.ctp b/application/admin/templates/de/code/login_form.ctp index 700f88f..688dc12 100644 --- a/application/admin/templates/de/code/login_form.ctp +++ b/application/admin/templates/de/code/login_form.ctp @@ -33,7 +33,7 @@ if ($helper->ifLoginIsEnabled()) { // CAPTCHA enabled? if ($helper->ifFormSecuredWithCaptcha()) { - $helper->addFormGroup('captcha_user', "Unser Benuzter-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst."); + $helper->addFormGroup('captcha_user', "Das Benutzer-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst."); $helper->addCaptcha(); } // END - if diff --git a/application/blog/templates/de/code/action_blog_login_profile.ctp b/application/blog/templates/de/code/action_blog_login_profile.ctp index c76abd3..7a44b9a 100644 --- a/application/blog/templates/de/code/action_blog_login_profile.ctp +++ b/application/blog/templates/de/code/action_blog_login_profile.ctp @@ -16,7 +16,7 @@ $helper->addFieldText('pass2', "Neues Passwort, Wiederholung:"); $helper->addInputPasswordField('pass2'); // Display current email -$helper->addFormNote('current_email', "Derzeitige Email-Adresse: ".$helper->getValueField('email').""); +$helper->addFormNote('current_email', "Derzeitige Email-Adresse: ".$helper->getValueField('email').""); // Only for changing email address if ($helper->ifEmailChangeAllowed()) { diff --git a/application/blog/templates/de/code/login_form.ctp b/application/blog/templates/de/code/login_form.ctp index de32aa5..44492ac 100644 --- a/application/blog/templates/de/code/login_form.ctp +++ b/application/blog/templates/de/code/login_form.ctp @@ -33,7 +33,7 @@ if ($helper->ifLoginIsEnabled()) { // CAPTCHA enabled? if ($helper->ifFormSecuredWithCaptcha()) { - $helper->addFormGroup('captcha_user', "Unser Benuzter-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst."); + $helper->addFormGroup('captcha_user', "Das Benutzer-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst."); $helper->addCaptcha(); } // END - if diff --git a/application/ship-simu/config.php b/application/ship-simu/config.php index baf8470..5c18fdc 100644 --- a/application/ship-simu/config.php +++ b/application/ship-simu/config.php @@ -58,6 +58,9 @@ $cfg->setConfigEntry('register_personal_data', "Y"); // CFG: REGISTER-EMAIL-UNIQUE $cfg->setConfigEntry('register_email_unique', "Y"); +// CFG: PROFILE-INCLUDES-BIRTHDAY +$cfg->setConfigEntry('profile_includes_birthday', "Y"); + // CFG: CHAT-ENABLED-ICQ $cfg->setConfigEntry('chat_enabled_icq', "Y"); @@ -196,6 +199,12 @@ $cfg->setConfigEntry('captcha_profile_verifier_filter', "GraphicalCodeCaptchaVer // CFG: CONFIRM-CODE-VERIFIER-FILTER $cfg->setConfigEntry('confirm_code_verifier_filter', "ConfirmCodeVerifierFilter"); +// CFG: BIRTHDAY-REGISTER-VERIFIER-FILTER +$cfg->setConfigEntry('birthday_register_verifier_filter', "BirthdayVerifierFilter"); + +// CFG: BIRTHDAY-PROFILE-VERIFIER-FILTER +$cfg->setConfigEntry('birthday_profile_verifier_filter', "BirthdayVerifierFilter"); + // CFG: REFILL-PAGE-FILTER $cfg->setConfigEntry('refill_page_filter', "RefillPageFilter"); @@ -268,8 +277,11 @@ $cfg->setConfigEntry('shipsimu_guest_login_captcha', "GraphicalCodeCaptcha"); // CFG: SHIPSIMU-PROFILE-CAPTCHA $cfg->setConfigEntry('shipsimu_profile_captcha', "GraphicalCodeCaptcha"); -// CFG: REFILL-FORM-CAPTCHA -$cfg->setConfigEntry('refill_form_captcha', "GraphicalCodeCaptcha"); +// CFG: SHIPSIMU-REFILL-CAPTCHA +$cfg->setConfigEntry('shipsimu_refill_captcha', "GraphicalCodeCaptcha"); + +// CFG: SHIPSIMU-GOVERMENT-STARTUP-CAPTCHA +$cfg->setConfigEntry('shipsimu_goverment_startup_captcha', "GraphicalCodeCaptcha"); // CFG: CAPTCHA-STRING-LENGTH $cfg->setConfigEntry('captcha_string_length', 5); @@ -292,8 +304,11 @@ $cfg->setConfigEntry('shipsimu_guest_login_captcha_secured', "Y"); // CFG: SHIPSIMU-PROFILE-CAPTCHA-SECURED $cfg->setConfigEntry('shipsimu_profile_captcha_secured', "Y"); -// CFG: REFILL-FORM-CAPTCHA-SECURED -$cfg->setConfigEntry('refill_form_captcha_secured', "Y"); +// CFG: SHIPSIMU-REFILL-CAPTCHA-SECURED +$cfg->setConfigEntry('shipsimu_refill_captcha_secured', "Y"); + +// CFG: SHIPSIMU-GOVERMENT-STARTUP-CAPTCHA-SECURED +$cfg->setConfigEntry('shipsimu_goverment_startup_captcha_secured', "Y"); // CFG: BLOCK-SHOWS-REGISTRATION $cfg->setConfigEntry('block_shows_registration', "Y"); diff --git a/application/ship-simu/main/commands/web/class_WebShipsimuProfileCommand.php b/application/ship-simu/main/commands/web/class_WebShipsimuProfileCommand.php index e8aff7d..3d66614 100644 --- a/application/ship-simu/main/commands/web/class_WebShipsimuProfileCommand.php +++ b/application/ship-simu/main/commands/web/class_WebShipsimuProfileCommand.php @@ -136,6 +136,9 @@ class WebShipsimuProfileCommand extends BaseCommand implements Commandable { // Validate CAPTCHA input $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_profile_verifier_filter')); + // Validate birthday input + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('birthday_profile_verifier_filter')); + // Email changed $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('email_change_filter')); diff --git a/application/ship-simu/main/commands/web/class_WebShipsimuRegisterCommand.php b/application/ship-simu/main/commands/web/class_WebShipsimuRegisterCommand.php index 56072d6..c47c4a6 100644 --- a/application/ship-simu/main/commands/web/class_WebShipsimuRegisterCommand.php +++ b/application/ship-simu/main/commands/web/class_WebShipsimuRegisterCommand.php @@ -111,6 +111,9 @@ class WebShipsimuRegisterCommand extends BaseCommand implements Commandable { // Validate CAPTCHA input $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_register_verifier_filter')); + + // Validate birthday + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('birthday_register_verifier_filter')); } } diff --git a/application/ship-simu/main/filter/goverment/class_ShipSimuGovermentPaysStartupHelpFilter.php b/application/ship-simu/main/filter/goverment/class_ShipSimuGovermentPaysStartupHelpFilter.php index 3d02ad9..6917edc 100644 --- a/application/ship-simu/main/filter/goverment/class_ShipSimuGovermentPaysStartupHelpFilter.php +++ b/application/ship-simu/main/filter/goverment/class_ShipSimuGovermentPaysStartupHelpFilter.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class ShipSimuGovermentPaysStartupHelpFilter extends BaseFrameworkSystem implements Filterable { +class ShipSimuGovermentPaysStartupHelpFilter extends BaseFilter implements Filterable { /** * Protected constructor * @@ -30,10 +30,6 @@ class ShipSimuGovermentPaysStartupHelpFilter extends BaseFrameworkSystem impleme protected function __construct () { // Call parent constructor parent::__construct(__CLASS__); - - // Clean up a little - $this->removeNumberFormaters(); - $this->removeSystemArray(); } /** @@ -62,7 +58,7 @@ class ShipSimuGovermentPaysStartupHelpFilter extends BaseFrameworkSystem impleme $userInstance = Registry::getRegistry()->getInstance('user'); // Now simply check for it - if (($userInstance instanceof ManageableMember) || ($userInstance->ifGovermentPaysStartupHelp() === false)) { + if ((!$userInstance instanceof ManageableMember) || ($userInstance->ifGovermentPaysStartupHelp() === false)) { // Request is invalid $requestInstance->requestIsValid(false); diff --git a/application/ship-simu/main/filter/goverment/class_ShipSimuGovermentPaysTrainingFilter.php b/application/ship-simu/main/filter/goverment/class_ShipSimuGovermentPaysTrainingFilter.php index 466059c..b8b8dd8 100644 --- a/application/ship-simu/main/filter/goverment/class_ShipSimuGovermentPaysTrainingFilter.php +++ b/application/ship-simu/main/filter/goverment/class_ShipSimuGovermentPaysTrainingFilter.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class ShipSimuGovermentPaysTrainingFilter extends BaseFrameworkSystem implements Filterable { +class ShipSimuGovermentPaysTrainingFilter extends BaseFilter implements Filterable { /** * Protected constructor * @@ -30,10 +30,6 @@ class ShipSimuGovermentPaysTrainingFilter extends BaseFrameworkSystem implements protected function __construct () { // Call parent constructor parent::__construct(__CLASS__); - - // Clean up a little - $this->removeNumberFormaters(); - $this->removeSystemArray(); } /** diff --git a/application/ship-simu/main/filter/page/class_RefillPageFilter.php b/application/ship-simu/main/filter/page/class_RefillPageFilter.php index 448605b..c87f21e 100644 --- a/application/ship-simu/main/filter/page/class_RefillPageFilter.php +++ b/application/ship-simu/main/filter/page/class_RefillPageFilter.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class RefillPageFilter extends BaseFrameworkSystem implements Filterable { +class RefillPageFilter extends BaseFilter implements Filterable { /** * Protected constructor * @@ -30,10 +30,6 @@ class RefillPageFilter extends BaseFrameworkSystem implements Filterable { protected function __construct () { // Call parent constructor parent::__construct(__CLASS__); - - // Clean up a little - $this->removeNumberFormaters(); - $this->removeSystemArray(); } /** diff --git a/application/ship-simu/main/filter/validator/class_RefillRequestValidatorFilter.php b/application/ship-simu/main/filter/validator/class_RefillRequestValidatorFilter.php index 06643e0..c33f5e2 100644 --- a/application/ship-simu/main/filter/validator/class_RefillRequestValidatorFilter.php +++ b/application/ship-simu/main/filter/validator/class_RefillRequestValidatorFilter.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class RefillRequestValidatorFilter extends BaseFrameworkSystem implements Filterable { +class RefillRequestValidatorFilter extends BaseFilter implements Filterable { /** * Protected constructor * @@ -30,10 +30,6 @@ class RefillRequestValidatorFilter extends BaseFrameworkSystem implements Filter protected function __construct () { // Call parent constructor parent::__construct(__CLASS__); - - // Clean up a little - $this->removeNumberFormaters(); - $this->removeSystemArray(); } /** diff --git a/application/ship-simu/main/filter/verifier/.htaccess b/application/ship-simu/main/filter/verifier/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/ship-simu/main/filter/verifier/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/ship-simu/main/filter/verifier/class_BirthdayVerifierFilter.php b/application/ship-simu/main/filter/verifier/class_BirthdayVerifierFilter.php new file mode 100644 index 0000000..cc15989 --- /dev/null +++ b/application/ship-simu/main/filter/verifier/class_BirthdayVerifierFilter.php @@ -0,0 +1,63 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.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 . + */ +class BirthdayVerifierFilter extends BaseFilter implements Filterable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this filter class + * + * @return $filterInstance An instance of this filter class + */ + public final static function createBirthdayVerifierFilter () { + // Get a new instance + $filterInstance = new BirthdayVerifierFilter(); + + // Return the instance + return $filterInstance; + } + + /** + * Executes the filter 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) { + // Implement this! + $this->partialStub("Please implement this method."); + } +} + +// [EOF] +?> diff --git a/application/ship-simu/templates/de/code/action_ship_simu_login_goverment_startup_help.ctp b/application/ship-simu/templates/de/code/action_ship_simu_login_goverment_startup_help.ctp index 23e4192..26b5ece 100644 --- a/application/ship-simu/templates/de/code/action_ship_simu_login_goverment_startup_help.ctp +++ b/application/ship-simu/templates/de/code/action_ship_simu_login_goverment_startup_help.ctp @@ -1,6 +1,6 @@ prefetchValueInstance('user'); @@ -8,17 +8,55 @@ $helperInstance->prefetchValueInstance('user'); // Add main form group $helperInstance->addFormNote('reality_warning', "WARNUNG: Bitte dieses Formular nicht mit echten Angaben ausfüllen!"); +// Add group for personal data +$helperInstance->addFormGroup('persona_data', "Deine persönliche Daten, die für die Beantragung nötig sind:"); + +// Display email, surname and family name +$helperInstance->addFormNote('surname', "Vorname: ".$helperInstance->getValueField('surname').""); +$helperInstance->addFormNote('family', "Nachname: ".$helperInstance->getValueField('family').""); +$helperInstance->addFormNote('email', "Email-Adresse: ".$helperInstance->getValueField('email').""); +$helperInstance->addFormNote('birthday', "Geburtstag: ".$helperInstance->getValueField('birth_day').".".$helperInstance->getValueField('birth_month').".".$helperInstance->getValueField('birth_year').""); + +// Add link placeholder for profile page +$helperInstance->addFormNote('profile', "Stimmen die Daten noch? {?shipsimu_profile_link?}"); + +// CAPTCHA enabled? +if ($helperInstance->ifFormSecuredWithCaptcha()) { + $helperInstance->addFormGroup('captcha_user', "Die virtuelle Beantragung von Starthilfe ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du die Starthilfe beantragen kannst."); + $helperInstance->addCaptcha(); +} // END - if + +// Ask again for current account password +$helperInstance->addFormGroup('password', "Bitte gebe zur Bestätigung dein derzeitiges Passwort ein."); +$helperInstance->addFieldText('password', "Derzeitiges Passwort:"); +$helperInstance->addInputPasswordField('password'); + +// Final notices +$helperInstance->addFormGroup('buttons', "Sind alle Daten nun korrekt eingegeben? Dann sende sie mit einem Klick einfach ab!"); +$helperInstance->addInputResetButton("Alles nochmal eingeben"); +$helperInstance->addInputSubmitButton("Starthilfe beantragen"); +$helperInstance->addFormNote('data_protection', "Deine Daten werden nach den gültigen Datenschutzgesetzten gespeichert und werden nicht an Dritte weitergegeben. Weiteres dazu siehe Link "Datenschutz"."); + // Flush the finished form $helperInstance->flushContent(); +// Get link helper for profile link +$linkInstance = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'shipsimu_profile_link', 'index.php?app={?app_short_name?}&page=login_area')); + +// Add action +$linkInstance->addActionLinkById('profile', 'goto_profile_link'); + +// Flush the finished form +$linkInstance->flushContent(); + // [EOC] ?>
- Virtuelle Beantragung von Startuphilfe + Virtuelle Beantragung von Starthilfe
- {?shipsimu_startup_form?} + {?shipsimu_goverment_startup?}
diff --git a/application/ship-simu/templates/de/code/action_ship_simu_login_profile.ctp b/application/ship-simu/templates/de/code/action_ship_simu_login_profile.ctp index 6ec1ff2..c55cab7 100644 --- a/application/ship-simu/templates/de/code/action_ship_simu_login_profile.ctp +++ b/application/ship-simu/templates/de/code/action_ship_simu_login_profile.ctp @@ -50,6 +50,16 @@ if ($helperInstance->ifRegisterIncludesPersonaData()) { $helperInstance->addInputTextFieldWithDefault('street'); $helperInstance->addFieldText('city', "Wohnort:"); $helperInstance->addInputTextFieldWithDefault('city'); + + // Include birthday? + if ($helperInstance->ifProfileIncludesBirthDay()) { + $helperInstance->addFormSubGroup('birthday', "Verrate uns doch dein Geburtsdatum, als Dankeschön erhälst du interessante Prämien - ausschliesslich per Email - zum Geburtstag zugesandt! Gültiges Format: TT.MM.JJJJ"); + $helperInstance->addInputTextField('birth_day'); + $helperInstance->addFieldText('birth_day', "."); + $helperInstance->addInputTextField('birth_month'); + $helperInstance->addFieldText('birth_day', "."); + $helperInstance->addInputTextField('birth_year'); + } // END - if } // END - if // Add sub group for zip code @@ -106,7 +116,7 @@ if ($helperInstance->ifRulesHaveChanged()) { // CAPTCHA enabled? if ($helperInstance->ifFormSecuredWithCaptcha()) { - $helperInstance->addFormGroup('captcha_user', "Unser Benuzter-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst."); + $helperInstance->addFormGroup('captcha_user', "Das Ändern von Profildaten ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit deine Änderungen gespeichert werden können."); $helperInstance->addCaptcha(); } // END - if diff --git a/application/ship-simu/templates/de/code/action_ship_simu_login_refill.ctp b/application/ship-simu/templates/de/code/action_ship_simu_login_refill.ctp index 4bca46d..84c29c0 100644 --- a/application/ship-simu/templates/de/code/action_ship_simu_login_refill.ctp +++ b/application/ship-simu/templates/de/code/action_ship_simu_login_refill.ctp @@ -1,6 +1,6 @@ prefetchValueInstance('payments'); @@ -55,6 +55,6 @@ $helperInstance->flushContent(); Jetzt dein {?currency?}-Konto aufladen!
- {?refill_form?} + {?shipsimu_refill?}
diff --git a/application/ship-simu/templates/de/code/login_form.ctp b/application/ship-simu/templates/de/code/login_form.ctp index f493423..560b79f 100644 --- a/application/ship-simu/templates/de/code/login_form.ctp +++ b/application/ship-simu/templates/de/code/login_form.ctp @@ -33,7 +33,7 @@ if ($helperInstance->ifLoginIsEnabled()) { // CAPTCHA enabled? if ($helperInstance->ifFormSecuredWithCaptcha()) { - $helperInstance->addFormGroup('captcha_user', "Unser Benuzter-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst."); + $helperInstance->addFormGroup('captcha_user', "Das Benutzer-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst."); $helperInstance->addCaptcha(); } // END - if diff --git a/application/ship-simu/templates/de/code/register_form.ctp b/application/ship-simu/templates/de/code/register_form.ctp index 5426b38..8fc6549 100644 --- a/application/ship-simu/templates/de/code/register_form.ctp +++ b/application/ship-simu/templates/de/code/register_form.ctp @@ -15,6 +15,7 @@ $helperInstance->addInputPasswordField('pass1'); $helperInstance->addFieldText('pass2', "Passwortwiederholung:"); $helperInstance->addInputPasswordField('pass2'); +// Does this registration require an email? if ($helperInstance->ifRegisterRequiresEmailVerification()) { $helperInstance->addFormGroup('email', "Bitte gebe deine Email zweimal (ein zweites Mal zur Bestätigung) ein, damit wir dir deinen Freischaltlink zusenden können."); $helperInstance->addFieldText('email1', "Email-Adresse:"); @@ -22,12 +23,13 @@ if ($helperInstance->ifRegisterRequiresEmailVerification()) { $helperInstance->addFieldText('email2', "Wiederholung Email-Adresse:"); $helperInstance->addInputTextField('email2'); + // Must the email address be unique in this system? if ($helperInstance->ifEmailMustBeUnique()) { $helperInstance->addFormNote('email', "Die von dir eingegebene Email-Adresse darf nur einmal im Spiel verwendet worden sein."); - } // END - Unique email addresses - -} // END - email verification + } // END - if +} // END - if +// Shall we also ask some personal data to complete the profile? if ($helperInstance->ifRegisterIncludesProfile()) { $helperInstance->addFormGroup('profile', "Hier kannst du zusätzlich deine Profildaten vorweg eingeben, du kannst sie aber auch nach dem Login vervollständigen!"); @@ -35,7 +37,12 @@ if ($helperInstance->ifRegisterIncludesProfile()) { $helperInstance->addFormSubGroup('email', "Die Angabe deiner Email-Adresse ist nur dann nötig, wenn du auch Email-Benachrichtigungen (*1) haben möchtest."); $helperInstance->addFieldText('email1', "Email-Adresse:"); $helperInstance->addInputTextField('email1'); - } // END - No email verification + + // Must the email address be unique in this system? + if ($helperInstance->ifEmailMustBeUnique()) { + $helperInstance->addFormNote('email', "Die von dir eingegebene Email-Adresse darf nur einmal im Spiel verwendet worden sein."); + } // END - if + } // END - if // Persoenliche Daten mit in der Anmeldung abfragen? if ($helperInstance->ifRegisterIncludesPersonaData()) { @@ -48,7 +55,17 @@ if ($helperInstance->ifRegisterIncludesProfile()) { $helperInstance->addInputTextField('street'); $helperInstance->addFieldText('city', "Wohnort:"); $helperInstance->addInputTextField('city'); - } // END - Persona data + + // Include birthday? + if ($helperInstance->ifProfileIncludesBirthDay()) { + $helperInstance->addFormSubGroup('birthday', "Verrate uns doch dein Geburtsdatum, als Dankeschön erhälst du interessante Prämien - ausschliesslich per Email - zum Geburtstag zugesandt! Gültiges Format: TT.MM.JJJJ"); + $helperInstance->addInputTextField('birth_day'); + $helperInstance->addFieldText('birth_day', "."); + $helperInstance->addInputTextField('birth_month'); + $helperInstance->addFieldText('birth_day', "."); + $helperInstance->addInputTextField('birth_year'); + } // END - if + } // END - if $helperInstance->addFormSubGroup('zip', "Magst du uns auch deine Postleitzahl verraten?"); $helperInstance->addFieldText('zip', "Postleitzahl:"); diff --git a/application/shoutbox/templates/de/code/action_shoutbox_login_profile.ctp b/application/shoutbox/templates/de/code/action_shoutbox_login_profile.ctp index 85367c4..dd27e8a 100644 --- a/application/shoutbox/templates/de/code/action_shoutbox_login_profile.ctp +++ b/application/shoutbox/templates/de/code/action_shoutbox_login_profile.ctp @@ -16,7 +16,7 @@ $helper->addFieldText('pass2', "Neues Passwort, Wiederholung:"); $helper->addInputPasswordField('pass2'); // Display current email -$helper->addFormNote('current_email', "Derzeitige Email-Adresse: ".$helper->getValueField('email').""); +$helper->addFormNote('current_email', "Derzeitige Email-Adresse: ".$helper->getValueField('email').""); // Only for changing email address if ($helper->ifEmailChangeAllowed()) { diff --git a/application/shoutbox/templates/de/code/login_form.ctp b/application/shoutbox/templates/de/code/login_form.ctp index f6ca6fb..f3dc1f1 100644 --- a/application/shoutbox/templates/de/code/login_form.ctp +++ b/application/shoutbox/templates/de/code/login_form.ctp @@ -33,7 +33,7 @@ if ($helper->ifLoginIsEnabled()) { // CAPTCHA enabled? if ($helper->ifFormSecuredWithCaptcha()) { - $helper->addFormGroup('captcha_user', "Unser Benuzter-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst."); + $helper->addFormGroup('captcha_user', "Das Benutzer-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst."); $helper->addCaptcha(); } // END - if diff --git a/application/todo/templates/de/code/action_todo_login_profile.ctp b/application/todo/templates/de/code/action_todo_login_profile.ctp index ee4f270..6853ae4 100644 --- a/application/todo/templates/de/code/action_todo_login_profile.ctp +++ b/application/todo/templates/de/code/action_todo_login_profile.ctp @@ -16,7 +16,7 @@ $helper->addFieldText('pass2', "Neues Passwort, Wiederholung:"); $helper->addInputPasswordField('pass2'); // Display current email -$helper->addFormNote('current_email', "Derzeitige Email-Adresse: ".$helper->getValueField('email').""); +$helper->addFormNote('current_email', "Derzeitige Email-Adresse: ".$helper->getValueField('email').""); // Only for changing email address if ($helper->ifEmailChangeAllowed()) { diff --git a/application/todo/templates/de/code/login_form.ctp b/application/todo/templates/de/code/login_form.ctp index 683145b..f9ed480 100644 --- a/application/todo/templates/de/code/login_form.ctp +++ b/application/todo/templates/de/code/login_form.ctp @@ -33,7 +33,7 @@ if ($helper->ifLoginIsEnabled()) { // CAPTCHA enabled? if ($helper->ifFormSecuredWithCaptcha()) { - $helper->addFormGroup('captcha_user', "Unser Benuzter-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst."); + $helper->addFormGroup('captcha_user', "Das Benutzer-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst."); $helper->addCaptcha(); } // END - if diff --git a/inc/classes/main/filter/change/class_EmailChangeFilter.php b/inc/classes/main/filter/change/class_EmailChangeFilter.php index d213a22..276119c 100644 --- a/inc/classes/main/filter/change/class_EmailChangeFilter.php +++ b/inc/classes/main/filter/change/class_EmailChangeFilter.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class EmailChangeFilter extends BaseFrameworkSystem implements Filterable { +class EmailChangeFilter extends BaseFilter implements Filterable { /** * Protected constructor * diff --git a/inc/classes/main/filter/change/class_PasswordChangeFilter.php b/inc/classes/main/filter/change/class_PasswordChangeFilter.php index 5a604fd..d1da065 100644 --- a/inc/classes/main/filter/change/class_PasswordChangeFilter.php +++ b/inc/classes/main/filter/change/class_PasswordChangeFilter.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class PasswordChangeFilter extends BaseFrameworkSystem implements Filterable { +class PasswordChangeFilter extends BaseFilter implements Filterable { /** * Protected constructor * diff --git a/inc/classes/main/filter/class_ b/inc/classes/main/filter/class_ index 4aff513..c249762 100644 --- a/inc/classes/main/filter/class_ +++ b/inc/classes/main/filter/class_ @@ -30,10 +30,6 @@ class ???Filter extends BaseFrameworkSystem implements Filterable { protected function __construct () { // Call parent constructor parent::__construct(__CLASS__); - - // Clean up a little - $this->removeNumberFormaters(); - $this->removeSystemArray(); } /** diff --git a/inc/classes/main/filter/crypto/class_CaptchaEncryptFilter.php b/inc/classes/main/filter/crypto/class_CaptchaEncryptFilter.php index 01774b7..6abe368 100644 --- a/inc/classes/main/filter/crypto/class_CaptchaEncryptFilter.php +++ b/inc/classes/main/filter/crypto/class_CaptchaEncryptFilter.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class CaptchaEncryptFilter extends BaseFrameworkSystem implements Filterable { +class CaptchaEncryptFilter extends BaseFilter implements Filterable { /** * Protected constructor * diff --git a/inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php b/inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php index 2f12e5b..38fb46e 100644 --- a/inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php +++ b/inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php @@ -23,7 +23,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class PaymentDiscoveryFilter extends BaseFrameworkSystem implements Filterable { +class PaymentDiscoveryFilter extends BaseFilter implements Filterable { /** * Action name for payment discovery */ @@ -37,10 +37,6 @@ class PaymentDiscoveryFilter extends BaseFrameworkSystem implements Filterable { protected function __construct () { // Call parent constructor parent::__construct(__CLASS__); - - // Clean up a little - $this->removeNumberFormaters(); - $this->removeSystemArray(); } /** diff --git a/inc/classes/main/filter/update/class_UserStatusConfimedUpdateFilter.php b/inc/classes/main/filter/update/class_UserStatusConfimedUpdateFilter.php index 7e30148..b9ac082 100644 --- a/inc/classes/main/filter/update/class_UserStatusConfimedUpdateFilter.php +++ b/inc/classes/main/filter/update/class_UserStatusConfimedUpdateFilter.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class UserStatusConfimedUpdateFilter extends BaseFrameworkSystem implements Filterable { +class UserStatusConfimedUpdateFilter extends BaseFilter implements Filterable { /** * Protected constructor * diff --git a/inc/classes/main/filter/update/class_UserUpdateFilter.php b/inc/classes/main/filter/update/class_UserUpdateFilter.php index be0c9a8..c55989c 100644 --- a/inc/classes/main/filter/update/class_UserUpdateFilter.php +++ b/inc/classes/main/filter/update/class_UserUpdateFilter.php @@ -22,7 +22,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class UserUpdateFilter extends BaseFrameworkSystem implements Filterable { +class UserUpdateFilter extends BaseFilter implements Filterable { /** * Protected constructor * diff --git a/inc/classes/main/filter/verifier/class_UserStatusVerifierFilter.php b/inc/classes/main/filter/verifier/class_UserStatusVerifierFilter.php index d2d53d8..6722d52 100644 --- a/inc/classes/main/filter/verifier/class_UserStatusVerifierFilter.php +++ b/inc/classes/main/filter/verifier/class_UserStatusVerifierFilter.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class UserStatusVerifierFilter extends BaseFrameworkSystem implements Filterable { +class UserStatusVerifierFilter extends BaseFilter implements Filterable { /** * Protected constructor * diff --git a/inc/classes/main/filter/verifier/class_UserUnconfirmedVerifierFilter.php b/inc/classes/main/filter/verifier/class_UserUnconfirmedVerifierFilter.php index fd5bb60..f2982ed 100644 --- a/inc/classes/main/filter/verifier/class_UserUnconfirmedVerifierFilter.php +++ b/inc/classes/main/filter/verifier/class_UserUnconfirmedVerifierFilter.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class UserUnconfirmedVerifierFilter extends BaseFrameworkSystem implements Filterable { +class UserUnconfirmedVerifierFilter extends BaseFilter implements Filterable { /** * Protected constructor * diff --git a/inc/classes/main/helper/web/class_BaseWebHelper.php b/inc/classes/main/helper/web/class_BaseWebHelper.php index 19b5be3..0da3e0a 100644 --- a/inc/classes/main/helper/web/class_BaseWebHelper.php +++ b/inc/classes/main/helper/web/class_BaseWebHelper.php @@ -64,6 +64,16 @@ class BaseWebHelper extends BaseHelper { return $required; } + /** + * Checks wether for birthday shall be asked + * + * @return $required Wether birthday shall be asked + */ + public function ifProfileIncludesBirthDay () { + $required = ($this->getConfigInstance()->readConfig('profile_includes_birthday') === "Y"); + return $required; + } + /** * Checks wether email addresses can only be once used *