[TASK] update and formatting

This commit is contained in:
TLRZ Seyfferth 2020-01-28 10:41:16 +01:00
parent 9c121fbcc5
commit 571576756e
41 changed files with 7430 additions and 21 deletions

View File

@ -2,11 +2,10 @@
"name": "picocms/pico-composer", "name": "picocms/pico-composer",
"type": "project", "type": "project",
"description": "Pico is a flat file CMS, this means there is no administration backend and database to deal with. You simply create .md files in the \"content\" folder and that becomes a page.", "description": "Pico is a flat file CMS, this means there is no administration backend and database to deal with. You simply create .md files in the \"content\" folder and that becomes a page.",
"keywords": [ "pico", "picocms", "pico-cms", "simple", "flat-file", "cms", "content-management", "website", "markdown-to-html", "php", "markdown", "yaml", "twig", "composer-project" ], "keywords": ["pico", "picocms", "pico-cms", "simple", "flat-file", "cms", "content-management", "website", "markdown-to-html", "php", "markdown", "yaml", "twig", "composer-project"],
"homepage": "http://picocms.org/", "homepage": "http://picocms.org/",
"license": "MIT", "license": "MIT",
"authors": [ "authors": [{
{
"name": "Daniel Rudolf", "name": "Daniel Rudolf",
"email": "picocms.org@daniel-rudolf.de", "email": "picocms.org@daniel-rudolf.de",
"role": "Lead Developer" "role": "Lead Developer"
@ -34,4 +33,4 @@
}, },
"minimum-stability": "beta", "minimum-stability": "beta",
"prefer-stable": true "prefer-stable": true
} }

View File

@ -5,7 +5,7 @@ Author: Christian Seyfferth
Date: 2020-01-21 17:00 Date: 2020-01-21 17:00
Robots: noindex,nofollow Robots: noindex,nofollow
Template: templates/blog/item Template: templates/blog/item
image: %assets_url%/logo.svg image: %theme_url%/img/logo.svg
image_alt: Logo der Website image_alt: Logo der Website
category: Test category: Test
--- ---

12
content/config/index.md Normal file
View File

@ -0,0 +1,12 @@
---
Title: Konfiguration
Description: Konfigurationsseite
Author: Christian Seyfferth
Date: 2020-01-21
Robots: noindex,nofollow
Template: templates/index
---
# Kontakt-Konfiguration
(% contact_admin_config %)

View File

@ -13,4 +13,14 @@ Willkommen auf meiner Seite. Ich hoffe sie gefällt dir.
Sieh dich in Ruhe um, zum Beispiel was ich so zuletzt geschrieben habe, oder an was ich gerade arbeite. Sieh dich in Ruhe um, zum Beispiel was ich so zuletzt geschrieben habe, oder an was ich gerade arbeite.
Wenn du dir verloren vorkommst oder einfach nur etwas loswerden möchtest, bekommst du hier die Möglichkeit. Wenn du dir verloren vorkommst oder einfach nur etwas loswerden möchtest, bekommst du hier die Möglichkeit.
(% contact de :
subject => Kontaktanfrage,
radio "Ich möchte eine Anfrage stellen zu" = einer App | der Webseite |: irgendwas anderes,
select "Ministerium" = Silly walks :| Strange Things,
email!,
message =< Meine Nachricht an dich,
checkbox! Ich weiß was ich tue,
askcopy
%)

View File

@ -1,8 +1,10 @@
<?php // @codingStandardsIgnoreFile <?php
// @codingStandardsIgnoreFile
/** /**
* This file is part of Pico. It's copyrighted by the contributors recorded * This file is part of Pico. It's copyrighted by the contributors recorded
* in the version control history of the file, available from the following * in the version control history of the file, available from the following
* original location: * original location:.
* *
* <https://github.com/picocms/pico-composer/blob/master/index.php> * <https://github.com/picocms/pico-composer/blob/master/index.php>
* *
@ -12,13 +14,13 @@
// load dependencies // load dependencies
// pico-composer MUST be installed as root package // pico-composer MUST be installed as root package
if (is_file(__DIR__ . '/vendor/autoload.php')) { if (is_file(__DIR__.'/vendor/autoload.php')) {
require_once(__DIR__ . '/vendor/autoload.php'); require_once __DIR__.'/vendor/autoload.php';
} else { } else {
die("Cannot find 'vendor/autoload.php'. Run `composer install`."); die("Cannot find 'vendor/autoload.php'. Run `composer install`.");
} }
setlocale(LC_ALL, "de_DE@euro", 'de_DE', 'deu_deu'); setlocale(LC_ALL, 'de_DE@euro', 'de_DE', 'deu_deu');
// instance Pico // instance Pico
$pico = new Pico( $pico = new Pico(

View File

@ -0,0 +1,6 @@
Order deny,allow
Deny from all
<Files ~ "\.css">
Allow from all
</Files>

View File

@ -0,0 +1,103 @@
<?php
/**
* p01-contact for Pico CMS - Simply add contact forms in your pages
*
* This plugin let you add contact forms in your pages by writing simple tags.
* You can also define recipients or create your own complex forms.
*
* This file is the handle of p01-contact for Pico 2.
*
* @link https://github.com/nliautaud/p01contact
* @author Nicolas Liautaud
* @package p01contact
* @version 1.1
*/
require_once 'src/P01contact.php';
class PicoContact extends AbstractPicoPlugin
{
const API_VERSION = 2;
private $P01contact;
/**
* Initialize P01contact and set the default language from Pico settings
*
* Triggered after Pico has read its configuration
*
* @see Pico::getConfig()
* @param array &$config array of config variables
* @return void
*/
public function onConfigLoaded(array &$config)
{
$this->P01contact = new P01C\P01contact();
if (!empty($config['default_language'])) {
$this->P01contact->default_lang = $config['default_language'];
}
}
/**
* Replace (% contact %) tags and contact_admin tags in pages content
*
* Triggered after Pico has prepared the raw file contents for parsing
*
* @see Pico::parseFileContent()
* @see DummyPlugin::onContentParsed()
* @param string &$content prepared file contents for parsing
* @return void
*/
public function onContentPrepared(&$content)
{
// replace config panel (% contact_admin_config %)
$content = preg_replace_callback('`\(%\s*contact_admin_config\s*%\)`', function () {
return '<div>' . $this->P01contact->panel(). '</div>';
}, $content, 1);
// replace debug report (% contact_admin_debug %)
$content = preg_replace_callback('`\(%\s*contact_admin_debug\s*%\)`', function () {
if (!$this->P01contact->config('debug')) {
return '';
}
return '<div>' . $this->P01contact->debugReport() .'</div>';
}, $content, 1);
// replace forms (% contact ... %)
$content = $this->P01contact->parse($content);
}
/**
* Add {{ contact() }} and {{ contact_admin() }} twig functions
* For outputing forms and admin panels from themes templates
*
* Triggered when Pico registers the twig template engine
*
* @see Pico::getTwig()
* @param Twig_Environment &$twig Twig instance
* @return void
*/
public function onTwigRegistered(Twig_Environment &$twig)
{
// {{ contact() }} output the default form
// {{ contact('parameters') }} custom parameters
// {{ contact('fr', 'parameters') }} custom parameters and form-specific language
// {{ contact('fr', null) }} default form with form-specific language
$twig->addFunction(new Twig_SimpleFunction('contact', function ($a = null, $b = null) {
if ($b) {
return $this->P01contact->newForm($b, $a);
}
return $this->P01contact->newForm($a);
}));
// {{ contact_admin('debug') }} output the debug report
// {{ contact_admin('config') }} output the config panel
$twig->addFunction(new Twig_SimpleFunction('contact_admin', function ($type) {
if ($type == 'debug' && $this->P01contact->config('debug')) {
return $this->P01contact->debugReport();
}
if ($type == 'config') {
return $this->P01contact->panel();
}
}));
}
}

View File

@ -0,0 +1,31 @@
{
"default_email": "info@chrosey.de",
"lang": "de",
"message_len": "",
"default_params": "name!, email!, subject!, message!",
"separator": ",",
"logs_count": "10",
"checklist": [
{
"name": "",
"type": "blacklist",
"content": ""
},
{
"name": "",
"type": "blacklist",
"content": ""
},
{
"name": "",
"type": "blacklist",
"content": ""
}
],
"use_honeypot": "on",
"min_sec_after_load": "3",
"min_sec_between_posts": "5",
"max_posts_by_hour": "10",
"recaptcha_public_key": "",
"recaptcha_secret_key": ""
}

View File

@ -0,0 +1,86 @@
---
# Bulgarian language file for p01-contact
key: bg
name: Bulgarian
english_name: Bulgarian
authors: Panayot Kuyvliev
date: "2011-10-22"
compatibility: 1.1
strings:
# fields
name: Име
email: Email
address: Адрес
tel: Телефон
url: Уебсайт
subject: Относно
message: Съобщение
file: Прикачи
captcha: Captcha
reload: Презареди
fieldcaptcha: Грешен код
askcopy: Прати ми копие на това съобщение
send: Прати
# email words
askedcopy: Поискано е копие на това съобщение
anonymous: Анонимен
nosubject: (Няма тема)
email_title: Съобщението е изпратено от
# status messages
sent: Съобщението е изпратено.
error: "Грешка : съобщението не е изпратено."
disable: Контактната форма е недостъпна.
error_notarget: Тази контактна форма няма получател.
token: Съобщението вече е изпратено.
# fields errors
field_required: Това поле е задължително
field_email: Моля използвайте валиден имейл адрес
field_tel: Моля използвайте валиден телефонен номер
field_url: Моля напишете валиден уеб адрес
field_message: Моля напишете по дълго съобщение
field_captcha: Моля копирайте следния текст
field_fieldcaptcha: Моля не попълвайте това поле
field_password: Грешна парола
# configuration panel
config_title: p01contact Настройки
# messages
config_updated: Твоите промени са запазени успешно.
config_error_open: "<b>Конфигуриращият файл не може да бъде отворен.</b> Проверете дали файла съществува и неговата достъпност :"
# New release alert
new_release: Има нова версия!
download: Свали последната версия
# Links
doc: Документация
forum: Форум
# Parameters
enable: Пусни
enable_sub: Пускане и спиране изпращането на съобщения (без да се скрива контактната форма).
default_email: Емейл по подразбиране
default_email_sub: Оставете празно, за да го настроите да
lang: Език
lang_sub: Езикът по подразбиране е
default_params: Параметри по подразбиране
message_len: Минимална големина на съобщението
blacklist: Черен списък
whitelist: Бял списък
checklists_sub: "Черен списък: стойности, които не трябва да присъстват в областта за изпращане на имейл <br />. Бял списък: Възможните стойности от значение за областта, за да изпратите имейл <br />. Разделени със запетаи."
general_fields: Общи полета
special_fields: Специални полета
debug_sub: Изключване на изпращането на съобщения, display p01-contact data structure, data sent by POST and the email that would have been sent.

View File

@ -0,0 +1,128 @@
---
# Czech language file for p01-contact
key: cz
name: Czech
english_name: Czech
authors: Seva, princezna
date: "2017-10-31"
compatibility: 1.1
strings:
# basic fields
text: text
textarea: textové pole
password: heslo
file: příloha
# html5 inputs types
color: barva
date: datum
email: email
month: měsíc
number: číslo
range: rozsah
search: hledání
tel: telefonní číslo
time: čas
url: URL
week: týden
# other fields
name: jméno
subject: předmět
message: zpráva
address: poštovní adresa
askcopy: pošlete mi kopii tohoto mailu
captcha: captcha
# actions
send: Odeslat
reload: Znovu načíst
reset: Vyresetovat
# received email
askedcopy: Kopie tohoto e-mailu je požadována
anonymous: Anonym
nosubject: (Bez předmětu)
email_title: E-mail odeslán z
# confirmations
sent: Email byl odeslán.
sent_debug: Email byl virtuálně odeslán (je zapnutý debug mode).
sent_copy: Email byl odeslán. Kopie byla zaslána na zadanou adresu.
sent_copy_error: Email byl odeslán, ale nepovedlo se zaslat kopii.
sent_already: Zpráva již byla odeslána.
# errors
error: "Chyba : žádná zpráva se neposlala."
error_notarget: Tento kontaktní formulář nemá žádného příjemce.
error_honeypot: Blip. Blop. Blup. Byl jste rozpoznán jako robot.
error_pageload: Blip. Blop. Blup. Odesíláte zprávy tak často, jako robot. Počkejte prosím pár vteřin.
error_lastpost: Odeslal jste email před chvilkou. Počkejte prosím chvíli.
error_postcount: Odeslal jste příliš mnoho emailů během poslední hodiny.
# fields errors
field_required: Musíte vyplnit toto pole
field_email: Prosím vložte platný e-mail
field_tel: Prosím vložte platné telefonní číslo
field_url: Prosím vložte platnou webovou adresu
field_message: Prosím napište delší zprávu
field_captcha: Prosím vyplňte captchu
field_password: Špatné heslo
field_blacklist: Toto pole obsahovalo zakázané slova
field_whitelist: V tomto poli něco chybí
# configuration panel
config_title: p01contact konfigurace
config_updated: Změny byly úspěšně uloženy.
config_error_open: <b>Nepovedlo se otevřít konfigurační soubor.</b> Ověřte, jestli existuje a jeho přístupová práva
config_error_modify: <b>Nepovedlo se změnit konfigurační soubor.</b> Ověřte jeho přístupová práva"
# infos
new_release: Existuje vydána nová verze!
download: Stáhnout poslední verzi
repo: Github
wiki: Dokumentace / Wiki
issues: Nápověda / nahlásit chybu
# settings
disable: Vypnout všechny formuláře
disable_sub: Vypne posílání emailu, ale neskryje kontaktní formuláře.
default_email: Výchozí emaily
default_email_sub: Jedna nebo více emailových adres, oddělených čárkou, na které přijdou zprávy ze všech formulářů.
default_params: Výchozí parametry
default_params_sub: Výchozí struktura formuláře. Více detailů v dokumentaci.
lang: Jazyk
lang_sub: Výchozí jazyk je nastaven na
message_len: Minimální délka zprávy
message_len_sub: Minimální počet znaků znaků pro políčka se zprávou.
separator: Oddělovač
separator_sub: "Oddělovač v definici formulářů. Např. čárka, středník, dvě svislítka..."
logs_count: Velikost logu
logs_count_sub: Maximální počet položek které mají být uchovány v logu.
checklists: Checklisty
blacklist: Blacklist
whitelist: Whitelist
checklists_sub: Blacklist je seznam zakázaných hodnot v daném typu pole, a whitelist je seznam jediných povolených hodnot pro daný typ pole. Položky by měly být odděleny čárkou.
use_honeypot: Použít skryté honeypot políčko
use_honeypot_sub: Přidá do každého formuláře skryté pole, které lidé neuvidí, ale většina spam botů ho vyplní a spadnou tak do pasti.
min_sec_after_load: Minimální čas po načtení stránky
min_sec_after_load_sub: Minimální počet sekund mezi načtením stránky a odesláním formuláře. Lidé potřebují čas, aby si formulář přečetli, roboti nikoliv.
min_sec_between_posts: Minimální čas mezi dvěma odesláními
min_sec_between_posts_sub: Minimální počet sekund mezi dvěma odesláními formuláře (od stejného člověka).
max_posts_by_hour: Maximální počet odeslání za hodinu
max_posts_by_hour_sub: Limituje počet odeslaných zpráv jedním člověkem.
captcha_info: Nativní anti-spam and anti-error mechanismy by měly zabránit všem podezřelým zprávám. Pokud potřebujete ještě vyšší úrove ochrany, můžete vytvořit vlastní captchu přidáním pole s povinnou odpovědí. Můžete také vložit Google reCaptcha použitím <em>captcha</em> pole s následujícím nastavením.
recaptcha_public_key: reCaptcha public key
recaptcha_public_key_sub: Google reCaptcha public key.
recaptcha_secret_key: reCaptcha secret key
recaptcha_secret_key_sub: Google reCaptcha secret key.
debug: Debug mód
debug_sub: Vypne odesílání e-mailu a zobrazí strukturu p01-contact pluginu, data odeslaná přes POST a email co by byl poslán.
debug_warn: Neaktivujte na veřejně přístupné stránce!

View File

@ -0,0 +1,93 @@
---
# Danish language file for p01-contact
key: da
name: Danish
english_name: Danish
authors: Christian Sand <http://www.cobyte.dk>
date: "2011-10-27"
compatibility: 1.1
strings:
# fields
name: Navn
email: Mail
address: Addresse
tel: Telefon
url: Hjemmeside
subject: Emne
message: Besked
file: Tilføj
captcha: Captcha
reload: Genindlæs
fieldcaptcha: "<b>Undlad</b> at udfylde følgende felt:"
askcopy: Send kopi af mail
send: Afsend
# email words
askedcopy: Der er blevet bedt om en kopi af denne mail
anonymous: Uden afsender
nosubject: (Intet emne)
email_title: Mail afsendt fra
# status messages
sent: Mail afsendt.
error: "Fejl: Beskeden blev ikke afsendt."
disable: Kontaktformularen er slået fra.
error_notarget: Kontaktformularen indeholder ingen modtager.
token: Beskeden er allerede afsendt.
# fields errors
field_required: Udfyld dette tekstfelt
field_email: Benyt en gyldig mailadresse
field_tel: Benyt et gyldigt telefonnummer
field_url: Skriv en gyldig hjemmesideadresse
field_message: Skriv en længere meddelelse
field_captcha: Kopier den følgende tekst
field_fieldcaptcha: Undlad at udfylde dette tekstfelt
field_password: Ugyldigt kodeord
# configuration panel
config_title: Opsætning
# messages
config_updated: Dine ændringer blev gemt.
config_error_open: "<b>Opsætningsfilen kan ikke læses.</b> Undersøg at filen eksisterer, og at du har rettigheder til filen:"
config_error_modify: "<b>Opsætningsfilen kan ikke ændres.</b> Undersøg, at du har rettigheder til filen:"
# New release alert
new_release: Der er kommet en ny version!
download: Hent den seneste version
# Links
doc: Dokumentation
forum: Hjælp
# Parameters
enable: Afsendelse af mail
enable_sub: Aktiver eller afbryd afsendelse af mail (skjuler ikke kontaktformularen).
default_email: Webstedet standardmail
default_email_sub: Undlad at udfylde for at benytte
lang: Sprog
lang_sub: "Standardsproget er indstillet til:"
default_params: Udformning af kontaktformular
default_params_sub: Benyt etikettesyntaks som beskrevet i dokumentation.
message_len: Beskedens mindstelængde
message_len_sub: Mindste antal karakterer i beskedfelt.
checklists: Tjekliste
blacklist: Bandlyst
whitelist: Påkrævet
checklists_sub: Rediger tjeklisten med bandlyste værdier, som mailen ikke må indeholde, eller med værdier som er påkrævede for afsendelse af mail.<br /> De enkelte værdier separeres med komma.
general_fields: Generelle værdier
special_fields: Specifikke værdier
debug: Fejlfindingstilstand
debug_sub: Afbryd afsendelse af mail. Gennemse filstrukturen for p01-kontaktdata; revider data sendt af POST og data for mailen, som skulle være afsendt.
debug_warn: Aktiver ikke fejlfinding på et fungerende websted!

View File

@ -0,0 +1,126 @@
---
# German language file for p01-contact
key: de
name: Deutsch
english_name: German
authors: Martin Köhler, sonst-was
date: "2011-10-27"
compatibility: 1.1
strings:
# basic fields
text: Text
textarea: Textbereich
password: Passwort
file: Anhang
# html5 inputs types
color: Farbe
date: Datum
email: E-Mail
month: Monat
number: Nummer
range: Bereich
search: Suche
tel: Telefonnummer
time: Zeit
url: Website
week: Woche
# other fields
name: Name
subject: Betreff
message: Nachricht
address: Anschrift
captcha: Captcha
askcopy: Eine Kopie an mich senden
# actions
send: Senden
reload: Neu laden
reset: Zurücksetzen
# received email
askedcopy: Eine Kopie wurde angefordert
anonymous: Anonym
nosubject: (kein Betreff)
email_title: Nachricht gesendet von
# confirmations
sent: Nachricht verschickt.
sent_debug: Nachricht virtuell verschickt (Debugmodus ist aktiviert).
sent_copy: Nachricht verschickt. Eine Kopie wurde an die angegebene Adresse geschickt.
sent_copy_error: Nachricht verschickt, beim Senden der Kopie gab es jedoch einen Fehler.
sent_already: Die Nachricht wurde bereits verschickt.
# errors
error: "Fehler : Nachricht wurde nicht verschickt."
error_notarget: Das Kontaktformular hat keinen Empfänger.
error_honeypot: Blubber di blubb, Sie sind in den Honigtopf für Roboter gefallen.
error_pageload: Blubber di blubb, Sie sind schnell wie ein Robter, bitte warten Sie einige Sekunden.
error_lastpost: Sie haben erst vor kurzem abgeschickt, bitte einen Moment warten.
error_postcount: Sie haben innerhalb einer Stunde zu häufig abgeschickt.
# fields errors
field_required: Dieses Feld ist obligatorisch
field_email: Bitte korrekte E-Mail-Adresse verwenden
field_tel: Bitte korrekte Telefonnummer verwenden
field_url: Bitte korrekte Internetadresse angeben
field_message: Bitte umfangreichere Nachricht schreiben
field_captcha: Folgendes bitte abschreiben
field_password: Passwort falsch
field_blacklist: Dieses Feld enthält nicht erlaubte Worte.
field_whitelist: Dieses Feld enthält erforderliche Worte nicht.
# configuration panel
config_title: p01contact Konfiguration
config_updated: Änderungen wurden gespeichert.
config_error_open: <b>Kann Konfiguration nicht öffnen.</b> Bitte überprüfen ob Datei vorhanden ist und korrekte Berechtigungen hat
config_error_modify: <b>Kann Konfiguration nicht ändern.</b> Bitte Berechtigungen überprüfen
# infos
new_release: Es gibt eine neue Version!
download: Aktuelle Version herunterladen
repo: Github
wiki: Dokumentation / Wiki
issues: Hilfe / Fehler melden
# settings
disable: Alle Formulare deaktivieren
disable_sub: Deaktiviert E-Mail-Versand ohne das Kontaktformular zu verstecken.
default_email: Standard-E-Mail-Adresse
default_email_sub: Eine oder mehrere E-Mail-Adressen (durch Komma separiert), welche E-Mails aller Formulare erhalten.
default_params: Standardwerte
default_params_sub: Standardstruktur. Bitte Syntax laut Dokumentation verwenden.
lang: Sprache
lang_sub: Standardsprache ist
message_len: Mindestzeichenzahl
message_len_sub: Mindestanzahl an Zeichen im Nachrichtenfeld.
separator: Trennzeichen
separator_sub: "Trennzeichen für Formular-MarkUp. Zum Beispiel Komma, Semikolon, ..."
logs_count: Anzahl Logs
logs_count_sub: Maximale Anzahl an Einträgen in Logs.
checklists: Feldercheckliste
blacklist: Blacklist
whitelist: Whitelist
checklists_sub: Eine Blacklist ist eine Liste verbotener Werte im jeweiligen Feldtyp und eine Whitelist ist eine Liste mit Werten ausschließlich erlaubt sind. Durch Kommata abgetrennt.
use_honeypot: Verstecktes Feld nutzen (Honigtopf)
use_honeypot_sub: Fügt ein verstecktes Feld zu jedem Formular hinzu, welches von Menschen nicht ausgefüllt werden kann. Viele Roboter füllen es jedoch aus.
min_sec_after_load: Minimale Zeit seit Seitenaufruf
min_sec_after_load_sub: Minimale Anzahl Sekunden die zwischen Seitenaufruf und Abschicken vergangen sein muss. Menschen brauchen einige Zeit um das Formular auszufüllen und abzuschicken, Roboter dagegen nicht.
min_sec_between_posts: Minimale Zeit zwischen Einsendungen
min_sec_between_posts_sub: Minimale Anzahl Sekunden zwischen zwei Einsendungen des gleichen Nutzers.
max_posts_by_hour: Maximale Einsendungen pro Stunde
max_posts_by_hour_sub: Maximale Einsendungen pro Stunde und Nutzer
captcha_info: Die nativen Anti-Spam Mechanismen sollten alle unerwünschte Einsendungen blockieren. Wenn mehr Sicherheit benötigt wird, kann ein benutzerdefiniertes Feld genutzt werden mit einer erforderlichen Antwort. Alternativ kann ein Google reCaptcha mit <em>captcha</em> und unten aufgeführten Einstellungen eingefügt werden.
recaptcha_public_key: reCaptcha öffentlicher Schlüssel
recaptcha_public_key_sub: Google reCaptcha öffentlicher Schlüssel.
recaptcha_secret_key: reCaptcha geheimer Schlüssel
recaptcha_secret_key_sub: Google reCaptcha geheimer Schlüssel.
debug: Debugmodus
debug_sub: E-Mail versand deaktiveren, Datenstruktur von p01-contact anzeigen, Daten per POST verschickt und die E-Mail, die verschickt worden waere.
debug_warn: Nicht im Produktivbetrieb verwenden!

View File

@ -0,0 +1,126 @@
---
# English language file for p01contact
key: en
name: English
english_name: English
authors: Nicolas Liautaud
date: "2011-10-23"
compatibility: 1.1
strings:
# basic fields
text: text
textarea: text area
password: password
file: attachment
# html5 inputs types
color: color
date: date
email: email
month: month
number: number
range: range
search: search
tel: phone number
time: time
url: URL
week: week
# other fields
name: name
subject: subject
message: message
address: postal address
askcopy: send me a copy of this email
captcha: captcha
# actions
send: Send
reload: Reload
reset: Clear this form
# received email
askedcopy: A copy of this email have been requested
anonymous: Anonymous
nosubject: (No subject)
email_title: Mail sent from
# confirmations
sent: Email sent.
sent_debug: Email virtually sent (debug mode enabled).
sent_copy: Email sent. A copy have been sent to the specified address.
sent_copy_error: Email sent, but there was an issue when sending you the copy.
sent_already: The message have already been sent.
# errors
error: "Error : no message was sent."
error_notarget: This contact form has no recipient.
error_honeypot: Blip. Blop. Blup. You felt in the honeypot for robots.
error_pageload: Blip. Blop. Blup. You're as fast as a robot. Please wait a few seconds.
error_lastpost: You submitted just recently. Please wait a bit.
error_postcount: You submitted too much times this hour.
# fields errors
field_required: This field is required
field_email: Please use a valid email address
field_tel: Please use a valid phone number
field_url: Please write a valid web address
field_message: Please write a longer message
field_captcha: Please answer correctly the following captcha
field_password: Wrong password
field_blacklist: This field contains prohibited terms
field_whitelist: An expected value is missing
# configuration panel
config_title: p01contact configuration
config_updated: Your changes were saved successfully.
config_error_open: <b>Unable to open config file.</b> Check if the file exists and its permissions
config_error_modify: <b>Unable to modify config file.</b> Check the file permissions"
# infos
new_release: There is a new release!
download: Download the last version
repo: Github
wiki: Documentation / Wiki
issues: Help / report a bug
# settings
disable: Disable all forms
disable_sub: Disable mail sending, without hiding the contact forms.
default_email: Default emails
default_email_sub: One ore more email addresses, separated by commas, that will receive mails from every forms.
default_params: Default parameters
default_params_sub: Default form structure. Use syntax described in documentation.
lang: Language
lang_sub: Default language is set to
message_len: Messages minimum length
message_len_sub: Minimum number of characters for message fields.
separator: Separator
separator_sub: "Parameters separator in forms markup. Ex: comma, semicolon, double-pipe..."
logs_count: Logs number
logs_count_sub: Maximum number of entries to keep on logs.
checklists: Fields checklists
blacklist: Blacklist
whitelist: Whitelist
checklists_sub: A blacklist is a list of prohibited values in the given field type, and a whitelist is a list of the only possible values for the given field type. Each term should be separated by commas.
use_honeypot: Use hidden honeypot field
use_honeypot_sub: Add to every forms a hidden field that should not be filled. Humans won't see it, but most spam bots will fell in the trap.
min_sec_after_load: Minimum time after page load
min_sec_after_load_sub: Minimum number of seconds between a page load and a form submission. Fellow humans need at least a few seconds to read, fill and submit a form. Robots don't.
min_sec_between_posts: Minimum time between two submissions
min_sec_between_posts_sub: Minimum number of seconds between two form submissions by a same user.
max_posts_by_hour: Maximum submissions by hour
max_posts_by_hour_sub: Maximum number of submissions every hour by user.
captcha_info: The native anti-spam and anti-error mechanisms should prevent all undesirable submissions. If you need a higher level of security you can create a custom captcha by adding a field with a required answer. Finally, you can insert a Google reCaptcha by using a <em>captcha</em> field with the below settings.
recaptcha_public_key: reCaptcha public key
recaptcha_public_key_sub: Google reCaptcha public key.
recaptcha_secret_key: reCaptcha secret key
recaptcha_secret_key_sub: Google reCaptcha secret key.
debug: Debug mode
debug_sub: Disable mail sending, display p01-contact data structure, data sent by POST and the email that would have been sent.
debug_warn: Don't active that on production website!

View File

@ -0,0 +1,92 @@
---
# Spanish language file for p01-contact
key: es
name: Spanish
english_name: Spanish
authors: Carlos Navarro, Daniel A. Rodriguez
date: "2011-10-27"
compatibility: 1.1
strings:
# fields
name: Nombre
email: Correo electrónico
address: Dirección postal
tel: Teléfono
url: Sitio web
subject: Asunto
message: Mensaje
file: Archivo adjunto
captcha: Captcha
reload: Recargar
askcopy: Enviar copia por Correo electrónico
send: Enviar
# email words
askedcopy: Se ha solicitado una copia de este mensaje
anonymous: Anónimo
nosubject: (Sin asunto)
email_title: Correo electrónico enviado desde
# status messages
sent: Correo electrónico enviado.
error: "Error: mensaje no enviado."
disable: Plugin de Contacto desactivado.
error_notarget: Este formulario de contacto no tiene destinatario.
token: El mensaje ya ha sido enviado.
# fields errors
field_required: Campo obligatorio
field_email: Es necesaria una dirección de correo electrónico válida
field_tel: Es necesario un número de teléfono válido
field_url: Es necesaria una dirección web válida
field_message: El mensaje ha de ser más largo
field_captcha: Copiar el siguiente texto
field_fieldcaptcha: Por favor, no complete este campo
field_password: Clave incorrecta
# configuration panel
config_title: Configuración de p01contact
# messages
config_updated: Sus cambios han sido guardados.
config_error_open: "<b>No se puede abrir el archivo de configuración.</b> Verifique que el archivo exista y sus permisos:"
config_error_modify: "<b>No se puede modificar el archivo de configuración.</b> Verifique los permisos:"
# New release alert
new_release: Nueva versión disponible!
download: Descargue la última versión
# Links
doc: Documentación
forum: Foro
# Parameters
enable: Habilitar
enable_sub: Habilitar o desabilitar el envío de correo (no oculta el formulario).
default_email: Remitente predeterminado
default_email_sub: Dejar en blanco para autocompletado
lang: Idioma
lang_sub: El idioma predeterminado se ha establecido a
default_params: Parámetros predeterminados
default_params_sub: Etiqueta predeterminado para estructura de formulario. Use la sintáxis descrita en la documentación.
message_len: Longitud mínima del mensaje
message_len_sub: Cantidad mínima de caracteres para los campos del mensaje.
checklists: Checklists
blacklist: Lista negra
whitelist: Lista blanca
checklists_sub: "Lista negra : valores que no deben estar presentes en el campo para envío de mensajes.<br />Lista blanca : posibles valores requeridos para el campo de envío de mensajes.<br />Separados por comas"
general_fields: Campos generales
special_fields: Campos escpeciales
debug: Modo debug
debug_sub: Deshabilitar envío de mensajes, mostrar la estructura de datos de display p01-contact, datos enviados por POST y el mensaje que debería haber sido enviado.
debug_warn: No activar en sitios en producción!

View File

@ -0,0 +1,117 @@
---
# French language file for p01contact"
key: fr
name: Français
english_name: French
authors: Nicolas Liautaud
date: "2011-10-23"
compatibility: 1.1
strings:
# basic fields
text: texte
textarea: champ de texte
password: mot de passe
file: pièce jointe
# html5 inputs types
color: couleur
date: date
email: adresse email
month: mois
number: nombre
range: valeur
search: recherche
tel: numéro de téléphone
time: heure
url: URL
week: semaine
# other fields
name: nom
subject: objet
message: message
address: adresse postale
askcopy: envoyez-moi une copie de cet email
captcha: captcha
# actions
send: envoyer
reload: recharger
reset: remettre à zéro
# received email
askedcopy: Une copie de cet email a été demandée
anonymous: Anonyme
nosubject: (Pas d'objet)
email_title: Email envoyé depuis
# confirmations
sent: Email envoyé.
sent_debug: Email virtuellement envoyé (mode debug actif).
sent_copy: Email envoyé. Une copie a été envoyée à l'addresse spécifiée.
sent_copy_error: Email envoyé, mais il y a eu un problème lors de l'envoie de votre copie.
sent_already: Le formulaire a déjà été envoyé.
# errors
error: "Erreur : aucun message n'a été envoyé."
error_notarget: Ce formulaire de contact n'a pas de destinataire.
error_honeypot: Blip. Blop. Blup. Vous êtes tombé dans le piège à robot.
error_pageload: Blip. Blop. Blup. Vous êtes aussi rapide qu'un robot. Veuillez attendre quelques secondes.
error_lastpost: Vous venez d'utiliser ce formulaire. Merci d'attendre un peu.
error_postcount: Vous avez trop utilisé ce formulaire cette heure ci.
# fields errors
field_required: Ce champ est obligatoire
field_email: Veuillez entrer une adresse email valide
field_tel: Veuillez entrer un numéro de téléphone valide
field_url: Veuillez entrer une adresse internet valide
field_message: Veuillez écrire un message plus long
field_captcha: Veuillez recopier le texte ci-dessous
field_password: Mot de passe incorrect
field_blacklist: Ce champ contiens des termes prohibés
field_whitelist: Une valeur attendue est manquante
# configuration panel
config_title: Configuration de p01contact
config_updated: Vos modifications ont été enregistrées avec succès.
config_error_open: <b>Impossible d'ouvrir le fichier de configuration.</b> Vérifiez s'il existe et ses permissions
config_error_modify: <b>Impossible de modifier le fichier de configuration.</b> Vérifiez ses permissions
# infos
new_release: Il y a une nouvelle version!
download: Télécharger la dernière version
repo: Github
wiki: Documentation / Wiki
issues: Aide / rapporter un bug
# settings
disable: Désactiver tous les formulaires
disable_sub: Désactive l'envoi de mail, sans cacher les formulaires.
default_email: Emails par défaut
default_email_sub: Une addresse email ou plus, séparées par des virgules, qui reçevront les mails de tous les formulaires.
default_params: Paramètres par défaut
default_params_sub: Structure des formulaires pour les balises par défaut. Utilisez la syntaxe décrite dans la documentation.
lang: Langue
lang_sub: La langue par défaut est définie à
message_len: Longueur minimum des messages
message_len_sub: Nombre minimum de caractères authorisé pour les champs message
checklists: Listes de vérification des champs
blacklist: Liste noire
whitelist: Liste blanche
checklists_sub: Une liste noire est une liste de valeurs qui ne doivent pas être présentes dans un champ pour envoyer le mail, une liste blanche est une liste de valeurs possibles devant être présentes dans un champ pour envoyer le mail. Chaque terme est séparé par des virgules.
use_honeypot: Utiliser le champ honeypot
use_honeypot_sub: Ajoute à chaque formulaire un champ caché qui ne doit pas être rempli. Les humains ne le voient pas, mais les robots de spam tombent dans le piège.
min_sec_after_load: Temps minimium au chargement de la page
min_sec_after_load_sub: Nombre minimum de secondes entre le chargement de la page et l'envoi d'un formulaire. Les humains ont besoin d'au moins quelques secondes pour lire, remplir et valider un formulaire. Pas les robots.
min_sec_between_posts: Temps minimum entre deux envois
min_sec_between_posts_sub: Nombre minimum de secondes entre deux envois de formulaires par un même visiteur.
max_posts_by_hour: Nombre d'envoi maximum par heure
max_posts_by_hour_sub: Nombre maximum de soumission d'un formulaire par heure et par visiteur.
captcha_info: Les mécanismes anti-spam et anti-erreurs devraient prévenir l'intégralité des envois indésirables. En cas de besoin d'un niveau de sécurité supérieur, vous pouvez créer un champ personnalisé avec une valeur requise. Finalement, vous pouvez insérer un reCaptcha Google en utilisant un champ <em>captcha</em> avec les paramètres suivants.
recaptcha_public_key: Clé publique reCaptcha
recaptcha_public_key_sub: Clé publique Google reCaptcha.
recaptcha_secret_key: Clé secrète reCaptcha
recaptcha_secret_key_sub: Clé secrète Google reCaptcha.
debug: Mode debug
debug_sub: Désactive l'envoi de mails, affiche les structures de données de P01contact, les données envoyées par POST et les mails qui auraient été envoyés.
debug_warn: A ne pas activer sur un site en production !

View File

@ -0,0 +1,126 @@
---
# Italian language file for p01-contact
key: it
name: Italiano
english_name: Italian
authors: Nicola Sarti, Nicola Scattaglia
date: "2017-10-23"
compatibility: 1.1
strings:
# basic fields
text: testo
textarea: area di testo
password: password
file: file
# html5 inputs types
color: colore
date: data
email: email
month: mese
number: numero
range: range
search: cerca
tel: telefono
time: orario
url: URL
week: settimana
# other fields
name: nome
subject: soggetto
message: messaggio
address: indirizzo postale
askcopy: invia anche a me una copia
captcha: captcha
# actions
send: invia
reload: ricarica
reset: Pulisci il form
# received email
askedcopy: È stata richiesta una copia di questa email
anonymous: Anonimo
nosubject: (Nessun oggetto)
email_title: Inviata da
# confirmations
sent: Email inviata.
sent_debug: Email virtualmente inviata (abilitata modalità debug).
sent_copy: Email inviata. Una copia è stata inviata all'indirizzo specificato.
sent_copy_error: Email inviata, ma si è verificato un errore nell'invio della copia.
sent_already: Il messaggio è già stato inviato.
# errors
error: "Errore : nessun messaggio inviato."
error_notarget: Questo form di contatto non ha nessun destinatario.
error_honeypot: Blip. Blop. Blup. Sei caduto nell'honeypot per i robot.
error_pageload: Blip. Blop. Blup. Sei veloce quanto un robot. Attendi per favore.
error_lastpost: Hai appena inviato. Attendi qualche istante.
error_postcount: Hai inviato troppo in questa ora.
# fields errors
field_required: Campo richiesto
field_email: Per favore usa un indirizzo email valido
field_tel: Per favore usa un numero di telefono valido
field_url: Per favore usa un indirizzo web valido
field_message: Per favore inserisci un maggior numero di caratteri
field_captcha: Per favore rispondi correttamente al seguente captcha
field_password: Password errata
field_blacklist: Questo campo contiene parole non permesse
field_whitelist: Un valore è mancante
# configuration panel
config_title: Configurazione p01contact
config_updated: Le modifiche sono state applicate.
config_error_open: "<b>Impossibile aprire il file di configurazione.</b> Controlla che esista e i suoi permessi :"
config_error_modify: "<b>Impossibile modificare il file di configurazione.</b> Controlla i permessi di accesso :"
# infos
new_release: È disponibile una nuova release!
download: Scarica l'ultima versione
repo: Github
wiki: Documentazione / Wiki
issues: Aiuto / Segnala un bug
# settings
disable: Disabilita tutti i form
disable_sub: Disabilita invio mail, senza nascondere i form di contatto.
default_email: Email di default
default_email_sub: Uno o più indirizzi, separati da virgola, che riceveranno tutte le mail dei form.
default_params: Parametri di default
default_params_sub: Struttura form di default. Usa la sintassi descritta nella documentazione.
lang: Lingua
lang_sub: La lingua di default è impostata in
message_len: Lunghezza minima del messaggio
message_len_sub: Numero minimo di caratteri per il campo messaggio.
separator: Separatore
separator_sub: "Separatore parametri nel markup dei form. Es: virgola, punto e virgola, doppia barra verticale..."
logs_count: Numero di log
logs_count_sub: Numero massimo di voci da tenere nei log.
checklists: Checklist dei campi
blacklist: Blacklist
whitelist: Whitelist
checklists_sub: "Una blacklist è una lista di valori che non devono essere presenti nel campo per inviare l'email, una whitelist è una lista di possibili valori richiesti nel campo per inviare l'email. Separati da virgola"
use_honeypot: Usa campo honeypot nasconsto
use_honeypot_sub: Aggiunge ad ogni form, un campo nascosto da non compilare. Le persone non lo vedranno, ma i bot spam cadranno nella trappola.
min_sec_after_load: Tempo minimo dopo il caricamento pagina
min_sec_after_load_sub: Numero minimo di secondi tra il caricamento pagina e l'invio del form. Le persone hanno bisogno di almeno qualche secondo per leggere, compilare e inviare un form. I robot no.
min_sec_between_posts: Tempo minimo tra due invii
min_sec_between_posts_sub: Tempo minimo di secondi fra l'invio di due form da parte dello stesso utente.
max_posts_by_hour: Invii massimi in un'ora
max_posts_by_hour_sub: Numero massimo di invii per ogni ora da un utente.
captcha_info: I meccasismi anti-spam e anti-errore dovrebbero prevenire tutti gli invii indesiderati. Se hai bisogno di un livello più alto di sicurezza puoi creare un captcha personalizzato aggiungendo un campo con una risposta obbligatoria. Infine, puoi inserire un Google reCaptcha usando un campo <em>captcha</em> con le seguenti impostazioni.
recaptcha_public_key: reCaptcha public key
recaptcha_public_key_sub: Google reCaptcha public key.
recaptcha_secret_key: reCaptcha secret key
recaptcha_secret_key_sub: Google reCaptcha secret key.
debug: Modalità debug
debug_sub: Disabilita l'invio di email, mostra la data structure di p01-contact , i dati inviati da POST e l'email che sarebbe stata inviata.
debug_warn: Non attivarlo sul sito di produzione!

View File

@ -0,0 +1,93 @@
---
# Italian language file for p01-contact
key: ka
name: Georgian (Kartuli)
english_name: Georgian (Kartuli)
authors: Temur Danelia
date: "2011-10-27"
compatibility: 1.1
strings:
# fields
name: სახელი
email: ელფოსტა
address: მისამართი
tel: ტელეფონის ნომერი
url: ვებგვერდი
subject: სათაური
message: წერილის ტექსტი
file: მიმაგრებული
captcha: Captcha
reload: ხელახლა ჩატვირთვა
fieldcaptcha: "<b>არ</b> შეავსოთ ეს ველი :"
askcopy: გამომიგზავნეთ ამ წერილის ასლი
send: გაგზავნა
# email words
askedcopy: ამ წერილის ასლი მიუვიდა გამომგზავნს
anonymous: ანონიმური
nosubject: (სათაურის გარეშე)
email_title: წერილის ავტორი
# status messages
sent: წერილი გაიგზავნა.
error: "შეცდომა : წერილი არ გაიგზავნა."
disable: კონტაქტის ფორმა გამორთულია.
error_notarget: ამ კონტაქტის ფორმას არ ჰყავს ადრესატი.
token: წერილი უკვე გაიგზავნა.
# fields errors
field_required: ამ ველის შევსება სავალდებულოა
field_email: გამოიყენეთ არსებული ელფოსტა
field_tel: გამოიყენეთ არსებული ტელეფონის ნომერი
field_url: შეიყვანეთ არსებული ვებგვერდის მისამართი
field_message: წერილის ტექსტი ძალიან მოკლეა
field_captcha: დააკოპირეთ შემდეგი ტექსტი
field_fieldcaptcha: არ შეავსოთ ეს ველი
field_password: არასწორი პაროლი
# configuration panel
config_title: p01contact-ის კონფიგურაცია
# messages
config_updated: ცვლილებები წარმატებით შეინახა.
config_error_open: "<b>config ფაილის გახსნა შეუძლებელია.</b> გადაამოწმეთ რომ ფაილი არსებობს და მისი დაშვებებია :"
config_error_modify: "<b>config ფაილის შეცვლა შეუძლებელია.</b> გადაამოწმეთ ფაილის დაშვებები :"
# New release alert
new_release: არსებობს ჩანართის უფრო ახალი ვერსია!
download: გადმოწერეთ ჩანართის ბოლო ვერსია
# Links
doc: დოკუმენტაცია
forum: ფორუმი
# Parameters
enable: ჩართვა
enable_sub: წერილის გაგზავნის ფუნქციის ჩართვა ან გამორთვა (საკონტაქტო ფორმა არ დაიმალება).
default_email: ნაგულისხმები ელფოსტა
default_email_sub: დატოვეთ ცარიელი რათა დაყენდეს
lang: ენა
lang_sub: ნაგულისხმებ ენად დაყენებულია
default_params: ნაგულისხმები პარამეტრები
default_params_sub: ფორმის ნაგულისხმები სტრუქტურის ტეგები. გამოიყენეთ დოკუმენტაციაში აღწერილი სინტაქსი.
message_len: წერილის ტექსტის მინიმალური ზომა
message_len_sub: სიმბოლოების მინიმალური რაოდენობა წერილის ტექსტის ველში.
checklists: ველების დაშვებების სია
blacklist: შავი სია
whitelist: თეთრი სია
checklists_sub: "შავი სია : სიმბოლოები, რომელთა შესაბამის ველში შეყვანის შემთხვევაში წერილი არ გაიგზავნება.<br />Whitelist : სიმბოლოები, რომელთა შესაბამის ველში შეყვანის გარეშე წერილი არ გაიგზავნება.<br />გამოყავით მძიმით."
general_fields: ძირითადი ველები
special_fields: სპეციალური ველები
debug: შეცდომების გასწორების რეჟიმი
debug_sub: წერილის გაგზავნის ფუნქციის გამორთვა, p01-contact-ის მონაცემთა სტრუქტურის ჩვენება, POST-ის მიერ გაგზავნილი მონაცემები და წერილი, რომელიც გაიგზავნებოდა.
debug_warn: არ გამოიყენოთ მოქმედ საიტზე!

View File

@ -0,0 +1,93 @@
---
# Lithuanian language file for p01-contact
key: lt
name: Lithuanian
english_name: Lithuanian
authors: Vaidotas Kazla
date: "2011-10-27"
compatibility: 1.1
strings:
# fields
name: Vardas
email: El. paštas
address: Pašto adresas
tel: Telefonas
url: Interneto svetainė
subject: Tema
message: Žinutė
file: Prisegtas failas
captcha: Apsaugos kodas
reload: Atnaujinti
fieldcaptcha: "Prašome <b>nepildyti</b> šio lauko :"
askcopy: Atsiųsti laiško kopiją man
send: Siųsti
# email words
askedcopy: Buvo prašymas gauti šios žinutės kopiją
anonymous: Anonimas
nosubject: (be temos)
email_title: Išsiųsta iš
# status messages
sent: Žinutė išsiųsta sėkmingai.
error: "Klaida: nepavyko išsiųsti žinutės."
disable: Susisiekimo formos yra išjungtos.
error_notarget: Ši susisiekimo forma neturi nurodyto gavėjo.
token: Ši žinutė jau buvo išsiųsta.
# fields errors
field_required: Būtina užpildyti šį lauką
field_email: Prašome įvesti teisingą el. pašto adresą
field_tel: Prašome įvesti teisingą telefono numerį
field_url: Prašome įvesti teisingą interneto svetainės adresą
field_message: Žinutė per trumpa
field_captcha: Prašome įvesti šį apsaugos kodą
field_fieldcaptcha: Prašome nepildyti šio lauko
field_password: Neteisingas slaptažodis
# configuration panel
config_title: p01contact konfigūracija
# messages
config_updated: Jūsų pakeitimai išsaugoti sėkmingai.
config_error_open: "<b>Nepavyko atverti konfigūracijos failo.</b> Prašome patikrinti kad failas egzistuoja ir turi teisingus leidimus:"
config_error_modify: "<b>Nepavyko pakeisti konfigūracijos failo.</b> Prašome patikrinti failo leidimus :"
# New release alert
new_release: Yra nauja versija!
download: Parsiųsti naują versiją
# Links
doc: Dokumentacija
forum: Forumas
# Parameters
enable: Įjungti
enable_sub: Įjungti arba išjungti pašto siuntimą (nepaslepia formų).
default_email: Numatytasis el. pašto adresas
default_email_sub: Jei paliksite tuščią, laiškai bus siunčiami į
lang: Kalba
lang_sub: Numatytoji kalba nustatyta kaip
default_params: Numatytieji parametrai
default_params_sub: Numatytoji žymų formos struktūra. Naudokite sintaksę aprašytą dokumentacijoje.
message_len: Minimalus žinutės ilgis.
message_len_sub: Minimalus leidžiamas simbolių skaičius žinutės laukams.
checklists: Laukų kontrolinis sąrašas
blacklist: Juodasis sąrašas
whitelist: Baltasis sąrašas
checklists_sub: "Juodasis sąrašas : žodžiai kuriuos radus formos laukuose nebus siunčiamas el. laiškas.<br />Baltasis sąrašas : žodžiai, kurie privalo būti formos laukuose, kad būtų siunčiamas el. laiškas.<br />Reikšmės atskiriamos kableliais."
general_fields: Pagrindiniai laukai
special_fields: Specialūs laukai
debug: Derinimo režimas
debug_sub: Išjungiamas laiško siuntimas, vietoje to parodoma p01-contact duomenų struktūra, siunčiami POST duomenys ir siunčiamo laiško vaizdas.
debug_warn: Prašome nenaudoti veikiančioje svetainėje!

View File

@ -0,0 +1,93 @@
---
# Macedonian language file for p01-contact
key: mk
name: Macedonian
english_name: Macedonian
authors: Спиркоски
date: "2011-10-27"
compatibility: 1.1
strings:
# fields
name: Име
email: Email
address: Поштенска адреса
tel: Телефонски број
url: Web страна
subject: Наслов
message: Порака
file: Прилог
captcha: Captcha
reload: Смени
fieldcaptcha: "Ве молам <b>не</b> пополнувајте го следното поле:"
askcopy: Испрати ми копија на оваа email адреса
send: Испрати
# email words
askedcopy: Побарана беше копија од оваа email порака
anonymous: Анонимно
nosubject: (Нема наслов)
email_title: Пораката е испратена од
# status messages
sent: Email пораката е пратена.
error: "ГРЕШКА: пораката не е пратена."
disable: Контакт формите се исклучени.
error_notarget: Оваа контактна форма нема примач.
token: Пораката веќе беше испратена.
# fields errors
field_required: Ова поле е обврзно
field_email: Ве молам внесете валидна email адреса
field_tel: Ве молам внесете валиден телефонски број
field_url: Ве молам внесете валидна web адреса
field_message: Ве молам напишете подолга порака
field_captcha: Ве молам препишете го следниот текст
field_fieldcaptcha: Ве молам не го пополнувајте ова поле
field_password: Погрешна лозинка
# configuration panel
config_title: p01contact конфигурација
# messages
config_updated: Вашите измени се успешно зачувани.
config_error_open: "<b>Не можам да ја отворам конфугурациската датотека.</b> Ве молам проверете дали постои датотеката и нејзините привилегии:"
config_error_modify: "<b>Не можам да ја изменам конфигурацискта датотека.</b> Проверете ги нејзините привилегии:"
# New release alert
new_release: Има нова верзија!
download: Превземи ја најновата верзија
# Links
doc: Документација
forum: Форум
# Parameters
enable: Вклучи
enable_sub: Вклучи или исклучи испраќање на пораки (не ги крие контакт формите).
default_email: Главен email
default_email_sub: Оставете го празно за да биде конфигурирано на
lang: Јазик
lang_sub: Основниот јазик е конфигуриран на
default_params: Основни параметри
default_params_sub: Структура на основна tag форма. Користете ја синтаксата опишана во документацијата.
message_len: Минимална должина на пораката
message_len_sub: Минимален број на знаци во полињата за порака.
checklists: Чеклисти на полињата
blacklist: Црна листа
whitelist: Бела листа
checklists_sub: "Црна листа: вредности кои не смеат да се појават за да се прати пораката.<br />Бела листа: можни вредности потребни за да се прати пораката.<br />Разделени со запирки."
general_fields: Основни полиња
special_fields: Специјални полиња
debug: Режим за дебагирање
debug_sub: Оневозможи праќање на пораки, прикажи ја p01-contact структурата на податоци, податоците пратени со POST и email-от кој би бил испратен.
debug_warn: Не активирајте на функционална web страна!

View File

@ -0,0 +1,94 @@
---
# Dutch language file for p01-contact
key: nl
name: Dutch
english_name: Dutch
authors: Thomas Stolwijk
date: "2011-10-27"
compatibility: 1.1
strings:
# fields
name: Naam
email: Email
address: Postadres
tel: Telefoonnummer
url: Website
subject: Onderwerp
message: Bericht
file: Attachment
captcha: Captcha
reload: Herlaad
fieldcaptcha: "Vul alstublieft <b>niet</b> het volgende veld in :"
askcopy: Stuur mij een kopie van dit bericht
send: Verstuur
# email words
askedcopy: Een kopie van deze mail is aangevraagd
anonymous: Anoniem
nosubject: (Geen onderwerp)
email_title: Mail verstuurd vanaf
# status messages
sent: Bericht verzonden.
error: "Fout : het bericht is niet verzonden."
disable: De contactplugin is uitgeschakeld.
error_notarget: Dit contactformulier heeft geen ontvanger.
token: Dit bericht is al verstuurd.
# fields errors
field_required: Dit veld is verplicht
field_email: Voer alstublieft een geldig email-adres in
field_tel: Voer alstublieft een geldig telefoonnummer in
field_url: Voer alstublieft een geldig webadres in
field_message: Schrijf alstublieft een langer bericht
field_captcha: Kopieer alstublieft de volgende tekst
field_fieldcaptcha: Vult u alstublieft dit veld niet in
field_password: Verkeerd wachtwoord
# configuration panel
config_title: p01contact configuratie
# messages
config_updated: Uw wijzigingen zijn opgeslagen.
config_error_open: "<b>Kan het configuratiebestand niet openen.</b> Controleer of het bestand bestaat en de toegangsrechten erop :"
config_error_modify: "<b>Kan het configuratiebestand niet wijzigen.</b> Controleer de toegangsrechten op het bestand :"
# New release alert
new_release: Er is een nieuwe versie uitgebracht!
download: Download de nieuwste versie
# Links
doc: Documentatie
forum: Forum
# Parameters
enable: Inschakelen
enable_sub: Schakelt sturen van mail aan of uit (het formulier blijft zichtbaar).
default_email: Standaardinstelling emailadres
default_email_sub: Laat leeg om de standaardinstelling te gebruiken
lang: Taal
lang_sub: Taal standaard ingesteld op
default_params: Standaardinstelling parameters
default_params_sub: Standaard formulierstructuur. Gebruik de syntax zoals bescheven in de documentatie.
message_len: Minimum berichtlengte
message_len_sub: Minimum aantal karakters voor berichtvelden.
checklists: Veldchecklist
blacklist: Blacklist
whitelist: Whitelist
checklists_sub: "Blacklist : waarden die niet in het veld mogen voorkomen om het berichte te kunnen versturen.<br />Whitelist : waarden waarvan er een in het veld moet voorkomen om het bericht te kunnen versturen.<br />Gescheiden door komma's."
general_fields: Algemene fields
special_fields: Speciale fields
debug: Debugmodus
debug_sub: Schakel mail sturen uit, toon datastructuur van p01-contact, data verstuurd met het POST-request en de mail die verstuurd zou zijn.
debug_warn: Schakel dit niet in op een website die in bedrijf is!

View File

@ -0,0 +1,41 @@
---
# Norwegian language file for p01-contact
key: "no"
name: Norwegian
english_name: Norwegian
authors: Tor Rafsol Løseth
date: "2011-10-27"
compatibility: 1.1
strings:
# fields
name: Navn
email: E-post adresse
address: Adresse
tel: Tel. nummer
url: Nettside
subject: Emne
message: Melding
file: Bilag
captcha: Captcha
reload: Nytt bilde
askcopy: Send en kopi till meg selv
send: Send
# email words
anonymous: Anonym
nosubject: (Intet emne)
email_title: E-post sendt i fra
# status messages
sent: E-post sendt.
error: "Feil : Ingen melding er sendt."
disable: Kontaktskjemaet er ute av funksjon.
error_notarget: Kontaktskjemaet har ingen mottager.
# fields errors
field_required: Dette feltet må fylles ut
field_email: Vennligst bruk en korrekt e-post adresse
field_tel: Vennligst bruk ett korrekt telefon nummer
field_url: Vennligst bruk en korrekt nettside adresse
field_message: Meldingen er for kort.
field_captcha: Kopier bokstavene

View File

@ -0,0 +1,95 @@
---
# Polish language file for p01-contact
key: pl
name: Polish
english_name: Polish
authors: barlew
date: "2011-10-27"
compatibility: 1.1
strings:
# fields
name: Imię i nazwisko
email: Email
address: Adres
tel: Telefon
url: Strona www
subject: Temat
message: Wiadomość
file: Załącznik
captcha: Captcha
reload: Załaduj ponownie
fieldcaptcha: "Proszę <b>nie wypełniać</b> tych pól:"
askcopy: Wyślij kopię wiadomości do mnie
send: Wyślij
# email words
askedcopy: A copy of this email have been requested
anonymous: Anonymous
nosubject: (bez tematu)
email_title: Wiadomość wysłana z
# status messages
sent: Wiadomość została wysłana!
error: "Błąd: wiadomość nie została wysłana."
disable: Formularz kontaktowy jest wyłączony.
error_notarget: Nie określono odbiorcy dla tego formularza.
token: The message have already been sent.
# fields errors
field_required: Wypełnienie tego pola jest wymagane
field_email: Wprowadź prawidłowy adres email
field_tel: Wprowadź prawidłowy numer telefonu
field_url: Wprowadź prawidłowy adres www
field_message: Tekst wiadomości jest zbyt krótki
field_captcha: Skopiuj następujący tekst
field_fieldcaptcha: Proszę nie wypełniać tego pola
field_password: Hasło nieprawidłowe
# configuration panel
config_title: Konfiguracja p01-contact
default: Domyślnie
save: Zapisz
# messages
config_updated: Twoje ustawienia zostały pomyślnie zapisane.
config_error_open: "<b>Nie można otworzyć pliku konfiguracyjnego.</b> Sprawdź czy plik istnieje oraz ustawienia do jego zapisu:"
config_error_modify: "<b>Nie można zmodyfikować pliku konfiguracyjnego.</b> Sprwdź ustawienia uprawnień tego pliku:"
# New release alert
new_release: Nowa wersja jest dostępna!
download: Pobierz najnowszą wersję.
# Links
doc: Dokumentacja
forum: Forum
# Parameters
enable: Włączony
enable_sub: Włącza lub wyłącza wysyłanie maili (nie ukrywa formularza kontaktowego).
default_email: Domyślny adres email
default_email_sub: Pozostaw to pole puste, aby wysyłać maile do
lang: Język
lang_sub: Język domyślny ustawiony jako
default_params: Ustawienia domyślne
default_params_sub: Domyślna struktura formularza. W celu modyfikacji proszę zapoznać się z dokumentacją.
message_len: Minimalna długość tekstu wiadomości
message_len_sub: Określa minimalną liczbę znaków dla tekstu wiadomości.
checklists: Sprawdzanie zawartości pól formularza
blacklist: Zabronione
whitelist: Dozwolone
checklists_sub: "Zabronione: słowa, które nie mogą występować w polach formularza.<br />Dozwolone: słowa, które mogą występować w polach formularza.<br />Oddzielone przecinkami."
general_fields: Pola ogólne
special_fields: Pola specjalne
debug: Tryb debug
debug_sub: Wyłącza wysyłanie maili, wyświetla strukturę danych p01-contact oraz mail, który byłyby wysłany przez funkcję POST.
debug_warn: Nie włączać na stronie produkcyjnej!

View File

@ -0,0 +1,126 @@
---
# Portuguese language file for p01contact
key: pt
name: Português
english_name: Portuguese
authors: Julianna Brandão (JuhBass), Rafael Capaci
date: "2017-11-01"
compatibility: 1.1
strings:
# basic fields
text: texto
textarea: campo de texto
password: senha
file: arquivo
# html5 inputs types
color: cor
date: data
email: e-mail
month: mês
number: número
range: valor
search: busca
tel: número de telefone
time: hora
url: URL
week: semana
# other fields
name: nome
subject: assunto
message: mensagem
address: endereço postal
askcopy: me envie uma cópia deste e-mail
captcha: captcha
# actions
send: Enviar
reload: Recarregar
reset: Apagar este campo
# received email
askedcopy: Uma cópia deste e-mail foi requisitada
anonymous: Anônimo
nosubject: (Sem assunto)
email_title: E-mail enviado de
# confirmations
sent: E-mail enviado.
sent_debug: E-mail virtualmente enviado (modo de depuração habilitado).
sent_copy: E-mail enviado. Uma cópia foi enviada para o endereço especificado.
sent_copy_error: E-mail enviado, mas houve uma problema ao te enviar uma cópia.
sent_already: A mensagem já foi enviada.
# errors
error: "Erro : a mensagem não foi enviada."
error_notarget: Este campo de contato encontra-se vazio.
error_honeypot: Blip. Blop. Blup. Você caiu no "pote de mel" para robôs.
error_pageload: Blip. Blop. Blup. Você é tão rápido quanto um robô. Por favor, espere alguns segundos.
error_lastpost: Você enviou recentemente. Por favor, aguarde um pouco.
error_postcount: Você enviou muitas vezes na última hora.
# fields errors
field_required: Este campo é necessário
field_email: Por favor, utilize um endereço de e-mail válido
field_tel: Por favor, utilize um número de telefone válido
field_url: Por favor, escreva um endereço web válido
field_message: Por favor, escreva uma mensagem mais longa
field_captcha: Por favor, responda corretamente o captha a seguir
field_password: Senha errada
field_blacklist: Este campo contém termos proibidos
field_whitelist: Um valor esperado está faltando
# configuration panel
config_title: configuração do p01contact
config_updated: Suas alterações foram salvas com sucesso.
config_error_open: <b>Não foi possível abrir o arquivo de configuração.</b> Verifique se o arquivo existe e se possue as devidas permissões
config_error_modify: <b>Não foi possível modificar o arquivo de configurações.</b> Verifique as permissões do arquivo"
# infos
new_release: Há uma nova versão!
download: Baixe a última versão
repo: Github
wiki: Documentação / Wiki
issues: Ajuda / reporte um erro
# settings
disable: Desabilitar todos os campos
disable_sub: Desabilitar envio de e-mails, sem esconder os campos de contato.
default_email: E-mails padrão
default_email_sub: Um ou mais endereços de e-mail, separados por vírgula, que receberão e-mails de todos os formulários.
default_params: Parâmetros padrões
default_params_sub: Estrutura de campos padrão. Use a sintaxe descrita na documentação.
lang: Idioma
lang_sub: Idioma padrão está configurado para
message_len: Tamanho mínimo das mensagens
message_len_sub: Número mínimo de caracteres para os cmapos de mensagem.
separator: Separador
separator_sub: "Separador de parâmetros nos campos. Ex: vírgula, ponto e vírgula, barra dupla..."
logs_count: Número do log
logs_count_sub: Máximo número de entradas a serem mantidas nos logs.
checklists: Lista de verificação de campos
blacklist: Lista negra
whitelist: Lista branca
checklists_sub: Uma lista negra é uma lista de valores proibidos no tipo de campo em questão, e uma lista branca é uma lista dos únicos valores possíveis para certo tipo de campo. Cada termo deve ser separado por vírgulas.
use_honeypot: Use campo de "pote de mel" escondido
use_honeypot_sub: Adicionar a todos os campos um campo escondido que não deve ser preenchido. Humanos não o enxergarão, mas a maioria dos robôs de spam cairão na armadilha.
min_sec_after_load: Tempo mínimo após o carregamento da página
min_sec_after_load_sub: Mínimo número de segundos entre uma carregamento de uma página e uma submissão de um formulário. Humanos necessitam de pelo menos alguns segundos para ler, preencher e enviar um formulário. Robôs não.
min_sec_between_posts: Tempo mínimo entre duas submissões
min_sec_between_posts_sub: Mínimo número de segundos entre a submissão de dois formulários pelo mesmo usuário.
max_posts_by_hour: Número máximo de submissões por hora
max_posts_by_hour_sub: Número máximo de submissões por hora por usuário.
captcha_info: Os mecanismos nativos de anti-spam e anti-erro devem prevenir todas as submissões não desejadas. Se precisar de um nível maior de segurança, você pode criar um captcha customizado ao adicionar um campo com a resposta requerida. Finalmente, você pode inserir um Google reCaptcha ao usar um campo <em>captcha</em> com as configurações a baixo.
recaptcha_public_key: chave pública do reCaptcha
recaptcha_public_key_sub: chave pública do Google reCaptcha.
recaptcha_secret_key: chave secreta do reCaptcha
recaptcha_secret_key_sub: chave secreta do Google reCaptcha.
debug: Modo de depuração
debug_sub: Desabilitar o envio de e-mails, mostrar a estrutura de dados do p01-contact, os dados enviador por POST e o e-mail que deveria ser enviado.
debug_warn: não ative num site em produção!

View File

@ -0,0 +1,93 @@
---
# Romanian language file for p01-contact
key: ro
name: Romanian
english_name: Romanian
authors: Alexandru Cuciureanu
date: "2011-10-27"
compatibility: 1.1
strings:
# fields
name: Nume
email: Email
address: Adresa postala
tel: Numar telefon
url: Website
subject: Subiect
message: Mesaj
file: Atasament
captcha: Captcha
reload: Reincarcare
fieldcaptcha: "Te rog sa nu completezi urmatorul spatiu :"
askcopy: Trimite-mi o copie al acestui email
send: Trimite
# email words
askedcopy: A fost solicitata o copie al acestui email
anonymous: Anonim
nosubject: (Fara subiect)
email_title: Mesaj trimis de
# status messages
sent: Mesajul a fost trimis.
error: "Eroare : mesajul nu a fost trimis."
disable: Formularele de contact sunt dezactivate.
error_notarget: Acest formular de contact nu are un recipient.
token: Mesajul a fost deja trimis.
# fields errors
field_required: Acest spatiu trebuie completat
field_email: Te rog sa completezi o adresa de email valida
field_tel: Te rog sa folosesti un numar de telefon valid
field_url: Te rog sa introduci o adresa de web valida
field_message: Te rog sa scrii un mesaj mai lung
field_captcha: Te rog copiaza urmatorul text
field_fieldcaptcha: Te rog sa nu completezi urmatorul spatiu
field_password: Parola gresita
# configuration panel
config_title: Configurare p01contact
# messages
config_updated: Schimbarile tale au fost salvate.
config_error_open: "<b>Nu a putut fi deschis fisierul de configurare.</b> Verifica daca fisierul exista sau daca ai permisiunile corecte :"
config_error_modify: "<b>Nu a putut fi modificat fisierul de configurare.</b> Verifica permisiunile :"
# New release alert
new_release: Exista o noua versiune!
download: Descarca ultima versiune
# Links
doc: Documentatie
forum: Forum
# Parameters
enable: Activeaza
enable_sub: Activeaza sau dezactiveaza trimiterea de email (nu ascunde formularul de contact).
default_email: Emailul implicit
default_email_sub: Lasa spatiu gol pentru a seta ca
lang: Limba
lang_sub: Limba implicita este setata ca
default_params: Parametri impliciti
default_params_sub: Etichete implicite in formular. Foloseste sintaxa din documentatie.
message_len: Lungimea minima a mesajului
message_len_sub: Numarul minim de caractere pentru spatiile destinate mesajelor
checklists: Casute pentru bifat
blacklist: Blacklist
whitelist: Whitelist
checklists_sub: "Blacklist : cuvinte care nu trebuie sa apara in email.<br />Whitelist : posibile cuvinte care ar trebui sa apara in email.<br />Separate de virgula."
general_fields: Campuri generale
special_fields: Campuri speciale
debug: Mod Debug
debug_sub: Dezactiveaza trimiterea mesajului, afiseaza structura de date p01-contact, date trimise prin POST si email care a fost trimis.
debug_warn: Nu activa siteul in productie!

View File

@ -0,0 +1,93 @@
---
# Russian language file for p01-contact
key: ru
name: Russian
english_name: Russian
authors: Stanislav Ulver
date: "2011-10-27"
compatibility: 1.1
strings:
# fields
name: Ваше имя
email: E-mail
address: Почтовый адрес
tel: Номер телефона
url: Сайт
subject: Тема
message: Сообщение
file: Прикрепить файл
captcha: Код безопасности
reload: Обновить
fieldcaptcha: "Пожалуйста, не заполняйте следующие поля :"
askcopy: Отправить мне копию этого сообщения
send: Отправить
# email words
askedcopy: Копия этого письма была запрошена
anonymous: Анонимно
nosubject: (Без темы)
email_title: "Отправитель:"
# status messages
sent: E-mail отправлен.
error: "Ошибка: сообщение не было отправлено."
disable: Контактный плагин отключен.
error_notarget: Не указан получатель.
token: Это сообщение уже было отправлено.
# fields errors
field_required: Обязательное поле
field_email: Неверно указан e-mail адрес
field_tel: Неверно указан номер телефона
field_url: Неверно указан веб-адрес
field_message: Ваше сообщение слишком короткое
field_captcha: Код безопасности не соответствует отображённому
field_fieldcaptcha: Пожалуйста не заполняйте это поле
field_password: Неправильный пароль
# configuration panel
config_title: p01contact конфигурация
# messages
config_updated: Изменения сохранены.
config_error_open: "<b>Никак не открыть конфигурационный файл.</b> Проверьте его существование и права доступа к нему :"
config_error_modify: "<b>Не удается модифицировать конфигурационный файл.</b> Проверьте права доступа к нему :"
# New release alert
new_release: Это новая версия!
download: Скачать последнюю версию
# Links
doc: Документация
forum: Форум
# Parameters
enable: Включено
enable_sub: Включить или выключить отправку е-mail сообщения (не скрывает контактную форму).
default_email: email по умолчанию
default_email_sub: Оставьте пустым для установки
lang: Язык
lang_sub: Язык по умолчанию установлен в
default_params: Параметры по умолчанию
default_params_sub: Структура тегов формы. Используйте синтаксис описанный в документации.
message_len: Минимальная длинна сообщения
message_len_sub: Минимальное количество символов для поля сообщения.
checklists: Проверочный список полей
blacklist: Черный список
whitelist: Белый список
checklists_sub: "Черный список: значения, при которых отправка письма не произойдет.<br />Белый список: значения, которые требуются для отправки письма.<br />Элементы разделяются запятыми."
general_fields: Основные поля
special_fields: Специальные поля
debug: Режим отладки
debug_sub: Отключается отправка емайл сообщения, на экране отображается p01-contact структура данных, и данные которые были бы посланы по электронной почте.
debug_warn: Не включайте на рабочем сайте!

View File

@ -0,0 +1,94 @@
---
# Slovak language file for p01-contact
key: sk
name: Slovak
english_name: Slovak
authors: Ján Maras
date: "2011-10-27"
compatibility: 1.1
strings:
# fields
name: Meno
email: Email
address: Poštová adresa
tel: Telefón
url: WWW
subject: Predmet
message: Správa
file: Príloha
captcha: Captcha
reload: Načítať nový
fieldcaptcha: "Prosím <b>nevypĺňajte</b> nasledovné polia :"
askcopy: Pošlite mi kópiu tohto e-mailu
send: Odoslať
# email words
askedcopy: Kópia tohoto emailu bola vyžiadaná
anonymous: Anonym
nosubject: Správa z kontaktného formulára
email_title: Mail odoslaný z
# status messages
sent: Správa odoslaná.
error: "Chyba : správa nebola odoslaná."
disable: Kontaktný formulár je vypnutý.
error_notarget: Tento kontaktný formulár nemá príjemcu.
token: Správa už bola odoslaná.
# fields errors
field_required: Toto pole je povinné
field_email: Prosím, zadajte platný email
field_tel: Prosím zadajte platné tel. číslo
field_url: Prosím, zadajte platnú www adresu
field_message: Prosím, zadajte dlhšiu správu
field_captcha: Prosím, skopírujte nasledujúci text
field_fieldcaptcha: Prosím, nevypĺňajte toto pole
field_password: Zlé heslo
# configuration panel
config_title: p01contact nastavenie
# messages
config_updated: Vaše zmeny sú úspešne uložené.
config_error_open: "<b>Nemožno otvoriť konfiguračný súbor.</b> Skontrolujte, či súbor existuje a či je povolené zapisovanie do súboru :"
config_error_modify: "<b>Nemožno zmeniť konfiguračný súbor.</b> Skontrolujte práva na zápis do súboru:"
# New release alert
new_release: K dispozícii je nová verzia!
download: Stiahnite si poslednú verziu
# Links
doc: Dokumentácia
forum: Fórum
# Parameters
enable: Povoliť
enable_sub: Povoliť, alebo zakaázať odosielanie pošty (zaškrtnutím povolíte obrazenie formulára).
default_email: Predvolený email
default_email_sub: Ak ponecháte prázdne, bude nastavené na
lang: Jazyk
lang_sub: Predvolený jazyk je nastavený na
default_params: Predvolené parametre
default_params_sub: Predvolené tagy štruktúry formulára. Použite syntax popísanú v dokumentácii.
message_len: Minimálna dĺžka správy
message_len_sub: Minimálny počet znakov pre položku správa.
checklists: Zozna polí
blacklist: Blacklist
whitelist: Whitelist
checklists_sub: "Blacklist : hodnoty, ktoré nesmú byť prítomné v poli.<br />Whitelist : hodnoty, ktoré musia byť prítomné v poli.<br />Oddelené čiarkou."
general_fields: Všeobecné polia
special_fields: Špeciálne polia
save: Uložiť
debug: Debug mode
debug_sub: Disable mail sending, display p01-contact data structure, data sent by POST and the email that would have been sent.
debug_warn: Don\'t active that on production website!

View File

@ -0,0 +1,93 @@
---
# Serbian language file for p01-contact
key: sr
name: Serbian
english_name: Serbian
authors: lemi667
date: "2011-10-27"
compatibility: 1.1
strings:
# fields
name: Ime
email: Email
address: Adresa
tel: Broj telefona
url: Website
subject: Tema
message: Poruka
file: Dodatak
captcha: Captcha
reload: Učitaj ponovo
fieldcaptcha: "Molimo <b>nemojte</b> popunjavati sledeće polje :"
askcopy: Pošalji mi kopiju ove poruke
send: Pošalji
# email words
askedcopy: Kopija ove poruke je zatražena
anonymous: Anonimno
nosubject: (No subject)
email_title: Mail poslao
# status messages
sent: Email poslat.
error: Greška u slanju poruke.
disable: Formulari za kontakt su onemogućeni.
error_notarget: Ovaj formular nema adresu za prijem.
token: Poruka je već poslata.
# fields errors
field_required: Ovo polje je obavezno
field_email: Molimo koristite validnu email adresu
field_tel: Molimo koristite validan broj telefona
field_url: Molimo koristite validnu web adresu
field_message: Molimo upišite dužu poruku
field_captcha: Molimo kopirajte sledeći tekst
field_fieldcaptcha: Molimo da ne popunjavate ovo polje
field_password: Pogrešna lozinka
# configuration panel
config_title: p01contact konfiguracija
# messages
config_updated: Vaše promene su sačuvane.
config_error_open: "<b>Nije moguće otvoriti konfiguracioni fajl.</b> Proverite da li fajl postoji i dozvole za pristup :"
config_error_modify: "<b>Nije moguće modifikovati konfiguracioni fajl.</b> Proverite dozvole za pristup :"
# New release alert
new_release: Postoji nova verzija!
download: Preuzmite najnoviju verziju
# Links
doc: Dokumentacija
forum: Forum
# Parameters
enable: Omogući
enable_sub: Omogući/onemogući slanje poruka (ne sakriva kontakt formular).
default_email: Podrazumevani email
default_email_sub: "Ostavite prazno da bi podesili:"
lang: Jezik
lang_sub: Podrazumevani jezik je
default_params: Podrazumevani parametri
default_params_sub: Podrazumevani tag iz strukture. Koristite sintaksu opisanu u dokumentaciji.
message_len: Minimalna dužina poruke
message_len_sub: Minimalan broj karaktera za polje poruke.
checklists: Kontrolna lista polja
blacklist: Crna lista
whitelist: Bela lista
checklists_sub: "Crna lista : vrednosti koje ne smeju biti prisutne da bi poruka bila poslata.<br />Bela lista : moguće vrednosti potrebne u polju da bi poruka bila poslata.<br />Odvojeno zarezima."
general_fields: Opšta polja
special_fields: Specijalna polja
debug: Debug režim
debug_sub: Onemogućuje slanje poruke, prikazuje p01-contact strukturu podataka, podaci poslati putem POST i poruka koja bi bila poslata.
debug_warn: Nemojte ovo aktivirati na sajtu koji je u funkciji!

View File

@ -0,0 +1,40 @@
---
# Swedish language file for p01-contact
key: sv
name: Swedish
english_name: Swedish
authors: Göran Söderberg
date: "2011-10-27"
compatibility: 1.1
# fields
name: Namn
email: Email-adress
address: Adress
tel: Tel. nummer
url: Hemsida
subject: Ämne
message: Meddelande
file: Bilaga
captcha: Captcha
reload: Ny bild
askcopy: Skicka en kopia till mig själv
send: Send
# email words
anonymous: Anonym
nosubject: (Inget ämne)
email_title: Mail skickat från
# status messages
sent: Email skickat.
error: "Fel : Inget meddelande skickades."
disable: Kontaktformuläret är ur funktion.
error_notarget: Kontaktformuläret har ingen mottagare.
# fields errors
field_required: Detta fält måste fyllas i
field_email: Vänligen använd en riktig mail-adress
field_tel: Vänligen använd ett riktigt telefonnummer
field_url: Vänligen skriv en korrekt hemsida
field_message: Meddelandet är för kort.
field_captcha: Kopiera bokstäverna

View File

@ -0,0 +1,476 @@
<?php
/**
* p01-contact - A simple contact forms manager
*
* @package p01contact
* @link https://github.com/nliautaud/p01contact
* @author Nicolas Liautaud
*/
namespace P01C;
require_once 'P01contact_Session.php';
require_once 'P01contact_Form.php';
require_once 'vendor/spyc.php';
class P01contact
{
public $version;
public $default_lang;
private $config;
private $langs;
public function __construct()
{
define('P01C\VERSION', '1.1.6');
$this->version = VERSION;
define('P01C\SERVERNAME', $_SERVER['SERVER_NAME']);
define('P01C\SERVERPORT', $_SERVER['SERVER_PORT']);
define('P01C\SCRIPTNAME', $_SERVER['SCRIPT_NAME']);
define('P01C\SCRIPTPATH', get_included_files()[0]);
define('P01C\HTTPS', !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off');
define('P01C\PORT', SERVERPORT && SERVERPORT != 80 && SERVERPORT != 443 ? ':'.SERVERPORT : '');
define('P01C\PROTOCOL', HTTPS || SERVERPORT == 443 ? 'https' : 'http');
define('P01C\SERVER', PROTOCOL . '://' . SERVERNAME . PORT);
define('P01C\PAGEURI', $_SERVER['REQUEST_URI']);
define('P01C\PAGEURL', SERVER . PAGEURI);
define('P01C\PATH', dirname(__DIR__) . '/');
define('P01C\ROOT', str_replace(SCRIPTNAME,'', SCRIPTPATH));
define('P01C\RELPATH', str_replace(ROOT, '', PATH));
define('P01C\LANGSPATH', PATH . 'lang/');
define('P01C\TPLPATH', PATH . 'src/templates/');
define('P01C\CONFIGPATH', PATH . 'config.json');
define('P01C\LOGPATH', PATH . 'log.json');
define('P01C\REPOURL', 'https://github.com/nliautaud/p01contact');
define('P01C\WIKIURL', 'https://github.com/nliautaud/p01contact/wiki');
define('P01C\ISSUESURL', 'https://github.com/nliautaud/p01contact/issues');
define('P01C\APILATEST', 'https://api.github.com/repos/nliautaud/p01contact/releases/latest');
$this->loadConfig();
$this->loadLangs();
if ($this->config('debug')) {
$this->enablePHPdebug();
}
Session::stack('pageloads', time());
}
/**
* Query the releases API and return the new release infos, if there is one.
*
* @see https://developer.github.com/v3/repos/releases/#get-the-latest-release
* @return object the release infos
*/
public function getNewRelease()
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, APILATEST);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1);
curl_setopt($ch, CURLOPT_USERAGENT, 'p01contact/curl');
$resp = curl_exec($ch);
curl_close($ch);
if ($resp) {
return json_decode($resp);
}
return;
}
/**
* Parse a string to replace tags by forms
*
* Find tags, create forms structures, check POST and modify string.
* @param string $contents the string to parse
* @return string the modified string
*/
public function parse($contents)
{
$sp = '(?:\s|</?p>)*';
$pattern = "`(?<!<code>)\(%\s*contact\s*(\w*)\s*:?$sp(.*?)$sp%\)`s";
preg_match_all($pattern, $contents, $tags, PREG_SET_ORDER);
foreach ($tags as $tag) {
$form = $this->newForm($tag[2], $tag[1]);
$contents = preg_replace($pattern, $form, $contents, 1);
}
return $contents;
}
/**
* Return a form based on the given parameters and lang
*
* @param string $params the parameters string, according to the syntax
* @param string $lang form-specific language code
* @return string the html form
*/
public function newForm($params = '', $lang = null)
{
$defaultStyle = '';
static $once;
if (!$once) {
$defaultStyle = '<link rel="stylesheet" href="'.SERVER.RELPATH.'style.css"/>';
$once = true;
}
$form = new P01contactForm($this);
$form->parseTag($params);
if ($lang) {
$form->lang = $lang;
}
$form->post();
return $defaultStyle . $form->html();
}
/**
* Display system and P01contact infos.
*
* @return string the html report
*/
public function debugReport()
{
$out = '<h2 style="color:#c33">p01-contact debug</h2>';
$out.= '<h3>Health :</h3>';
$health = 'PHP version : '.phpversion()."\n";
$health.= 'PHP mbstring (UTF-8) : '.(extension_loaded('mbstring') ? 'OK' : 'MISSING');
$out.= preint($health, true);
$out.= '<h3>Constants :</h3>';
$constants = get_defined_constants(true)['user'];
$filteredConstants = array_filter(array_keys($constants), function ($key) {
return 0 === strpos($key, __namespace__);
});
$filteredConstants = array_intersect_key($constants, array_flip($filteredConstants));
$out .= preint($filteredConstants, true);
$out .= Session::report();
if (!empty($_POST)) {
$out.= '<h3>$_POST :</h3>';
$out.= preint($_POST, true);
}
$out.= '<h3>$p01contact :</h3>';
$out.= preint($this, true);
return $out;
}
/**
* Enable PHP error reporting
*/
public function enablePHPdebug()
{
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
}
/*
* LANG
*/
/**
* Load language files
*/
private function loadLangs()
{
$this->langs = [];
$files = glob(LANGSPATH . '*.yml');
foreach ($files as $f) {
$parsed = \Spyc::YAMLLoad($f);
if (!$parsed || !isset($parsed['key'])) {
continue;
}
$this->langs[$parsed['key']] = $parsed;
}
}
/**
* Return a traduction of the keyword
*
* Manage languages between requested langs and existing traductions.
* @param string $key the keyword
* @return string
*/
public function lang($key, $lang = null)
{
$default = !empty($this->default_lang) ? $this->default_lang : 'en';
if (!$lang) {
$lang = $this->config('lang');
}
if (empty($lang)
|| !isset($this->langs[$lang])
|| !isset($this->langs[$lang]['strings'][$key])) {
$lang = $default;
}
$strings = $this->langs[$lang]['strings'];
if (!empty($strings[$key])) {
return trim($strings[$key]);
}
return ucfirst($key);
}
/**
* Return the languages objects
* @return array
*/
public function langs()
{
return $this->langs;
}
/*
* CONFIG
*/
/**
* Load the JSON configuration file.
*/
private function loadConfig()
{
$content = file_exists(CONFIGPATH) ? file_get_contents(CONFIGPATH) : null;
$this->config = $content ? json_decode($content) : (object) array();
$this->setDefaultConfig();
}
/**
* Set the obligatory settings if missing.
*/
private function setDefaultConfig()
{
$default = array(
'default_params' => 'name!, email!, subject!, message!',
'separator' => ',',
'logs_count' => 10,
'use_honeypot' => true,
'min_sec_after_load' => '3',
'max_posts_by_hour' => '10',
'min_sec_between_posts' => '5',
);
foreach ($default as $key => $value) {
if (empty($this->config->{$key})) {
$this->config->{$key} = $value;
}
}
}
/**
* Add an entry to the logs.
*/
public function log($data)
{
if (!$this->config('logs_count')) {
return;
}
$logs = json_decode(@file_get_contents(LOGPATH));
$logs[] = $data;
$max = max(0, intval($this->config('logs_count')));
while (count($logs) > $max) {
array_shift($logs);
}
$this->updateJSON(LOGPATH, $logs);
}
/**
* Update a JSON file with new data.
*
* @param string $file_path the config file path
* @param array $new_values the new values to write
* @param array $old_values the values to change
* @return boolean file edition sucess
*/
private function updateJSON($path, $new_values)
{
if ($file = fopen($path, 'w')) {
fwrite($file, json_encode($new_values, JSON_PRETTY_PRINT));
fclose($file);
return true;
} return false;
}
/**
* Return a setting value from the config.
* @param mixed $key the setting key, or an array as path to sub-key
* @return mixed the setting value
*/
public function config($key)
{
if (!is_array($key)) {
$key = array($key);
}
$curr = $this->config;
foreach ($key as $k) {
if (is_numeric($k)) {
$k = intval($k);
if (!isset($curr[$k])) {
return;
}
$curr = $curr[$k];
} else {
if (!isset($curr->$k)) {
return;
}
$curr = $curr->$k;
}
$k = $curr;
}
return $k;
}
/*
* TEMPLATES
*/
/**
* Return a template file content
*/
public function getTemplate($name)
{
static $cache;
if (isset($cache[$name])) {
return $cache[$name];
}
if (!isset($cache)) {
$cache = array();
}
$cache[$name] = @file_get_contents(TPLPATH . $name . '.html');
return $cache[$name];
}
/**
* Set the obligatory settings if missing.
*/
public function renderTemplate($name, $data)
{
$html = $this->getTemplate($name);
// config
$html = preg_replace_callback('`config\((.+)\)`', function ($matches) {
return $this->config(explode(',', $matches[1]));
}, $html);
// lang
$html = preg_replace_callback('`{{lang\.(\w+)}}`', function ($matches) {
return $this->lang($matches[1]);
}, $html);
// constants
$html = preg_replace_callback('`{{([A-Z]{3,})}}`', function ($matches) {
return constant(__namespace__.'\\'.$matches[1]);
}, $html);
// data
$html = preg_replace_callback('`{{(\w+)}}`', function ($matches) use ($data) {
return @$data->{$matches[1]};
}, $html);
return $html;
}
/*
* PANEL
*/
/**
* Save settings if necessary and display configuration panel content
* Parse and replace values in php config file by POST values.
*/
public function panel()
{
if (isset($_POST['p01-contact']['settings'])) {
$success = $this->updateJSON(CONFIGPATH, $_POST['p01-contact']['settings']);
$this->loadConfig();
if ($success) {
$msg = '<div class="updated">' . $this->lang('config_updated') . '</div>';
} else {
$msg = '<div class="error">'.$this->lang('config_error_modify');
$msg.= '<pre>'.CONFIGPATH.'</pre></div>';
}
return $msg . $this->panelContent();
}
return $this->panelContent();
}
/**
* Return configuration panel content, replacing the following in the template :
*
* - lang(key) : language string
* - config(key,...) : value of a config setting
* - other(key) : other value pre-defined
* - VALUE : constant value
*
* @return string
*/
private function panelContent($system = 'gs')
{
$debug = $this->config('debug');
$tpl_data = (object) null;
$tpl_data->disablechecked = $this->config('disable') ? 'checked="checked" ' : '';
$tpl_data->debugchecked = $debug ? 'checked="checked" ' : '';
$tpl_data->honeypotchecked = $this->config('use_honeypot') ? 'checked="checked" ' : '';
$tpl_data->default_lang = $this->default_lang;
$tpl_data->version = $this->version;
$list = $this->config('checklist');
if ($list) {
foreach ($list as $i => $cl) {
$bl = 'cl'.$i.'bl';
$wl = 'cl'.$i.'wl';
$tpl_data->$bl = isset($cl->type) && $cl->type == 'whitelist' ? '' : 'checked';
$tpl_data->$wl = $tpl_data->$bl ? '' : 'checked';
}
}
$lang = $this->config('lang');
$tpl_data->langsoptions = '<option value=""'.($lang==''?' selected="selected" ':'').'>Default</option>';
foreach ($this->langs() as $language) {
$tpl_data->langsoptions .= '<option value="' . $language['key'] . '" ';
if ($lang == $language['key']) {
$tpl_data->langsoptions .= 'selected="selected" ';
}
$tpl_data->langsoptions .= '>' . $language['english_name'] . '</option>';
}
$html = $this->renderTemplate($system.'_settings', $tpl_data);
//new release
$infos = '';
if ($response = $this->getNewRelease()) {
if ($debug && isset($response->message)) {
$infos .= '<div class="updated">New release check error debug : Github ';
$infos .= $response->message . '</div>';
}
if (isset($response->url) && version_compare($response->tag_name, $this->version) > 0) {
$infos .= '<div class="updated">' . $this->lang('new_release');
$infos .= '<br /><a href="' . $response->html_url . '">';
$infos .= $this->lang('download') . ' (' . $response->tag_name . ')</a></div>';
}
}
$logsblock = $this->logsTable();
return $infos . $html . $logsblock;
}
private function logsTable()
{
$logs = json_decode(@file_get_contents(LOGPATH));
if (!$logs) {
return;
}
$html = '';
foreach (array_reverse($logs) as $log) {
$html .= '<tr><td>';
$html .= implode('</td><td>', array_map('htmlentities', $log));
$html .= '</td></tr>';
}
return '<div class="logs"><h2>Logs</h2><table>'.$html.'</table></div>';
}
}

View File

@ -0,0 +1,406 @@
<?php
/**
* p01-contact - A simple contact forms manager
*
* @link https://github.com/nliautaud/p01contact
* @author Nicolas Liautaud
* @package p01contact
*/
namespace P01C;
class P01contactField
{
private $form;
public $id;
public $type;
public $title;
public $description;
public $value;
public $selected_values;
public $placeholder;
public $required;
public $locked;
public $error;
/**
* @param Form $form the container form
* @param int $id the field id
* @param string $type the field type
*/
public function __construct($form, $id, $type)
{
$this->form = $form;
$this->id = $id;
$this->type = $type;
}
/**
* Set the field value or selected value
*
* @param mixed $new_value the value, or an array of selected values ids
*/
public function setValue($new_value)
{
// simple value
if (!is_array($this->value)) {
$this->value = htmlentities($new_value, ENT_COMPAT, 'UTF-8', false);
return;
}
// multiples-values (checkbox, radio, select)
if (!is_array($new_value)) {
$new_value = array($new_value);
}
foreach ($new_value as $i) {
$this->selected_values[intval($i)] = true;
}
}
/**
* Reset the selected values by finding ones who starts or end with ":"
*/
public function resetSelectedValues()
{
$this->selected_values = array();
foreach ($this->value as $i => $val) {
$value = preg_replace('`(^\s*:|:\s*$)`', '', $val, -1, $count);
if ($count) {
$this->value[$i] = $value;
$this->selected_values[$i] = true;
}
}
}
/**
* Check field value.
* @return boolean
*/
public function validate()
{
// empty and required
if (empty($this->value) && $this->required) {
$this->error = 'field_required';
return false;
}
// value blacklisted or not in whitelist
if ($reason = $this->isBlacklisted()) {
$this->error = 'field_' . $reason;
return false;
}
// not empty but not valid
if (!empty($this->value) && !$this->isValid()) {
$this->error = 'field_' . $this->type;
return false;
}
return true;
}
/**
* Check if field value is valid
* Mean different things depending on field type
* @return boolean
*/
public function isValid()
{
switch ($this->type) {
case 'email':
return filter_var($this->value, FILTER_VALIDATE_EMAIL);
case 'tel':
$pattern = '`^\+?[-0-9(). ]{6,}$$`i';
return preg_match($pattern, $this->value);
case 'url':
return filter_var($this->value, FILTER_VALIDATE_URL);
case 'message':
return strlen($this->value) > $this->form->config('message_len');
case 'captcha':
return $this->reCaptchaValidity($_POST['g-recaptcha-response']);
case 'password':
return $this->value == $this->required;
default:
return true;
}
}
/**
* Check if reCaptcha is valid
* @return boolean
*/
public function reCaptchaValidity($answer)
{
if (!$answer) {
return false;
}
$params = [
'secret' => $this->form->config('recaptcha_secret_key'),
'response' => $answer
];
$url = "https://www.google.com/recaptcha/api/siteverify?" . http_build_query($params);
if (function_exists('curl_version')) {
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec($curl);
} else {
$response = file_get_contents($url);
}
if (empty($response) || is_null($response)) {
return false;
}
return json_decode($response)->success;
}
/**
* Check if field value is blacklisted
*
* Search for every comma-separated entry of every checklist
* in value, and define if it should or should not be there.
*
* @return boolean
*/
public function isBlacklisted()
{
$list = $this->form->config('checklist');
if (!$list) {
return;
}
foreach ($list as $cl) {
if ($cl->name != $this->type) {
continue;
}
$content = array_filter(explode(',', $cl->content));
foreach ($content as $avoid) {
$found = preg_match("`$avoid`", $this->value);
$foundBlacklisted = $found && $cl->type == 'blacklist';
$notFoundWhitelisted = !$found && $cl->type == 'whitelist';
if ($foundBlacklisted || $notFoundWhitelisted) {
return $cl->type;
}
}
}
return false;
}
/*
* Return the html display of the field
*
* Manage field title, error message, and type-based display
* @return string the <div>
*/
public function html()
{
$id = 'p01-contact' . $this->form->getId() . '_field' . $this->id;
$name = 'p01-contact_fields[' . $this->id . ']';
$type = $this->getGeneralType();
$orig = $type != $this->type ? $this->type : '';
$value = $this->value;
$disabled = $this->locked ? ' disabled="disabled"' : '';
$required = $this->required ? ' required ' : '';
$placeholder = $this->placeholder ? ' placeholder="'.$this->placeholder.'"' : '';
$is_single_option = is_array($this->value) && count($this->value) == 1;
if ($is_single_option) {
$html = "<div class=\"field inline $type $orig $required\">";
} else {
$html = "<div class=\"field $type $orig $required\">";
$html .= $this->htmlLabel($id);
}
switch ($type) {
case 'textarea':
$html .= '<textarea id="' . $id . '" rows="10" ';
$html .= 'name="' . $name . '"' . $disabled.$required.$placeholder;
$html .= '>' . $value . '</textarea>';
break;
case 'captcha':
$key = $this->form->config('recaptcha_public_key');
if (!$key) {
break;
}
if ($this->form->getId() == 1) {
$html .= '<script src="https://www.google.com/recaptcha/api.js"></script>';
}
$html .='<div class="g-recaptcha" id="'.$id.'" data-sitekey="'.$key.'"></div>';
$html .="<input type=\"hidden\" id=\"$id\" name=\"$name\" value=\"trigger\">";
break;
case 'checkbox':
case 'radio':
$html .= '<div class="options">';
foreach ($this->value as $i => $v) {
$selected = $this->isSelected($i) ? ' checked' : '';
$v = !empty($v) ? $v : 'Default';
$html .= '<label class="option">';
$html .= "<input id=\"{$id}_option{$i}\"";
$html .= " type=\"$type\" class=\"$type\" name=\"{$name}\"";
$html .= " value=\"$i\"$disabled$required$selected />$v";
$html .= '</label>';
}
$html .= '</div>';
break;
case 'select':
$html .= "<select id=\"$id\" name=\"$name\"$disabled$required>";
foreach ($this->value as $i => $v) {
$value = !empty($v) ? $v : 'Default';
$selected = $this->isSelected($i) ? ' selected="selected"' : '';
$html .= "<option id=\"{$id}_option{$i}\" value=\"$i\"$selected>";
$html .= $value . '</option>';
}
$html.= '</select>';
break;
default:
$html .= '<input id="' . $id . '" ';
$html .= 'name="' . $name . '" type="'.$type.'" ';
$html .= 'value="' . $value . '"' . $disabled.$required.$placeholder . ' />';
break;
}
$html .= '</div>';
return $html;
}
/*
* Return a html presentation of the field value.
*/
public function htmlMail()
{
$gen_type = $this->getGeneralType();
$properties = array();
$html = '<table style="width: 100%; margin: 1em 0; border-collapse: collapse;">';
// name
$emphasis = $this->value ? 'font-weight:bold' : 'font-style:italic';
$html .= "\n\n\n";
$html .= '<tr style="background-color: #eeeeee">';
$html .= '<td style="padding: .5em .75em"><span style="'.$emphasis.'">';
$html .= $this->title ? $this->title : ucfirst($this->form->lang($this->type));
$html .= '</span></td>';
$html .= "\t\t";
// properties
$html .= '<td style="padding:.5em 1em; text-transform:lowercase; text-align:right; font-size:.875em; color:#888888; vertical-align: middle"><em>';
if (!$this->value) {
$html .= $this->form->lang('empty') . ' ';
}
if ($this->title) {
$properties[] = $this->type;
}
if ($gen_type != $this->type) {
$properties[] = $gen_type;
}
foreach (array('locked', 'required') as $property) {
if ($this->$property) {
$properties[] = $this->form->lang($property);
}
}
if (count($properties)) {
$html .= '(' . implode(', ', $properties) . ') ';
}
$html .= '#' . $this->id;
$html .= '</em></td></tr>';
$html .= "\n\n";
// value
if (!$this->value) {
return $html . '</table>';
}
$html .= '<tr><td colspan=2 style="padding:0">';
$html .= '<div style="padding:.5em 1.5em;border:1px solid #ccc">';
switch ($gen_type) {
case 'checkbox':
case 'radio':
case 'select':
foreach ($this->value as $i => $v) {
if ($this->isSelected($i)) {
$html .= '<div>';
$checkmark = '&#9745;';
} else {
$html .= '<div style="color:#ccc; font-style:italic">';
$checkmark = '&#9744;';
}
$html .= '<span style="font-size:1.5em; vertical-align:middle; margin-right:.5em; font-style:normal">'.$checkmark.'</span>';
$html .= empty($v) ? 'Default' : $v;
$html .= "</div>\n";
}
break;
default:
$address = '~[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]~';
$val = nl2br(preg_replace($address, '<a href="\\0">\\0</a>', $this->value));
$html .= "<p style=\"margin:0\">$val</p>";
break;
}
$html .= '</div></td></tr></table>';
return $html;
}
private function isSelected($i)
{
return is_int($i) && is_array($this->selected_values) && isset($this->selected_values[$i]);
}
/*
* Return the label of the field
* @param string $for id of the target field
* @return string the <div> (unclosed for captcha)
*/
private function htmlLabel($for)
{
$html = '<label for="' . $for . '">';
if ($this->title) {
$html .= $this->title;
} else {
$html .= ucfirst($this->form->lang($this->type));
}
if ($this->description) {
$html .= ' <em class="description">' . $this->description . '</em>';
}
if ($this->error) {
$html .= ' <span class="error-msg">' . $this->form->lang($this->error) . '</span>';
}
$html .= '</label>';
return $html;
}
/**
* Return the general type of a field, even of specials fields.
*/
private function getGeneralType()
{
$types = array(
'name' => 'text',
'subject' => 'text',
'message' => 'textarea',
'askcopy' => 'checkbox'
);
if (isset($types[$this->type])) {
return $types[$this->type];
}
return $this->type;
}
}
function preint($arr, $return = false)
{
$out = '<pre class="test" style="white-space:pre-wrap;">' . print_r(@$arr, true) . '</pre>';
if ($return) {
return $out;
}
echo $out;
}
function predump($arr)
{
echo'<pre class="test" style="white-space:pre-wrap;">';
var_dump($arr);
echo'</pre>';
}
function unset_r($a, $i)
{
foreach ($a as $k => $v) {
if (isset($v[$i])) {
unset($a[$k][$i]);
}
}
return $a;
}

