summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2024-12-01 20:06:51 +0100
committerDaniel Baumann <daniel@debian.org>2024-12-01 22:10:29 +0100
commit6b17835a93d8d6cceeb12caeb29eb800aeeecfd6 (patch)
tree4ade553b5b1a04272ca87523dac3cd2a77e1b2a4
parentAdding addnewpage makefile. (diff)
downloaddokuwiki-plugins-extra-6b17835a93d8d6cceeb12caeb29eb800aeeecfd6.tar.xz
dokuwiki-plugins-extra-6b17835a93d8d6cceeb12caeb29eb800aeeecfd6.zip
Adding addnewpage version 2024-11-16 (2be3f61).
Signed-off-by: Daniel Baumann <daniel@debian.org>
-rw-r--r--plugins/55/addnewpage/.gitattributes2
-rw-r--r--plugins/55/addnewpage/.mailmap3
-rw-r--r--plugins/55/addnewpage/README.md48
-rw-r--r--plugins/55/addnewpage/conf/default.php7
-rw-r--r--plugins/55/addnewpage/conf/metadata.php6
-rwxr-xr-xplugins/55/addnewpage/lang/ar/lang.php10
-rwxr-xr-xplugins/55/addnewpage/lang/ar/settings.php11
-rw-r--r--plugins/55/addnewpage/lang/bg/lang.php10
-rw-r--r--plugins/55/addnewpage/lang/bg/settings.php11
-rw-r--r--plugins/55/addnewpage/lang/ca/lang.php8
-rw-r--r--plugins/55/addnewpage/lang/ca/settings.php10
-rw-r--r--plugins/55/addnewpage/lang/ckb/lang.php10
-rw-r--r--plugins/55/addnewpage/lang/ckb/settings.php11
-rw-r--r--plugins/55/addnewpage/lang/cs/lang.php10
-rw-r--r--plugins/55/addnewpage/lang/cs/settings.php11
-rw-r--r--plugins/55/addnewpage/lang/da/lang.php10
-rw-r--r--plugins/55/addnewpage/lang/da/settings.php11
-rw-r--r--plugins/55/addnewpage/lang/de-informal/lang.php12
-rw-r--r--plugins/55/addnewpage/lang/de-informal/settings.php14
-rw-r--r--plugins/55/addnewpage/lang/de/lang.php11
-rw-r--r--plugins/55/addnewpage/lang/de/settings.php13
-rw-r--r--plugins/55/addnewpage/lang/en/lang.php9
-rw-r--r--plugins/55/addnewpage/lang/en/settings.php11
-rw-r--r--plugins/55/addnewpage/lang/eo/lang.php10
-rw-r--r--plugins/55/addnewpage/lang/eo/settings.php11
-rw-r--r--plugins/55/addnewpage/lang/es/lang.php8
-rw-r--r--plugins/55/addnewpage/lang/es/settings.php10
-rw-r--r--plugins/55/addnewpage/lang/fa/lang.php10
-rw-r--r--plugins/55/addnewpage/lang/fa/settings.php12
-rw-r--r--plugins/55/addnewpage/lang/fr/lang.php9
-rw-r--r--plugins/55/addnewpage/lang/fr/settings.php11
-rw-r--r--plugins/55/addnewpage/lang/hu/lang.php10
-rw-r--r--plugins/55/addnewpage/lang/hu/settings.php11
-rw-r--r--plugins/55/addnewpage/lang/it/lang.php11
-rw-r--r--plugins/55/addnewpage/lang/it/settings.php8
-rwxr-xr-xplugins/55/addnewpage/lang/ja/lang.php8
-rwxr-xr-xplugins/55/addnewpage/lang/ja/settings.php10
-rwxr-xr-xplugins/55/addnewpage/lang/ko/lang.php10
-rwxr-xr-xplugins/55/addnewpage/lang/ko/settings.php11
-rw-r--r--plugins/55/addnewpage/lang/nl/lang.php10
-rw-r--r--plugins/55/addnewpage/lang/nl/settings.php11
-rw-r--r--plugins/55/addnewpage/lang/no/lang.php10
-rw-r--r--plugins/55/addnewpage/lang/no/settings.php11
-rw-r--r--plugins/55/addnewpage/lang/pl/lang.php8
-rw-r--r--plugins/55/addnewpage/lang/pl/settings.php10
-rw-r--r--plugins/55/addnewpage/lang/pt-br/lang.php10
-rw-r--r--plugins/55/addnewpage/lang/pt-br/settings.php12
-rw-r--r--plugins/55/addnewpage/lang/pt/lang.php10
-rw-r--r--plugins/55/addnewpage/lang/pt/settings.php11
-rw-r--r--plugins/55/addnewpage/lang/ru/lang.php11
-rw-r--r--plugins/55/addnewpage/lang/ru/settings.php12
-rwxr-xr-xplugins/55/addnewpage/lang/sv/lang.php9
-rwxr-xr-xplugins/55/addnewpage/lang/sv/settings.php10
-rwxr-xr-xplugins/55/addnewpage/lang/uk/lang.php12
-rwxr-xr-xplugins/55/addnewpage/lang/uk/settings.php13
-rwxr-xr-xplugins/55/addnewpage/lang/vi/lang.php11
-rwxr-xr-xplugins/55/addnewpage/lang/vi/settings.php14
-rw-r--r--plugins/55/addnewpage/lang/zh-tw/lang.php8
-rw-r--r--plugins/55/addnewpage/lang/zh-tw/settings.php10
-rwxr-xr-xplugins/55/addnewpage/lang/zh/lang.php13
-rwxr-xr-xplugins/55/addnewpage/lang/zh/settings.php13
-rwxr-xr-xplugins/55/addnewpage/plugin.info.txt8
-rwxr-xr-xplugins/55/addnewpage/script.js35
-rw-r--r--plugins/55/addnewpage/style.less5
-rw-r--r--plugins/55/addnewpage/syntax.php423
65 files changed, 1129 insertions, 0 deletions
diff --git a/plugins/55/addnewpage/.gitattributes b/plugins/55/addnewpage/.gitattributes
new file mode 100644
index 0000000..6582f52
--- /dev/null
+++ b/plugins/55/addnewpage/.gitattributes
@@ -0,0 +1,2 @@
+# Auto detect text files and perform LF normalization
+* text=auto
diff --git a/plugins/55/addnewpage/.mailmap b/plugins/55/addnewpage/.mailmap
new file mode 100644
index 0000000..25d4663
--- /dev/null
+++ b/plugins/55/addnewpage/.mailmap
@@ -0,0 +1,3 @@
+Robert McLeod <hamstar@telescum.co.nz>
+Michael Kraemer <michael.kraemer@gmail.com>
+Michael Kraemer <michael.kraemer@gmail.com> <michael@krmr.org>
diff --git a/plugins/55/addnewpage/README.md b/plugins/55/addnewpage/README.md
new file mode 100644
index 0000000..3cc9ed7
--- /dev/null
+++ b/plugins/55/addnewpage/README.md
@@ -0,0 +1,48 @@
+# Add New Page Plugin for DokuWiki
+
+Copyright (c) 2006 Benjamin Santalucia <ben@santalucia.me>
+Copyright (c) 2013 Sam Wilson <sam@samwilson.id.au>
+Copyright (c) 2023 Damien Regad <dregad@mantisbt.org>
+
+The plugin lets users put *add new page* forms within pages, with optional namespace selection.
+
+## License
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the
+[GNU General Public License, version 2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+or later.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+## Installation and Configuration
+
+Please refer to
+[the plugin's wiki page](https://www.dokuwiki.org/plugin:addnewpage)
+for information on how to install, configure and use this plugin in DokuWiki.
+
+
+## Support
+
+Source code and support for this plugin can be found at
+<https://github.com/dregad/dokuwiki-plugin-addnewpage>
+
+## Credits
+
+The plugin was originally written by [Benjamin Santalucia](https://github.com/ben8p) (aka iDo) in 2006. It was forked after the 2009-02-14 release of Dokuwiki, and moved to GitHub by [Robert McLeod](https://github.com/hamstar) in 2012.
+Refer to the [Legacy Releases section](https://www.dokuwiki.org/plugin:addnewpage#legacy_releases) in the plugin's home page for details on what happened in those early, pre-GitHub years.
+
+In 2013, [Sam Wilson](https://github.com/samwilson) picked up the plugin's maintenance and actively supported it until he stopped using DokuWiki at the end of 2016.
+During this time, he merged several improvements and fixes contributed by these fine people:
+
+- [Michael Braun](https://github.com/michael-dev)
+- [Róbert Toth](https://github.com/FurloSK)
+- [Gerrit Uitslag](https://github.com/klap-in) added support for newpagetemplate plugin in 2014
+- [Albert Chern](https://github.com/achern), disabling of restricted parent namespaces in 2015
+
+In May 2023, [Damien Regad](https://github.com/dregad) decided to take over the plugin's maintenance.
+
+Thanks to [all the people who contributed](https://github.com/dregad/dokuwiki-plugin-addnewpage/graphs/contributors) to this plugin over the years.
diff --git a/plugins/55/addnewpage/conf/default.php b/plugins/55/addnewpage/conf/default.php
new file mode 100644
index 0000000..4d30e5a
--- /dev/null
+++ b/plugins/55/addnewpage/conf/default.php
@@ -0,0 +1,7 @@
+<?php
+$conf['addpage_exclude'] = "wiki;playground";
+$conf['addpage_showroot'] = 1;
+$conf['addpage_hide'] = 1;
+$conf['addpage_hideACL'] = 0;
+$conf['addpage_autopage'] = 0;
+
diff --git a/plugins/55/addnewpage/conf/metadata.php b/plugins/55/addnewpage/conf/metadata.php
new file mode 100644
index 0000000..63a75fc
--- /dev/null
+++ b/plugins/55/addnewpage/conf/metadata.php
@@ -0,0 +1,6 @@
+<?php
+$meta['addpage_exclude'] = array('string');
+$meta['addpage_showroot'] = array('onoff');
+$meta['addpage_hide'] = array('onoff');
+$meta['addpage_hideACL'] = array('onoff');
+$meta['addpage_autopage'] = array('onoff');
diff --git a/plugins/55/addnewpage/lang/ar/lang.php b/plugins/55/addnewpage/lang/ar/lang.php
new file mode 100755
index 0000000..7962937
--- /dev/null
+++ b/plugins/55/addnewpage/lang/ar/lang.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Ali Almlfy <Almlfy@hotmail.com>
+ */
+$lang['namespaceRoot'] = 'الجذر';
+$lang['okbutton'] = 'أضف صفحة';
+$lang['nooption'] = 'لا يسمح لك إضافة صفحات';
diff --git a/plugins/55/addnewpage/lang/ar/settings.php b/plugins/55/addnewpage/lang/ar/settings.php
new file mode 100755
index 0000000..202e75a
--- /dev/null
+++ b/plugins/55/addnewpage/lang/ar/settings.php
@@ -0,0 +1,11 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Ali Almlfy <Almlfy@hotmail.com>
+ */
+$lang['addpage_exclude'] = 'النطقات المسثناة (يفصل بينها بـ ;)';
+$lang['addpage_showroot'] = 'اعرض نطاق الجذر';
+$lang['addpage_hide'] = 'عند استعمال صيغة {{صفحة جديدة>[ns]}}: أخفي اختيار تسمية النطاق (وإلا فإنه سيظهر النطاق الفرعية)';
+$lang['addpage_hideACL'] = 'اخفاء {{صفحة جديد}} إن لم يكن للمستخدم الحق في إضافة صفحات (وإلا فإنها ستظهر)';
diff --git a/plugins/55/addnewpage/lang/bg/lang.php b/plugins/55/addnewpage/lang/bg/lang.php
new file mode 100644
index 0000000..2545d2e
--- /dev/null
+++ b/plugins/55/addnewpage/lang/bg/lang.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Neli Dimitrova <neli.dimitrova.office@gmail.com>
+ */
+$lang['namespaceRoot'] = 'Основно именно пространство';
+$lang['okbutton'] = 'Добави страница';
+$lang['nooption'] = 'Нямате право да създавате страница тук';
diff --git a/plugins/55/addnewpage/lang/bg/settings.php b/plugins/55/addnewpage/lang/bg/settings.php
new file mode 100644
index 0000000..5a1e937
--- /dev/null
+++ b/plugins/55/addnewpage/lang/bg/settings.php
@@ -0,0 +1,11 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Neli Dimitrova <neli.dimitrova.office@gmail.com>
+ */
+$lang['addpage_exclude'] = 'Списък с изключени именни пространства (разделени със знак ;)';
+$lang['addpage_showroot'] = 'Покажи основното именно пространство';
+$lang['addpage_hide'] = 'Когато се използва синтаксиса {{NEWPAGE>[ns]}}: Скрий избора на именно пространство (ако не е избрано: покажи само дъщерните именни пространства)';
+$lang['addpage_hideACL'] = 'Скрий {{NEWPAGE}}, ако потребителят няма права да добавя страници (покажи съобщение, ако не е избрано)';
diff --git a/plugins/55/addnewpage/lang/ca/lang.php b/plugins/55/addnewpage/lang/ca/lang.php
new file mode 100644
index 0000000..d987c7d
--- /dev/null
+++ b/plugins/55/addnewpage/lang/ca/lang.php
@@ -0,0 +1,8 @@
+<?php
+/*USE : UTF8*/
+/*
+ * Catalan language file
+ */
+$lang['namespaceRoot'] = "Arrel";
+$lang['okbutton'] = "Crear";
+$lang['nooption'] = "No teniu permisos suficients per afegir una p&agrave;gina";
diff --git a/plugins/55/addnewpage/lang/ca/settings.php b/plugins/55/addnewpage/lang/ca/settings.php
new file mode 100644
index 0000000..2441ae9
--- /dev/null
+++ b/plugins/55/addnewpage/lang/ca/settings.php
@@ -0,0 +1,10 @@
+<?php
+/*USE : UTF8*/
+
+/*
+ * Catalan language file
+ */
+$lang['addpage_exclude'] = "espais de nom a excloure (separats par un ;)";
+$lang['addpage_showroot'] = "Mostrar l'espai de nom arrel";
+$lang['addpage_hide'] = "Quan feu servir la sintaxi {{NEWPAGE>[ns]}}: Oculta la selecció d'espais de nom (desmarcat: només mostra els subespais de nom)";
+$lang['addpage_hideACL'] = "Si desmarcat, mostra un missatge quan l'usuari no té permisos suficients per crear una pàgina. Si no, occulta {{NEWPAGE}}";
diff --git a/plugins/55/addnewpage/lang/ckb/lang.php b/plugins/55/addnewpage/lang/ckb/lang.php
new file mode 100644
index 0000000..c12a344
--- /dev/null
+++ b/plugins/55/addnewpage/lang/ckb/lang.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author qezwan <qezwan@gmail.com>
+ */
+$lang['namespaceRoot'] = 'ڕەگ';
+$lang['okbutton'] = 'زیادکردنی لاپەڕە';
+$lang['nooption'] = 'تۆ ڕێگەت پێنەدراوە لاپەڕەزیاد بکەیت';
diff --git a/plugins/55/addnewpage/lang/ckb/settings.php b/plugins/55/addnewpage/lang/ckb/settings.php
new file mode 100644
index 0000000..4f933d9
--- /dev/null
+++ b/plugins/55/addnewpage/lang/ckb/settings.php
@@ -0,0 +1,11 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author qezwan <qezwan@gmail.com>
+ */
+$lang['addpage_exclude'] = 'بۆشایی ناوی بەدەرکراو (جیاکراونەتەوە لەگەڵ ;)';
+$lang['addpage_showroot'] = 'بۆشایی ناوی ڕەگ نیشان بدە';
+$lang['addpage_hide'] = 'کاتێک تۆ {{NEWPAGE>[ns]}} ڕستەسازی بەکاردێنیت: شاردنەوەی دیاریکردنی بۆشایی ناو (نەپشکندراوە: تەنها ژێربۆشایی پیشان بدە)';
+$lang['addpage_hideACL'] = 'شاردنەوە {{NEWPAGE}} ئەگەر بەکارهێنەر مافی ئەوەی نییە لاپەڕەزیاد بکات (نیشاندانی پەیام ئەگەر نەپشکنرابێت)';
diff --git a/plugins/55/addnewpage/lang/cs/lang.php b/plugins/55/addnewpage/lang/cs/lang.php
new file mode 100644
index 0000000..434133f
--- /dev/null
+++ b/plugins/55/addnewpage/lang/cs/lang.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Jaroslav Lichtblau <jlichtblau@seznam.cz>
+ */
+$lang['namespaceRoot'] = 'Kořen';
+$lang['okbutton'] = 'Přidat stránku';
+$lang['nooption'] = 'Nejste oprávněni přidávat stránky';
diff --git a/plugins/55/addnewpage/lang/cs/settings.php b/plugins/55/addnewpage/lang/cs/settings.php
new file mode 100644
index 0000000..4dca77c
--- /dev/null
+++ b/plugins/55/addnewpage/lang/cs/settings.php
@@ -0,0 +1,11 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Jaroslav Lichtblau <jlichtblau@seznam.cz>
+ */
+$lang['addpage_exclude'] = 'Vyloučit jmenné prostory (oddělené středníkem ;)';
+$lang['addpage_showroot'] = 'Zobrazit kořenový jmenný prostor';
+$lang['addpage_hide'] = 'Pokud použijete {{NEWPAGE>[ns]}} syntax: Skrýt výběr jmenného prostoru (nezaškrtnuto: zobrazit pouze jmenné podprostory)';
+$lang['addpage_hideACL'] = 'Skrýt {{NEWPAGE}} pokud uživatel nemá práva pro přidávání stránek (nezaškrtnuto: zobrazit zprávu)';
diff --git a/plugins/55/addnewpage/lang/da/lang.php b/plugins/55/addnewpage/lang/da/lang.php
new file mode 100644
index 0000000..1b5a6d3
--- /dev/null
+++ b/plugins/55/addnewpage/lang/da/lang.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Soren Birk <soer9648@eucl.dk>
+ */
+$lang['namespaceRoot'] = 'Rod';
+$lang['okbutton'] = 'Tilføj side';
+$lang['nooption'] = 'Du har ikke tilladelse til at tilføje sider';
diff --git a/plugins/55/addnewpage/lang/da/settings.php b/plugins/55/addnewpage/lang/da/settings.php
new file mode 100644
index 0000000..443e741
--- /dev/null
+++ b/plugins/55/addnewpage/lang/da/settings.php
@@ -0,0 +1,11 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Soren Birk <soer9648@eucl.dk>
+ */
+$lang['addpage_exclude'] = 'Ekskluderet navnerum (separeret med ;)';
+$lang['addpage_showroot'] = 'Vis rod-navnerum';
+$lang['addpage_hide'] = 'Når du benytter {{NEWPAGE>[ns]}} syntaks: Skjul valgte navnerum (umarkeret: vis kun under-navnerum)';
+$lang['addpage_hideACL'] = 'Skjul {{NEWPAGE}} hvis brugeren ikke har rettigheder til at tilføje sider (vis meddelelse hvis umarkeret)';
diff --git a/plugins/55/addnewpage/lang/de-informal/lang.php b/plugins/55/addnewpage/lang/de-informal/lang.php
new file mode 100644
index 0000000..b66fc64
--- /dev/null
+++ b/plugins/55/addnewpage/lang/de-informal/lang.php
@@ -0,0 +1,12 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author MaWi <drmaxxis@gmail.com>
+ * @author Michael <michael.kraemer@gmail.com>
+ */
+$lang['namespaceRoot'] = 'Wurzel';
+$lang['name'] = 'Seiten Name';
+$lang['okbutton'] = 'Seite hinzufügen';
+$lang['nooption'] = 'Du besitzt nicht die Benutzerrechte um Seiten hinzuzufügen.';
diff --git a/plugins/55/addnewpage/lang/de-informal/settings.php b/plugins/55/addnewpage/lang/de-informal/settings.php
new file mode 100644
index 0000000..0f21dee
--- /dev/null
+++ b/plugins/55/addnewpage/lang/de-informal/settings.php
@@ -0,0 +1,14 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author MaWi <drmaxxis@gmail.com>
+ * @author Michael <michael.kraemer@gmail.com>
+ */
+$lang['addpage_exclude'] = 'Namespaces ausschließen (getrennt mit ; )';
+$lang['addpage_showroot'] = 'Wurzel-Namespace anzeigen';
+$lang['addpage_hide'] = '{{NEWPAGE>[ns]}} Syntax: Ausgewählt, diese Namespace-Auswahl verbergen. Nicht ausgewählt, nur diese Namespace-Auswahl anzeigen.';
+$lang['addpage_hideACL'] = 'Verberge {{NEWPAGE}} wenn ein Benutzer keine Berechtigung hat Seiten hinzuzufügen
+Ausgewählt: Anzeige wird verborgen
+Nicht ausgewählt: es wird eine Fehlermeldung ausgegeben';
diff --git a/plugins/55/addnewpage/lang/de/lang.php b/plugins/55/addnewpage/lang/de/lang.php
new file mode 100644
index 0000000..988744a
--- /dev/null
+++ b/plugins/55/addnewpage/lang/de/lang.php
@@ -0,0 +1,11 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Joerg <scooter22@gmx.de>
+ * @author Michael <michael@krmr.org>
+ */
+$lang['namespaceRoot'] = 'Wurzel';
+$lang['okbutton'] = 'Seite hinzufügen';
+$lang['nooption'] = 'Du besitzt nicht die Benutzerrechte um Seiten hinzuzufügen.';
diff --git a/plugins/55/addnewpage/lang/de/settings.php b/plugins/55/addnewpage/lang/de/settings.php
new file mode 100644
index 0000000..90b84e7
--- /dev/null
+++ b/plugins/55/addnewpage/lang/de/settings.php
@@ -0,0 +1,13 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Joerg <scooter22@gmx.de>
+ */
+$lang['addpage_exclude'] = 'Namespaces ausschließen (getrennt mit ; )';
+$lang['addpage_showroot'] = 'Wurzel-Namespace anzeigen';
+$lang['addpage_hide'] = '{{NEWPAGE>[ns]}} Syntax: Ausgewählt, diese Namespace-Auswahl verbergen. Nicht ausgewählt, nur diese Namespace-Auswahl anzeigen.';
+$lang['addpage_hideACL'] = 'Verberge {{NEWPAGE}} wenn ein Benutzer keine Berechtigung hat Seiten hinzuzufügen
+Ausgewählt: Anzeige wird verborgen
+Nicht ausgewählt: es wird eine Fehlermeldung ausgegeben';
diff --git a/plugins/55/addnewpage/lang/en/lang.php b/plugins/55/addnewpage/lang/en/lang.php
new file mode 100644
index 0000000..2b5a987
--- /dev/null
+++ b/plugins/55/addnewpage/lang/en/lang.php
@@ -0,0 +1,9 @@
+<?php
+/*
+ * English language file
+ */
+$lang['namespaceRoot'] = "Root";
+$lang['name'] = "Page name";
+$lang['okbutton'] = "Add page";
+$lang['nooption'] = "You are not allowed to add pages";
+//Setup VIM: ex: et ts=2 enc=utf-8 :
diff --git a/plugins/55/addnewpage/lang/en/settings.php b/plugins/55/addnewpage/lang/en/settings.php
new file mode 100644
index 0000000..6cba688
--- /dev/null
+++ b/plugins/55/addnewpage/lang/en/settings.php
@@ -0,0 +1,11 @@
+<?php
+/*USE : UTF8*/
+
+/*
+ * English language file
+ */
+$lang['addpage_exclude'] = "Excluded namespaces (separated with ;)";
+$lang['addpage_showroot'] = "Show root namespace";
+$lang['addpage_hide'] = "When you use {{NEWPAGE>[ns]}} syntax: Hide namespace selection (unchecked: show only subnamespaces)";
+$lang['addpage_hideACL'] = "Hide {{NEWPAGE}} if user does not have rights to add pages (show message if unchecked)";
+$lang['addpage_autopage'] = "Don't show the input box, the preconfigured namespace is treated as a full page ID. (makes sense with date placeholders)";
diff --git a/plugins/55/addnewpage/lang/eo/lang.php b/plugins/55/addnewpage/lang/eo/lang.php
new file mode 100644
index 0000000..a300854
--- /dev/null
+++ b/plugins/55/addnewpage/lang/eo/lang.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Robert Bogenschneider <bogi@uea.org>
+ */
+$lang['namespaceRoot'] = 'Bazo';
+$lang['okbutton'] = 'Aldoni paĝon';
+$lang['nooption'] = 'Vi ne rajtas aldoni paĝojn';
diff --git a/plugins/55/addnewpage/lang/eo/settings.php b/plugins/55/addnewpage/lang/eo/settings.php
new file mode 100644
index 0000000..35811df
--- /dev/null
+++ b/plugins/55/addnewpage/lang/eo/settings.php
@@ -0,0 +1,11 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Robert Bogenschneider <bogi@uea.org>
+ */
+$lang['addpage_exclude'] = 'Ekskludi nomspacojn (disigitaj per ;)';
+$lang['addpage_showroot'] = 'Montri nomspacon';
+$lang['addpage_hide'] = 'Se vi uzas {{NEWPAGE>[ns]}}-sintakson: Ĉu kaŝi la nomspac-selekton? (malplena: montri nur subnomspacojn)';
+$lang['addpage_hideACL'] = 'Kaŝi {{NEWPAGE}} se uzanto ne rajtas aldoni paĝojn (montri mesaĝon, se malplena)';
diff --git a/plugins/55/addnewpage/lang/es/lang.php b/plugins/55/addnewpage/lang/es/lang.php
new file mode 100644
index 0000000..264fb61
--- /dev/null
+++ b/plugins/55/addnewpage/lang/es/lang.php
@@ -0,0 +1,8 @@
+<?php
+/*
+ * Spanish language file (Paraguay)
+ */
+$lang['namespaceRoot'] = "Raiz";
+$lang['okbutton'] = "Agregar pagina";
+$lang['nooption'] = "Ud. no tiene privilegios para crear la pagina";
+//Setup VIM: ex: et ts=2 enc=utf-8 :
diff --git a/plugins/55/addnewpage/lang/es/settings.php b/plugins/55/addnewpage/lang/es/settings.php
new file mode 100644
index 0000000..389ee0b
--- /dev/null
+++ b/plugins/55/addnewpage/lang/es/settings.php
@@ -0,0 +1,10 @@
+<?php
+/*USE : UTF8*/
+
+/*
+ * Spanish language file
+ */
+$lang['addpage_exclude'] = "excluir directorio(namespace) separados por punto y coma (;)";
+$lang['addpage_showroot'] = "Mostrar directorio(namespace) raiz";
+$lang['addpage_hide'] = "cuando se usa la sintaxis {{NEWPAGE>[dir]}}: se oculta el selector de directorio (desmarcado: muestra solo sub-directorios (sub-namespaces))";
+$lang['addpage_hideACL'] = "si esta desmarcado, muesta un mensaje de error de privilegios. Si el usuario no tiene permiso de crear una pagina, simplemente se oculta el codigo {{NEWPAGE}}";
diff --git a/plugins/55/addnewpage/lang/fa/lang.php b/plugins/55/addnewpage/lang/fa/lang.php
new file mode 100644
index 0000000..a987626
--- /dev/null
+++ b/plugins/55/addnewpage/lang/fa/lang.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Sam01 <m.sajad079@gmail.com>
+ */
+$lang['namespaceRoot'] = 'ریشه';
+$lang['okbutton'] = 'اضافه‌کردن صفحه';
+$lang['nooption'] = 'شما امکان اضافه کردن صفحه‌ها را ندارید';
diff --git a/plugins/55/addnewpage/lang/fa/settings.php b/plugins/55/addnewpage/lang/fa/settings.php
new file mode 100644
index 0000000..cff4f6e
--- /dev/null
+++ b/plugins/55/addnewpage/lang/fa/settings.php
@@ -0,0 +1,12 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Sam01 <m.sajad079@gmail.com>
+ */
+$lang['addpage_exclude'] = 'حذف فضاهای نام (جدا کردن از هم با ;)';
+$lang['addpage_showroot'] = 'نمایش فضای‌نام ریشه';
+$lang['addpage_hide'] = 'زمانی که استفاده می‌کنید از {{NEWPAGE>[ns]}} نحو: مخفی سازی فضای‌نام انتخابی
+(تیک: نمایش تمام فضاهای زیر نام)';
+$lang['addpage_hideACL'] = 'مخفی کردن {{NEWPAGE}} اگر کاربران';
diff --git a/plugins/55/addnewpage/lang/fr/lang.php b/plugins/55/addnewpage/lang/fr/lang.php
new file mode 100644
index 0000000..adee0d1
--- /dev/null
+++ b/plugins/55/addnewpage/lang/fr/lang.php
@@ -0,0 +1,9 @@
+<?php
+/*USE : UTF8*/
+/*
+ * French language file
+ */
+$lang['namespaceRoot'] = "Racine";
+$lang['name'] = "Nom de la page";
+$lang['okbutton'] = "Créer";
+$lang['nooption'] = "Vous n'avez pas les droits pour ajouter une page";
diff --git a/plugins/55/addnewpage/lang/fr/settings.php b/plugins/55/addnewpage/lang/fr/settings.php
new file mode 100644
index 0000000..c0e019e
--- /dev/null
+++ b/plugins/55/addnewpage/lang/fr/settings.php
@@ -0,0 +1,11 @@
+<?php
+/*USE : UTF8*/
+
+/*
+ * French language file
+ */
+$lang['addpage_exclude'] = "Catégories à exclure (séparées par un ';')";
+$lang['addpage_showroot'] = "Afficher la catégorie racine";
+$lang['addpage_hide'] = "Quand vous utlisez la syntaxe {{NEWPAGE>[ns]}} : cache la selection de catégorie (décoché: affiche uniquement les sous-catégories)";
+$lang['addpage_hideACL'] = "Si non cochée, affiche un message lorsque l'utilisateur n'a pas les droits d'ajout de page. Sinon, cache simplement {{NEWPAGE}}";
+$lang['addpage_autopage'] = "Ne pas afficher le champ de saisie; la catégorie préconfigurée est traitée comme un identifiant de page complet (utile avec des attributs de date)";
diff --git a/plugins/55/addnewpage/lang/hu/lang.php b/plugins/55/addnewpage/lang/hu/lang.php
new file mode 100644
index 0000000..67bd548
--- /dev/null
+++ b/plugins/55/addnewpage/lang/hu/lang.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Fekete Ádám Zsolt <fadam@egbcsoport.hu>
+ */
+$lang['namespaceRoot'] = 'Kiindulónévtér';
+$lang['okbutton'] = 'Oldal hozzáadása';
+$lang['nooption'] = 'Nincs jogosultságod oldal létrehozásához';
diff --git a/plugins/55/addnewpage/lang/hu/settings.php b/plugins/55/addnewpage/lang/hu/settings.php
new file mode 100644
index 0000000..ba57523
--- /dev/null
+++ b/plugins/55/addnewpage/lang/hu/settings.php
@@ -0,0 +1,11 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Fekete Ádám Zsolt <fadam@egbcsoport.hu>
+ */
+$lang['addpage_exclude'] = 'Elrejtett névterek (pontosvesszővel elválasztva)';
+$lang['addpage_showroot'] = 'Kiindulónévtér mutatása';
+$lang['addpage_hide'] = 'A {{NEWPAGE>[ns]}} szintaxis használatakor: Névtérválasztó lista elrejtése (ha nincs bejelölve: mutatja az alnévtereket)';
+$lang['addpage_hideACL'] = 'A {{NEWPAGE}} elrejtése ha a felhasználónak nincs jogosultsága oldal létrehozásához (ha nincs bejelölve, egy üzenet fog megjelenni)';
diff --git a/plugins/55/addnewpage/lang/it/lang.php b/plugins/55/addnewpage/lang/it/lang.php
new file mode 100644
index 0000000..77c979d
--- /dev/null
+++ b/plugins/55/addnewpage/lang/it/lang.php
@@ -0,0 +1,11 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Daniele Savasta <danielesavasta@tiscali.it>
+ * @author Mirko <malisan.mirko@gmail.com>
+ */
+$lang['namespaceRoot'] = 'Root';
+$lang['okbutton'] = 'Aggiungi Pagina';
+$lang['nooption'] = 'Non sei autorizzato ad aggiungere nuove pagine';
diff --git a/plugins/55/addnewpage/lang/it/settings.php b/plugins/55/addnewpage/lang/it/settings.php
new file mode 100644
index 0000000..423c82b
--- /dev/null
+++ b/plugins/55/addnewpage/lang/it/settings.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Mirko <malisan.mirko@gmail.com>
+ */
+$lang['addpage_hideACL'] = 'Nascondi {{NEWPAGE}} se l\'utente non &egrave autorizzato ad aggiungere pagine(mostra il messaggio se non &egrave selezionato)';
diff --git a/plugins/55/addnewpage/lang/ja/lang.php b/plugins/55/addnewpage/lang/ja/lang.php
new file mode 100755
index 0000000..9db9fc7
--- /dev/null
+++ b/plugins/55/addnewpage/lang/ja/lang.php
@@ -0,0 +1,8 @@
+<?php
+/*
+Japanese language file
+ */
+$lang['namespaceRoot'] = "ルート";
+$lang['okbutton'] = "ページ追加";
+$lang['nooption'] = "ページの追加が許可されていません";
+//Setup VIM: ex: et ts=2 enc=utf-8 :
diff --git a/plugins/55/addnewpage/lang/ja/settings.php b/plugins/55/addnewpage/lang/ja/settings.php
new file mode 100755
index 0000000..777ad42
--- /dev/null
+++ b/plugins/55/addnewpage/lang/ja/settings.php
@@ -0,0 +1,10 @@
+<?php
+/*USE : UTF8*/
+
+/*
+ * Japanese language file
+ */
+$lang['addpage_exclude'] = "除外する名前空間(; 区切り)";
+$lang['addpage_showroot'] = "ルート名前空間を表示";
+$lang['addpage_hide'] = "{{NEWPAGE>[ns]}} 構文使用時: 名前空間選択リストを表示しない(チェックなし: 下位名前空間のみを表示)";
+$lang['addpage_hideACL'] = "ページ追加の権限を持たないユーザーに対しては {{NEWPAGE}} を表示しない(チェックなしの場合にはメッセージを表示)";
diff --git a/plugins/55/addnewpage/lang/ko/lang.php b/plugins/55/addnewpage/lang/ko/lang.php
new file mode 100755
index 0000000..453ba62
--- /dev/null
+++ b/plugins/55/addnewpage/lang/ko/lang.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Myeongjin <aranet100@gmail.com>
+ */
+$lang['namespaceRoot'] = '루트';
+$lang['okbutton'] = '문서 추가';
+$lang['nooption'] = '문서를 추가할 권한이 없습니다';
diff --git a/plugins/55/addnewpage/lang/ko/settings.php b/plugins/55/addnewpage/lang/ko/settings.php
new file mode 100755
index 0000000..27ea73d
--- /dev/null
+++ b/plugins/55/addnewpage/lang/ko/settings.php
@@ -0,0 +1,11 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Myeongjin <aranet100@gmail.com>
+ */
+$lang['addpage_exclude'] = '제외할 이름공간 (;로 구분)';
+$lang['addpage_showroot'] = '루트 이름공간 보이기';
+$lang['addpage_hide'] = '{{NEWPAGE>[ns]}} 구문을 사용할 때: 이름공간 선택을 숨기기 (체크하지 않음: 하위 이름공간만 보이기)';
+$lang['addpage_hideACL'] = '사용자가 문서를 추가할 권한이 없을 때 {{NEWPAGE}} 숨기기 (체크하지 않으면 메시지 보이기)';
diff --git a/plugins/55/addnewpage/lang/nl/lang.php b/plugins/55/addnewpage/lang/nl/lang.php
new file mode 100644
index 0000000..bd5236a
--- /dev/null
+++ b/plugins/55/addnewpage/lang/nl/lang.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Hugo Smet <hugo.smet@scarlet.be>
+ */
+$lang['namespaceRoot'] = 'Root';
+$lang['okbutton'] = 'Pagina toevoegen';
+$lang['nooption'] = 'U heeft geen rechten om pagina\'s toe te voegen';
diff --git a/plugins/55/addnewpage/lang/nl/settings.php b/plugins/55/addnewpage/lang/nl/settings.php
new file mode 100644
index 0000000..d76e175
--- /dev/null
+++ b/plugins/55/addnewpage/lang/nl/settings.php
@@ -0,0 +1,11 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Hugo Smet <hugo.smet@scarlet.be>
+ */
+$lang['addpage_exclude'] = 'Uitgesloten naamruimte\'s (gescheiden door ;)';
+$lang['addpage_showroot'] = 'Toon root naamruimte';
+$lang['addpage_hide'] = 'Bij gebruik van {{NEWPAGE>[ns]}} syntax: Verberg naamruimte selectie (niet aangevinkt: toon enkel sub naamruimte\'s)';
+$lang['addpage_hideACL'] = 'Verberg {{NEWPAGE}} wanneer de gebruiker geen rechten heeft om pagina\'s toe te voegen (toon melding wanneer niet aangevinkt)';
diff --git a/plugins/55/addnewpage/lang/no/lang.php b/plugins/55/addnewpage/lang/no/lang.php
new file mode 100644
index 0000000..0303cb1
--- /dev/null
+++ b/plugins/55/addnewpage/lang/no/lang.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Arne Hanssen <arne.hanssen@getmail.no>
+ */
+$lang['namespaceRoot'] = 'Rot';
+$lang['okbutton'] = 'Legg til ny side';
+$lang['nooption'] = 'Du har ikke tilgang til å legge til sider';
diff --git a/plugins/55/addnewpage/lang/no/settings.php b/plugins/55/addnewpage/lang/no/settings.php
new file mode 100644
index 0000000..706adc2
--- /dev/null
+++ b/plugins/55/addnewpage/lang/no/settings.php
@@ -0,0 +1,11 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Arne Hanssen <arne.hanssen@getmail.no>
+ */
+$lang['addpage_exclude'] = 'Utelatte navnerom (separert med ;)';
+$lang['addpage_showroot'] = 'Vis rot-navnerom';
+$lang['addpage_hide'] = 'Når du bruker {{NEWPAGE>[ns]}} syntaks: skjul valg av navnerom (ikke avhuket: vis bare undernavnerom)';
+$lang['addpage_hideACL'] = 'Skjul {NEWPAGE}} dersom bruker ikke har tilgang til å legge til sider (ikke avhuket: vis tilbakemelding) ';
diff --git a/plugins/55/addnewpage/lang/pl/lang.php b/plugins/55/addnewpage/lang/pl/lang.php
new file mode 100644
index 0000000..4d9492a
--- /dev/null
+++ b/plugins/55/addnewpage/lang/pl/lang.php
@@ -0,0 +1,8 @@
+<?php
+/*
+ * polish language file
+ */
+$lang['namespaceRoot'] = "Główny";
+$lang['okbutton'] = "Dodaj stronę";
+$lang['nooption'] = "Nie masz uprawnień aby dodać nową stronę";
+//Setup VIM: ex: et ts=2 enc=utf-8 :
diff --git a/plugins/55/addnewpage/lang/pl/settings.php b/plugins/55/addnewpage/lang/pl/settings.php
new file mode 100644
index 0000000..4e70817
--- /dev/null
+++ b/plugins/55/addnewpage/lang/pl/settings.php
@@ -0,0 +1,10 @@
+<?php
+/*USE : UTF8*/
+
+/*
+ * Polish language file
+ */
+$lang['addpage_exclude'] = "Wykluczone nazwy (oddzielone średnikiem)";
+$lang['addpage_showroot'] = "Pokaż nazwę głównego katalogu";
+$lang['addpage_hide'] = "Kiedy używasz składni {{NEWPAGE>[nazwa]}}: Ukryj nazwę grupy (niezaznaczone: pokaż tylko podnazwy)";
+$lang['addpage_hideACL'] = "Ukryj {{NEWPAGE}} jeżeli użytkownicy nie posiadają uprawnień dodawania nowych stron (pokaż komunikat jeśli niezaznaczone)";
diff --git a/plugins/55/addnewpage/lang/pt-br/lang.php b/plugins/55/addnewpage/lang/pt-br/lang.php
new file mode 100644
index 0000000..2a7a64b
--- /dev/null
+++ b/plugins/55/addnewpage/lang/pt-br/lang.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Samory Pereira Santos <samory.santos@gmail.com>
+ */
+$lang['namespaceRoot'] = 'Raiz';
+$lang['okbutton'] = 'Adicionar página';
+$lang['nooption'] = 'Você não tem permissão para adicionar páginas';
diff --git a/plugins/55/addnewpage/lang/pt-br/settings.php b/plugins/55/addnewpage/lang/pt-br/settings.php
new file mode 100644
index 0000000..7494473
--- /dev/null
+++ b/plugins/55/addnewpage/lang/pt-br/settings.php
@@ -0,0 +1,12 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Alexandre Belchior <alexbelchior@gmail.com>
+ * @author Samory Pereira Santos <samory.santos@gmail.com>
+ */
+$lang['addpage_exclude'] = 'Excluir namespaces (separar com ;)';
+$lang['addpage_showroot'] = 'Mostrar namespace raiz';
+$lang['addpage_hide'] = 'Quando você usa a sintax {{NEWPAGE>[ns]}} : Oculta a seleção do namespace (desmarcado: mostra apenas os subnamespaces)';
+$lang['addpage_hideACL'] = 'Ocultar {{NEWPAGE}} se o usuário não tiver direitos para adicionar páginas (mostre a mensagem se desmarcada)';
diff --git a/plugins/55/addnewpage/lang/pt/lang.php b/plugins/55/addnewpage/lang/pt/lang.php
new file mode 100644
index 0000000..0271b08
--- /dev/null
+++ b/plugins/55/addnewpage/lang/pt/lang.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Alfredo Silva <alfredo.silva@sky.com>
+ */
+$lang['namespaceRoot'] = 'Raiz';
+$lang['okbutton'] = 'Adicionar página';
+$lang['nooption'] = 'Não está autorizado para adicionar páginas';
diff --git a/plugins/55/addnewpage/lang/pt/settings.php b/plugins/55/addnewpage/lang/pt/settings.php
new file mode 100644
index 0000000..4556bc6
--- /dev/null
+++ b/plugins/55/addnewpage/lang/pt/settings.php
@@ -0,0 +1,11 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Alfredo Silva <alfredo.silva@sky.com>
+ */
+$lang['addpage_exclude'] = 'Espaços do nome excluídos (separados com ;)';
+$lang['addpage_showroot'] = 'Mostrar espaço do nome da raiz';
+$lang['addpage_hide'] = 'Quando utiliza a sintaxe {{NEWPAGE>[ns]}} : Ocultar a seleção do espaço do nome (desmarcado : mostrar apenas sub-espaço do nome)';
+$lang['addpage_hideACL'] = 'Ocultar {{NEWPAGE}} se o utilizador não possuir permissões para adicionar páginas (mostrar mensagem se desmarcado).';
diff --git a/plugins/55/addnewpage/lang/ru/lang.php b/plugins/55/addnewpage/lang/ru/lang.php
new file mode 100644
index 0000000..cd8ec30
--- /dev/null
+++ b/plugins/55/addnewpage/lang/ru/lang.php
@@ -0,0 +1,11 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Aleksandr Selivanov <alexgearbox@yandex.ru>
+ */
+$lang['namespaceRoot'] = 'Корневой уровень';
+$lang['name'] = 'Имя страницы';
+$lang['okbutton'] = 'Добавить страницу';
+$lang['nooption'] = 'Вы не можете добавлять страницы';
diff --git a/plugins/55/addnewpage/lang/ru/settings.php b/plugins/55/addnewpage/lang/ru/settings.php
new file mode 100644
index 0000000..6d9948f
--- /dev/null
+++ b/plugins/55/addnewpage/lang/ru/settings.php
@@ -0,0 +1,12 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author serg <sergey_art82@inbox.ru>
+ * @author Aleksandr Selivanov <alexgearbox@yandex.ru>
+ */
+$lang['addpage_exclude'] = 'Исключаемые пространства имен (разделитель — точка с запятой)';
+$lang['addpage_showroot'] = 'Показать корневое пространство имён';
+$lang['addpage_hide'] = 'При использовании синтаксиса {{NEWPAGE>[ns]}} скрывать выбор пространства имён. (Если флажок снят, будут показываться только подпространства имён.)';
+$lang['addpage_hideACL'] = 'Скрыть {{NEWPAGE}}, если пользователь не имеет прав на добавление страниц. (Если флажок снят, будет отображаться сообщение.)';
diff --git a/plugins/55/addnewpage/lang/sv/lang.php b/plugins/55/addnewpage/lang/sv/lang.php
new file mode 100755
index 0000000..33ec732
--- /dev/null
+++ b/plugins/55/addnewpage/lang/sv/lang.php
@@ -0,0 +1,9 @@
+<?php
+
+/*
+ * Swedish language file
+ * Save file as UTF8.
+ */
+$lang['namespaceRoot'] = "Rot";
+$lang['okbutton'] = "Skapa sida";
+$lang['nooption'] = "Du har inte behörighet att skapa sidor";
diff --git a/plugins/55/addnewpage/lang/sv/settings.php b/plugins/55/addnewpage/lang/sv/settings.php
new file mode 100755
index 0000000..853da6b
--- /dev/null
+++ b/plugins/55/addnewpage/lang/sv/settings.php
@@ -0,0 +1,10 @@
+<?php
+/*USE : UTF8*/
+
+/*
+ * Swedish language file
+ */
+$lang['addpage_exclude'] = "Exkluderade namnrymder (separera med ;)";
+$lang['addpage_showroot'] = "Visa rotrymd";
+$lang['addpage_hide'] = "När du använder {{NEWPAGE>[ns]}} syntax: Dölj val av namnrymd (ej ikryssad: visa bara undernamnrymder)";
+$lang['addpage_hideACL'] = "Dölj {{NEWPAGE}} om användaren inte har rättighet att skapa sidor (visa meddelande om ej ikryssad)";
diff --git a/plugins/55/addnewpage/lang/uk/lang.php b/plugins/55/addnewpage/lang/uk/lang.php
new file mode 100755
index 0000000..9283ce5
--- /dev/null
+++ b/plugins/55/addnewpage/lang/uk/lang.php
@@ -0,0 +1,12 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * Ukrainian language file
+ *
+ * @author Олексій <alexey.furashev@gmail.com>
+ */
+$lang['namespaceRoot'] = 'Кореневий простір імен';
+$lang['okbutton'] = 'Додати сторінку';
+$lang['nooption'] = 'Ви не можете додавати сторінки';
diff --git a/plugins/55/addnewpage/lang/uk/settings.php b/plugins/55/addnewpage/lang/uk/settings.php
new file mode 100755
index 0000000..4ffab6b
--- /dev/null
+++ b/plugins/55/addnewpage/lang/uk/settings.php
@@ -0,0 +1,13 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * USE : UTF8
+ * Ukrainian language file
+ *
+ */
+$lang['addpage_exclude'] = 'Виключені простори імен (розділені ;)';
+$lang['addpage_showroot'] = 'Відображати кореневий простір імен';
+$lang['addpage_hide'] = 'При застосуванні {{NEWPAGE>[ns]}} сховати вибір простору імен (якщо вибрано цей пункт - відображати тільки підпростір імен)';
+$lang['addpage_hideACL'] = 'Сховати {{NEWPAGE}}, якщо користувач не має прав додавати сторінки (відображати повідомлення, якщо цей пункт не вибрано)';
diff --git a/plugins/55/addnewpage/lang/vi/lang.php b/plugins/55/addnewpage/lang/vi/lang.php
new file mode 100755
index 0000000..9027a8b
--- /dev/null
+++ b/plugins/55/addnewpage/lang/vi/lang.php
@@ -0,0 +1,11 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * Vietnamese language file
+ *
+ */
+$lang['namespaceRoot'] = 'Gốc';
+$lang['okbutton'] = 'Tạo trang mới';
+$lang['nooption'] = 'Bạn không được phép tạo trang mới';
diff --git a/plugins/55/addnewpage/lang/vi/settings.php b/plugins/55/addnewpage/lang/vi/settings.php
new file mode 100755
index 0000000..93eb29e
--- /dev/null
+++ b/plugins/55/addnewpage/lang/vi/settings.php
@@ -0,0 +1,14 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * USE : UTF8
+ * Vietnamese language file
+ *
+ * @author Thien Hau <thienhausoftware@gmail.com>
+ */
+$lang['addpage_exclude'] = 'Trừ không gian tên (ngăn cách bằng dấu ;)';
+$lang['addpage_showroot'] = 'Hiển thị không gian tên gốc';
+$lang['addpage_hide'] = 'Khi bạn chọn syntax {{NEWPAGE>[ns]}}: Ẩn khả năng lựa chọn không gian tên (không chọn: chỉ hiển thị không gian tên con)';
+$lang['addpage_hideACL'] = 'Ẩn {{NEWPAGE}} nếu người dùng không được phép tạo trang mới (hiển thị tin nhắn nếu không chọn)';
diff --git a/plugins/55/addnewpage/lang/zh-tw/lang.php b/plugins/55/addnewpage/lang/zh-tw/lang.php
new file mode 100644
index 0000000..d5eecc8
--- /dev/null
+++ b/plugins/55/addnewpage/lang/zh-tw/lang.php
@@ -0,0 +1,8 @@
+<?php
+/*
+Traditional Chinese language file
+ */
+$lang['namespaceRoot']="最上層(Root)";
+$lang['okbutton'] ="新增頁面";
+$lang['nooption'] ="你沒有權限執行新增頁面的動作";
+//Setup VIM: ex: et ts=2 enc=utf-8 :
diff --git a/plugins/55/addnewpage/lang/zh-tw/settings.php b/plugins/55/addnewpage/lang/zh-tw/settings.php
new file mode 100644
index 0000000..3271f72
--- /dev/null
+++ b/plugins/55/addnewpage/lang/zh-tw/settings.php
@@ -0,0 +1,10 @@
+<?php
+/*USE : UTF8*/
+
+/*
+ * Traditional Chinese file
+ */
+$lang['addpage_exclude'] = "排除哪些命名空間(namespace), 使用 ; 來區分多個命名空間(namespace)";
+$lang['addpage_showroot'] = "顯示最上層(Root)命名空間(namespace)";
+$lang['addpage_hide'] = "使用 {{NEWPAGE>[ns]}} 語法時不要顯示出命名空間(namespace)的選項, 沒有打勾就會列出指定命名空間(namespace)底下所有的子命名空間(subnamespace)項目";
+$lang['addpage_hideACL'] = "沒有打勾 : 表示當使用者沒有新增頁面權限時就顯示沒有權限的訊息而不會顯示出新增頁面的輸入欄.";
diff --git a/plugins/55/addnewpage/lang/zh/lang.php b/plugins/55/addnewpage/lang/zh/lang.php
new file mode 100755
index 0000000..9e5248d
--- /dev/null
+++ b/plugins/55/addnewpage/lang/zh/lang.php
@@ -0,0 +1,13 @@
+<?php
+
+/**
+ * @license GPL 2 (https://www.gnu.org/licenses/gpl.html)
+ *
+ * Chinese(Simplified) language file
+ *
+ * @author 小命Leaflet <2532846822@qq.com>
+ */
+$lang['namespaceRoot'] = '根部命名空间';
+$lang['name'] = '页面名称';
+$lang['okbutton'] = '增加页面';
+$lang['nooption'] = '抱歉,您没有权限增加页面';
diff --git a/plugins/55/addnewpage/lang/zh/settings.php b/plugins/55/addnewpage/lang/zh/settings.php
new file mode 100755
index 0000000..ad6f6fd
--- /dev/null
+++ b/plugins/55/addnewpage/lang/zh/settings.php
@@ -0,0 +1,13 @@
+<?php
+
+/**
+ * @license GPL 2 (https://www.gnu.org/licenses/gpl.html)
+ *
+ * USE : UTF8
+ * Chinese (Simplified) language file
+ *
+ */
+$lang['addpage_exclude'] = '排除的命名空间(使用;来分隔命名空间)';
+$lang['addpage_showroot'] = '显示根部命名空间';
+$lang['addpage_hide'] = '在使用 {{NEWPAGE>[ns]}} 时不显示命名空间的选择(未勾选则仅显示子命名空间)';
+$lang['addpage_hideACL'] = '用户没有新增页面权限时隐藏{{NEWPAGE}}(若未勾选则显示信息)';
diff --git a/plugins/55/addnewpage/plugin.info.txt b/plugins/55/addnewpage/plugin.info.txt
new file mode 100755
index 0000000..7aabe21
--- /dev/null
+++ b/plugins/55/addnewpage/plugin.info.txt
@@ -0,0 +1,8 @@
+# General Plugin Info
+base addnewpage
+author Damien Regad, Benjamin Santalucia, Sam Wilson and other contributors
+email dregad@mantisbt.org
+date 2024-11-16
+name Add New Page plugin
+desc Adds a "new page form" to any wiki page.
+url https://www.dokuwiki.org/plugin:addnewpage
diff --git a/plugins/55/addnewpage/script.js b/plugins/55/addnewpage/script.js
new file mode 100755
index 0000000..0c3f24c
--- /dev/null
+++ b/plugins/55/addnewpage/script.js
@@ -0,0 +1,35 @@
+jQuery(function () {
+ jQuery(".addnewpage form").each(function () {
+ var $form = jQuery(this);
+ var $ns = $form.find("[name='np_cat']");
+ var $title = $form.find("input[name='title']");
+ var $id = $form.find("input[name='id']");
+ var $submit = $form.find(':submit');
+
+console.log($ns);
+ // disable submit unless something is in input or input is disabled
+ if ($title.attr('type') === 'text') {
+ $submit.attr('disabled', 'disabled');
+ $title.on('input', function () {
+ if ($title.val().length > 0) {
+ $submit.removeAttr('disabled');
+ } else {
+ $submit.attr('disabled', 'disabled');
+ }
+ });
+ }
+console.log($ns);
+ // Change the form's page-ID field on submit
+ $form.submit(function () {
+ // Build the new page ID and save in hidden form field
+ var id = $ns.val().replace('@INPUT@', $title.val());
+ $id.val(id);
+ // Clean up the form vars, just to make the resultant URL a bit nicer
+ $ns.prop("disabled", true);
+ $title.prop("disabled", true);
+
+ return true;
+ });
+
+ });
+});
diff --git a/plugins/55/addnewpage/style.less b/plugins/55/addnewpage/style.less
new file mode 100644
index 0000000..9ecc509
--- /dev/null
+++ b/plugins/55/addnewpage/style.less
@@ -0,0 +1,5 @@
+div.addnewpage {
+ select, input {
+ margin-right: 3px;
+ }
+}
diff --git a/plugins/55/addnewpage/syntax.php b/plugins/55/addnewpage/syntax.php
new file mode 100644
index 0000000..c7d7b7b
--- /dev/null
+++ b/plugins/55/addnewpage/syntax.php
@@ -0,0 +1,423 @@
+<?php
+/**
+ * Add-New-Page Plugin: a simple form for adding new pages.
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author iDO <ido@idotech.info>
+ * @author Sam Wilson <sam@samwilson.id.au>
+ *
+ * @noinspection PhpUnused
+ * @noinspection PhpMissingParamTypeInspection, PhpMissingReturnTypeInspection
+ */
+
+use dokuwiki\Extension\SyntaxPlugin;
+use dokuwiki\File\PageResolver;
+
+// must be run within Dokuwiki
+if(!defined('DOKU_INC')) die();
+
+class syntax_plugin_addnewpage extends SyntaxPlugin {
+
+ /** @var array the parsed options */
+ protected $options;
+
+ /**
+ * Syntax Type
+ */
+ public function getType() {
+ return 'substition';
+ }
+
+ /**
+ * Paragraph Type
+ */
+ public function getPType() {
+ return 'block';
+ }
+
+ /**
+ * @return int
+ */
+ public function getSort() {
+ return 199;
+ }
+
+ /**
+ * @param string $mode
+ */
+ public function connectTo($mode) {
+ $this->Lexer->addSpecialPattern('\{\{NEWPAGE[^\}]*\}\}', $mode, 'plugin_addnewpage');
+ }
+
+ /**
+ * Handler to prepare matched data for the rendering process.
+ *
+ * Handled syntax options:
+ * - {{NEWPAGE}}
+ * - {{NEWPAGE>your:namespace}}
+ * - {{NEWPAGE>your:namespace:@INPUT@:start}}
+ * - {{NEWPAGE>your:namespace:[date formats]}} {@see strftime()}
+ * - {{NEWPAGE?config_overrides}}
+ * - {{NEWPAGE?label=custom}}
+ * - {{NEWPAGE#newtpl1,newtpl2}}
+ * - {{NEWPAGE#newtpl1|Title1,newtpl2|Title1}}
+ * - {{NEWPAGE>your:namespace#newtpl1|Title1,newtpl2|Title1}}
+ * - {{NEWPAGE>your:namespace#newtpl1|Title1,newtpl2|Title1#@HI@,Howdy}}
+ *
+ * Refer to {@see https://www.dokuwiki.org/plugin:addnewpage} for details.
+ *
+ * @param string $match The text matched by the patterns
+ * @param int $state The lexer state for the match
+ * @param int $pos The character position of the matched text
+ * @param Doku_Handler $handler The Doku_Handler object
+ *
+ * @return array Return an array with all data you want to use in render
+ * @codingStandardsIgnoreStart
+ */
+ public function handle($match, $state, $pos, Doku_Handler $handler) {
+ /* @codingStandardsIgnoreEnd */
+ $match = substr($match, 9, -2); // strip markup
+
+ $data = array(
+ 'namespace' => '',
+ 'newpagetemplates' => array(),
+ 'newpagevars' => '',
+ 'options' => array(
+ 'exclude' => $this->getConf('addpage_exclude'),
+ 'showroot' => $this->getConf('addpage_showroot'),
+ 'hide' => $this->getConf('addpage_hide'),
+ 'hideacl' => $this->getConf('addpage_hideACL'),
+ 'autopage' => $this->getConf('addpage_autopage'),
+ 'label' => 'okbutton',
+ )
+ );
+
+ if(preg_match('/>(.*?)(#|\?|$)/', $match, $m)) {
+ $data['namespace'] = trim($m[1]);
+ }
+
+ # Extract the newpagetemplate plugin parameters
+ # - after the initial #: the template name
+ # - after optional 2nd #: custom variable names
+ if(preg_match('/#(.*?)(?:#(.*?))?(?:\?|$)/', $match, $m)) {
+ $data['newpagetemplates'] = array_map('trim', explode(',', $m[1]));
+ $data['newpagevars'] = trim($m[2] ?? '');
+ }
+
+ if(preg_match('/\?(.*?)(#|$)/', $match, $m)) {
+ $this->_parseOptions($m[1], $data['options']);
+ }
+
+ return $data;
+ }
+
+ /**
+ * Create the new-page form.
+ *
+ * @param $format string output format being rendered
+ * @param $renderer Doku_Renderer the current renderer object
+ * @param $data array data created by handler()
+ * @return boolean rendered correctly?
+ */
+ public function render($format, Doku_Renderer $renderer, $data) {
+ global $lang;
+
+ // make options available in class
+ $this->options = $data['options'];
+
+ if($format == 'xhtml') {
+ $disablecache = false;
+ $namespaceinput = $this->_htmlNamespaceInput($data['namespace'], $disablecache);
+ if($namespaceinput === false) {
+ if($this->options['hideacl']) {
+ $renderer->doc .= '';
+ } else {
+ $renderer->doc .= $this->getLang('nooption');
+ }
+ return true;
+ }
+ if($disablecache) $renderer->info['cache'] = false;
+
+ $newpagetemplateinput = $this->_htmlTemplateInput($data['newpagetemplates']);
+
+ $input = 'text';
+ if($this->options['autopage']) $input = 'hidden';
+
+ // Button label. If given string is not localized, use it as-is
+ $label = $this->getLang($this->options['label']);
+ if (!$label) {
+ $label = $this->options['label'];
+ }
+
+ $form = '<div class="addnewpage"><p>'
+ . '<form name="addnewpage" method="get" action="' . DOKU_BASE . DOKU_SCRIPT
+ . '" accept-charset="' . $lang['encoding'] . '">'
+ . $namespaceinput
+ . '<input class="edit" type="' . $input . '" name="title" size="20" maxlength="255" tabindex="2" placeholder="'
+ . $this->getLang('name') . '"/>'
+ . $newpagetemplateinput
+ . '<input type="hidden" name="newpagevars" value="' . $data['newpagevars'] . '"/>'
+ . '<input type="hidden" name="do" value="edit" />'
+ . '<input type="hidden" name="id" />'
+ . '<input class="button" type="submit" value="' . $label . '" tabindex="4" />'
+ . '</form>'
+ . '</p></div>';
+
+ $renderer->doc .= $form;
+
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Overwrites the $options with the ones parsed from $optstr
+ *
+ * @param string $optstr
+ * @param array $options
+ * @author Andreas Gohr <gohr@cosmocode.de>
+ */
+ protected function _parseOptions($optstr, &$options) {
+ $opts = preg_split('/[,&]/', $optstr);
+
+ foreach($opts as $opt) {
+ $opt_lower = strtolower(trim($opt));
+ $val = true;
+ // booleans can be negated with a no prefix
+ if(substr($opt_lower, 0, 2) == 'no') {
+ $opt_lower = substr($opt, 2);
+ $val = false;
+ }
+
+ // not a known option? might be a key=value pair
+ if(!isset($options[$opt_lower])) {
+ $split = array_map('trim', sexplode('=', $opt, 2));
+ $opt_lower = strtolower($split[0]);
+ $val = $split[1];
+ }
+
+ // still unknown? skip it
+ if(!isset($options[$opt_lower])) continue;
+
+ // overwrite the current value
+ $options[$opt_lower] = $val;
+ }
+ }
+
+ /**
+ * Parse namespace request
+ *
+ * This creates the final ID to be created (still having an @INPUT@ variable
+ * which is filled in via JavaScript)
+ *
+ * @author Samuele Tognini <samuele@cli.di.unipi.it>
+ * @author Michael Braun <michael-dev@fami-braun.de>
+ * @author Andreas Gohr <gohr@cosmocode.de>
+ * @param string $ns The namespace as given in the syntax
+ * @return string
+ */
+ protected function _parseNS($ns) {
+ global $INFO;
+
+ $selfid = $INFO['id'];
+ $selfns = getNS($selfid);
+ // replace the input variable with something unique that survives cleanID
+ $keep = sha1(time());
+
+ // by default append the input to the namespace (except on autopage)
+ if(strpos($ns, '@INPUT@') === false && !$this->options['autopage']) $ns .= ":@INPUT@";
+
+ // date replacements
+ $ns = dformat(null, $ns);
+
+ // placeholders
+ $replacements = array(
+ '/\//' => ':', // forward slashes to colons
+ '/@PAGE@/' => $selfid,
+ '/@NS@/' => $selfns,
+ '/^\.(:|\/|$)/' => "$selfns:",
+ '/@INPUT@/' => $keep,
+ );
+ $ns = preg_replace(array_keys($replacements), array_values($replacements), $ns);
+
+ // clean up, then reinsert the input variable
+ $ns = cleanID($ns);
+ return str_replace($keep, '@INPUT@', $ns);
+ }
+
+ /**
+ * Create the HTML Select element for namespace selection.
+ *
+ * @param string|false $dest_ns The destination namespace, or false if none provided.
+ * @param bool $disablecache reference indicates if caching need to be disabled
+ * @global string $ID The page ID
+ * @return string Select element with appropriate NS selected.
+ */
+ protected function _htmlNamespaceInput($dest_ns, &$disablecache) {
+ global $ID;
+ $disablecache = false;
+
+ // If a NS has been provided:
+ // Whether to hide the NS selection (otherwise, show only subnamespaces).
+ $hide = $this->options['hide'];
+
+ $parsed_dest_ns = $this->_parseNS($dest_ns);
+ // Whether the user can create pages in the provided NS (or root, if no
+ // destination NS has been set.
+ $can_create = (auth_quickaclcheck($parsed_dest_ns . ":") >= AUTH_CREATE);
+
+ //namespace given, but hidden
+ if($hide && !empty($dest_ns)) {
+ if($can_create) {
+ return '<input type="hidden" name="np_cat" id="np_cat" value="' . $parsed_dest_ns . '"/>';
+ } else {
+ return false;
+ }
+ }
+
+ //show select of given namespace
+ $currentns = getNS($ID);
+
+ $ret = '<select class="edit" id="np_cat" name="np_cat" tabindex="1">';
+
+ // Whether the NS select element has any options
+ $someopt = false;
+
+ // Show root namespace if requested and allowed
+ if($this->options['showroot'] && $can_create) {
+ if(empty($dest_ns)) {
+ // If no namespace has been provided, add an option for the root NS.
+ $ret .= '<option ' . (($currentns == '') ? 'selected ' : '') . ' value="">' . $this->getLang('namespaceRoot') . '</option>';
+ } else {
+ // If a namespace has been provided, add an option for it.
+ $ret .= '<option ' . (($currentns == $dest_ns) ? 'selected ' : '') . ' value="' . formText($dest_ns) . '">' . formText($dest_ns) . '</option>';
+ }
+ $someopt = true;
+ }
+
+ $subnamespaces = $this->_getNamespaceList($dest_ns);
+
+ // The top of this stack will always be the last printed ancestor namespace
+ $ancestor_stack = array();
+ if (!empty($dest_ns)) {
+ $ancestor_stack[] = $dest_ns;
+ }
+
+ foreach($subnamespaces as $ns) {
+
+ if(auth_quickaclcheck($ns . ":") < AUTH_CREATE) continue;
+
+ // Pop any elements off the stack that are not ancestors of the current namespace
+ while(!empty($ancestor_stack) && strpos($ns, $ancestor_stack[count($ancestor_stack) - 1] . ':') !== 0) {
+ array_pop($ancestor_stack);
+ }
+
+ $nsparts = explode(':', $ns);
+ $first_unprinted_depth = empty($ancestor_stack) ? 1 : (2 + substr_count($ancestor_stack[count($ancestor_stack) - 1], ':'));
+ for($i = $first_unprinted_depth, $end = count($nsparts); $i <= $end; $i++) {
+ $namespace = implode(':', array_slice($nsparts, 0, $i));
+ $ancestor_stack[] = $namespace;
+ $selectOptionText = str_repeat('&nbsp;&nbsp;', substr_count($namespace, ':')) . $nsparts[$i - 1];
+ $ret .= '<option ' .
+ (($currentns == $namespace) ? 'selected ' : '') .
+ ($i == $end ? ('value="' . $namespace . '">') : 'disabled>') .
+ $selectOptionText .
+ '</option>';
+ }
+ $someopt = true;
+ $disablecache = true;
+ }
+
+ $ret .= '</select>';
+
+ if($someopt) {
+ return $ret;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Get a list of namespaces below the given namespace.
+ * Recursively fetches subnamespaces.
+ *
+ * @param string $topns The top namespace
+ * @return array Multi-dimensional array of all namespaces below $tns
+ */
+ protected function _getNamespaceList($topns = '') {
+ global $conf;
+
+ $topns = utf8_encodeFN(str_replace(':', '/', $topns));
+
+ $excludes = $this->options['exclude'];
+ if($excludes == "") {
+ $excludes = array();
+ } else {
+ $excludes = @explode(';', strtolower($excludes));
+ }
+ $searchdata = array();
+ search($searchdata, $conf['datadir'], 'search_namespaces', array(), $topns);
+
+ $namespaces = array();
+ foreach($searchdata as $ns) {
+ foreach($excludes as $exclude) {
+ if(!empty($exclude) && strpos($ns['id'], $exclude) === 0) {
+ continue 2;
+ }
+ }
+ $namespaces[] = $ns['id'];
+ }
+
+ return $namespaces;
+ }
+
+ /**
+ * Create html for selection of namespace templates
+ *
+ * @param array $newpagetemplates array of namespace templates
+ * @return string html of select or hidden input
+ */
+ public function _htmlTemplateInput($newpagetemplates) {
+ $cnt = count($newpagetemplates);
+ if($cnt < 1 || $cnt == 1 && $newpagetemplates[0] == '') {
+ $input = '';
+
+ } else {
+ if($cnt == 1) {
+ list($template,) = $this->_parseNSTemplatePage($newpagetemplates[0]);
+ $input = '<input type="hidden" name="newpagetemplate" value="' . formText($template) . '" />';
+ } else {
+ $first = true;
+ $input = '<select name="newpagetemplate" tabindex="3">';
+ foreach($newpagetemplates as $template) {
+ $p = ($first ? ' selected="selected"' : '');
+ $first = false;
+
+ list($template, $name) = $this->_parseNSTemplatePage($template);
+ $p .= ' value="' . formText($template) . '"';
+ $input .= "<option $p>" . formText($name) . "</option>";
+ }
+ $input .= '</select>';
+ }
+ $input = DOKU_TAB . DOKU_TAB . $input . DOKU_LF;
+ }
+ return $input;
+ }
+
+ /**
+ * Parses and resolves the namespace template page
+ *
+ * @param $nstemplate
+ * @return array
+ */
+ protected function _parseNSTemplatePage($nstemplate) {
+ global $ID;
+
+ @list($template, $name) = explode('|', $nstemplate, 2);
+ $template = (new PageResolver($ID))->resolveId($template);
+ if (is_null($name)) $name = $template;
+
+ return array($template, $name);
+ }
+
+}