From 8fb8d5ba399ce3233839d3d09faa3268c96ae454 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 28 Jun 2008 19:31:00 +0000 Subject: [PATCH] Missing email template added, updated config and other updated scripts now included --- .gitattributes | 2 ++ application/ship-simu/config.php | 3 ++ .../ship-simu/templates/de/emails/.htaccess | 1 + .../templates/de/emails/text_resend_link.tpl | 28 +++++++++++++++++++ index.php | 24 ++++++++-------- templates/de/code/header.ctp | 2 +- 6 files changed, 47 insertions(+), 13 deletions(-) create mode 100644 application/ship-simu/templates/de/emails/.htaccess create mode 100644 application/ship-simu/templates/de/emails/text_resend_link.tpl diff --git a/.gitattributes b/.gitattributes index 38eab89..5edfb43 100644 --- a/.gitattributes +++ b/.gitattributes @@ -156,6 +156,8 @@ application/ship-simu/templates/de/code/login_main.ctp -text application/ship-simu/templates/de/code/logout_done.ctp -text application/ship-simu/templates/de/code/register_form.ctp -text application/ship-simu/templates/de/code/shipsimu_main.ctp -text +application/ship-simu/templates/de/emails/.htaccess -text +application/ship-simu/templates/de/emails/text_resend_link.tpl -text application/ship-simu/templates/de/html/.htaccess -text application/ship-simu/templates/de/html/nav_advert.tpl -text application/ship-simu/templates/de/html/selector_ship-simu.tpl -text diff --git a/application/ship-simu/config.php b/application/ship-simu/config.php index 1a71aea..52e75e3 100644 --- a/application/ship-simu/config.php +++ b/application/ship-simu/config.php @@ -217,5 +217,8 @@ $cfg->setConfigEntry('company_class', "ShippingCompany"); // CFG: COMPANY-DB-WRAPPER-CLASS $cfg->setConfigEntry('company_db_wrapper_class', "CompanyDatabaseWrapper"); +// CFG EMAIl-TPL-RESEND-LINK +$cfg->setConfigEntry('email_tpl_resend_link', "text"); + // [EOF] ?> diff --git a/application/ship-simu/templates/de/emails/.htaccess b/application/ship-simu/templates/de/emails/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/ship-simu/templates/de/emails/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/ship-simu/templates/de/emails/text_resend_link.tpl b/application/ship-simu/templates/de/emails/text_resend_link.tpl new file mode 100644 index 0000000..aae1ddc --- /dev/null +++ b/application/ship-simu/templates/de/emails/text_resend_link.tpl @@ -0,0 +1,28 @@ + + + + + + + html_entity_decode + + diff --git a/index.php b/index.php index 9986c91..9d61748 100644 --- a/index.php +++ b/index.php @@ -83,7 +83,7 @@ class ApplicationEntryPoint { // Use the template engine for putting out (nicer look) the message try { // Get the template instance from our object factory - $tplEngine = ObjectFactory::createObjectByName($tpl, array(FrameworkConfiguration::getInstance()->readConfig('tpl_base_path'), $lang, $io)); + $templateInstance = ObjectFactory::createObjectByName($tpl, array(FrameworkConfiguration::getInstance()->readConfig('tpl_base_path'), $lang, $io)); } catch (FrameworkException $e) { die(sprintf("[Main:] Could not initialize template engine for reason: %s", $e->getMessage() @@ -101,25 +101,25 @@ class ApplicationEntryPoint { } // END - foreach // Assign variables - $tplEngine->assignVariable('message', $message); - $tplEngine->assignVariable('code', $code); - $tplEngine->assignVariable('extra', $extraData); - $tplEngine->assignVariable('backtrace', $backtrace); - $tplEngine->assignVariable('total_includes', ClassLoader::getInstance()->getTotal()); - $tplEngine->assignVariable('total_objects', ObjectFactory::getTotal()); - $tplEngine->assignVariable('title', $lang->getMessage('emergency_exit_title')); + $templateInstance->assignVariable('message', $message); + $templateInstance->assignVariable('code', $code); + $templateInstance->assignVariable('extra', $extraData); + $templateInstance->assignVariable('backtrace', $backtrace); + $templateInstance->assignVariable('total_includes', ClassLoader::getInstance()->getTotal()); + $templateInstance->assignVariable('total_objects', ObjectFactory::getTotal()); + $templateInstance->assignVariable('title', $lang->getMessage('emergency_exit_title')); // Load the template - $tplEngine->loadCodeTemplate('emergency_exit'); + $templateInstance->loadCodeTemplate('emergency_exit'); // Compile the template - $tplEngine->compileTemplate(); + $templateInstance->compileTemplate(); // Compile all variables - $tplEngine->compileVariables(); + $templateInstance->compileVariables(); // Transfer data to response - $tplEngine->transferToResponse($responseInstance); + $templateInstance->transferToResponse($responseInstance); // Flush the response $responseInstance->flushBuffer(); diff --git a/templates/de/code/header.ctp b/templates/de/code/header.ctp index 2561392..7da5dba 100644 --- a/templates/de/code/header.ctp +++ b/templates/de/code/header.ctp @@ -2,7 +2,7 @@ - $content[title] + {?title?} -- 2.39.5