View File

@ -0,0 +1,545 @@
<?php
/**
* p01-contact - A simple contact forms manager
*
* @link https://github.com/nliautaud/p01contact
* @author Nicolas Liautaud
* @package p01contact
*/
namespace P01C;
require 'P01contact_Field.php';
class P01contactForm
{
private $manager;
private $id;
private $status;
private $targets;
private $fields;
public $lang;
public $sent;
/**
* @param P01contact $P01contact
* @param int $id the form id
*/
public function __construct($P01contact)
{
static $id;
$id++;
$this->manager = $P01contact;
$this->id = $id;
$this->status = '';
$this->targets = array();
$this->fields = array();
}
/**
* Find tag parameters, populate fields and targets.
*
* @param string $params the params
*/
public function parseTag($params)
{
// assure formating
$params = str_replace('&nbsp;', ' ', $params);
$params = strip_tags(str_replace("\n", '', $params));
$params = html_entity_decode($params, ENT_QUOTES, 'UTF-8');
// explode
$sep = $this->config('separator');
$params = array_filter(explode($sep, $params));
// emails
foreach ($params as $id => $param) {
$param = trim($param);
if (filter_var($param, FILTER_VALIDATE_EMAIL)) {
$this->addTarget($param);
unset($params[$id]);
}
}
// default params
if (empty($params)) {
$default = $this->config('default_params');
$params = array_filter(explode($sep, $default));
}
// create fields
foreach (array_values($params) as $id => $param) {
$this->parseParam($id, trim($param));
}
// default email addresses
$default_emails = $this->getValidEmails($this->config('default_email'));
foreach ($default_emails as $email) {
$this->addTarget($email);
}
}
/**
* Create a field by parsing a tag parameter
*
* Find emails and parameters, create and setup form object.
* @param int $id the field id
* @param string $param the param to parse
*/
private function parseParam($id, $param)
{
$param_pattern = '`\s*([^ ,"=!]+)'; // type
$param_pattern.= '\s*(!)?'; // required!
$param_pattern.= '\s*(?:"([^"]*)")?'; // "title"
$param_pattern.= '\s*(?:\(([^"]*)\))?'; // (description)
$param_pattern.= '\s*(?:(=[><]?)?'; // =value, =>locked, =<placeholder
$param_pattern.= '\s*(.*))?\s*`'; // value
preg_match($param_pattern, $param, $param);
list(, $type, $required, $title, $desc, $assign, $values) = $param;
$field = new P01contactField($this, $id, $type);
// values
switch ($type) {
case 'select':
case 'radio':
case 'checkbox':
$field->value = explode('|', $values);
$field->resetSelectedValues();
break;
case 'askcopy':
// checkbox-like structure
$field->value = array($this->lang('askcopy'));
break;
case 'password':
// password value is required value
$field->required = $values;
break;
default:
if ($assign == '=<') {
$field->placeholder = $values;
} else {
// simple value
$field->value = $values;
}
}
// required
if ($type != 'password') {
$field->required = $required == '!';
}
if ($type == 'captcha') {
$field->required = true;
}
$field->title = $title;
$field->description = $desc;
$field->locked = $assign == '=>';
$this->addField($field);
}
/**
* Update POSTed form and try to send mail
*
* Check posted data, update form data,
* define fields errors and form status.
* At least, if there is no errors, try to send mail.
*/
public function post()
{
if (empty($_POST['p01-contact_form'])
|| $_POST['p01-contact_form']['id'] != $this->id ) {
return;
}
// check token
if (!$this->checkToken()) {
$this->setStatus('sent_already');
$this->setToken();
$this->reset();
return;
}
$posted = $_POST['p01-contact_fields'];
// populate fields values and check errors
$hasFieldsErrors = false;
$fields = $this->getFields();
foreach ($fields as $field) {
if (!isset($posted[$field->id])) {
continue;
}
$posted_val = $posted[$field->id];
$field->setValue($posted_val);
$hasFieldsErrors = !$field->validate() || $hasFieldsErrors;
}
// check errors and set status
if ($this->config('disable')) {
$this->setStatus('disable');
return;
}
if (count($this->targets) == 0) {
$this->setStatus('error_notarget');
return;
}
if ($hasFieldsErrors || $this->checkSpam($posted) !== true) {
return;
}
$this->sendMail();
$this->setToken();
$this->reset();
}
/*
* SECURITY
*/
/**
* Check if the honeypot field is untouched and if the time between this post,
* the page load and previous posts and the hourly post count are valid
* according to the settings, and set the form status accordingly.
*
* @param P01contact_form $form The submitted form
* @param array $post Sanitized p01-contact data of $_POST
* @return bool the result status
*/
private function checkSpam($post)
{
if (isset($post['totally_legit'])) {
$this->setStatus('error_honeypot');
return false;
}
$loads = Session::get('pageloads');
if (count($loads) > 1 && $loads[1] - $loads[0] < $this->config('min_sec_after_load')) {
$this->setStatus('error_pageload');
return false;
}
$lastpost = Session::get('lastpost', false);
if ($lastpost && time() - $lastpost < $this->config('min_sec_between_posts')) {
$this->setStatus('error_lastpost');
return false;
}
$postcount = Session::get('postcount', 0);
if (!$this->config('debug') && $postcount > $this->config('max_posts_by_hour')) {
$this->setStatus('error_postcount');
return false;
}
Session::set('lastpost', time());
Session::set('postcount', $postcount + 1);
return true;
}
/**
* Create an unique hash in Session
*/
private static function setToken()
{
Session::set('token', uniqid(md5(microtime()), true));
}
/**
* Get the token in Session (create it if not exists)
* @return string
*/
public function getToken()
{
if (!Session::get('token', false)) {
$this->setToken();
}
return Session::get('token');
}
/**
* Compare the POSTed token to the Session one
* @return boolean
*/
private function checkToken()
{
return $this->getToken() === $_POST['p01-contact_form']['token'];
}
/*
* RENDER
*/
/**
* Return the html display of the form
* @return string the <form>
*/
public function html()
{
$html = '<form action="'.PAGEURL.'#p01-contact'.$this->id.'" autocomplete="off" ';
$html .= 'id="p01-contact' . $this->id . '" class="p01-contact" method="post">';
if ($this->status) {
$html .= $this->htmlStatus();
}
if (!$this->sent) {
foreach ($this->fields as $field) {
$html .= $field->html();
}
if ($this->config('use_honeypot')) {
$html .= '<input type="checkbox" name="p01-contact_fields[totally_legit]" value="1" style="display:none !important" tabindex="-1" autocomplete="false">';
}
$html .= '<div><input name="p01-contact_form[id]" type="hidden" value="' . $this->id . '" />';
$html .= '<input name="p01-contact_form[token]" type="hidden" value="' . $this->getToken() . '" />';
$html .= '<input class="submit" type="submit" value="' . $this->lang('send') . '" /></div>';
}
$html .= '</form>';
if ($this->config('debug')) {
$html .= $this->debug(false);
}
return $html;
}
/**
* Return an html display of the form status
* @return string the <div>
*/
private function htmlStatus()
{
$statusclass = $this->sent ? 'alert success' : 'alert failed';
return '<div class="' . $statusclass . '">' . $this->lang($this->status) . '</div>';
}
/**
* Return P01contact_form infos.
* @return string
*/
public function debug($set_infos)
{
$out = '<div class="debug debug_form">';
static $post;
if ($set_infos) {
$post = $set_infos;
return;
}
if ($post) {
list($headers, $targets, $subject, $text_content, $html_content) = $post;
$out.= '<h3>Virtually sent mail :</h3>';
$out.= '<pre>'.htmlspecialchars($headers).'</pre>';
$out.= "<pre>Targets: $targets\nSubject: $subject</pre>";
$out.= "Text content : <pre>$text_content</pre>";
$out.= "HTML content : <div style=\"border:1px solid #ccc;\">$html_content</div>";
}
$infos = $this;
unset($infos->manager);
$out .= "<h3>p01contact form $this->id :</h3>";
$out .= preint($infos, true);
$out .= '</div>';
return $out;
}
/*
* MAIL
*/
/**
* Send a mail based on form
*
* Create the mail content and headers along to settings, form
* and fields datas; and update the form status (sent|error).
*/
public function sendMail()
{
$email = $name = $subject = $askcopy = null;
$tpl_data = (object) null;
$tpl_data->date = date('r');
$tpl_data->ip = $_SERVER["REMOTE_ADDR"];
$tpl_data->contact = $this->targets[0];
// fields
$tpl_data->fields = '';
foreach ($this->fields as $field) {
$tpl_data->fields .= $field->htmlMail();
switch ($field->type) {
case 'name':
$name = $field->value;
break;
case 'email':
$email = $field->value;
break;
case 'subject':
$subject = $field->value;
break;
case 'askcopy':
$askcopy = true;
break;
}
}
$html = $this->manager->renderTemplate('mail_template', $tpl_data);
$text = strip_tags($html);
if (empty($name)) {
$name = $this->lang('anonymous');
}
if (empty($subject)) {
$subject = $this->lang('nosubject');
}
// targets, subject, headers and multipart content
$targets = implode(',', $this->targets);
$encoded_subject = $this->encodeHeader($subject);
$mime_boundary = '----'.md5(time());
$headers = $this->mailHeaders($name, $email, $mime_boundary);
$content = $this->mailContent($text, 'plain', $mime_boundary);
$content .= $this->mailContent($html, 'html', $mime_boundary);
$content .= "--$mime_boundary--\n\n";
// debug
if ($this->config('debug')) {
$this->debug(array($headers, $targets, $subject, $text, $html));
return $this->setStatus('sent_debug');
}
// send mail
$success = mail($targets, $encoded_subject, $content, $headers);
// log
$this->manager->log(array(
date('d/m/Y H:i:s'), $targets, $subject, $name, $success ? 'success':'error'
));
if (!$success) {
return $this->setStatus('error');
}
if (!$email || !$askcopy) {
return $this->setStatus('sent');
}
// mail copy
$copy = mail($email, $encoded_subject, $content, $headers);
$this->setStatus($copy ? 'sent_copy' : 'sent_copy_error');
}
/**
* Return the mail headers
* @param string $name
* @param string $email
* @param string $mime_boundary
* @return string
*/
private function mailHeaders($name, $email, $mime_boundary)
{
$encoded_name = $this->encodeHeader($name);
$headers = "From: $encoded_name <no-reply@" . SERVERNAME . ">\n";
if ($email) {
$headers .= "Reply-To: $encoded_name <$email>\n";
$headers .= "Return-Path: $encoded_name <$email>";
}
$headers .= "\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: multipart/alternative; boundary=\"$mime_boundary\"\n";
$headers .= "X-Mailer: PHP/" . phpversion() . "\n";
return $headers;
}
/**
* Return a multipart/alternative content part.
* @param string $content
* @param string $type the content type (plain, html)
* @param string $mime_boundary
* @return string
*/
private function mailContent($content, $type, $mime_boundary)
{
$head = "--$mime_boundary\n";
$head .= "Content-Type: text/$type; charset=UTF-8\n";
$head .= "Content-Transfer-Encoding: 7bit\n\n";
return $head.$content."\n";
}
/**
* Format a string for UTF-8 email headers.
* @param string $string
* @return string
*/
private function encodeHeader($string)
{
$string = base64_encode(html_entity_decode($string, ENT_COMPAT, 'UTF-8'));
return "=?UTF-8?B?$string?=";
}
/**
* Return array of valid emails from a comma separated string
* @param string $emails
* @return array
*/
public static function getValidEmails($emails)
{
return array_filter(explode(',', $emails), function ($email) {
return filter_var($email, FILTER_VALIDATE_EMAIL);
});
}
/**
* GETTERS / SETTERS
*/
/*
* Reset all fields values and errors
*/
public function reset()
{
foreach ($this->fields as $field) {
$field->value = '';
$field->error = '';
}
}
public function getTargets()
{
return $this->targets;
}
public function addTarget($tget)
{
if (in_array($tget, $this->targets) === false) {
$this->targets[] = $tget;
}
}
public function getField($id)
{
return $this->fields[$id];
}
public function getFields()
{
return $this->fields;
}
public function addField($field)
{
$this->fields[] = $field;
}
public function getStatus()
{
return $this->status;
}
public function setStatus($status)
{
if (!is_string($status)) {
return;
}
$this->status = $status;
if (substr($status, 0, 4) == 'sent') {
$this->sent = true;
}
}
public function getId()
{
return $this->id;
}
public function config($key)
{
return $this->manager->config($key);
}
public function lang($key)
{
return $this->manager->lang($key, $this->lang);
}
}

View File

@ -0,0 +1,107 @@
<?php
/**
* p01-contact - A simple contact forms manager
*
* @link https://github.com/nliautaud/p01contact
* @author Nicolas Liautaud
* @package p01contact
*/
namespace P01C;
class Session
{
private static $key = 'p01contact';
private static function init()
{
if (session_id() === '') {
session_start();
}
if (!self::exists()) {
$_SESSION[self::$key] = [];
}
}
/**
* Return if the session data exists, or if the given key exists.$_COOKIE
*
* @param string $key
* @return bool
*/
public static function exists($key = null)
{
$sessionExist = !empty($_SESSION) && !empty($_SESSION[self::$key]);
if ($key === null) {
return $sessionExist;
}
return $sessionExist && isset($_SESSION[self::$key][$key]);
}
/**
* Set the given key to the given value.
*
* @param string $key
* @param mixed $val
* @return void
*/
public static function set($key, $val)
{
if (!self::exists()) {
self::init();
}
$_SESSION[self::$key][$key] = $val;
}
/**
* Get the given key data.
*
* @param string $key
* @param mixed $default (optional) Value to return if the key doesn't exist.
* @return mixed `$default` or `null`
*/
public static function get($key, $default = null)
{
if (!self::exists($key)) {
return $default;
}
return $_SESSION[self::$key][$key];
}
/**
* Add value to the array named key and shift old
* entries until the array is of given size.
*
* @param string $key
* @param mixed $val
* @param integer $size
* @return void
*/
public static function stack($key, $val, $size = 2)
{
if (!self::exists()) {
self::init();
}
$arr = self::get($key);
if (!isset($arr)) {
$arr = [];
}
if (!is_array($arr)) {
return;
}
array_push($arr, $val);
while (count($arr) > $size) {
array_shift($arr);
}
self::set($key, $arr);
}
/**
* Return the session data, in html.
*
* @return string
*/
public static function report()
{
if (!self::exists()) {
return;
}
$out = '<h3>$_SESSION :</h3>';
$out.= preint($_SESSION, true);
return $out;
}
}

