Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
kveldscholten
committed
Feb 9, 2016
1 parent
99aa855
commit e48316a
Showing
11 changed files
with
278 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
/** | ||
* @copyright Ilch 2.0 | ||
* @package ilch | ||
*/ | ||
|
||
namespace Modules\Cookieconsent\Config; | ||
|
||
class Config extends \Ilch\Config\Install | ||
{ | ||
public $config = array | ||
( | ||
'key' => 'cookieconsent', | ||
'icon_small' => 'cookieconsent.png', | ||
'system_module' => true, | ||
'languages' => array | ||
( | ||
'de_DE' => array | ||
( | ||
'name' => 'Cookie-Richtlinien', | ||
'description' => 'Hier können die Cookie-Richtlinien verwaltet werden.', | ||
), | ||
'en_EN' => array | ||
( | ||
'name' => 'Cookie Consent', | ||
'description' => 'Here you can manage the cookie consent.', | ||
), | ||
) | ||
); | ||
|
||
public function install() | ||
{ | ||
$databaseConfig = new \Ilch\Config\Database($this->db()); | ||
$databaseConfig->set('cookie_consent', '0'); | ||
$databaseConfig->set('cookie_consent_style', 'light'); | ||
$databaseConfig->set('cookie_consent_pos', 'top'); | ||
$databaseConfig->set('cookie_consent_message', 'Diese Website nutzt Cookies, um bestmögliche Funktionalität bieten zu können.'); | ||
$databaseConfig->set('cookie_consent_text', '<h3>Einsatz von Cookies</h3> | ||
<p>Wie viele Internetseiten nutzt auch diese Seite Cookies. An dieser Stelle wird erklärt was Cookies sind und wie sie genutzt werden.</p> | ||
<p> </p> | ||
<h4>Was sind Cookies</h4> | ||
<p>Cookies sind kleine Dateien, die beim Aufruf von Internetseiten durch den Internet Browser auf Ihrem lokalen Rechner gespeichert werden. In den Dateien speichern Internetseiten verschiedene Informationen, um die Nutzung von besuchten Internetseiten für Sie komfortabler zu gestalten. Oftmals wird in Cookies z.B. Ihr Login gespeichert, um Sie bei einem späteren Besuch der Internetseite automatisch anzumelden, ohne dass Sie Ihre Zugangsdaten noch einmal manuell eingeben müssen.</p> | ||
<p> </p> | ||
<h4>Wie wir Cookies nutzen</h4> | ||
<p>Wir setzen Cookies für folgende Zwecke ein:</p> | ||
<ul> | ||
<li>Anmeldung: Bei der Anmeldung werden Ihre Zugangsdaten in verschlüsselter Form als Cookies gespeichert, um Sie bei einem späteren Seitenaufruf automatisiert anzumelden. Im Anmeldefenster können Sie mit der Option „Dauerhaft angemeldet bleiben“ festlegen, ob diese Cookies angelegt werden sollen.</li> | ||
<li>Sitzung: Beim ersten Aufruf unserer Seite wird eine neue Sitzung gestartet, diese wird durch ein eindeutiges Cookies Ihrem Computer zugeordnet. Sitzungen erlauben es, Sie zwischen zwei Seitenaufrufen wieder zu erkennen und Ihnen alle Funktionalitäten bereitstellen zu können. Es handelt sich um ein temporäres Cookies, dass beim Beenden des Internet Browsers automatisch gelöscht wird.</li> | ||
<li>Drittanbieter-Dienste: Die Einblendung von Werbeanzeigen oder das Teilen von Inhalten auf sozialen Netzwerken oder vergleichbaren Internetseiten kann die Erzeugung eines Cookies zur Folge haben. Diese Cookies werden nicht direkt von unserer Seite erzeugt, sondern durch den Drittanbieter selbst.</li> | ||
</ul> | ||
<p> </p> | ||
<h4>Wie Sie Cookies deaktivieren und entfernen</h4> | ||
<p>Cookies können in den Einstellungen Ihres Internet Browsers verwaltet und entfernt werden. Darüber hinaus lässt sich in den Einstellungen das Speichern von Cookies zudem vollständig deaktivieren. Bitte entnehmen Sie der folgenden Auflistung die passende Anleitung für den Umgang mit Cookies zu dem von Ihnen genutzten Internet Browser.</p> | ||
<ul> | ||
<li><a href="https://support.google.com/chrome/answer/95647?hl=de" target="_blank">Google Chrome</a></li> | ||
<li><a href="https://support.mozilla.org/de/kb/cookies-informationen-websites-auf-ihrem-computer" target="_blank">Mozilla Firefox</a></li> | ||
<li><a href="http://help.opera.com/Windows/12.00/de/cookies.html" target="_blank">Opera</a></li> | ||
<li><a href="https://support.apple.com/kb/ph17191?locale=de_DE" target="_blank">Safari</a></li> | ||
<li><a href="http://windows.microsoft.com/de-DE/internet-explorer/delete-manage-cookies" target="_blank">Windows Internet Explorer</a></li> | ||
</ul>'); | ||
} | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
/** | ||
* @copyright Ilch 2.0 | ||
* @package ilch | ||
*/ | ||
|
||
namespace Modules\Cookieconsent\Controllers; | ||
|
||
class Index extends \Ilch\Controller\Frontend | ||
{ | ||
public function indexAction() | ||
{ | ||
$this->getLayout()->getHmenu()->add($this->getTranslator()->trans('menuCookieConsent'), array('action' => 'index')); | ||
|
||
$this->getView()->set('cookieConsent', $this->getConfig()->get('cookie_consent')); | ||
$this->getView()->set('cookieConsentText', $this->getConfig()->get('cookie_consent_text')); | ||
} | ||
} | ||
|
||
|
51 changes: 51 additions & 0 deletions
51
application/modules/cookieconsent/controllers/admin/Index.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
/** | ||
* @copyright Ilch 2.0 | ||
* @package ilch | ||
*/ | ||
|
||
namespace Modules\Cookieconsent\Controllers\Admin; | ||
|
||
class Index extends \Ilch\Controller\Admin | ||
{ | ||
public function init() | ||
{ | ||
$this->getLayout()->addMenu | ||
( | ||
'menuCookieConsent', | ||
array | ||
( | ||
array | ||
( | ||
'name' => 'settings', | ||
'active' => true, | ||
'icon' => 'fa fa-cogs', | ||
'url' => $this->getLayout()->getUrl(array('controller' => 'index', 'action' => 'index')) | ||
) | ||
) | ||
); | ||
} | ||
|
||
public function indexAction() | ||
{ | ||
$this->getLayout()->getAdminHmenu() | ||
->add($this->getTranslator()->trans('menuCookieConsent'), array('action' => 'index')) | ||
->add($this->getTranslator()->trans('settings'), array('action' => 'index')); | ||
|
||
if ($this->getRequest()->isPost()) { | ||
$this->getConfig()->set('cookie_consent', $this->getRequest()->getPost('cookieConsent')); | ||
$this->getConfig()->set('cookie_consent_style', $this->getRequest()->getPost('cookieConsentStyle')); | ||
$this->getConfig()->set('cookie_consent_pos', $this->getRequest()->getPost('cookieConsentPos')); | ||
$this->getConfig()->set('cookie_consent_message', $this->getRequest()->getPost('cookieConsentMessage')); | ||
$this->getConfig()->set('cookie_consent_text', $this->getRequest()->getPost('cookieConsentText')); | ||
$this->addMessage('saveSuccess'); | ||
} | ||
|
||
$this->getView()->set('cookieConsent', $this->getConfig()->get('cookie_consent')); | ||
$this->getView()->set('cookieConsentStyle', $this->getConfig()->get('cookie_consent_style')); | ||
$this->getView()->set('cookieConsentPos', $this->getConfig()->get('cookie_consent_pos')); | ||
$this->getView()->set('cookieConsentMessage', $this->getConfig()->get('cookie_consent_message')); | ||
$this->getView()->set('cookieConsentText', $this->getConfig()->get('cookie_consent_text')); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
/** | ||
* @copyright Ilch 2.0 | ||
* @package ilch | ||
*/ | ||
|
||
return array | ||
( | ||
'menuCookieConsent' => 'Cookie-Richtlinien', | ||
'cookieConsentShow' => 'Anzeigen', | ||
'cookieConsentStyle' => 'Style', | ||
'cookieConsentStyleDark' => 'Dunkel', | ||
'cookieConsentStyleLight' => 'Hell', | ||
'cookieConsentPos' => 'Position', | ||
'cookieConsentPosTop' => 'am Seitenanfang', | ||
'cookieConsentPosFloating' => 'unten Rechts', | ||
'cookieConsentPosBottom' => 'am Seitenende', | ||
'cookieConsentMessage' => 'Benachrichtigungstext', | ||
'cookieConsentText' => 'Richtlinien-Text', | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
/** | ||
* @copyright Ilch 2.0 | ||
* @package ilch | ||
*/ | ||
|
||
return array | ||
( | ||
'menuCookieConsent' => 'Cookie Consent', | ||
'cookieConsentShow' => 'Show', | ||
'cookieConsentPos' => 'Position', | ||
'cookieConsentMessage' => 'Notification text', | ||
'cookieConsentText' => 'Consent Text', | ||
); |
65 changes: 65 additions & 0 deletions
65
application/modules/cookieconsent/views/admin/index/index.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<legend><?=$this->getTrans('settings') ?></legend> | ||
<form class="form-horizontal" method="POST" action=""> | ||
<?=$this->getTokenField() ?> | ||
<div class="form-group"> | ||
<label for="cookieConsent" class="col-lg-2 control-label"> | ||
<?=$this->getTrans('cookieConsentShow') ?>: | ||
</label> | ||
<div class="col-lg-2"> | ||
<div class="flipswitch"> | ||
<input type="radio" class="flipswitch-input" name="cookieConsent" value="1" id="cookie-consent-yes" <?php if ($this->get('cookieConsent') == '1') { echo 'checked="checked"'; } ?> /> | ||
<label for="cookie-consent-yes" class="flipswitch-label flipswitch-label-on"><?=$this->getTrans('yes') ?></label> | ||
<input type="radio" class="flipswitch-input" name="cookieConsent" value="0" id="cookie-consent-no" <?php if ($this->get('cookieConsent') == '0') { echo 'checked="checked"'; } ?> /> | ||
<label for="cookie-consent-no" class="flipswitch-label flipswitch-label-off"><?=$this->getTrans('no') ?></label> | ||
<span class="flipswitch-selection"></span> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<label for="cookieConsentStyle" class="col-lg-2 control-label"> | ||
<?=$this->getTrans('cookieConsentStyle') ?>: | ||
</label> | ||
<div class="col-lg-2"> | ||
<select class="form-control" name="cookieConsentStyle"> | ||
<option <?php if ($this->get('cookieConsentStyle') == 'dark') { echo 'selected="selected"'; } ?> value="dark"><?=$this->getTrans('cookieConsentStyleDark') ?></option> | ||
<option <?php if ($this->get('cookieConsentStyle') == 'light') { echo 'selected="selected"'; } ?> value="light"><?=$this->getTrans('cookieConsentStyleLight') ?></option> | ||
</select> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<label for="cookieConsentPos" class="col-lg-2 control-label"> | ||
<?=$this->getTrans('cookieConsentPos') ?>: | ||
</label> | ||
<div class="col-lg-2"> | ||
<select class="form-control" name="cookieConsentPos"> | ||
<option <?php if ($this->get('cookieConsentPos') == 'top') { echo 'selected="selected"'; } ?> value="top"><?=$this->getTrans('cookieConsentPosTop') ?></option> | ||
<option <?php if ($this->get('cookieConsentPos') == 'floating') { echo 'selected="selected"'; } ?> value="floating"><?=$this->getTrans('cookieConsentPosFloating') ?></option> | ||
<option <?php if ($this->get('cookieConsentPos') == 'bottom') { echo 'selected="selected"'; } ?> value="bottom"><?=$this->getTrans('cookieConsentPosBottom') ?></option> | ||
</select> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<label for="cookieConsentMessage" class="col-lg-2 control-label"> | ||
<?=$this->getTrans('cookieConsentMessage') ?>: | ||
</label> | ||
<div class="col-lg-6"> | ||
<input class="form-control" | ||
name="cookieConsentMessage" | ||
type="text" | ||
value="<?=$this->escape($this->get('cookieConsentMessage')) ?>" /> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<label for="cookieConsentText" class="col-lg-2 control-label"> | ||
<?=$this->getTrans('cookieConsentText') ?>: | ||
</label> | ||
<div class="col-lg-10"> | ||
<textarea class="form-control ckeditor" | ||
name="cookieConsentText" | ||
id="ck_1" | ||
toolbar="ilch_html" | ||
rows="5"><?=$this->escape($this->get('cookieConsentText')) ?></textarea> | ||
</div> | ||
</div> | ||
<?=$this->getSaveBar() ?> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<legend><?=$this->getTrans('menuCookieConsent') ?></legend> | ||
<?=$this->get('cookieConsentText') ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters