Legal Notice page
authorMarcel Werk <burntime@woltlab.com>
Sat, 1 Dec 2012 22:38:32 +0000 (23:38 +0100)
committerMarcel Werk <burntime@woltlab.com>
Sat, 1 Dec 2012 22:38:32 +0000 (23:38 +0100)
.gitignore [new file with mode: 0644]
files/lib/page/LegalNoticePage.class.php [new file with mode: 0644]
language/de.xml [new file with mode: 0644]
language/en.xml [new file with mode: 0644]
option.xml [new file with mode: 0644]
package.xml [new file with mode: 0644]
pageMenu.xml [new file with mode: 0644]
templates/legalNotice.tpl [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..d9b96dd
--- /dev/null
@@ -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 (file)
index 0000000..8b3f32b
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+namespace wcf\page;
+use wcf\system\WCF;
+use wcf\util\StringUtil;
+
+/**
+ * Shows the legal notice page.
+ * 
+ * @author     Marcel Werk
+ * @copyright  2001-2012 WoltLab GmbH
+ * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @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 (file)
index 0000000..e6152bc
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<language xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/maelstrom/language.xsd" languagecode="de">
+       <category name="wcf.acp.option">
+               <item name="wcf.acp.option.category.legalNotice"><![CDATA[Impressum]]></item>
+               <item name="wcf.acp.option.category.legalNotice.description"><![CDATA[Angaben gemäß § 5 Telemediengesetz]]></item>
+               <item name="wcf.acp.option.legal_notice_additional_text"><![CDATA[Weitere Informationen]]></item>
+               <item name="wcf.acp.option.legal_notice_additional_text.description"><![CDATA[Optional können Sie hier weitere Informationen Ihrem Impressum hinzufügen.]]></item>
+               <item name="wcf.acp.option.legal_notice_additional_text_enable_html"><![CDATA[HTML-Code im Text verwenden]]></item>
+               <item name="wcf.acp.option.legal_notice_additional_text_enable_html.description"><![CDATA[Durch Aktivierung dieser Option können Sie zur Formatierung des Textes auch HTML verwenden.]]></item>
+               <item name="wcf.acp.option.legal_notice_address"><![CDATA[Name und Anschrift]]></item>
+               <item name="wcf.acp.option.legal_notice_address.description"><![CDATA[Geben Sie hier den Namen und die komplette Anschrift des Inhabers der Seite ein. Bei juristischen Personen muss die Rechtsform mit angegeben werden (z.B. &raquo;GmbH&laquo;).]]></item>
+               <item name="wcf.acp.option.legal_notice_email_address"><![CDATA[E-Mail-Adresse]]></item>
+               <item name="wcf.acp.option.legal_notice_email_address.description"><![CDATA[Die Angabe der E-Mail-Adresse im Impressum ist gesetzlich vorgeschrieben.]]></item>
+               <item name="wcf.acp.option.legal_notice_fax"><![CDATA[Fax-Nummer]]></item>
+               <item name="wcf.acp.option.legal_notice_fax.description"><![CDATA[Bitte geben Sie hier soweit vorhanden Ihre Fax-Nummer an.]]></item>
+               <item name="wcf.acp.option.legal_notice_phone"><![CDATA[Telefon-Nummer]]></item>
+               <item name="wcf.acp.option.legal_notice_phone.description"><![CDATA[Die Angabe der Telefon-Nummer im Impressum ist gesetzlich vorgeschrieben.]]></item>
+               <item name="wcf.acp.option.legal_notice_register"><![CDATA[Registereintragung]]></item>
+               <item name="wcf.acp.option.legal_notice_register.description"><![CDATA[Falls der Inhaber in ein Handelsregister, Vereinsregister, Partnerschaftsregister oder Genossenschaftsregister eingetragen ist, müssen Sie hier das Register und die dazugehörige Nummer angeben.]]></item>
+               <item name="wcf.acp.option.legal_notice_representative"><![CDATA[Vertretungsberechtigte]]></item>
+               <item name="wcf.acp.option.legal_notice_representative.description"><![CDATA[Bei juristischen Personen ist es gesetzlich vorgeschrieben, dass alle vertretungsberechtigten Personen mit vollem Namen im Impressum genannt werden.]]></item>
+               <item name="wcf.acp.option.legal_notice_vat_id"><![CDATA[Umsatzsteuer-ID]]></item>
+               <item name="wcf.acp.option.legal_notice_vat_id.description"><![CDATA[Falls Sie über eine Umsatzsteuer-Identifikationsnummer verfügen, tragen Sie diese bitte hier ein.]]></item>
+       </category>
+       <category name="wcf.footer.menu">
+               <item name="wcf.footer.menu.legalNotice"><![CDATA[Impressum]]></item>
+       </category>
+       <category name="wcf.legalNotice">
+               <item name="wcf.legalNotice.additionalText"><![CDATA[Weitere Informationen]]></item>
+               <item name="wcf.legalNotice.address"><![CDATA[Name und Anschrift]]></item>
+               <item name="wcf.legalNotice.description"><![CDATA[Angaben gemäß § 5 Telemediengesetz]]></item>
+               <item name="wcf.legalNotice.emailAddress"><![CDATA[E-Mail-Adresse]]></item>
+               <item name="wcf.legalNotice.fax"><![CDATA[Fax]]></item>
+               <item name="wcf.legalNotice.general"><![CDATA[Allgemeine Informationen]]></item>
+               <item name="wcf.legalNotice.phone"><![CDATA[Telefon]]></item>
+               <item name="wcf.legalNotice.register"><![CDATA[Register]]></item>
+               <item name="wcf.legalNotice.representative"><![CDATA[Vertretungsberechtigte]]></item>
+               <item name="wcf.legalNotice.title"><![CDATA[Impressum]]></item>
+               <item name="wcf.legalNotice.vatID"><![CDATA[Umsatzsteuer-ID]]></item>
+       </category>
+</language>
\ No newline at end of file
diff --git a/language/en.xml b/language/en.xml
new file mode 100644 (file)
index 0000000..ef0b7d1
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<language xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/maelstrom/language.xsd" languagecode="en">
+       <category name="wcf.acp.option">
+               <item name="wcf.acp.option.category.legalNotice"><![CDATA[Legal Notice]]></item>
+               <item name="wcf.acp.option.category.legalNotice.description"><![CDATA[]]></item>
+               <item name="wcf.acp.option.legal_notice_additional_text"><![CDATA[Additional Information]]></item>
+               <item name="wcf.acp.option.legal_notice_additional_text.description"><![CDATA[You can enter additional information for your legal notice page here.]]></item>
+               <item name="wcf.acp.option.legal_notice_additional_text_enable_html"><![CDATA[Use HTML Code in Text]]></item>
+               <item name="wcf.acp.option.legal_notice_additional_text_enable_html.description"><![CDATA[By enabling this option you can use HTML code in the text.]]></item>
+               <item name="wcf.acp.option.legal_notice_address"><![CDATA[Name and Address]]></item>
+               <item name="wcf.acp.option.legal_notice_address.description"><![CDATA[]]></item>
+               <item name="wcf.acp.option.legal_notice_email_address"><![CDATA[E-Mail Address]]></item>
+               <item name="wcf.acp.option.legal_notice_email_address.description"><![CDATA[]]></item>
+               <item name="wcf.acp.option.legal_notice_fax"><![CDATA[Fax]]></item>
+               <item name="wcf.acp.option.legal_notice_fax.description"><![CDATA[]]></item>
+               <item name="wcf.acp.option.legal_notice_phone"><![CDATA[Phone]]></item>
+               <item name="wcf.acp.option.legal_notice_phone.description"><![CDATA[]]></item>
+               <item name="wcf.acp.option.legal_notice_register"><![CDATA[Register]]></item>
+               <item name="wcf.acp.option.legal_notice_register.description"><![CDATA[]]></item>
+               <item name="wcf.acp.option.legal_notice_representative"><![CDATA[Representatives]]></item>
+               <item name="wcf.acp.option.legal_notice_representative.description"><![CDATA[]]></item>
+               <item name="wcf.acp.option.legal_notice_vat_id"><![CDATA[VAT ID]]></item>
+               <item name="wcf.acp.option.legal_notice_vat_id.description"><![CDATA[]]></item>
+       </category>
+       <category name="wcf.footer.menu">
+               <item name="wcf.footer.menu.legalNotice"><![CDATA[Legal Notice]]></item>
+       </category>
+       <category name="wcf.legalNotice">
+               <item name="wcf.legalNotice.additionalText"><![CDATA[Additional Information]]></item>
+               <item name="wcf.legalNotice.address"><![CDATA[Name and Address]]></item>
+               <item name="wcf.legalNotice.description"><![CDATA[]]></item>
+               <item name="wcf.legalNotice.emailAddress"><![CDATA[E-Mail Address]]></item>
+               <item name="wcf.legalNotice.fax"><![CDATA[Fax]]></item>
+               <item name="wcf.legalNotice.general"><![CDATA[General Information]]></item>
+               <item name="wcf.legalNotice.phone"><![CDATA[Phone]]></item>
+               <item name="wcf.legalNotice.register"><![CDATA[Register]]></item>
+               <item name="wcf.legalNotice.representative"><![CDATA[Representatives]]></item>
+               <item name="wcf.legalNotice.title"><![CDATA[Legal Notice]]></item>
+               <item name="wcf.legalNotice.vatID"><![CDATA[VAT ID]]></item>
+       </category>
+</language>
\ No newline at end of file
diff --git a/option.xml b/option.xml
new file mode 100644 (file)
index 0000000..8c6d775
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/maelstrom/option.xsd">
+       <import>
+               <categories>
+                       <category name="legalNotice">
+                               <parent>general</parent>
+                       </category>
+               </categories>
+       
+               <options>
+                       <option name="legal_notice_address">
+                               <categoryname>legalNotice</categoryname>
+                               <optiontype>textareaI18n</optiontype>
+                               <supporti18n>1</supporti18n>
+                       </option>
+                       <option name="legal_notice_email_address">
+                               <categoryname>legalNotice</categoryname>
+                               <optiontype>text</optiontype>
+                       </option>
+                       <option name="legal_notice_phone">
+                               <categoryname>legalNotice</categoryname>
+                               <optiontype>text</optiontype>
+                       </option>
+                       <option name="legal_notice_fax">
+                               <categoryname>legalNotice</categoryname>
+                               <optiontype>text</optiontype>
+                       </option>
+                       <option name="legal_notice_representative">
+                               <categoryname>legalNotice</categoryname>
+                               <optiontype>text</optiontype>
+                       </option>
+                       <option name="legal_notice_register">
+                               <categoryname>legalNotice</categoryname>
+                               <optiontype>text</optiontype>
+                       </option>
+                       <option name="legal_notice_vat_id">
+                               <categoryname>legalNotice</categoryname>
+                               <optiontype>text</optiontype>
+                       </option>
+                       <option name="legal_notice_additional_text">
+                               <categoryname>legalNotice</categoryname>
+                               <optiontype>textareaI18n</optiontype>
+                               <supporti18n>1</supporti18n>
+                       </option>
+                       <option name="legal_notice_additional_text_enable_html">
+                               <categoryname>legalNotice</categoryname>
+                               <optiontype>boolean</optiontype>
+                       </option>
+               </options>
+       </import>
+</data>
\ No newline at end of file
diff --git a/package.xml b/package.xml
new file mode 100644 (file)
index 0000000..7f61d82
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<package name="com.woltlab.wcf.legalNotice" xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/maelstrom/package.xsd">
+       <packageinformation>
+               <packagename>Legal Notice Page</packagename>
+               <packagename language="de">Impressum</packagename>
+               <packagedescription>Adds a new page to your forum with information about the site owner. (This is required for German websites.)</packagedescription>
+               <packagedescription language="de">Kommerzielle deutsche Internetseiten müssen nach § 5 Telemediengesetz über ein Impressum verfügen.</packagedescription>
+               <version>1.0.0 Alpha 1</version>
+               <date>2012-01-12</date>
+               <plugin>com.woltlab.wcf</plugin>
+       </packageinformation>
+       
+       <authorinformation>
+               <author>WoltLab GmbH</author>
+               <authorurl>http://www.woltlab.com</authorurl>
+       </authorinformation>
+       
+       <requiredpackages>
+               <requiredpackage minversion="2.0.0 Alpha 1">com.woltlab.wcf</requiredpackage>
+       </requiredpackages>
+       
+       <instructions type="install">
+               <instruction type="file">files.tar</instruction>
+               <instruction type="template">templates.tar</instruction>
+               <instruction type="pageMenu">pageMenu.xml</instruction>
+               <instruction type="option">option.xml</instruction>
+               <instruction type="language">language/*.xml</instruction>
+       </instructions>
+</package>
diff --git a/pageMenu.xml b/pageMenu.xml
new file mode 100644 (file)
index 0000000..b4da794
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/pagemnu.xsd">
+       <import>
+               <pagemenuitem name="wcf.footer.menu.legalNotice">
+                       <link>index.php/LegalNotice/</link>
+                       <position>footer</position>
+               </pagemenuitem>
+       </import>
+</data>
\ No newline at end of file
diff --git a/templates/legalNotice.tpl b/templates/legalNotice.tpl
new file mode 100644 (file)
index 0000000..17e7ef1
--- /dev/null
@@ -0,0 +1,78 @@
+{include file='documentHeader'}
+
+<head>
+       <title>{lang}wcf.legalNotice.title{/lang} - {PAGE_TITLE|language}</title>
+       
+       {include file='headInclude'}
+</head>
+
+<body id="tpl{$templateName|ucfirst}">
+
+{include file='header'}
+
+<header class="boxHeadline">
+       <hgroup>
+               <h1>{lang}wcf.legalNotice.title{/lang}</h1>
+               <h2>{lang}wcf.legalNotice.description{/lang}</h2>
+       </hgroup>
+</header>
+
+{include file='userNotice'}
+
+<div class="container containerPadding marginTop">
+       <fieldset>
+               <legend>{lang}wcf.legalNotice.general{/lang}</legend>
+       
+               <dl>
+                       {if LEGAL_NOTICE_ADDRESS}
+                               <dt>{lang}wcf.legalNotice.address{/lang}</dt>
+                               <dd>{@LEGAL_NOTICE_ADDRESS|language|htmlspecialchars|nl2br}</dd>
+                       {/if}
+                       
+                       {if $encodedEmailAddress}
+                               <dt>{lang}wcf.legalNotice.emailAddress{/lang}</dt>
+                               <dd><a href="mailto:{@$encodedEmailAddress}">{@$encodedEmailAddress}</a></dd>
+                       {/if}
+                       
+                       {if LEGAL_NOTICE_PHONE}
+                               <dt>{lang}wcf.legalNotice.phone{/lang}</dt>
+                               <dd>{LEGAL_NOTICE_PHONE}</dd>
+                       {/if}
+                       
+                       {if LEGAL_NOTICE_FAX}
+                               <dt>{lang}wcf.legalNotice.fax{/lang}</dt>
+                               <dd>{LEGAL_NOTICE_FAX}</dd>
+                       {/if}
+                       
+                       {if LEGAL_NOTICE_REPRESENTATIVE}
+                               <dt>{lang}wcf.legalNotice.representative{/lang}</dt>
+                               <dd>{LEGAL_NOTICE_REPRESENTATIVE}</dd>
+                       {/if}
+                       
+                       {if LEGAL_NOTICE_REGISTER}
+                               <dt>{lang}wcf.legalNotice.register{/lang}</dt>
+                               <dd>{LEGAL_NOTICE_REGISTER}</dd>
+                       {/if}
+                       
+                       {if LEGAL_NOTICE_VAT_ID}
+                               <dt>{lang}wcf.legalNotice.vatID{/lang}</dt>
+                               <dd>{LEGAL_NOTICE_VAT_ID}</dd>
+                       {/if}
+               </dl>
+       </fieldset>
+       
+       {if LEGAL_NOTICE_ADDITIONAL_TEXT}
+               <fieldset>
+                       <legend>{lang}wcf.legalNotice.additionalText{/lang}</legend>
+               
+                       <div class="htmlContent">
+                               {if LEGAL_NOTICE_ADDITIONAL_TEXT_ENABLE_HTML}{@LEGAL_NOTICE_ADDITIONAL_TEXT|language}{else}{@LEGAL_NOTICE_ADDITIONAL_TEXT|language|htmlspecialchars|nl2br}{/if}
+                       </div>
+               </fieldset>
+       {/if}
+</div>
+
+{include file='footer'}
+
+</body>
+</html>