View File

@ -0,0 +1,178 @@
<style>
.p01contact_panel * {
box-sizing: border-box;
width: auto;
}
.p01contact_panel {
overflow: auto;
}
.p01contact_panel .version {
color: #aaa;
float: right;
font-weight: bold;
}
.p01contact_panel fieldset {
border: 0;
width: 100%;
margin: 2em 0;
}
.p01contact_panel .field {
display: flex;
align-items: center;
justify-content: space-between;
margin: 1em 0 0 0;
}
.p01contact_panel .field > :first-child {
width: 48%;
}
.p01contact_panel .field > :last-child {
width: 48%;
}
.p01contact_panel textarea {
height: 3em;
}
.p01contact_panel strong {
display: block;
}
.p01contact_panel p {
margin: 1em 0;
line-height: 1.2;
}
.p01contact_panel p,
.p01contact_panel .field em {
color: #999;
font-weight: normal;
font-size: .95em;
font-style: normal;
}
.p01contact_panel em label {
display: inline;
font-size: 1em;
font-weight: normal;
color: #888;
padding: 0 .5em;
}
.p01contact_panel .text.left {
width: 7em;
margin-right: 2em;
}
.p01contact_panel .submit {
float: right;
}
.logs {
margin-top: 5em;
}
.logs table {
max-height: 30em;
}
</style>
<div class="p01contact_panel">
<form action="" method="post">
<input class="submit" type="submit" value="Save settings" />
<h3>{{lang.config_title}}</h3>
<p>
<a href="{{REPOURL}}">{{lang.repo}}</a> -
<a href="{{WIKIURL}}">{{lang.wiki}}</a> -
<a href="{{ISSUESURL}}">{{lang.issues}}</a>
<span class="version">v{{version}}</span>
</p>
<label class="field">
<div><strong>{{lang.default_email}}</strong><em>{{lang.default_email_sub}}</em></div>
<textarea name="p01-contact[settings][default_email]">config(default_email)</textarea>
</label>
<label class="field">
<div><strong>{{lang.lang}}</strong><em>{{lang.lang_sub}} {{default_lang}}</em></div>
<select class="text" name="p01-contact[settings][lang]">{{langsoptions}}</select>
</label>
<label class="field">
<div><strong>{{lang.message_len}}</strong><em>{{lang.message_len_sub}}</em></div>
<input type="number" class="text" name="p01-contact[settings][message_len]" value="config(message_len)" size=3 maxlength=3 min=0 />
</label>
<label class="field">
<div><strong>{{lang.default_params}}</strong><em>{{lang.default_params_sub}}</em></div>
<textarea name="p01-contact[settings][default_params]">config(default_params)</textarea>
</label>
<label class="field">
<div><strong>{{lang.separator}}</strong><em>{{lang.separator_sub}}</em></div>
<input type="text" class="text" name="p01-contact[settings][separator]" value="config(separator)"/>
</label>
<label class="field">
<div><strong>{{lang.logs_count}}</strong><em>{{lang.logs_count_sub}}</em></div>
<input type="number" class="text" name="p01-contact[settings][logs_count]" value="config(logs_count)" min=0 />
</label>
<fieldset>
<h3>{{lang.checklists}}</h3>
<p>{{lang.checklists_sub}}</p>
<div class="field">
<div>
<input type="text" class="text left" name="p01-contact[settings][checklist][0][name]" value="config(checklist,0,name)"/>
<em>
<label><input name="p01-contact[settings][checklist][0][type]" type="radio" value="blacklist" {{cl0bl}}/> {{lang.blacklist}}</label>
<label><input name="p01-contact[settings][checklist][0][type]" type="radio" value="whitelist" {{cl0wh}}/> {{lang.whitelist}}</label>
</em>
</div>
<textarea name="p01-contact[settings][checklist][0][content]">config(checklist,0,content)</textarea>
</div>
<div class="field">
<div>
<input type="text" class="text left" name="p01-contact[settings][checklist][1][name]" value="config(checklist,1,name)"/>
<em>
<label><input name="p01-contact[settings][checklist][1][type]" type="radio" value="blacklist" {{cl1bl}}/> {{lang.blacklist}}</label>
<label><input name="p01-contact[settings][checklist][1][type]" type="radio" value="whitelist" {{cl1wh}}/> {{lang.whitelist}}</label>
</em>
</div>
<textarea name="p01-contact[settings][checklist][1][content]">config(checklist,1,content)</textarea>
</div>
<div class="field">
<div>
<input type="text" class="text left" name="p01-contact[settings][checklist][2][name]" value="config(checklist,2,name)"/>
<em>
<label><input name="p01-contact[settings][checklist][2][type]" type="radio" value="blacklist" {{cl2bl}}/> {{lang.blacklist}}</label>
<label><input name="p01-contact[settings][checklist][2][type]" type="radio" value="whitelist" {{cl2wh}}/> {{lang.whitelist}}</label>
</em>
</div>
<textarea name="p01-contact[settings][checklist][2][content]">config(checklist,2,content)</textarea>
</div>
</fieldset>
<fieldset>
<h3>{{lang.Security}}</h3>
<label class="field">
<div><strong>{{lang.use_honeypot}}</strong><em>{{lang.use_honeypot_sub}}</em></div>
<input type="checkbox" name="p01-contact[settings][use_honeypot]" {{honeypotchecked}}/>
</label>
<label class="field">
<div><strong>{{lang.min_sec_after_load}}</strong><em>{{lang.min_sec_after_load_sub}}</em></div>
<input type="number" class="text" name="p01-contact[settings][min_sec_after_load]" value="config(min_sec_after_load)" min=0 />
</label>
<label class="field">
<div><strong>{{lang.min_sec_between_posts}}</strong><em>{{lang.min_sec_between_posts_sub}}</em></div>
<input type="number" class="text" name="p01-contact[settings][min_sec_between_posts]" value="config(min_sec_between_posts)" min=0 />
</label>
<label class="field">
<div><strong>{{lang.max_posts_by_hour}}</strong><em>{{lang.max_posts_by_hour_sub}}</em></div>
<input type="number" class="text" name="p01-contact[settings][max_posts_by_hour]" value="config(max_posts_by_hour)" min=0 />
</label>
<p>{{lang.captcha_info}}</p>
<label class="field">
<div><strong>{{lang.recaptcha_public_key}}</strong><em>{{lang.recaptcha_public_key_sub}}</em> (<a href=\"https://www.google.com/recaptcha/admin\">reCaptcha admin</a>)</div>
<input type="text" class="text" name="p01-contact[settings][recaptcha_public_key]" value="config(recaptcha_public_key)"/>
</label>
<label class="field">
<div><strong>{{lang.recaptcha_secret_key}}</strong><em>{{lang.recaptcha_secret_key_sub}}</em> (<a href=\"https://www.google.com/recaptcha/admin\">reCaptcha admin</a>)</div>
<input type="text" class="text" name="p01-contact[settings][recaptcha_secret_key]" value="config(recaptcha_secret_key)"/>
</label>
</fieldset>
<fieldset>
<h3>{{lang.debug}}</h3>
<label class="field">
<div><strong>{{lang.disable}}</strong><em>{{lang.disable_sub}}</em></div>
<input type="checkbox" name="p01-contact[settings][disable]" {{disablechecked}}/>
</label>
<label class="field">
<div><strong>{{lang.debug}}</strong><em>{{lang.debug_sub}} {{lang.debug_warn}}</em></div>
<input type="checkbox" name="p01-contact[settings][debug]" {{debugchecked}}/>
</label>
</fieldset>
<input class="submit" type="submit" value="Save settings" />
</form>
</div>

View File

@ -0,0 +1,28 @@
<table width="100%" style="min-height: 100%; max-width: 40em; margin: auto">
<tr style="height: 3em;">
<td colspan="3">
<h2 style='margin: .5em 0; font-size: 1.5em; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;'>
{{lang.email_title}}
<a href="{{PAGEURL}}">{{SERVERNAME}}</a>
</h2>
</td>
<tr style="height: 2em; font-size: .875em; color: #888888">
<td style="text-align: left">{{date}}</td>
<td style="text-align: center"><a href="{{PAGEURL}}" style="color:#888888">{{PAGEURI}}</a></td>
<td style="text-align: right">{{ip}}</td>
</tr>
<tr>
<td colspan="3" style="padding: 4em 0">{{fields}}</td>
</tr>
<tr style="height: 2em; font-size: .875em">
<td colspan="2">
If this mail should not be for you, please contact
<a href="mailto:{{contact}}">{{contact}}</a>.
</td>
<td style="text-align:right">
<a style="color: #cccccc; text-decoration: none" href="{{REPOURL}}">
p01-contact v{{VERSION}}
</a>
</td>
</tr>
</table>

1161
plugins/PicoContact/src/vendor/spyc.php vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,100 @@
.p01-contact * {
box-sizing: border-box;
}
.p01-contact {
margin: 1em auto;
max-width: 26em;
font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
}
.p01-contact .field {
margin-top: .5em;
}
.p01-contact .field.inline {
margin-top: 1em;
}
.p01-contact label {
display: block;
font-weight: normal;
}
.p01-contact label .description{
font-size: .875em;
color: #888;
float: right;
}
.p01-contact input:not([type=radio]):not([type=checkbox]),
.p01-contact textarea,
.p01-contact select{
border:1px solid #BEBEBE;
padding: 7px;
margin:0px;
transition: all 0.30s ease-in-out;
outline: none;
width: 100%;
}
.p01-contact input:focus,
.p01-contact textarea:focus,
.p01-contact select:focus{
box-shadow: 0 0 8px #88D5E9;
border: 1px solid #88D5E9;
}
.p01-contact input[type=submit]:not([type=radio]):not([type=checkbox]),
.p01-contact input[type=button]:not([type=radio]):not([type=checkbox]){
background: #4B99AD;
padding: 8px 15px 8px 15px;
margin: 1em 0;
border: none;
color: #fff;
}
.p01-contact input[type=submit]:hover,
.p01-contact input[type=button]:hover{
background: #4691A4;
box-shadow:none;
}
.p01-contact .required label:after {
content: ' *';
color: #4B99AD;
font-weight: bold;
}
.p01-contact input[type=radio],
.p01-contact input[type=checkbox] {
vertical-align: middle;
}
.p01-contact :not(.inline) .options {
display: flex;
border: 1px solid #ddd;
padding: .5em;
}
.p01-contact :not(.inline) .options .option {
margin: 0 1em;
}
.p01-contact .options input {
display: inline-block;
margin-right: .5em;
}
.p01-contact .error-msg {
color: red;
font-size: .85em;
margin-left: .5em;
}
input:invalid,
textarea:invalid {
box-shadow: none;
}
.p01-contact .alert {
padding: 15px;
margin-bottom: 20px;
border: 1px solid transparent;
border-radius: 4px;
}
.p01-contact .alert.success {
color: #3c763d;
background-color: #dff0d8;
border-color: #d6e9c6;
}
.p01-contact .alert.failed {
color: #a94442;
background-color: #f2dede;
border-color: #ebccd1;
}

124
plugins/PicoPagesImages.php Normal file
View File

@ -0,0 +1,124 @@
<?php
/**
* Get the images of the current page with {{ images }} in Pico CMS.
* Edited September 2018 by Brian Goncalves
*
* @author Nicolas Liautaud <contact@nliautaud.fr>
* @license http://opensource.org/licenses/MIT The MIT License
* @link http://nliautaud.fr
* @link http://picocms.org
*/
class PicoPagesImages extends AbstractPicoPlugin
{
const API_VERSION = 2;
private $path;
private $root;
/**
* Register path relative to content without index and extension
* var/html/content/foo/bar.md => foo/bar/
*
* Triggered after Pico has discovered the content file to serve
*
* @see Pico::resolveFilePath()
* @see Pico::getRequestFile()
*
* @param string &$file absolute path to the content file to serve
*
* @return void
*/
public function onRequestFile(&$file)
{
$contentDir = $this->getConfig('content_dir');
$contentDirLength = strlen($contentDir);
if (substr($file, 0, $contentDirLength) !== $contentDir) {
return;
}
$contentExt = $this->getConfig('content_ext');
$this->path = substr($file, $contentDirLength);
$this->path = rtrim($this->path, "index$contentExt");
$this->path = rtrim($this->path, $contentExt);
if ($this->path) {
$this->path .= '/';
}
}
/**
* Triggered after Pico has read its configuration
*
* @see Pico::getConfig()
* @param array &$config array of config variables
* @return void
*/
public function onConfigLoaded(array &$config)
{
if (!empty($config['images_path'])) {
$this->root = rtrim($config['images_path'], '/') . '/';
} else {
$this->root = 'images/';
}
}
/**
* Triggered before Pico renders the page
*
* @see DummyPlugin::onPageRendered()
*
* @param string &$templateName file name of the template
* @param array &$twigVariables template variables
*
* @return void
*/
public function onPageRendering(&$templateName, array &$twigVariables)
{
// Create images array
$twigVariables['images'] = $this->getImages();
}
/**
* Return the list and infos of images in the current directory.
*
* @return array
*/
private function getImages()
{
$images_path = $this->root . $this->path;
// Filter images path for extra slashes
$images_path = preg_replace('/(\/+)/','/',$images_path);
$data = array();
$pattern = '*.{[jJ][pP][gG],[jJ][pP][eE][gG],[pP][nN][gG],[gG][iI][fF]}';
$images = glob($images_path . $pattern, GLOB_BRACE);
$meta = array();
if (!is_array($images)) {
return array();
}
foreach ($images as $path) {
$imagesize = getimagesize($path);
if (!is_array($imagesize)) {
$imagesize = array();
}
list($width, $height,, $size) = array_pad($imagesize, 4, '');
// Find meta files for images if they exist
$metapath = $path . '.meta.yml';
if (is_file($metapath)) {
$yamlparser = $this->getPico()->getYamlParser();
$meta = $yamlparser->parse(file_get_contents($metapath));
}
$data[] = array (
'url' => $this->getBaseUrl() . $images_path . pathinfo($path, PATHINFO_BASENAME),
'path' => $images_path,
'name' => pathinfo($path, PATHINFO_FILENAME),
'ext' => pathinfo($path, PATHINFO_EXTENSION),
'width' => $width,
'height' => $height,
'size' => $size,
'meta' => $meta
);
}
return $data;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
:root { :root {
--fore-color: black; --fore-color: black;
--secondary-fore-color: slategray; --secondary-fore-color: slategray;
--back-color: rgb(241, 241, 241); --back-color: rgb(255, 255, 255);
--secondary-back-color: #222; --secondary-back-color: #222;
--blockquote-color: #f57c00; --blockquote-color: #f57c00;
--pre-color: #1565c0; --pre-color: #1565c0;
@ -16,7 +16,7 @@
--a-link-color: #0277bd; --a-link-color: #0277bd;
--a-visited-color: #01579b; --a-visited-color: #01579b;
--nav-back-color: var(--back-color); --nav-back-color: rgba(0, 0, 0, 0.05);
--nav-hover-back-color: rgba(0, 0, 0, 0.3); --nav-hover-back-color: rgba(0, 0, 0, 0.3);
--nav-fore-color: var(--fore-color); --nav-fore-color: var(--fore-color);
--nav-border-color: var(--border-color); --nav-border-color: var(--border-color);
@ -26,8 +26,6 @@
html { html {
background-color: var(--back-color); background-color: var(--back-color);
font-family: 'Lato', sans-serif; font-family: 'Lato', sans-serif;
font-size: 16px;
line-height: 1.2;
} }
.container { .container {
@ -50,6 +48,8 @@ html {
header { header {
grid-column: 2 / span 2; grid-column: 2 / span 2;
background: transparent;
border-bottom: 0;
} }
h1, h1,

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -7,7 +7,12 @@
<meta name="viewport" <meta name="viewport"
content="width=device-width, initial-scale=1, user-scalable=no" /> content="width=device-width, initial-scale=1, user-scalable=no" />
<title>{% if meta.title %}{{ meta.title }} | {% endif %}{{ site_title }}</title> <title>
{% if meta.title %}
{{ meta.title }}
|
{% endif %}
{{ site_title }}</title>
{% if meta.description %} {% if meta.description %}
<meta name="description" <meta name="description"
content="{{ meta.description|striptags }}" /> content="{{ meta.description|striptags }}" />
@ -23,7 +28,7 @@
{% endif %} {% endif %}
<link rel="stylesheet" <link rel="stylesheet"
href="{{ theme_url }}/css/normalize.css"> href="{{ theme_url }}/css/mini-default.css">
<link rel="stylesheet" <link rel="stylesheet"
href="{{ theme_url }}/css/style.css" href="{{ theme_url }}/css/style.css"
type="text/css" /> type="text/css" />
@ -34,9 +39,12 @@
<body class="container"> <body class="container">
<header> <header>
<a href="{{ "index"|link }}"> <a href="{{ "index"|link }}"
<img src="{{ pages["_meta"].meta.logo|url }}" class="logo">
alt="" /> <img src="{{ theme_url }}/img/logo.svg "
alt=""
height="32"
width="32" />
<span class="site-title">{{ site_title }}</span> <span class="site-title">{{ site_title }}</span>
</a> </a>
</header> </header>
@ -62,9 +70,10 @@
{{ content }} {{ content }}
</section> </section>
{% endblock %} {% endblock %}
</main> </main>
<footer> <footer>
{% block footer %} {% endblock %} {% block footer %}{% endblock %}
</footer> </footer>
<script src="{{ theme_url }}/js/site.js" <script src="{{ theme_url }}/js/site.js"
type="text/javascript"></script> type="text/javascript"></script>