From 4807a343faeed3476d7370dd42747645d5900167 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sat, 1 Dec 2012 23:38:32 +0100 Subject: [PATCH 1/1] Legal Notice page --- .gitignore | 50 +++++++++++++++ files/lib/page/LegalNoticePage.class.php | 29 +++++++++ language/de.xml | 41 +++++++++++++ language/en.xml | 41 +++++++++++++ option.xml | 51 ++++++++++++++++ package.xml | 29 +++++++++ pageMenu.xml | 9 +++ templates/legalNotice.tpl | 78 ++++++++++++++++++++++++ 8 files changed, 328 insertions(+) create mode 100644 .gitignore create mode 100644 files/lib/page/LegalNoticePage.class.php create mode 100644 language/de.xml create mode 100644 language/en.xml create mode 100644 option.xml create mode 100644 package.xml create mode 100644 pageMenu.xml create mode 100644 templates/legalNotice.tpl diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d9b96dd --- /dev/null +++ b/.gitignore @@ -0,0 +1,50 @@ +# Linux +# backup files +*~ + +# Windows +# thumbnails +Thumbs.db + +# Mac OS X +# metadata +.DS_Store +# thumbnails +._* + +# Visual Studio PHP +*.sln +*.phpproj +*.puo +*.suo +*.cache + +# Netbeans +nbproject/ +catalog.xml +nbactions.xml + +# Eclipse +.settings/ +.buildpath +.classpath +.project + +# SVN +# svn folders +.svn/ + +# PHPStorm +.idea/ +.nameencodings +.xmlmisc +.xmlmodules +.xmlprojectCodeStyle +.xmlvcs.xml +*.imlworkspace +.xml + +# Community Framework +# Ignore packages build directly in the workspace. They can however be added manually via git add, if wanted. +*.tar +*.tar.gz \ No newline at end of file diff --git a/files/lib/page/LegalNoticePage.class.php b/files/lib/page/LegalNoticePage.class.php new file mode 100644 index 0000000..8b3f32b --- /dev/null +++ b/files/lib/page/LegalNoticePage.class.php @@ -0,0 +1,29 @@ + + * @package com.woltlab.wcf.legalNotice + * @subpackage page + * @category Community Framework + */ +class LegalNoticePage extends AbstractPage { + const AVAILABLE_DURING_OFFLINE_MODE = true; + + /** + * @see wcf\page\IPage::assignVariables() + */ + public function assignVariables() { + parent::assignVariables(); + + WCF::getTPL()->assign(array( + 'encodedEmailAddress' => StringUtil::encodeAllChars(LEGAL_NOTICE_EMAIL_ADDRESS) + )); + } +} diff --git a/language/de.xml b/language/de.xml new file mode 100644 index 0000000..e6152bc --- /dev/null +++ b/language/de.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/language/en.xml b/language/en.xml new file mode 100644 index 0000000..ef0b7d1 --- /dev/null +++ b/language/en.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/option.xml b/option.xml new file mode 100644 index 0000000..8c6d775 --- /dev/null +++ b/option.xml @@ -0,0 +1,51 @@ + + + + + + general + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/package.xml b/package.xml new file mode 100644 index 0000000..7f61d82 --- /dev/null +++ b/package.xml @@ -0,0 +1,29 @@ + + + + Legal Notice Page + Impressum + Adds a new page to your forum with information about the site owner. (This is required for German websites.) + Kommerzielle deutsche Internetseiten müssen nach § 5 Telemediengesetz über ein Impressum verfügen. + 1.0.0 Alpha 1 + 2012-01-12 + com.woltlab.wcf + + + + WoltLab GmbH + http://www.woltlab.com + + + + com.woltlab.wcf + + + + files.tar + templates.tar + pageMenu.xml + option.xml + language/*.xml + + diff --git a/pageMenu.xml b/pageMenu.xml new file mode 100644 index 0000000..b4da794 --- /dev/null +++ b/pageMenu.xml @@ -0,0 +1,9 @@ + + + + + index.php/LegalNotice/ + footer + + + \ No newline at end of file diff --git a/templates/legalNotice.tpl b/templates/legalNotice.tpl new file mode 100644 index 0000000..17e7ef1 --- /dev/null +++ b/templates/legalNotice.tpl @@ -0,0 +1,78 @@ +{include file='documentHeader'} + + + {lang}wcf.legalNotice.title{/lang} - {PAGE_TITLE|language} + + {include file='headInclude'} + + + + +{include file='header'} + +
+
+

{lang}wcf.legalNotice.title{/lang}

+

{lang}wcf.legalNotice.description{/lang}

+
+
+ +{include file='userNotice'} + +
+
+ {lang}wcf.legalNotice.general{/lang} + +
+ {if LEGAL_NOTICE_ADDRESS} +
{lang}wcf.legalNotice.address{/lang}
+
{@LEGAL_NOTICE_ADDRESS|language|htmlspecialchars|nl2br}
+ {/if} + + {if $encodedEmailAddress} +
{lang}wcf.legalNotice.emailAddress{/lang}
+
{@$encodedEmailAddress}
+ {/if} + + {if LEGAL_NOTICE_PHONE} +
{lang}wcf.legalNotice.phone{/lang}
+
{LEGAL_NOTICE_PHONE}
+ {/if} + + {if LEGAL_NOTICE_FAX} +
{lang}wcf.legalNotice.fax{/lang}
+
{LEGAL_NOTICE_FAX}
+ {/if} + + {if LEGAL_NOTICE_REPRESENTATIVE} +
{lang}wcf.legalNotice.representative{/lang}
+
{LEGAL_NOTICE_REPRESENTATIVE}
+ {/if} + + {if LEGAL_NOTICE_REGISTER} +
{lang}wcf.legalNotice.register{/lang}
+
{LEGAL_NOTICE_REGISTER}
+ {/if} + + {if LEGAL_NOTICE_VAT_ID} +
{lang}wcf.legalNotice.vatID{/lang}
+
{LEGAL_NOTICE_VAT_ID}
+ {/if} +
+
+ + {if LEGAL_NOTICE_ADDITIONAL_TEXT} +
+ {lang}wcf.legalNotice.additionalText{/lang} + +
+ {if LEGAL_NOTICE_ADDITIONAL_TEXT_ENABLE_HTML}{@LEGAL_NOTICE_ADDITIONAL_TEXT|language}{else}{@LEGAL_NOTICE_ADDITIONAL_TEXT|language|htmlspecialchars|nl2br}{/if} +
+
+ {/if} +
+ +{include file='footer'} + + + -- 2.20.1