Browse Source

Initialer Commit in GIT

master 3.1.0
Carsten Götzinger 8 years ago
parent
commit
edb41e47b2
  1. 58
      AeoCE.php
  2. 241
      AeoHybrid.php
  3. 84
      AeoJavaScript.php
  4. 62
      AeoModule.php
  5. 64
      PageRoot_Aeo.php
  6. 7
      config/autoload.ini
  7. 48
      config/autoload.php
  8. 54
      config/config.php
  9. 29
      config/database.sql
  10. 112
      dca/tl_content.php
  11. 117
      dca/tl_module.php
  12. 245
      dca/tl_settings.php
  13. 56
      languages/de/default.php
  14. 36
      languages/de/modules.php
  15. 43
      languages/de/tl_content.php
  16. 43
      languages/de/tl_module.php
  17. 60
      languages/de/tl_settings.php
  18. 56
      languages/en/default.php
  19. 36
      languages/en/modules.php
  20. 43
      languages/en/tl_content.php
  21. 43
      languages/en/tl_module.php
  22. 60
      languages/en/tl_settings.php
  23. 7
      public/.htaccess
  24. 393
      public/js/aeo.js
  25. 75
      public/js/onReadyAeo.js
  26. 35
      templates/aeo_default_no_js.html5
  27. 35
      templates/aeo_default_no_js.xhtml
  28. 23
      templates/js_aeo_deobfuscate.html5
  29. 23
      templates/js_aeo_deobfuscate.xhtml
  30. 632
      util/AeoFrontendUtil.php
  31. 228
      util/AeoRedirectUtil.php
  32. 108
      util/AeoUtil.php

58
AeoCE.php

@ -0,0 +1,58 @@
<?php
/**
* Contao Open Source CMS
* Copyright (C) 2005-2011 Leo Feyer
*
* Formerly known as TYPOlight Open Source CMS.
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program. If not, please visit the Free
* Software Foundation website at <http://www.gnu.org/licenses/>.
*
* PHP version 5
* @copyright cgo IT, 2012-2013
* @author Carsten Götzinger (info@cgo-it.de)
* @package aeo
* @license GNU/LGPL
* @filesource
*/
namespace cgoIT\aeo;
/**
* Class AeoModule
*/
class AeoCE extends AeoHybrid {
/**
* Key
* @var string
*/
protected $strKey = 'id';
/**
* Table
* @var string
*/
protected $strTable = 'tl_content';
/**
* Initialize the object
* @param array
*/
public function __construct($objElement, $strColumn='main') {
parent::__construct($objElement, $strColumn);
}
}
?>

241
AeoHybrid.php

@ -0,0 +1,241 @@
<?php
/**
* Contao Open Source CMS
* Copyright (C) 2005-2011 Leo Feyer
*
* Formerly known as TYPOlight Open Source CMS.
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program. If not, please visit the Free
* Software Foundation website at <http://www.gnu.org/licenses/>.
*
* PHP version 5
* @copyright cgo IT, 2012-2013
* @author Carsten Götzinger (info@cgo-it.de)
* @package aeo
* @license GNU/LGPL
* @filesource
*/
namespace cgoIT\aeo;
/**
* Class AeoModule
*/
class AeoHybrid extends \Hybrid
{
/**
* Primary key
* @var string
*/
protected $strPk = 'id';
/**
* Template
* @var string
*/
protected $strTemplate = 'aeo_default_no_js';
/**
* Use additional ROT13 encryption, default is 1
* @var int
*/
protected $use_rot_13 = 1;
/**
* Show standard-info to frontend user, default is true
* @var int
*/
protected $show_standard_info = true;
/**
* custom info to frontend user, default is ''
* @var int
*/
protected $info = '';
protected $objCaptcha;
/**
* Initialize the object
* @param array
*/
public function __construct($objElement, $strColumn='main') {
parent::__construct($objElement, $strColumn);
}
/**
* Display a wildcard in the back end
* @return string
*/
public function generate()
{
global $objPage;
$GLOBALS['TL_LANGUAGE'] = $objPage->language;
if (TL_MODE == 'BE')
{
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### AEO JavaScript Fallback ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;
return $objTemplate->parse();
}
$this->use_rot_13 = $GLOBALS['TL_CONFIG']['aeo_use_rot_13'] === true;
// Fallback auf default template
$strTemplate = deserialize($this->getParent()->aeo_custom_template, true);
if (!is_array($strTemplate) || count($strTemplate) < 1) {
$this->strTemplate = 'aeo_default_no_js';
} else {
$this->strTemplate = $strTemplate[0];
}
// Default Info für Frontend-User anzeigen
$numShowInfo = deserialize($this->getParent()->aeo_show_info, true);
if (is_array($numShowInfo) && count($numShowInfo) >= 1) {
$this->show_standard_info = $numShowInfo[0];
} else {
$this->show_standard_info = false;
}
// Eigene Info für Frontend-User anzeigen
$strInfo = deserialize($this->getParent()->aeo_info_text, true);
if (is_array($strInfo) && count($strInfo) >= 1) {
$this->info = $strInfo[0];
}
if (strlen($this->info) == 0) {
$this->show_standard_info = true;
}
return parent::generate();
}
/**
* Generate the module
*/
protected function compile()
{
global $objPage;
$GLOBALS['TL_LANGUAGE'] = $objPage->language;
$this->loadLanguageFile('default');
// Auf E-Mail-Adresse weiterleiten
$this->Template = new \FrontendTemplate($this->strTemplate);
if ($this->getParent() instanceof \ModuleModel) {
$this->Template->setData($this->getParent()->row());
// Überschrift setzen
$arrHeadline = deserialize($this->getParent()->headline);
if (is_array($arrHeadline)) {
$this->Template->hl = $arrHeadline['unit'];
$this->Template->headline = $arrHeadline['value'];
}
} else {
$this->Template->setData($this->arrData);
}
$doSubmit = true;
$arrCaptcha = array
(
'id' => 'aeo',
'label' => $GLOBALS['TL_LANG']['MSC']['securityQuestion'],
'type' => 'captcha',
'mandatory' => true,
'required' => true,
'tableless' => true
);
$strClass = $GLOBALS['TL_FFL']['captcha'];
// Fallback auf Default Captcha, falls Klasse nicht existiert
if (!$this->classFileExists($strClass))
{
$strClass = '\\FormCaptcha';
}
$objCaptcha = new $strClass($arrCaptcha);
$this->objCaptcha = $objCaptcha;
if ($this->Input->post('FORM_SUBMIT') == 'tl_aeo') {
$this->objCaptcha->validate();
if ($this->objCaptcha->hasErrors()) {
$doSubmit = false;
}
}
$objResult = $this->Database->prepare("SELECT * FROM tl_page WHERE id=?")
->limit(1)
->execute($this->Input->get('p'))
->fetchAssoc();
$pageDetails = $this->getPageDetails($objResult['id']);
$backLink = $this->generateFrontendUrl($objResult);
/**
* Template variables
*/
$this->import('String');
$this->Template->action = $this->getIndexFreeRequest();
$this->Template->n = $this->Input->get('n');
$this->Template->d = $this->Input->get('d');
$this->Template->t = $this->Input->get('t');
$this->Template->p = $this->Input->get('param');
$this->Template->captcha = $this->objCaptcha;
$this->Template->captchaDetails = $GLOBALS['TL_LANG']['MSC']['securityQuestion'];
if ($this->show_standard_info) {
$this->Template->info = $GLOBALS['TL_LANG']['aeo']['info'];
} else {
$this->Template->info = $this->info;
}
$this->Template->formId = 'tl_aeo';
$this->Template->buttonLabel = $GLOBALS['TL_LANG']['aeo']['buttonLabel'];
$this->Template->backLink = $backLink;
$this->Template->backLabel = $GLOBALS['TL_LANG']['MSC']['goBack'];
if ($this->Input->post('FORM_SUBMIT') == 'tl_aeo' && $doSubmit) {
if ($this->use_rot_13) {
$email = strip_tags(str_rot13($this->Input->post('n')).'@'.str_rot13($this->Input->post('d')).'.'.str_rot13($this->Input->post('t')));
} else {
$email = strip_tags($this->Input->post('n').'@'.$this->Input->post('d').'.'.$this->Input->post('t'));
}
if ($this->Input->post('p')) {
$email .= $this->String->decodeEntities(base64_decode($this->String->decodeEntities($this->Input->post('p'))));
}
$this->Template->isHuman = true;
$this->Template->success = sprintf($GLOBALS['TL_LANG']['aeo']['success'], $this->String->encodeEmail($email), $this->String->encodeEmail(preg_replace('/\?.*$/', '', $email)));
if (!headers_sent()) {
header('HTTP/1.1 303 See Other');
header('Location: mailto:'.$email);
}
else {
die('<html><head><meta http-equiv="refresh" content="0; url=mailto:'.$email.'"></head><body></body></html>');
}
}
}
}
?>

84
AeoJavaScript.php

@ -0,0 +1,84 @@
<?php
/**
* Contao Open Source CMS
* Copyright (C) 2005-2011 Leo Feyer
*
* Formerly known as TYPOlight Open Source CMS.
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program. If not, please visit the Free
* Software Foundation website at <http://www.gnu.org/licenses/>.
*
* PHP version 5
* @copyright cgo IT, 2012-2013
* @author Carsten Götzinger (info@cgo-it.de)
* @package aeo
* @license GNU/LGPL
* @filesource
*/
namespace cgoIT\aeo;
/**
* Class AeoJavaScript
*/
class AeoJavaScript
{
/**
* Current object instance (Singleton)
* @var Cache
*/
protected static $objInstance;
/**
* Template
* @var string
*/
protected static $strTemplate = 'js_aeo_deobfuscate';
/**
* Prevent direct instantiation (Singleton)
*/
protected function __construct() {}
/**
* Prevent cloning of the object (Singleton)
*/
final private function __clone() {}
public function getContent($folder, $rot13 = true) {
$Template = new \FrontendTemplate(self::$strTemplate);
$Template->rot13 = $rot13;
$Template->folder = $folder;
$Template->tooltip_js_on = $GLOBALS['TL_LANG']['aeo']['tooltip_js'];
$Template->tooltip_js_off = $GLOBALS['TL_LANG']['aeo']['tooltip_no_js'];
return $Template->parse();
}
/**
* Instantiate a new cache object and return it (Factory)
* @return Cache
*/
public static function getInstance() {
if (!is_object(self::$objInstance)) {
self::$objInstance = new self();
}
return self::$objInstance;
}
}
?>

62
AeoModule.php

@ -0,0 +1,62 @@
<?php
/**
* Contao Open Source CMS
* Copyright (C) 2005-2011 Leo Feyer
*
* Formerly known as TYPOlight Open Source CMS.
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program. If not, please visit the Free
* Software Foundation website at <http://www.gnu.org/licenses/>.
*
* PHP version 5
* @copyright cgo IT, 2012-2013
* @author Carsten Götzinger (info@cgo-it.de)
* @package aeo
* @license GNU/LGPL
* @filesource
*/
namespace cgoIT\aeo;
/**
* Class AeoModule
*/
class AeoModule extends AeoHybrid {
/**
* Key
* @var string
*/
protected $strKey = 'module';
/**
* Table
* @var string
*/
protected $strTable = 'tl_module';
/**
* Initialize the object
* @param array
*/
public function __construct($objElement, $strColumn='main') {
parent::__construct($objElement, $strColumn);
}
protected function getType() {
return 'module';
}
}
?>

64
PageRoot_Aeo.php

@ -0,0 +1,64 @@
<?php
/**
* Contao Open Source CMS
* Copyright (C) 2005-2011 Leo Feyer
*
* Formerly known as TYPOlight Open Source CMS.
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program. If not, please visit the Free
* Software Foundation website at <http://www.gnu.org/licenses/>.
*
* PHP version 5
* @copyright cgo IT, 2012-2013
* @author Carsten Götzinger (info@cgo-it.de)
* @package aeo
* @license GNU/LGPL
* @filesource
*/
namespace cgoIT\aeo;
/**
* Class PageRoot_Aeo
*/
class PageRoot_Aeo extends \PageRoot {
/**
* Referenz auf AeoRedirectUtil
* @var AeoRedirectUtil
*/
public function __construct() {
parent::__construct();
$this->import('\\Database', 'Database');
$this->import('aeo\\AeoRedirectUtil', 'AeoRedirectUtil');
}
/**
* Redirect to the first active regular page
* @param integer
* @param boolean
* @return integer
*/
public function generate($pageId, $blnReturn=false) {
$id = $this->AeoRedirectUtil->redirectFromRootPage();
if ($id !== FALSE) {
return $id;
} else {
return parent::generate($pageId, $blnReturn);
}
}
}
?>

7
config/autoload.ini

@ -0,0 +1,7 @@
;;
; Configure what you want the autoload creator to register
;;
register_namespaces = true
register_classes = true
register_templates = true

48
config/autoload.php

@ -0,0 +1,48 @@
<?php
/**
* Contao Open Source CMS
*
* Copyright (C) 2005-2013 Leo Feyer
*
* @package Zaeo
* @link http://contao.org
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
*/
/**
* Register the namespaces
*/
ClassLoader::addNamespaces(array
(
'cgoIT',
));
/**
* Register the classes
*/
ClassLoader::addClasses(array
(
'cgoIT\aeo\AeoJavaScript' => 'system/modules/zaeo/AeoJavaScript.php',
'cgoIT\aeo\AeoHybrid' => 'system/modules/zaeo/AeoHybrid.php',
'cgoIT\aeo\AeoCE' => 'system/modules/zaeo/AeoCE.php',
'cgoIT\aeo\AeoModule' => 'system/modules/zaeo/AeoModule.php',
'cgoIT\aeo\PageRoot_Aeo' => 'system/modules/zaeo/PageRoot_Aeo.php',
// Util
'cgoIT\aeo\AeoFrontendUtil' => 'system/modules/zaeo/util/AeoFrontendUtil.php',
'cgoIT\aeo\AeoRedirectUtil' => 'system/modules/zaeo/util/AeoRedirectUtil.php',
'cgoIT\aeo\AeoUtil' => 'system/modules/zaeo/util/AeoUtil.php',
'cgoIT\aeo\McwPageTree' => 'system/modules/zaeo/widgets/McwPageTree.php',
));
/**
* Register the templates
*/
TemplateLoader::addFiles(array
(
'aeo_default_no_js' => 'system/modules/zaeo/templates',
'js_aeo_deobfuscate' => 'system/modules/zaeo/templates',
));

54
config/config.php

@ -0,0 +1,54 @@
<?php if (!defined('TL_ROOT')) die('You can not access this file directly!');
/**
* Contao Open Source CMS
* Copyright (C) 2005-2011 Leo Feyer
*
* Formerly known as TYPOlight Open Source CMS.
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program. If not, please visit the Free
* Software Foundation website at <http://www.gnu.org/licenses/>.
*
* PHP version 5
* @copyright cgo IT, 2012-2013
* @author Carsten Götzinger (info@cgo-it.de)
* @package aeo
* @license GNU/LGPL
* @filesource
*/
/**
* Hooks
*/
$GLOBALS['TL_HOOKS']['getFrontendModule'][] = array('aeo\\AeoFrontendUtil', 'aeoGetFrontendModule');
$GLOBALS['TL_HOOKS']['getContentElement'][] = array('aeo\\AeoFrontendUtil', 'aeoGetContentElement');
$GLOBALS['TL_HOOKS']['outputFrontendTemplate'][] = array('aeo\\AeoFrontendUtil', 'obfuscateEmails');
$GLOBALS['TL_HOOKS']['getPageIdFromUrl'][] = array('aeo\\AeoRedirectUtil', 'getRedirectPageAeo');
/**
* frontend moduls
*/
$GLOBALS['FE_MOD']['application']['aeo'] = 'aeo\\AeoModule';
/**
* content elements
*/
$GLOBALS['TL_CTE']['includes']['aeo'] = 'aeo\\AeoCE';
/**
* PageTypes
*/
$GLOBALS['TL_PTY']['root'] = 'aeo\\PageRoot_Aeo';
?>

29
config/database.sql

@ -0,0 +1,29 @@
-- **********************************************************
-- * *
-- * IMPORTANT NOTE *
-- * *
-- * Do not import this file manually but use the TYPOlight *
-- * install tool to create and maintain database tables! *
-- * *
-- **********************************************************
--
-- Table `tl_module`
--
CREATE TABLE `tl_module` (
`aeo_custom_template` varchar(32) NOT NULL default '',
`aeo_show_info` char(1) NOT NULL default '',
`aeo_info_text` mediumtext NULL,
`aeo_disable` char(1) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Table `tl_content`
--
CREATE TABLE `tl_content` (
`aeo_custom_template` varchar(32) NOT NULL default '',
`aeo_show_info` char(1) NOT NULL default '',
`aeo_info_text` mediumtext NULL,
`aeo_disable` char(1) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

112
dca/tl_content.php

@ -0,0 +1,112 @@
<?php
/**
* Contao Open Source CMS
* Copyright (C) 2005-2011 Leo Feyer
*
* Formerly known as TYPOlight Open Source CMS.
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program. If not, please visit the Free
* Software Foundation website at <http://www.gnu.org/licenses/>.
*
* PHP version 5
* @copyright cgo IT, 2012-2013
* @author Carsten Götzinger (info@cgo-it.de)
* @package aeo
* @license GNU/LGPL
* @filesource
*/
/**
* palettes
*/
$GLOBALS['TL_DCA']['tl_content']['palettes']['aeo'] = '{type_legend},type,headline;{aeo_legend},aeo_show_info,aeo_info_text,aeo_disable;{template_legend:hide},aeo_custom_template;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space';
/**
* extend existing expert_legend
*/
foreach ($GLOBALS['TL_DCA']['tl_content']['palettes'] as $key => $palette) {
if (!is_array($palette) && $key != 'aeo') {
$GLOBALS['TL_DCA']['tl_content']['palettes'][$key] = $palette.';{aeo_legend:hide},aeo_disable';
}
}
/**
* fields
*/
$GLOBALS['TL_DCA']['tl_content']['fields']['aeo_custom_template'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_content']['aeo_custom_template'],
'default' => 'aeo_default_no_js',
'exclude' => true,
'inputType' => 'select',
'options_callback' => array('tl_content_aeo', 'getAeoTemplates'),
'eval' => array('tl_class'=>'w50')
);
$GLOBALS['TL_DCA']['tl_content']['fields']['aeo_show_info'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_content']['aeo_show_info'],
'exclude' => true,
'filter' => true,
'search' => false,
'inputType' => 'checkbox',
'eval' => array('tl_class'=>'w50')
);
$GLOBALS['TL_DCA']['tl_content']['fields']['aeo_info_text'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_content']['aeo_info_text'],
'exclude' => true,
'filter' => true,
'search' => true,
'inputType' => 'textarea',
'eval' => array('rte'=>'tinyMCE', 'tl_class'=>'clr')
);
$GLOBALS['TL_DCA']['tl_content']['fields']['aeo_disable'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_content']['aeo_disable'],
'default' => '',
'exclude' => true,
'filter' => true,
'search' => false,
'inputType' => 'checkbox',
'eval' => array('tl_class'=>'long')
);
/**
* Class tl_content_aeo
*/
class tl_content_aeo extends \Backend
{
/**
* Return all navigation templates as array
* @param DataContainer
* @return array
*/
public function getAeoTemplates(\DataContainer $dc)
{
$intPid = $dc->activeRecord->pid;
if ($this->Input->get('act') == 'overrideAll')
{
$intPid = $this->Input->get('id');
}
return $this->getTemplateGroup('aeo_', $intPid);
}
}
?>

117
dca/tl_module.php

@ -0,0 +1,117 @@
<?php
/**
* Contao Open Source CMS
* Copyright (C) 2005-2011 Leo Feyer
*
* Formerly known as TYPOlight Open Source CMS.
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program. If not, please visit the Free
* Software Foundation website at <http://www.gnu.org/licenses/>.
*
* PHP version 5
* @copyright cgo IT, 2012-2013
* @author Carsten Götzinger (info@cgo-it.de)
* @package aeo
* @license GNU/LGPL
* @filesource
*/
/**
* palettes
*/
$GLOBALS['TL_DCA']['tl_module']['palettes']['aeo'] = '{title_legend},name,headline,type;{aeo_legend},aeo_show_info,aeo_info_text,aeo_disable;{template_legend:hide},aeo_custom_template;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space';
/**
* extend existing expert_legend
*/
foreach ($GLOBALS['TL_DCA']['tl_module']['palettes'] as $key => $palette) {
if (!is_array($palette) && $key != 'aeo') {
$GLOBALS['TL_DCA']['tl_module']['palettes'][$key] = $palette.';{aeo_legend:hide},aeo_disable';
}
}
//foreach ($GLOBALS['TL_DCA']['tl_module']['palettes'] as $key => $palette) {
// if (!is_array($palette)) {
// print "<h1>$key => $palette </h1>\n";
// }
//}
/**
* fields
*/
$GLOBALS['TL_DCA']['tl_module']['fields']['aeo_custom_template'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_module']['aeo_custom_template'],
'default' => 'aeo_default_no_js',
'exclude' => true,
'inputType' => 'select',
'options_callback' => array('tl_module_aeo', 'getAeoTemplates'),
'eval' => array('tl_class'=>'w50')
);
$GLOBALS['TL_DCA']['tl_module']['fields']['aeo_show_info'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_module']['aeo_show_info'],
'exclude' => true,
'filter' => true,
'search' => false,
'inputType' => 'checkbox',
'eval' => array('tl_class'=>'w50')
);
$GLOBALS['TL_DCA']['tl_module']['fields']['aeo_info_text'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_module']['aeo_info_text'],
'exclude' => true,
'filter' => true,
'search' => true,
'inputType' => 'textarea',
'eval' => array('rte'=>'tinyMCE', 'tl_class'=>'clr')
);
$GLOBALS['TL_DCA']['tl_module']['fields']['aeo_disable'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_module']['aeo_disable'],
'default' => '',
'exclude' => true,
'filter' => true,
'search' => false,
'inputType' => 'checkbox',
'eval' => array('tl_class'=>'long')
);
/**
* Class tl_module_aeo
*/
class tl_module_aeo extends \Backend
{
/**
* Return all navigation templates as array
* @param DataContainer
* @return array
*/
public function getAeoTemplates(\DataContainer $dc)
{
$intPid = $dc->activeRecord->pid;
if ($this->Input->get('act') == 'overrideAll')
{
$intPid = $this->Input->get('id');
}
return $this->getTemplateGroup('aeo_', $intPid);
}
}
?>

245
dca/tl_settings.php

@ -0,0 +1,245 @@
<?php
/**
* Contao Open Source CMS
* Copyright (C) 2005-2011 Leo Feyer
*
* Formerly known as TYPOlight Open Source CMS.
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program. If not, please visit the Free
* Software Foundation website at <http://www.gnu.org/licenses/>.
*
* PHP version 5
* @copyright cgo IT, 2012-2013
* @author Carsten Götzinger (info@cgo-it.de)
* @package aeo
* @license GNU/LGPL
* @filesource
*/
/**
* palettes
*/
$GLOBALS['TL_DCA']['tl_settings']['palettes']['__selector__'][] = 'aeo_replace_standard_obfuscation';
$GLOBALS['TL_DCA']['tl_settings']['palettes']['default'] .= ';{aeo_legend:hide},aeo_replace_standard_obfuscation';
/**
* Add subpalettes to tl_settings
*/
$GLOBALS['TL_DCA']['tl_settings']['subpalettes']['aeo_replace_standard_obfuscation'] = 'aeo_use_rot_13,aeo_obfuscation_method,aeo_virtual_path,aeo_jump_to_no_js';
/**
* fields
*/
$GLOBALS['TL_DCA']['tl_settings']['fields']['aeo_replace_standard_obfuscation'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_settings']['aeo_replace_standard_obfuscation'],
'default' => '',
'exclude' => true,
'inputType' => 'checkbox',
'eval' => array('tl_class'=>'w50', 'submitOnChange'=>true)
);
$GLOBALS['TL_DCA']['tl_settings']['fields']['aeo_use_rot_13'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_settings']['aeo_use_rot_13'],
'default' => '',
'exclude' => true,
'inputType' => 'checkbox',
'eval' => array('tl_class'=>'w50')
);
$GLOBALS['TL_DCA']['tl_settings']['fields']['aeo_virtual_path'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_settings']['aeo_virtual_path'],
'default' => '',
'exclude' => true,
'inputType' => 'text',
'eval' => array('decodeEntities'=>true, 'mandatory'=>true, 'tl_class'=>'w50', 'trailingSlash'=>false)
);
$GLOBALS['TL_DCA']['tl_settings']['fields']['aeo_obfuscation_method'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_settings']['aeo_obfuscation_method'],
'default' => 'shorten',
'exclude' => true,
'inputType' => 'select',
'options' => array('shorten', 'rtl', 'nullspan'),
'reference' => &$GLOBALS['TL_LANG']['tl_settings'],
'eval' => array('helpwizard'=>true, 'mandatory'=>true, 'tl_class'=>'w50')
);
$GLOBALS['TL_DCA']['tl_settings']['fields']['aeo_jump_to_no_js'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_settings']['aeo_jump_to_no_js'],
'exclude' => true,
'inputType' => 'multiColumnWizard',
'save_callback' => array(
array("tl_settings_aeo", "checkForDuplicateOrNoLanguageFallback"),
array("tl_settings_aeo", "checkForDuplicateLanguage"),
array("tl_settings_aeo", "checkForModuleOrCE")
),
'eval' => array(
'style' => 'width:100%;',
'tl_class' => 'clr',
'columnFields' => array(
'aeo_language_fallback' => array(
'label' => &$GLOBALS['TL_LANG']['tl_settings']['aeo_language_fallback'],
'default' => '',
'exclude' => true,
'inputType' => 'checkbox',
'eval' => array(doNotCopy => true, multiple => false, 'tl_class' => 'm12', 'style' => 'width:50px; padding-bottom: 3px;', 'includeBlankOption' => true),
),
'aeo_language' => array(
'label' => &$GLOBALS['TL_LANG']['tl_settings']['aeo_language'],
'exclude' => true,
'inputType' => 'select',
'options_callback' => array("tl_settings_aeo", "getAvailableLanguages"),
'eval' => array(doNotCopy => true, 'mandatory' => true, 'tl_class' => 'm12', 'style' => 'width:210px; padding-bottom: 3px; margin-top: 3px;', 'includeBlankOption' => true),
),
'aeo_redirecturl' => array(
'label' => &$GLOBALS['TL_LANG']['tl_settings']['aeo_redirecturl'],
'exclude' => true,
'inputType' => 'pageTree',
'eval' => array('mandatory' => true, 'fieldType' => 'radio', 'tl_class' => 'clr'),
'foreignKey' => 'tl_page.title',
'sql' => "int(10) unsigned NOT NULL default '0'",
'relation' => array('type'=>'hasOne', 'load'=>'lazy')
)
)
)
);
class tl_settings_aeo extends \Backend
{
/**
* Alle unterschiedlichen Seitensprachen suchen und zurückgeben
*
* @return array
*/
public function getAvailableLanguages() {
$this->loadLanguageFile('languages');
include(TL_ROOT . '/system/config/languages.php');
$arrReturn = array();
$arrLanguages = array();
$objResult = $this->Database->prepare("SELECT DISTINCT language FROM tl_page WHERE type = 'root'")->execute()->fetchAllAssoc();
foreach (array_values($objResult) as $value) {
array_push($arrLanguages, strtolower($value['language']));
}
if (in_array('i18nl10n', $this->Config->getActiveModules())) {
$languages = deserialize($GLOBALS['TL_CONFIG']['i18nl10n_languages']);
foreach ($languages as $language) {
array_push($arrLanguages, strtolower($language));
}
$arrLanguages = array_unique($arrLanguages);
}
foreach ($arrLanguages as $language) {
$arrReturn[$language] = strlen($GLOBALS['TL_LANG']['LNG'][$language]) ?
utf8_romanize($GLOBALS['TL_LANG']['LNG'][$language]).' ('.strtoupper($language).')' : strtoupper($language);
}
return $arrReturn;
}
public function checkForDuplicateOrNoLanguageFallback($varVal, \DataContainer $dc) {
$arrValue = deserialize($varVal);
$count = 0;
foreach ($arrValue as $key => $value) {
if ($value['aeo_language_fallback']) {
$count++;
}
if ($count > 1) {
$_SESSION["TL_ERROR"][] = sprintf($GLOBALS['TL_LANG']['aeo']['aeo_error_duplicate'], $GLOBALS['TL_LANG']['tl_settings']['aeo_language_fallback'][0]);
}
}
if ($count == 0) {
$_SESSION["TL_ERROR"][] = sprintf($GLOBALS['TL_LANG']['ERR']['mandatory'], $GLOBALS['TL_LANG']['tl_settings']['aeo_language_fallback'][0]);
}
return serialize($arrValue);
}
/**
* Prüfen, ob eine Sprache zwei mal gewählt wurde
*
* @param string $varVal
* @param DataContainer $dc
* @return string
*/
public function checkForDuplicateLanguage($varVal, \DataContainer $dc) {
$arrValue = deserialize($varVal);
$arrValueFound = array();
foreach ($arrValue as $key => $value) {
if (in_array($value["aeo_language"], $arrValueFound)) {
$_SESSION["TL_ERROR"][] = sprintf($GLOBALS['TL_LANG']['aeo']['aeo_error_duplicate'], $GLOBALS['TL_LANG']['tl_settings']['aeo_language'][0]);
}
else {
$arrValueFound[] = $value["aeo_language"];
}
}
return serialize($arrValue);
}
/**
* Prüfen, ob die Weiterleitungsseiten alle das Modul oder CE
* "AEO" beinhalten.
*
* @param string $varVal
* @param DataContainer $dc
* @return string
*/
public function checkForModuleOrCE($varVal, \DataContainer $dc) {
$this->import('\\Database', 'Database');
$this->import('aeo\\AeoUtil', 'AeoUtil');
$arrValue = deserialize($varVal);
foreach ($arrValue as $key => $value) {
$objResult = $this->Database->prepare("SELECT count(*) as anzahl FROM tl_page p, tl_article a, tl_content c LEFT JOIN tl_module m ON c.module = m.id
WHERE p.id = a.pid AND a.id = c.pid AND c.invisible <> 1 AND
( m.type = 'aeo' OR c.type = 'aeo' ) AND p.id = ?")->limit(1)->execute($value["aeo_redirecturl"]);
if (($objResult->anzahl) == 0) {
$_SESSION["TL_ERROR"][] = &$GLOBALS['TL_LANG']['aeo']['aeo_error_redirect'];
}
}
return serialize($arrValue);
}
public function getUserFullName() {
$this->import('jicw\\JICWHelper', 'JICWHelper');
return $this->JICWHelper->getUserFullName();
}
public function getUserEmail() {
$this->import('jicw\\JICWHelper', 'JICWHelper');
return $this->JICWHelper->getUserEmail();
}
public function getInstalledModules() {
$this->import('jicw\\JICWHelper', 'JICWHelper');
return $this->JICWHelper->getInstalledModules();
}
}
?>

56
languages/de/default.php

@ -0,0 +1,56 @@
<?php if (!defined('TL_ROOT')) die('You can not access this file directly!');
/**
* Contao Open Source CMS
* Copyright (C) 2005-2011 Leo Feyer
*
* Formerly known as TYPOlight Open Source CMS.
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program. If not, please visit the Free
* Software Foundation website at <http://www.gnu.org/licenses/>.
*
* PHP version 5
* @copyright cgo IT, 2012-2013
* @author Carsten Götzinger (info@cgo-it.de)
* @package aeo
* @license GNU/LGPL
* @filesource
*/
/**
* front end modules
*/
$GLOBALS['TL_LANG']['FMD']['aeo'] = array('Advanced eMail Obfuscation', 'Erzeugt ein Formular zur Entschlüsselung von E-Mail-Adressen Frontend-Benutzer ohne JavaScript.');
/**
* content Elements
*/
$GLOBALS['TL_LANG']['CTE']['aeo'] = array('Advanced eMail Obfuscation', 'Erzeugt ein Formular zur Entschlüsselung von E-Mail-Adressen Frontend-Benutzer ohne JavaScript.');
/**
* errors
*/
$GLOBALS['TL_LANG']['aeo']['aeo_error_duplicate'] = 'Advanced eMail Obfuscation: Es sind Einträge im Feld %s doppelt vorhanden.';
$GLOBALS['TL_LANG']['aeo']['aeo_error_redirect'] = 'Advanced eMail Obfuscation: Bitte achten Sie darauf, dass alle Weiterleitungsseiten ein Modul oder Inhaltselement vom Typ "Advanced eMail Obfuscation" enthalten.';
/**
* others
*/
$GLOBALS['TL_LANG']['aeo']['tooltip_no_js'] = 'Da Sie JavaScript deaktiviert haben müssen sie eine einfache Frage beantworten, um ihr E-Mail-Programm automatisch zu öffnen.';
$GLOBALS['TL_LANG']['aeo']['tooltip_js'] = 'E-Mail senden';
$GLOBALS['TL_LANG']['aeo']['buttonLabel'] = 'E-Mail-Programm öffnen';
$GLOBALS['TL_LANG']['aeo']['info'] = '<h2>Warum muss ich diese Frage beantworten?</h2><p>Das Ziel dieser Überprüfung ist es, den Inhaber der angegebenen E-Mail-Adresse vor dem Empfang von unerwünschten E-Mails zu schützen.</p><p>Da Sie kein JavaScript aktiviert haben, überprüfen wir durch diese Sicherheitsfrage, ob Sie wirklich ein Mensch sind. Mit aktiviertem JavaScript entfällt diese zusätzliche Frage.</p><p>Obwohl Spammer bestehende E-Mail-Listen mieten oder kaufen können, entscheiden viele sich eine Software als "E-Mail-Harvester" (oft auch "Spam Bots" genannt) einzusetzen, die E-Mail-Adressen auf Webseiten sucht. Diese "E-Mail-Harvester" arbeiten oft auf die gleiche Weise wie Suchmaschinen es tun und versuchen, jede E-Mail-Adresse, die sie im Internet finden, zu sammeln. Allerdings sind die Brute-Force-Algorithmen die sie verwenden nicht in der Lage, die einfache Frage oben zu beantworten.</p><p><a href="http://de.wikipedia.org/wiki/Spam" title="Artikel bei Wikipedia" target="_blank">Lesen Sie mehr über Spam und wie man es verhindern kann.</a></p>';
$GLOBALS['TL_LANG']['aeo']['success'] = 'Wir haben ihr E-Mail-Programm geöffnet. Wenn dies nicht geklappt hat, klicken sie bitte auf die E-Mail-Adresse: <a href="mailto:%s">%s</a>.';
?>

36
languages/de/modules.php

@ -0,0 +1,36 @@
<?php if (!defined('TL_ROOT')) die('You can not access this file directly!');
/**
* Contao Open Source CMS
* Copyright (C) 2005-2011 Leo Feyer
*
* Formerly known as TYPOlight Open Source CMS.
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program. If not, please visit the Free
* Software Foundation website at <http://www.gnu.org/licenses/>.
*
* PHP version 5
* @copyright cgo IT, 2012-2013
* @author Carsten Götzinger (info@cgo-it.de)
* @package aeo
* @license GNU/LGPL
* @filesource
*/
/**
* Extension folder
*/
$GLOBALS['TL_LANG']['MOD']['zaeo'] = array('Advanced eMail Obfuscation', 'Diese Erweiterung stellt die Verschleierung von E-Mail-Adressen zur Verfügung.');

43
languages/de/tl_content.php

@ -0,0 +1,43 @@
<?php if (!defined('TL_ROOT')) die('You cannot access this file directly!');
/**
* Contao Open Source CMS
* Copyright (C) 2005-2011 Leo Feyer
*
* Formerly known as TYPOlight Open Source CMS.
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program. If not, please visit the Free
* Software Foundation website at <http://www.gnu.org/licenses/>.
*
* PHP version 5
* @copyright cgo IT, 2012-2013
* @author Carsten Götzinger (info@cgo-it.de)
* @package aeo
* @license GNU/LGPL
* @filesource
*/
/**
* legends
*/
$GLOBALS['TL_LANG']['tl_content']['aeo_legend'] = 'Advanced eMail Obfuscation Einstellungen';
/**
* fields
*/
$GLOBALS['TL_LANG']['tl_content']['aeo_custom_template'] = array('Template', 'Hier können Sie das Template für das Formular auswählen.');
$GLOBALS['TL_LANG']['tl_content']['aeo_show_info'] = array('Standard-Info anzeigen', 'Zeigt dem Frontend-Benutzer eine Standard-Information an, warum er eine Sicherheitsfrage beantworten muss. Gilt nur für Frontend-Benutzer ohne JavaScript.');
$GLOBALS['TL_LANG']['tl_content']['aeo_info_text'] = array('Eigener Info-Text', 'Informations-Text, der dem Frontend-Benutzer angezeigt wird. Gilt nur für Frontend-Benutzer ohne JavaScript.');
$GLOBALS['TL_LANG']['tl_content']['aeo_disable'] = array('Advanced eMail Obfuscation deaktivieren', 'Deaktiviert die Funktionalität von Advanced eMail Obfuscation für dieses Inhaltselement.');
?>

43
languages/de/tl_module.php

@ -0,0 +1,43 @@
<?php if (!defined('TL_ROOT')) die('You cannot access this file directly!');
/**
* Contao Open Source CMS
* Copyright (C) 2005-2011 Leo Feyer
*
* Formerly known as TYPOlight Open Source CMS.
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program. If not, please visit the Free
* Software Foundation website at <http://www.gnu.org/licenses/>.
*
* PHP version 5
* @copyright cgo IT, 2012-2013
* @author Carsten Götzinger (info@cgo-it.de)
* @package aeo
* @license GNU/LGPL
* @filesource
*/
/**
* legends
*/
$GLOBALS['TL_LANG']['tl_content']['aeo_legend'] = 'Advanced eMail Obfuscation Einstellungen';
/**
* fields
*/
$GLOBALS['TL_LANG']['tl_module']['aeo_custom_template'] = array('Template', 'Hier können Sie das Template für das Formular auswählen.');
$GLOBALS['TL_LANG']['tl_module']['aeo_show_info'] = array('Standard-Info anzeigen', 'Zeigt dem Frontend-Benutzer eine Standard-Information an, warum er eine Sicherheitsfrage beantworten muss. Gilt nur für Frontend-Benutzer ohne JavaScript.');
$GLOBALS['TL_LANG']['tl_module']['aeo_info_text'] = array('Eigener Info-Text', 'Informations-Text, der dem Frontend-Benutzer angezeigt wird.');
$GLOBALS['TL_LANG']['tl_module']['aeo_disable'] = array('Advanced eMail Obfuscation deaktivieren', 'Deaktiviert die Funktionalität von Advanced eMail Obfuscation für dieses Modul.');
?>

60
languages/de/tl_settings.php

@ -0,0 +1,60 @@
<?php if (!defined('TL_ROOT')) die('You can not access this file directly!');
/**
* Contao Open Source CMS
* Copyright (C) 2005-2011 Leo Feyer
*
* Formerly known as TYPOlight Open Source CMS.
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program. If not, please visit the Free
* Software Foundation website at <http://www.gnu.org/licenses/>.
*
* PHP version 5
* @copyright cgo IT, 2012-2013
* @author Carsten Götzinger (info@cgo-it.de)
* @package aeo
* @license GNU/LGPL
* @filesource
*/
/**
* Name
*/
$GLOBALS['TL_LANG']['tl_settings']['aeo'] = "Advanced eMail Obfuscation";
/**
* legends
*/
$GLOBALS['TL_LANG']['tl_settings']['aeo_legend'] = 'Advanced eMail Obfuscation Einstellungen';
/**
* fields
*/
$GLOBALS['TL_LANG']['tl_settings']['aeo_replace_standard_obfuscation'] = array('Aktiv', 'Ist diese Option aktiviert, wird die Standard-Verschleierung von E-Mail-Adressen durch Contao durch "Advanced eMail Obfuscation" ersetzt.');
$GLOBALS['TL_LANG']['tl_settings']['aeo_use_rot_13'] = array('ROT13-Verschlüsselung nutzen', 'ROT13 (engl. rotate by 13 places, zu Deutsch in etwa "rotiere um 13 Stellen") ist eine Verschiebechiffre (auch Caesar-Chiffre genannt), mit der auf einfache Weise Texte verschlüsselt werden können. Dies geschieht durch Ersetzung von Buchstaben – bei ROT13 im Speziellen wird jeder Buchstabe des lateinischen Alphabets durch den im Alphabet um 13 Stellen davor bzw. dahinter liegenden Buchstaben ersetzt.');
$GLOBALS['TL_LANG']['tl_settings']['aeo_virtual_path'] = array('Virtueller Pfad', 'Der virtuelle Pfad wird für Frontend-Benutzer verwendet, die über kein JavaScript verfügen.');
$GLOBALS['TL_LANG']['tl_settings']['aeo_jump_to_no_js'] = array('Weiterleitungsseite bei deaktiviertem JavaScript', 'Bei deaktiviertem JavaScript wird der Benutzer bei einem Klick auf eine E-Mail-Adresse je nach der Sprache der Seite auf die entsprechende Seite weitergeleitet. Auf dieser Seite muss das Modul oder Inhaltselement "Advanced eMail Obfuscation" eingebunden sein. Existiert keine Weiterleitungsseite für die entsprechende Sprache wird die Fallback-Weiterleitungsseite gewählt.');
$GLOBALS['TL_LANG']['tl_settings']['aeo_obfuscation_method'] = array('Verschleierungs-Methode', 'Art der Verschleierung. Betrifft nur die Anzeige auf der Webseite. Mailto-Links werden über den virtuellen Pfad (und optionale ROT13-Verschlüsselung) abgebildet.');
$GLOBALS['TL_LANG']['tl_settings']['aeo_language_fallback'] = array('Fallback', '');
$GLOBALS['TL_LANG']['tl_settings']['aeo_language'] = array('Sprache', '');
$GLOBALS['TL_LANG']['tl_settings']['aeo_redirecturl'] = array('Weiterleitungsseite', '');
/**
* options
*/
$GLOBALS['TL_LANG']['tl_settings']['shorten'] = array('Verkürzung', 'Die E-Mail-Adressen werden gekürzt auf der Webseite dargestellt (z.B. hal...@domain.de)');
$GLOBALS['TL_LANG']['tl_settings']['rtl'] = array('RTL', 'right-to-left. Die E-Mail-Adresse wird im Quellcode von rechts nach links geschrieben, per CSS auf der Webseite von links nach rechts angezeigt.');
$GLOBALS['TL_LANG']['tl_settings']['nullspan'] = array('"null" Span', 'In die E-Mail-Adresse werden span-Tags mit dem Wert "null" eingebaut. Diese Tags werden per CSS auf der Webseite ausgeblendet.');
?>

56
languages/en/default.php

@ -0,0 +1,56 @@
<?php if (!defined('TL_ROOT')) die('You can not access this file directly!');
/**
* Contao Open Source CMS
* Copyright (C) 2005-2011 Leo Feyer
*
* Formerly known as TYPOlight Open Source CMS.
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program. If not, please visit the Free
* Software Foundation website at <http://www.gnu.org/licenses/>.
*
* PHP version 5
* @copyright cgo IT, 2012-2013
* @author Carsten Götzinger (info@cgo-it.de)
* @package aeo
* @license GNU/LGPL
* @filesource
*/
/**
* front end modules
*/
$GLOBALS['TL_LANG']['FMD']['aeo'] = array('Advanced eMail Obfuscation', 'Creates a form for decryption of e-mail addresses for front-end users without JavaScript.');
/**
* content Elements
*/
$GLOBALS['TL_LANG']['CTE']['aeo'] = array('Advanced eMail Obfuscation', 'Creates a form for decryption of e-mail addresses for front-end users without JavaScript.');
/**
* errors
*/
$GLOBALS['TL_LANG']['aeo']['aeo_error_duplicate'] = 'Advanced eMail Obfuscation: There is a duplicate entry in field %s.';
$GLOBALS['TL_LANG']['aeo']['aeo_error_redirect'] = 'Advanced eMail Obfuscation: Please make sure that the redirect pages all include a module or content element of type "Advanced eMail Obfuscation".';
/**
* others
*/
$GLOBALS['TL_LANG']['aeo']['tooltip_no_js'] = 'Since you have disabled JavaScript, you have to answer a simple question, to open your e-mail program automatically.';
$GLOBALS['TL_LANG']['aeo']['tooltip_js'] = 'send email';
$GLOBALS['TL_LANG']['aeo']['buttonLabel'] = 'Open email programm';
$GLOBALS['TL_LANG']['aeo']['info'] = '<h2>Why must I answer this question?</h2><p>The aim of this check is to protect the owner of the e-mail address from receiving unsolicited e-mail.</p><p>Since you have not activated JavaScript, we check by this security question whether you really are human. With JavaScript enabled this additional question will not show.</p><p>Although spammers can rent or buy existing e-mail lists, many opt to use software known as \'e-mail harvesters\' (often referred to as \'spam bots\') that extract e-mail addresses from web pages. These e-mail harvesters work very much the same way search engine spiders do and try to collect every e-mail adress they encounter on the web. However, the brute force algorithms they use, are not able to answer the simple question above.</p><p><a href="http://en.wikipedia.org/wiki/E-mail_spam" title="Article on Wikipedia" target="_blank">Read more about spam and how to prevent it.</a></p>';
$GLOBALS['TL_LANG']['aeo']['success'] = 'We\'ve opened up your e-mail program. If that didn\'t work, please click <a href="mailto:%s">%s</a>.';
?>

36
languages/en/modules.php

@ -0,0 +1,36 @@
<?php if (!defined('TL_ROOT')) die('You can not access this file directly!');
/**
* Contao Open Source CMS
* Copyright (C) 2005-2011 Leo Feyer
*
* Formerly known as TYPOlight Open Source CMS.
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program. If not, please visit the Free
* Software Foundation website at <http://www.gnu.org/licenses/>.
*
* PHP version 5
* @copyright cgo IT, 2012-2013
* @author Carsten Götzinger (info@cgo-it.de)
* @package aeo
* @license GNU/LGPL
* @filesource
*/
/**
* Extension folder
*/
$GLOBALS['TL_LANG']['MOD']['zaeo'] = array('Advanced eMail Obfuscation', 'This extension provides the obfuscation of email addresses.');

43
languages/en/tl_content.php

@ -0,0 +1,43 @@
<?php if (!defined('TL_ROOT')) die('You cannot access this file directly!');
/**
* Contao Open Source CMS
* Copyright (C) 2005-2011 Leo Feyer
*
* Formerly known as TYPOlight Open Source CMS.
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program. If not, please visit the Free
* Software Foundation website at <http://www.gnu.org/licenses/>.
*
* PHP version 5
* @copyright cgo IT, 2012-2013
* @author Carsten Götzinger (info@cgo-it.de)
* @package aeo
* @license GNU/LGPL
* @filesource
*/
/**
* legends
*/
$GLOBALS['TL_LANG']['tl_content']['aeo_legend'] = 'Advanced eMail Obfuscation Settings';
/**
* fields
*/
$GLOBALS['TL_LANG']['tl_content']['aeo_custom_template'] = array('Template', 'Here you can select the template for the form.');
$GLOBALS['TL_LANG']['tl_content']['aeo_show_info'] = array('Show standard info', 'Shows the front-end user a standarized information why he has to answer a security question. Applies only for front-end users without JavaScript.');
$GLOBALS['TL_LANG']['tl_content']['aeo_info_text'] = array('Own info text', 'Information text to the front-end user. Applies only for front-end users without JavaScript.');
$GLOBALS['TL_LANG']['tl_content']['aeo_disable'] = array('Disable Advanced eMail Obfuscation', 'Disables the functionality of Advanced eMail Obfuscation for this content element.');
?>

43
languages/en/tl_module.php

@ -0,0 +1,43 @@
<?php if (!defined('TL_ROOT')) die('You cannot access this file directly!');
/**
* Contao Open Source CMS
* Copyright (C) 2005-2011 Leo Feyer
*
* Formerly known as TYPOlight Open Source CMS.
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program. If not, please visit the Free
* Software Foundation website at <http://www.gnu.org/licenses/>.
*
* PHP version 5
* @copyright cgo IT, 2012-2013
* @author Carsten Götzinger (info@cgo-it.de)
* @package aeo
* @license GNU/LGPL
* @filesource
*/
/**
* legends
*/
$GLOBALS['TL_LANG']['tl_content']['aeo_legend'] = 'Advanced eMail Obfuscation Settings';
/**
* fields
*/
$GLOBALS['TL_LANG']['tl_module']['aeo_custom_template'] = array('Template', 'Here you can select the template for the form.');
$GLOBALS['TL_LANG']['tl_module']['aeo_show_info'] = array('Show standard info', 'Shows the front-end user a standarized information why he has to answer a security question. Applies only for front-end users without JavaScript.');
$GLOBALS['TL_LANG']['tl_module']['aeo_info_text'] = array('Own info text', 'Information text to the front-end user. Applies only for front-end users without JavaScript.');
$GLOBALS['TL_LANG']['tl_module']['aeo_disable'] = array('Disable Advanced eMail Obfuscation', 'Disables the functionality of Advanced eMail Obfuscation for this module.');
?>

60
languages/en/tl_settings.php

@ -0,0 +1,60 @@
<?php if (!defined('TL_ROOT')) die('You can not access this file directly!');
/**
* Contao Open Source CMS
* Copyright (C) 2005-2011 Leo Feyer
*
* Formerly known as TYPOlight Open Source CMS.
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program. If not, please visit the Free
* Software Foundation website at <http://www.gnu.org/licenses/>.
*
* PHP version 5
* @copyright cgo IT, 2012-2013
* @author Carsten Götzinger (info@cgo-it.de)
* @package aeo
* @license GNU/LGPL
* @filesource
*/
/**
* Name