summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaco <franco@reevo.org>2022-10-30 20:29:56 -0300
committerYaco <franco@reevo.org>2022-10-30 20:29:56 -0300
commitf6ada400510ba77a2840d1944cb0a184269c4849 (patch)
tree4869f00719ad1d2a40b41f3bdba19d270bcc751e
parent2a34419fc2b9240132303395dfa72534afb47e4b (diff)
adds include pluginHEADmaster
-rw-r--r--platform/www/conf/local.php10
-rw-r--r--platform/www/conf/local.php.bak.php5
-rw-r--r--platform/www/conf/plugins.local.php.bak9
-rw-r--r--platform/www/lib/plugins/include/.github/workflows/phpTestLinux.yml52
-rw-r--r--platform/www/lib/plugins/include/COPYING340
-rw-r--r--platform/www/lib/plugins/include/README11
-rw-r--r--platform/www/lib/plugins/include/_test/locallink_conversion.test.php42
-rw-r--r--platform/www/lib/plugins/include/_test/media_linktitle_conversion.test.php54
-rw-r--r--platform/www/lib/plugins/include/_test/namespace_includes.test.php182
-rw-r--r--platform/www/lib/plugins/include/_test/nested_include.test.php75
-rw-r--r--platform/www/lib/plugins/include/_test/pagemove_support.test.php76
-rw-r--r--platform/www/lib/plugins/include/_test/safeindex.test.php40
-rw-r--r--platform/www/lib/plugins/include/action.php370
-rw-r--r--platform/www/lib/plugins/include/conf/default.php30
-rw-r--r--platform/www/lib/plugins/include/conf/metadata.php33
-rw-r--r--platform/www/lib/plugins/include/deleted.files13
-rw-r--r--platform/www/lib/plugins/include/helper.php941
-rw-r--r--platform/www/lib/plugins/include/images/comment.gifbin0 -> 111 bytes
-rw-r--r--platform/www/lib/plugins/include/images/date.gifbin0 -> 123 bytes
-rw-r--r--platform/www/lib/plugins/include/images/link.gifbin0 -> 125 bytes
-rw-r--r--platform/www/lib/plugins/include/images/user.gifbin0 -> 116 bytes
-rw-r--r--platform/www/lib/plugins/include/lang/ar/lang.php12
-rw-r--r--platform/www/lib/plugins/include/lang/ar/settings.php20
-rw-r--r--platform/www/lib/plugins/include/lang/cs/lang.php10
-rw-r--r--platform/www/lib/plugins/include/lang/cs/settings.php41
-rw-r--r--platform/www/lib/plugins/include/lang/da/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/da/settings.php39
-rw-r--r--platform/www/lib/plugins/include/lang/de-informal/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/de-informal/settings.php39
-rw-r--r--platform/www/lib/plugins/include/lang/de/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/de/settings.php42
-rw-r--r--platform/www/lib/plugins/include/lang/en/lang.php12
-rw-r--r--platform/www/lib/plugins/include/lang/en/settings.php41
-rw-r--r--platform/www/lib/plugins/include/lang/eo/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/eo/settings.php38
-rw-r--r--platform/www/lib/plugins/include/lang/es/lang.php12
-rw-r--r--platform/www/lib/plugins/include/lang/es/settings.php41
-rw-r--r--platform/www/lib/plugins/include/lang/fr/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/fr/settings.php44
-rw-r--r--platform/www/lib/plugins/include/lang/hr/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/hr/settings.php38
-rw-r--r--platform/www/lib/plugins/include/lang/hu/lang.php9
-rw-r--r--platform/www/lib/plugins/include/lang/hu/settings.php39
-rw-r--r--platform/www/lib/plugins/include/lang/it/lang.php10
-rw-r--r--platform/www/lib/plugins/include/lang/it/settings.php29
-rw-r--r--platform/www/lib/plugins/include/lang/ja/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/ja/settings.php39
-rw-r--r--platform/www/lib/plugins/include/lang/ko/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/ko/settings.php39
-rw-r--r--platform/www/lib/plugins/include/lang/nl/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/nl/settings.php40
-rw-r--r--platform/www/lib/plugins/include/lang/pl/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/pl/settings.php13
-rw-r--r--platform/www/lib/plugins/include/lang/pt-br/lang.php12
-rw-r--r--platform/www/lib/plugins/include/lang/pt-br/settings.php14
-rw-r--r--platform/www/lib/plugins/include/lang/pt/lang.php13
-rw-r--r--platform/www/lib/plugins/include/lang/ru/lang.php10
-rw-r--r--platform/www/lib/plugins/include/lang/ru/settings.php42
-rw-r--r--platform/www/lib/plugins/include/lang/sk/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/sk/settings.php37
-rw-r--r--platform/www/lib/plugins/include/lang/sl/lang.php12
-rw-r--r--platform/www/lib/plugins/include/lang/sl/settings.php16
-rw-r--r--platform/www/lib/plugins/include/lang/sv/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/sv/settings.php39
-rw-r--r--platform/www/lib/plugins/include/lang/tr/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/tr/settings.php36
-rw-r--r--platform/www/lib/plugins/include/lang/vi/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/vi/settings.php38
-rw-r--r--platform/www/lib/plugins/include/lang/zh/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/zh/settings.php33
-rw-r--r--platform/www/lib/plugins/include/plugin.info.txt7
-rw-r--r--platform/www/lib/plugins/include/requirements.txt2
-rw-r--r--platform/www/lib/plugins/include/script.js22
-rw-r--r--platform/www/lib/plugins/include/style.css53
-rw-r--r--platform/www/lib/plugins/include/syntax/closelastsecedit.php36
-rw-r--r--platform/www/lib/plugins/include/syntax/editbtn.php43
-rw-r--r--platform/www/lib/plugins/include/syntax/footer.php133
-rw-r--r--platform/www/lib/plugins/include/syntax/header.php95
-rw-r--r--platform/www/lib/plugins/include/syntax/include.php173
-rw-r--r--platform/www/lib/plugins/include/syntax/locallink.php45
-rw-r--r--platform/www/lib/plugins/include/syntax/readmore.php43
-rw-r--r--platform/www/lib/plugins/include/syntax/sorttag.php60
-rw-r--r--platform/www/lib/plugins/include/syntax/wrap.php78
83 files changed, 4140 insertions, 2 deletions
diff --git a/platform/www/conf/local.php b/platform/www/conf/local.php
index 15aa56b..1bce6c7 100644
--- a/platform/www/conf/local.php
+++ b/platform/www/conf/local.php
@@ -3,7 +3,7 @@
* Dokuwiki's Main Configuration File - Local Settings
* Auto-generated by config plugin
* Run for user: admin
- * Date: Wed, 17 Aug 2022 20:32:16 -0300
+ * Date: Sat, 29 Oct 2022 19:28:07 -0300
*/
$conf['title'] = 'The Acervus Project';
@@ -21,6 +21,12 @@ $conf['mailfrom'] = 'info@acerv.us';
$conf['updatecheck'] = 0;
$conf['userewrite'] = '1';
$conf['plugin']['authldap']['attributes'] = array();
+$conf['plugin']['include']['showfooter'] = 0;
+$conf['plugin']['include']['showdate'] = 0;
+$conf['plugin']['include']['showuser'] = 0;
+$conf['plugin']['include']['showcomments'] = 0;
+$conf['plugin']['include']['showlinkbacks'] = 0;
+$conf['plugin']['include']['showtags'] = 0;
$conf['plugin']['pageredirect']['show_note'] = 0;
$conf['plugin']['translation']['translations'] = 'en es';
$conf['plugin']['translation']['display'] = 'langcode,name';
@@ -30,4 +36,6 @@ $conf['plugin']['translation']['copytrans'] = 1;
$conf['tpl']['acervus']['numberedHeading'] = 1;
$conf['tpl']['acervus']['tocPosition'] = 'dokuwiki';
$conf['tpl']['acervus']['footer'] = 'footer';
+$conf['plugin']['mdpage']['flavor'] = 'markdown-extra';
+$conf['plugin']['mdpage']['markdown_default'] = '1';
$conf['plugin']['fastwiki']['save'] = '1';
diff --git a/platform/www/conf/local.php.bak.php b/platform/www/conf/local.php.bak.php
index 976def9..643d9e4 100644
--- a/platform/www/conf/local.php.bak.php
+++ b/platform/www/conf/local.php.bak.php
@@ -3,7 +3,7 @@
* Dokuwiki's Main Configuration File - Local Settings
* Auto-generated by config plugin
* Run for user: admin
- * Date: Sat, 12 Mar 2022 20:10:08 +0000
+ * Date: Tue, 13 Sep 2022 18:26:55 -0300
*/
$conf['title'] = 'The Acervus Project';
@@ -18,8 +18,11 @@ $conf['disableactions'] = 'register';
$conf['htmlok'] = 1;
$conf['target']['extern'] = '_blank';
$conf['mailfrom'] = 'info@acerv.us';
+$conf['updatecheck'] = 0;
$conf['userewrite'] = '1';
$conf['plugin']['authldap']['attributes'] = array();
+$conf['plugin']['mdpage']['flavor'] = 'markdown-extra';
+$conf['plugin']['mdpage']['markdown_default'] = 1;
$conf['plugin']['pageredirect']['show_note'] = 0;
$conf['plugin']['translation']['translations'] = 'en es';
$conf['plugin']['translation']['display'] = 'langcode,name';
diff --git a/platform/www/conf/plugins.local.php.bak b/platform/www/conf/plugins.local.php.bak
new file mode 100644
index 0000000..e510413
--- /dev/null
+++ b/platform/www/conf/plugins.local.php.bak
@@ -0,0 +1,9 @@
+<?php
+/*
+ * Local plugin enable/disable settings
+ * Auto-generated through plugin/extension manager
+ *
+ * NOTE: Plugins will not be added to this file unless there is a need to override a default setting. Plugins are
+ * enabled by default.
+ */
+$plugins['markdowku'] = 0;
diff --git a/platform/www/lib/plugins/include/.github/workflows/phpTestLinux.yml b/platform/www/lib/plugins/include/.github/workflows/phpTestLinux.yml
new file mode 100644
index 0000000..d76e2a9
--- /dev/null
+++ b/platform/www/lib/plugins/include/.github/workflows/phpTestLinux.yml
@@ -0,0 +1,52 @@
+name: PHP Tests on Linux
+
+on: [push, pull_request]
+
+jobs:
+ testLinux:
+ name: PHP ${{ matrix.php-versions }} DokuWiki ${{ matrix.dokuwiki-branch }}
+ runs-on: ubuntu-latest
+ if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
+
+ strategy:
+ matrix:
+ php-versions: ['7.2', '7.3', '7.4', '8.0']
+ dokuwiki-branch: [ 'master', 'stable']
+ exclude:
+ - dokuwiki-branch: 'stable'
+ php-versions: '8.0'
+ fail-fast: false
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php-versions }}
+ extensions: mbstring, intl, PDO, pdo_sqlite, bz2
+
+ - name: Setup problem matchers
+ run: |
+ echo ::add-matcher::${{ runner.tool_cache }}/php.json
+ echo ::add-matcher::${{ runner.tool_cache }}/phpunit.json
+
+ - name: Download DokuWiki Test-setup
+ run: wget https://raw.github.com/splitbrain/dokuwiki-travis/master/travis.sh
+
+ - name: Run DokuWiki Test-setup
+ env:
+ CI_SERVER: 1
+ DOKUWIKI: ${{ matrix.dokuwiki-branch }}
+ run: sh travis.sh
+
+ - name: Setup PHPUnit
+ run: |
+ php _test/fetchphpunit.php
+ cd _test
+
+ - name: Run PHPUnit
+ run: |
+ cd _test
+ php phpunit.phar --verbose --stderr --group plugin_include
diff --git a/platform/www/lib/plugins/include/COPYING b/platform/www/lib/plugins/include/COPYING
new file mode 100644
index 0000000..d60c31a
--- /dev/null
+++ b/platform/www/lib/plugins/include/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ 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.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/platform/www/lib/plugins/include/README b/platform/www/lib/plugins/include/README
new file mode 100644
index 0000000..0fb6119
--- /dev/null
+++ b/platform/www/lib/plugins/include/README
@@ -0,0 +1,11 @@
+====== Include Plugin for DokuWiki ======
+
+All documentation for the Include Plugin is available online at:
+
+ * http://dokuwiki.org/plugin:include
+
+(c) 2005 - 2007 by Esther Brunner <wikidesign@gmail.com> and Christopher
+Smith <chris@jalakai.co.uk>
+(c) 2008 - 2009 by Gina Häußge, Michael Klier <dokuwiki@chimeric.de>
+(c) 2010 - 2012 by Michael Hamann <michael@content-space.de>, Gina Häußge and Michael Klier <dokuwiki@chimeric.de>
+See COPYING for license info.
diff --git a/platform/www/lib/plugins/include/_test/locallink_conversion.test.php b/platform/www/lib/plugins/include/_test/locallink_conversion.test.php
new file mode 100644
index 0000000..e4c95a3
--- /dev/null
+++ b/platform/www/lib/plugins/include/_test/locallink_conversion.test.php
@@ -0,0 +1,42 @@
+<?php
+
+if (!defined('DOKU_INC')) die();
+
+/**
+ * Test the conversion of local links to internal links if the page hasn't been fully included
+ *
+ * @group plugin_include
+ * @group plugins
+ */
+class plugin_include_locallink_conversion_test extends DokuWikiTest {
+ /** @var helper_plugin_include $helper */
+ private $helper;
+
+ public function setUp() : void
+ {
+ $this->pluginsEnabled[] = 'include';
+ parent::setUp();
+
+ $this->helper = plugin_load('helper', 'include');
+
+ saveWikiText('included', 'Example content with link [[#jump]]', 'Test setup');
+ idx_addPage('test:included');
+
+ saveWikiText('test:includefull', '{{page>..:included}}', 'Test setup');
+ idx_addPage('test:includefull');
+
+ saveWikiText('test:includefirst', '{{page>..:included&firstseconly}}', 'Test setup');
+ idx_addPage('test:includefirst');
+ }
+
+ public function testLocalConverted() {
+ $html = p_wiki_xhtml('test:includefirst');
+ $this->assertContains('href="'.wl('included').'#jump"', $html);
+ $this->assertNotContains('href="#jump"', $html);
+ }
+
+ public function testLocalExistsIfIncluded() {
+ $html = p_wiki_xhtml('test:includefull');
+ $this->assertContains('href="#jump"', $html);
+ }
+}
diff --git a/platform/www/lib/plugins/include/_test/media_linktitle_conversion.test.php b/platform/www/lib/plugins/include/_test/media_linktitle_conversion.test.php
new file mode 100644
index 0000000..ea7787f
--- /dev/null
+++ b/platform/www/lib/plugins/include/_test/media_linktitle_conversion.test.php
@@ -0,0 +1,54 @@
+<?php
+
+if (!defined('DOKU_INC')) die();
+
+/**
+ * Test the conversion of media references in link titles
+ *
+ * @group plugin_include
+ * @group plugins
+ */
+class plugin_include_media_linktitle_conversion_test extends DokuWikiTest {
+ /** @var helper_plugin_include $helper */
+ private $helper;
+
+ public function setUp() : void
+ {
+ $this->pluginsEnabled[] = 'include';
+ parent::setUp();
+
+ $this->helper = plugin_load('helper', 'include');
+
+ saveWikiText('wiki:included', <<<EOF
+ * [[test|{{dokuwiki.png}}]]
+ * [[#test|{{dokuwiki.png?w=200}}]]
+ * [[doku>test|{{dokuwiki.png?w=300}}]]
+ * [[test|{{https://www.dokuwiki.org/lib/tpl/dokuwiki/images/logo.png}}]]
+EOF
+ , 'Test setup');
+ idx_addPage('wiki:included');
+
+ saveWikiText('test:include', '{{page>..:wiki:included}}', 'Test setup');
+ idx_addPage('test:include');
+ }
+
+ public function testInternalLinkTitleConversion() {
+ $html = p_wiki_xhtml('test:include');
+ $this->assertContains('src="'.ml('wiki:dokuwiki.png').'"', $html);
+ }
+
+ public function testLocalLinkTitleConversion() {
+ $html = p_wiki_xhtml('test:include');
+ $this->assertContains('src="'.ml('wiki:dokuwiki.png', array('w' => '200')).'"', $html);
+ }
+
+ public function testInterWikiLinkTitleConversion() {
+ $html = p_wiki_xhtml('test:include');
+ $this->assertContains('src="'.ml('wiki:dokuwiki.png', array('w' => '300')).'"', $html);
+ }
+
+ public function testExternalMediaNotConverted() {
+ $html = p_wiki_xhtml('test:include');
+ $this->assertContains('src="'.ml('https://www.dokuwiki.org/lib/tpl/dokuwiki/images/logo.png').'"', $html);
+ }
+}
diff --git a/platform/www/lib/plugins/include/_test/namespace_includes.test.php b/platform/www/lib/plugins/include/_test/namespace_includes.test.php
new file mode 100644
index 0000000..1da3234
--- /dev/null
+++ b/platform/www/lib/plugins/include/_test/namespace_includes.test.php
@@ -0,0 +1,182 @@
+<?php
+
+if (!defined('DOKU_INC')) die();
+
+/**
+ * Test namespace includes
+ *
+ * @group plugin_include
+ * @group plugins
+ */
+class plugin_include_namespaces_includes_test extends DokuWikiTest {
+ /**
+ * @var helper_plugin_include $helper
+ */
+ private $helper;
+
+ /**
+ * Setup - enable and load the include plugin and create the test pages
+ */
+ public function setUp() : void
+ {
+ $this->pluginsEnabled[] = 'include';
+ parent::setUp(); // this enables the include plugin
+ $this->helper = plugin_load('helper', 'include');
+
+ global $conf;
+ $conf['hidepages'] = 'inclhidden:hidden';
+
+ // for testing hidden pages
+ saveWikiText('inclhidden:hidden', 'Hidden page', 'Created hidden page');
+ saveWikiText('inclhidden:visible', 'Visible page', 'Created visible page');
+
+ // pages on different levels
+ saveWikiText('incltest:level1', 'Page on level 1', 'Created page on level 1');
+ saveWikiText('incltest:ns:level2', 'Page on level 2', 'Created page on level 2');
+ saveWikiText('incltest:ns:ns:level3', 'Page on level 3', 'Created page on level 3');
+
+ // for page ordering
+ saveWikiText('inclorder:page1', 'Page 1', 'Created page 1');
+ saveWikiText('inclorder:page2', 'Page 2', 'Created page 2');
+ saveWikiText('inclorder:page3', '{{include_n>10}} Page 3/10', 'created page 3/1');
+ saveWikiText('inclorder:page4', '{{include_n>2}} Page 4/2', 'created page 4/0');
+ }
+
+ /**
+ * Helper function to read dir content
+ */
+ protected function getDirContent ($dir) {
+ if (is_dir($dir)) {
+ $pages = array();
+ if ($handle = opendir($dir)) {
+ while (($file = readdir($handle)) !== false) {
+ if ($file != '.' && $file != '..') {
+ $pages [] = $file;
+ }
+ }
+ closedir($handle);
+ return $pages;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Test hiding of hidden pages in namespace includes
+ */
+ public function test_hidden() {
+ $flags = $this->helper->get_flags(array());
+ $pages = $this->helper->_get_included_pages('namespace', 'inclhidden:', '', '', $flags);
+ $this->assertEquals(array(
+ array('id' => 'inclhidden:visible', 'exists' => true, 'parent_id' => ''),
+ ), $pages);
+ }
+
+ /**
+ * Test include depth limit
+ */
+ public function test_depth() {
+ $flags = $this->helper->get_flags(array());
+ $pages = $this->helper->_get_included_pages('namespace', 'incltest:', '', '', $flags);
+ $this->assertEquals(array(
+ array('id' => 'incltest:level1', 'exists' => true, 'parent_id' => ''),
+ ), $pages);
+ $flags = $this->helper->get_flags(array('depth=2'));
+ $pages = $this->helper->_get_included_pages('namespace', 'incltest:', '', '', $flags);
+ $this->assertEquals(array(
+ array('id' => 'incltest:level1', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'incltest:ns:level2', 'exists' => true, 'parent_id' => ''),
+ ), $pages);
+ $flags = $this->helper->get_flags(array('depth=2'));
+ $pages = $this->helper->_get_included_pages('namespace', 'incltest:ns', '', '', $flags);
+ $this->assertEquals(array(
+ array('id' => 'incltest:ns:level2', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'incltest:ns:ns:level3', 'exists' => true, 'parent_id' => ''),
+ ), $pages);
+ $flags = $this->helper->get_flags(array('depth=0'));
+ $pages = $this->helper->_get_included_pages('namespace', 'incltest:', '', '', $flags);
+ $this->assertEquals(array(
+ array('id' => 'incltest:level1', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'incltest:ns:level2', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'incltest:ns:ns:level3', 'exists' => true, 'parent_id' => ''),
+ ), $pages);
+
+ // test include of the root namespace
+ $flags = $this->helper->get_flags(array());
+ $pages = $this->helper->_get_included_pages('namespace', ':', '', '', $flags);
+ $this->assertEquals(array(array('id' => 'mailinglist', 'exists' => true, 'parent_id' => '')), $pages);
+ $flags = $this->helper->get_flags(array('depth=2'));
+ $pages = $this->helper->_get_included_pages('namespace', ':', '', '', $flags);
+ $expected = array(
+ array('id' => 'inclhidden:visible', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page1', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page2', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page3', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page4', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'incltest:level1', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'mailinglist', 'exists' => true, 'parent_id' => ''),
+ //array('id' => 'wiki:dokuwiki', 'exists' => true, 'parent_id' => ''),
+ //array('id' => 'wiki:syntax', 'exists' => true, 'parent_id' => ''),
+ //$wikiPages,
+ );
+
+ // page int:editandsavetest exists in DokuWiki after September 2017
+ if (page_exists('int:editandsavetest')) {
+ $expected [] = array('id' => 'int:editandsavetest', 'exists' => true, 'parent_id' => '');
+ }
+
+ // Add pages in namespace wiki
+ $dir = $this->getDirContent(dirname(__FILE__).'/../../../../_test/data/pages/wiki');
+ $this->assertTrue($dir !== null);
+ foreach ($dir as $page) {
+ $page = substr($page, 0, -4);
+ $expected [] = array('id' => 'wiki:'.$page, 'exists' => true, 'parent_id' => '');
+ }
+
+ array_multisort($expected);
+ array_multisort($pages);
+ $this->assertEquals($expected, $pages);
+ }
+
+ /**
+ * Test ordering of namespace includes
+ */
+ public function test_order() {
+
+ $flags = $this->helper->get_flags(array());
+ $pages = $this->helper->_get_included_pages('namespace', 'inclorder:', '', '', $flags);
+
+ $this->assertEquals(array(
+ array('id' => 'inclorder:page1', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page2', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page3', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page4', 'exists' => true, 'parent_id' => ''),
+ ), $pages);
+
+ $flags = $this->helper->get_flags(array('rsort'));
+ $pages = $this->helper->_get_included_pages('namespace', 'inclorder:', '', '', $flags);
+ $this->assertEquals(array(
+ array('id' => 'inclorder:page4', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page3', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page2', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page1', 'exists' => true, 'parent_id' => ''),
+ ), $pages);
+ $flags = $this->helper->get_flags(array('order=custom'));
+ $pages = $this->helper->_get_included_pages('namespace', 'inclorder:', '', '', $flags);
+ $this->assertEquals(array(
+ array('id' => 'inclorder:page4', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page3', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page1', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page2', 'exists' => true, 'parent_id' => ''),
+ ), $pages);
+
+ $flags = $this->helper->get_flags(array('order=custom', 'rsort'));
+ $pages = $this->helper->_get_included_pages('namespace', 'inclorder:', '', '', $flags);
+ $this->assertEquals(array(
+ array('id' => 'inclorder:page2', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page1', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page3', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page4', 'exists' => true, 'parent_id' => ''),
+ ), $pages);
+ }
+}
diff --git a/platform/www/lib/plugins/include/_test/nested_include.test.php b/platform/www/lib/plugins/include/_test/nested_include.test.php
new file mode 100644
index 0000000..745f180
--- /dev/null
+++ b/platform/www/lib/plugins/include/_test/nested_include.test.php
@@ -0,0 +1,75 @@
+<?php
+
+/**
+ * Class plugin_include_nested_test
+ *
+ * @group plugin_include
+ * @group plugins
+ */
+class plugin_include_nested_test extends DokuWikiTest {
+ private $ids = array(
+ 'test:plugin_include:nested:start',
+ 'test:plugin_include:nested:second',
+ 'test:plugin_include:nested:third'
+ );
+
+ public function setUp() : void
+ {
+ $this->pluginsEnabled[] = 'include';
+ parent::setUp();
+ }
+
+ public function test_outer_to_inner() {
+ $this->_createPages();
+ $mainHTML = p_wiki_xhtml('test:plugin_include:nested:start');
+ $secondHTML = p_wiki_xhtml('test:plugin_include:nested:second');
+ $thirdHTML = p_wiki_xhtml('test:plugin_include:nested:third');
+ $this->_validateContent($mainHTML, $secondHTML, $thirdHTML);
+ }
+
+ public function test_inner_to_outer() {
+ $this->_createPages();
+ $thirdHTML = p_wiki_xhtml('test:plugin_include:nested:third');
+ $secondHTML = p_wiki_xhtml('test:plugin_include:nested:second');
+ $mainHTML = p_wiki_xhtml('test:plugin_include:nested:start');
+ $this->_validateContent($mainHTML, $secondHTML, $thirdHTML);
+ }
+
+ private function _validateContent($mainHTML, $secondHTML, $thirdHTML) {
+ $this->assertTrue(strpos($mainHTML, 'Main Content') !== false, 'Main content contains "Main Content"');
+ $this->assertTrue($this->_matchHeader('1', 'Main Test Page', $mainHTML), 'Main page header is h1');
+ $this->assertTrue(strpos($mainHTML, 'Second Content') !== false, 'Main content contains "Second Content"');
+ $this->assertTrue($this->_matchHeader('2', 'Second Test Page', $mainHTML), 'Second page header on main page is h2');
+ $this->assertTrue(strpos($mainHTML, 'Third Content') !== false, 'Main content contains "Third Content"');
+ $this->assertTrue($this->_matchHeader('3', 'Third Test Page', $mainHTML), 'Third page header on main page is h3');
+ $this->assertTrue(strpos($secondHTML, 'Second Content') !== false, 'Second content contains "Second Content"');
+ $this->assertTrue($this->_matchHeader('1', 'Second Test Page', $secondHTML), 'Second page header on second page is h1');
+ $this->assertTrue(strpos($secondHTML, 'Third Content') !== false, 'Second content contains "Third Content"');
+ $this->assertTrue($this->_matchHeader('2', 'Third Test Page', $secondHTML), 'Third page header on second page is h2');
+ $this->assertTrue(strpos($thirdHTML, 'Third Content') !== false, 'Third content contains "Third Content"');
+ $this->assertTrue($this->_matchHeader('1', 'Third Test Page', $thirdHTML), 'Third page header on third page is h1');
+ }
+
+ private function _matchHeader($level, $text, $html) {
+ return preg_match('/<h'.$level.'[^>]*>(<a[^>]*>)?'.$text.'/', $html) > 0;
+ }
+
+ private function _createPages() {
+ saveWikiText('test:plugin_include:nested:start',
+ '====== Main Test Page ======'.DOKU_LF.DOKU_LF
+ .'Main Content'.rand().DOKU_LF.DOKU_LF
+ .'{{page>second}}'.DOKU_LF,
+ 'setup for test');
+ saveWikiText('test:plugin_include:nested:second',
+ '====== Second Test Page ======'.DOKU_LF.DOKU_LF
+ .'Second Content'.rand().DOKU_LF.DOKU_LF
+ .'{{page>third}}'.DOKU_LF,
+ 'setup for test');
+ saveWikiText('test:plugin_include:nested:third',
+ '====== Third Test Page ======'.DOKU_LF.DOKU_LF
+ .'Third Content'.rand().DOKU_LF.DOKU_LF
+ .'{{page>third}}'.DOKU_LF,
+ 'setup for test');
+ }
+}
+
diff --git a/platform/www/lib/plugins/include/_test/pagemove_support.test.php b/platform/www/lib/plugins/include/_test/pagemove_support.test.php
new file mode 100644
index 0000000..58c9425
--- /dev/null
+++ b/platform/www/lib/plugins/include/_test/pagemove_support.test.php
@@ -0,0 +1,76 @@
+<?php
+
+/**
+ * Tests the move support for adapting the syntax of the include plugin
+ *
+ * @group plugin_include
+ * @group plugins
+ */
+class plugin_include_pagemove_support_test extends DokuWikiTest {
+ public function setUp() : void
+ {
+ $this->pluginsEnabled[] = 'move';
+ $this->pluginsEnabled[] = 'include';
+ parent::setUp();
+ }
+
+ public function test_relative_include() {
+ /** @var $move helper_plugin_move_op */
+ $move = plugin_load('helper', 'move_op');
+ if (!$move) {
+ $this->markTestSkipped('the move plugin is not installed');
+ return;
+ }
+ saveWikiText('editx', '{{page>start#start}} %%{{page>start}}%% {{section>wiki:syntax#tables&nofooter}} {{page>:}} {{section>test:start#test}}', 'Testcase created');
+ idx_addPage('editx');
+ $this->assertTrue($move->movePage('editx', 'test:editx'));
+ $this->assertEquals('{{page>:start#start}} %%{{page>start}}%% {{section>wiki:syntax#tables&nofooter}} {{page>:}} {{section>test:start#test}}',rawWiki('test:editx'));
+ }
+
+ public function test_rename() {
+ /** @var $move helper_plugin_move_op */
+ $move = plugin_load('helper', 'move_op');
+ if (!$move) {
+ $this->markTestSkipped('the move plugin is not installed');
+ return;
+ }
+ saveWikiText('editx', 'Page to rename', 'Testcase create');
+ saveWikiText('links', '{{section>links#foo}} {{page>editx}} {{page>:eDitX&nofooter}} {{section>editx#test}} {{page>editx&nofooter}}', 'Testcase created');
+ idx_addPage('editx');
+ idx_addPage('links');
+
+ $this->assertTrue($move->movePage('editx', 'test:edit'));
+ $this->assertEquals('{{section>links#foo}} {{page>test:edit}} {{page>test:edit&nofooter}} {{section>test:edit#test}} {{page>test:edit&nofooter}}', rawWiki('links'));
+ }
+
+ public function test_relative_include_adaption() {
+ /** @var $move helper_plugin_move_op */
+ $move = plugin_load('helper', 'move_op');
+ if (!$move) {
+ $this->markTestSkipped('the move plugin is not installed');
+ return;
+ }
+
+ $text = '====== Main ======
+
+This is a test page
+
+[[.1:page_1|link]]
+
+{{page>.1:page_1&nofooter&noeditbutton}}
+
+{{page>.1:page_2&nofooter&noeditbutton}}';
+
+ saveWikiText('old:namespace:main', $text, 'Created');
+ saveWikiText('old:namespace:1:page_1', 'Page 1', 'Created');
+ saveWikiText('old:namespace:1:page_2', 'Page 2', 'Created');
+ idx_addPage('old:namespace:main');
+ idx_addPage('old:namespace:1:page_1');
+ idx_addPage('old:namespace:1:page_2');
+
+ $this->assertTrue($move->movePage('old:namespace:main', 'new:namespace:main'));
+ $this->assertTrue($move->movePage('old:namespace:1:page_1', 'new:namespace:1:page_1'));
+ $this->assertTrue($move->movePage('old:namespace:1:page_2', 'new:namespace:1:page_2'));
+ $this->assertEquals($text, rawWiki('new:namespace:main'));
+ }
+}
diff --git a/platform/www/lib/plugins/include/_test/safeindex.test.php b/platform/www/lib/plugins/include/_test/safeindex.test.php
new file mode 100644
index 0000000..247c7e6
--- /dev/null
+++ b/platform/www/lib/plugins/include/_test/safeindex.test.php
@@ -0,0 +1,40 @@
+<?php
+/*
+ * @group plugin_include
+ * @group plugins
+ */
+class plugin_include_safeindex_test extends DokuWikiTest {
+ public function setUp() : void
+ {
+ $this->pluginsEnabled[] = 'include';
+ parent::setUp();
+ }
+
+ public function test_safeindex() {
+ global $conf;
+ global $AUTH_ACL;
+ $conf['superuser'] = 'john';
+ $conf['useacl'] = 1;
+
+ $AUTH_ACL = array(
+ '* @ALL 0',
+ '* @user 8',
+ 'public @ALL 1',
+ );
+
+ $_SERVER['REMOTE_USER'] = 'john';
+
+ saveWikiText('parent', "{{page>child}}\n\n[[public_link]]\n\n{{page>public}}", 'Test parent created');
+ saveWikiText('child', "[[foo:private]]", 'Test child created');
+ saveWikiText('public', "[[foo:public]]", 'Public page created');
+
+ idx_addPage('parent');
+ idx_addPage('child');
+ idx_addPage('public');
+
+ $this->assertEquals(array('parent', 'public'), ft_backlinks('foo:public'));
+ $this->assertEquals(array('child'), ft_backlinks('foo:private'));
+ $this->assertEquals(array('parent'), ft_backlinks('public_link'));
+ }
+}
+
diff --git a/platform/www/lib/plugins/include/action.php b/platform/www/lib/plugins/include/action.php
new file mode 100644
index 0000000..b5388ba
--- /dev/null
+++ b/platform/www/lib/plugins/include/action.php
@@ -0,0 +1,370 @@
+<?php
+/**
+ * Include Plugin: Display a wiki page within another wiki page
+ *
+ * Action plugin component, for cache validity determination
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Christopher Smith <chris@jalakai.co.uk>
+ * @author Michael Klier <chi@chimeric.de>
+ */
+
+/**
+ * All DokuWiki plugins to extend the parser/rendering mechanism
+ * need to inherit from this class
+ */
+class action_plugin_include extends DokuWiki_Action_Plugin {
+
+ /* @var helper_plugin_include $helper */
+ var $helper = null;
+
+ function __construct() {
+ $this->helper = plugin_load('helper', 'include');
+ }
+
+ /**
+ * plugin should use this method to register its handlers with the dokuwiki's event controller
+ */
+ function register(Doku_Event_Handler $controller) {
+ /* @var Doku_event_handler $controller */
+ $controller->register_hook('INDEXER_PAGE_ADD', 'BEFORE', $this, 'handle_indexer');
+ $controller->register_hook('INDEXER_VERSION_GET', 'BEFORE', $this, 'handle_indexer_version');
+ $controller->register_hook('PARSER_CACHE_USE','BEFORE', $this, '_cache_prepare');
+ $controller->register_hook('HTML_EDITFORM_OUTPUT', 'BEFORE', $this, 'handle_form'); // todo remove
+ $controller->register_hook('FORM_EDIT_OUTPUT', 'BEFORE', $this, 'handle_form');
+ $controller->register_hook('HTML_CONFLICTFORM_OUTPUT', 'BEFORE', $this, 'handle_form'); // todo remove
+ $controller->register_hook('FORM_CONFLICT_OUTPUT', 'BEFORE', $this, 'handle_form');
+ $controller->register_hook('HTML_DRAFTFORM_OUTPUT', 'BEFORE', $this, 'handle_form'); // todo remove
+ $controller->register_hook('FORM_DRAFT_OUTPUT', 'BEFORE', $this, 'handle_form');
+ $controller->register_hook('ACTION_SHOW_REDIRECT', 'BEFORE', $this, 'handle_redirect');
+ $controller->register_hook('PARSER_HANDLER_DONE', 'BEFORE', $this, 'handle_parser');
+ $controller->register_hook('PARSER_METADATA_RENDER', 'AFTER', $this, 'handle_metadata');
+ $controller->register_hook('HTML_SECEDIT_BUTTON', 'BEFORE', $this, 'handle_secedit_button');
+ $controller->register_hook('PLUGIN_MOVE_HANDLERS_REGISTER', 'BEFORE', $this, 'handle_move_register');
+ }
+
+ /**
+ * Add a version string to the index so it is rebuilt
+ * whenever the handler is updated or the safeindex setting is changed
+ */
+ public function handle_indexer_version($event, $param) {
+ $event->data['plugin_include'] = '0.1.safeindex='.$this->getConf('safeindex');
+ }
+
+ /**
+ * Handles the INDEXER_PAGE_ADD event, prevents indexing of metadata from included pages that aren't public if enabled
+ *
+ * @param Doku_Event $event the event object
+ * @param array $params optional parameters (unused)
+ */
+ public function handle_indexer(Doku_Event $event, $params) {
+ global $USERINFO;
+
+ // check if the feature is enabled at all
+ if (!$this->getConf('safeindex')) return;
+
+ // is there a user logged in at all? If not everything is fine already
+ if (is_null($USERINFO) && !isset($_SERVER['REMOTE_USER'])) return;
+
+ // get the include metadata in order to see which pages were included
+ $inclmeta = p_get_metadata($event->data['page'], 'plugin_include', METADATA_RENDER_UNLIMITED);
+ $all_public = true; // are all included pages public?
+ // check if the current metadata indicates that non-public pages were included
+ if ($inclmeta !== null && isset($inclmeta['pages'])) {
+ foreach ($inclmeta['pages'] as $page) {
+ if (auth_aclcheck($page['id'], '', array()) < AUTH_READ) { // is $page public?
+ $all_public = false;
+ break;
+ }
+ }
+ }
+
+ if (!$all_public) { // there were non-public pages included - action required!
+ // backup the user information
+ $userinfo_backup = $USERINFO;
+ $remote_user = $_SERVER['REMOTE_USER'];
+ // unset user information - temporary logoff!
+ $USERINFO = null;
+ unset($_SERVER['REMOTE_USER']);
+
+ // metadata is only rendered once for a page in one request - thus we need to render manually.
+ $meta = p_read_metadata($event->data['page']); // load the original metdata
+ $meta = p_render_metadata($event->data['page'], $meta); // render the metadata
+ p_save_metadata($event->data['page'], $meta); // save the metadata so other event handlers get the public metadata, too
+
+ $meta = $meta['current']; // we are only interested in current metadata.
+
+ // check if the tag plugin handler has already been called before the include plugin
+ $tag_called = isset($event->data['metadata']['subject']);
+
+ // Reset the metadata in the renderer. This removes data from all other event handlers, but we need to be on the safe side here.
+ $event->data['metadata'] = array('title' => $meta['title']);
+
+ // restore the relation references metadata
+ if (isset($meta['relation']['references'])) {
+ $event->data['metadata']['relation_references'] = array_keys($meta['relation']['references']);
+ } else {
+ $event->data['metadata']['relation_references'] = array();
+ }
+
+ // restore the tag metadata if the tag plugin handler has been called before the include plugin handler.
+ if ($tag_called) {
+ $tag_helper = $this->loadHelper('tag', false);
+ if ($tag_helper) {
+ if (isset($meta['subject'])) {
+ $event->data['metadata']['subject'] = $tag_helper->_cleanTagList($meta['subject']);
+ } else {
+ $event->data['metadata']['subject'] = array();
+ }
+ }
+ }
+
+ // restore user information
+ $USERINFO = $userinfo_backup;
+ $_SERVER['REMOTE_USER'] = $remote_user;
+ }
+ }
+
+ /**
+ * Used for debugging purposes only
+ */
+ function handle_metadata(&$event, $param) {
+ global $conf;
+ if($conf['allowdebug'] && $this->getConf('debugoutput')) {
+ dbglog('---- PLUGIN INCLUDE META DATA START ----');
+ dbglog($event->data);
+ dbglog('---- PLUGIN INCLUDE META DATA END ----');
+ }
+ }
+
+ /**
+ * Supplies the current section level to the include syntax plugin
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ * @author Michael Hamann <michael@content-space.de>
+ */
+ function handle_parser(Doku_Event $event, $param) {
+ global $ID;
+
+ $level = 0;
+ $ins =& $event->data->calls;
+ $num = count($ins);
+ for($i=0; $i<$num; $i++) {
+ switch($ins[$i][0]) {
+ case 'plugin':
+ switch($ins[$i][1][0]) {
+ case 'include_include':
+ $ins[$i][1][1][4] = $level;
+ break;
+ /* FIXME: this doesn't work anymore that way with the new structure
+ // some plugins already close open sections
+ // so we need to make sure we don't close them twice
+ case 'box':
+ $this->helper->sec_close = false;
+ break;
+ */
+ }
+ break;
+ case 'section_open':
+ $level = $ins[$i][1][0];
+ break;
+ }
+ }
+ }
+
+ /**
+ * Add a hidden input to the form to preserve the redirect_id
+ */
+ function handle_form(Doku_Event $event, $param)
+ {
+ if (!array_key_exists('redirect_id', $_REQUEST)) return;
+
+ if(is_a($event->data, \dokuwiki\Form\Form::class)) {
+ $event->data->setHiddenField('redirect_id', cleanID($_REQUEST['redirect_id']));
+ } else {
+ // todo remove when old FORM events are no longer supported
+ $event->data->addHidden('redirect_id', cleanID($_REQUEST['redirect_id']));
+ }
+ }
+
+ /**
+ * Modify the data for the redirect when there is a redirect_id set
+ */
+ function handle_redirect(Doku_Event &$event, $param) {
+ if (array_key_exists('redirect_id', $_REQUEST)) {
+ // Render metadata when this is an older DokuWiki version where
+ // metadata is not automatically re-rendered as the page has probably
+ // been changed but is not directly displayed
+ $versionData = getVersionData();
+ if ($versionData['date'] < '2010-11-23') {
+ p_set_metadata($event->data['id'], array(), true);
+ }
+ $event->data['id'] = cleanID($_REQUEST['redirect_id']);
+ $event->data['title'] = '';
+ }
+ }
+
+ /**
+ * prepare the cache object for default _useCache action
+ */
+ function _cache_prepare(Doku_Event &$event, $param) {
+ global $conf;
+
+ /* @var cache_renderer $cache */
+ $cache =& $event->data;
+
+ if(!isset($cache->page)) return;
+ if(!isset($cache->mode) || $cache->mode == 'i') return;
+
+ $depends = p_get_metadata($cache->page, 'plugin_include');
+
+ if($conf['allowdebug'] && $this->getConf('debugoutput')) {
+ dbglog('---- PLUGIN INCLUDE CACHE DEPENDS START ----');
+ dbglog($depends);
+ dbglog('---- PLUGIN INCLUDE CACHE DEPENDS END ----');
+ }
+
+ if (!is_array($depends)) return; // nothing to do for us
+
+ if (!is_array($depends['pages']) ||
+ !is_array($depends['instructions']) ||
+ $depends['pages'] != $this->helper->_get_included_pages_from_meta_instructions($depends['instructions']) ||
+ // the include_content url parameter may change the behavior for included pages
+ $depends['include_content'] != isset($_REQUEST['include_content'])) {
+
+ $cache->depends['purge'] = true; // included pages changed or old metadata - request purge.
+ if($conf['allowdebug'] && $this->getConf('debugoutput')) {
+ dbglog('---- PLUGIN INCLUDE: REQUESTING CACHE PURGE ----');
+ dbglog('---- PLUGIN INCLUDE CACHE PAGES FROM META START ----');
+ dbglog($depends['pages']);
+ dbglog('---- PLUGIN INCLUDE CACHE PAGES FROM META END ----');
+ dbglog('---- PLUGIN INCLUDE CACHE PAGES FROM META_INSTRUCTIONS START ----');
+ dbglog($this->helper->_get_included_pages_from_meta_instructions($depends['instructions']));
+ dbglog('---- PLUGIN INCLUDE CACHE PAGES FROM META_INSTRUCTIONS END ----');
+
+ }
+ } else {
+ // add plugin.info.txt to depends for nicer upgrades
+ $cache->depends['files'][] = dirname(__FILE__) . '/plugin.info.txt';
+ foreach ($depends['pages'] as $page) {
+ if (!$page['exists']) continue;
+ $file = wikiFN($page['id']);
+ if (!in_array($file, $cache->depends['files'])) {
+ $cache->depends['files'][] = $file;
+ }
+ }
+ }
+ }
+
+ /**
+ * Handle special section edit buttons for the include plugin to get the current page
+ * and replace normal section edit buttons when the current page is different from the
+ * global $ID.
+ */
+ function handle_secedit_button(Doku_Event &$event, $params) {
+ // stack of included pages in the form ('id' => page, 'rev' => modification time, 'writable' => bool)
+ static $page_stack = array();
+
+ global $ID, $lang;
+
+ $data = $event->data;
+
+ if ($data['target'] == 'plugin_include_start' || $data['target'] == 'plugin_include_start_noredirect') {
+ // handle the "section edits" added by the include plugin
+ $fn = wikiFN($data['name']);
+ $perm = auth_quickaclcheck($data['name']);
+ array_unshift($page_stack, array(
+ 'id' => $data['name'],
+ 'rev' => @filemtime($fn),
+ 'writable' => (page_exists($data['name']) ? (is_writable($fn) && $perm >= AUTH_EDIT) : $perm >= AUTH_CREATE),
+ 'redirect' => ($data['target'] == 'plugin_include_start'),
+ ));
+ } elseif ($data['target'] == 'plugin_include_end') {
+ array_shift($page_stack);
+ } elseif ($data['target'] == 'plugin_include_editbtn') {
+ if ($page_stack[0]['writable']) {
+ $params = array('do' => 'edit',
+ 'id' => $page_stack[0]['id']);
+ if ($page_stack[0]['redirect']) {
+ $params['redirect_id'] = $ID;
+ $params['hid'] = $data['hid'];
+ }
+ $event->result = '<div class="secedit">' . DOKU_LF .
+ html_btn('incledit', $page_stack[0]['id'], '',
+ $params, 'post',
+ $data['name'],
+ $lang['btn_secedit'].' ('.$page_stack[0]['id'].')') .
+ '</div>' . DOKU_LF;
+ }
+ } elseif (!empty($page_stack)) {
+
+ // Special handling for the edittable plugin
+ if ($data['target'] == 'table' && !plugin_isdisabled('edittable')) {
+ /* @var action_plugin_edittable_editor $edittable */
+ $edittable = plugin_load('action', 'edittable_editor');
+ if (is_null($edittable))
+ $edittable = plugin_load('action', 'edittable');
+ $data['name'] = $edittable->getLang('secedit_name');
+ }
+
+ if ($page_stack[0]['writable'] && isset($data['name']) && $data['name'] !== '') {
+ $name = $data['name'];
+ unset($data['name']);
+
+ $secid = $data['secid'];
+ unset($data['secid']);
+
+ if ($page_stack[0]['redirect'])
+ $data['redirect_id'] = $ID;
+
+ $event->result = "<div class='secedit editbutton_" . $data['target'] .
+ " editbutton_" . $secid . "'>" .
+ html_btn('secedit', $page_stack[0]['id'], '',
+ array_merge(array('do' => 'edit',
+ 'rev' => $page_stack[0]['rev'],
+ 'summary' => '['.$name.'] '), $data),
+ 'post', $name) . '</div>';
+ } else {
+ $event->result = '';
+ }
+ } else {
+ return; // return so the event won't be stopped
+ }
+
+ $event->preventDefault();
+ $event->stopPropagation();
+ }
+
+ public function handle_move_register(Doku_Event $event, $params) {
+ $event->data['handlers']['include_include'] = array($this, 'rewrite_include');
+ }
+
+ public function rewrite_include($match, $pos, $state, $plugin, helper_plugin_move_handler $handler) {
+ $syntax = substr($match, 2, -2); // strip markup
+ $replacers = explode('|', $syntax);
+ $syntax = array_shift($replacers);
+ list($syntax, $flags) = array_pad(explode('&', $syntax, 2), 2, "");
+
+ // break the pattern up into its parts
+ list($mode, $page, $sect) = array_pad(preg_split('/>|#/u', $syntax, 3), 3, "");
+
+ if (method_exists($handler, 'adaptRelativeId')) { // move plugin before version 2015-05-16
+ $newpage = $handler->adaptRelativeId($page);
+ } else {
+ $newpage = $handler->resolveMoves($page, 'page');
+ $newpage = $handler->relativeLink($page, $newpage, 'page');
+ }
+
+ if ($newpage == $page) {
+ return $match;
+ } else {
+ $result = '{{'.$mode.'>'.$newpage;
+ if ($sect) $result .= '#'.$sect;
+ if ($flags) $result .= '&'.$flags;
+ if ($replacers) $result .= '|'.$replacers;
+ $result .= '}}';
+ return $result;
+ }
+ }
+}
+// vim:ts=4:sw=4:et:
diff --git a/platform/www/lib/plugins/include/conf/default.php b/platform/www/lib/plugins/include/conf/default.php
new file mode 100644
index 0000000..c619005
--- /dev/null
+++ b/platform/www/lib/plugins/include/conf/default.php
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Options for the Include Plugin
+ */
+$conf['noheader'] = 0; // Don't display the header of the inserted section
+$conf['firstseconly'] = 0; // limit entries on main blog page to first section
+$conf['showtaglogos'] = 0; // display image for first tag
+$conf['showfooter'] = 1; // display meta line below blog entries
+$conf['showlink'] = 0; // link headlines of blog entries
+$conf['showpermalink'] = 0; // show permalink below blog entries
+$conf['showdate'] = 1; // show date below blog entries
+$conf['showmdate'] = 0; // show modification date below blog entries
+$conf['showuser'] = 1; // show username below blog entries
+$conf['showcomments'] = 1; // show number of comments below blog entries
+$conf['showlinkbacks'] = 1; // show number of linkbacks below blog entries
+$conf['showtags'] = 1; // show tags below blog entries
+$conf['showeditbtn'] = 1; // show the edit button
+$conf['doredirect'] = 1; // redirect back to original page after an edit
+$conf['doindent'] = 1; // indent included pages relative to the page they get included
+$conf['linkonly'] = 0; // link only to the included pages instead of including the content
+$conf['title'] = 0; // use first header of page in link
+$conf['pageexists'] = 0; // no link if page does not exist
+$conf['parlink'] = 1; // paragraph around link
+$conf['safeindex'] = 1; // prevent indexing of protected metadata
+$conf['order'] = 'id'; // order in which the pages are included in the case of multiple pages
+$conf['rsort'] = 0; // reverse sort order
+$conf['depth'] = 1; // maximum depth of namespace includes, 0 for unlimited depth
+$conf['readmore'] = 1; // Show readmore link in case of firstsection only
+$conf['debugoutput'] = 0; // print debug information to debuglog if global allowdebug is enabled
+//Setup VIM: ex: et ts=2 :
diff --git a/platform/www/lib/plugins/include/conf/metadata.php b/platform/www/lib/plugins/include/conf/metadata.php
new file mode 100644
index 0000000..a0fa7b1
--- /dev/null
+++ b/platform/www/lib/plugins/include/conf/metadata.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Metadata for configuration manager plugin
+ * Additions for the Include Plugin
+ *
+ * @author Esther Brunner <wikidesign@gmail.com>
+ */
+$meta['noheader'] = array('onoff');
+$meta['firstseconly'] = array('onoff');
+$meta['showtaglogos'] = array('onoff');
+$meta['showlink'] = array('onoff');
+$meta['showfooter'] = array('onoff');
+$meta['showpermalink'] = array('onoff');
+$meta['showdate'] = array('onoff');
+$meta['showmdate'] = array('onoff');
+$meta['showuser'] = array('onoff');
+$meta['showcomments'] = array('onoff');
+$meta['showlinkbacks'] = array('onoff');
+$meta['showtags'] = array('onoff');
+$meta['showeditbtn'] = array('onoff');
+$meta['doredirect'] = array('onoff');
+$meta['doindent'] = array('onoff');
+$meta['linkonly'] = array('onoff');
+$meta['title'] = array('onoff');
+$meta['pageexists'] = array('onoff');
+$meta['parlink'] = array('onoff');
+$meta['safeindex'] = array('onoff');
+$meta['order'] = array('multichoice', '_choices' => array('id', 'title', 'created', 'modified', 'indexmenu', 'custom'));
+$meta['rsort'] = array('onoff');
+$meta['depth'] = array('numeric', '_min' => 0);
+$meta['readmore'] = array('onoff');
+$meta['debugoutput'] = array('onoff');
+//Setup VIM: ex: et ts=2 :
diff --git a/platform/www/lib/plugins/include/deleted.files b/platform/www/lib/plugins/include/deleted.files
new file mode 100644
index 0000000..518236e
--- /dev/null
+++ b/platform/www/lib/plugins/include/deleted.files
@@ -0,0 +1,13 @@
+.travis.yaml
+lang/sl-si/lang.php
+lang/sl-si/settings.php
+_test/editx_support.test.php
+_test/include.group.php
+syntax/close_last_secedit.php
+syntax/div.php
+syntax/meta.php
+VERSION
+syntax.php
+images/tag.gif
+inc/include.php
+.travis.yml
diff --git a/platform/www/lib/plugins/include/helper.php b/platform/www/lib/plugins/include/helper.php
new file mode 100644
index 0000000..ebde44f
--- /dev/null
+++ b/platform/www/lib/plugins/include/helper.php
@@ -0,0 +1,941 @@
+<?php
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Esther Brunner <wikidesign@gmail.com>
+ * @author Christopher Smith <chris@jalakai.co.uk>
+ * @author Gina Häußge, Michael Klier <dokuwiki@chimeric.de>
+ * @author Michael Hamann <michael@content-space.de>
+ */
+
+/**
+ * Helper functions for the include plugin and other plugins that want to include pages.
+ */
+class helper_plugin_include extends DokuWiki_Plugin { // DokuWiki_Helper_Plugin
+
+ var $defaults = array();
+ var $sec_close = true;
+ /** @var helper_plugin_tag $taghelper */
+ var $taghelper = null;
+ var $includes = array(); // deprecated - compatibility code for the blog plugin
+
+ /**
+ * Constructor loads default config settings once
+ */
+ function __construct() {
+ $this->defaults['noheader'] = $this->getConf('noheader');
+ $this->defaults['firstsec'] = $this->getConf('firstseconly');
+ $this->defaults['editbtn'] = $this->getConf('showeditbtn');
+ $this->defaults['taglogos'] = $this->getConf('showtaglogos');
+ $this->defaults['footer'] = $this->getConf('showfooter');
+ $this->defaults['redirect'] = $this->getConf('doredirect');
+ $this->defaults['date'] = $this->getConf('showdate');
+ $this->defaults['mdate'] = $this->getConf('showmdate');
+ $this->defaults['user'] = $this->getConf('showuser');
+ $this->defaults['comments'] = $this->getConf('showcomments');
+ $this->defaults['linkbacks'] = $this->getConf('showlinkbacks');
+ $this->defaults['tags'] = $this->getConf('showtags');
+ $this->defaults['link'] = $this->getConf('showlink');
+ $this->defaults['permalink'] = $this->getConf('showpermalink');
+ $this->defaults['indent'] = $this->getConf('doindent');
+ $this->defaults['linkonly'] = $this->getConf('linkonly');
+ $this->defaults['title'] = $this->getConf('title');
+ $this->defaults['pageexists'] = $this->getConf('pageexists');
+ $this->defaults['parlink'] = $this->getConf('parlink');
+ $this->defaults['inline'] = false;
+ $this->defaults['order'] = $this->getConf('order');
+ $this->defaults['rsort'] = $this->getConf('rsort');
+ $this->defaults['depth'] = $this->getConf('depth');
+ $this->defaults['readmore'] = $this->getConf('readmore');
+ }
+
+ /**
+ * Available methods for other plugins
+ */
+ function getMethods() {
+ $result = array();
+ $result[] = array(
+ 'name' => 'get_flags',
+ 'desc' => 'overrides standard values for showfooter and firstseconly settings',
+ 'params' => array('flags' => 'array'),
+ );
+ return $result;
+ }
+
+ /**
+ * Overrides standard values for showfooter and firstseconly settings
+ */
+ function get_flags($setflags) {
+ // load defaults
+ $flags = $this->defaults;
+ foreach ($setflags as $flag) {
+ $value = '';
+ if (strpos($flag, '=') !== false) {
+ list($flag, $value) = explode('=', $flag, 2);
+ }
+ switch ($flag) {
+ case 'footer':
+ $flags['footer'] = 1;
+ break;
+ case 'nofooter':
+ $flags['footer'] = 0;
+ break;
+ case 'firstseconly':
+ case 'firstsectiononly':
+ $flags['firstsec'] = 1;
+ break;
+ case 'fullpage':
+ $flags['firstsec'] = 0;
+ break;
+ case 'showheader':
+ case 'header':
+ $flags['noheader'] = 0;
+ break;
+ case 'noheader':
+ $flags['noheader'] = 1;
+ break;
+ case 'editbtn':
+ case 'editbutton':
+ $flags['editbtn'] = 1;
+ break;
+ case 'noeditbtn':
+ case 'noeditbutton':
+ $flags['editbtn'] = 0;
+ break;
+ case 'permalink':
+ $flags['permalink'] = 1;
+ break;
+ case 'nopermalink':
+ $flags['permalink'] = 0;
+ break;
+ case 'redirect':
+ $flags['redirect'] = 1;
+ break;
+ case 'noredirect':
+ $flags['redirect'] = 0;
+ break;
+ case 'link':
+ $flags['link'] = 1;
+ break;
+ case 'nolink':
+ $flags['link'] = 0;
+ break;
+ case 'user':
+ $flags['user'] = 1;
+ break;
+ case 'nouser':
+ $flags['user'] = 0;
+ break;
+ case 'comments':
+ $flags['comments'] = 1;
+ break;
+ case 'nocomments':
+ $flags['comments'] = 0;
+ break;
+ case 'linkbacks':
+ $flags['linkbacks'] = 1;
+ break;
+ case 'nolinkbacks':
+ $flags['linkbacks'] = 0;
+ break;
+ case 'tags':
+ $flags['tags'] = 1;
+ break;
+ case 'notags':
+ $flags['tags'] = 0;
+ break;
+ case 'date':
+ $flags['date'] = 1;
+ break;
+ case 'nodate':
+ $flags['date'] = 0;
+ break;
+ case 'mdate':
+ $flags['mdate'] = 1;
+ break;
+ case 'nomdate':
+ $flags['mdate'] = 0;
+ break;
+ case 'indent':
+ $flags['indent'] = 1;
+ break;
+ case 'noindent':
+ $flags['indent'] = 0;
+ break;
+ case 'linkonly':
+ $flags['linkonly'] = 1;
+ break;
+ case 'nolinkonly':
+ case 'include_content':
+ $flags['linkonly'] = 0;
+ break;
+ case 'inline':
+ $flags['inline'] = 1;
+ break;
+ case 'title':
+ $flags['title'] = 1;
+ break;
+ case 'notitle':
+ $flags['title'] = 0;
+ break;
+ case 'pageexists':
+ $flags['pageexists'] = 1;
+ break;
+ case 'nopageexists':
+ $flags['pageexists'] = 0;
+ break;
+ case 'existlink':
+ $flags['pageexists'] = 1;
+ $flags['linkonly'] = 1;
+ break;
+ case 'parlink':
+ $flags['parlink'] = 1;
+ break;
+ case 'noparlink':
+ $flags['parlink'] = 0;
+ break;
+ case 'order':
+ $flags['order'] = $value;
+ break;
+ case 'sort':
+ $flags['rsort'] = 0;
+ break;
+ case 'rsort':
+ $flags['rsort'] = 1;
+ break;
+ case 'depth':
+ $flags['depth'] = max(intval($value), 0);
+ break;
+ case 'beforeeach':
+ $flags['beforeeach'] = $value;
+ break;
+ case 'aftereach':
+ $flags['aftereach'] = $value;
+ break;
+ case 'readmore':
+ $flags['readmore'] = 1;
+ break;
+ case 'noreadmore':
+ $flags['readmore'] = 0;
+ break;
+ case 'exclude':
+ $flags['exclude'] = $value;
+ break;
+ }
+ }
+ // the include_content URL parameter overrides flags
+ if (isset($_REQUEST['include_content']))
+ $flags['linkonly'] = 0;
+ return $flags;
+ }
+
+ /**
+ * Returns the converted instructions of a give page/section
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ * @author Michael Hamann <michael@content-space.de>
+ */
+ function _get_instructions($page, $sect, $mode, $lvl, $flags, $root_id = null, $included_pages = array()) {
+ $key = ($sect) ? $page . '#' . $sect : $page;
+ $this->includes[$key] = true; // legacy code for keeping compatibility with other plugins
+
+ // keep compatibility with other plugins that don't know the $root_id parameter
+ if (is_null($root_id)) {
+ global $ID;
+ $root_id = $ID;
+ }
+
+ if ($flags['linkonly']) {
+ if (page_exists($page) || $flags['pageexists'] == 0) {
+ $title = '';
+ if ($flags['title'])
+ $title = p_get_first_heading($page);
+ if($flags['parlink']) {
+ $ins = array(
+ array('p_open', array()),
+ array('internallink', array(':'.$key, $title)),
+ array('p_close', array()),
+ );
+ } else {
+ $ins = array(array('internallink', array(':'.$key,$title)));
+ }
+ }else {
+ $ins = array();
+ }
+ } else {
+ if (page_exists($page)) {
+ global $ID;
+ $backupID = $ID;
+ $ID = $page; // Change the global $ID as otherwise plugins like the discussion plugin will save data for the wrong page
+ $ins = p_cached_instructions(wikiFN($page), false, $page);
+ $ID = $backupID;
+ } else {
+ $ins = array();
+ }
+
+ $this->_convert_instructions($ins, $lvl, $page, $sect, $flags, $root_id, $included_pages);
+ }
+ return $ins;
+ }
+
+ /**
+ * Converts instructions of the included page
+ *
+ * The funcion iterates over the given list of instructions and generates
+ * an index of header and section indicies. It also removes document
+ * start/end instructions, converts links, and removes unwanted
+ * instructions like tags, comments, linkbacks.
+ *
+ * Later all header/section levels are convertet to match the current
+ * inclusion level.
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ */
+ function _convert_instructions(&$ins, $lvl, $page, $sect, $flags, $root_id, $included_pages = array()) {
+ global $conf;
+
+ // filter instructions if needed
+ if(!empty($sect)) {
+ $this->_get_section($ins, $sect); // section required
+ }
+
+ if($flags['firstsec']) {
+ $this->_get_firstsec($ins, $page, $flags); // only first section
+ }
+
+ $ns = getNS($page);
+ $num = count($ins);
+
+ $conv_idx = array(); // conversion index
+ $lvl_max = false; // max level
+ $first_header = -1;
+ $no_header = false;
+ $sect_title = false;
+ $endpos = null; // end position of the raw wiki text
+
+ $this->adapt_links($ins, $page, $included_pages);
+
+ for($i=0; $i<$num; $i++) {
+ switch($ins[$i][0]) {
+ case 'document_start':
+ case 'document_end':
+ case 'section_edit':
+ unset($ins[$i]);
+ break;
+ case 'header':
+ // get section title of first section
+ if($sect && !$sect_title) {
+ $sect_title = $ins[$i][1][0];
+ }
+ // check if we need to skip the first header
+ if((!$no_header) && $flags['noheader']) {
+ $no_header = true;
+ }
+
+ $conv_idx[] = $i;
+ // get index of first header
+ if($first_header == -1) $first_header = $i;
+ // get max level of this instructions set
+ if(!$lvl_max || ($ins[$i][1][1] < $lvl_max)) {
+ $lvl_max = $ins[$i][1][1];
+ }
+ break;
+ case 'section_open':
+ if ($flags['inline'])
+ unset($ins[$i]);
+ else
+ $conv_idx[] = $i;
+ break;
+ case 'section_close':
+ if ($flags['inline'])
+ unset($ins[$i]);
+ break;
+ case 'nest':
+ $this->adapt_links($ins[$i][1][0], $page, $included_pages);
+ break;
+ case 'plugin':
+ // FIXME skip other plugins?
+ switch($ins[$i][1][0]) {
+ case 'tag_tag': // skip tags
+ case 'discussion_comments': // skip comments
+ case 'linkback': // skip linkbacks
+ case 'data_entry': // skip data plugin
+ case 'meta': // skip meta plugin
+ case 'indexmenu_tag': // skip indexmenu sort tag
+ case 'include_sorttag': // skip include plugin sort tag
+ unset($ins[$i]);
+ break;
+ // adapt indentation level of nested includes
+ case 'include_include':
+ if (!$flags['inline'] && $flags['indent'])
+ $ins[$i][1][1][4] += $lvl;
+ break;
+ /*
+ * if there is already a closelastsecedit instruction (was added by one of the section
+ * functions), store its position but delete it as it can't be determined yet if it is needed,
+ * i.e. if there is a header which generates a section edit (depends on the levels, level
+ * adjustments, $no_header, ...)
+ */
+ case 'include_closelastsecedit':
+ $endpos = $ins[$i][1][1][0];
+ unset($ins[$i]);
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ // calculate difference between header/section level and include level
+ $diff = 0;
+ if (!isset($lvl_max)) $lvl_max = 0; // if no level found in target, set to 0
+ $diff = $lvl - $lvl_max + 1;
+ if ($no_header) $diff -= 1; // push up one level if "noheader"
+
+ // convert headers and set footer/permalink
+ $hdr_deleted = false;
+ $has_permalink = false;
+ $footer_lvl = false;
+ $contains_secedit = false;
+ $section_close_at = false;
+ foreach($conv_idx as $idx) {
+ if($ins[$idx][0] == 'header') {
+ if ($section_close_at === false && isset($ins[$idx+1]) && $ins[$idx+1][0] == 'section_open') {
+ // store the index of the first heading that is followed by a new section
+ // the wrap plugin creates sections without section_open so the section shouldn't be closed before them
+ $section_close_at = $idx;
+ }
+
+ if($no_header && !$hdr_deleted) {
+ unset ($ins[$idx]);
+ $hdr_deleted = true;
+ continue;
+ }
+
+ if($flags['indent']) {
+ $lvl_new = (($ins[$idx][1][1] + $diff) > 5) ? 5 : ($ins[$idx][1][1] + $diff);
+ $ins[$idx][1][1] = $lvl_new;
+ }
+
+ if($ins[$idx][1][1] <= $conf['maxseclevel'])
+ $contains_secedit = true;
+
+ // set permalink
+ if($flags['link'] && !$has_permalink && ($idx == $first_header)) {
+ $this->_permalink($ins[$idx], $page, $sect, $flags);
+ $has_permalink = true;
+ }
+
+ // set footer level
+ if(!$footer_lvl && ($idx == $first_header) && !$no_header) {
+ if($flags['indent'] && isset($lvl_new)) {
+ $footer_lvl = $lvl_new;
+ } else {
+ $footer_lvl = $lvl_max;
+ }
+ }
+ } else {
+ // it's a section
+ if($flags['indent']) {
+ $lvl_new = (($ins[$idx][1][0] + $diff) > 5) ? 5 : ($ins[$idx][1][0] + $diff);
+ $ins[$idx][1][0] = $lvl_new;
+ }
+
+ // check if noheader is used and set the footer level to the first section
+ if($no_header && !$footer_lvl) {
+ if($flags['indent'] && isset($lvl_new)) {
+ $footer_lvl = $lvl_new;
+ } else {
+ $footer_lvl = $lvl_max;
+ }
+ }
+ }
+ }
+
+ // close last open section of the included page if there is any
+ if ($contains_secedit) {
+ array_push($ins, array('plugin', array('include_closelastsecedit', array($endpos))));
+ }
+
+ $include_secid = (isset($flags['include_secid']) ? $flags['include_secid'] : NULL);
+
+ // add edit button
+ if($flags['editbtn']) {
+ $this->_editbtn($ins, $page, $sect, $sect_title, ($flags['redirect'] ? $root_id : false), $include_secid);
+ }
+
+ // add footer
+ if($flags['footer']) {
+ $ins[] = $this->_footer($page, $sect, $sect_title, $flags, $footer_lvl, $root_id);
+ }
+
+ // wrap content at the beginning of the include that is not in a section in a section
+ if ($lvl > 0 && $section_close_at !== 0 && $flags['indent'] && !$flags['inline']) {
+ if ($section_close_at === false) {
+ $ins[] = array('section_close', array());
+ array_unshift($ins, array('section_open', array($lvl)));
+ } else {
+ $section_close_idx = array_search($section_close_at, array_keys($ins));
+ if ($section_close_idx > 0) {
+ $before_ins = array_slice($ins, 0, $section_close_idx);
+ $after_ins = array_slice($ins, $section_close_idx);
+ $ins = array_merge($before_ins, array(array('section_close', array())), $after_ins);
+ array_unshift($ins, array('section_open', array($lvl)));
+ }
+ }
+ }
+
+ // add instructions entry wrapper
+ array_unshift($ins, array('plugin', array('include_wrap', array('open', $page, $flags['redirect'], $include_secid))));
+ if (isset($flags['beforeeach']))
+ array_unshift($ins, array('entity', array($flags['beforeeach'])));
+ array_push($ins, array('plugin', array('include_wrap', array('close'))));
+ if (isset($flags['aftereach']))
+ array_push($ins, array('entity', array($flags['aftereach'])));
+
+ // close previous section if any and re-open after inclusion
+ if($lvl != 0 && $this->sec_close && !$flags['inline']) {
+ array_unshift($ins, array('section_close', array()));
+ $ins[] = array('section_open', array($lvl));
+ }
+ }
+
+ /**
+ * Appends instruction item for the include plugin footer
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ */
+ function _footer($page, $sect, $sect_title, $flags, $footer_lvl, $root_id) {
+ $footer = array();
+ $footer[0] = 'plugin';
+ $footer[1] = array('include_footer', array($page, $sect, $sect_title, $flags, $root_id, $footer_lvl));
+ return $footer;
+ }
+
+ /**
+ * Appends instruction item for an edit button
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ */
+ function _editbtn(&$ins, $page, $sect, $sect_title, $root_id, $hid = '') {
+ $title = ($sect) ? $sect_title : $page;
+ $editbtn = array();
+ $editbtn[0] = 'plugin';
+ $editbtn[1] = array('include_editbtn', array($title, $hid));
+ $ins[] = $editbtn;
+ }
+
+ /**
+ * Convert instruction item for a permalink header
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ */
+ function _permalink(&$ins, $page, $sect, $flags) {
+ $ins[0] = 'plugin';
+ $ins[1] = array('include_header', array($ins[1][0], $ins[1][1], $ins[1][2], $page, $sect, $flags));
+ }
+
+ /**
+ * Convert internal and local links depending on the included pages
+ *
+ * @param array $ins The instructions that shall be adapted
+ * @param string $page The included page
+ * @param array $included_pages The array of pages that are included
+ */
+ private function adapt_links(&$ins, $page, $included_pages = null) {
+ $num = count($ins);
+ $ns = getNS($page);
+
+ for($i=0; $i<$num; $i++) {
+ // adjust links with image titles
+ if (strpos($ins[$i][0], 'link') !== false && isset($ins[$i][1][1]) && is_array($ins[$i][1][1]) && $ins[$i][1][1]['type'] == 'internalmedia') {
+ // resolve relative ids, but without cleaning in order to preserve the name
+ $media_id = resolve_id($ns, $ins[$i][1][1]['src']);
+ // make sure that after resolving the link again it will be the same link
+ if ($media_id[0] != ':') $media_id = ':'.$media_id;
+ $ins[$i][1][1]['src'] = $media_id;
+ }
+ switch($ins[$i][0]) {
+ case 'internallink':
+ case 'internalmedia':
+ // make sure parameters aren't touched
+ $link_params = '';
+ $link_id = $ins[$i][1][0];
+ $link_parts = explode('?', $link_id, 2);
+ if (count($link_parts) === 2) {
+ $link_id = $link_parts[0];
+ $link_params = $link_parts[1];
+ }
+ // resolve the id without cleaning it
+ $link_id = resolve_id($ns, $link_id, false);
+ // this id is internal (i.e. absolute) now, add ':' to make resolve_id work again
+ if ($link_id[0] != ':') $link_id = ':'.$link_id;
+ // restore parameters
+ $ins[$i][1][0] = ($link_params != '') ? $link_id.'?'.$link_params : $link_id;
+
+ if ($ins[$i][0] == 'internallink' && !empty($included_pages)) {
+ // change links to included pages into local links
+ // only adapt links without parameters
+ $link_id = $ins[$i][1][0];
+ $link_parts = explode('?', $link_id, 2);
+ if (count($link_parts) === 1) {
+ $exists = false;
+ resolve_pageid($ns, $link_id, $exists);
+
+ $link_parts = explode('#', $link_id, 2);
+ $hash = '';
+ if (count($link_parts) === 2) {
+ list($link_id, $hash) = $link_parts;
+ }
+ if (array_key_exists($link_id, $included_pages)) {
+ if ($hash) {
+ // hopefully the hash is also unique in the including page (otherwise this might be the wrong link target)
+ $ins[$i][0] = 'locallink';
+ $ins[$i][1][0] = $hash;
+ } else {
+ // the include section ids are different from normal section ids (so they won't conflict) but this
+ // also means that the normal locallink function can't be used
+ $ins[$i][0] = 'plugin';
+ $ins[$i][1] = array('include_locallink', array($included_pages[$link_id]['hid'], $ins[$i][1][1], $ins[$i][1][0]));
+ }
+ }
+ }
+ }
+ break;
+ case 'locallink':
+ /* Convert local links to internal links if the page hasn't been fully included */
+ if ($included_pages == null || !array_key_exists($page, $included_pages)) {
+ $ins[$i][0] = 'internallink';
+ $ins[$i][1][0] = ':'.$page.'#'.$ins[$i][1][0];
+ }
+ break;
+ }
+ }
+ }
+
+ /**
+ * Get a section including its subsections
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ */
+ function _get_section(&$ins, $sect) {
+ $num = count($ins);
+ $offset = false;
+ $lvl = false;
+ $end = false;
+ $endpos = null; // end position in the input text, needed for section edit buttons
+
+ $check = array(); // used for sectionID() in order to get the same ids as the xhtml renderer
+
+ for($i=0; $i<$num; $i++) {
+ if ($ins[$i][0] == 'header') {
+
+ // found the right header
+ if (sectionID($ins[$i][1][0], $check) == $sect) {
+ $offset = $i;
+ $lvl = $ins[$i][1][1];
+ } elseif ($offset && $lvl && ($ins[$i][1][1] <= $lvl)) {
+ $end = $i - $offset;
+ $endpos = $ins[$i][1][2]; // the position directly after the found section, needed for the section edit button
+ break;
+ }
+ }
+ }
+ $offset = $offset ? $offset : 0;
+ $end = $end ? $end : ($num - 1);
+ if(is_array($ins)) {
+ $ins = array_slice($ins, $offset, $end);
+ // store the end position in the include_closelastsecedit instruction so it can generate a matching button
+ $ins[] = array('plugin', array('include_closelastsecedit', array($endpos)));
+ }
+ }
+
+ /**
+ * Only display the first section of a page and a readmore link
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ */
+ function _get_firstsec(&$ins, $page, $flags) {
+ $num = count($ins);
+ $first_sect = false;
+ $endpos = null; // end position in the input text
+ for($i=0; $i<$num; $i++) {
+ if($ins[$i][0] == 'section_close') {
+ $first_sect = $i;
+ }
+ if ($ins[$i][0] == 'header') {
+ /*
+ * Store the position of the last header that is encountered. As section_close/open-instruction are
+ * always (unless some plugin modifies this) around a header instruction this means that the last
+ * position that is stored here is exactly the position of the section_close/open at which the content
+ * is truncated.
+ */
+ $endpos = $ins[$i][1][2];
+ }
+ // only truncate the content and add the read more link when there is really
+ // more than that first section
+ if(($first_sect) && ($ins[$i][0] == 'section_open')) {
+ $ins = array_slice($ins, 0, $first_sect);
+ if ($flags['readmore']) {
+ $ins[] = array('plugin', array('include_readmore', array($page)));
+ }
+ $ins[] = array('section_close', array());
+ // store the end position in the include_closelastsecedit instruction so it can generate a matching button
+ $ins[] = array('plugin', array('include_closelastsecedit', array($endpos)));
+ return;
+ }
+ }
+ }
+
+ /**
+ * Gives a list of pages for a given include statement
+ *
+ * @author Michael Hamann <michael@content-space.de>
+ */
+ function _get_included_pages($mode, $page, $sect, $parent_id, $flags) {
+ global $conf;
+ $pages = array();
+ switch($mode) {
+ case 'namespace':
+ $page = cleanID($page);
+ $ns = utf8_encodeFN(str_replace(':', '/', $page));
+ // depth is absolute depth, not relative depth, but 0 has a special meaning.
+ $depth = $flags['depth'] ? $flags['depth'] + substr_count($page, ':') + ($page ? 1 : 0) : 0;
+ search($pagearrays, $conf['datadir'], 'search_allpages', array('depth' => $depth, 'skipacl' => false), $ns);
+ if (is_array($pagearrays)) {
+ foreach ($pagearrays as $pagearray) {
+ if (!isHiddenPage($pagearray['id'])) // skip hidden pages
+ $pages[] = $pagearray['id'];
+ }
+ }
+ break;
+ case 'tagtopic':
+ if (!$this->taghelper)
+ $this->taghelper = plugin_load('helper', 'tag');
+ if(!$this->taghelper) {
+ msg('You have to install the tag plugin to use this functionality!', -1);
+ return array();
+ }
+ $tag = $page;
+ $sect = '';
+ $pagearrays = $this->taghelper->getTopic('', null, $tag);
+ foreach ($pagearrays as $pagearray) {
+ $pages[] = $pagearray['id'];
+ }
+ break;
+ default:
+ $page = $this->_apply_macro($page, $parent_id);
+ resolve_pageid(getNS($parent_id), $page, $exists); // resolve shortcuts and clean ID
+ if (auth_quickaclcheck($page) >= AUTH_READ)
+ $pages[] = $page;
+ }
+
+ if (isset($flags['exclude']))
+ $pages = array_filter($pages, function ($page) use ($flags) {
+ if (@preg_match($flags['exclude'], $page))
+ return FALSE;
+ return TRUE;
+ });
+
+ if (count($pages) > 1) {
+ if ($flags['order'] === 'id') {
+ if ($flags['rsort']) {
+ usort($pages, array($this, '_r_strnatcasecmp'));
+ } else {
+ natcasesort($pages);
+ }
+ } else {
+ $ordered_pages = array();
+ foreach ($pages as $page) {
+ $key = '';
+ switch ($flags['order']) {
+ case 'title':
+ $key = p_get_first_heading($page);
+ break;
+ case 'created':
+ $key = p_get_metadata($page, 'date created', METADATA_DONT_RENDER);
+ break;
+ case 'modified':
+ $key = p_get_metadata($page, 'date modified', METADATA_DONT_RENDER);
+ break;
+ case 'indexmenu':
+ $key = p_get_metadata($page, 'indexmenu_n', METADATA_RENDER_USING_SIMPLE_CACHE);
+ if ($key === null)
+ $key = '';
+ break;
+ case 'custom':
+ $key = p_get_metadata($page, 'include_n', METADATA_RENDER_USING_SIMPLE_CACHE);
+ if ($key === null)
+ $key = '';
+ break;
+ }
+ $key .= '_'.$page;
+ $ordered_pages[$key] = $page;
+ }
+ if ($flags['rsort']) {
+ uksort($ordered_pages, array($this, '_r_strnatcasecmp'));
+ } else {
+ uksort($ordered_pages, 'strnatcasecmp');
+ }
+ $pages = $ordered_pages;
+ }
+ }
+
+ $result = array();
+ foreach ($pages as $page) {
+ $exists = page_exists($page);
+ $result[] = array('id' => $page, 'exists' => $exists, 'parent_id' => $parent_id);
+ }
+ return $result;
+ }
+
+ /**
+ * String comparisons using a "natural order" algorithm in reverse order
+ *
+ * @link http://php.net/manual/en/function.strnatcmp.php
+ * @param string $a First string
+ * @param string $b Second string
+ * @return int Similar to other string comparison functions, this one returns &lt; 0 if
+ * str1 is greater than str2; &gt;
+ * 0 if str1 is lesser than
+ * str2, and 0 if they are equal.
+ */
+ function _r_strnatcasecmp($a, $b) {
+ return strnatcasecmp($b, $a);
+ }
+
+ /**
+ * This function generates the list of all included pages from a list of metadata
+ * instructions.
+ */
+ function _get_included_pages_from_meta_instructions($instructions) {
+ $pages = array();
+ foreach ($instructions as $instruction) {
+ $mode = $instruction['mode'];
+ $page = $instruction['page'];
+ $sect = $instruction['sect'];
+ $parent_id = $instruction['parent_id'];
+ $flags = $instruction['flags'];
+ $pages = array_merge($pages, $this->_get_included_pages($mode, $page, $sect, $parent_id, $flags));
+ }
+ return $pages;
+ }
+
+ /**
+ * Get wiki language from "HTTP_ACCEPT_LANGUAGE"
+ * We allow the pattern e.g. "ja,en-US;q=0.7,en;q=0.3"
+ */
+ function _get_language_of_wiki($id, $parent_id) {
+ global $conf;
+ $result = $conf['lang'];
+ if(strpos($id, '@BROWSER_LANG@') !== false){
+ $brlangp = "/([a-zA-Z]{1,8}(-[a-zA-Z]{1,8})*|\*)(;q=(0(.[0-9]{0,3})?|1(.0{0,3})?))?/";
+ if(preg_match_all(
+ $brlangp, $_SERVER["HTTP_ACCEPT_LANGUAGE"],
+ $matches, PREG_SET_ORDER
+ )){
+ $langs = array();
+ foreach($matches as $match){
+ $langname = $match[1] == '*' ? $conf['lang'] : $match[1];
+ $qvalue = $match[4] == '' ? 1.0 : $match[4];
+ $langs[$langname] = $qvalue;
+ }
+ arsort($langs);
+ foreach($langs as $lang => $langq){
+ $testpage = $this->_apply_macro(str_replace('@BROWSER_LANG@', $lang, $id), $parent_id);
+ resolve_pageid(getNS($parent_id), $testpage, $exists);
+ if($exists){
+ $result = $lang;
+ break;
+ }
+ }
+ }
+ }
+ return cleanID($result);
+ }
+
+ /**
+ * Makes user or date dependent includes possible
+ */
+ function _apply_macro($id, $parent_id) {
+ global $USERINFO;
+ /* @var Input $INPUT */
+ global $INPUT;
+
+ // The following is basicaly copied from basicinfo() because
+ // this function can be called from within pageinfo() in
+ // p_get_metadata and thus we cannot rely on $INFO being set
+ if($INPUT->server->has('REMOTE_USER')) {
+ $user = $INPUT->server->str('REMOTE_USER');
+ } else {
+ // no registered user - use IP
+ $user = clientIP(true);
+ }
+
+ // Take user's name if possible, login name otherwise
+ if (!empty($USERINFO['name'])) {
+ $name = $USERINFO['name'];
+ } else {
+ $name = $user;
+ }
+
+ // Take first group if possible
+ if (!empty($USERINFO['grps'])) {
+ $group = $USERINFO['grps'][0];
+ } else {
+ $group = 'ALL';
+ }
+
+ $time_stamp = time();
+ if(preg_match('/@DATE(\w+)@/',$id,$matches)) {
+ switch($matches[1]) {
+ case 'PMONTH':
+ $time_stamp = strtotime("-1 month");
+ break;
+ case 'NMONTH':
+ $time_stamp = strtotime("+1 month");
+ break;
+ case 'NWEEK':
+ $time_stamp = strtotime("+1 week");
+ break;
+ case 'PWEEK':
+ $time_stamp = strtotime("-1 week");
+ break;
+ case 'TOMORROW':
+ $time_stamp = strtotime("+1 day");
+ break;
+ case 'YESTERDAY':
+ $time_stamp = strtotime("-1 day");
+ break;
+ case 'NYEAR':
+ $time_stamp = strtotime("+1 year");
+ break;
+ case 'PYEAR':
+ $time_stamp = strtotime("-1 year");
+ break;
+ }
+ $id = preg_replace('/@DATE(\w+)@/','', $id);
+ }
+
+ $replace = array(
+ '@USER@' => cleanID($user),
+ '@NAME@' => cleanID($name),
+ '@GROUP@' => cleanID($group),
+ '@BROWSER_LANG@' => $this->_get_language_of_wiki($id, $parent_id),
+ '@YEAR@' => date('Y',$time_stamp),
+ '@MONTH@' => date('m',$time_stamp),
+ '@WEEK@' => date('W',$time_stamp),
+ '@DAY@' => date('d',$time_stamp),
+ '@YEARPMONTH@' => date('Ym',strtotime("-1 month")),
+ '@PMONTH@' => date('m',strtotime("-1 month")),
+ '@NMONTH@' => date('m',strtotime("+1 month")),
+ '@YEARNMONTH@' => date('Ym',strtotime("+1 month")),
+ '@YEARPWEEK@' => date('YW',strtotime("-1 week")),
+ '@PWEEK@' => date('W',strtotime("-1 week")),
+ '@NWEEK@' => date('W',strtotime("+1 week")),
+ '@YEARNWEEK@' => date('YW',strtotime("+1 week")),
+ );
+ return str_replace(array_keys($replace), array_values($replace), $id);
+ }
+}
+// vim:ts=4:sw=4:et:
diff --git a/platform/www/lib/plugins/include/images/comment.gif b/platform/www/lib/plugins/include/images/comment.gif
new file mode 100644
index 0000000..735543c
--- /dev/null
+++ b/platform/www/lib/plugins/include/images/comment.gif
Binary files differ
diff --git a/platform/www/lib/plugins/include/images/date.gif b/platform/www/lib/plugins/include/images/date.gif
new file mode 100644
index 0000000..da61dda
--- /dev/null
+++ b/platform/www/lib/plugins/include/images/date.gif
Binary files differ
diff --git a/platform/www/lib/plugins/include/images/link.gif b/platform/www/lib/plugins/include/images/link.gif
new file mode 100644
index 0000000..ca63480
--- /dev/null
+++ b/platform/www/lib/plugins/include/images/link.gif
Binary files differ
diff --git a/platform/www/lib/plugins/include/images/user.gif b/platform/www/lib/plugins/include/images/user.gif
new file mode 100644
index 0000000..5ada7e6
--- /dev/null
+++ b/platform/www/lib/plugins/include/images/user.gif
Binary files differ
diff --git a/platform/www/lib/plugins/include/lang/ar/lang.php b/platform/www/lib/plugins/include/lang/ar/lang.php
new file mode 100644
index 0000000..2d8266e
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/ar/lang.php
@@ -0,0 +1,12 @@
+<?php
+/**
+* Arabic language file
+*
+* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+* @author Muhammad Bashir Al-Noimi <bashir.storm@gmail.com>
+* http://www.hali-sy.com
+*/
+
+// custom language strings for the plugin
+$lang['readmore'] = ' ←إقرأ المزيد... ';
+
diff --git a/platform/www/lib/plugins/include/lang/ar/settings.php b/platform/www/lib/plugins/include/lang/ar/settings.php
new file mode 100644
index 0000000..f3245a9
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/ar/settings.php
@@ -0,0 +1,20 @@
+<?php
+/**
+* Arabic language file
+*
+* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+* @author Muhammad Bashir Al-Noimi <bashir.storm@gmail.com>
+* http://www.hali-sy.com
+*/
+
+// for the configuration manager
+$lang['firstseconly'] = 'عرض القسم الأول من الصفحات المضمّنة';
+$lang['showtaglogos'] = 'عرض الصورة لأول قسم';
+$lang['showfooter'] = 'عرض معلومات الصفحة المضمّنة';
+$lang['showlink'] = 'عرض رابط التتبع للصفحة المضمّنة';
+$lang['showdate'] = 'عرض التاريخ للصفحة المضمّنة';
+$lang['showuser'] = 'عرض إسم المستخدم للصفحة المضمّنة';
+$lang['showcomments'] = 'عرض تعليقات الصفحة المضمّنة';
+$lang['showtags'] = 'عرض الأقسام أسف الصفحة المضمّنة';
+
+//Setup VIM: ex: et ts=2 :
diff --git a/platform/www/lib/plugins/include/lang/cs/lang.php b/platform/www/lib/plugins/include/lang/cs/lang.php
new file mode 100644
index 0000000..417c3ea
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/cs/lang.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * Czech language file (UTF-8 encoding)
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Lukas Zapletal <lukas.zapletal at gmail dot com>
+ */
+$lang['readmore'] = '→ Číst dále...';
diff --git a/platform/www/lib/plugins/include/lang/cs/settings.php b/platform/www/lib/plugins/include/lang/cs/settings.php
new file mode 100644
index 0000000..bfeda4b
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/cs/settings.php
@@ -0,0 +1,41 @@
+<?php
+
+/**
+ *
+ * Czech language file (UTF-8 encoding)
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Robert Surý <rsurycz@seznam.cz>
+ * @author Lukas Zapletal <lukas.zapletal at gmail dot com>
+ * @author Roman Svoboda <svoboro1 at fel.cvut dot cz>
+ */
+$lang['noheader'] = 'Nezobrazovat první záhlaví vkládaných stránek/sekcí';
+$lang['firstseconly'] = 'Zobrazovat pouze první sekci vkládaných stránek';
+$lang['showtaglogos'] = 'Zobrazovat obrázek prvních tagů';
+$lang['showfooter'] = 'Zobrazovat dole info o vkládané stránce';
+$lang['showlink'] = 'Odkaz na první titulek vkládané stránky';
+$lang['showpermalink'] = 'Zobrazovat dole permalinky vkládané stránky';
+$lang['showdate'] = 'Zobrazovat dole datum vkládané stránky';
+$lang['showmdate'] = 'Zobrazovat dole datum modifikace vkládané stránky';
+$lang['showuser'] = 'Zobrazovat dole jméno uživatele vkládané stránky';
+$lang['showcomments'] = 'Zobrazovat dole komentáře u vkládané stránky (vyžadován Discussion plugin)';
+$lang['showlinkbacks'] = 'Zobrazovat dole zpětné odkazy vkládané stránky (vyžadován Linkback plugin)';
+$lang['showtags'] = 'Zobrazovat dole tagy vkládané stránky (vyžadován Tag plugin)';
+$lang['showeditbtn'] = 'Zobrazovat tlačítko pro editaci';
+$lang['doredirect'] = 'Přesměrovat na původní stránku po provedení editace vkládané stránky';
+$lang['linkonly'] = 'Pouze odkaz na vloženou stránku namísto zobrazení obsahu';
+$lang['title'] = 'Použijte první nadpis stránky v odkazu, i když je používání nadpisů vypnuto (ovlivňuje pouze režim "jen odkazy"))';
+$lang['pageexists'] = 'Nezobrazovat odkaz, pokud stránka neexistuje (ovlivňuje pouze režim "jen odkazy")';
+$lang['parlink'] = 'Umístěte odstavec kolem odkazu (ovlivní pouze režim "jen odkazy")';
+$lang['safeindex'] = 'Zabraňte indexaci metadat z neveřejných vložených stránek';
+$lang['order_o_id'] = 'ID stránky';
+$lang['order_o_title'] = 'titulek';
+$lang['order_o_created'] = 'datum vytvoření';
+$lang['order_o_modified'] = 'datum modifikace';
+$lang['order_o_indexmenu'] = 'Vlastní pořadí se syntaxí indexmenu';
+$lang['order_o_custom'] = 'Vlastní pořadí s vloženou syntaxí';
+$lang['rsort'] = 'Obrátit pořadí řazení vkládaných stránek';
+$lang['depth'] = 'Maximální hloubka vnoření jmenných prostorů, 0 představuje neomezenou hloubku';
+$lang['readmore'] = 'Zobrazit nebo nezobrazit odkaz \'Číst více\' pouze pro případ první sekce';
+$lang['debugoutput'] = 'Tisknout podrobnější ladící informace do dokuwiki ladícího logu, pokud je povolena globální možnost "allowdebug"';
diff --git a/platform/www/lib/plugins/include/lang/da/lang.php b/platform/www/lib/plugins/include/lang/da/lang.php
new file mode 100644
index 0000000..9ad0e43
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/da/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Soren Birk <soer9648@eucl.dk>
+ */
+$lang['readmore'] = '→ Læs mere...';
diff --git a/platform/www/lib/plugins/include/lang/da/settings.php b/platform/www/lib/plugins/include/lang/da/settings.php
new file mode 100644
index 0000000..4c83c2b
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/da/settings.php
@@ -0,0 +1,39 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Jacob Palm <jacobpalmdk@icloud.com>
+ * @author Soren Birk <soer9648@eucl.dk>
+ */
+$lang['noheader'] = 'Vis ikke den første header for inkluderede sider/sektioner';
+$lang['firstseconly'] = 'vis kun den første sektion for inkluderede sider';
+$lang['showtaglogos'] = 'vis billede for første tag';
+$lang['showfooter'] = 'vis info på inkluderet side nedenfor';
+$lang['showlink'] = 'link første overskrift af inkluderet side';
+$lang['showpermalink'] = 'vis permalinks nedenfor inkluderet side';
+$lang['showdate'] = 'vis datoer nedenfor inkluderet side';
+$lang['showmdate'] = 'vis redigeret datoer nedenfor inkluderet side';
+$lang['showuser'] = 'vis brugernavne nedenfor inkluderet side';
+$lang['showcomments'] = 'vis kommentarer nedenfor inkluderet side (Discussion plugin nødvendigt)';
+$lang['showlinkbacks'] = 'vis linkbacks nedenfor inkluderet side (Linkback Plugin nødvendigt)';
+$lang['showtags'] = 'vis tags nedenfor inkluderet side (Tag Plugin nødvendigt)';
+$lang['showeditbtn'] = 'vis redigér-knap';
+$lang['doredirect'] = 'henvis til original side efter redigering af den inkluderede side';
+$lang['doindent'] = 'indryk inkluderede sider relativt i forhold til siden de inkluderes i';
+$lang['linkonly'] = 'link udelukkende til den inkluderede side i stedet for at vise indholdet';
+$lang['title'] = 'benyt sidens første overskrift i link, selvom useheading er slået fra (har kun effekt på linkonly-tilstand)';
+$lang['pageexists'] = 'Vis ikke et link hvis siden ikke findes (har kun effekt på linkonly-tilstand)';
+$lang['parlink'] = 'omkreds linket i et afsnit (har kun effekt på linkonly-tilstand)';
+$lang['safeindex'] = 'undgå indeksering af metadata fra ikke-offentlige inkluderede sider';
+$lang['order'] = 'kriterier til rækkefølge for inkluderede med adskellige sider';
+$lang['order_o_id'] = 'side-ID';
+$lang['order_o_title'] = 'titel';
+$lang['order_o_created'] = 'oprettelsesdato';
+$lang['order_o_modified'] = 'dato for modifikation';
+$lang['order_o_indexmenu'] = 'brugerdefineret orden med indexmenu-syntaks';
+$lang['order_o_custom'] = 'brugerdefineret orden med inkludér-syntaks';
+$lang['rsort'] = 'vend rækkefølgen for sortering af inkluderede sider';
+$lang['depth'] = 'maksimum dybde af inkluderede navnerum, 0 for uendelig dybde';
+$lang['readmore'] = 'Vis eller skjul "Læs mere" linket hvis kun den første sektion af inkluderede sider viser';
+$lang['debugoutput'] = 'Skriv udvidet debug information til DokuWiki debugloggen, hvis den globale indstilling "allowdebug" er slået til';
diff --git a/platform/www/lib/plugins/include/lang/de-informal/lang.php b/platform/www/lib/plugins/include/lang/de-informal/lang.php
new file mode 100644
index 0000000..dc75a53
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/de-informal/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Esther Brunner <wikidesign@gmail.com>
+ */
+$lang['readmore'] = '→ Weiterlesen...';
diff --git a/platform/www/lib/plugins/include/lang/de-informal/settings.php b/platform/www/lib/plugins/include/lang/de-informal/settings.php
new file mode 100644
index 0000000..5076b1b
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/de-informal/settings.php
@@ -0,0 +1,39 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author F. Mueller-Donath <j.felix@mueller-donath.de>
+ * @author Esther Brunner <wikidesign@gmail.com>
+ */
+$lang['noheader'] = 'Erste Überschrift von eingeschlossenen Seiten/Sektionen nicht anzeigen';
+$lang['firstseconly'] = 'Nur ersten Abschnitt von eingebundenen Seiten anzeigen';
+$lang['showtaglogos'] = 'Bild für erstes Tag anzeigen';
+$lang['showfooter'] = 'Infos über eingebundene Seite darunter anzeigen';
+$lang['showlink'] = 'Erste Überschrift der eingebundenen Seite als Link anzeigen';
+$lang['showpermalink'] = 'Permalink unter eingebunderer Seite anzeigen';
+$lang['showdate'] = 'Datum unter eingebundender Seite anzeigen';
+$lang['showmdate'] = 'Änderungsdatum unter eingebundener Seite anzeigen';
+$lang['showuser'] = 'Autorenname unter eingebundener Seite anzeigen';
+$lang['showcomments'] = 'Kommentare unter eingebundener Seite anzeigen (Discussion Plugin wird benötigt)';
+$lang['showlinkbacks'] = 'Linkbacks unter eingebundener Seite anzeigen (Linkback Plugin wird benötigt)';
+$lang['showtags'] = 'Tags unter eingebundener Seite anzeigen (Tag Plugin wird benötigt)';
+$lang['showeditbtn'] = 'Bearbeiten-Button anzeigen';
+$lang['doredirect'] = 'Nach dem Bearbeiten der eingebundenen Seite zur ursprünglichen Seite weiterleiten';
+$lang['doindent'] = 'Eingebundene Seiten relativ zur Seite, in der sie eingebunden sind einrücken';
+$lang['linkonly'] = 'Nur einen Link anzeigen statt dem Inhalt der eingebundenen Seite';
+$lang['title'] = 'Erste Überschrift im Link benutzen auch wenn "useheading" ausgeschaltet ist (betrifft nur den "linkonly"-Modus)';
+$lang['pageexists'] = 'Keinen Link anzeigen, wenn die verlinkte Seite nicht existiert (betrifft nur den "linkonly"-Modus)';
+$lang['parlink'] = 'Einen Absatz um den Link herum anzeigen (betrifft nur den "linkonly"-Modus)';
+$lang['safeindex'] = 'Verhindere das Indizieren von Metadaten auf eingebundenen, nicht öffentlichen Seiten';
+$lang['order'] = 'Sortierkriterium beim Einfügen von mehreren Seiten';
+$lang['order_o_id'] = 'Seiten ID';
+$lang['order_o_title'] = 'Titel';
+$lang['order_o_created'] = 'Erstellungsdatum';
+$lang['order_o_modified'] = 'Änderungsdatum';
+$lang['order_o_indexmenu'] = 'Benutzerdefinierte Reihenfolge mit Indexmenu Syntax';
+$lang['order_o_custom'] = 'Benutzerdefinierte Reihenfolge mit Include Syntax';
+$lang['rsort'] = 'Umgekehrte Reihenfolge bei der Sortierung von eingefügten Seiten';
+$lang['depth'] = 'Maximale Tiefe von Namensräumen, 0 für alle Ebenen';
+$lang['readmore'] = '\'Weiterlesen\'-Link bei aktiviertem "firstseconly"-Modus anzeigen';
+$lang['debugoutput'] = 'Ausführliche Informationen in das Debuglog des Dokuwikis schreiben (setzt voraus, dass die globale Option "allowdebug" aktiviert ist).';
diff --git a/platform/www/lib/plugins/include/lang/de/lang.php b/platform/www/lib/plugins/include/lang/de/lang.php
new file mode 100644
index 0000000..dc75a53
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/de/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Esther Brunner <wikidesign@gmail.com>
+ */
+$lang['readmore'] = '→ Weiterlesen...';
diff --git a/platform/www/lib/plugins/include/lang/de/settings.php b/platform/www/lib/plugins/include/lang/de/settings.php
new file mode 100644
index 0000000..9ed7a79
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/de/settings.php
@@ -0,0 +1,42 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author F. Mueller-Donath <j.felix@mueller-donath.de>
+ * @author Esther Brunner <wikidesign@gmail.com>
+ * @author Dominik Eckelmann <deckelmann@gmail.com>
+ * @author Christian Paul <info@jaller.de>
+ * @author Dana <dannax3@gmx.de>
+ */
+$lang['noheader'] = 'Erste Überschrift von eingeschlossenen Seiten/Sektionen nicht anzeigen';
+$lang['firstseconly'] = 'Nur ersten Abschnitt von eingebundenen Seiten anzeigen';
+$lang['showtaglogos'] = 'Bild für erstes Tag anzeigen';
+$lang['showfooter'] = 'Infos über eingebundene Seite darunter anzeigen';
+$lang['showlink'] = 'Erste Überschrift der eingebundenen Seite als Link anzeigen';
+$lang['showpermalink'] = 'Permalink unter eingebunderer Seite anzeigen';
+$lang['showdate'] = 'Datum unter eingebunderer Seite anzeigen';
+$lang['showmdate'] = 'Änderungsdatum unter eingebundener Seite anzeigen';
+$lang['showuser'] = 'Autorenname unter eingebundener Seite anzeigen';
+$lang['showcomments'] = 'Kommentare unter eingebundener Seite anzeigen (Discussion Plugin wird benötigt)';
+$lang['showlinkbacks'] = 'Linkbacks unter eingebundener Seite anzeigen (Linkback Plugin wird benötigt)';
+$lang['showtags'] = 'Tags unter eingebundener Seite anzeigen (Tag Plugin wird benötigt)';
+$lang['showeditbtn'] = 'Bearbeiten-Button anzeigen';
+$lang['doredirect'] = 'Nach dem Bearbeiten der eingebundenen Seite zur ursprünglichen Seite weiterleiten';
+$lang['doindent'] = 'Eingebundene Seiten relativ zur Seite, in der sie eingebunden sind einrücken';
+$lang['linkonly'] = 'Nur einen Link anzeigen statt dem Inhalt der eingebundenen Seite';
+$lang['title'] = 'Erste Überschrift im Link benutzen auch wenn "useheading" ausgeschaltet ist (betrifft nur den "linkonly"-Modus)';
+$lang['pageexists'] = 'Keinen Link anzeigen, wenn die verlinkte Seite nicht existiert (betrifft nur den "linkonly"-Modus)';
+$lang['parlink'] = 'Einen Absatz um den Link herum anzeigen (betrifft nur den "linkonly"-Modus)';
+$lang['safeindex'] = 'Verhindere das Indizieren von Metadaten auf eingebundenen, nicht öffentlichen Seiten';
+$lang['order'] = 'Sortierkriterium beim Einfügen von mehreren Seiten';
+$lang['order_o_id'] = 'Seiten ID';
+$lang['order_o_title'] = 'Titel';
+$lang['order_o_created'] = 'Erstellungsdatum';
+$lang['order_o_modified'] = 'Änderungsdatum';
+$lang['order_o_indexmenu'] = 'Benutzerdefinierte Reihenfolge mit Indexmenu Syntax.';
+$lang['order_o_custom'] = 'Benutzerdefinierte Reihenfolge mit Include Syntax';
+$lang['rsort'] = 'Umgekehrte Reihenfolge bei der Sortierung von eingefügten Seiten';
+$lang['depth'] = 'Maximale Tiefe von Namensräumen, 0 für alle Ebenen';
+$lang['readmore'] = 'Zeige einen \'Weiterlesen\'-Link bei aktiviertem "firstseconly"-Modus';
+$lang['debugoutput'] = 'Ausführliche Informationen in das Debuglog des Dokuwikis schreiben (setzt voraus, dass die globale Option "allowdebug" aktiviert ist).';
diff --git a/platform/www/lib/plugins/include/lang/en/lang.php b/platform/www/lib/plugins/include/lang/en/lang.php
new file mode 100644
index 0000000..2204c39
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/en/lang.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * English language file
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Esther Brunner <wikidesign@gmail.com>
+ */
+
+// custom language strings for the plugin
+$lang['readmore'] = '→ Read more...';
+
+//Setup VIM: ex: et ts=2 : \ No newline at end of file
diff --git a/platform/www/lib/plugins/include/lang/en/settings.php b/platform/www/lib/plugins/include/lang/en/settings.php
new file mode 100644
index 0000000..8aec307
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/en/settings.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * English language file
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Esther Brunner <wikidesign@gmail.com>
+ */
+
+// for the configuration manager
+$lang['noheader'] = 'Don\'t show the first header of included pages/sections';
+$lang['firstseconly'] = 'Show only the first section of included pages';
+$lang['showtaglogos'] = 'Show image for first tag';
+$lang['showfooter'] = 'Show info about included page below';
+$lang['showlink'] = 'Link first headline of included page';
+$lang['showpermalink'] = 'Show permalinks below included page';
+$lang['showdate'] = 'Show dates below included page';
+$lang['showmdate'] = 'Show modified dates below included page';
+$lang['showuser'] = 'Show usernames below included page';
+$lang['showcomments'] = 'Show comments below included page (Discussion plugin needed)';
+$lang['showlinkbacks'] = 'Show linkbacks below included page (Linkback Plugin needed)';
+$lang['showtags'] = 'Show tags below included page (Tag Plugin needed)';
+$lang['showeditbtn'] = 'Show edit button';
+$lang['doredirect'] = 'Redirect to the original page after editing the included page';
+$lang['doindent'] = 'Indent included pages relative to the page they get included in';
+$lang['linkonly'] = 'Link only to the included page instead of showing the content';
+$lang['title'] = 'Use first heading of page in link even if useheading is off (only affects linkonly mode)';
+$lang['pageexists'] = 'Do not display a link if the page does not exist (only affects linkonly mode)';
+$lang['parlink'] = 'Put a paragraph around the link (only affects linkonly mode)';
+$lang['safeindex'] = 'Prevent indexing of metadata from non-public included pages';
+$lang['order'] = 'Ordering criteria of includes with multiple pages';
+$lang['order_o_id'] = 'page ID';
+$lang['order_o_title'] = 'title';
+$lang['order_o_created'] = 'creation date';
+$lang['order_o_modified'] = 'modification date';
+$lang['order_o_indexmenu'] = 'custom order with indexmenu syntax';
+$lang['order_o_custom'] = 'custom order with include syntax';
+$lang['rsort'] = 'Reverse the sort order of the included pages';
+$lang['depth'] = 'Maximum depth of namespace includes, 0 for unlimited depth';
+$lang['readmore'] = 'Show or not the \'Read More\' link in case of firstsection only';
+$lang['debugoutput'] = 'Print verbose debug information to the dokuwiki debuglog if the global "allowdebug" option is enabled';
+//Setup VIM: ex: et ts=2 :
diff --git a/platform/www/lib/plugins/include/lang/eo/lang.php b/platform/www/lib/plugins/include/lang/eo/lang.php
new file mode 100644
index 0000000..e8dc40f
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/eo/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Robert Bogenschneider <bogi@uea.org>
+ */
+$lang['readmore'] = '→ Legi plu...';
diff --git a/platform/www/lib/plugins/include/lang/eo/settings.php b/platform/www/lib/plugins/include/lang/eo/settings.php
new file mode 100644
index 0000000..61ec14e
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/eo/settings.php
@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Robert Bogenschneider <bogi@uea.org>
+ * @author Robert Bogenschneider <robog@gmx.de>
+ */
+$lang['noheader'] = 'Ne montri la unuan alineon de inkluditaj paĝoj/sekcioj';
+$lang['firstseconly'] = 'montri nur la unuan sekcion de inkluditaj paĝoj';
+$lang['showtaglogos'] = 'montri bildon por la unua etikedo';
+$lang['showfooter'] = 'montri informojn pri inkludita paĝo sube';
+$lang['showlink'] = 'ligilo al la unua kaplinio de inkludita paĝo';
+$lang['showpermalink'] = 'montri permaligilojn sub inkludita paĝo';
+$lang['showdate'] = 'montri daton sub inkludita paĝo';
+$lang['showmdate'] = 'montri modif-daton sub inkludita paĝo';
+$lang['showuser'] = 'montri uzantonomojn sub inkludita paĝo';
+$lang['showcomments'] = 'montri komentojn sub inkludita paĝo (kromaĵo discussion bezonata)';
+$lang['showlinkbacks'] = 'montri retroligilojn sub inkludita paĝo (kromaĵo linkback bezonata)';
+$lang['showtags'] = 'montri etikedojn sub inkludita paĝo (kromaĵo tag bezonata)';
+$lang['showeditbtn'] = 'montri butonon por modifi';
+$lang['doredirect'] = 'redirekti al la origina paĝo post modifado de la inkludita paĝo';
+$lang['doindent'] = 'ŝovi inkluditajn paĝojn relative al la inkludanta paĝo';
+$lang['linkonly'] = 'nur ligi, ne montri la enhavon de la inkludita paĝo';
+$lang['title'] = 'uzi la unuan titolon de paĝo en ligilo eĉ se useheading estas blokita (koncernas nur linkonly-moduson)';
+$lang['pageexists'] = 'ne montri ligilon, se la paĝo ne ekzistas (koncernas nur linkonly-moduson)';
+$lang['parlink'] = 'meti alineon ĉirkaŭ ligilon (koncernas nur linkonly-moduson)';
+$lang['safeindex'] = 'eviti indeksadon de metadatumoj de nepublikaj inkluditaj paĝoj';
+$lang['order'] = 'ordigi inkludojn de multaj paĝoj laŭ';
+$lang['order_o_id'] = 'paĝnomo';
+$lang['order_o_title'] = 'titolo';
+$lang['order_o_created'] = 'krea dato';
+$lang['order_o_modified'] = 'modifa dato';
+$lang['order_o_indexmenu'] = 'propra ordo per indexmenu-sintakso';
+$lang['order_o_custom'] = 'propra ordo per include-sintakso';
+$lang['rsort'] = 'inversigi la ordon de la inkluditaj paĝoj';
+$lang['depth'] = 'maksimuma profundeco de nomspaco-inkludoj, 0 por senlima profundeco';
+$lang['readmore'] = 'Ĉu montri la \'Legi plu\'-ligilon por la opcio unua alineo';
diff --git a/platform/www/lib/plugins/include/lang/es/lang.php b/platform/www/lib/plugins/include/lang/es/lang.php
new file mode 100644
index 0000000..c41837e
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/es/lang.php
@@ -0,0 +1,12 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * Archivo en español
+ *
+ * @licencia GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @autor Esther Brunner <wikidesign@gmail.com>
+ *
+ */
+$lang['readmore'] = 'Leer más...';
diff --git a/platform/www/lib/plugins/include/lang/es/settings.php b/platform/www/lib/plugins/include/lang/es/settings.php
new file mode 100644
index 0000000..b18d02b
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/es/settings.php
@@ -0,0 +1,41 @@
+<?php
+
+/**
+ * Spanish language file
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Luna Frax <lunafrax@gmail.com>
+ * @author Herman Fabián Sandoval Manrique <hfsandovalm@emzac.com>
+ */
+$lang['noheader'] = 'No mostrar el primer encabezado de las páginas/secciones incluidas';
+$lang['firstseconly'] = 'mostrar solamente la primera sección de las entradas al blog';
+$lang['showtaglogos'] = 'mostrar imagen para la primera etiqueta';
+$lang['showfooter'] = 'mostrar en la parte inferior información acerca de la entrada al blog';
+$lang['showlink'] = 'mostrar los enlaces a continuación de las entradas al blog';
+$lang['showpermalink'] = 'Mostrar los enlaces permanentes debajo de la página incluida';
+$lang['showdate'] = 'mostrar la fecha a continuación de las entradas al blog';
+$lang['showmdate'] = 'Mostrar las fechas modificadas debajo de la página incluida ';
+$lang['showuser'] = 'mostrar los nombres de usuarios a continuación de las entradas al blog';
+$lang['showcomments'] = 'mostrar comentarios a continuación de las entradas al blog';
+$lang['showlinkbacks'] = 'Mostrar los enlaces entrantes de la página incluida (se necesita Linkback Plugin) ';
+$lang['showtags'] = 'mostrar etiquetas a continuación de la entrada al blog';
+$lang['showeditbtn'] = 'Mostrar el botón de edición ';
+$lang['doredirect'] = 'Redirigir a la página original después de editar la página incluida ';
+$lang['doindent'] = 'Páginas incluidas en sangría relativas a la página en la que se incluyen';
+$lang['linkonly'] = 'Enlazar sólo con la página incluida en lugar de mostrar el contenido ';
+$lang['title'] = 'Usar el primer encabezado de la página en el enlace aunque el encabezado de uso esté desactivado (sólo afecta al modo de sólo enlace) ';
+$lang['pageexists'] = 'No mostrar un enlace si la página no existe (sólo afecta al modo de sólo enlace)';
+$lang['parlink'] = 'Poner un párrafo alrededor del enlace (sólo afecta al modo de sólo enlace) ';
+$lang['safeindex'] = 'Impedir la indización de metadatos de páginas incluidas no públicas';
+$lang['order'] = 'Criterios de clasificación de las entradas con varias páginas';
+$lang['order_o_id'] = 'Página de identificación';
+$lang['order_o_title'] = 'Título';
+$lang['order_o_created'] = 'Crear fecha';
+$lang['order_o_modified'] = 'Modificar fecha';
+$lang['order_o_indexmenu'] = 'orden personalizado con indexmenu syntax';
+$lang['order_o_custom'] = 'orden personalizado con el syntax incluido';
+$lang['rsort'] = 'Invertir el orden de las páginas incluidas';
+$lang['depth'] = 'El anchor máximo del espacio de nombre incluido, 0 para un anchor ilimitado';
+$lang['readmore'] = 'Mostrar o no el enlace "Leer más" sólo en caso de primera sección ';
+$lang['debugoutput'] = 'Imprimir información de depuración verbosa en el registro de depuración de DokuWiki si la opción global "allowdebug" está activada';
diff --git a/platform/www/lib/plugins/include/lang/fr/lang.php b/platform/www/lib/plugins/include/lang/fr/lang.php
new file mode 100644
index 0000000..a456138
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/fr/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Damien Raude-Morvan <drazzib@drazzib.com>
+ */
+$lang['readmore'] = 'Lire la suite...';
diff --git a/platform/www/lib/plugins/include/lang/fr/settings.php b/platform/www/lib/plugins/include/lang/fr/settings.php
new file mode 100644
index 0000000..5e3519d
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/fr/settings.php
@@ -0,0 +1,44 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Damien Raude-Morvan <drazzib@drazzib.com>
+ * @author Stanislas Reltgen <stanislas@reltgen.net>
+ * @author bruno <bruno@ninesys.fr>
+ * @author Christian "Na_kai" Sueur <sueur.christian@gmail.com>
+ * @author Fabrice Dejaigher <fabrice@chtiland.com>
+ * @author Schplurtz le Déboulonné <schplurtz@laposte.net>
+ * @author Olivier Humbert <trebmuh@tuxfamily.org>
+ */
+$lang['noheader'] = 'Ne pas afficher la première en-tête de pages / sections incluse';
+$lang['firstseconly'] = 'Afficher uniquement la première section des billets';
+$lang['showtaglogos'] = 'Afficher l\'image de la première balise';
+$lang['showfooter'] = 'Montrer les infos sur la page incluse en dessous';
+$lang['showlink'] = 'Utiliser la première en-tête comme un lien vers la page incluse';
+$lang['showpermalink'] = 'Afficher les permaliens sous la page incluse';
+$lang['showdate'] = 'Afficher les dates sous la page incluse';
+$lang['showmdate'] = 'Afficher les dates de modification sous la page incluse';
+$lang['showuser'] = 'Afficher le nom de l\'utilisateur sous la page incluse';
+$lang['showcomments'] = 'Afficher les commentaires sous la page incluse (greffon Discussion requis)';
+$lang['showlinkbacks'] = 'Afficher les liens pointants vers la page sous la page incluse (greffon Linkback requis)';
+$lang['showtags'] = 'Afficher les étiquettes (tags) sous la page incluse (greffon Tag requis)';
+$lang['showeditbtn'] = 'Afficher le bouton d\'édition';
+$lang['doredirect'] = 'Rediriger vers la page d\'origine après l\'édition de la page incluse';
+$lang['doindent'] = 'Indenter les pages incluses par rapport à la page où elles sont incluses';
+$lang['linkonly'] = 'Faire un lien vers la page incluse plutôt que d\'afficher son contenu';
+$lang['title'] = 'Utiliser la première en-tête de la page pour le lien même si l\'option \'useheading\' n\'est pas activée (ne concerne que le mode \'lien seul\')';
+$lang['pageexists'] = 'Ne pas afficher un lien si la page n\'existe pas (ne concerne que le mode \'lien seul\')';
+$lang['parlink'] = 'Mettre le lien dans un paragraphe (ne concerne que le mode \'lien seul\')';
+$lang['safeindex'] = 'Empêcher l\'indexation des métadonnées à partir de pages incluses non-publiques';
+$lang['order'] = 'Critère de tri des inclusions multi-pages';
+$lang['order_o_id'] = 'Page ID';
+$lang['order_o_title'] = 'Titre';
+$lang['order_o_created'] = 'Date de création';
+$lang['order_o_modified'] = 'Date de modification';
+$lang['order_o_indexmenu'] = 'Ordre personnalisé avec la syntaxe de menu d\'index';
+$lang['order_o_custom'] = 'Ordre personnalisé avec la syntaxe inclure';
+$lang['rsort'] = 'Inverser l\'ordre de tri des pages incluses';
+$lang['depth'] = 'Profondeur maximale d\'inclusion de l\'espace de nom (namespace), 0 pour une profondeur illimitée';
+$lang['readmore'] = 'Affiche - ou pas - le lien \'Lire la suite\' dans le cas de l\'affichage de la première section seule';
+$lang['debugoutput'] = 'Afficher des informations de débogage verbeuses dans le journal de débogage de DokuWiki lorsque l\'option globale "allowdebug" est activée.';
diff --git a/platform/www/lib/plugins/include/lang/hr/lang.php b/platform/www/lib/plugins/include/lang/hr/lang.php
new file mode 100644
index 0000000..fad0fe3
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/hr/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Davor Turkalj <turki.bsc@gmail.com>
+ */
+$lang['readmore'] = '--> Pročitaj više...';
diff --git a/platform/www/lib/plugins/include/lang/hr/settings.php b/platform/www/lib/plugins/include/lang/hr/settings.php
new file mode 100644
index 0000000..12d6fa5
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/hr/settings.php
@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Davor Turkalj <turki.bsc@gmail.com>
+ */
+$lang['noheader'] = 'Ne prikazuj prvi naslov uključene stranice/odjeljka';
+$lang['firstseconly'] = 'Prikaži samo prvi odjeljak uključenih stranica';
+$lang['showtaglogos'] = 'Prikaži sliku za prvu oznaku';
+$lang['showfooter'] = 'Prikaži na kraju info o uključenoj stranici';
+$lang['showlink'] = 'Poveži prvi naslov uključenih stranica';
+$lang['showpermalink'] = 'Prikaži stalne veze ispod uključene stranice';
+$lang['showdate'] = 'Prikaži datume ispod uključene stranice';
+$lang['showmdate'] = 'Prikaži datume izmjene ispod uključene stranice';
+$lang['showuser'] = 'Prikaži korisnička imena ispod uključene stranice';
+$lang['showcomments'] = 'Prikaži komentare ispod uključene stranice (potreban dodatak Discussion)';
+$lang['showlinkbacks'] = 'Prikaži povratne linkove ispod uključene stranice (potreban dodatak Linkback)';
+$lang['showtags'] = 'Prikaži oznake ispod uključene stranice (potreban dodatak Tag)';
+$lang['showeditbtn'] = 'Prikaži dugme za izmjenu';
+$lang['doredirect'] = 'Preusmjeri na originalnu stranicu nakon uređivanja uključene stranice';
+$lang['doindent'] = 'Uvuci uključenu stranicu relativno prema stranici na kojoj je uključena';
+$lang['linkonly'] = 'Prikaži poveznicu na uključenu stranicu umjesto njenog sadržaja';
+$lang['title'] = 'Koristi prvi naslov na stranici u poveznici čak i kada je "useheading" isključen (utječe samo na linkonly mod)';
+$lang['pageexists'] = 'Ne prikazuj link ako stranica ne postoji (utječe samo na linkonly mod)';
+$lang['parlink'] = 'Postavi paragraf oko poveznice (utječe samo na linkonly mod)';
+$lang['safeindex'] = 'Spriječi indeksiranje meta-podataka od uključenih stranica koje nisu javne';
+$lang['order'] = 'Uvjeti redosljeda pri uključenju više stranica';
+$lang['order_o_id'] = 'ID stranice';
+$lang['order_o_title'] = 'naslov';
+$lang['order_o_created'] = 'datum kreiranja';
+$lang['order_o_modified'] = 'datum modificiranja';
+$lang['order_o_indexmenu'] = 'poseban redoslijed prema "indexmenu" sintaksi';
+$lang['order_o_custom'] = 'poseban redoslijed prema "include" sintaksi';
+$lang['rsort'] = 'Obrnuti redoslijed uključenih stranica';
+$lang['depth'] = 'Maksimalna dubina uključenog imenskog prostora, 0 za neograničenu dubinu';
+$lang['readmore'] = 'Prikazati ili ne \'Pročitaj više\' u slučaju prikaza samo prvog odjeljka';
+$lang['debugoutput'] = 'Ispisuj dodatne informacije u debug logu dokuwiki-a, ako je omogućena globalna opcija "allowdebug"';
diff --git a/platform/www/lib/plugins/include/lang/hu/lang.php b/platform/www/lib/plugins/include/lang/hu/lang.php
new file mode 100644
index 0000000..6ef1001
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/hu/lang.php
@@ -0,0 +1,9 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Norbert Csík <norbert.csik@gmail.com>
+ * @author DelD <deldadam@gmail.com>
+ */
+$lang['readmore'] = 'Tovább...';
diff --git a/platform/www/lib/plugins/include/lang/hu/settings.php b/platform/www/lib/plugins/include/lang/hu/settings.php
new file mode 100644
index 0000000..352cfbe
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/hu/settings.php
@@ -0,0 +1,39 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Norbert Csík <norbert.csik@gmail.com>
+ * @author DelD <deldadam@gmail.com>
+ */
+$lang['noheader'] = 'Csatolt oldal/szakasz első címsorának elrejtése';
+$lang['firstseconly'] = 'Csak a csatolt oldal első bekezdésének megjelenítése';
+$lang['showtaglogos'] = 'Első címke képének megjelenítése';
+$lang['showfooter'] = 'Csatolt oldal adatainak megjelenítése lent';
+$lang['showlink'] = 'Csatolt oldal első címsora hivatkozásként';
+$lang['showpermalink'] = 'Állandó hivatkozások megjelenítése csatolt oldal alatt';
+$lang['showdate'] = 'Dátumok megjelenítése csatolt oldal alatt';
+$lang['showmdate'] = 'Módosítási dátum megjelenítése csatolt oldal alatt';
+$lang['showuser'] = 'Felhasználónevek megjelenítése csatolt oldal alatt';
+$lang['showcomments'] = 'Hozzászólások megjelenítése csatolt oldal alatt (a \'Discussion\' bővítmény szükséges hozzá)';
+$lang['showlinkbacks'] = 'Visszamutató hivatkozások megjelenítése csatolt oldal alatt (a \'Linkback\' bővítmény szükséges hozzá)';
+$lang['showtags'] = 'Címkék megjelenítése a csatolt oldal alatt (a \'Tag\' bővítmény szükséges hozzá)';
+$lang['showeditbtn'] = '\'Oldal szerkesztése\' gomb megjelenítése';
+$lang['doredirect'] = 'Átirányítás az eredeti oldalra a csatolt oldal szerkesztése után';
+$lang['usernamespace'] = 'Felhasználói oldalak névtere';
+$lang['doindent'] = 'Csatolt oldal behúzása relatíve ahhoz az oldalhoz, amelyhez csatolták';
+$lang['linkonly'] = 'Csak a csatolt oldalra mutató hivatkozás megjelenítése a teljes oldal tartalma helyett';
+$lang['title'] = 'Oldal első címsorának használat a hivatkozásban akkor is, ha a \'useheadin\' beállítás tiltott (csak akkor van hatása, ha csatolt oldal tartalma helyett hivatkozás jelenik meg)';
+$lang['pageexists'] = 'Csatolt oldal hivatkozásának elrejtése, ha az oldal még nem létezik (csak akkor van hatása, ha csatolt oldal tartalma helyett hivatkozás jelenik meg)';
+$lang['parlink'] = 'Hivatkozás elhelyezése bekezdéscímkék (<p>) között (csak akkor van hatása, ha csatolt oldal tartalma helyett hivatkozás jelenik meg)';
+$lang['safeindex'] = 'Nem nyilvános, csatolt oldalak metaadai indexelésének tiltása';
+$lang['order'] = 'Rendezési feltételek több oldal csatolása esetén';
+$lang['order_o_id'] = 'Oldalazonosító (ID)';
+$lang['order_o_title'] = 'Cím';
+$lang['order_o_created'] = 'Létrehozás dátuma';
+$lang['order_o_modified'] = 'Módosítás dátuma';
+$lang['order_o_indexmenu'] = 'Tetszőleges sorrend indexmenü szintaxisával';
+$lang['order_o_custom'] = 'Tetszőleges sorrend csatoló (include) szintaxisával';
+$lang['rsort'] = 'Csatolt oldalak sorrendjének megfordítása';
+$lang['depth'] = 'Csatolások névtereinek max. mélysége (0=végtelen)';
+$lang['readmore'] = '\'Tovább...\' hivatkozás megjelenítése, ha a csatolt oldalnak csak az első bekezdése látszik';
diff --git a/platform/www/lib/plugins/include/lang/it/lang.php b/platform/www/lib/plugins/include/lang/it/lang.php
new file mode 100644
index 0000000..c7c7401
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/it/lang.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * Italian language file
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Niccolo Rigacci <niccolo@rigacci.org>
+ */
+$lang['readmore'] = '→ Leggi tutto...';
diff --git a/platform/www/lib/plugins/include/lang/it/settings.php b/platform/www/lib/plugins/include/lang/it/settings.php
new file mode 100644
index 0000000..2f5ec5a
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/it/settings.php
@@ -0,0 +1,29 @@
+<?php
+
+/**
+ * Italian language file
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Riccardo <riccardo.furlato@gmail.com>
+ * @author Niccolo Rigacci <niccolo@rigacci.org>
+ */
+$lang['noheader'] = 'Non mostrare la prima intestazione di pagine o sezioni incluse';
+$lang['firstseconly'] = 'Mostra nel blog solo la prima sezione degli articoli';
+$lang['showtaglogos'] = 'Mostra l\'immagine per il primo tag';
+$lang['showfooter'] = 'Mostra sotto informazioni sulla pagina inclusa';
+$lang['showlink'] = 'Mostra un link all\'articolo sotto le voci del blog';
+$lang['showpermalink'] = 'Mostra i permalinks sotto alla pagina inclusa';
+$lang['showdate'] = 'Mostra la data sotto le voci del blog';
+$lang['showmdate'] = 'Mostra i dati modificati sotto alla pagina inclusa';
+$lang['showuser'] = 'Mostra il nome dell\'autore sotto le voci del blog';
+$lang['showcomments'] = 'Mostra i commenti sotto alla pagina inclusa (serve il plugin Discussion)';
+$lang['showeditbtn'] = 'Mostra il pulsante modifica';
+$lang['doredirect'] = 'Torna alla pagina originale dopo aver editato la pagina inclusa';
+$lang['doindent'] = 'Indenta le pagine incluse relativamente alla pagina dove sono state incluse';
+$lang['linkonly'] = 'Mostra solo il link alla pagina inclusa invece di mostrarne il contenuto';
+$lang['order_o_id'] = 'ID della pagina';
+$lang['order_o_title'] = 'titolo';
+$lang['order_o_created'] = 'data di creazione';
+$lang['order_o_modified'] = 'data di modifica';
+$lang['rsort'] = 'Inverti l\'ordine delle pagine incluse';
diff --git a/platform/www/lib/plugins/include/lang/ja/lang.php b/platform/www/lib/plugins/include/lang/ja/lang.php
new file mode 100644
index 0000000..87db665
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/ja/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Satoshi Sahara <sahara.satoshi@gmail.com>
+ */
+$lang['readmore'] = '→ 続き...';
diff --git a/platform/www/lib/plugins/include/lang/ja/settings.php b/platform/www/lib/plugins/include/lang/ja/settings.php
new file mode 100644
index 0000000..1231338
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/ja/settings.php
@@ -0,0 +1,39 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Satoshi Sahara <sahara.satoshi@gmail.com>
+ * @author Hideaki SAWADA <chuno@live.jp>
+ */
+$lang['noheader'] = 'インクルードするページまたはセクションの最初の見だしを表示しない';
+$lang['firstseconly'] = 'インクルードするページの最初のセクションだけを表示する';
+$lang['showtaglogos'] = '(タグが設定されている場合) タグ先頭の画像を表示する';
+$lang['showfooter'] = 'インクルード部の下にフッター情報を表示する';
+$lang['showlink'] = 'インクルード部の最初の見出しをインクルード先のページまたはセクションへのリンクとする';
+$lang['showpermalink'] = 'フッター情報: ページの permalink を表示';
+$lang['showdate'] = 'フッター情報: ページ作成日付(date) を表示';
+$lang['showmdate'] = 'フッター情報: ページ修正日付(modified date) を表示';
+$lang['showuser'] = 'フッター情報: ユーザ名(username) を表示';
+$lang['showcomments'] = 'フッター情報: コメントを表示する (Discussion plugin が必要)';
+$lang['showlinkbacks'] = 'フッター情報: バックリンク(linkback) を表示 (Linkback Plugin が必要)';
+$lang['showtags'] = 'フッター情報: タグ(tag) を表示 (Tag Plugin が必要)';
+$lang['showeditbtn'] = 'インクルード先を編集するボタンを表示';
+$lang['doredirect'] = 'インクルード先の編集後、元のページにリダイレクトして戻る';
+$lang['doindent'] = 'インクルード部を元ページの当該位置での見出しレベルより1段階下げる';
+$lang['linkonly'] = 'linkonly モードをデフォルトにする: インクルードせず、指定ページまたはセクションへのリンクだけを表示';
+$lang['title'] = '(linkonly モード時): リンクタイトルに最初の見出しを使う(useheading の指定によらず適用)';
+$lang['pageexists'] = '(linkonly モード時): インクルードするページが存在しない場合は何も表示しない ';
+$lang['parlink'] = '(linkonly モード時): リンクを「段落」とする (インラインリストにする場合は無効にしてください)';
+$lang['safeindex'] = '非公開のインクルードページのメタデータをインデックス化しない';
+$lang['order'] = '(名前空間インクルード時) ページソートに使う項目';
+$lang['order_o_id'] = 'ページ ID';
+$lang['order_o_title'] = 'タイトル';
+$lang['order_o_created'] = '作成日時';
+$lang['order_o_modified'] = '修正日時';
+$lang['order_o_indexmenu'] = 'indexmenu プラグイン互換のソート方法';
+$lang['order_o_custom'] = 'include プラグイン互換のソート方法';
+$lang['rsort'] = '(名前空間インクルード時) ページソートを逆順にする';
+$lang['depth'] = '(名前空間インクルード時) インクルード対象とする名前空間の最大深さ (0:制限なし)';
+$lang['readmore'] = '最初のセクションだけの場合、「→ 続き...」リンクを表示する';
+$lang['debugoutput'] = '"allowdebug" オプションが有効な場合、DokuWiki の DEBUGLOG に詳細なデバッグ情報を出力する';
diff --git a/platform/www/lib/plugins/include/lang/ko/lang.php b/platform/www/lib/plugins/include/lang/ko/lang.php
new file mode 100644
index 0000000..e381131
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/ko/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Myeongjin <aranet100@gmail.com>
+ */
+$lang['readmore'] = '→ 더 읽기...';
diff --git a/platform/www/lib/plugins/include/lang/ko/settings.php b/platform/www/lib/plugins/include/lang/ko/settings.php
new file mode 100644
index 0000000..5e6a18e
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/ko/settings.php
@@ -0,0 +1,39 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Myeongjin <aranet100@gmail.com>
+ * @author Erial <erial2@gmail.com>
+ */
+$lang['noheader'] = '포함된 문서/문단의 첫 문단 제목을 보이지 않기';
+$lang['firstseconly'] = '포함된 문서의 첫 문단만 보이기';
+$lang['showtaglogos'] = '첫 태그에 대한 그림 보이기';
+$lang['showfooter'] = '아래에 포함된 문서 대한 정보 보이기';
+$lang['showlink'] = '포함된 문서의 첫 문단 제목에 링크';
+$lang['showpermalink'] = '포함된 문서 아래에 고유링크 보이기';
+$lang['showdate'] = '포함된 문서 아래에 날짜 보이기';
+$lang['showmdate'] = '포함된 문서 아래에 수정된 날짜 보이기';
+$lang['showuser'] = '포함된 문서 아래에 사용자 이름 보이기';
+$lang['showcomments'] = '포함된 문서 아래에 댓글 보이기 (Discussion 플러그인 필요)';
+$lang['showlinkbacks'] = '포함된 문서 아래에 링크백 보이기 (Linkback 플러그인 필요)';
+$lang['showtags'] = '포함된 문서 아래에 태그 보이기 (Tag 플러그인 필요)';
+$lang['showeditbtn'] = '편집 버튼 보이기';
+$lang['doredirect'] = '포함된 문서를 편집하고 나서 원래 문서로 넘겨주기';
+$lang['doindent'] = '원래 문서의 해당 위치에서 포함된 문서를 들여쓰기';
+$lang['linkonly'] = '내용을 보여주는 대신 포함된 문서에만 링크';
+$lang['title'] = 'useheading이 꺼져 있어도 링크에서 문서의 첫 문단 제목을 사용 (linkonly 모드만 영향을 줍니다)';
+$lang['pageexists'] = '문서가 존재하지 않을 때 링크를 표시하지 않기 (linkonly 모드만 영향을 줍니다)';
+$lang['parlink'] = '링크 주위에 문단 넣기 (linkonly 모드만 영향을 줍니다)';
+$lang['safeindex'] = '공개되지 않은 포함된 문서에서 메타데이터의 색인을 방지';
+$lang['order'] = '여러 문서로 포함의 조건 정렬';
+$lang['order_o_id'] = '문서 ID';
+$lang['order_o_title'] = '제목';
+$lang['order_o_created'] = '만든 날짜';
+$lang['order_o_modified'] = '수정한 날짜';
+$lang['order_o_indexmenu'] = 'indexmenu 문법 사용자 지정 정렬';
+$lang['order_o_custom'] = 'include 문법 사용자 지정 정렬';
+$lang['rsort'] = '포함된 문서의 정렬 순서를 반대로';
+$lang['depth'] = '이름공간 포함의 최대 깊이, 제한 없는 깊이는 0';
+$lang['readmore'] = '첫문단일 경우에만 \'더 읽기\' 링크를 보이거나 보이지 않기';
+$lang['debugoutput'] = '전역 "allowdebug" 옵션이 활성화되어 있는 경우 도쿠위키 디버그로그에 상세한 디버그 정보를 출력';
diff --git a/platform/www/lib/plugins/include/lang/nl/lang.php b/platform/www/lib/plugins/include/lang/nl/lang.php
new file mode 100644
index 0000000..3d9ac2f
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/nl/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Gijs H. van Gemert <g.v.gemert@inter.nl.net>
+ */
+$lang['readmore'] = '→ Lees verder...';
diff --git a/platform/www/lib/plugins/include/lang/nl/settings.php b/platform/www/lib/plugins/include/lang/nl/settings.php
new file mode 100644
index 0000000..e2eb526
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/nl/settings.php
@@ -0,0 +1,40 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Mark Prins <mprins@users.sf.net>
+ * @author Johan Wijnker <johan@wijnker.eu>
+ * @author Gerrit Uitslag <klapinklapin@gmail.com>
+ */
+$lang['noheader'] = 'toon de eerste kop van de ingesloten pagina/sectie niet';
+$lang['firstseconly'] = 'toon alleen de eerste sectie van de ingesloten pagina\'s';
+$lang['showtaglogos'] = 'toon afbeelding voor het eerste label';
+$lang['showfooter'] = 'toon informatie over de pagina onder de ingesloten pagina';
+$lang['showlink'] = 'link de eerste kop van de ingesloten pagina';
+$lang['showpermalink'] = 'toon permanente link onder de ingesloten pagina';
+$lang['showdate'] = 'toon data onder de ingesloten pagina';
+$lang['showmdate'] = 'toon aanpassingsdatum onder de ingesloten pagina';
+$lang['showuser'] = 'toon gebruikersnamen onder de ingesloten pagina';
+$lang['showcomments'] = 'toon commentaar onder de ingesloten pagina (Discussion plugin vereist)';
+$lang['showlinkbacks'] = 'toon linkbacks onder de ingesloten pagina (Linkback plugin vereist)';
+$lang['showtags'] = 'toon labels onder de ingesloten pagina (Tag plugin vereist)';
+$lang['showeditbtn'] = 'toon aanpassen knop';
+$lang['doredirect'] = 'verwijs naar de originele pagina na aanpassen van de ingesloten pagina';
+$lang['doindent'] = 'spring ingesloten pagina\'s in relatief aan de pagina waarin ze ingesloten worden';
+$lang['linkonly'] = 'alleen een link naar de ingesloten pagina opnemen en niet de inhoud';
+$lang['title'] = 'gebruik de eerste kop als link ook al staat useheading uit (alleen van toepassing op linkonly modus)';
+$lang['pageexists'] = 'toon geen link als de pagina niet bestaat (alleen van toepassing op linkonly modus)';
+$lang['parlink'] = 'plaats een alinea om de link (alleen van toepassing op linkonly modus)';
+$lang['safeindex'] = 'voorkom indexering van metadata van niet-publieke ingesloten pagina\'s';
+$lang['order'] = 'volgorde criteria van insluitingen bij meerdere pagina\'s';
+$lang['order_o_id'] = 'pagina ID';
+$lang['order_o_title'] = 'titel';
+$lang['order_o_created'] = 'aanmaak datum';
+$lang['order_o_modified'] = 'aanpassingsdatum';
+$lang['order_o_indexmenu'] = 'aangepaste volgorde met indexmenu syntax';
+$lang['order_o_custom'] = 'aangepaste volgorde met include syntax';
+$lang['rsort'] = 'draai de sorteervolgorde van de ingesloten pagina\'s om';
+$lang['depth'] = 'maximum diepte van de naamruimte insluitingen, 0 voor onbeperkt';
+$lang['readmore'] = 'Toon de \'Lees verder\' link als er alleen een eerste deel is of niet';
+$lang['debugoutput'] = 'Schrijf uitgebreide debug informatie naar de DokuWiki debuglog als de globale "allowdebug" configuratieoptie is ingeschakeld';
diff --git a/platform/www/lib/plugins/include/lang/pl/lang.php b/platform/www/lib/plugins/include/lang/pl/lang.php
new file mode 100644
index 0000000..9e2eaf9
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/pl/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Bartek S <sadupl@gmail.com>
+ */
+$lang['readmore'] = '→Czytaj więcej...';
diff --git a/platform/www/lib/plugins/include/lang/pl/settings.php b/platform/www/lib/plugins/include/lang/pl/settings.php
new file mode 100644
index 0000000..35d89a6
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/pl/settings.php
@@ -0,0 +1,13 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Bartek S <sadupl@gmail.com>
+ */
+$lang['showtaglogos'] = 'Pokaż obrazek dla pierwszego tagu';
+$lang['showeditbtn'] = 'Pokaż przycisk edycji';
+$lang['order_o_id'] = 'ID strony';
+$lang['order_o_title'] = 'tytuł';
+$lang['order_o_created'] = 'data utworzenia';
+$lang['order_o_modified'] = 'data modyfikacji';
diff --git a/platform/www/lib/plugins/include/lang/pt-br/lang.php b/platform/www/lib/plugins/include/lang/pt-br/lang.php
new file mode 100644
index 0000000..883c19b
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/pt-br/lang.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * Portuguese language file
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Flávio Roberto Santos <flavio.barata@gmail.com>
+ */
+
+// custom language strings for the plugin
+$lang['readmore'] = '→ leia mais...';
+
+//Setup VIM: ex: et ts=2 :
diff --git a/platform/www/lib/plugins/include/lang/pt-br/settings.php b/platform/www/lib/plugins/include/lang/pt-br/settings.php
new file mode 100644
index 0000000..11cf604
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/pt-br/settings.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Portuguese language file
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Flávio Roberto Santos <flavio.barata@gmail.com>
+ */
+
+// for the configuration manager
+$lang['firstseconly'] = 'mostrar apenas primeira seção de registros do blog';
+$lang['showdate'] = 'mostrar datas abaixo dos registros do blog';
+$lang['showuser'] = 'mostrar usernames abaixo dos registros do blog';
+
+//Setup VIM: ex: et ts=2 :
diff --git a/platform/www/lib/plugins/include/lang/pt/lang.php b/platform/www/lib/plugins/include/lang/pt/lang.php
new file mode 100644
index 0000000..0de02df
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/pt/lang.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Portuguese language file
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Esther Brunner <wikidesign@gmail.com>
+ * @author Fernando Ribeiro <pinguim.ribeiro@gmail.com>
+ */
+
+// custom language strings for the plugin
+$lang['readmore'] = '→ Ler mais...';
+
+//Setup VIM: ex: et ts=2 :
diff --git a/platform/www/lib/plugins/include/lang/ru/lang.php b/platform/www/lib/plugins/include/lang/ru/lang.php
new file mode 100644
index 0000000..f8b1399
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/ru/lang.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Spike <Spike@Foobar2000.Ru>
+ * @author Aleksandr Selivanov <alexgearbox@gmail.com>
+ * @author Aleksandr Selivanov <alexgearbox@yandex.ru>
+ */
+$lang['readmore'] = 'Читать дальше...';
diff --git a/platform/www/lib/plugins/include/lang/ru/settings.php b/platform/www/lib/plugins/include/lang/ru/settings.php
new file mode 100644
index 0000000..f71c3af
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/ru/settings.php
@@ -0,0 +1,42 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Spike <Spike@Foobar2000.Ru>
+ * @author Aleksandr Selivanov <alexgearbox@gmail.com>
+ * @author Aleksandr Selivanov <alexgearbox@yandex.ru>
+ * @author RainbowSpike <1@2.ru>
+ * @author Paulo <mragvlik@gmail.com>
+ */
+$lang['noheader'] = 'Не показывать первый заголовок внедряемых страниц, секций';
+$lang['firstseconly'] = 'Показывать только первую секцию внедряемой страницы';
+$lang['showtaglogos'] = 'Показывать изображение для первого тега';
+$lang['showfooter'] = 'Снизу показывать информацию о внедряемой странице';
+$lang['showlink'] = 'Снизу показывать статичную ссылку на внедряемую страницу';
+$lang['showpermalink'] = 'Снизу показывать пермассылку на внедряемую страницу';
+$lang['showdate'] = 'Снизу показывать дату создания внедряемой страницы';
+$lang['showmdate'] = 'Снизу показывать дату изменения внедряемой страницы';
+$lang['showuser'] = 'Снизу показывать имя пользователя';
+$lang['showcomments'] = 'Показывать комментарии ниже внедряемой страницы (требуется плагин Discussion)';
+$lang['showlinkbacks'] = 'Показывать обратные ссылки ниже внедряемой страницы (требуется плагин Linkback)';
+$lang['showtags'] = 'Показывать теги ниже внедряемой страницы (требуется плагин Tag)';
+$lang['showeditbtn'] = 'Показывать кнопку «Править»';
+$lang['doredirect'] = 'Переходить на оригинальную страницу после редактирования внедрённой страницы';
+$lang['doindent'] = 'Создавать отступ для внедряемой страницы относительно основной страницы';
+$lang['linkonly'] = 'Вместо содержимого внедряемой страницы показывать ссылку на неё';
+$lang['title'] = 'Использовать для ссылки внедряемой страницы её первый заголовок, даже если обычно они не применяются (только для режима linkonly)';
+$lang['pageexists'] = 'Не показывать ссылку внедряемой страницы, если сама она не существует (только для режима linkonly)';
+$lang['parlink'] = 'Поместить ссылку внедряемой страницы в параграф (только для режима linkonly)';
+$lang['safeindex'] = 'Закрыть индексирование метаданных от непубличных внедряемых страниц';
+$lang['order'] = 'Сортировать внедряемые страницы по';
+$lang['order_o_id'] = 'ID страницы';
+$lang['order_o_title'] = 'заголовку';
+$lang['order_o_created'] = 'дате создания';
+$lang['order_o_modified'] = 'дате изменения';
+$lang['order_o_indexmenu'] = 'настраиваемый порядок с синтаксисом Indexmenu';
+$lang['order_o_custom'] = 'настраиваемый порядок с синтаксисом Include';
+$lang['rsort'] = 'Обратить порядок сортировки внедряемых страниц';
+$lang['depth'] = 'Максимальная глубина вложений пространств имён. Укажите 0 для снятия ограничений.';
+$lang['readmore'] = 'Показывать ссылку «Читать дальше...», если выбран показ первой секции?';
+$lang['debugoutput'] = 'Выводить подробную информации об отладке в журнал отладки «Докувики» при включённой глобальной опции allowdebug';
diff --git a/platform/www/lib/plugins/include/lang/sk/lang.php b/platform/www/lib/plugins/include/lang/sk/lang.php
new file mode 100644
index 0000000..fe6464d
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/sk/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Igor <korcek.igor@gmail.com>
+ */
+$lang['readmore'] = '→ čítatať viac...';
diff --git a/platform/www/lib/plugins/include/lang/sk/settings.php b/platform/www/lib/plugins/include/lang/sk/settings.php
new file mode 100644
index 0000000..4492423
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/sk/settings.php
@@ -0,0 +1,37 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Igor <korcek.igor@gmail.com>
+ */
+$lang['noheader'] = 'Nezobrazovať prvý nadpis zahrnutej stránky/sekcie';
+$lang['firstseconly'] = 'Zobraziť len prvú sekciu zahrnutej stránky';
+$lang['showtaglogos'] = 'Zobraziť obrázok pre prvý tag';
+$lang['showfooter'] = 'Zobraziť informáciu o zahrnutej stránke nižšie';
+$lang['showlink'] = 'Prepoj prvý nadpis zahrnutej stránky';
+$lang['showpermalink'] = 'Zobraziť trvalé odkazy pod zahrnutou stránkou';
+$lang['showdate'] = 'Zobraziť dátum pod zahrnutou stránkou';
+$lang['showmdate'] = 'Zobraziť dátum úpravy pod zahrnutou stránkou';
+$lang['showuser'] = 'Zobraziť užívateľov pod zahrnutou stránkou';
+$lang['showcomments'] = 'Zobraziť komentáre pod zahrnutou stránkou (potrebný Discussion plugin)';
+$lang['showlinkbacks'] = 'Zobraziť spätné odkazy pod zahrnutou stránkou (potrebný Linkback plugin)';
+$lang['showtags'] = 'Zobraziť tagy pod zahrnutou stránkou (potrebný Tag plugin)';
+$lang['showeditbtn'] = 'Zobraziť tlačítko upraviť';
+$lang['doredirect'] = 'Po úprave zahrnutej stránky presmerovať na pôvodnú stránku';
+$lang['doindent'] = 'Odsadiť zahrnuté stránky relatívne k stránke na ktorej budú zahrnuté';
+$lang['linkonly'] = 'Len odkazy bez zobrazenia obsahu';
+$lang['title'] = 'Používaj prvý nadpis stránky v odkazoch aj keď je používanie nadpisov vypnuté (ovplyvní len linkonly mód)';
+$lang['pageexists'] = 'Nezobrazovať odkaz ak stránka neexistuje (ovplyvňuje len linkonly mód)';
+$lang['parlink'] = 'Vlož odstavec k odkazu (ovplyvňuje iba mód linkonly)';
+$lang['safeindex'] = 'Zabrániť indexovaniu meta údajov z neverejných zahrnutých stránok';
+$lang['order'] = 'Kritéria radenia zahrnutých stránok pri viacerých stránkach';
+$lang['order_o_id'] = 'ID stránky';
+$lang['order_o_title'] = 'Názov';
+$lang['order_o_created'] = 'dátum vytvorenia';
+$lang['order_o_modified'] = 'dátum úpravy';
+$lang['order_o_indexmenu'] = 'vlastné poradie pomocou syntaxe indexmenu';
+$lang['order_o_custom'] = 'vlastné poradie pomocou syntaxe include';
+$lang['rsort'] = 'Prevrátiť poradie zahrnutých stránok';
+$lang['depth'] = 'Maximálna hĺbka zahrnutých menných priestorov (namespaces), 0 pre neobmedzenú hĺbku';
+$lang['readmore'] = 'Zobraziť odkaz \'Čítať viac\' iba v prípade prvej sekcie';
diff --git a/platform/www/lib/plugins/include/lang/sl/lang.php b/platform/www/lib/plugins/include/lang/sl/lang.php
new file mode 100644
index 0000000..9a9e24c
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/sl/lang.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * Slovenian language file
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Blaž Mertelj <Blaz.Mertelj@atol.si>
+ */
+
+// custom language strings for the plugin
+$lang['readmore'] = '→ Preberi več...';
+
+//Setup VIM: ex: et ts=2 : \ No newline at end of file
diff --git a/platform/www/lib/plugins/include/lang/sl/settings.php b/platform/www/lib/plugins/include/lang/sl/settings.php
new file mode 100644
index 0000000..7e9ed41
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/sl/settings.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Slovenian language file
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Blaž Mertelj <Blaz.Mertelj@atol.si>
+ */
+
+// for the configuration manager
+$lang['firstseconly'] = 'prikaži samo prvo sekcijo blog vnosov';
+
+$lang['showlink'] = 'prikaži permalinke pod blog vnosi';
+$lang['showdate'] = 'prikaži datume pod blog vnosi';
+$lang['showuser'] = 'prikaži uporabniška imena pod blog vnosi';
+
+//Setup VIM: ex: et ts=2 : \ No newline at end of file
diff --git a/platform/www/lib/plugins/include/lang/sv/lang.php b/platform/www/lib/plugins/include/lang/sv/lang.php
new file mode 100644
index 0000000..cc8b57a
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/sv/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Christer Nygren <wiki@fronet.fro.se>
+ */
+$lang['readmore'] = '→ Läs mer...';
diff --git a/platform/www/lib/plugins/include/lang/sv/settings.php b/platform/www/lib/plugins/include/lang/sv/settings.php
new file mode 100644
index 0000000..3e966d0
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/sv/settings.php
@@ -0,0 +1,39 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Christer Nygren <wiki@fronet.fro.se>
+ * @author Tor Härnqvist <tor@harnqvist.se>
+ */
+$lang['noheader'] = 'Visa inte första rubriken från inkluderade sidor/sektioner';
+$lang['firstseconly'] = 'visa endast första delen av inkluderad sida';
+$lang['showtaglogos'] = 'Visa bild för första tagg';
+$lang['showfooter'] = 'Visa information om inkluderad sidan nedanför';
+$lang['showlink'] = 'visa permalinks under inkluderad sida';
+$lang['showpermalink'] = 'Visa permalänk nedanför inkluderad sida';
+$lang['showdate'] = 'visa datum under inkluderad sida';
+$lang['showmdate'] = 'Visa ändringsdatum nedanför inkluderad sida';
+$lang['showuser'] = 'visa användarnamn under inkluderad sida';
+$lang['showcomments'] = 'Visa kommentarer nedanför inkluderad sida (Discussion-plugin krävs)';
+$lang['showlinkbacks'] = 'Visa tillbakalänkingar nedanför inkluderad sida (Linkback-plugin krävs)';
+$lang['showtags'] = 'Visa taggar nedanför inkluderad sida (tagg-plugin krävs)';
+$lang['showeditbtn'] = 'Visa redigera-knapp';
+$lang['doredirect'] = 'Omdirigera till originalsidan efter redigering av den inkluderade sidan';
+$lang['doindent'] = 'Gör indrag för inkluderande sidor relativt den sida som de är inkluderad på';
+$lang['linkonly'] = 'Länka enbart till den inkluderade sidan, istället för att visa dess innehåll';
+$lang['title'] = 'Visa första rubriken på sidan som länk även om rubrikvisning är inaktiverat (påverkar enbart endast länkingsinställning)';
+$lang['pageexists'] = 'Visa inte en länk om sidan inte existerar (påverkar enbart endast länkingsinställning)';
+$lang['parlink'] = 'Placera ett stycke kring länken (påverkar enbart endast länkingsinställning)';
+$lang['safeindex'] = 'Förhindra metadataindexering från icke-publika sidor';
+$lang['order'] = 'Kriterier för sortering vid inkludering av multipla sidor ';
+$lang['order_o_id'] = 'sid-ID';
+$lang['order_o_title'] = 'rubrik';
+$lang['order_o_created'] = 'skapandedatum';
+$lang['order_o_modified'] = 'ändringsdatum';
+$lang['order_o_indexmenu'] = 'användardefinierad ordning med indexmeny-syntax';
+$lang['order_o_custom'] = 'användardefinierad ordning med include-syntax';
+$lang['rsort'] = 'Omvänd sortering på inkluderade sidor';
+$lang['depth'] = 'Maximalt djup på namnrymder att inkludera, 0 för obegränsat djup';
+$lang['readmore'] = 'Visa eller gör \'Läs mer\'-länk i fall bara förstasektionen';
+$lang['debugoutput'] = 'Skriv ut mer omfattande avlusningsinformation till DokuWiki-avlusningsloggen om det globala "allowdebug"-alternativet är aktiverat';
diff --git a/platform/www/lib/plugins/include/lang/tr/lang.php b/platform/www/lib/plugins/include/lang/tr/lang.php
new file mode 100644
index 0000000..5818552
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/tr/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author İlker R. Kapaç <irifat@gmail.com>
+ */
+$lang['readmore'] = '→ Devamını oku..';
diff --git a/platform/www/lib/plugins/include/lang/tr/settings.php b/platform/www/lib/plugins/include/lang/tr/settings.php
new file mode 100644
index 0000000..7e3bffc
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/tr/settings.php
@@ -0,0 +1,36 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author İlker R. Kapaç <irifat@gmail.com>
+ */
+$lang['noheader'] = 'Eklenen sayfaların/bölümlerin ilk başlığını gösterme';
+$lang['firstseconly'] = 'eklenen sayfaların sadece ilk bölümünü göster';
+$lang['showtaglogos'] = 'ilk etiket için resim göster';
+$lang['showfooter'] = 'alt tarafta, eklenen sayfa için bilgi göster';
+$lang['showlink'] = 'eklenen sayfanın ilk başlığını bağlantı haline getir';
+$lang['showpermalink'] = 'eklenen sayfanın altında kalıcı bağlantılar göster';
+$lang['showdate'] = 'eklenen sayfanın altında tarihleri göster';
+$lang['showmdate'] = 'eklenen sayfanın altında değiştirilme tarihlerini göster';
+$lang['showuser'] = 'eklenen sayfanın altında kullanıcı isimlerini göster';
+$lang['showcomments'] = 'eklenen sayfanın altında tartışmaları görüntüle (Bunun için Discussion eklentisi gereklidir)';
+$lang['showlinkbacks'] = 'eklenen sayfanın altında geri bağlantıları göster (Bunun için Linkback eklentisi gereklidir)';
+$lang['showtags'] = 'eklenen sayfanın altında etiketleri göster (Bunun için Tag eklentisi gereklidir)';
+$lang['showeditbtn'] = 'düzenle düğmesini göster';
+$lang['doredirect'] = 'eklenen sayfayı düzenledikten sonra orjinal sayfaya yönlendir';
+$lang['doindent'] = 'eklenen sayfaları dahil edildikleri sayfaya göre girintili yap';
+$lang['linkonly'] = 'içeriği göstermek yerine, sadece eklenen sayfaya bağlantı göster';
+$lang['title'] = 'sayfa başlığını kullanma kapalı bile olsa, sayfanın ilk başlığını bağlantıda kullan (yalnızca bağlantı göster seceneği etkinken çalışır)';
+$lang['pageexists'] = 'sayfa mevcut değilse bağlantı gösterme (yalnızca bağlantı göster seceneği etkinken çalışır)';
+$lang['parlink'] = 'bağlantıya bir paragraf ekle (yalnızca bağlantı göster seceneği etkinken çalışır)';
+$lang['safeindex'] = 'eklenmiş kamuya kapalı (non-public) sayfadan üstverinin (metadata) dizine alınmasına izin verme';
+$lang['order'] = 'çok sayfalı eklemeler için sıralama ölçütü';
+$lang['order_o_id'] = 'sayfa kimliği (ID)';
+$lang['order_o_title'] = 'başlık';
+$lang['order_o_created'] = 'oluşturma tarihi';
+$lang['order_o_modified'] = 'değiştirilme tarihi';
+$lang['order_o_indexmenu'] = 'indexmenu sözdizimi ile rasgele sıralı';
+$lang['order_o_custom'] = 'include sözdizimi ile rasgele sıralı';
+$lang['rsort'] = 'eklenen sayfaların sıralamasını ters çevir';
+$lang['depth'] = 'dahil edilecek en fazla isimalanı derinliği, sınırsız derinlik için 0';
diff --git a/platform/www/lib/plugins/include/lang/vi/lang.php b/platform/www/lib/plugins/include/lang/vi/lang.php
new file mode 100644
index 0000000..24b7703
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/vi/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Thien Hau <thienhau.9a14@gmail.com>
+ */
+$lang['readmore'] = '→ Đọc thêm...';
diff --git a/platform/www/lib/plugins/include/lang/vi/settings.php b/platform/www/lib/plugins/include/lang/vi/settings.php
new file mode 100644
index 0000000..db280b9
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/vi/settings.php
@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Thien Hau <thienhau.9a14@gmail.com>
+ */
+$lang['noheader'] = 'Không hiển thị đầu đề đầu tiên của các trang/phần được bao gồm';
+$lang['firstseconly'] = 'Chỉ hiển thị phần đầu tiên của các trang được bao gồm';
+$lang['showtaglogos'] = 'Hiển thị hình ảnh cho thẻ đầu tiên';
+$lang['showfooter'] = 'Hiển thị thông tin về trang được bao gồm bên dưới';
+$lang['showlink'] = 'Liên kết đầu đề đầu tiên của trang được bao gồm';
+$lang['showpermalink'] = 'Hiển thị liên kết cố định bên dưới trang được bao gồm';
+$lang['showdate'] = 'Hiển thị ngày bên dưới trang được bao gồm';
+$lang['showmdate'] = 'Hiển thị ngày sửa đổi bên dưới trang được bao gồm';
+$lang['showuser'] = 'Hiển thị tên thành viên bên dưới trang bao gồm';
+$lang['showcomments'] = 'Hiển thị nhận xét bên dưới trang được bao gồm (Cần có plugin Discussion)';
+$lang['showlinkbacks'] = 'Hiển thị linkbacks bên dưới trang được bao gồm (Cần có Plugin Linkback)';
+$lang['showtags'] = 'Hiển thị các thẻ bên dưới trang được bao gồm (Cần có Plugin Tag)';
+$lang['showeditbtn'] = 'Hiển thị nút sửa đổi';
+$lang['doredirect'] = 'Đổi hướng đến trang gốc sau khi sửa đổi trang được bao gồm';
+$lang['doindent'] = 'Thụt lề các trang được bao gồm liên quan đến trang mà chúng được đưa vào';
+$lang['linkonly'] = 'Chỉ liên kết đến trang được bao gồm thay vì hiển thị nội dung';
+$lang['title'] = 'Sử dụng đầu đề đầu tiên của trang trong liên kết ngay cả khi useheading bị tắt (chỉ ảnh hưởng đến chế độ chỉ liên kết (linkonly))';
+$lang['pageexists'] = 'Không hiển thị liên kết nếu trang không tồn tại (chỉ ảnh hưởng đến chế độ chỉ liên kết)';
+$lang['parlink'] = 'Đặt một đoạn quanh liên kết (chỉ ảnh hưởng đến chế độ chỉ liên kết)';
+$lang['safeindex'] = 'Ngăn lập chỉ mục siêu dữ liệu từ các trang được bao gồm không công khai';
+$lang['order'] = 'Xếp tiêu chí của bao gồm với nhiều trang';
+$lang['order_o_id'] = 'ID trang';
+$lang['order_o_title'] = 'tiêu đề';
+$lang['order_o_created'] = 'ngày khởi tạo';
+$lang['order_o_modified'] = 'ngày sửa đổi';
+$lang['order_o_indexmenu'] = 'Xếp tùy chỉnh với cú pháp indexmenu';
+$lang['order_o_custom'] = 'Xếp tùy chỉnh với cú pháp bao gồm';
+$lang['rsort'] = 'Đảo ngược thứ tự sắp xếp của các trang được bao gồm';
+$lang['depth'] = 'Độ sâu tối đa của không gian tên bao gồm, 0 cho không giới hạn độ sâu';
+$lang['readmore'] = 'Hiển thị hay không liên kết \'Đọc thêm\' chỉ trong trường hợp phần đầu tiên';
+$lang['debugoutput'] = 'In thông tin gỡ lỗi dài dòng vào nhật ký gỡ lỗi dokuwiki nếu tùy chọn toàn cục "allowdebug" được bật';
diff --git a/platform/www/lib/plugins/include/lang/zh/lang.php b/platform/www/lib/plugins/include/lang/zh/lang.php
new file mode 100644
index 0000000..02e49b3
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/zh/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author lainme <lainme993@gmail.com>
+ */
+$lang['readmore'] = '→ 阅读更多...';
diff --git a/platform/www/lib/plugins/include/lang/zh/settings.php b/platform/www/lib/plugins/include/lang/zh/settings.php
new file mode 100644
index 0000000..9cc6339
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/zh/settings.php
@@ -0,0 +1,33 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author lainme <lainme993@gmail.com>
+ * @author Test2g <zccnexus@gmail.com>
+ */
+$lang['noheader'] = '不要显示所包含的页面/章节中的第一个标题';
+$lang['firstseconly'] = '仅显示所包含页面的第一个章节';
+$lang['showtaglogos'] = '对第一个标签显示图片';
+$lang['showfooter'] = '在下方显示所包含页面的信息';
+$lang['showlink'] = '对所包含页面的第一个标题加超链接';
+$lang['showpermalink'] = '在下方显示所包含页面的永久链接';
+$lang['showdate'] = '在下方显示所包含页面的日期';
+$lang['showmdate'] = '在下方显示所包含页面的修改日期';
+$lang['showuser'] = '在下方显示所包含页面的用户名';
+$lang['showcomments'] = '在下方显示所包含页面的评论数';
+$lang['showlinkbacks'] = '在下方显示所包含页面的 linkback';
+$lang['showtags'] = '在下方显示所包含页面的标签';
+$lang['showeditbtn'] = '显示编辑按钮';
+$lang['doredirect'] = '编辑所包含的页面后转向到原始页面';
+$lang['doindent'] = '相对所在页面对包含的页面进行缩进';
+$lang['linkonly'] = '仅显示到所包含页面的链接而不显示内容';
+$lang['title'] = '即使 useheading 选项关闭也使用页面的第一个标题进行超链接 (仅影响 linkonly 模式)';
+$lang['pageexists'] = '不要显示不存在的页面的链接 (仅影响 linkonly 模式)';
+$lang['parlink'] = '将一个段落环绕显示在链接旁(仅对linkonly模式有效)';
+$lang['order_o_id'] = '页面 ID';
+$lang['order_o_title'] = '标题';
+$lang['order_o_created'] = '创建日期';
+$lang['order_o_modified'] = '修改日期';
+$lang['rsort'] = '对包含的页面进行反向排序';
+$lang['depth'] = '包含命名空间的最大深度,0表示不限制';
diff --git a/platform/www/lib/plugins/include/plugin.info.txt b/platform/www/lib/plugins/include/plugin.info.txt
new file mode 100644
index 0000000..5ed4a1d
--- /dev/null
+++ b/platform/www/lib/plugins/include/plugin.info.txt
@@ -0,0 +1,7 @@
+base include
+author Michael Hamann, Gina Häussge, Christopher Smith, Michael Klier, Esther Brunner
+email michael@content-space.de
+date 2022-01-23
+name include plugin
+desc Functions to include another page in a wiki page
+url http://dokuwiki.org/plugin:include
diff --git a/platform/www/lib/plugins/include/requirements.txt b/platform/www/lib/plugins/include/requirements.txt
new file mode 100644
index 0000000..b01bbd9
--- /dev/null
+++ b/platform/www/lib/plugins/include/requirements.txt
@@ -0,0 +1,2 @@
+# requirements for testing
+https://github.com/michitux/dokuwiki-plugin-move.git lib/plugins/move
diff --git a/platform/www/lib/plugins/include/script.js b/platform/www/lib/plugins/include/script.js
new file mode 100644
index 0000000..8c1edbb
--- /dev/null
+++ b/platform/www/lib/plugins/include/script.js
@@ -0,0 +1,22 @@
+/**
+ * Javascript functionality for the include plugin
+ */
+
+/**
+ * Highlight the included section when hovering over the appropriate include edit button
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ * @author Michael Klier <chi@chimeric.de>
+ * @author Michael Hamann <michael@content-space.de>
+ */
+jQuery(function() {
+ jQuery('.btn_incledit')
+ .mouseover(function () {
+ jQuery(this).closest('.plugin_include_content').addClass('section_highlight');
+ })
+ .mouseout(function () {
+ jQuery('.section_highlight').removeClass('section_highlight');
+ });
+});
+
+// vim:ts=4:sw=4:et:
diff --git a/platform/www/lib/plugins/include/style.css b/platform/www/lib/plugins/include/style.css
new file mode 100644
index 0000000..63aa35a
--- /dev/null
+++ b/platform/www/lib/plugins/include/style.css
@@ -0,0 +1,53 @@
+div.dokuwiki div.plugin_include_content div.secedit {
+ float: right;
+ margin-left: 1em;
+ margin-top: 0;
+}
+
+div.dokuwiki div.inclmeta {
+ border-top: 1px dotted __border__;
+ padding-top: 0.2em;
+ color: __text_neu__;
+ font-size: 80%;
+ line-height: 1.25;
+ /*margin-top: 0.5em;*/
+ margin-bottom: 2em;
+}
+
+div.dokuwiki div.inclmeta a.permalink {
+ background: transparent url(images/link.gif) 0px 1px no-repeat;
+ padding: 1px 0px 1px 16px;
+}
+
+div.dokuwiki div.inclmeta abbr.published {
+ background: transparent url(images/date.gif) 0px 1px no-repeat;
+ padding: 1px 0px 1px 16px;
+ border-bottom: 0;
+}
+
+div.dokuwiki div.inclmeta span.author {
+ background: transparent url(images/user.gif) 0px 1px no-repeat;
+ padding: 1px 0px 1px 16px;
+}
+
+/* Disable the default interwiki icon for the user link (if there is any) */
+div.dokuwiki div.inclmeta span.author a.interwiki {
+ background: none;
+ padding: 0;
+}
+
+div.dokuwiki div.inclmeta span.comment {
+ background: transparent url(images/comment.gif) 0px 1px no-repeat;
+ padding: 1px 0px 1px 16px;
+}
+
+div.dokuwiki div.inclmeta div.tags {
+ border-top: 0;
+ font-size: 100%;
+ float: right;
+ clear: none;
+}
+
+div.dokuwiki p.include_readmore {
+ text-align: right;
+}
diff --git a/platform/www/lib/plugins/include/syntax/closelastsecedit.php b/platform/www/lib/plugins/include/syntax/closelastsecedit.php
new file mode 100644
index 0000000..a5741c8
--- /dev/null
+++ b/platform/www/lib/plugins/include/syntax/closelastsecedit.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Include plugin (close last section edit)
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Michael Hamann <michael@content-space.de>
+ */
+
+class syntax_plugin_include_closelastsecedit extends DokuWiki_Syntax_Plugin {
+
+ function getType() {
+ return 'formatting';
+ }
+
+ function getSort() {
+ return 50;
+ }
+
+ function handle($match, $state, $pos, Doku_Handler $handler) {
+ // this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser
+ }
+
+ /**
+ * Finishes the last open section edit
+ */
+ function render($mode, Doku_Renderer $renderer, $data) {
+ if ($mode == 'xhtml') {
+ /** @var Doku_Renderer_xhtml $renderer */
+ list($endpos) = $data;
+ $renderer->finishSectionEdit($endpos);
+ return true;
+ }
+ return false;
+ }
+}
+// vim:ts=4:sw=4:et:
diff --git a/platform/www/lib/plugins/include/syntax/editbtn.php b/platform/www/lib/plugins/include/syntax/editbtn.php
new file mode 100644
index 0000000..4d9367f
--- /dev/null
+++ b/platform/www/lib/plugins/include/syntax/editbtn.php
@@ -0,0 +1,43 @@
+<?php
+/**
+ * Include plugin (editbtn header component)
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Michael Klier <chi@chimeric.de>
+ */
+
+class syntax_plugin_include_editbtn extends DokuWiki_Syntax_Plugin {
+
+ function getType() {
+ return 'formatting';
+ }
+
+ function getSort() {
+ return 50;
+ }
+
+ function handle($match, $state, $pos, Doku_Handler $handler) {
+ // this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser
+ }
+
+ /**
+ * Renders an include edit button
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ */
+ function render($mode, Doku_Renderer $renderer, $data) {
+ list($title, $hid) = $data;
+ if ($mode == 'xhtml') {
+ if (defined('SEC_EDIT_PATTERN')) { // for DokuWiki Greebo and more recent versions
+ $renderer->startSectionEdit(0, array('target' => 'plugin_include_editbtn', 'name' => $title, 'hid' => $hid));
+ } else {
+ $renderer->startSectionEdit(0, 'plugin_include_editbtn', $title);
+ }
+
+ $renderer->finishSectionEdit();
+ return true;
+ }
+ return false;
+ }
+}
+// vim:ts=4:sw=4:et:
diff --git a/platform/www/lib/plugins/include/syntax/footer.php b/platform/www/lib/plugins/include/syntax/footer.php
new file mode 100644
index 0000000..4be5ac4
--- /dev/null
+++ b/platform/www/lib/plugins/include/syntax/footer.php
@@ -0,0 +1,133 @@
+<?php
+/**
+ * Include plugin (footer component)
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Michael Klier <chi@chimeric.de>
+ */
+
+class syntax_plugin_include_footer extends DokuWiki_Syntax_Plugin {
+
+ function getType() {
+ return 'formatting';
+ }
+
+ function getSort() {
+ return 300;
+ }
+
+ function handle($match, $state, $pos, Doku_Handler $handler) {
+ // this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser
+ }
+
+ /**
+ * Renders a permalink header.
+ *
+ * Code heavily copied from the header renderer from inc/parser/xhtml.php, just
+ * added an href parameter to the anchor tag linking to the wikilink.
+ */
+ function render($mode, Doku_Renderer $renderer, $data) {
+
+ list($page, $sect, $sect_title, $flags, $redirect_id, $footer_lvl) = $data;
+
+ if ($mode == 'xhtml') {
+ $renderer->doc .= $this->html_footer($page, $sect, $sect_title, $flags, $footer_lvl, $renderer);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Returns the meta line below the included page
+ * @param $renderer Doku_Renderer_xhtml The (xhtml) renderer
+ * @return string The HTML code of the footer
+ */
+ function html_footer($page, $sect, $sect_title, $flags, $footer_lvl, &$renderer) {
+ global $conf, $ID;
+
+ if(!$flags['footer']) return '';
+
+ $meta = p_get_metadata($page);
+ $exists = page_exists($page);
+ $xhtml = array();
+ // permalink
+ if ($flags['permalink']) {
+ $class = ($exists ? 'wikilink1' : 'wikilink2');
+ $url = ($sect) ? wl($page) . '#' . $sect : wl($page);
+ $name = ($sect) ? $sect_title : $page;
+ $title = ($sect) ? $page . '#' . $sect : $page;
+ if (!$title) $title = str_replace('_', ' ', noNS($page));
+ $link = array(
+ 'url' => $url,
+ 'title' => $title,
+ 'name' => $name,
+ 'target' => $conf['target']['wiki'],
+ 'class' => $class . ' permalink',
+ 'more' => 'rel="bookmark"',
+ );
+ $xhtml[] = $renderer->_formatLink($link);
+ }
+
+ // date
+ if ($flags['date'] && $exists) {
+ $date = $meta['date']['created'];
+ if ($date) {
+ $xhtml[] = '<abbr class="published" title="'.strftime('%Y-%m-%dT%H:%M:%SZ', $date).'">'
+ . strftime($conf['dformat'], $date)
+ . '</abbr>';
+ }
+ }
+
+ // modified date
+ if ($flags['mdate'] && $exists) {
+ $mdate = $meta['date']['modified'];
+ if ($mdate) {
+ $xhtml[] = '<abbr class="published" title="'.strftime('%Y-%m-%dT%H:%M:%SZ', $mdate).'">'
+ . strftime($conf['dformat'], $mdate)
+ . '</abbr>';
+ }
+ }
+
+ // author
+ if ($flags['user'] && $exists) {
+ $author = $meta['user'];
+ if ($author) {
+ if (function_exists('userlink')) {
+ $xhtml[] = '<span class="vcard author">' . userlink($author) . '</span>';
+ } else { // DokuWiki versions < 2014-05-05 doesn't have userlink support, fall back to not providing a link
+ $xhtml[] = '<span class="vcard author">' . editorinfo($author) . '</span>';
+ }
+ }
+ }
+
+ // comments - let Discussion Plugin do the work for us
+ if (empty($sect) && $flags['comments'] && (!plugin_isdisabled('discussion')) && ($discussion = plugin_load('helper', 'discussion'))) {
+ $disc = $discussion->td($page);
+ if ($disc) $xhtml[] = '<span class="comment">' . $disc . '</span>';
+ }
+
+ // linkbacks - let Linkback Plugin do the work for us
+ if (empty($sect) && $flags['linkbacks'] && (!plugin_isdisabled('linkback')) && ($linkback = plugin_load('helper', 'linkback'))) {
+ $link = $linkback->td($page);
+ if ($link) $xhtml[] = '<span class="linkback">' . $link . '</span>';
+ }
+
+ $xhtml = implode(DOKU_LF . DOKU_TAB . '&middot; ', $xhtml);
+
+ // tags - let Tag Plugin do the work for us
+ if (empty($sect) && $flags['tags'] && (!plugin_isdisabled('tag')) && ($tag = plugin_load('helper', 'tag'))) {
+ $tags = $tag->td($page);
+ if($tags) {
+ $xhtml .= '<div class="tags"><span>' . DOKU_LF
+ . DOKU_TAB . $tags . DOKU_LF
+ . DOKU_TAB . '</span></div>' . DOKU_LF;
+ }
+ }
+
+ if (!$xhtml) $xhtml = '&nbsp;';
+ $class = 'inclmeta';
+ $class .= ' level' . $footer_lvl;
+ return '<div class="' . $class . '">' . DOKU_LF . DOKU_TAB . $xhtml . DOKU_LF . '</div>' . DOKU_LF;
+ }
+}
+// vim:ts=4:sw=4:et:
diff --git a/platform/www/lib/plugins/include/syntax/header.php b/platform/www/lib/plugins/include/syntax/header.php
new file mode 100644
index 0000000..3f14dcb
--- /dev/null
+++ b/platform/www/lib/plugins/include/syntax/header.php
@@ -0,0 +1,95 @@
+<?php
+/**
+ * Include plugin (permalink header component)
+ *
+ * Provides a header instruction which renders a permalink to the included page
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Gina Haeussge <osd@foosel.net>
+ * @author Michael Klier <chi@chimeric.de>
+ */
+
+class syntax_plugin_include_header extends DokuWiki_Syntax_Plugin {
+
+ function getType() {
+ return 'formatting';
+ }
+
+ function getSort() {
+ return 50;
+ }
+
+ function handle($match, $state, $pos, Doku_Handler $handler) {
+ // this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser
+ }
+
+ /**
+ * Renders a permalink header.
+ *
+ * Code heavily copied from the header renderer from inc/parser/xhtml.php, just
+ * added an href parameter to the anchor tag linking to the wikilink.
+ */
+ function render($mode, Doku_Renderer $renderer, $data) {
+ global $conf;
+
+ list($headline, $lvl, $pos, $page, $sect, $flags) = $data;
+
+ if ($mode == 'xhtml') {
+ /** @var Doku_Renderer_xhtml $renderer */
+ $hid = $renderer->_headerToLink($headline, true);
+ $renderer->toc_additem($hid, $headline, $lvl);
+ $url = ($sect) ? wl($page) . '#' . $sect : wl($page);
+ $renderer->doc .= DOKU_LF.'<h' . $lvl;
+ $classes = array();
+ if($flags['taglogos']) {
+ $tag = $this->_get_firsttag($page);
+ if($tag) {
+ $classes[] = 'include_firsttag__' . $tag;
+ }
+ }
+ // the include header instruction is always at the beginning of the first section edit inside the include
+ // wrap so there is no need to close a previous section edit.
+ if ($lvl <= $conf['maxseclevel']) {
+ if (defined('SEC_EDIT_PATTERN')) { // for DokuWiki Greebo and more recent versions
+ $classes[] = $renderer->startSectionEdit($pos, array('target' => 'section', 'name' => $headline, 'hid' => $hid));
+ } else {
+ $classes[] = $renderer->startSectionEdit($pos, 'section', $headline);
+ }
+ }
+ if ($classes) {
+ $renderer->doc .= ' class="'. implode(' ', $classes) . '"';
+ }
+ $headline = $renderer->_xmlEntities($headline);
+ $renderer->doc .= ' id="'.$hid.'"><a href="' . $url . '" title="' . $headline . '">';
+ $renderer->doc .= $headline;
+ $renderer->doc .= '</a></h' . $lvl . '>' . DOKU_LF;
+ return true;
+ } else {
+ $renderer->header($headline, $lvl, $pos);
+ }
+ return false;
+ }
+
+ /**
+ * Optionally add a CSS class for the first tag
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ */
+ function _get_firsttag($page) {
+ if(plugin_isdisabled('tag') || (!plugin_load('helper', 'tag'))) {
+ return false;
+ }
+ $subject = p_get_metadata($page, 'subject');
+ if (is_array($subject)) {
+ $tag = $subject[0];
+ } else {
+ list($tag, $rest) = explode(' ', $subject, 2);
+ }
+ if($tag) {
+ return $tag;
+ } else {
+ return false;
+ }
+ }
+}
+// vim:ts=4:sw=4:et:
diff --git a/platform/www/lib/plugins/include/syntax/include.php b/platform/www/lib/plugins/include/syntax/include.php
new file mode 100644
index 0000000..44b803a
--- /dev/null
+++ b/platform/www/lib/plugins/include/syntax/include.php
@@ -0,0 +1,173 @@
+<?php
+/**
+ * Include Plugin: displays a wiki page within another
+ * Usage:
+ * {{page>page}} for "page" in same namespace
+ * {{page>:page}} for "page" in top namespace
+ * {{page>namespace:page}} for "page" in namespace "namespace"
+ * {{page>.namespace:page}} for "page" in subnamespace "namespace"
+ * {{page>page#section}} for a section of "page"
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Esther Brunner <wikidesign@gmail.com>
+ * @author Christopher Smith <chris@jalakai.co.uk>
+ * @author Gina Häußge, Michael Klier <dokuwiki@chimeric.de>
+ */
+
+/**
+ * All DokuWiki plugins to extend the parser/rendering mechanism
+ * need to inherit from this class
+ */
+class syntax_plugin_include_include extends DokuWiki_Syntax_Plugin {
+
+ /** @var $helper helper_plugin_include */
+ var $helper = null;
+
+ /**
+ * Get syntax plugin type.
+ *
+ * @return string The plugin type.
+ */
+ function getType() { return 'substition'; }
+
+ /**
+ * Get sort order of syntax plugin.
+ *
+ * @return int The sort order.
+ */
+ function getSort() { return 303; }
+
+ /**
+ * Get paragraph type.
+ *
+ * @return string The paragraph type.
+ */
+ function getPType() { return 'block'; }
+
+ /**
+ * Connect patterns/modes
+ *
+ * @param $mode mixed The current mode
+ */
+ function connectTo($mode) {
+ $this->Lexer->addSpecialPattern("{{page>.+?}}", $mode, 'plugin_include_include');
+ $this->Lexer->addSpecialPattern("{{section>.+?}}", $mode, 'plugin_include_include');
+ $this->Lexer->addSpecialPattern("{{namespace>.+?}}", $mode, 'plugin_include_include');
+ $this->Lexer->addSpecialPattern("{{tagtopic>.+?}}", $mode, 'plugin_include_include');
+ }
+
+ /**
+ * Handle syntax matches
+ *
+ * @param string $match The current match
+ * @param int $state The match state
+ * @param int $pos The position of the match
+ * @param Doku_Handler $handler The hanlder object
+ * @return array The instructions of the plugin
+ */
+ function handle($match, $state, $pos, Doku_Handler $handler) {
+
+ $match = substr($match, 2, -2); // strip markup
+ list($match, $flags) = array_pad(explode('&', $match, 2), 2, '');
+
+ // break the pattern up into its parts
+ list($mode, $page, $sect) = array_pad(preg_split('/>|#/u', $match, 3), 3, null);
+ $check = false;
+ if (isset($sect)) $sect = sectionID($sect, $check);
+ $level = NULL;
+ return array($mode, $page, $sect, explode('&', $flags), $level, $pos);
+ }
+
+ /**
+ * Renders the included page(s)
+ *
+ * @author Michael Hamann <michael@content-space.de>
+ */
+ function render($format, Doku_Renderer $renderer, $data) {
+ global $ID;
+
+ // static stack that records all ancestors of the child pages
+ static $page_stack = array();
+
+ // when there is no id just assume the global $ID is the current id
+ if (empty($page_stack)) $page_stack[] = $ID;
+
+ $parent_id = $page_stack[count($page_stack)-1];
+ $root_id = $page_stack[0];
+
+ list($mode, $page, $sect, $flags, $level, $pos) = $data;
+
+ if (!$this->helper)
+ $this->helper = plugin_load('helper', 'include');
+ $flags = $this->helper->get_flags($flags);
+
+ $pages = $this->helper->_get_included_pages($mode, $page, $sect, $parent_id, $flags);
+
+ if ($format == 'metadata') {
+ /** @var Doku_Renderer_metadata $renderer */
+
+ // remove old persistent metadata of previous versions of the include plugin
+ if (isset($renderer->persistent['plugin_include'])) {
+ unset($renderer->persistent['plugin_include']);
+ unset($renderer->meta['plugin_include']);
+ }
+
+ $renderer->meta['plugin_include']['instructions'][] = compact('mode', 'page', 'sect', 'parent_id', 'flags');
+ if (!isset($renderer->meta['plugin_include']['pages']))
+ $renderer->meta['plugin_include']['pages'] = array(); // add an array for array_merge
+ $renderer->meta['plugin_include']['pages'] = array_merge($renderer->meta['plugin_include']['pages'], $pages);
+ $renderer->meta['plugin_include']['include_content'] = isset($_REQUEST['include_content']);
+ }
+
+ $secids = array();
+ if ($format == 'xhtml' || $format == 'odt') {
+ $secids = p_get_metadata($ID, 'plugin_include secids');
+ }
+
+ foreach ($pages as $page) {
+ extract($page);
+ $id = $page['id'];
+ $exists = $page['exists'];
+
+ if (in_array($id, $page_stack)) continue;
+ array_push($page_stack, $id);
+
+ // add references for backlink
+ if ($format == 'metadata') {
+ $renderer->meta['relation']['references'][$id] = $exists;
+ $renderer->meta['relation']['haspart'][$id] = $exists;
+ if (!$sect && !$flags['firstsec'] && !$flags['linkonly'] && !isset($renderer->meta['plugin_include']['secids'][$id])) {
+ $renderer->meta['plugin_include']['secids'][$id] = array('hid' => 'plugin_include__'.str_replace(':', '__', $id), 'pos' => $pos);
+ }
+ }
+
+ if (isset($secids[$id]) && $pos === $secids[$id]['pos']) {
+ $flags['include_secid'] = $secids[$id]['hid'];
+ } else {
+ unset($flags['include_secid']);
+ }
+
+ $instructions = $this->helper->_get_instructions($id, $sect, $mode, $level, $flags, $root_id, $secids);
+
+ if (!$flags['editbtn']) {
+ global $conf;
+ $maxseclevel_org = $conf['maxseclevel'];
+ $conf['maxseclevel'] = 0;
+ }
+ $renderer->nest($instructions);
+ if (isset($maxseclevel_org)) {
+ $conf['maxseclevel'] = $maxseclevel_org;
+ unset($maxseclevel_org);
+ }
+
+ array_pop($page_stack);
+ }
+
+ // When all includes have been handled remove the current id
+ // in order to allow the rendering of other pages
+ if (count($page_stack) == 1) array_pop($page_stack);
+
+ return true;
+ }
+}
+// vim:ts=4:sw=4:et:
diff --git a/platform/www/lib/plugins/include/syntax/locallink.php b/platform/www/lib/plugins/include/syntax/locallink.php
new file mode 100644
index 0000000..2a6a612
--- /dev/null
+++ b/platform/www/lib/plugins/include/syntax/locallink.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ * Include plugin (locallink component)
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Michael Hamann <michael@content-space.de>
+ */
+
+class syntax_plugin_include_locallink extends DokuWiki_Syntax_Plugin {
+
+ function getType() {
+ return 'formatting';
+ }
+
+ function getSort() {
+ return 50;
+ }
+
+ function handle($match, $state, $pos, Doku_Handler $handler) {
+ // this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser
+ }
+
+ /**
+ * Displays a local link to an included page
+ *
+ * @author Michael Hamann <michael@content-space.de>
+ */
+ function render($mode, Doku_Renderer $renderer, $data) {
+ global $ID;
+ if ($mode == 'xhtml') {
+ /** @var Doku_Renderer_xhtml $renderer */
+ list($hash, $name, $id) = $data;
+ // construct title in the same way it would be done for internal links
+ $default = $renderer->_simpleTitle($id);
+ $name = $renderer->_getLinkTitle($name, $default, $isImage, $id);
+ $title = $ID.' ↵';
+ $renderer->doc .= '<a href="#'.$hash.'" title="'.$title.'" class="wikilink1">';
+ $renderer->doc .= $name;
+ $renderer->doc .= '</a>';
+ return true;
+ }
+ return false;
+ }
+}
+// vim:ts=4:sw=4:et:
diff --git a/platform/www/lib/plugins/include/syntax/readmore.php b/platform/www/lib/plugins/include/syntax/readmore.php
new file mode 100644
index 0000000..689e11d
--- /dev/null
+++ b/platform/www/lib/plugins/include/syntax/readmore.php
@@ -0,0 +1,43 @@
+<?php
+/**
+ * Include plugin (editbtn header component)
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Michael Hamann <michael@content-space.de>
+ */
+
+class syntax_plugin_include_readmore extends DokuWiki_Syntax_Plugin {
+
+ function getType() {
+ return 'formatting';
+ }
+
+ function getSort() {
+ return 50;
+ }
+
+ function handle($match, $state, $pos, Doku_Handler $handler) {
+ // this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser
+ }
+
+ function render($mode, Doku_Renderer $renderer, $data) {
+ list($page) = $data;
+
+ if ($mode == 'xhtml') {
+ $renderer->doc .= DOKU_LF.'<p class="include_readmore">'.DOKU_LF;
+ } else {
+ $renderer->p_open();
+ }
+
+ $renderer->internallink($page, $this->getLang('readmore'));
+
+ if ($mode == 'xhtml') {
+ $renderer->doc .= DOKU_LF.'</p>'.DOKU_LF;
+ } else {
+ $renderer->p_close();
+ }
+
+ return true;
+ }
+}
+// vim:ts=4:sw=4:et:
diff --git a/platform/www/lib/plugins/include/syntax/sorttag.php b/platform/www/lib/plugins/include/syntax/sorttag.php
new file mode 100644
index 0000000..c7704ba
--- /dev/null
+++ b/platform/www/lib/plugins/include/syntax/sorttag.php
@@ -0,0 +1,60 @@
+<?php
+
+/**
+ * Include plugin sort order tag, idea and parts of the code copied from the indexmenu plugin.
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Samuele Tognini <samuele@netsons.org>
+ * @author Michael Hamann <michael@content-space.de>
+ *
+ */
+class syntax_plugin_include_sorttag extends DokuWiki_Syntax_Plugin {
+
+ /**
+ * What kind of syntax are we?
+ */
+ public function getType(){
+ return 'substition';
+ }
+
+ /**
+ * The paragraph type - block, we don't need paragraph tags
+ *
+ * @return string The paragraph type
+ */
+ public function getPType() {
+ return 'block';
+ }
+
+ /**
+ * Where to sort in?
+ */
+ public function getSort(){
+ return 139;
+ }
+
+ /**
+ * Connect pattern to lexer
+ */
+ public function connectTo($mode) {
+ $this->Lexer->addSpecialPattern('{{include_n>.+?}}',$mode,'plugin_include_sorttag');
+ }
+
+ /**
+ * Handle the match
+ */
+ public function handle($match, $state, $pos, Doku_Handler $handler){
+ $match = substr($match,12,-2);
+ return array($match);
+ }
+
+ /**
+ * Render output
+ */
+ public function render($mode, Doku_Renderer $renderer, $data) {
+ if ($mode === 'metadata') {
+ /** @var Doku_Renderer_metadata $renderer */
+ $renderer->meta['include_n'] = $data[0];
+ }
+ }
+}
diff --git a/platform/www/lib/plugins/include/syntax/wrap.php b/platform/www/lib/plugins/include/syntax/wrap.php
new file mode 100644
index 0000000..1cb630c
--- /dev/null
+++ b/platform/www/lib/plugins/include/syntax/wrap.php
@@ -0,0 +1,78 @@
+<?php
+/**
+ * Include plugin (wrapper component)
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Michael Klier <chi@chimeric.de>
+ * @author Michael Hamann <michael@content-space.de>
+ */
+
+class syntax_plugin_include_wrap extends DokuWiki_Syntax_Plugin {
+
+ function getType() {
+ return 'formatting';
+ }
+
+ function getSort() {
+ return 50;
+ }
+
+ function handle($match, $state, $pos, Doku_Handler $handler) {
+ // this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser
+ }
+
+ /**
+ * Wraps the included page in a div and writes section edits for the action component
+ * so it can detect where an included page starts/ends.
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ * @author Michael Hamann <michael@content-space.de>
+ */
+ function render($mode, Doku_Renderer $renderer, $data) {
+ if ($mode == 'xhtml') {
+ $state = array_shift($data);
+ switch($state) {
+ case 'open':
+ list($page, $redirect, $secid) = $data;
+ if ($redirect) {
+ if (defined('SEC_EDIT_PATTERN')) { // for DokuWiki Greebo and more recent versions
+ $renderer->startSectionEdit(0, array('target' => 'plugin_include_start', 'name' => $page, 'hid' => ''));
+ } else {
+ $renderer->startSectionEdit(0, 'plugin_include_start', $page);
+ }
+ } else {
+ if (defined('SEC_EDIT_PATTERN')) { // for DokuWiki Greebo and more recent versions
+ $renderer->startSectionEdit(0, array('target' => 'plugin_include_start_noredirect', 'name' => $page, 'hid' => ''));
+ } else {
+ $renderer->startSectionEdit(0, 'plugin_include_start_noredirect', $page);
+ }
+ }
+ $renderer->finishSectionEdit();
+ // Start a new section with type != section so headers in the included page
+ // won't print section edit buttons of the parent page
+ if (defined('SEC_EDIT_PATTERN')) { // for DokuWiki Greebo and more recent versions
+ $renderer->startSectionEdit(0, array('target' => 'plugin_include_end', 'name' => $page, 'hid' => ''));
+ } else {
+ $renderer->startSectionEdit(0, 'plugin_include_end', $page);
+ }
+ if ($secid === NULL) {
+ $id = '';
+ } else {
+ $id = ' id="'.$secid.'"';
+ }
+ $renderer->doc .= '<div class="plugin_include_content plugin_include__' . $page .'"'.$id.'>' . DOKU_LF;
+ if (is_a($renderer,'renderer_plugin_dw2pdf')) {
+ $renderer->doc .= '<a name="'.$secid.'" />';
+ }
+ break;
+ case 'close':
+ $renderer->finishSectionEdit();
+ $renderer->doc .= '</div>' . DOKU_LF;
+ break;
+ }
+ return true;
+ }
+ return false;
+ }
+}
+// vim:ts=4:sw=4:et: