summaryrefslogtreecommitdiff
path: root/platform/www/lib/plugins/wrap
diff options
context:
space:
mode:
Diffstat (limited to 'platform/www/lib/plugins/wrap')
-rw-r--r--platform/www/lib/plugins/wrap/.travis.yml18
-rw-r--r--platform/www/lib/plugins/wrap/COPYING340
-rw-r--r--platform/www/lib/plugins/wrap/README1
-rw-r--r--platform/www/lib/plugins/wrap/_test/wrap_syntax.test.php243
-rw-r--r--platform/www/lib/plugins/wrap/action.php152
-rw-r--r--platform/www/lib/plugins/wrap/all.less352
-rw-r--r--platform/www/lib/plugins/wrap/conf/default.php13
-rw-r--r--platform/www/lib/plugins/wrap/conf/lang2dir.conf249
-rw-r--r--platform/www/lib/plugins/wrap/conf/metadata.php13
-rw-r--r--platform/www/lib/plugins/wrap/example.txt455
-rw-r--r--platform/www/lib/plugins/wrap/helper.php788
-rw-r--r--platform/www/lib/plugins/wrap/images/README18
-rw-r--r--platform/www/lib/plugins/wrap/images/note/16/alert.pngbin0 -> 883 bytes
-rw-r--r--platform/www/lib/plugins/wrap/images/note/16/download.pngbin0 -> 683 bytes
-rw-r--r--platform/www/lib/plugins/wrap/images/note/16/help.pngbin0 -> 929 bytes
-rw-r--r--platform/www/lib/plugins/wrap/images/note/16/important.pngbin0 -> 574 bytes
-rw-r--r--platform/www/lib/plugins/wrap/images/note/16/info.pngbin0 -> 796 bytes
-rw-r--r--platform/www/lib/plugins/wrap/images/note/16/tip.pngbin0 -> 841 bytes
-rw-r--r--platform/www/lib/plugins/wrap/images/note/16/todo.pngbin0 -> 692 bytes
-rw-r--r--platform/www/lib/plugins/wrap/images/note/48/alert.pngbin0 -> 3654 bytes
-rw-r--r--platform/www/lib/plugins/wrap/images/note/48/download.pngbin0 -> 2801 bytes
-rw-r--r--platform/www/lib/plugins/wrap/images/note/48/help.pngbin0 -> 3283 bytes
-rw-r--r--platform/www/lib/plugins/wrap/images/note/48/important.pngbin0 -> 3029 bytes
-rw-r--r--platform/www/lib/plugins/wrap/images/note/48/info.pngbin0 -> 3315 bytes
-rw-r--r--platform/www/lib/plugins/wrap/images/note/48/tip.pngbin0 -> 4232 bytes
-rw-r--r--platform/www/lib/plugins/wrap/images/note/48/todo.pngbin0 -> 3176 bytes
-rw-r--r--platform/www/lib/plugins/wrap/images/toolbar/box.pngbin0 -> 353 bytes
-rw-r--r--platform/www/lib/plugins/wrap/images/toolbar/clear.pngbin0 -> 797 bytes
-rw-r--r--platform/www/lib/plugins/wrap/images/toolbar/column.pngbin0 -> 246 bytes
-rw-r--r--platform/www/lib/plugins/wrap/images/toolbar/em.pngbin0 -> 235 bytes
-rw-r--r--platform/www/lib/plugins/wrap/images/toolbar/hi.pngbin0 -> 259 bytes
-rw-r--r--platform/www/lib/plugins/wrap/images/toolbar/lo.pngbin0 -> 211 bytes
-rw-r--r--platform/www/lib/plugins/wrap/images/toolbar/picker.pngbin0 -> 870 bytes
-rw-r--r--platform/www/lib/plugins/wrap/lang/ar/lang.php16
-rw-r--r--platform/www/lib/plugins/wrap/lang/ar/settings.php11
-rw-r--r--platform/www/lib/plugins/wrap/lang/bg/lang.php21
-rw-r--r--platform/www/lib/plugins/wrap/lang/bg/settings.php16
-rw-r--r--platform/www/lib/plugins/wrap/lang/bn/lang.php21
-rw-r--r--platform/www/lib/plugins/wrap/lang/bn/settings.php14
-rw-r--r--platform/www/lib/plugins/wrap/lang/cs/lang.php21
-rw-r--r--platform/www/lib/plugins/wrap/lang/cs/settings.php15
-rw-r--r--platform/www/lib/plugins/wrap/lang/cy/lang.php22
-rw-r--r--platform/www/lib/plugins/wrap/lang/cy/settings.php15
-rw-r--r--platform/www/lib/plugins/wrap/lang/da/lang.php21
-rw-r--r--platform/www/lib/plugins/wrap/lang/da/settings.php12
-rw-r--r--platform/www/lib/plugins/wrap/lang/de-informal/lang.php19
-rw-r--r--platform/www/lib/plugins/wrap/lang/de-informal/settings.php15
-rw-r--r--platform/www/lib/plugins/wrap/lang/de/lang.php19
-rw-r--r--platform/www/lib/plugins/wrap/lang/de/settings.php15
-rw-r--r--platform/www/lib/plugins/wrap/lang/en/lang.php19
-rw-r--r--platform/www/lib/plugins/wrap/lang/en/settings.php15
-rw-r--r--platform/www/lib/plugins/wrap/lang/eo/lang.php21
-rw-r--r--platform/www/lib/plugins/wrap/lang/eo/settings.php14
-rw-r--r--platform/www/lib/plugins/wrap/lang/es/lang.php21
-rw-r--r--platform/www/lib/plugins/wrap/lang/es/settings.php18
-rw-r--r--platform/www/lib/plugins/wrap/lang/fa/lang.php22
-rw-r--r--platform/www/lib/plugins/wrap/lang/fa/settings.php15
-rw-r--r--platform/www/lib/plugins/wrap/lang/fr/lang.php22
-rw-r--r--platform/www/lib/plugins/wrap/lang/fr/settings.php18
-rw-r--r--platform/www/lib/plugins/wrap/lang/hr/lang.php21
-rw-r--r--platform/www/lib/plugins/wrap/lang/hr/settings.php16
-rw-r--r--platform/www/lib/plugins/wrap/lang/hu/lang.php21
-rw-r--r--platform/www/lib/plugins/wrap/lang/hu/settings.php16
-rw-r--r--platform/www/lib/plugins/wrap/lang/it/lang.php23
-rw-r--r--platform/www/lib/plugins/wrap/lang/it/settings.php16
-rw-r--r--platform/www/lib/plugins/wrap/lang/ja/lang.php21
-rw-r--r--platform/www/lib/plugins/wrap/lang/ja/settings.php16
-rw-r--r--platform/www/lib/plugins/wrap/lang/ko/lang.php21
-rw-r--r--platform/www/lib/plugins/wrap/lang/ko/settings.php15
-rw-r--r--platform/www/lib/plugins/wrap/lang/nl/lang.php21
-rw-r--r--platform/www/lib/plugins/wrap/lang/nl/settings.php16
-rw-r--r--platform/www/lib/plugins/wrap/lang/no/lang.php24
-rw-r--r--platform/www/lib/plugins/wrap/lang/no/settings.php15
-rw-r--r--platform/www/lib/plugins/wrap/lang/pt-br/lang.php22
-rw-r--r--platform/www/lib/plugins/wrap/lang/pt-br/settings.php18
-rw-r--r--platform/www/lib/plugins/wrap/lang/ru/lang.php22
-rw-r--r--platform/www/lib/plugins/wrap/lang/ru/settings.php18
-rw-r--r--platform/www/lib/plugins/wrap/lang/sk/lang.php12
-rw-r--r--platform/www/lib/plugins/wrap/lang/sk/settings.php12
-rw-r--r--platform/www/lib/plugins/wrap/lang/sr/lang.php21
-rw-r--r--platform/www/lib/plugins/wrap/lang/sr/settings.php15
-rw-r--r--platform/www/lib/plugins/wrap/lang/sv/lang.php17
-rw-r--r--platform/www/lib/plugins/wrap/lang/sv/settings.php10
-rw-r--r--platform/www/lib/plugins/wrap/lang/tr/lang.php22
-rw-r--r--platform/www/lib/plugins/wrap/lang/tr/settings.php15
-rw-r--r--platform/www/lib/plugins/wrap/lang/zh-tw/lang.php19
-rw-r--r--platform/www/lib/plugins/wrap/lang/zh-tw/settings.php11
-rw-r--r--platform/www/lib/plugins/wrap/lang/zh/lang.php20
-rw-r--r--platform/www/lib/plugins/wrap/lang/zh/settings.php16
-rw-r--r--platform/www/lib/plugins/wrap/manager.dat2
-rw-r--r--platform/www/lib/plugins/wrap/pdf.less20
-rw-r--r--platform/www/lib/plugins/wrap/plugin.info.txt8
-rw-r--r--platform/www/lib/plugins/wrap/print.less45
-rw-r--r--platform/www/lib/plugins/wrap/print_or_pdf.less31
-rw-r--r--platform/www/lib/plugins/wrap/style.less215
-rw-r--r--platform/www/lib/plugins/wrap/syntax/closesection.php40
-rw-r--r--platform/www/lib/plugins/wrap/syntax/div.php139
-rw-r--r--platform/www/lib/plugins/wrap/syntax/divblock.php21
-rw-r--r--platform/www/lib/plugins/wrap/syntax/divwrap.php20
-rw-r--r--platform/www/lib/plugins/wrap/syntax/span.php105
-rw-r--r--platform/www/lib/plugins/wrap/syntax/spaninline.php20
-rw-r--r--platform/www/lib/plugins/wrap/syntax/spanwrap.php21
102 files changed, 4319 insertions, 0 deletions
diff --git a/platform/www/lib/plugins/wrap/.travis.yml b/platform/www/lib/plugins/wrap/.travis.yml
new file mode 100644
index 0000000..a73697f
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/.travis.yml
@@ -0,0 +1,18 @@
+language: php
+php:
+ - "7.2"
+ - "7.1"
+ - "7.0"
+ - "5.6"
+env:
+ - DOKUWIKI=master
+ - DOKUWIKI=stable
+ - DOKUWIKI=old-stable
+before_install: wget https://raw.github.com/splitbrain/dokuwiki-travis/master/travis.sh
+install: sh travis.sh
+before_script:
+ - wget https://phar.phpunit.de/phpunit-5.7.phar
+ - cd _test
+script:
+ - if [ "$DOKUWIKI" != "old-stable" ]; then phpunit --stderr --group plugin_wrap; fi
+ - if [ "$DOKUWIKI" = "old-stable" ]; then php ../phpunit-5.7.phar --stderr --group plugin_wrap; fi
diff --git a/platform/www/lib/plugins/wrap/COPYING b/platform/www/lib/plugins/wrap/COPYING
new file mode 100644
index 0000000..d60c31a
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/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/wrap/README b/platform/www/lib/plugins/wrap/README
new file mode 100644
index 0000000..c0a1118
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/README
@@ -0,0 +1 @@
+see plugin.info.txt \ No newline at end of file
diff --git a/platform/www/lib/plugins/wrap/_test/wrap_syntax.test.php b/platform/www/lib/plugins/wrap/_test/wrap_syntax.test.php
new file mode 100644
index 0000000..768c130
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/_test/wrap_syntax.test.php
@@ -0,0 +1,243 @@
+<?php
+/**
+ * Tests to ensure wrap syntax is correctly processed
+ *
+ * @group plugin_wrap
+ * @group plugins
+ */
+class plugin_wrap_test extends DokuWikiTest {
+ public function setUp() {
+ $this->pluginsEnabled[] = 'wrap';
+ parent::setUp();
+ }
+
+ public function test_nestedheading() {
+ $instructions = p_get_instructions("<WRAP>\n==== Heading ====\n\nSome text\n</WRAP>");
+ $expected =
+ array(
+ array(
+ 'document_start',
+ array(),
+ 0
+ ),
+ array(
+ 'plugin',
+ array(
+ 'wrap_divwrap',
+ array(
+ DOKU_LEXER_ENTER,
+ '<wrap'
+ ),
+ DOKU_LEXER_ENTER,
+ '<WRAP>'
+ ),
+ 1
+ ),
+ array(
+ 'header',
+ array(
+ 'Heading',
+ 3,
+ 8
+ ),
+ 8
+ ),
+ array(
+ 'plugin',
+ array(
+ 'wrap_closesection',
+ array(),
+ DOKU_LEXER_SPECIAL,
+ false
+ ),
+ 8
+ ),
+ array(
+ 'p_open',
+ array(),
+ 8
+ ),
+ array(
+ 'cdata',
+ array(
+ 'Some text'
+ ),
+ 27
+ ),
+ array(
+ 'p_close',
+ array(),
+ 37
+ ),
+ array(
+ 'plugin',
+ array(
+ 'wrap_divwrap',
+ array(
+ DOKU_LEXER_EXIT,
+ ''
+ ),
+ DOKU_LEXER_EXIT,
+ '</WRAP>'
+ ),
+ 37
+ ),
+ array(
+ 'document_end',
+ array(),
+ 37
+ )
+ );
+ $this->assertEquals($expected, $instructions);
+ }
+
+ public function test_blocknesting() {
+ $instructions = p_get_instructions("<WRAP>\nFoo\n\n</div> </block> Bar\n</WRAP>");
+ $expected =
+ array(
+ array(
+ 'document_start',
+ array(),
+ 0
+ ),
+ array(
+ 'plugin',
+ array(
+ 'wrap_divwrap',
+ array(
+ DOKU_LEXER_ENTER,
+ '<wrap'
+ ),
+ DOKU_LEXER_ENTER,
+ '<WRAP>'
+ ),
+ 1
+ ),
+ array(
+ 'p_open',
+ array(
+ ),
+ 1
+ ),
+ array(
+ 'cdata',
+ array(
+ 'Foo'
+ ),
+ 8
+ ),
+ array(
+ 'p_close',
+ array(),
+ 11
+ ),
+ array(
+ 'p_open',
+ array(
+ ),
+ 11
+ ),
+ array(
+ 'cdata',
+ array(
+ '</div> </block> Bar'
+ ),
+ 13
+ ),
+ array(
+ 'p_close',
+ array(),
+ 33
+ ),
+ array(
+ 'plugin',
+ array(
+ 'wrap_divwrap',
+ array(
+ DOKU_LEXER_EXIT,
+ ''
+ ),
+ DOKU_LEXER_EXIT,
+ '</WRAP>'
+ ),
+ 33
+ ),
+ array(
+ 'document_end',
+ array(),
+ 33
+ )
+ );
+ $this->assertEquals($expected, $instructions);
+ }
+
+ public function test_inlinenesting() {
+ $instructions = p_get_instructions("<wrap>Foo </span> </inline> Bar</wrap>");
+ $expected =
+ array(
+ array(
+ 'document_start',
+ array(),
+ 0
+ ),
+ array(
+ 'p_open',
+ array(
+ ),
+ 0
+ ),
+ array(
+ 'plugin',
+ array(
+ 'wrap_spanwrap',
+ array(
+ DOKU_LEXER_ENTER,
+ '<wrap'
+ ),
+ DOKU_LEXER_ENTER,
+ '<wrap>'
+ ),
+ 1
+ ),
+ array(
+ 'cdata',
+ array(
+ 'Foo </span> </inline> Bar'
+ ),
+ 7
+ ),
+ array(
+ 'plugin',
+ array(
+ 'wrap_spanwrap',
+ array(
+ DOKU_LEXER_EXIT,
+ ''
+ ),
+ DOKU_LEXER_EXIT,
+ '</wrap>'
+ ),
+ 32
+ ),
+ array(
+ 'cdata',
+ array(
+ ''
+ ),
+ 39
+ ),
+ array(
+ 'p_close',
+ array(),
+ 39
+ ),
+ array(
+ 'document_end',
+ array(),
+ 39
+ )
+ );
+ $this->assertEquals($expected, $instructions);
+ }
+
+} \ No newline at end of file
diff --git a/platform/www/lib/plugins/wrap/action.php b/platform/www/lib/plugins/wrap/action.php
new file mode 100644
index 0000000..2a47fca
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/action.php
@@ -0,0 +1,152 @@
+<?php
+/**
+ * Action Component for the Wrap Plugin
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+
+// must be run within Dokuwiki
+if(!defined('DOKU_INC')) die();
+
+if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
+require_once(DOKU_PLUGIN.'action.php');
+
+class action_plugin_wrap extends DokuWiki_Action_Plugin {
+
+ /**
+ * register the eventhandlers
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+ function register(Doku_Event_Handler $controller){
+ $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'handle_toolbar', array ());
+ $controller->register_hook('HTML_SECEDIT_BUTTON', 'BEFORE', $this, 'handle_secedit_button');
+ }
+
+ function handle_toolbar(Doku_Event $event, $param) {
+ $syntaxDiv = $this->getConf('syntaxDiv');
+ $syntaxSpan = $this->getConf('syntaxSpan');
+
+ $event->data[] = array (
+ 'type' => 'picker',
+ 'title' => $this->getLang('picker'),
+ 'icon' => '../../plugins/wrap/images/toolbar/picker.png',
+ 'list' => array(
+ array(
+ 'type' => 'format',
+ 'title' => $this->getLang('column'),
+ 'icon' => '../../plugins/wrap/images/toolbar/column.png',
+ 'open' => '<'.$syntaxDiv.' group>\n<'.$syntaxDiv.' half column>\n',
+ 'close' => '\n</'.$syntaxDiv.'>\n\n<'.$syntaxDiv.' half column>\n\n</'.$syntaxDiv.'>\n</'.$syntaxDiv.'>\n',
+ ),
+ array(
+ 'type' => 'format',
+ 'title' => $this->getLang('box'),
+ 'icon' => '../../plugins/wrap/images/toolbar/box.png',
+ 'open' => '<'.$syntaxDiv.' center round box 60%>\n',
+ 'close' => '\n</'.$syntaxDiv.'>\n',
+ ),
+ array(
+ 'type' => 'format',
+ 'title' => $this->getLang('info'),
+ 'icon' => '../../plugins/wrap/images/note/16/info.png',
+ 'open' => '<'.$syntaxDiv.' center round info 60%>\n',
+ 'close' => '\n</'.$syntaxDiv.'>\n',
+ ),
+ array(
+ 'type' => 'format',
+ 'title' => $this->getLang('tip'),
+ 'icon' => '../../plugins/wrap/images/note/16/tip.png',
+ 'open' => '<'.$syntaxDiv.' center round tip 60%>\n',
+ 'close' => '\n</'.$syntaxDiv.'>\n',
+ ),
+ array(
+ 'type' => 'format',
+ 'title' => $this->getLang('important'),
+ 'icon' => '../../plugins/wrap/images/note/16/important.png',
+ 'open' => '<'.$syntaxDiv.' center round important 60%>\n',
+ 'close' => '\n</'.$syntaxDiv.'>\n',
+ ),
+ array(
+ 'type' => 'format',
+ 'title' => $this->getLang('alert'),
+ 'icon' => '../../plugins/wrap/images/note/16/alert.png',
+ 'open' => '<'.$syntaxDiv.' center round alert 60%>\n',
+ 'close' => '\n</'.$syntaxDiv.'>\n',
+ ),
+ array(
+ 'type' => 'format',
+ 'title' => $this->getLang('help'),
+ 'icon' => '../../plugins/wrap/images/note/16/help.png',
+ 'open' => '<'.$syntaxDiv.' center round help 60%>\n',
+ 'close' => '\n</'.$syntaxDiv.'>\n',
+ ),
+ array(
+ 'type' => 'format',
+ 'title' => $this->getLang('download'),
+ 'icon' => '../../plugins/wrap/images/note/16/download.png',
+ 'open' => '<'.$syntaxDiv.' center round download 60%>\n',
+ 'close' => '\n</'.$syntaxDiv.'>\n',
+ ),
+ array(
+ 'type' => 'format',
+ 'title' => $this->getLang('todo'),
+ 'icon' => '../../plugins/wrap/images/note/16/todo.png',
+ 'open' => '<'.$syntaxDiv.' center round todo 60%>\n',
+ 'close' => '\n</'.$syntaxDiv.'>\n',
+ ),
+ array(
+ 'type' => 'insert',
+ 'title' => $this->getLang('clear'),
+ 'icon' => '../../plugins/wrap/images/toolbar/clear.png',
+ 'insert' => '<'.$syntaxDiv.' clear/>\n',
+ ),
+ array(
+ 'type' => 'format',
+ 'title' => $this->getLang('em'),
+ 'icon' => '../../plugins/wrap/images/toolbar/em.png',
+ 'open' => '<'.$syntaxSpan.' em>',
+ 'close' => '</'.$syntaxSpan.'>',
+ ),
+ array(
+ 'type' => 'format',
+ 'title' => $this->getLang('hi'),
+ 'icon' => '../../plugins/wrap/images/toolbar/hi.png',
+ 'open' => '<'.$syntaxSpan.' hi>',
+ 'close' => '</'.$syntaxSpan.'>',
+ ),
+ array(
+ 'type' => 'format',
+ 'title' => $this->getLang('lo'),
+ 'icon' => '../../plugins/wrap/images/toolbar/lo.png',
+ 'open' => '<'.$syntaxSpan.' lo>',
+ 'close' => '</'.$syntaxSpan.'>',
+ ),
+ )
+ );
+ }
+
+ /**
+ * Handle section edit buttons, prevents section buttons inside the wrap plugin from being rendered
+ *
+ * @param Doku_Event $event The event object
+ * @param array $param Parameters for the event
+ */
+ public function handle_secedit_button(Doku_Event $event, $param) {
+ // counter of the number of currently opened wraps
+ static $wraps = 0;
+ $data = $event->data;
+
+ if ($data['target'] == 'plugin_wrap_start') {
+ ++$wraps;
+ } elseif ($data['target'] == 'plugin_wrap_end') {
+ --$wraps;
+ } elseif ($wraps > 0 && $data['target'] == 'section') {
+ $event->preventDefault();
+ $event->stopPropagation();
+ $event->result = '';
+ }
+ }
+}
+
diff --git a/platform/www/lib/plugins/wrap/all.less b/platform/www/lib/plugins/wrap/all.less
new file mode 100644
index 0000000..c8f6ee5
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/all.less
@@ -0,0 +1,352 @@
+/********************************************************************
+Screen and Print Styles for the Wrap Plugin
+********************************************************************/
+
+.dokuwiki {
+
+/* resetting the box model to something more sane makes life a whole lot easier */
+.plugin_wrap {
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+/* emulate a headline
+ (only with 'emulatedHeadlines' config option set)
+ @deprecated 2018-03-20 */
+.plugin_wrap.wrap__emuhead em strong {
+ font-size: 130%;
+ font-weight: bold;
+ font-style: normal;
+ display: block;
+}
+/* emulate a bigger headline with a bottom border */
+.plugin_wrap.wrap__emuhead em strong em.u {
+ font-size: 115%;
+ border-bottom: 1px solid @ini_border;
+ font-style: normal;
+ text-decoration: none;
+ display: block;
+}
+/* different bigger headline for safety notes */
+.wrap_danger.wrap__emuhead em strong em.u,
+.wrap_warning.wrap__emuhead em strong em.u,
+.wrap_caution.wrap__emuhead em strong em.u,
+.wrap_notice.wrap__emuhead em strong em.u,
+.wrap_safety.wrap__emuhead em strong em.u {
+ text-transform: uppercase;
+ border-bottom-width: 0;
+}
+/* change border colour of emulated headlines inside boxes to something more neutral
+ (to match all the different background colours) */
+.wrap_box.wrap__emuhead em strong em.u,
+.wrap_info.wrap__emuhead em strong em.u,
+.wrap_important.wrap__emuhead em strong em.u,
+.wrap_alert.wrap__emuhead em strong em.u,
+.wrap_tip.wrap__emuhead em strong em.u,
+.wrap_help.wrap__emuhead em strong em.u,
+.wrap_todo.wrap__emuhead em strong em.u,
+.wrap_download.wrap__emuhead em strong em.u {
+ border-bottom-color: #999;
+}
+
+/* real headlines should not be indented inside a wrap */
+.plugin_wrap h1,
+.plugin_wrap h2,
+.plugin_wrap h3,
+.plugin_wrap h4,
+.plugin_wrap h5 {
+ margin-left: 0;
+ margin-right: 0;
+}
+
+/* columns
+********************************************************************/
+
+.wrap_left,
+.wrap_column {
+ float: left;
+ margin-right: 1.5em;
+}
+[dir=rtl] .wrap_column {
+ float: right;
+ margin-left: 1.5em;
+ margin-right: 0;
+}
+.wrap_right {
+ float: right;
+ margin-left: 1.5em;
+}
+.wrap_center {
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+/*____________ CSS3 columns ____________*/
+
+.wrap_col2, .wrap_col3, .wrap_col4, .wrap_col5,
+.wrap_colsmall, .wrap_colmedium, .wrap_collarge {
+ -moz-column-gap: 1.5em;
+ -webkit-column-gap: 1.5em;
+ column-gap: 1.5em;
+ -moz-column-rule: 1px dotted #666;
+ -webkit-column-rule: 1px dotted #666;
+ column-rule: 1px dotted #666;
+}
+.wrap_col2 {
+ -moz-column-count: 2;
+ -webkit-column-count: 2;
+ column-count: 2;
+}
+.wrap_col3 {
+ -moz-column-count: 3;
+ -webkit-column-count: 3;
+ column-count: 3;
+}
+.wrap_col4 {
+ -moz-column-count: 4;
+ -webkit-column-count: 4;
+ column-count: 4;
+}
+.wrap_col5 {
+ -moz-column-count: 5;
+ -webkit-column-count: 5;
+ column-count: 5;
+}
+
+.wrap_colsmall {
+ -moz-column-width: 10em;
+ -webkit-column-width: 10em;
+ column-width: 10em;
+}
+.wrap_colmedium {
+ -moz-column-width: 20em;
+ -webkit-column-width: 20em;
+ column-width: 20em;
+}
+.wrap_collarge {
+ -moz-column-width: 30em;
+ -webkit-column-width: 30em;
+ column-width: 30em;
+}
+
+
+/* widths
+********************************************************************/
+
+.wrap_twothirds {
+ width: 65%;
+ margin-right: 5%;
+}
+
+.wrap_half {
+ width: 48%;
+ margin-right: 4%;
+}
+
+.wrap_third {
+ width: 30%;
+ margin-right: 5%;
+}
+
+.wrap_quarter {
+ width: 22%;
+ margin-right: 4%;
+}
+
+[dir=rtl] .wrap_half,
+[dir=rtl] .wrap_quarter {
+ margin-right: 0;
+ margin-left: 4%;
+}
+[dir=rtl] .wrap_twothirds,
+[dir=rtl] .wrap_third {
+ margin-right: 0;
+ margin-left: 5%;
+}
+
+/* this doesn't always work when third and twothirds are mixed across rows
+ but can be fixed by adding any div (e.g. <WRAP clear/>) after a row */
+.wrap_half + .wrap_half,
+.wrap_third + .wrap_twothirds,
+.wrap_twothirds + .wrap_third,
+.wrap_third + .wrap_third + .wrap_third,
+.wrap_quarter + .wrap_quarter + .wrap_quarter + .wrap_quarter {
+ margin-right: 0;
+
+ [dir=rtl] & {
+ margin-left: 0;
+ }
+
+ + * {
+ clear: left;
+ [dir=rtl] & {
+ clear: right;
+ }
+ }
+}
+
+/* show 2 instead 4 columns on medium sized screens (mobile, etc) */
+@media only screen and (max-width: 950px) {
+
+.wrap_quarter {
+ width: 48%;
+}
+.wrap_quarter:nth-of-type(2n) {
+ margin-right: 0;
+}
+[dir=rtl] .wrap_quarter:nth-of-type(2n) {
+ margin-left: 0;
+}
+.wrap_quarter:nth-of-type(2n+1) {
+ clear: left;
+}
+[dir=rtl] .wrap_quarter:nth-of-type(2n) {
+ clear: right;
+}
+
+} /* /@media */
+
+/* show full width on smaller screens (mobile, etc) */
+@media only screen and (max-width: 600px) {
+
+.wrap_twothirds,
+.wrap_half,
+.wrap_third,
+.wrap_quarter {
+ width: auto;
+ margin-right: 0;
+ margin-left: 0;
+ float: none;
+}
+
+} /* /@media */
+
+
+/* alignments
+********************************************************************/
+
+.wrap_leftalign {
+ text-align: left;
+}
+.wrap_centeralign {
+ text-align: center;
+}
+.wrap_rightalign {
+ text-align: right;
+}
+.wrap_justify {
+ text-align: justify;
+}
+
+
+/* box
+********************************************************************/
+
+/* see styles for boxes and notes with icons in style.css */
+
+/*____________ rounded corners ____________*/
+/* (only for modern browsers) */
+
+div.wrap_round {
+ border-radius: 1.4em;
+}
+span.wrap_round {
+ border-radius: .14em;
+}
+
+
+/* mark
+********************************************************************/
+
+.wrap_lo {
+ color: @ini_text_neu;
+ font-size: 85%;
+}
+.wrap_em {
+ color: #c00;
+ font-weight: bold;
+}
+.wrap__dark.wrap_em {
+ color: #f66;
+}
+
+/* see styles for highlighted text in style.css */
+
+
+/* miscellaneous
+********************************************************************/
+
+/*____________ tablewidth ____________*/
+
+.wrap_tablewidth table {
+ width: 100%;
+}
+
+/*____________ indent ____________*/
+
+.wrap_indent {
+ padding-left: 1.5em;
+}
+[dir=rtl] .wrap_indent {
+ padding-right: 1.5em;
+ padding-left: 0;
+}
+
+
+/*____________ outdent ____________*/
+
+.wrap_outdent {
+ margin-left: -1.5em;
+}
+[dir=rtl] .wrap_outdent {
+ margin-right: -1.5em;
+ margin-left: 0;
+}
+
+/*____________ word wrapping in pre ____________*/
+
+div.wrap_prewrap pre {
+ white-space: pre-wrap;
+ word-wrap: break-word;/* for IE < 8 */
+}
+
+/*____________ spoiler ____________*/
+
+div.wrap_spoiler {
+ margin-bottom: 1.5em;
+}
+/* see rest of spoiler styles in style.css */
+
+/*____________ clear float ____________*/
+
+.wrap_clear {
+ clear: both;
+ line-height: 0;
+ height: 0;
+ font-size: 1px;
+ visibility: hidden;
+ overflow: hidden;
+}
+
+/*____________ hide ____________*/
+
+.wrap_hide {
+ display: none;
+}
+
+
+/*____________ button-style link ____________*/
+
+.wrap_button a:link,
+.wrap_button a:visited {
+ background-image: none;
+ border: 1px solid @ini_border;
+ border-radius: .3em;
+ padding: .5em .7em;
+ text-decoration: none;
+}
+/* see rest of button link styles in style.css */
+
+} /* /.dokuwiki */
diff --git a/platform/www/lib/plugins/wrap/conf/default.php b/platform/www/lib/plugins/wrap/conf/default.php
new file mode 100644
index 0000000..6897bb3
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/conf/default.php
@@ -0,0 +1,13 @@
+<?php
+/*
+ * Wrap plugin, default configuration settings
+ *
+ */
+
+$conf['noPrefix'] = 'tabs, group';
+$conf['restrictedClasses'] = ''; //restrict usage of plugin to these classes (comma separated)
+$conf['restrictionType'] = 0; //0= exclude restricted classes, 1=include restricted classes and exclude all others
+$conf['syntaxDiv'] = 'WRAP';
+$conf['syntaxSpan'] = 'wrap';
+$conf['darkTpl'] = 0;
+$conf['emulatedHeadlines'] = 0;
diff --git a/platform/www/lib/plugins/wrap/conf/lang2dir.conf b/platform/www/lib/plugins/wrap/conf/lang2dir.conf
new file mode 100644
index 0000000..1cc8f30
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/conf/lang2dir.conf
@@ -0,0 +1,249 @@
+# List of the most important language codes and their reading directions
+# taken from http://meta.wikimedia.org/wiki/Template:List_of_language_names_ordered_by_code
+
+aa ltr #Afar
+ab ltr #Abkhazian
+af ltr #Afrikaans
+ak ltr #Akan
+als ltr #Alemannic
+am ltr #Amharic
+an ltr #Aragonese
+ang ltr #Anglo-Saxon / Old English
+ar rtl #Arabic
+arc rtl #Aramaic
+as ltr #Assamese
+ast ltr #Asturian
+av ltr #Avar
+ay ltr #Aymara
+az ltr #Azerbaijani
+ba ltr #Bashkir
+bar ltr #Bavarian
+bat-smg ltr #Samogitian
+bcl ltr #Bikol
+be ltr #Belarusian
+be-x-old ltr #Old Belarusian
+bg ltr #Bulgarian
+bh ltr #Bihari
+bi ltr #Bislama
+bm ltr #Bambara
+bn ltr #Bengali
+bo ltr #Tibetan
+bpy ltr #Bishnupriya Manipuri
+br ltr #Breton
+bs ltr #Bosnian
+bug ltr #Buginese
+bxr ltr #Buriat (Russia)
+ca ltr #Catalan
+ce ltr #Chechen
+ceb ltr #Cebuano
+ch ltr #Chamorro
+cho ltr #Choctaw
+chr ltr #Cherokee
+chy ltr #Cheyenne
+co ltr #Corsican
+cr ltr #Cree
+cs ltr #Czech
+csb ltr #Kashubian
+cu ltr #Old Church Slavonic / Old Bulgarian
+cv ltr #Chuvash
+cy ltr #Welsh
+da ltr #Danish
+de ltr #German
+diq ltr #Dimli
+dsb ltr #Lower Sorbian
+dv rtl #Divehi
+dz ltr #Dzongkha
+ee ltr #Ewe
+el ltr #Greek
+en ltr #English
+eo ltr #Esperanto
+es ltr #Spanish
+et ltr #Estonian
+eu ltr #Basque
+ext ltr #Extremaduran
+fa rtl #Persian
+ff ltr #Peul
+fi ltr #Finnish
+fiu-vro ltr #Võro
+fj ltr #Fijian
+fo ltr #Faroese
+fr ltr #French
+frp ltr #Arpitan / Franco-Provençal
+fur ltr #Friulian
+fy ltr #West Frisian
+ga ltr #Irish
+gd ltr #Scottish Gaelic
+gil ltr #Gilbertese
+gl ltr #Galician
+gn ltr #Guarani
+got ltr #Gothic
+gu ltr #Gujarati
+gv ltr #Manx
+ha rtl #Hausa
+haw ltr #Hawaiian
+he rtl #Hebrew
+hi ltr #Hindi
+ho ltr #Hiri Motu
+hr ltr #Croatian
+ht ltr #Haitian
+hu ltr #Hungarian
+hy ltr #Armenian
+hz ltr #Herero
+ia ltr #Interlingua
+id ltr #Indonesian
+ie ltr #Interlingue
+ig ltr #Igbo
+ii ltr #Sichuan Yi
+ik ltr #Inupiak
+ilo ltr #Ilokano
+io ltr #Ido
+is ltr #Icelandic
+it ltr #Italian
+iu ltr #Inuktitut
+ja ltr #Japanese
+jbo ltr #Lojban
+jv ltr #Javanese
+ka ltr #Georgian
+kg ltr #Kongo
+ki ltr #Kikuyu
+kj ltr #Kuanyama
+kk ltr #Kazakh
+kl ltr #Greenlandic
+km ltr #Cambodian
+kn ltr #Kannada
+ko ltr #Korean
+kr ltr #Kanuri
+ks rtl #Kashmiri
+ksh ltr #Ripuarian
+ku rtl #Kurdish
+kv ltr #Komi
+kw ltr #Cornish
+ky ltr #Kirghiz
+la ltr #Latin
+lad ltr #Ladino / Judeo-Spanish
+lan ltr #Lango
+lb ltr #Luxembourgish
+lg ltr #Ganda
+li ltr #Limburgian
+lij ltr #Ligurian
+lmo ltr #Lombard
+ln ltr #Lingala
+lo ltr #Laotian
+lt ltr #Lithuanian
+lv ltr #Latvian
+map-bms ltr #Banyumasan
+mg ltr #Malagasy
+mh ltr #Marshallese
+mi ltr #Maori
+mk ltr #Macedonian
+ml ltr #Malayalam
+mn ltr #Mongolian
+mo ltr #Moldovan
+mr ltr #Marathi
+ms ltr #Malay
+mt ltr #Maltese
+mus ltr #Creek / Muskogee
+my ltr #Burmese
+na ltr #Nauruan
+nah ltr #Nahuatl
+nap ltr #Neapolitan
+nd ltr #North Ndebele
+nds ltr #Low German / Low Saxon
+nds-nl ltr #Dutch Low Saxon
+ne ltr #Nepali
+new ltr #Newar
+ng ltr #Ndonga
+nl ltr #Dutch
+nn ltr #Norwegian Nynorsk
+no ltr #Norwegian
+nr ltr #South Ndebele
+nso ltr #Northern Sotho
+nrm ltr #Norman
+nv ltr #Navajo
+ny ltr #Chichewa
+oc ltr #Occitan
+oj ltr #Ojibwa
+om ltr #Oromo
+or ltr #Oriya
+os ltr #Ossetian / Ossetic
+pa ltr #Panjabi / Punjabi
+pag ltr #Pangasinan
+pam ltr #Kapampangan
+pap ltr #Papiamentu
+pdc ltr #Pennsylvania German
+pi ltr #Pali
+pih ltr #Norfolk
+pl ltr #Polish
+pms ltr #Piedmontese
+ps rtl #Pashto
+pt ltr #Portuguese
+qu ltr #Quechua
+rm ltr #Raeto Romance
+rmy ltr #Romani
+rn ltr #Kirundi
+ro ltr #Romanian
+roa-rup ltr #Aromanian
+ru ltr #Russian
+rw ltr #Rwandi
+sa ltr #Sanskrit
+sc ltr #Sardinian
+scn ltr #Sicilian
+sco ltr #Scots
+sd ltr #Sindhi
+se ltr #Northern Sami
+sg ltr #Sango
+sh ltr #Serbo-Croatian
+si ltr #Sinhalese
+sk ltr #Slovak
+sl ltr #Slovenian
+sm ltr #Samoan
+sn ltr #Shona
+so ltr #Somalia
+sq ltr #Albanian
+sr ltr #Serbian
+ss ltr #Swati
+st ltr #Southern Sotho
+su ltr #Sundanese
+sv ltr #Swedish
+sw ltr #Swahili
+ta ltr #Tamil
+te ltr #Telugu
+tet ltr #Tetum
+tg ltr #Tajik
+th ltr #Thai
+ti ltr #Tigrinya
+tk ltr #Turkmen
+tl ltr #Tagalog / Filipino
+tlh ltr #Klingon
+tn ltr #Tswana
+to ltr #Tonga
+tpi ltr #Tok Pisin
+tr ltr #Turkish
+ts ltr #Tsonga
+tt ltr #Tatar
+tum ltr #Tumbuka
+tw ltr #Twi
+ty ltr #Tahitian
+udm ltr #Udmurt
+ug ltr #Uyghur
+uk ltr #Ukrainian
+ur rtl #Urdu
+uz ltr #Uzbek
+ve ltr #Venda
+vi ltr #Vietnamese
+vec ltr #Venetian
+vls ltr #West Flemish
+vo ltr #Volapük
+wa ltr #Walloon
+war ltr #Waray-Waray / Samar-Leyte Visayan
+wo ltr #Wolof
+xal ltr #Kalmyk
+xh ltr #Xhosa
+yi rtl #Yiddish
+yo ltr #Yoruba
+za ltr #Zhuang
+zh ltr #Chinese
+zh-min-nan ltr #Minnan
+zh-tw ltr #Traditional Chinese
+zh-yue ltr #Cantonese
+zu ltr #Zulu
diff --git a/platform/www/lib/plugins/wrap/conf/metadata.php b/platform/www/lib/plugins/wrap/conf/metadata.php
new file mode 100644
index 0000000..1a20733
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/conf/metadata.php
@@ -0,0 +1,13 @@
+<?php
+/*
+ * Wrap plugin, configuration metadata
+ *
+ */
+
+$meta['noPrefix'] = array('string');
+$meta['restrictedClasses'] = array('string');
+$meta['restrictionType'] = array('multichoice','_choices' => array(0,1));
+$meta['syntaxDiv'] = array('multichoice','_choices' => array('WRAP','block', 'div'));
+$meta['syntaxSpan'] = array('multichoice','_choices' => array('wrap', 'inline', 'span'));
+$meta['darkTpl'] = array('onoff');
+$meta['emulatedHeadlines'] = array('onoff');
diff --git a/platform/www/lib/plugins/wrap/example.txt b/platform/www/lib/plugins/wrap/example.txt
new file mode 100644
index 0000000..c0e20c8
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/example.txt
@@ -0,0 +1,455 @@
+====== Examples for the Wrap Plugin ======
+
+===== Basic syntax =====
+
+An uppercase **%%<WRAP>%%** (or alternatively **%%<block>%%** or **%%<div>%%**) creates a **''div''** and should be used for **"big"** containers, **surrounding** paragraphs, lists, tables, etc.
+
+<code>
+<WRAP classes #id width :language>
+"big" content
+</WRAP>
+
+or
+<block classes #id width :language>
+"big" content
+</block>
+
+or
+<div classes #id width :language>
+"big" content
+</div>
+</code>
+
+A lowercase **%%<wrap>%%** (or alternatively **%%<inline>%%** or **%%<span>%%**) creates a **''span''** and should be used for **"small"** containers, **inside** paragraphs, lists, tables, etc.
+
+<code>
+<wrap classes #id width :language>"small" content</wrap>
+
+or
+<inline classes #id width :language>"small" content</inline>
+
+or
+<span classes #id width :language>"small" content</span>
+</code>
+
+:!: Please note, some things **won't work with lowercase spans**:
+ * **alignments** (including alignments generated by changing the text direction)
+ * **multi-columns**
+ * and **widths**
+if the according wrap isn't floated as well.
+
+A shorthand of uppercase **%%<WRAP />%%** and lowercase **%%<wrap />%%** are available if the container is empty or unnecessary.
+
+<code>
+<WRAP classes #id />
+or
+<block classes #id />
+or
+<div classes #id />
+</code>
+
+and
+<code>
+<wrap classes #id />
+or
+<inline classes #id />
+or
+<span classes #id />
+</code>
+
+===== Classes and Styles =====
+
+
+==== Columns and Floats ====
+
+You can have columns easily by adding the class ''column'' and a width, e.g.
+ <WRAP column 30%>...content...</WRAP>
+
+The example below uses the following structure:
+
+<code>
+<WRAP group>
+
+<WRAP third column>...content...</WRAP>
+<WRAP third column>...content...</WRAP>
+<WRAP third column>...content...</WRAP>
+
+</WRAP>
+</code>
+
+
+<WRAP group>
+<WRAP third column>
+=== Floating Options ===
+
+Normally you would only need the class ''column'', but for more sophisticated uses (not only for columns, but for any other classes, like [[#boxes and notes]] as well) you can have several kinds of "floats":
+
+ * **''column''** is the same as ''left'' in LTR languages and the same as ''right'' in RTL languages
+ * **''left''** will let you float your wrap on the left
+ * **''right''** will let the wrap float right
+ * **''center''** will position the wrap in the horizontal center of the page
+</WRAP>
+
+<WRAP third column>
+=== Widths ===
+
+You can set any valid widths (but only on divs): ''%, px, em, rem, ex, ch, vw, vh, pt, pc, cm, mm, in'', but most of the time you'd only want either
+
+^type^e.g.^note^
+^''%''|''30%''|makes sense in most cases|
+^''px''|''420px''|makes sense if your container contains images with a certain width|
+^''em''|''20em''|makes sense if you like your wrap container to grow and shrink with the font size|
+
+</WRAP>
+<WRAP third column>
+=== Width Keywords ===
+
+With certain width keywords you can fit your columns automatically to fill the available horizontal space. Those columns will also react to the screen size, so will be responsive and wrap underneath each other on mobile devices.
+
+There are four width keywords. These should not be combined with any other width, only ''third'' can be combined with ''twothirds''.
+
+ * **''half''** fits two columns in a row
+ * **''third''** fits three columns in a row
+ * **''quarter''** fits four columns in a row
+ * **''twothirds''** together with ''third'' fits a 2/3 and a 1/3 column in a row
+
+:!: Attention: In order to work properly, wraps with width keywords need an **additional ''%%<WRAP group>%%'' around a set** of them. If you mix several types in one group, you might need a ''%%<WRAP clear/>%%'' after a row.
+
+</WRAP>
+
+</WRAP>
+
+You can use the same options with spans (as each element that floats is automatically a block level element), but it probably doesn't make too much sense. :!: Widths on spans normally do not work (by design), but can make sense, when it is floating.
+
+:!: Attention: What is the difference between widths and width keywords and when is it best to use which? **Widths** can cause problems and will never fully add up, therefore will break the layout under some circumstances. (See [[http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug|box model]] for a technical explanation.) So, getting widths right will need some fiddling around and testing in various browsers. **Width keywords** on the other hand fit automatically and work better on mobile devices. But the drawback is that they need an extra wrap around them and don't work properly in older browsers (IE8 and under).
+
+All of those options will also work in the [[#boxes and notes]] wraps (see below).
+
+=== Old Emulated Headline (deprecated) ===
+
+When the ''emulatedHeadlines'' config option is enabled, every ''%%//**__text like this__**//%%'' or ''%%//**like that**//%%'' will create an "emulated headline" within a wrap. This feature is deprecated and will be removed at some point as standard headlines within wraps are supported for a while now.
+
+If that config options is enabled and you need text that is bold and italic, simply use it the other way around: ''%%**//No Headline//**%%''.
+
+
+=== Multi-columns ===
+
+<WRAP colmedium>
+Multi-columns work best in modern browsers (no IE9 and below) but should still be considered experimental as some browser behaviour is still inconsistent and buggy.
+
+Just use **''%%colsmall%%''** for small width columns, **''%%colmedium%%''** for medium width columns and **''%%collarge%%''** for large width columns.
+Or you can use **''%%col2%%''** for 2 columns, **''%%col3%%''** for 3 columns, **''%%col4%%''** for 4 columns and **''%%col5%%''** for 5 columns.
+The former type of column is determined by its width, the latter by its amount. The width-based columns are ideal for different layouts and device widths.
+
+:!: Note: Multi-columns don't make sense for spans.
+</WRAP>
+
+Don't use this for bigger columns containing more than just text. Use the [[#columns and floats]] mentioned above instead.
+
+
+==== Alignments ====
+
+You can use these different text alignments:
+
+ * ''leftalign''
+ * ''rightalign''
+ * ''centeralign''
+ * ''justify''
+
+<WRAP centeralign>
+Center aligned text ...
+</WRAP>
+
+<WRAP rightalign>
+... and right aligned.
+</WRAP>
+
+<code>
+<WRAP centeralign>
+Center aligned text ...
+</WRAP>
+
+<WRAP rightalign>
+... and right aligned.
+</WRAP>
+</code>
+
+:!: You cannot add alignments to spans.
+
+
+==== Boxes and Notes ====
+
+<WRAP round box 500px center>
+=== round box 500px center ===
+
+ * ''box'' creates a box around the container and uses the colours from the template's ''style.ini'' as default colours (''%%__background_alt__%%'' and ''%%__text__%%'')
+ * any of the classes ''info'', ''tip'', ''important'', ''alert'', ''help'', ''download'', ''todo'' will add a special note container with a corresponding icon
+ * the classes ''danger'', ''warning'', ''caution'', ''notice'', ''safety'' use safety colours (and no icons)
+ * ''round'' can be added to anything with a background colour or a border and will only work in modern browsers (no IE8 and under)
+</WRAP>
+
+
+<WRAP info 300px left>
+=== Info ===
+%%<WRAP info></WRAP>%%
+</WRAP>
+
+
+<WRAP tip 300px left>
+=== Tip ===
+%%<WRAP tip></WRAP>%%
+</WRAP>
+
+
+<WRAP important 300px left>
+=== Important ===
+%%<WRAP important></WRAP>%%
+</WRAP>
+
+
+<WRAP alert 300px left>
+=== Alert ===
+%%<WRAP alert></WRAP>%%
+</WRAP>
+
+
+<WRAP round help 300px left>
+=== Help ===
+%%<WRAP round help></WRAP>%%
+</WRAP>
+
+
+<WRAP download 300px left>
+=== Download ===
+%%<WRAP download></WRAP>%%
+</WRAP>
+
+
+<WRAP todo 300px left>
+=== Todo ===
+%%<WRAP todo></WRAP>%%
+</WRAP>
+
+
+<WRAP clear />
+
+
+**Safety Notes:**
+
+Best only use simple markup in safety notes.
+
+<WRAP danger 30% left>
+=== Danger ===
+%%<WRAP danger></WRAP>%%
+</WRAP>
+
+<WRAP warning 30% left>
+=== Warning ===
+%%<WRAP warning></WRAP>%%
+</WRAP>
+
+<WRAP caution 30% left>
+=== Caution ===
+%%<WRAP caution></WRAP>%%
+</WRAP>
+
+<WRAP round notice 30% left>
+=== Notice ===
+%%<WRAP round notice></WRAP>%%
+</WRAP>
+
+<WRAP round safety 30% left>
+=== Safety ===
+%%<WRAP round safety></WRAP>%%
+</WRAP>
+
+<WRAP clear />
+
+
+You can use notes and boxes also inside text with spans like this:
+<wrap info>info</wrap>, <wrap help>help</wrap>, <wrap alert>alert</wrap>, <wrap important>important</wrap>, <wrap tip>tip</wrap>, <wrap download>download</wrap>, <wrap todo>todo</wrap> and <wrap round box>round box</wrap> and <wrap danger>danger</wrap>, <wrap warning>warning</wrap>, <wrap caution>caution</wrap>, <wrap notice>notice</wrap>, <wrap safety>safety</wrap>.
+ <wrap info>info</wrap>, <wrap help>help</wrap>, ...
+
+==== Marks ====
+
+You can mark text as <wrap hi>highlighted</wrap>, <wrap lo>less significant</wrap> and <wrap em>especially emphasised</wrap>.
+
+ You can mark text as <wrap hi>highlighted</wrap>, <wrap lo>less significant</wrap> and <wrap em>especially emphasised</wrap>.
+
+:!: This might look ugly in some templates and should be adjusted accordingly.
+
+==== Tabs ====
+
+You can create a row of tabs by simply wrapping a list of links in ''%%<WRAP tabs></WRAP>%%''.
+
+<WRAP tabs>
+ * [[Some page]]
+ * [[example|This page]]
+ * [[Another page]]
+</WRAP>
+
+ <WRAP tabs>
+ * [[Some page]]
+ * [[example|This page]]
+ * [[Another page]]
+ </WRAP>
+
+:!: Please note, the styling of these tabs depend on the template you are using and not on the wrap plugin. If you only see a list of links and no tabs, please make sure to add "tabs" to the ''noPrefix'' config option and that your template supports at least the 2012-01-25 "Angua" DokuWiki release.
+
+==== Miscellaneous ====
+
+=== Clear float ===
+
+After using any of the float classes, you might come across following text protruding into the space where only the floating containers should be. To prevent that, you should simply add this after your last column:
+
+ <WRAP clear />
+
+=== Table width ===
+
+You can set the width of a table via ''tablewidth'' as every table inside that wrap will always be 100% wide. This makes it possible to give tables any width by adding an additional width to the wrap (or none for 100%).
+
+<WRAP tablewidth 80%>
+^ Table ^ is ^
+| 80% | wide |
+</WRAP>
+
+ <WRAP tablewidth 80%>
+ ^ Table ^ is ^
+ | 80% | wide |
+ </WRAP>
+
+=== Indent ===
+
+<wrap indent>This text will appear indented.</wrap>
+
+ <wrap indent>This text will appear indented.</wrap>
+
+=== Outdent ===
+
+<wrap outdent>This text will appear "outdented".</wrap>
+
+ <wrap outdent>This text will appear "outdented".</wrap>
+
+=== Prewrap ===
+
+<WRAP prewrap 250px>
+<code>
+Inside this code block the words will wrap to a new line although they are all in one line.
+</code>
+</WRAP>
+
+ <WRAP prewrap 250px>
+ <code>
+ Inside this code block the words will wrap to a new line although they are all in one line.
+ </code>
+ </WRAP>
+
+=== Spoiler ===
+
+Here follows a spoiler: <wrap spoiler>Darth Vader is Luke's father.</wrap>
+
+ Here follows a spoiler: <wrap spoiler>Darth Vader is Luke's father.</wrap>
+
+Just select the text in the spoiler box to be able to read its content.
+
+=== Button links ===
+
+A link that looks like a button: <wrap button>[[wiki:Syntax]]</wrap>
+
+ A link that looks like a button: <wrap button>[[wiki:Syntax]]</wrap>
+
+=== Hide ===
+
+The following text is hidden: <wrap hide>John, please revise that sentence.</wrap>
+
+ The following text is hidden: <wrap hide>John, please revise that sentence.</wrap>
+
+:!: Warning: The text will still appear in the source code, in non-modern browsers and is searchable. Do not hide any security risky secrets with it!
+
+=== Pagebreak ===
+
+The following will add a pagebreak: <WRAP pagebreak />
+
+ The following will add a pagebreak: <WRAP pagebreak />
+
+This has no effect on the browser screen. A [[http://reference.sitepoint.com/css/page-break-after|pagebreak]] will force a new page in printouts.
+
+=== Nopagebreak ===
+
+The following will try to avoid a pagebreak: <WRAP nopagebreak>much content, belonging together (like a long table)</WRAP>
+
+ The following will try to avoid a pagebreak: <WRAP nopagebreak>much content, belonging together (like a long table)</WRAP>
+
+This also has no effect on the browser screen. It will try to [[http://reference.sitepoint.com/css/page-break-inside|avoid a page break]] in printouts.
+
+=== Noprint ===
+
+<wrap noprint>This text appears on the screen, but not in print.</wrap>
+
+ <wrap noprint>This text appears on the screen, but not in print.</wrap>
+
+=== Onlyprint ===
+
+<wrap onlyprint>This text does not appear on the screen, but only in print.</wrap>
+
+ <wrap onlyprint>This text does not appear on the screen, but only in print.</wrap>
+
+
+==== Combining and Nesting ====
+
+You can combine and nest all classes and types of boxes, e.g.
+
+<WRAP box 350px right :en>
+===Outer box floats right ===
+
+<WRAP 165px left>
+Inner nested box floats left and is partly <wrap em hi>__em__phasized and __hi__ghlighted with a nested <wrap notice>__notice__</wrap> inside</wrap>.
+</WRAP>
+
+Text inside outer right box, but beneath inner left box.
+
+<WRAP clear />
+
+<WRAP round tip>
+Round tip box underneath, after a ''clear''.
+</WRAP>
+
+</WRAP>
+
+
+<code>
+<WRAP box 350px right :en>
+=== Outer box floats right ===
+
+<WRAP 165px left>
+Inner nested box floats left and is partly <wrap em hi>__em__phasized and __hi__ghlighted with a nested <wrap notice>__notice__</wrap> inside</wrap>.
+</WRAP>
+
+Text inside outer right box, but beneath inner left box.
+
+<WRAP clear />
+
+<WRAP round tip>
+Round tip box underneath, after a ''clear''.
+</WRAP>
+
+</WRAP>
+</code>
+
+
+===== Language and Text Direction =====
+
+You can change the language and the reading direction of a wrap container by simply adding a colon followed by the language code, like this:
+
+<code>
+<WRAP :he>
+זה עברית. ((<wrap :en>This means "This is Hebrew.", at least according to [[http://translate.google.com/|Google Translate]].</wrap>))
+</WRAP>
+</code>
+
+<WRAP :he>
+זה עברית. ((<wrap :en>This means "This is Hebrew.", at least according to [[http://translate.google.com/|Google Translate]].</wrap>))
+</WRAP>
+
+The text direction (''rtl'', right to left or ''ltr'', left to right) will get inserted automatically and is solely dependent on the language. The list of currently supported languages is taken from: http://meta.wikimedia.org/wiki/Template:List_of_language_names_ordered_by_code
+(If you specify a language not listed there, it simply won't do anything.)
diff --git a/platform/www/lib/plugins/wrap/helper.php b/platform/www/lib/plugins/wrap/helper.php
new file mode 100644
index 0000000..13620d4
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/helper.php
@@ -0,0 +1,788 @@
+<?php
+/**
+ * Helper Component for the Wrap Plugin
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Anika Henke <anika@selfthinker.org>
+ */
+
+// must be run within Dokuwiki
+if(!defined('DOKU_INC')) die();
+
+class helper_plugin_wrap extends DokuWiki_Plugin {
+ static protected $boxes = array ('wrap_box', 'wrap_danger', 'wrap_warning', 'wrap_caution', 'wrap_notice', 'wrap_safety',
+ 'wrap_info', 'wrap_important', 'wrap_alert', 'wrap_tip', 'wrap_help', 'wrap_todo',
+ 'wrap_download', 'wrap_hi', 'wrap_spoiler');
+ static protected $paragraphs = array ('wrap_leftalign', 'wrap_rightalign', 'wrap_centeralign', 'wrap_justify');
+ static protected $column_count = 0;
+ static $box_left_pos = 0;
+ static $box_right_pos = 0;
+ static $box_first = true;
+ static $table_entr = 0;
+
+ /**
+ * get attributes (pull apart the string between '<wrap' and '>')
+ * and identify classes, width, lang and dir
+ *
+ * @author Anika Henke <anika@selfthinker.org>
+ * @author Christopher Smith <chris@jalakai.co.uk>
+ * (parts taken from http://www.dokuwiki.org/plugin:box)
+ */
+ function getAttributes($data, $useNoPrefix=true) {
+
+ $attr = array();
+ $tokens = preg_split('/\s+/', $data, 9);
+
+ // anonymous function to convert inclusive comma separated items to regex pattern
+ $pattern = function ($csv) {
+ return '/^(?:'. str_replace(['?','*',' ',','],
+ ['.','.*','','|'], $csv) .')$/';
+ };
+
+ // noPrefix: comma separated class names that should be excluded from
+ // being prefixed with "wrap_",
+ // each item may contain wildcard (*, ?)
+ $noPrefix = ($this->getConf('noPrefix') && $useNoPrefix) ? $pattern($this->getConf('noPrefix')) : '';
+
+ // restrictedClasses : comma separated class names that should be checked
+ // based on restriction type (whitelist or blacklist),
+ // each item may contain wildcard (*, ?)
+ $restrictedClasses = ($this->getConf('restrictedClasses')) ?
+ $pattern($this->getConf('restrictedClasses')) : '';
+ $restrictionType = $this->getConf('restrictionType');
+
+ foreach ($tokens as $token) {
+
+ //get width
+ if (preg_match('/^\d*\.?\d+(%|px|em|rem|ex|ch|vw|vh|pt|pc|cm|mm|in)$/', $token)) {
+ $attr['width'] = $token;
+ continue;
+ }
+
+ //get lang
+ if (preg_match('/\:([a-z\-]+)/', $token)) {
+ $attr['lang'] = trim($token,':');
+ continue;
+ }
+
+ //get id
+ if (preg_match('/#([A-Za-z0-9_-]+)/', $token)) {
+ $attr['id'] = trim($token,'#');
+ continue;
+ }
+
+ //get classes
+ //restrict token (class names) characters to prevent any malicious data
+ if (preg_match('/[^A-Za-z0-9_-]/',$token)) continue;
+ if ($restrictedClasses) {
+ $classIsInList = preg_match($restrictedClasses, $token);
+ // either allow only certain classes or disallow certain classes
+ if ($restrictionType xor $classIsInList) continue;
+ }
+ // prefix adjustment of class name
+ $prefix = (preg_match($noPrefix, $token)) ? '' : 'wrap_';
+ $attr['class'] = (isset($attr['class']) ? $attr['class'].' ' : '').$prefix.$token;
+ }
+ if ($this->getConf('darkTpl')) {
+ $attr['class'] = (isset($attr['class']) ? $attr['class'].' ' : '').'wrap__dark';
+ }
+ if ($this->getConf('emulatedHeadings')) {
+ $attr['class'] = (isset($attr['class']) ? $attr['class'].' ' : '').'wrap__emuhead';
+ }
+
+ //get dir
+ if($attr['lang']) {
+ $lang2dirFile = dirname(__FILE__).'/conf/lang2dir.conf';
+ if (@file_exists($lang2dirFile)) {
+ $lang2dir = confToHash($lang2dirFile);
+ $attr['dir'] = strtr($attr['lang'],$lang2dir);
+ }
+ }
+
+ return $attr;
+ }
+
+ /**
+ * build attributes (write out classes, width, lang and dir)
+ */
+ function buildAttributes($data, $addClass='', $mode='xhtml') {
+
+ $attr = $this->getAttributes($data);
+ $out = '';
+
+ if ($mode=='xhtml') {
+ if($attr['class']) $out .= ' class="'.hsc($attr['class']).' '.$addClass.'"';
+ // if used in other plugins, they might want to add their own class(es)
+ elseif($addClass) $out .= ' class="'.$addClass.'"';
+ if($attr['id']) $out .= ' id="'.hsc($attr['id']).'"';
+ // width on spans normally doesn't make much sense, but in the case of floating elements it could be used
+ if($attr['width']) {
+ if (strpos($attr['width'],'%') !== false) {
+ $out .= ' style="width: '.hsc($attr['width']).';"';
+ } else {
+ // anything but % should be 100% when the screen gets smaller
+ $out .= ' style="width: '.hsc($attr['width']).'; max-width: 100%;"';
+ }
+ }
+ // only write lang if it's a language in lang2dir.conf
+ if($attr['dir']) $out .= ' lang="'.$attr['lang'].'" xml:lang="'.$attr['lang'].'" dir="'.$attr['dir'].'"';
+ }
+
+ return $out;
+ }
+
+ /**
+ * render ODT element, Open
+ * (get Attributes, select ODT element that fits, render it, return element name)
+ */
+ function renderODTElementOpen($renderer, $HTMLelement, $data) {
+ $attr = $this->getAttributes($data, false);
+ $attr_string = $this->buildAttributes($data);
+ $classes = explode (' ', $attr['class']);
+
+ // Get language
+ $language = $attr['lang'];
+
+ $is_indent = in_array ('wrap_indent', $classes);
+ $is_outdent = in_array ('wrap_outdent', $classes);
+ $is_column = in_array ('wrap_column', $classes);
+ $is_group = in_array ('wrap_group', $classes);
+ $is_pagebreak = in_array ('wrap_pagebreak', $classes);
+
+ // Check for multicolumns
+ $columns = 0;
+ preg_match ('/wrap_col\d/', $attr ['class'], $matches);
+ if ( empty ($matches [0]) === false ) {
+ $columns = $matches [0] [strlen($matches [0])-1];
+ }
+
+ // Check for boxes
+ $is_box = false;
+ foreach (self::$boxes as $box) {
+ if ( strpos ($attr ['class'], $box) !== false ) {
+ $is_box = true;
+ break;
+ }
+ }
+
+ // Check for paragraphs
+ $is_paragraph = false;
+ if ( empty($language) === false ) {
+ $is_paragraph = true;
+ } else {
+ foreach (self::$paragraphs as $paragraph) {
+ if ( strpos ($attr ['class'], $paragraph) !== false ) {
+ $is_paragraph = true;
+ break;
+ }
+ }
+ }
+
+ $style = NULL;
+ if ( empty($attr['width']) === false ) {
+ $style = 'width: '.$attr['width'].';';
+ }
+ $attr ['class'] = 'dokuwiki '.$attr ['class'];
+
+ // Call corresponding functions for current wrap class
+ if ( $HTMLelement == 'span' ) {
+ if ( $is_indent === false && $is_outdent === false ) {
+ $this->renderODTOpenSpan ($renderer, $attr ['class'], $style, $language, $attr_string);
+ return 'span';
+ } else {
+ $this->renderODTOpenParagraph ($renderer, $attr ['class'], $style, $attr ['dir'], $language, $is_indent, $is_outdent, true, $attr_string);
+ return 'paragraph';
+ }
+ } else if ( $HTMLelement == 'div' ) {
+ if ( $is_box === true ) {
+ $wrap = $this->loadHelper('wrap');
+ $fullattr = $wrap->buildAttributes($data, 'plugin_wrap');
+
+ if ( method_exists ($renderer, 'getODTPropertiesFromElement') === false ) {
+ $this->renderODTOpenBox ($renderer, $attr ['class'], $style, $fullattr);
+ } else {
+ $this->renderODTOpenTable ($renderer, $attr, $style, $attr_string);
+ }
+ return 'box';
+ } else if ( $columns > 0 ) {
+ $this->renderODTOpenColumns ($renderer, $attr ['class'], $style);
+ return 'multicolumn';
+ } else if ( $is_paragraph === true || $is_indent === true || $is_outdent === true ) {
+ $this->renderODTOpenParagraph ($renderer, $attr ['class'], $style, $attr ['dir'], $language, $is_indent, $is_outdent, false, $attr_string);
+ return 'paragraph';
+ } else if ( $is_pagebreak === true ) {
+ $renderer->pagebreak ();
+ // Pagebreak hasn't got a closing stack so we return/push 'other' on the stack
+ return 'other';
+ } else if ( $is_column === true ) {
+ $this->renderODTOpenColumn ($renderer, $attr ['class'], $style, $attr_string);
+ return 'column';
+ } else if ( $is_group === true ) {
+ $this->renderODTOpenGroup ($renderer, $attr ['class'], $style);
+ return 'group';
+ } else if (strpos ($attr ['class'], 'wrap_clear') !== false ) {
+ $renderer->linebreak();
+ $renderer->p_close();
+ $renderer->p_open();
+
+ self::$box_left_pos = 0;
+ self::$box_right_pos = 0;
+ self::$box_first = true;
+ }
+ }
+ return 'other';
+ }
+
+ /**
+ * render ODT element, Close
+ */
+ function renderODTElementClose($renderer, $element) {
+ switch ($element) {
+ case 'box':
+ if ( method_exists ($renderer, 'getODTPropertiesFromElement') === false ) {
+ $this->renderODTCloseBox ($renderer);
+ } else {
+ $this->renderODTCloseTable ($renderer);
+ }
+ break;
+ case 'multicolumn':
+ $this->renderODTCloseColumns($renderer);
+ break;
+ case 'paragraph':
+ $this->renderODTCloseParagraph($renderer);
+ break;
+ case 'column':
+ $this->renderODTCloseColumn($renderer);
+ break;
+ case 'group':
+ $this->renderODTCloseGroup($renderer);
+ break;
+ case 'span':
+ $this->renderODTCloseSpan($renderer);
+ break;
+ // No default by intention.
+ }
+ }
+
+ function renderODTOpenBox ($renderer, $class, $style, $fullattr) {
+ $properties = array ();
+
+ if ( method_exists ($renderer, 'getODTProperties') === false ) {
+ // Function is not supported by installed ODT plugin version, return.
+ return;
+ }
+
+ // Get CSS properties for ODT export.
+ $renderer->getODTProperties ($properties, 'div', $class, $style);
+
+ if ( empty($properties ['background-image']) === false ) {
+ $properties ['background-image'] =
+ $renderer->replaceURLPrefix ($properties ['background-image'], DOKU_INC);
+ }
+
+ if ( empty($properties ['float']) === true ) {
+ // If the float property is not set, set it to 'left' becuase the ODT plugin
+ // would default to 'center' which is diffeent to the XHTML behaviour.
+ if ( strpos ($class, 'wrap_center') === false ) {
+ $properties ['float'] = 'left';
+ } else {
+ $properties ['float'] = 'center';
+ }
+ }
+
+ // The display property has differing usage in CSS. So we better overwrite it.
+ $properties ['display'] = 'always';
+ if ( stripos ($class, 'wrap_noprint') !== false ) {
+ $properties ['display'] = 'screen';
+ }
+ if ( stripos ($class, 'wrap_onlyprint') !== false ) {
+ $properties ['display'] = 'printer';
+ }
+
+ $renderer->_odtDivOpenAsFrameUseProperties ($properties);
+ }
+
+ function renderODTCloseBox ($renderer) {
+ if ( method_exists ($renderer, '_odtDivCloseAsFrame') === false ) {
+ // Function is not supported by installed ODT plugin version, return.
+ return;
+ }
+ $renderer->_odtDivCloseAsFrame ();
+ }
+
+ function renderODTOpenColumns ($renderer, $class, $style) {
+ $properties = array ();
+
+ if ( method_exists ($renderer, 'getODTProperties') === false ) {
+ // Function is not supported by installed ODT plugin version, return.
+ return;
+ }
+
+ // Get CSS properties for ODT export.
+ $renderer->getODTProperties ($properties, 'div', $class, $style);
+
+ $renderer->_odtOpenMultiColumnFrame($properties);
+ }
+
+ function renderODTCloseColumns ($renderer) {
+ if ( method_exists ($renderer, '_odtCloseMultiColumnFrame') === false ) {
+ // Function is not supported by installed ODT plugin version, return.
+ return;
+ }
+ $renderer->_odtCloseMultiColumnFrame();
+ }
+
+ function renderODTOpenParagraph ($renderer, $class, $style, $dir, $language, $is_indent, $is_outdent, $indent_first, $attr=NULL) {
+ $properties = array ();
+
+ if ( method_exists ($renderer, 'getODTPropertiesFromElement') === true ) {
+ // Get CSS properties for ODT export.
+ // Set parameter $inherit=false to prevent changiung the font-size and family!
+ $renderer->getODTPropertiesNew ($properties, 'p', $attr, NULL, false);
+ } else if ( method_exists ($renderer, 'getODTProperties') === true ) {
+ // Get CSS properties for ODT export (deprecated version).
+ $renderer->getODTProperties ($properties, 'p', $class, $style);
+
+ if ( empty($properties ['background-image']) === false ) {
+ $properties ['background-image'] =
+ $renderer->replaceURLPrefix ($properties ['background-image'], DOKU_INC);
+ }
+ } else {
+ // To old ODT plugin version.
+ return;
+ }
+
+ if ( empty($properties ['text-align']) )
+ {
+ if ($dir == 'ltr') {
+ $properties ['text-align'] = 'left';
+ $properties ['writing-mode'] = 'lr';
+ }
+ if ($dir == 'rtl') {
+ $properties ['text-align'] = 'right';
+ $properties ['writing-mode'] = 'rl';
+ }
+ }
+
+ $name = '';
+ if ( empty($language) === false ) {
+ $properties ['lang'] = $language;
+ $name .= 'Language: '.$language;
+ }
+
+ if ( $indent_first === true ) {
+ // Eventually indent or outdent first line only...
+ if ( $is_indent === true ) {
+ // FIXME: Has to be adjusted if test direction will be supported.
+ // See all.css
+ $properties ['text-indent'] = $properties ['padding-left'];
+ $properties ['padding-left'] = 0;
+ $name .= 'Indent first';
+ }
+ if ( $is_outdent === true ) {
+ // FIXME: Has to be adjusted if text (RTL, LTR) direction will be supported.
+ // See all.css
+ $properties ['text-indent'] = $properties ['margin-left'];
+ $properties ['margin-left'] = 0;
+ $name .= 'Outdent first';
+ }
+ } else {
+ // Eventually indent or outdent the whole paragraph...
+ if ( $is_indent === true ) {
+ // FIXME: Has to be adjusted if test direction will be supported.
+ // See all.css
+ $properties ['margin-left'] = $properties ['padding-left'];
+ $properties ['padding-left'] = 0;
+ $name .= 'Indent';
+ }
+ if ( $is_outdent === true ) {
+ // Nothing to change: keep left margin property.
+ // FIXME: Has to be adjusted if text (RTL, LTR) direction will be supported.
+ // See all.css
+ $name .= 'Outdent';
+ }
+ }
+
+ $renderer->p_close();
+ if ( method_exists ($renderer, 'createParagraphStyle') === false ) {
+ // Older ODT plugin version.
+ $renderer->_odtParagraphOpenUseProperties($properties);
+ } else {
+ // Newer version create our own common styles.
+
+ // Create parent style to group the others beneath it
+ if (!$renderer->styleExists('Plugin_Wrap_Paragraphs')) {
+ $parent_properties = array();
+ $parent_properties ['style-parent'] = NULL;
+ $parent_properties ['style-class'] = 'Plugin Wrap Paragraphs';
+ $parent_properties ['style-name'] = 'Plugin_Wrap_Paragraphs';
+ $parent_properties ['style-display-name'] = 'Plugin Wrap';
+ $renderer->createParagraphStyle($parent_properties);
+ }
+
+ $name .= $this->getODTCommonStyleName($class);
+ $style_name = 'Plugin_Wrap_Paragraph_'.$name;
+ if (!$renderer->styleExists($style_name)) {
+ $properties ['style-parent'] = 'Plugin_Wrap_Paragraphs';
+ $properties ['style-class'] = NULL;
+ $properties ['style-name'] = $style_name;
+ $properties ['style-display-name'] = $name;
+ $renderer->createParagraphStyle($properties);
+ }
+
+ $renderer->p_open($style_name);
+ }
+ }
+
+ function renderODTCloseParagraph ($renderer) {
+ if ( method_exists ($renderer, 'p_close') === false ) {
+ // Function is not supported by installed ODT plugin version, return.
+ return;
+ }
+ $renderer->p_close();
+ }
+
+ function renderODTOpenColumn ($renderer, $class, $style, $attr) {
+ $properties = array ();
+
+ if ( method_exists ($renderer, 'getODTPropertiesFromElement') === true ) {
+ // Get CSS properties for ODT export.
+ $renderer->getODTPropertiesNew ($properties, 'div', $attr);
+ } else if ( method_exists ($renderer, 'getODTProperties') === true ) {
+ // Get CSS properties for ODT export (deprecated version).
+ $renderer->getODTProperties ($properties, NULL, $class, $style);
+ } else {
+ // To old ODT plugin version.
+ return;
+ }
+
+ // Frames/Textboxes still have some issues with formatting (at least in LibreOffice)
+ // So as a workaround we implement columns as a table.
+ // This is why we now use the margin of the div as the padding for the ODT table.
+ $properties ['padding-left'] = $properties ['margin-left'];
+ $properties ['padding-right'] = $properties ['margin-right'];
+ $properties ['padding-top'] = $properties ['margin-top'];
+ $properties ['padding-bottom'] = $properties ['margin-bottom'];
+ $properties ['margin-left'] = NULL;
+ $properties ['margin-right'] = NULL;
+ $properties ['margin-top'] = NULL;
+ $properties ['margin-bottom'] = NULL;
+
+ // Percentage values are not supported for the padding. Convert to absolute values.
+ $length = strlen ($properties ['padding-left']);
+ if ( $length > 0 && $properties ['padding-left'] [$length-1] == '%' ) {
+ $properties ['padding-left'] = trim ($properties ['padding-left'], '%');
+ $properties ['padding-left'] = $renderer->_getAbsWidthMindMargins ($properties ['padding-left']).'cm';
+ }
+ $length = strlen ($properties ['padding-right']);
+ if ( $length > 0 && $properties ['padding-right'] [$length-1] == '%' ) {
+ $properties ['padding-right'] = trim ($properties ['padding-right'], '%');
+ $properties ['padding-right'] = $renderer->_getAbsWidthMindMargins ($properties ['padding-right']).'cm';
+ }
+ $length = strlen ($properties ['padding-top']);
+ if ( $length > 0 && $properties ['padding-top'] [$length-1] == '%' ) {
+ $properties ['padding-top'] = trim ($properties ['padding-top'], '%');
+ $properties ['padding-top'] = $renderer->_getAbsWidthMindMargins ($properties ['padding-top']).'cm';
+ }
+ $length = strlen ($properties ['padding-bottom']);
+ if ( $length > 0 && $properties ['padding-bottom'] [$length-1] == '%' ) {
+ $properties ['padding-bottom'] = trim ($properties ['padding-bottom'], '%');
+ $properties ['padding-bottom'] = $renderer->_getAbsWidthMindMargins ($properties ['padding-bottom']).'cm';
+ }
+
+ $this->column_count++;
+ if ( $this->column_count == 1 ) {
+ // If this is the first column opened since the group was opened
+ // then we have to open the table and a (single) row first.
+ $properties ['width'] = '100%';
+ $renderer->_odtTableOpenUseProperties($properties);
+ $renderer->_odtTableRowOpenUseProperties($properties);
+ }
+
+ // We did not specify any max column value when we opened the table.
+ // So we have to tell the renderer to add a column just now.
+ unset($properties ['width']);
+ $renderer->_odtTableAddColumnUseProperties($properties);
+
+ // Open the cell.
+ $renderer->_odtTableCellOpenUseProperties($properties);
+ }
+
+ function renderODTCloseColumn ($renderer) {
+ if ( method_exists ($renderer, '_odtTableAddColumnUseProperties') === false ) {
+ // Function is not supported by installed ODT plugin version, return.
+ return;
+ }
+
+ $renderer->tablecell_close();
+ }
+
+ function renderODTOpenGroup ($renderer, $class, $style) {
+ // Nothing to do for now.
+ }
+
+ function renderODTCloseGroup ($renderer) {
+ // If a table has been opened in the group we close it now.
+ if ( $this->column_count > 0 ) {
+ // At last we need to close the row and the table!
+ $renderer->tablerow_close();
+ //$renderer->table_close();
+ $renderer->_odtTableClose();
+ }
+ $this->column_count = 0;
+ }
+
+ function renderODTOpenSpan ($renderer, $class, $style, $language, $attr) {
+ $properties = array ();
+
+ if ( method_exists ($renderer, 'getODTPropertiesFromElement') === true ) {
+ // Get CSS properties for ODT export.
+ // Set parameter $inherit=false to prevent changiung the font-size and family!
+ $renderer->getODTPropertiesNew ($properties, 'span', $attr, NULL, false);
+ } else if ( method_exists ($renderer, 'getODTProperties') === true ) {
+ // Get CSS properties for ODT export (deprecated version).
+ $renderer->getODTProperties ($properties, 'span', $class, $style);
+
+ if ( empty($properties ['background-image']) === false ) {
+ $properties ['background-image'] =
+ $renderer->replaceURLPrefix ($properties ['background-image'], DOKU_INC);
+ }
+ } else {
+ // To old ODT plugin version.
+ return;
+ }
+
+ $name = '';
+ if ( empty($language) === false ) {
+ $properties ['lang'] = $language;
+ $name .= 'Language: '.$language;
+ }
+
+ if ( method_exists ($renderer, 'getODTPropertiesFromElement') === false ) {
+ // Older ODT plugin version.
+ $renderer->_odtSpanOpenUseProperties($properties);
+ } else {
+ // Newer version create our own common styles.
+ $properties ['font-size'] = NULL;
+
+ // Create parent style to group the others beneath it
+ if (!$renderer->styleExists('Plugin_Wrap_Spans')) {
+ $parent_properties = array();
+ $parent_properties ['style-parent'] = NULL;
+ $parent_properties ['style-class'] = 'Plugin Wrap Spans';
+ $parent_properties ['style-name'] = 'Plugin_Wrap_Spans';
+ $parent_properties ['style-display-name'] = 'Plugin Wrap';
+ $renderer->createTextStyle($parent_properties);
+ }
+
+ $name .= $this->getODTCommonStyleName($class);
+ $style_name = 'Plugin_Wrap_Span_'.$name;
+ if (!$renderer->styleExists($style_name)) {
+ $properties ['style-parent'] = 'Plugin_Wrap_Spans';
+ $properties ['style-class'] = NULL;
+ $properties ['style-name'] = $style_name;
+ $properties ['style-display-name'] = $name;
+ $renderer->createTextStyle($properties);
+ }
+
+ if (!empty($properties ['background-image'])) {
+ if (method_exists ($renderer, '_odtAddImageUseProperties') === true) {
+ $size = NULL;
+ if (!empty($properties ['font-size'])) {
+ $size = $properties ['font-size'];
+ $size = $renderer->addToValue($size, '2pt');
+ }
+ $properties ['width'] = $size;
+ $properties ['height'] = $size;
+ $properties ['title'] = NULL;
+ $renderer->_odtAddImageUseProperties ($properties ['background-image'],$properties);
+ } else {
+ $renderer->_odtAddImage ($properties ['background-image'],NULL,NULL,NULL,NULL,NULL);
+ }
+ }
+ $renderer->_odtSpanOpen($style_name);
+ }
+ }
+
+ function renderODTCloseSpan ($renderer) {
+ if ( method_exists ($renderer, '_odtSpanClose') === false ) {
+ // Function is not supported by installed ODT plugin version, return.
+ return;
+ }
+ $renderer->_odtSpanClose();
+ }
+
+ function renderODTOpenTable ($renderer, $attr, $style, $attr_string) {
+ self::$table_entr += 1;
+
+ $class = $attr ['class'];
+ $css_properties = array ();
+
+ if ( method_exists ($renderer, 'getODTPropertiesFromElement') === false ) {
+ // Function is not supported by installed ODT plugin version, return.
+ return;
+ }
+
+ // Get CSS properties for ODT export.
+ $renderer->getODTPropertiesNew ($css_properties, 'div', $attr_string, NULL, true);
+
+ if ( empty($css_properties ['float']) === true ) {
+ // If the float property is not set, set it to 'left' becuase the ODT plugin
+ // would default to 'center' which is diffeent to the XHTML behaviour.
+ //$css_properties ['float'] = 'left';
+ if (strpos ($class, 'wrap_left') !== false ) {
+ $css_properties ['float'] = 'left';
+ } else if (strpos ($class, 'wrap_center') !== false ) {
+ $css_properties ['float'] = 'center';
+ } else if (strpos ($class, 'wrap_right') !== false) {
+ $css_properties ['float'] = 'right';
+ }
+ }
+
+ // The display property has differing usage in CSS. So we better overwrite it.
+ $css_properties ['display'] = 'always';
+ if ( stripos ($class, 'wrap_noprint') !== false ) {
+ $css_properties ['display'] = 'screen';
+ }
+ if ( stripos ($class, 'wrap_onlyprint') !== false ) {
+ $css_properties ['display'] = 'printer';
+ }
+
+ $background_color = $css_properties ['background-color'];
+ $image = $css_properties ['background-image'];
+ $margin_top = $css_properties ['margin-top'];
+ $margin_right = $css_properties ['margin-right'];
+ $margin_bottom = $css_properties ['margin-bottom'];
+ $margin_left = $css_properties ['margin-left'];
+ $width = $attr ['width'];
+
+ // Open 2x1 table if image is present
+ // otherwise only a 1x1 table
+ $properties = array();
+ $properties ['width'] = '100%';
+ $properties ['align'] = 'center';
+ $properties ['margin-top'] = $margin_top;
+ $properties ['margin-right'] = $margin_right;
+ $properties ['margin-bottom'] = $margin_bottom;
+ $properties ['margin-left'] = $margin_left;
+
+ $frame_props = array();
+ if (!empty($css_properties ['border'])) {
+ $frame_props ['border'] = $css_properties ['border'];
+ } else {
+ $frame_props ['border'] = 'none';
+ }
+ $frame_props ['min-height'] = '1cm';
+ $frame_props ['width'] = $attr ['width'];
+ $frame_props ['float'] = $css_properties ['float'];
+ if ( self::$table_entr > 1 ) {
+ $frame_props ['anchor-type'] = 'as-char';
+ } else {
+ $frame_props ['anchor-type'] = 'paragraph';
+ }
+ $frame_props ['textarea-horizontal-align'] = 'left';
+ $frame_props ['run-through'] = 'foreground';
+ $frame_props ['vertical-pos'] = 'from-top';
+ $frame_props ['vertical-rel'] = 'paragraph';
+ $frame_props ['horizontal-pos'] = 'from-left';
+ $frame_props ['horizontal-rel'] = 'paragraph';
+ $frame_props ['wrap'] = 'parallel';
+ $frame_props ['number-wrapped-paragraphs'] = 'no-limit';
+ if (!empty($frame_props ['float']) &&
+ $frame_props ['float'] != 'center') {
+ $frame_props ['margin-top'] = '0cm';
+ $frame_props ['margin-right'] = '0cm';
+ $frame_props ['margin-bottom'] = '0cm';
+ $frame_props ['margin-left'] = '0cm';
+ $frame_props ['padding-top'] = '0cm';
+ $frame_props ['padding-bottom'] = '0cm';
+ } else {
+ // No wrapping on not floating divs
+ $frame_props ['wrap'] = 'none';
+ }
+
+ switch ($frame_props ['float']) {
+ case 'left':
+ if ( self::$table_entr == 1 ) {
+ $frame_props ['y'] = '0cm';
+ $frame_props ['x'] = self::$box_left_pos.'cm';
+ self::$box_left_pos += trim($frame_props ['width'], 'cm');
+ }
+ $frame_props ['padding-left'] = '0cm';
+ break;
+ case 'right':
+ $frame_props ['horizontal-rel'] = 'paragraph';
+ $frame_props ['horizontal-pos'] = 'right';
+ $frame_props ['padding-right'] = '0cm';
+ break;
+ case 'center':
+ $frame_props ['horizontal-pos'] = 'center';
+ break;
+ default:
+ $frame_props ['padding-left'] = '0cm';
+ break;
+ }
+ $renderer->_odtOpenTextBoxUseProperties($frame_props);
+
+ $renderer->_odtTableOpenUseProperties($properties);
+
+ if (!empty($image)) {
+ $properties = array();
+ $properties ['width'] = '2cm';
+ $renderer->_odtTableAddColumnUseProperties($properties);
+ }
+
+ $properties = array();
+ $renderer->_odtTableAddColumnUseProperties($properties);
+
+ $renderer->tablerow_open();
+
+ if (!empty($image)) {
+ $properties = array();
+ $properties ['vertical-align'] = 'middle';
+ $properties ['text-align'] = 'center';
+ $properties ['padding'] = '0.1cm';
+ $properties ['background-color'] = $background_color;
+
+ $renderer->_odtTableCellOpenUseProperties($properties);
+ $renderer->_odtAddImage($image);
+ $renderer->tablecell_close();
+ }
+
+ $properties = array();
+ $properties ['vertical-align'] = 'middle';
+ $properties ['padding'] = '0.3cm';
+ $properties ['background-color'] = $background_color;
+ $properties ['border'] = 'none';
+ $renderer->_odtTableCellOpenUseProperties($properties);
+ }
+
+ function renderODTCloseTable ($renderer) {
+ $renderer->tablecell_close();
+ $renderer->tablerow_close();
+ $renderer->_odtTableClose();
+ $renderer->_odtCloseTextBox ();
+
+ self::$table_entr -= 1;
+ }
+
+ protected function getODTCommonStyleName ($class_string) {
+ static $map = array (
+ 'wrap_box' => 'Box', 'wrap_danger' => 'Danger', 'wrap_warning' => 'Warning',
+ 'wrap_caution' => 'Caution', 'wrap_notice' => 'Notice', 'wrap_safety' => 'Safety',
+ 'wrap_info' => 'Info', 'wrap_important' => 'Important', 'wrap_alert' => 'Alert',
+ 'wrap_tip' => 'Tip', 'wrap_help' => 'Help', 'wrap_todo' => 'To do',
+ 'wrap_download' => 'Download', 'wrap_hi' => 'Highlighted', 'wrap_spoiler' => 'Spoiler',
+ 'wrap_leftalign' => 'Left aligned', 'wrap_rightalign' => 'Right aligned',
+ 'wrap_centeralign' => 'Centered', 'wrap_justify' => 'Justify', 'wrap_em' => 'Emphasised',
+ 'wrap_lo' => 'Less significant');
+ $classes = explode(' ', $class_string);
+ $name = '';
+ foreach ($classes as $class) {
+ if (array_key_exists($class, $map)) {
+ $name .= $map [$class];
+ }
+ }
+ return ($name);
+ }
+}
diff --git a/platform/www/lib/plugins/wrap/images/README b/platform/www/lib/plugins/wrap/images/README
new file mode 100644
index 0000000..a44a9f4
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/images/README
@@ -0,0 +1,18 @@
+_NOTE_
+
+Icon set: Human-O2
+Designer: Oliver Scholtz (and others) [~schollidesign]
+License: GPL (http://www.gnu.org/copyleft/gpl.html)
+URL: http://schollidesign.deviantart.com/art/Human-O2-Iconset-105344123
+
+_TOOLBAR_
+
+Icon set: Silk
+Designer: Mark James
+License: Creative Commons Attribution 2.5 License (http://creativecommons.org/licenses/by/2.5/)
+URL: http://www.famfamfam.com/lab/icons/silk/
+
+Icon set: Silk Companion
+Designer: Damien Guard
+License: Creative Commons Attribution 2.5 License (http://creativecommons.org/licenses/by/2.5/)
+URL: http://www.damieng.com/icons/silkcompanion
diff --git a/platform/www/lib/plugins/wrap/images/note/16/alert.png b/platform/www/lib/plugins/wrap/images/note/16/alert.png
new file mode 100644
index 0000000..f051b1d
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/images/note/16/alert.png
Binary files differ
diff --git a/platform/www/lib/plugins/wrap/images/note/16/download.png b/platform/www/lib/plugins/wrap/images/note/16/download.png
new file mode 100644
index 0000000..e8c7221
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/images/note/16/download.png
Binary files differ
diff --git a/platform/www/lib/plugins/wrap/images/note/16/help.png b/platform/www/lib/plugins/wrap/images/note/16/help.png
new file mode 100644
index 0000000..2e923a2
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/images/note/16/help.png
Binary files differ
diff --git a/platform/www/lib/plugins/wrap/images/note/16/important.png b/platform/www/lib/plugins/wrap/images/note/16/important.png
new file mode 100644
index 0000000..0d7f1f0
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/images/note/16/important.png
Binary files differ
diff --git a/platform/www/lib/plugins/wrap/images/note/16/info.png b/platform/www/lib/plugins/wrap/images/note/16/info.png
new file mode 100644
index 0000000..9b38f8e
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/images/note/16/info.png
Binary files differ
diff --git a/platform/www/lib/plugins/wrap/images/note/16/tip.png b/platform/www/lib/plugins/wrap/images/note/16/tip.png
new file mode 100644
index 0000000..23824bb
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/images/note/16/tip.png
Binary files differ
diff --git a/platform/www/lib/plugins/wrap/images/note/16/todo.png b/platform/www/lib/plugins/wrap/images/note/16/todo.png
new file mode 100644
index 0000000..ebaf17a
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/images/note/16/todo.png
Binary files differ
diff --git a/platform/www/lib/plugins/wrap/images/note/48/alert.png b/platform/www/lib/plugins/wrap/images/note/48/alert.png
new file mode 100644
index 0000000..e6f090f
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/images/note/48/alert.png
Binary files differ
diff --git a/platform/www/lib/plugins/wrap/images/note/48/download.png b/platform/www/lib/plugins/wrap/images/note/48/download.png
new file mode 100644
index 0000000..8f7def1
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/images/note/48/download.png
Binary files differ
diff --git a/platform/www/lib/plugins/wrap/images/note/48/help.png b/platform/www/lib/plugins/wrap/images/note/48/help.png
new file mode 100644
index 0000000..e39a09d
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/images/note/48/help.png
Binary files differ
diff --git a/platform/www/lib/plugins/wrap/images/note/48/important.png b/platform/www/lib/plugins/wrap/images/note/48/important.png
new file mode 100644
index 0000000..6910ef6
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/images/note/48/important.png
Binary files differ
diff --git a/platform/www/lib/plugins/wrap/images/note/48/info.png b/platform/www/lib/plugins/wrap/images/note/48/info.png
new file mode 100644
index 0000000..ccb25e8
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/images/note/48/info.png
Binary files differ
diff --git a/platform/www/lib/plugins/wrap/images/note/48/tip.png b/platform/www/lib/plugins/wrap/images/note/48/tip.png
new file mode 100644
index 0000000..7bd8951
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/images/note/48/tip.png
Binary files differ
diff --git a/platform/www/lib/plugins/wrap/images/note/48/todo.png b/platform/www/lib/plugins/wrap/images/note/48/todo.png
new file mode 100644
index 0000000..cfbc272
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/images/note/48/todo.png
Binary files differ
diff --git a/platform/www/lib/plugins/wrap/images/toolbar/box.png b/platform/www/lib/plugins/wrap/images/toolbar/box.png
new file mode 100644
index 0000000..33af046
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/images/toolbar/box.png
Binary files differ
diff --git a/platform/www/lib/plugins/wrap/images/toolbar/clear.png b/platform/www/lib/plugins/wrap/images/toolbar/clear.png
new file mode 100644
index 0000000..1cdcb48
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/images/toolbar/clear.png
Binary files differ
diff --git a/platform/www/lib/plugins/wrap/images/toolbar/column.png b/platform/www/lib/plugins/wrap/images/toolbar/column.png
new file mode 100644
index 0000000..97b2e03
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/images/toolbar/column.png
Binary files differ
diff --git a/platform/www/lib/plugins/wrap/images/toolbar/em.png b/platform/www/lib/plugins/wrap/images/toolbar/em.png
new file mode 100644
index 0000000..8940131
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/images/toolbar/em.png
Binary files differ
diff --git a/platform/www/lib/plugins/wrap/images/toolbar/hi.png b/platform/www/lib/plugins/wrap/images/toolbar/hi.png
new file mode 100644
index 0000000..c57aa15
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/images/toolbar/hi.png
Binary files differ
diff --git a/platform/www/lib/plugins/wrap/images/toolbar/lo.png b/platform/www/lib/plugins/wrap/images/toolbar/lo.png
new file mode 100644
index 0000000..cb64e86
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/images/toolbar/lo.png
Binary files differ
diff --git a/platform/www/lib/plugins/wrap/images/toolbar/picker.png b/platform/www/lib/plugins/wrap/images/toolbar/picker.png
new file mode 100644
index 0000000..4b5b847
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/images/toolbar/picker.png
Binary files differ
diff --git a/platform/www/lib/plugins/wrap/lang/ar/lang.php b/platform/www/lib/plugins/wrap/lang/ar/lang.php
new file mode 100644
index 0000000..0b2fc57
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/ar/lang.php
@@ -0,0 +1,16 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author alhajr <alhajr300@gmail.com>
+ */
+$lang['column'] = 'عمود';
+$lang['box'] = 'مربع متوسط بسيط';
+$lang['info'] = 'مربع معلومات';
+$lang['tip'] = 'مربع تلميح';
+$lang['important'] = 'مربع هام';
+$lang['alert'] = 'مربع التنبيه';
+$lang['help'] = 'مربع تعليمات';
+$lang['download'] = 'مربع التحميل';
+$lang['lo'] = 'أقل أهمية';
diff --git a/platform/www/lib/plugins/wrap/lang/ar/settings.php b/platform/www/lib/plugins/wrap/lang/ar/settings.php
new file mode 100644
index 0000000..808b843
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/ar/settings.php
@@ -0,0 +1,11 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author alhajr <alhajr300@gmail.com>
+ */
+$lang['restrictedClasses'] = 'تقييد استخدام البرنامج المساعد لهذه الفئات (مفصولة بفاصلة)';
+$lang['restrictionType'] = 'تعين نوع القيد، إذا كانت الفئات المذكورة أعلاه يجب تضمينها أو استبعادها';
+$lang['restrictionType_o_0'] = 'السماح لجميع الفئات باستثناء تلك المذكورة أعلاه';
+$lang['restrictionType_o_1'] = 'تقييد للفئات المذكورة أعلاه فقط وليس غيرها';
diff --git a/platform/www/lib/plugins/wrap/lang/bg/lang.php b/platform/www/lib/plugins/wrap/lang/bg/lang.php
new file mode 100644
index 0000000..a720dfc
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/bg/lang.php
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Neli Dimitrova <neli.dimitrova.office@gmail.com>
+ */
+$lang['picker'] = 'Wrap приставка';
+$lang['column'] = 'колони';
+$lang['box'] = 'обикновено центрирано поле';
+$lang['info'] = 'информационно поле';
+$lang['tip'] = 'поле за съвет';
+$lang['important'] = 'поле за важно съобщение';
+$lang['alert'] = 'поле за предупреждение';
+$lang['help'] = 'поле за съобщение за помощ';
+$lang['download'] = 'поле за сваляне';
+$lang['todo'] = 'поле за подсещане';
+$lang['clear'] = 'премахване на параметъра float';
+$lang['em'] = 'специално подчертано';
+$lang['hi'] = 'акцентирано';
+$lang['lo'] = 'маловажно';
diff --git a/platform/www/lib/plugins/wrap/lang/bg/settings.php b/platform/www/lib/plugins/wrap/lang/bg/settings.php
new file mode 100644
index 0000000..a9d0c57
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/bg/settings.php
@@ -0,0 +1,16 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Neli Dimitrova <neli.dimitrova.office@gmail.com>
+ */
+$lang['noPrefix'] = 'Кои имена на класове трябва да бъдат изключени от списъка с имена, които могат да бъдат разширени с префикс "wrap_"?
+Имената на класовете се изброяват в списък с разделител запетая.';
+$lang['restrictedClasses'] = 'Ограничи приставката да използва само тези класове. Класовете се изброяват в списък с разделител запетая.';
+$lang['restrictionType'] = 'тип на ограничението - специфицира дали изброените по-горе класове трябва да бъдат включени или изключени';
+$lang['restrictionType_o_0'] = 'позволи всички класове с изключение на посочените по-горе';
+$lang['restrictionType_o_1'] = 'ограничи единствено класовете изброени по-горе и никакви други';
+$lang['syntaxDiv'] = 'Какъв синтаксис трябва да бъде използван в лентата с инструменти за block wraps?';
+$lang['syntaxSpan'] = 'Какъв синтаксис трябва да бъде използван в лентата с инструменти за inline wraps?';
+$lang['darkTpl'] = 'Оптимизирай цветовете за тъмните шаблони?';
diff --git a/platform/www/lib/plugins/wrap/lang/bn/lang.php b/platform/www/lib/plugins/wrap/lang/bn/lang.php
new file mode 100644
index 0000000..301d270
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/bn/lang.php
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Ninetailz <ninetailz1125@gmail.com>
+ */
+$lang['picker'] = 'মোড়ানো প্লাগইন';
+$lang['column'] = 'স্তম্ভ';
+$lang['box'] = 'সহজ কেন্দ্রিক বাক্স';
+$lang['info'] = 'তথ্য বাক্স';
+$lang['tip'] = 'টিপ বাক্স';
+$lang['important'] = 'গুরুত্বপূর্ণ বাক্স';
+$lang['alert'] = 'সতর্কতা বাক্স';
+$lang['help'] = 'সাহায্য বাক্স';
+$lang['download'] = 'ডাউনলোডের বাক্স';
+$lang['todo'] = 'করণীয় বাক্স';
+$lang['clear'] = 'স্পষ্ট floats';
+$lang['em'] = 'বিশেষ করে জোর';
+$lang['hi'] = 'হাইলাইট';
+$lang['lo'] = 'কম গুরুত্বপূর্ণ';
diff --git a/platform/www/lib/plugins/wrap/lang/bn/settings.php b/platform/www/lib/plugins/wrap/lang/bn/settings.php
new file mode 100644
index 0000000..baeca82
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/bn/settings.php
@@ -0,0 +1,14 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Ninetailz <ninetailz1125@gmail.com>
+ */
+$lang['noPrefix'] = 'যা (কমা দিয়ে পৃথক) শ্রেণীর নাম "wrap_" সঙ্গে অগ্রে যুক্ত হওয়া থেকে বাদ দেওয়া হবে?';
+$lang['restrictedClasses'] = 'এইসব করতে প্লাগিন ব্যবহার সীমিত (কমা দিয়ে পৃথক করা) ক্লাস';
+$lang['restrictionType'] = 'ক্লাস উপরে অন্তর্ভুক্ত বা বাদ দেওয়া হইবে যদি সীমাবদ্ধতা ধরন, নির্দিষ্ট করে';
+$lang['restrictionType_o_0'] = 'উপরোক্ত জনকে ছাড়া সব শ্রেণীর অনুমতি';
+$lang['restrictionType_o_1'] = 'শুধুমাত্র উপরোক্ত শ্রেণীর এবং কোন অন্যদের সীমিত';
+$lang['syntaxDiv'] = 'কোন বাক্য গঠন ব্লক গোপন জন্য টুলবার জুতো ব্যবহার করা উচিত?';
+$lang['syntaxSpan'] = 'কোন বাক্য গঠন ইনলাইন গোপন জন্য টুলবার জুতো ব্যবহার করা উচিত?';
diff --git a/platform/www/lib/plugins/wrap/lang/cs/lang.php b/platform/www/lib/plugins/wrap/lang/cs/lang.php
new file mode 100644
index 0000000..7c3d7dc
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/cs/lang.php
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Jaroslav Lichtblau <jlichtblau@seznam.cz>
+ */
+$lang['picker'] = 'Zásuvný modul Wrap';
+$lang['column'] = 'sloupce';
+$lang['box'] = 'jednoduchý vystředěný rámeček';
+$lang['info'] = 'informační rámeček';
+$lang['tip'] = 'rámeček s radou';
+$lang['important'] = 'důležitý rámeček';
+$lang['alert'] = 'výstražný rámeček';
+$lang['help'] = 'pomocný rámeček';
+$lang['download'] = 'rámeček s odkazem ke stažení';
+$lang['todo'] = 'rámeček úkolu';
+$lang['clear'] = 'clear floats';
+$lang['em'] = 'zvláštně zdůrazněné';
+$lang['hi'] = 'zvýrazněné';
+$lang['lo'] = 'méně důležité';
diff --git a/platform/www/lib/plugins/wrap/lang/cs/settings.php b/platform/www/lib/plugins/wrap/lang/cs/settings.php
new file mode 100644
index 0000000..6d19249
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/cs/settings.php
@@ -0,0 +1,15 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Jaroslav Lichtblau <jlichtblau@seznam.cz>
+ */
+$lang['noPrefix'] = 'Která (čárkou oddělená) jména tříd nemají být označována předponou "wrap_"?';
+$lang['restrictedClasses'] = 'omezit použití zásuvného modulu na tyto (čárkou oddělené) třídy';
+$lang['restrictionType'] = 'typ omezení, rozhoduje jestli mají být výše uvedené třídy zahrnuty nebo vyřazeny';
+$lang['restrictionType_o_0'] = 'povolit všechny třídy kromě těch výše';
+$lang['restrictionType_o_1'] = 'omezit pouze na třídy výše a žádné jiné';
+$lang['syntaxDiv'] = 'Jaká syntax má být použita ve výběru pro zarovnání bloku? ';
+$lang['syntaxSpan'] = 'Jaká syntax má být použita ve výběru pro zarovnání v řádku? ';
+$lang['darkTpl'] = 'Optimalizovat barvy pro tmavý vzhled?';
diff --git a/platform/www/lib/plugins/wrap/lang/cy/lang.php b/platform/www/lib/plugins/wrap/lang/cy/lang.php
new file mode 100644
index 0000000..d071712
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/cy/lang.php
@@ -0,0 +1,22 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Alan Davies <ben.brynsadler@gmail.com>
+ * @author diafol <ben.brynsadler@gmail.com>
+ */
+$lang['picker'] = 'Ategyn Wrap';
+$lang['column'] = 'colofnau';
+$lang['box'] = 'blwch syml wedi\'i ganoli';
+$lang['info'] = 'blwch gwyb.';
+$lang['tip'] = 'blwch awgrym';
+$lang['important'] = 'blwch pwysig';
+$lang['alert'] = 'blwch rhybudd';
+$lang['help'] = 'blwch cyngor';
+$lang['download'] = 'blwch lawrlwytho';
+$lang['todo'] = 'blwch i-wneud';
+$lang['clear'] = 'clirio \'floats\'';
+$lang['em'] = 'gyda phwyslais arbennig';
+$lang['hi'] = 'aroleuedig';
+$lang['lo'] = 'llai arwyddocaol';
diff --git a/platform/www/lib/plugins/wrap/lang/cy/settings.php b/platform/www/lib/plugins/wrap/lang/cy/settings.php
new file mode 100644
index 0000000..25bd349
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/cy/settings.php
@@ -0,0 +1,15 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Alan Davies <ben.brynsadler@gmail.com>
+ */
+$lang['noPrefix'] = 'Pa enwau dosbarth (gwahanu gan goma) na ddylai derbyn y rhagddodiad "wrap_"?';
+$lang['restrictedClasses'] = 'cyfyngu defnydd yr ategyn hwn i\'r dosbarthiadau (gwahanu gan goma) hyn';
+$lang['restrictionType'] = 'math y cyfyngiad, yn dynodi os caiff y dosbarthiadau uchod eu cynnwys neu eu heithrio';
+$lang['restrictionType_o_0'] = 'caniatáu pob dosbarth ond y rhai uchod';
+$lang['restrictionType_o_1'] = 'cyfyngu i\'r dosbarthiadau uchod yn unig';
+$lang['syntaxDiv'] = 'Pa gystrawen a ddylid defnyddio yn newisydd y bar offer ar gyfer wrapiau bloc?';
+$lang['syntaxSpan'] = 'Pa gystrawen a ddylid defnyddio yn newisydd y bar offer ar gyfer wrapiau mewnlin?';
+$lang['darkTpl'] = 'Optimeiddio lliwiau ar gyfer templedau tywyll?';
diff --git a/platform/www/lib/plugins/wrap/lang/da/lang.php b/platform/www/lib/plugins/wrap/lang/da/lang.php
new file mode 100644
index 0000000..d300095
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/da/lang.php
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author soer9648 <soer9648@eucl.dk>
+ */
+$lang['picker'] = 'Wrap Plugin';
+$lang['column'] = 'række';
+$lang['box'] = 'simpel centreret boks';
+$lang['info'] = 'info boks';
+$lang['tip'] = 'tip boks';
+$lang['important'] = 'vigtig boks';
+$lang['alert'] = 'alarm boks';
+$lang['help'] = 'hjælp boks';
+$lang['download'] = 'download boks';
+$lang['todo'] = 'todo boks';
+$lang['clear'] = 'ryd flydere';
+$lang['em'] = 'specielt fremhævet';
+$lang['hi'] = 'fremhævet';
+$lang['lo'] = 'mindre vigtigt';
diff --git a/platform/www/lib/plugins/wrap/lang/da/settings.php b/platform/www/lib/plugins/wrap/lang/da/settings.php
new file mode 100644
index 0000000..25b0962
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/da/settings.php
@@ -0,0 +1,12 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author soer9648 <soer9648@eucl.dk>
+ */
+$lang['noPrefix'] = 'Hvilke (kommaseparerede) klassenavne skal udelukkes fra at få præfikset "wrap_"?';
+$lang['restrictedClasses'] = 'begræns brugen af plugin til følgende (kommaseparerede) klasser';
+$lang['restrictionType'] = 'begrænsningstype, specificerer om ovenstående klasser skal inkluderes eller ekskluderes';
+$lang['restrictionType_o_0'] = 'tillad alle klasser på nær de ovenstående';
+$lang['restrictionType_o_1'] = 'begræns til ovenstående klasser og ingen andre';
diff --git a/platform/www/lib/plugins/wrap/lang/de-informal/lang.php b/platform/www/lib/plugins/wrap/lang/de-informal/lang.php
new file mode 100644
index 0000000..0e83e08
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/de-informal/lang.php
@@ -0,0 +1,19 @@
+<?php
+
+$lang['picker'] = 'Wrap-Plugin';
+
+$lang['column'] = 'Spalten';
+$lang['box'] = 'einfache zentrierte Box';
+$lang['info'] = 'Info-Box';
+$lang['tip'] = 'Tip-Box';
+$lang['important'] = 'Wichtig-Box';
+$lang['alert'] = 'Warn-Box';
+$lang['help'] = 'Hilfe-Box';
+$lang['download'] = 'Download-Box';
+$lang['todo'] = 'Zu-Erledigen-Box';
+
+$lang['clear'] = 'Floats beseitigen';
+
+$lang['em'] = 'wichtig';
+$lang['hi'] = 'markieren';
+$lang['lo'] = 'weniger wichtig';
diff --git a/platform/www/lib/plugins/wrap/lang/de-informal/settings.php b/platform/www/lib/plugins/wrap/lang/de-informal/settings.php
new file mode 100644
index 0000000..ca16787
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/de-informal/settings.php
@@ -0,0 +1,15 @@
+<?php
+/**
+ * German language file for config of Wrap plugin
+ *
+ */
+
+$lang['noPrefix'] = 'Welche (mit Komma getrennten) Klassen sollen nicht mit "wrap_" anfangen? (* and ? Platzhalter erlaubt)';
+$lang['restrictedClasses'] = 'Beschränke die Benutzung des Plugins auf diese (mit Komma getrennten) Klassen (* and ? Platzhalter erlaubt)';
+$lang['restrictionType'] = 'Beschränkungsart, setzt fest ob obige Klassen ein- oder ausgeschlossen werden sollen';
+ $lang['restrictionType_o_0'] = 'Erlaube alle Klassen außer die obigen';
+ $lang['restrictionType_o_1'] = 'Beschränke auf die obigen Klassen und erlaube keine anderen';
+$lang['syntaxDiv'] = 'Welche Syntax soll die Werkzeugleiste für Block-Wraps verwenden?';
+$lang['syntaxSpan'] = 'Welche Syntax soll die Werkzeugleiste für Inline-Wraps verwenden?';
+$lang['darkTpl'] = 'Optimiere Farben für dunkle Templates?';
+$lang['emulatedHeadlines'] = 'Nutze nachgeahmte Überschriften? (veraltet)';
diff --git a/platform/www/lib/plugins/wrap/lang/de/lang.php b/platform/www/lib/plugins/wrap/lang/de/lang.php
new file mode 100644
index 0000000..0e83e08
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/de/lang.php
@@ -0,0 +1,19 @@
+<?php
+
+$lang['picker'] = 'Wrap-Plugin';
+
+$lang['column'] = 'Spalten';
+$lang['box'] = 'einfache zentrierte Box';
+$lang['info'] = 'Info-Box';
+$lang['tip'] = 'Tip-Box';
+$lang['important'] = 'Wichtig-Box';
+$lang['alert'] = 'Warn-Box';
+$lang['help'] = 'Hilfe-Box';
+$lang['download'] = 'Download-Box';
+$lang['todo'] = 'Zu-Erledigen-Box';
+
+$lang['clear'] = 'Floats beseitigen';
+
+$lang['em'] = 'wichtig';
+$lang['hi'] = 'markieren';
+$lang['lo'] = 'weniger wichtig';
diff --git a/platform/www/lib/plugins/wrap/lang/de/settings.php b/platform/www/lib/plugins/wrap/lang/de/settings.php
new file mode 100644
index 0000000..ca16787
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/de/settings.php
@@ -0,0 +1,15 @@
+<?php
+/**
+ * German language file for config of Wrap plugin
+ *
+ */
+
+$lang['noPrefix'] = 'Welche (mit Komma getrennten) Klassen sollen nicht mit "wrap_" anfangen? (* and ? Platzhalter erlaubt)';
+$lang['restrictedClasses'] = 'Beschränke die Benutzung des Plugins auf diese (mit Komma getrennten) Klassen (* and ? Platzhalter erlaubt)';
+$lang['restrictionType'] = 'Beschränkungsart, setzt fest ob obige Klassen ein- oder ausgeschlossen werden sollen';
+ $lang['restrictionType_o_0'] = 'Erlaube alle Klassen außer die obigen';
+ $lang['restrictionType_o_1'] = 'Beschränke auf die obigen Klassen und erlaube keine anderen';
+$lang['syntaxDiv'] = 'Welche Syntax soll die Werkzeugleiste für Block-Wraps verwenden?';
+$lang['syntaxSpan'] = 'Welche Syntax soll die Werkzeugleiste für Inline-Wraps verwenden?';
+$lang['darkTpl'] = 'Optimiere Farben für dunkle Templates?';
+$lang['emulatedHeadlines'] = 'Nutze nachgeahmte Überschriften? (veraltet)';
diff --git a/platform/www/lib/plugins/wrap/lang/en/lang.php b/platform/www/lib/plugins/wrap/lang/en/lang.php
new file mode 100644
index 0000000..955f250
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/en/lang.php
@@ -0,0 +1,19 @@
+<?php
+
+$lang['picker'] = 'Wrap Plugin';
+
+$lang['column'] = 'columns';
+$lang['box'] = 'simple centered box';
+$lang['info'] = 'info box';
+$lang['tip'] = 'tip box';
+$lang['important'] = 'important box';
+$lang['alert'] = 'alert box';
+$lang['help'] = 'help box';
+$lang['download'] = 'download box';
+$lang['todo'] = 'todo box';
+
+$lang['clear'] = 'clear floats';
+
+$lang['em'] = 'especially emphasised';
+$lang['hi'] = 'highlighted';
+$lang['lo'] = 'less significant';
diff --git a/platform/www/lib/plugins/wrap/lang/en/settings.php b/platform/www/lib/plugins/wrap/lang/en/settings.php
new file mode 100644
index 0000000..8699223
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/en/settings.php
@@ -0,0 +1,15 @@
+<?php
+/**
+ * English language file for config of Wrap plugin
+ *
+ */
+
+$lang['noPrefix'] = 'Which (comma separated) class names should be excluded from being prefixed with "wrap_"? (* and ? wildcards allowed)';
+$lang['restrictedClasses'] = 'Restrict usage of plugin to these (comma separated) classes (* and ? wildcards allowed)';
+$lang['restrictionType'] = 'Restriction type, specifies if classes above shall be included or excluded';
+ $lang['restrictionType_o_0'] = 'Allow all classes except the ones above';
+ $lang['restrictionType_o_1'] = 'Restrict to only the classes above and no others';
+$lang['syntaxDiv'] = 'Which syntax should be used in the toolbar picker for block wraps?';
+$lang['syntaxSpan'] = 'Which syntax should be used in the toolbar picker for inline wraps?';
+$lang['darkTpl'] = 'Optimise colours for dark templates?';
+$lang['emulatedHeadlines'] = 'Use emulated headings? (deprecated)';
diff --git a/platform/www/lib/plugins/wrap/lang/eo/lang.php b/platform/www/lib/plugins/wrap/lang/eo/lang.php
new file mode 100644
index 0000000..50c67ed
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/eo/lang.php
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Robert Bogenschneider <bogi@uea.org>
+ */
+$lang['picker'] = 'Wrap-kromaĵo';
+$lang['column'] = 'kolumnoj';
+$lang['box'] = 'simpla centrita skatolo';
+$lang['info'] = 'inform-skatolo';
+$lang['tip'] = 'konsil-skatolo';
+$lang['important'] = 'grava skatolo';
+$lang['alert'] = 'avert-skatolo';
+$lang['help'] = 'help-skatolo';
+$lang['download'] = 'elŝut-skatolo';
+$lang['todo'] = 'farendaĵ-skatolo';
+$lang['clear'] = 'liberigi la randojn';
+$lang['em'] = 'aparte emfazita';
+$lang['hi'] = 'markita';
+$lang['lo'] = 'malpli grava';
diff --git a/platform/www/lib/plugins/wrap/lang/eo/settings.php b/platform/www/lib/plugins/wrap/lang/eo/settings.php
new file mode 100644
index 0000000..89d037a
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/eo/settings.php
@@ -0,0 +1,14 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Robert Bogenschneider <bogi@uea.org>
+ */
+$lang['noPrefix'] = 'Kiuj (komo-disigitaj) klasnomoj estu ekskludataj de la prefikso "wrap_"?';
+$lang['restrictedClasses'] = 'limigi la uzon de la kromaĵo al tiuj klasoj (komo-disigitaj)';
+$lang['restrictionType'] = 'tipo de limigo (ĉu la supre menciitaj klasoj estu inkludataj aŭ ekskludataj?)';
+$lang['restrictionType_o_0'] = 'permesi ĉiujn klasojn krom la menciitaj';
+$lang['restrictionType_o_1'] = 'limigi al nur tiuj grupoj, neniuj aliaj';
+$lang['syntaxDiv'] = 'Kiun sintakson uzi por blok-volvoj en la ilaro-elektilo?';
+$lang['syntaxSpan'] = 'Kiun sintakson uzi por enliniaj volvoj en la ilaro-elektilo?';
diff --git a/platform/www/lib/plugins/wrap/lang/es/lang.php b/platform/www/lib/plugins/wrap/lang/es/lang.php
new file mode 100644
index 0000000..b357aed
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/es/lang.php
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Domingo Redal <docxml@gmail.com>
+ */
+$lang['picker'] = 'Wrap Plugin';
+$lang['column'] = 'columnas';
+$lang['box'] = 'caja simple centrada';
+$lang['info'] = 'caja de información';
+$lang['tip'] = 'caja de consejo';
+$lang['important'] = 'caja importante';
+$lang['alert'] = 'caja de alerta';
+$lang['help'] = 'caja de ayuda';
+$lang['download'] = 'caja de descarga';
+$lang['todo'] = 'caja de TODO';
+$lang['clear'] = 'limpiar float';
+$lang['em'] = 'especialmente enfatizado';
+$lang['hi'] = 'destacado';
+$lang['lo'] = 'menos significativo';
diff --git a/platform/www/lib/plugins/wrap/lang/es/settings.php b/platform/www/lib/plugins/wrap/lang/es/settings.php
new file mode 100644
index 0000000..137a878
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/es/settings.php
@@ -0,0 +1,18 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Domingo Redal <docxml@gmail.com>
+ * @author Juan Asensio Sánchez <okelet@gmail.com>
+ * @author Óscar M. Lage <info@oscarmlage.com>
+ */
+$lang['noPrefix'] = '¿Qué nombres de clase (separados por comas) no deberían ser precedidos de "wrap_"?';
+$lang['restrictedClasses'] = 'restringir el uso de este plugin a estas clases (separadas por comas)';
+$lang['restrictionType'] = 'tipo de restricción, especifica si las clases anteriores serán incluidas o excluidas';
+$lang['restrictionType_o_0'] = 'permitir todas las clases excepto las anteriores';
+$lang['restrictionType_o_1'] = 'restringir a sólo las clases anteriores y no otras';
+$lang['syntaxDiv'] = '¿Qué sintaxis debería ser usada en el selector de la barra de herramientas para los bloques "wrap"?';
+$lang['syntaxSpan'] = '¿Qué sintaxis debería ser usada en el selector de la barra de herramientas para los "wrap" en linea?';
+$lang['darkTpl'] = '¿Optimizar colores para plantillas oscuras?';
+$lang['emulatedHeadlines'] = '¿Usar encabezados emulados? (obsoleto)';
diff --git a/platform/www/lib/plugins/wrap/lang/fa/lang.php b/platform/www/lib/plugins/wrap/lang/fa/lang.php
new file mode 100644
index 0000000..0570889
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/fa/lang.php
@@ -0,0 +1,22 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author reza_khn <reza_khn@yahoo.com>
+ * @author Sam01 <m.sajad079@gmail.com>
+ */
+$lang['picker'] = 'افزونه قراردادن';
+$lang['column'] = 'ستون‌ها';
+$lang['box'] = 'جعبه محور ساده';
+$lang['info'] = 'جعبه اطلاعات';
+$lang['tip'] = 'جعبه نکته';
+$lang['important'] = 'جعبه مهم';
+$lang['alert'] = 'جعبه هشدار';
+$lang['help'] = 'جعبه کمک';
+$lang['download'] = 'جعبه دانلود';
+$lang['todo'] = 'جعبه کاربردی';
+$lang['clear'] = 'جعبه شناور';
+$lang['em'] = 'تاکید مهم';
+$lang['hi'] = 'برجسته';
+$lang['lo'] = 'کم اهمیت';
diff --git a/platform/www/lib/plugins/wrap/lang/fa/settings.php b/platform/www/lib/plugins/wrap/lang/fa/settings.php
new file mode 100644
index 0000000..30dc2d4
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/fa/settings.php
@@ -0,0 +1,15 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Sam01 <m.sajad079@gmail.com>
+ */
+$lang['noPrefix'] = 'کدام نام‌های کلاس باید از پیشوند شدن با "wrap_" محروم شوند؟';
+$lang['restrictedClasses'] = 'محدودکردن استفاده‌ی افزونه از این کلاس‌ها (جداکردن با کاما)';
+$lang['restrictionType'] = 'نوع محدودیت، مشخص می‌کند که آیا کلاس‌های فوق گنجانده شوند و یا محروم شوند';
+$lang['restrictionType_o_0'] = 'اجازه دادن برای طبقه‌بندی همه به جز بالایی‌ها';
+$lang['restrictionType_o_1'] = 'محدودکردن به کلاس‌های بالا و نه دیگری';
+$lang['syntaxDiv'] = 'کدام الگوی نگارشی باید استفاده شود در انتخابگر نوارابزار برای مسدودکردن قرارگرفته‌ها؟';
+$lang['syntaxSpan'] = 'کدام الگوی نگارشی باید استفاده شود در انتخاب‌گر نوارابزار برای قرارگرفته‌های درون‌خطی؟';
+$lang['darkTpl'] = 'تنظیم رنگ‌ها برای قالب‌های تیره؟';
diff --git a/platform/www/lib/plugins/wrap/lang/fr/lang.php b/platform/www/lib/plugins/wrap/lang/fr/lang.php
new file mode 100644
index 0000000..d6dc321
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/fr/lang.php
@@ -0,0 +1,22 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Laynee <seedfloyd@gmail.com>
+ * @author schplurtz <Schplurtz@laposte.net>
+ */
+$lang['picker'] = 'Extension Wrap';
+$lang['column'] = 'colonnes';
+$lang['box'] = 'bloc simple';
+$lang['info'] = 'bloc information';
+$lang['tip'] = 'bloc astuce';
+$lang['important'] = 'bloc important';
+$lang['alert'] = 'bloc alerte';
+$lang['help'] = 'bloc aide';
+$lang['download'] = 'bloc téléchargement';
+$lang['todo'] = 'bloc à faire';
+$lang['clear'] = 'rétablir le flux après un élément flottant';
+$lang['em'] = 'particulièrement important';
+$lang['hi'] = 'important';
+$lang['lo'] = 'peu important';
diff --git a/platform/www/lib/plugins/wrap/lang/fr/settings.php b/platform/www/lib/plugins/wrap/lang/fr/settings.php
new file mode 100644
index 0000000..c2dc39f
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/fr/settings.php
@@ -0,0 +1,18 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Schplurtz le Déboulonné <schplurtz@laposte.net>
+ * @author Laynee <seedfloyd@gmail.com>
+ * @author Pietroni <pietroni@informatique.univ-paris-diderot.fr>
+ */
+$lang['noPrefix'] = 'Quelles classes (séparées par une virgule) ne devraient pas être préfixées d\'un "wrap_" ?';
+$lang['restrictedClasses'] = 'Restreindre l\'utilisation de cette extension à ces classes. (liste séparée par des virgules)';
+$lang['restrictionType'] = 'Type de restriction. Indique s\'il faut inclure ou exclure les classes ci-dessus.';
+$lang['restrictionType_o_0'] = 'Autoriser toutes les classes sauf celles ci-dessus.';
+$lang['restrictionType_o_1'] = 'N\'autoriser que les classes ci dessus.';
+$lang['syntaxDiv'] = 'Quelle syntaxe les boutons de la barre d\'outil doivent-ils générer pour les éléments blocs ?';
+$lang['syntaxSpan'] = 'Quelle syntaxe les boutons de la barre d\'outil doivent-ils générer pour les éléments en ligne ?';
+$lang['darkTpl'] = 'Optimiser les couleurs pour les thèmes sombres?';
+$lang['emulatedHeadlines'] = 'Utiliser l\'émulation des titres ? (déprécié)';
diff --git a/platform/www/lib/plugins/wrap/lang/hr/lang.php b/platform/www/lib/plugins/wrap/lang/hr/lang.php
new file mode 100644
index 0000000..c9ab06b
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/hr/lang.php
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Davor Turkalj <turki.bsc@gmail.com>
+ */
+$lang['picker'] = 'Wrap dodatak';
+$lang['column'] = 'kolone';
+$lang['box'] = 'običan centrirani okvir';
+$lang['info'] = 'info okvir';
+$lang['tip'] = 'okvir savjet';
+$lang['important'] = 'okvir važno';
+$lang['alert'] = 'okvir upozorenja';
+$lang['help'] = 'okvir pomoći';
+$lang['download'] = 'okvir učitavanja';
+$lang['todo'] = 'okvir preostalo';
+$lang['clear'] = 'prazan okvir';
+$lang['em'] = 'posebno naglašeni';
+$lang['hi'] = 'istaknuti';
+$lang['lo'] = 'manje bitan';
diff --git a/platform/www/lib/plugins/wrap/lang/hr/settings.php b/platform/www/lib/plugins/wrap/lang/hr/settings.php
new file mode 100644
index 0000000..1adb7dd
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/hr/settings.php
@@ -0,0 +1,16 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Davor Turkalj <turki.bsc@gmail.com>
+ */
+$lang['noPrefix'] = 'Koja (zarezom odvojene) imena klasa trebaju ne trebaju biti s prefiksom "wrap_"? ';
+$lang['restrictedClasses'] = 'ograniči korištenje ovog dodatka na ove klase (zarezom odvojena lista)';
+$lang['restrictionType'] = 'vrsta ograničenja, određuje da li gore navedene klase trebaju biti uključene ili isključene';
+$lang['restrictionType_o_0'] = 'dozvoli sve klase osim gore navedenih';
+$lang['restrictionType_o_1'] = 'dozvoli samo gore navedene klase';
+$lang['syntaxDiv'] = 'Koja sintaksa treba biti korištena u alatnoj traci za omeđivanje bloka?';
+$lang['syntaxSpan'] = 'Koja sintaksa treba biti korištena u alatnoj traci za omeđivanje teksta u liniji?';
+$lang['darkTpl'] = 'Prilagoditi boje za tamne predloške?';
+$lang['emulatedHeadlines'] = 'Koristi imitirana zaglavlja? (Obustavljeno)';
diff --git a/platform/www/lib/plugins/wrap/lang/hu/lang.php b/platform/www/lib/plugins/wrap/lang/hu/lang.php
new file mode 100644
index 0000000..4dbfc99
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/hu/lang.php
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Marina Vladi <deldadam@gmail.com>
+ */
+$lang['picker'] = 'Wrap-csatoló';
+$lang['column'] = 'oszlopok';
+$lang['box'] = 'egyszerű, középre igazított doboz';
+$lang['info'] = 'információs doboz';
+$lang['tip'] = 'tippdoboz';
+$lang['important'] = 'fontos doboz';
+$lang['alert'] = 'figyelmeztető doboz';
+$lang['help'] = 'súgódoboz';
+$lang['download'] = 'letöltéshez doboz';
+$lang['todo'] = 'teendőhöz doboz';
+$lang['clear'] = 'float tiltása';
+$lang['em'] = 'különösen hangsúlyos';
+$lang['hi'] = 'kiemelt';
+$lang['lo'] = 'kevésbé fontos';
diff --git a/platform/www/lib/plugins/wrap/lang/hu/settings.php b/platform/www/lib/plugins/wrap/lang/hu/settings.php
new file mode 100644
index 0000000..6f3c9da
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/hu/settings.php
@@ -0,0 +1,16 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Marina Vladi <deldadam@gmail.com>
+ * @author DelD <deldadam@gmail.com>
+ */
+$lang['noPrefix'] = 'Mely (vesszővel elválasztott) osztályneveknek ne legyen "wrap_" előtagja?';
+$lang['restrictedClasses'] = 'csatoló korlátozása ezekre a (vesszővel elválasztott) osztályokra';
+$lang['restrictionType'] = 'korlátozás típusa, megadja, hogy a fenti osztályokat figyelembe vegye vagy se a csatoló';
+$lang['restrictionType_o_0'] = 'minden osztály engedélyezése, kivéve a fentieket';
+$lang['restrictionType_o_1'] = 'csak a fenti osztályok engedélyezése';
+$lang['syntaxDiv'] = 'Milyen szintaxist használjunk a blokktípusú dobozokhoz az eszközsorban?';
+$lang['syntaxSpan'] = 'Milyen szintaxist használjunk a soron belüli (inline) dobozokhoz az eszközsorban?';
+$lang['darkTpl'] = 'Optimalizáljam a színeket sötét sablonokhoz?';
diff --git a/platform/www/lib/plugins/wrap/lang/it/lang.php b/platform/www/lib/plugins/wrap/lang/it/lang.php
new file mode 100644
index 0000000..19e1b68
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/it/lang.php
@@ -0,0 +1,23 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Edmondo <snarchio@gmail.com>
+ * @author Giovanni <Giovanni.Garofalo@outlook.com>
+ * @author Torpedo <dgtorpedo@gmail.com>
+ */
+$lang['picker'] = 'Plugin Wrap';
+$lang['column'] = 'colonne';
+$lang['box'] = 'box semplice centrato';
+$lang['info'] = 'box informazione';
+$lang['tip'] = 'box suggerimento';
+$lang['important'] = 'box importante';
+$lang['alert'] = 'box attenzione';
+$lang['help'] = 'box aiuto';
+$lang['download'] = 'box download';
+$lang['todo'] = 'box cose da fare';
+$lang['clear'] = 'elimina elementi flottanti';
+$lang['em'] = 'enfatizzato speciale';
+$lang['hi'] = 'evidenziato';
+$lang['lo'] = 'meno importante';
diff --git a/platform/www/lib/plugins/wrap/lang/it/settings.php b/platform/www/lib/plugins/wrap/lang/it/settings.php
new file mode 100644
index 0000000..cbdd2c0
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/it/settings.php
@@ -0,0 +1,16 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Edmondo <snarchio@gmail.com>
+ * @author Torpedo <dgtorpedo@gmail.com>
+ */
+$lang['noPrefix'] = 'quali nomi di classi (elenco separato da virgole) non devono avere il prefisso "wrap_"?';
+$lang['restrictedClasses'] = 'restringi l\'uso del plugin a queste classi (elenco separato da virgole)';
+$lang['restrictionType'] = 'tipo di restrizione, specifica se le classi sopra devono essere incluse o escluse';
+$lang['restrictionType_o_0'] = 'permetti tutte le classi tranne quelle sopra';
+$lang['restrictionType_o_1'] = 'restringi solo alle classi sopra e a nessun\'altra';
+$lang['syntaxDiv'] = 'Quale sintassi usare nella paletta degli strumenti per riquadri a blocchi?';
+$lang['syntaxSpan'] = 'Quale sintassi usare nella paletta degli strumenti per riquadri in linea?';
+$lang['darkTpl'] = 'Ottimizzare i colori per tema scuro?';
diff --git a/platform/www/lib/plugins/wrap/lang/ja/lang.php b/platform/www/lib/plugins/wrap/lang/ja/lang.php
new file mode 100644
index 0000000..598b481
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/ja/lang.php
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Satoshi Sahara <sahara.satoshi@gmail.com>
+ */
+$lang['picker'] = 'Wrap プラグイン';
+$lang['column'] = '多段組み';
+$lang['box'] = '中央配置枠';
+$lang['info'] = '情報枠';
+$lang['tip'] = 'ヒント枠';
+$lang['important'] = '重要枠';
+$lang['alert'] = '警告枠';
+$lang['help'] = 'ヘルプ枠';
+$lang['download'] = 'ダウンロード枠';
+$lang['todo'] = 'TODO枠';
+$lang['clear'] = '回り込み解除';
+$lang['em'] = '特に強調';
+$lang['hi'] = 'ハイライト表示';
+$lang['lo'] = '非強調(薄色表示)';
diff --git a/platform/www/lib/plugins/wrap/lang/ja/settings.php b/platform/www/lib/plugins/wrap/lang/ja/settings.php
new file mode 100644
index 0000000..ec880ac
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/ja/settings.php
@@ -0,0 +1,16 @@
+<?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['noPrefix'] = 'プレフィックス"wrap_" なしのCSSセレクタを例外的に適用するクラス名(カンマ区切り)';
+$lang['restrictedClasses'] = '有効性をチェックするクラス名(カンマ区切り)';
+$lang['restrictionType'] = '指定したクラスの扱い方';
+$lang['restrictionType_o_0'] = '指定クラスを無効とし、他は有効とする';
+$lang['restrictionType_o_1'] = '指定クラスのみを有効とする';
+$lang['syntaxDiv'] = 'ツールバー使用時:ブロック型構文に使用するタグ名';
+$lang['syntaxSpan'] = 'ツールバー使用時:インライン型構文に使用するタグ名';
+$lang['darkTpl'] = '色の濃いテンプレート用に最適化しますか?';
diff --git a/platform/www/lib/plugins/wrap/lang/ko/lang.php b/platform/www/lib/plugins/wrap/lang/ko/lang.php
new file mode 100644
index 0000000..6dce54e
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/ko/lang.php
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Myeongjin <aranet100@gmail.com>
+ */
+$lang['picker'] = 'Wrap 플러그인';
+$lang['column'] = '단';
+$lang['box'] = '간단한 가운데 상자';
+$lang['info'] = '정보 상자';
+$lang['tip'] = '팁 상자';
+$lang['important'] = '중요 상자';
+$lang['alert'] = '경고 상자';
+$lang['help'] = '도움말 상자';
+$lang['download'] = '다운로드 상자';
+$lang['todo'] = '할 일 상자';
+$lang['clear'] = '플로트 지우기';
+$lang['em'] = '특히 강조';
+$lang['hi'] = '강조';
+$lang['lo'] = '덜 중요함';
diff --git a/platform/www/lib/plugins/wrap/lang/ko/settings.php b/platform/www/lib/plugins/wrap/lang/ko/settings.php
new file mode 100644
index 0000000..2ac0e01
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/ko/settings.php
@@ -0,0 +1,15 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Myeongjin <aranet100@gmail.com>
+ */
+$lang['noPrefix'] = '어떤 (쉼표로 구분된) 클래스 이름이 "wrap_" 접두어가 필요가 없습니까?';
+$lang['restrictedClasses'] = '다음 (쉼표로 구분된) 클래스에 플러그인의 사용을 제한';
+$lang['restrictionType'] = '제한 유형은 위의 클래스가 포함되거나 제외되어야 하는지 지정';
+$lang['restrictionType_o_0'] = '위의 클래스를 제외하고 모든 클래스를 허용';
+$lang['restrictionType_o_1'] = '위의 클래스만 허용하고 다른 클래스를 제한';
+$lang['syntaxDiv'] = '어떤 문법이 블록 포장을 위해 도구 모음 선택기에서 사용되어야 합니까?';
+$lang['syntaxSpan'] = '어떤 문법이 인라인 포장을 위해 도구 모음 선택기에서 사용되어야 합니까?';
+$lang['darkTpl'] = '어두운 템플릿을 위해 색을 최적화하겠습니까?';
diff --git a/platform/www/lib/plugins/wrap/lang/nl/lang.php b/platform/www/lib/plugins/wrap/lang/nl/lang.php
new file mode 100644
index 0000000..f771b9d
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/nl/lang.php
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Gerrit Uitslag <klapinklapin@gmail.com>
+ */
+$lang['picker'] = 'Wrap Plugin';
+$lang['column'] = 'kolommen';
+$lang['box'] = 'simpele gecentreerde blok';
+$lang['info'] = 'informatie blok';
+$lang['tip'] = 'tip blok';
+$lang['important'] = 'belangrijk blok';
+$lang['alert'] = 'waarschuwingsblok';
+$lang['help'] = 'helpblok';
+$lang['download'] = 'downloadblok';
+$lang['todo'] = 'tedoen blok';
+$lang['clear'] = 'reset drijvende blokken (clear floats)';
+$lang['em'] = 'bijzonder benadrukken';
+$lang['hi'] = 'gemarkeerd';
+$lang['lo'] = 'minder belangrijk';
diff --git a/platform/www/lib/plugins/wrap/lang/nl/settings.php b/platform/www/lib/plugins/wrap/lang/nl/settings.php
new file mode 100644
index 0000000..8fb33ae
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/nl/settings.php
@@ -0,0 +1,16 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Gerrit Uitslag <klapinklapin@gmail.com>
+ * @author Johan Wijnker <johan@wijnker.eu>
+ */
+$lang['noPrefix'] = 'Welke (komma gescheiden) klassennamen moeten niet het voorvoegsel "wrap_" krijgen?';
+$lang['restrictedClasses'] = 'Beperk het gebruik van de plugin tot deze (komma gescheiden) klassen';
+$lang['restrictionType'] = 'beperkingstype, specificeer of de klassen hierboven wel of niet gebruikt mogen worden';
+$lang['restrictionType_o_0'] = 'alle klassen zijn toegestaan, behalve de bovenstaande';
+$lang['restrictionType_o_1'] = 'beperk de toegestane klassen tot de bovenstaande, en geen anderen';
+$lang['syntaxDiv'] = 'Welke syntax moet worden gebruikt in het werkbalk-keuzemenu voor blok-wraps?';
+$lang['syntaxSpan'] = 'Welke syntax moet worden gebruikt in het werkbalk-keuzemenu voor inline-wraps?';
+$lang['darkTpl'] = 'Optimaliseer de kleuren voor donkere templates?';
diff --git a/platform/www/lib/plugins/wrap/lang/no/lang.php b/platform/www/lib/plugins/wrap/lang/no/lang.php
new file mode 100644
index 0000000..a1734b8
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/no/lang.php
@@ -0,0 +1,24 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Aurora Voje <aurora.voje@jbv.no>
+ */
+$lang['picker'] = 'Omhylningsplugin
+Omkransningsplugin';
+$lang['column'] = 'kolonner';
+$lang['box'] = 'enkel sentrert boks';
+$lang['info'] = 'infoboks';
+$lang['tip'] = 'tipsboks';
+$lang['important'] = 'viktig boks';
+$lang['alert'] = 'alarmboks';
+$lang['help'] = 'hjelpeboks';
+$lang['download'] = 'nedlastningsboks';
+$lang['todo'] = 'gjøremålsboks';
+$lang['clear'] = 'tøm floats';
+$lang['em'] = 'spesielt fremhevet (singular)
+spesielt fremhevede (plural)';
+$lang['hi'] = 'markert (singular)
+markerte (plural)';
+$lang['lo'] = 'mindre viktig';
diff --git a/platform/www/lib/plugins/wrap/lang/no/settings.php b/platform/www/lib/plugins/wrap/lang/no/settings.php
new file mode 100644
index 0000000..1bdc762
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/no/settings.php
@@ -0,0 +1,15 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Aurora Voje <aurora.voje@jbv.no>
+ */
+$lang['noPrefix'] = 'Hvilke klasser (adskilt med komma) bør eksluderes fra å ha prefiks "wrap_"?';
+$lang['restrictedClasses'] = 'begrens bruk av plugin til klasser adskilt med komma';
+$lang['restrictionType'] = 'restriksjonstype, spesifiserer om de ovenforstående klassene skal inkluderes eller ekskluderes';
+$lang['restrictionType_o_0'] = 'vis alle klasser bortsett fra de ovenforstående';
+$lang['restrictionType_o_1'] = 'begrens til kun ovenforstående klasser og ingen fler';
+$lang['syntaxDiv'] = 'Hvilken syntaks bør brukes i verktøylinjen valg for blokkomkransning?';
+$lang['syntaxSpan'] = 'Hvilken syntaks bør brukes i verktøylinjen valg for omkransning på en linje?';
+$lang['darkTpl'] = 'Optimer farger for mørke maler?';
diff --git a/platform/www/lib/plugins/wrap/lang/pt-br/lang.php b/platform/www/lib/plugins/wrap/lang/pt-br/lang.php
new file mode 100644
index 0000000..f02846a
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/pt-br/lang.php
@@ -0,0 +1,22 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Sérgio Motta <sergio@cisne.com.br>
+ * @author Fábio Nogueira <fnogueira@gnome.org>
+ */
+$lang['picker'] = 'Plugin Wrap';
+$lang['column'] = 'colunas';
+$lang['box'] = 'caixa centralizada simples';
+$lang['info'] = 'caixa de informação';
+$lang['tip'] = 'caixa de sugestão';
+$lang['important'] = 'caixa importante';
+$lang['alert'] = 'caixa de alerta';
+$lang['help'] = 'caixa de ajuda';
+$lang['download'] = 'caixa de download';
+$lang['todo'] = 'caixa de tarefas a fazer';
+$lang['clear'] = 'limpar';
+$lang['em'] = 'especialmente enfatizado';
+$lang['hi'] = 'enfatizado';
+$lang['lo'] = 'menos significativo';
diff --git a/platform/www/lib/plugins/wrap/lang/pt-br/settings.php b/platform/www/lib/plugins/wrap/lang/pt-br/settings.php
new file mode 100644
index 0000000..e265965
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/pt-br/settings.php
@@ -0,0 +1,18 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Sérgio Motta <sergio@cisne.com.br>
+ * @author Juliano Marconi Lanigra <juliano.marconi@gmail.com>
+ * @author Flaudísio Tolentino <flaudisio@gmail.com>
+ * @author Fábio Nogueira <fnogueira@gnome.org>
+ */
+$lang['noPrefix'] = 'Quais classes (separadas por vírgula) deverão ser excluídas de receber o prefixo "wrap_"?';
+$lang['restrictedClasses'] = 'uso restrito do plugin para essas classes (separadas por vírgula)';
+$lang['restrictionType'] = 'tipo de restrição, especifica se as classes acima deveriam ser incluídas ou excluídas';
+$lang['restrictionType_o_0'] = 'permite todas as classes exceto as acima';
+$lang['restrictionType_o_1'] = 'restrita somente às classes acima e nenhuma outra';
+$lang['syntaxDiv'] = 'Qual a sintaxe que deve ser utilizada no selecionador de barra de ferramentas para wraps em bloco?';
+$lang['syntaxSpan'] = 'Qual a sintaxe que deve ser utilizada no selecionador de barra de ferramentas para wraps em linha?';
+$lang['darkTpl'] = 'Otimizar cores para templates escuros?';
diff --git a/platform/www/lib/plugins/wrap/lang/ru/lang.php b/platform/www/lib/plugins/wrap/lang/ru/lang.php
new file mode 100644
index 0000000..7aaddd0
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/ru/lang.php
@@ -0,0 +1,22 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Aleksandr Selivanov <alexgearbox@gmail.com>
+ * @author Ilya Rozhkov <impeck@ya.ru>
+ */
+$lang['picker'] = 'Wrap';
+$lang['column'] = 'колонки';
+$lang['box'] = 'простой центрированный блок';
+$lang['info'] = 'блок «Информация»';
+$lang['tip'] = 'блок «Подсказка»';
+$lang['important'] = 'блок «Важно»';
+$lang['alert'] = 'блок «Тревога»';
+$lang['help'] = 'блок «Справка»';
+$lang['download'] = 'блок «Скачивание»';
+$lang['todo'] = 'блок «Список задач»';
+$lang['clear'] = 'очистить float’ы';
+$lang['em'] = 'пометить важным';
+$lang['hi'] = 'выделить (маркер)';
+$lang['lo'] = 'пометить неважным';
diff --git a/platform/www/lib/plugins/wrap/lang/ru/settings.php b/platform/www/lib/plugins/wrap/lang/ru/settings.php
new file mode 100644
index 0000000..1cd3f56
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/ru/settings.php
@@ -0,0 +1,18 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Aleksandr Selivanov <alexgearbox@yandex.ru>
+ * @author Ilya Rozhkov <impeck@ya.ru>
+ * @author Rouslan <root.of.system@gmail.com>
+ */
+$lang['noPrefix'] = 'Имена каких классов не должны начинаться с префикса wrap_? (перечислите через запятую; символы * и ? разрешены)';
+$lang['restrictedClasses'] = 'Классы плагина, которые нельзя использовать (перечислите через запятую; символы * и ? разрешены)';
+$lang['restrictionType'] = 'Тип ограничения, указывающий, должны ли быть включены или исключены классы выше';
+$lang['restrictionType_o_0'] = 'разрешить все, за исключением классов, указанных выше';
+$lang['restrictionType_o_1'] = 'ограничить только классами, указанными выше';
+$lang['syntaxDiv'] = 'Какой синтаксис использовать для создания блоков и примечаний?';
+$lang['syntaxSpan'] = 'Какой синтаксис использовать для создания блоков выделения внутри текста?';
+$lang['darkTpl'] = 'Оптимизировать цвета для тёмных тем оформления (шаблонов)?';
+$lang['emulatedHeadlines'] = 'Использовать эмуляцию заголовков? (устаревшее)';
diff --git a/platform/www/lib/plugins/wrap/lang/sk/lang.php b/platform/www/lib/plugins/wrap/lang/sk/lang.php
new file mode 100644
index 0000000..af572f7
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/sk/lang.php
@@ -0,0 +1,12 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Martin Michalek <michalek.dev@gmail.com>
+ */
+$lang['picker'] = 'Wrap Plugin';
+$lang['column'] = 'stĺpec';
+$lang['em'] = 'zvlášť zdôraznený';
+$lang['hi'] = 'zvýraznený';
+$lang['lo'] = 'menej významný';
diff --git a/platform/www/lib/plugins/wrap/lang/sk/settings.php b/platform/www/lib/plugins/wrap/lang/sk/settings.php
new file mode 100644
index 0000000..4e79e94
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/sk/settings.php
@@ -0,0 +1,12 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Martin Michalek <michalek.dev@gmail.com>
+ */
+$lang['noPrefix'] = 'Ktoré (čiarkou oddelené) mená tried by mali byť vynechané pri použití predpony "wrap_"?';
+$lang['restrictedClasses'] = 'Obmedzenie použitia pluginu na tieto (čiarkou oddelené) triedy';
+$lang['restrictionType'] = 'Typ obmedzenia, špecifikuje, či triedy uvedené vyššie maju byť zahrnuté alebo vynechané';
+$lang['restrictionType_o_0'] = 'povolenie pre všetky triedy okrem uvedených vyššie';
+$lang['restrictionType_o_1'] = 'obmedzenie len na triedy uvedené vyššie a žiadne iné';
diff --git a/platform/www/lib/plugins/wrap/lang/sr/lang.php b/platform/www/lib/plugins/wrap/lang/sr/lang.php
new file mode 100644
index 0000000..5840a24
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/sr/lang.php
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Марко М. Костић <marko.m.kostic@gmail.com>
+ */
+$lang['picker'] = 'Прикључак за преламање';
+$lang['column'] = 'колоне';
+$lang['box'] = 'једноставна кутија на средини';
+$lang['info'] = 'инфо кутија';
+$lang['tip'] = 'кутија са саветима';
+$lang['important'] = 'важна кутија';
+$lang['alert'] = 'кутија са узбуном';
+$lang['help'] = 'кутија за испомоћ';
+$lang['download'] = 'кутија за преузимање';
+$lang['todo'] = 'кутија са задацима';
+$lang['clear'] = 'очисти плутајуће';
+$lang['em'] = 'нарочито назначено';
+$lang['hi'] = 'означено';
+$lang['lo'] = 'мање важно';
diff --git a/platform/www/lib/plugins/wrap/lang/sr/settings.php b/platform/www/lib/plugins/wrap/lang/sr/settings.php
new file mode 100644
index 0000000..d9c626c
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/sr/settings.php
@@ -0,0 +1,15 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Марко М. Костић <marko.m.kostic@gmail.com>
+ */
+$lang['noPrefix'] = 'Која (зарезима одвојена) имена класа треба изузети од додавања префикса "wrap_"?';
+$lang['restrictedClasses'] = 'ограничи употребу прикључна на ове (зарезима одвојене) класе';
+$lang['restrictionType'] = 'врста ограничења, наводи да ли класе изнад треба укључити или искључити';
+$lang['restrictionType_o_0'] = 'дозволи све класе осим оних изнад';
+$lang['restrictionType_o_1'] = 'ограничи само на класе изнад и ниједну више';
+$lang['syntaxDiv'] = 'Коју синтаксу користити у бирачу алатне траке за преламања блокова?';
+$lang['syntaxSpan'] = 'Коју синтаксу користити у бирачу алатне траке за преламања у линији?';
+$lang['darkTpl'] = 'Оптимизовати боје за тамне шаблоне?';
diff --git a/platform/www/lib/plugins/wrap/lang/sv/lang.php b/platform/www/lib/plugins/wrap/lang/sv/lang.php
new file mode 100644
index 0000000..6c71e4e
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/sv/lang.php
@@ -0,0 +1,17 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Tor Härnqvist <tor@harnqvist.se>
+ */
+$lang['picker'] = 'Wrap-plugin';
+$lang['column'] = 'kolumner';
+$lang['info'] = 'infolåda';
+$lang['tip'] = 'tipslåda';
+$lang['important'] = 'viktigt-box';
+$lang['help'] = 'hjälp-box';
+$lang['download'] = 'nedladdningsbox';
+$lang['todo'] = 'att böra-box';
+$lang['hi'] = 'förstärkt';
+$lang['lo'] = 'mindre betydelsefullt';
diff --git a/platform/www/lib/plugins/wrap/lang/sv/settings.php b/platform/www/lib/plugins/wrap/lang/sv/settings.php
new file mode 100644
index 0000000..e571553
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/sv/settings.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Tor Härnqvist <tor@harnqvist.se>
+ */
+$lang['noPrefix'] = 'Vilka (komma-separerade) class-namn ska undantas från att få prefix "wrap_"?';
+$lang['restrictedClasses'] = 'begränsa plugin-användningen till dessa (komma-separerade) class ';
+$lang['darkTpl'] = 'Optimera färger för mörkt templat?';
diff --git a/platform/www/lib/plugins/wrap/lang/tr/lang.php b/platform/www/lib/plugins/wrap/lang/tr/lang.php
new file mode 100644
index 0000000..ba55922
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/tr/lang.php
@@ -0,0 +1,22 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author ilker R. Kapac <irifat@gmail.com>
+ * @author İlker R. Kapaç <irifat@gmail.com>
+ */
+$lang['picker'] = 'Paket Eklentisi';
+$lang['column'] = 'sütunlar';
+$lang['box'] = 'ortalanmış basit kutu';
+$lang['info'] = 'bilgi kutusu';
+$lang['tip'] = 'ipucu kutusu';
+$lang['important'] = 'önemli kutusu';
+$lang['alert'] = 'ikaz kutusu';
+$lang['help'] = 'yardım kutusu';
+$lang['download'] = 'indirme kutusu';
+$lang['todo'] = 'yapılacaklar kutusu';
+$lang['clear'] = 'boşlukları temizle';
+$lang['em'] = 'özellikle vurgulanmış';
+$lang['hi'] = 'vurgulanmış';
+$lang['lo'] = 'daha az önemli';
diff --git a/platform/www/lib/plugins/wrap/lang/tr/settings.php b/platform/www/lib/plugins/wrap/lang/tr/settings.php
new file mode 100644
index 0000000..a4f7cd5
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/tr/settings.php
@@ -0,0 +1,15 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author İlker R. Kapaç <irifat@gmail.com>
+ */
+$lang['noPrefix'] = 'Hangi sınıf isimleri, (virgülle ayrılmış) önüne "wrap_" öneki almaktan hariç tutulsun?';
+$lang['restrictedClasses'] = 'eklentinin kullanımını bu sınıflarla (virgülle ayrılmış) sınırla';
+$lang['restrictionType'] = 'kısıtlama tipi, üstteki sınıfların dalil mi edileceklerini yoksa hariç mi tutulacaklarını belirler.';
+$lang['restrictionType_o_0'] = 'üsttekiler hariç tüm sınıflara izin ver';
+$lang['restrictionType_o_1'] = 'sadece üstteki sınıflarla sınırla, başkasına izin verme';
+$lang['syntaxDiv'] = 'Blok paketi için araç çubuğunda hangi sözdizimi kullanılsın?';
+$lang['syntaxSpan'] = 'Satır içi paketi için araç çubuğunda hangi sözdizimi kullanılsın?';
+$lang['darkTpl'] = 'Karanlık şablonlar için renkler iyileştirilsin mi?';
diff --git a/platform/www/lib/plugins/wrap/lang/zh-tw/lang.php b/platform/www/lib/plugins/wrap/lang/zh-tw/lang.php
new file mode 100644
index 0000000..fe60272
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/zh-tw/lang.php
@@ -0,0 +1,19 @@
+<?php
+
+$lang['picker'] = 'Wrap 插件';
+
+$lang['column'] = '分欄';
+$lang['box'] = '簡易置中方盒';
+$lang['info'] = '「資訊」方盒';
+$lang['tip'] = '「提示」方盒';
+$lang['important'] = '「重要」方盒';
+$lang['alert'] = '「警告」方盒';
+$lang['help'] = '「協助」方盒';
+$lang['download'] = '「下載」方盒';
+$lang['todo'] = '「待辦」方盒';
+
+$lang['clear'] = '清除浮動';
+
+$lang['em'] = '特別強調';
+$lang['hi'] = '醒目標記';
+$lang['lo'] = '不重要';
diff --git a/platform/www/lib/plugins/wrap/lang/zh-tw/settings.php b/platform/www/lib/plugins/wrap/lang/zh-tw/settings.php
new file mode 100644
index 0000000..c17edf7
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/zh-tw/settings.php
@@ -0,0 +1,11 @@
+<?php
+/**
+ * Traditional Chinese language file for config of Wrap plugin
+ *
+ */
+$lang['noPrefix'] = '哪些CSS類別不需要加上"wrap_"前置詞?(逗號分隔)';
+$lang['restrictedClasses'] = '下列的類別將套用使用限制(逗號分隔)';
+$lang['restrictionType'] = '使用限制,指定上述的類別限制條件。';
+ $lang['restrictionType_o_0'] = '允許所有類別。但上述的類別都被排除。';
+ $lang['restrictionType_o_1'] = '只允許上述的類別。';
+
diff --git a/platform/www/lib/plugins/wrap/lang/zh/lang.php b/platform/www/lib/plugins/wrap/lang/zh/lang.php
new file mode 100644
index 0000000..2c935a4
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/zh/lang.php
@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ */
+$lang['picker'] = 'Wrap 插件';
+$lang['column'] = '分栏';
+$lang['box'] = '简单居中方框';
+$lang['info'] = '消息框';
+$lang['tip'] = '提示框';
+$lang['important'] = '重要信息方框';
+$lang['alert'] = '警告框';
+$lang['help'] = '帮助框';
+$lang['download'] = '下载框';
+$lang['todo'] = '待办事项方框';
+$lang['clear'] = '清除浮动';
+$lang['em'] = '特别强调';
+$lang['hi'] = '高亮';
+$lang['lo'] = '不重要';
diff --git a/platform/www/lib/plugins/wrap/lang/zh/settings.php b/platform/www/lib/plugins/wrap/lang/zh/settings.php
new file mode 100644
index 0000000..d4f2bb2
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/lang/zh/settings.php
@@ -0,0 +1,16 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author lainme <lainme993@gmail.com>
+ * @author maie <dokuwiki@maie.name>
+ */
+$lang['noPrefix'] = '哪些CSS类不需要加上“wrap_"前缀?(逗号分隔)';
+$lang['restrictedClasses'] = '将插件的使用限制应用到这些类(逗号分隔)';
+$lang['restrictionType'] = '限制类型,指定上述类应该被包含或排除';
+$lang['restrictionType_o_0'] = '允许除上述类之外的所有类';
+$lang['restrictionType_o_1'] = '仅允许上述类';
+$lang['syntaxDiv'] = '在编辑工具栏的选择器中应对块级元素使用何种语法?';
+$lang['syntaxSpan'] = '在编辑工具栏的选择器中应对行内元素使用何种语法?';
+$lang['darkTpl'] = '优化黑模板的颜色?';
diff --git a/platform/www/lib/plugins/wrap/manager.dat b/platform/www/lib/plugins/wrap/manager.dat
new file mode 100644
index 0000000..710202a
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/manager.dat
@@ -0,0 +1,2 @@
+downloadurl=https://github.com/selfthinker/dokuwiki_plugin_wrap/archive/stable.zip
+installed=Sat, 12 Mar 2022 01:14:51 +0000
diff --git a/platform/www/lib/plugins/wrap/pdf.less b/platform/www/lib/plugins/wrap/pdf.less
new file mode 100644
index 0000000..45bb3ca
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/pdf.less
@@ -0,0 +1,20 @@
+/********************************************************************
+Styles used in PDFs by the DW2PDF plugin (in addition to all.css, and
+the DW2PDF plugin also includes style.css via the 'usestyles' option)
+********************************************************************/
+
+@import 'print_or_pdf.less';
+
+.dokuwiki {
+
+/*____________ only print ____________*/
+/* due to including style.css, these need to be overwritten again */
+
+div.wrap_onlyprint {
+ display: block;
+}
+span.wrap_onlyprint {
+ display: inline;
+}
+
+} /* /.dokuwiki */
diff --git a/platform/www/lib/plugins/wrap/plugin.info.txt b/platform/www/lib/plugins/wrap/plugin.info.txt
new file mode 100644
index 0000000..52d956d
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/plugin.info.txt
@@ -0,0 +1,8 @@
+base wrap
+author Anika Henke
+email anika@selfthinker.org
+date 2018-04-22
+name Wrap Plugin
+desc Universal plugin which combines functionalities of many other plugins. Wrap wiki text inside containers (divs or spans) and give them a class (choose from a variety of preset classes), a width and/or a language with its associated text direction.
+url https://www.dokuwiki.org/plugin:wrap
+#syntax See example.txt
diff --git a/platform/www/lib/plugins/wrap/print.less b/platform/www/lib/plugins/wrap/print.less
new file mode 100644
index 0000000..7fe0d8c
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/print.less
@@ -0,0 +1,45 @@
+/********************************************************************
+Print Styles for the Wrap Plugin (additional to all.css)
+********************************************************************/
+
+@import 'print_or_pdf.less';
+
+.dokuwiki {
+
+/* boxes and notes with icons
+********************************************************************/
+
+div.wrap_box,
+div.wrap_danger, div.wrap_warning, div.wrap_caution, div.wrap_notice, div.wrap_safety,
+div.wrap_info, div.wrap_important, div.wrap_alert, div.wrap_tip, div.wrap_help, div.wrap_todo, div.wrap_download {
+ border: 2px solid #999;
+ padding: 1em 1em .5em;
+ margin-bottom: 1.5em;
+}
+span.wrap_box,
+span.wrap_danger, span.wrap_warning, span.wrap_caution, span.wrap_notice, span.wrap_safety,
+span.wrap_info, span.wrap_important, span.wrap_alert, span.wrap_tip, span.wrap_help, span.wrap_todo, span.wrap_download {
+ border: 1px solid #999;
+ padding: 0 .3em;
+}
+
+
+/* mark
+********************************************************************/
+
+.wrap_hi {
+ border: 1px solid #999;
+}
+
+
+/* miscellaneous
+********************************************************************/
+
+/*____________ spoiler ____________*/
+
+.wrap_spoiler {
+ visibility: hidden;
+}
+
+
+} /* /.dokuwiki */
diff --git a/platform/www/lib/plugins/wrap/print_or_pdf.less b/platform/www/lib/plugins/wrap/print_or_pdf.less
new file mode 100644
index 0000000..1d20a9e
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/print_or_pdf.less
@@ -0,0 +1,31 @@
+/********************************************************************
+Styles shared between print.css and pdf.css
+********************************************************************/
+
+.dokuwiki {
+
+/* miscellaneous
+********************************************************************/
+
+/*____________ pagebreak ____________*/
+
+.wrap_pagebreak {
+ break-after: page; /* CSS 3 */
+ page-break-after: always; /* CSS 2.1 */
+}
+
+/*____________ avoid page break ____________*/
+/* not yet supported by most browsers */
+
+.wrap_nopagebreak {
+ break-inside: avoid; /* CSS 3 */
+ page-break-inside: avoid; /* CSS 2.1 */
+}
+
+/*____________ no print ____________*/
+
+.wrap_noprint {
+ display: none;
+}
+
+} /* /.dokuwiki */
diff --git a/platform/www/lib/plugins/wrap/style.less b/platform/www/lib/plugins/wrap/style.less
new file mode 100644
index 0000000..4f701a7
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/style.less
@@ -0,0 +1,215 @@
+/********************************************************************
+Screen Styles for the Wrap Plugin (additional to all.css)
+********************************************************************/
+
+.dokuwiki {
+
+/* box
+********************************************************************/
+
+.wrap_box {
+ background: @ini_background_alt;
+ color: @ini_text;
+}
+div.wrap_box,
+div.wrap_danger,
+div.wrap_warning,
+div.wrap_caution,
+div.wrap_notice,
+div.wrap_safety {
+ padding: 1em 1em .5em;
+ margin-bottom: 1.5em;
+ overflow: hidden;
+}
+span.wrap_box,
+span.wrap_danger,
+span.wrap_warning,
+span.wrap_caution,
+span.wrap_notice,
+span.wrap_safety {
+ padding: 0 .3em;
+}
+
+/*____________ notes with icons ____________*/
+
+/* general styles for all note divs */
+div.wrap_info,
+div.wrap_important,
+div.wrap_alert,
+div.wrap_tip,
+div.wrap_help,
+div.wrap_todo,
+div.wrap_download {
+ padding: 1em 1em .5em 70px;
+ margin-bottom: 1.5em;
+ min-height: 68px;
+ background-position: 10px 50%;
+ background-repeat: no-repeat;
+ color: inherit;
+ overflow: hidden;
+}
+/* general styles for all note spans */
+span.wrap_info,
+span.wrap_important,
+span.wrap_alert,
+span.wrap_tip,
+span.wrap_help,
+span.wrap_todo,
+span.wrap_download {
+ padding: 0 2px 0 20px;
+ min-height: 20px;
+ background-position: 2px 50%;
+ background-repeat: no-repeat;
+ color: inherit;
+}
+
+/* sorry for icons glued to the right side, but there is currently no way
+ to make this look good without adjusting the images themselves */
+[dir=rtl] div.wrap_info,
+[dir=rtl] div.wrap_important,
+[dir=rtl] div.wrap_alert,
+[dir=rtl] div.wrap_tip,
+[dir=rtl] div.wrap_help,
+[dir=rtl] div.wrap_todo,
+[dir=rtl] div.wrap_download {
+ padding: 1em 60px .5em 1em;
+ background-position: right 50%;
+}
+[dir=rtl] span.wrap_info,
+[dir=rtl] span.wrap_important,
+[dir=rtl] span.wrap_alert,
+[dir=rtl] span.wrap_tip,
+[dir=rtl] span.wrap_help,
+[dir=rtl] span.wrap_todo,
+[dir=rtl] span.wrap_download {
+ padding: 0 18px 0 2px;
+ background-position: right 50%;
+}
+
+/*____________ info ____________*/
+.wrap_info { background-color: #d1d7df; }
+.wrap__dark.wrap_info { background-color: #343e4a; }
+div.wrap_info { background-image: url(images/note/48/info.png); }
+span.wrap_info { background-image: url(images/note/16/info.png); }
+
+/*____________ important ____________*/
+.wrap_important { background-color: #ffd39f; }
+.wrap__dark.wrap_important { background-color: #6c3b00; }
+div.wrap_important { background-image: url(images/note/48/important.png); }
+span.wrap_important { background-image: url(images/note/16/important.png); }
+
+/*____________ alert ____________*/
+.wrap_alert { background-color: #ffbcaf; }
+.wrap__dark.wrap_alert { background-color: #6b1100; }
+div.wrap_alert { background-image: url(images/note/48/alert.png); }
+span.wrap_alert { background-image: url(images/note/16/alert.png); }
+
+/*____________ tip ____________*/
+.wrap_tip { background-color: #fff79f; }
+.wrap__dark.wrap_tip { background-color: #4a4400; }
+div.wrap_tip { background-image: url(images/note/48/tip.png); }
+span.wrap_tip { background-image: url(images/note/16/tip.png); }
+
+/*____________ help ____________*/
+.wrap_help { background-color: #dcc2ef; }
+.wrap__dark.wrap_help { background-color: #3c1757; }
+div.wrap_help { background-image: url(images/note/48/help.png); }
+span.wrap_help { background-image: url(images/note/16/help.png); }
+
+/*____________ todo ____________*/
+.wrap_todo { background-color: #c2efdd; }
+.wrap__dark.wrap_todo { background-color: #17573e; }
+div.wrap_todo { background-image: url(images/note/48/todo.png); }
+span.wrap_todo { background-image: url(images/note/16/todo.png); }
+
+/*____________ download ____________*/
+.wrap_download { background-color: #d6efc2; }
+.wrap__dark.wrap_download { background-color: #345717; }
+div.wrap_download { background-image: url(images/note/48/download.png); }
+span.wrap_download { background-image: url(images/note/16/download.png); }
+
+
+/*____________ safety notes ____________*/
+
+.wrap_danger {
+ background-color: #c00;
+ color: #fff;
+}
+.wrap_warning {
+ background-color: #f60;
+ color: #000;
+}
+.wrap_caution {
+ background-color: #ff0;
+ color: #000;
+}
+.wrap_notice {
+ background-color: #06f;
+ color: #fff;
+}
+.wrap_safety {
+ background-color: #090;
+ color: #fff;
+}
+
+.wrap_danger *,
+.wrap_warning *,
+.wrap_caution *,
+.wrap_notice *,
+.wrap_safety * {
+ color: inherit !important;
+}
+
+
+/* mark
+********************************************************************/
+
+.wrap_hi {
+ background-color: #ff9;
+ overflow: hidden;
+}
+.wrap__dark.wrap_hi {
+ background-color: #4e4e0d;
+}
+
+
+/* miscellaneous
+********************************************************************/
+
+/*____________ spoiler ____________*/
+
+.wrap_spoiler {
+ background-color: @ini_background !important;
+ color: @ini_background !important;
+ border: 1px dotted red;
+}
+
+/*____________ only print ____________*/
+
+.wrap_onlyprint {
+ display: none;
+}
+
+/*____________ tabs ____________*/
+/* in addition to template styles */
+
+.plugin_wrap.tabs {
+ margin-bottom: 1.4em;
+}
+
+/*____________ button-style link ____________*/
+
+.wrap_button a:link,
+.wrap_button a:visited {
+ background-color: @ini_background_alt;
+}
+.wrap_button a:link:hover,
+.wrap_button a:visited:hover,
+.wrap_button a:link:focus,
+.wrap_button a:visited:focus,
+.wrap_button a:link:active,
+.wrap_button a:visited:active {
+ background-color: @ini_background_neu;
+}
+
+} /* /.dokuwiki */
diff --git a/platform/www/lib/plugins/wrap/syntax/closesection.php b/platform/www/lib/plugins/wrap/syntax/closesection.php
new file mode 100644
index 0000000..4bb4837
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/syntax/closesection.php
@@ -0,0 +1,40 @@
+<?php
+/**
+ * Section close helper of the Wrap Plugin
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Michael Hamann <michael@content-space.de>
+ */
+
+if(!defined('DOKU_INC')) die();
+
+if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
+require_once(DOKU_PLUGIN.'syntax.php');
+
+class syntax_plugin_wrap_closesection extends DokuWiki_Syntax_Plugin {
+
+ function getType(){ return 'substition';}
+ function getPType(){ return 'block';}
+ function getSort(){ return 195; }
+
+ /**
+ * Dummy handler, this syntax part has no syntax but is directly added to the instructions by the div syntax
+ */
+ function handle($match, $state, $pos, Doku_Handler $handler){
+ }
+
+ /**
+ * Create output
+ */
+ function render($mode, Doku_Renderer $renderer, $indata) {
+ if($mode == 'xhtml'){
+ /** @var Doku_Renderer_xhtml $renderer */
+ $renderer->finishSectionEdit();
+ return true;
+ }
+ return false;
+ }
+
+
+}
+
diff --git a/platform/www/lib/plugins/wrap/syntax/div.php b/platform/www/lib/plugins/wrap/syntax/div.php
new file mode 100644
index 0000000..2a3ffca
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/syntax/div.php
@@ -0,0 +1,139 @@
+<?php
+/**
+ * Div Syntax Component of the Wrap Plugin
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Anika Henke <anika@selfthinker.org>
+ */
+
+if(!defined('DOKU_INC')) die();
+
+if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
+require_once(DOKU_PLUGIN.'syntax.php');
+
+class syntax_plugin_wrap_div extends DokuWiki_Syntax_Plugin {
+ protected $special_pattern = '<div\b[^>\r\n]*?/>';
+ protected $entry_pattern = '<div\b.*?>(?=.*?</div>)';
+ protected $exit_pattern = '</div>';
+
+ function getType(){ return 'formatting';}
+ function getAllowedTypes() { return array('container', 'formatting', 'substition', 'protected', 'disabled', 'paragraphs'); }
+ function getPType(){ return 'stack';}
+ function getSort(){ return 195; }
+ // override default accepts() method to allow nesting - ie, to get the plugin accepts its own entry syntax
+ function accepts($mode) {
+ if ($mode == substr(get_class($this), 7)) return true;
+ return parent::accepts($mode);
+ }
+
+ /**
+ * Connect pattern to lexer
+ */
+ function connectTo($mode) {
+ $this->Lexer->addSpecialPattern($this->special_pattern,$mode,'plugin_wrap_'.$this->getPluginComponent());
+ $this->Lexer->addEntryPattern($this->entry_pattern,$mode,'plugin_wrap_'.$this->getPluginComponent());
+ }
+
+ function postConnect() {
+ $this->Lexer->addExitPattern($this->exit_pattern, 'plugin_wrap_'.$this->getPluginComponent());
+ $this->Lexer->addPattern('[ \t]*={2,}[^\n]+={2,}[ \t]*(?=\n)', 'plugin_wrap_'.$this->getPluginComponent());
+ }
+
+ /**
+ * Handle the match
+ */
+ function handle($match, $state, $pos, Doku_Handler $handler){
+ global $conf;
+ switch ($state) {
+ case DOKU_LEXER_ENTER:
+ case DOKU_LEXER_SPECIAL:
+ $data = strtolower(trim(substr($match,strpos($match,' '),-1)," \t\n/"));
+ return array($state, $data);
+
+ case DOKU_LEXER_UNMATCHED:
+ $handler->_addCall('cdata', array($match), $pos);
+ break;
+
+ case DOKU_LEXER_MATCHED:
+ // we have a == header ==, use the core header() renderer
+ // (copied from core header() in inc/parser/handler.php)
+ $title = trim($match);
+ $level = 7 - strspn($title,'=');
+ if($level < 1) $level = 1;
+ $title = trim($title,'=');
+ $title = trim($title);
+
+ $handler->_addCall('header',array($title,$level,$pos), $pos);
+ // close the section edit the header could open
+ if ($title && $level <= $conf['maxseclevel']) {
+ $handler->addPluginCall('wrap_closesection', array(), DOKU_LEXER_SPECIAL, $pos, '');
+ }
+ break;
+
+ case DOKU_LEXER_EXIT:
+ return array($state, '');
+ }
+ return false;
+ }
+
+ /**
+ * Create output
+ */
+ function render($mode, Doku_Renderer $renderer, $indata) {
+ static $type_stack = array ();
+
+ if (empty($indata)) return false;
+ list($state, $data) = $indata;
+
+ if($mode == 'xhtml'){
+ /** @var Doku_Renderer_xhtml $renderer */
+ switch ($state) {
+ case DOKU_LEXER_ENTER:
+ $sectionEditStartData = ['target' => 'plugin_wrap_start'];
+ $sectionEditEndData = ['target' => 'plugin_wrap_end'];
+ if (!defined('SEC_EDIT_PATTERN')) {
+ // backwards-compatibility for Frusterick Manners (2017-02-19)
+ $sectionEditStartData = 'plugin_wrap_start';
+ $sectionEditEndData = 'plugin_wrap_end';
+ }
+ // add a section edit right at the beginning of the wrap output
+ $renderer->startSectionEdit(0, $sectionEditStartData);
+ $renderer->finishSectionEdit();
+ // add a section edit for the end of the wrap output. This prevents the renderer
+ // from closing the last section edit so the next section button after the wrap syntax will
+ // include the whole wrap syntax
+ $renderer->startSectionEdit(0, $sectionEditEndData);
+
+ case DOKU_LEXER_SPECIAL:
+ $wrap = $this->loadHelper('wrap');
+ $attr = $wrap->buildAttributes($data, 'plugin_wrap');
+
+ $renderer->doc .= '<div'.$attr.'>';
+ if ($state == DOKU_LEXER_SPECIAL) $renderer->doc .= '</div>';
+ break;
+
+ case DOKU_LEXER_EXIT:
+ $renderer->doc .= '</div>';
+ $renderer->finishSectionEdit();
+ break;
+ }
+ return true;
+ }
+ if($mode == 'odt'){
+ switch ($state) {
+ case DOKU_LEXER_ENTER:
+ $wrap = plugin_load('helper', 'wrap');
+ array_push ($type_stack, $wrap->renderODTElementOpen($renderer, 'div', $data));
+ break;
+
+ case DOKU_LEXER_EXIT:
+ $element = array_pop ($type_stack);
+ $wrap = plugin_load('helper', 'wrap');
+ $wrap->renderODTElementClose ($renderer, $element);
+ break;
+ }
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/platform/www/lib/plugins/wrap/syntax/divblock.php b/platform/www/lib/plugins/wrap/syntax/divblock.php
new file mode 100644
index 0000000..9bac053
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/syntax/divblock.php
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Alternate div syntax component for the wrap plugin
+ *
+ * Defines <block> ... </block> syntax
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Anika Henke <anika@selfthinker.org>
+ */
+
+require_once(dirname(__FILE__).'/div.php');
+
+class syntax_plugin_wrap_divblock extends syntax_plugin_wrap_div {
+
+ protected $special_pattern = '<block\b[^>\r\n]*?/>';
+ protected $entry_pattern = '<block\b.*?>(?=.*?</block>)';
+ protected $exit_pattern = '</block>';
+
+
+}
+
diff --git a/platform/www/lib/plugins/wrap/syntax/divwrap.php b/platform/www/lib/plugins/wrap/syntax/divwrap.php
new file mode 100644
index 0000000..386c5ff
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/syntax/divwrap.php
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Alternate div syntax component for the wrap plugin
+ *
+ * Defines <WRAP> ... </WRAP> syntax
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Anika Henke <anika@selfthinker.org>
+ */
+
+require_once(dirname(__FILE__).'/div.php');
+
+class syntax_plugin_wrap_divwrap extends syntax_plugin_wrap_div {
+
+ protected $special_pattern = '<WRAP\b[^>\r\n]*?/>';
+ protected $entry_pattern = '<WRAP\b.*?>(?=.*?</WRAP>)';
+ protected $exit_pattern = '</WRAP>';
+
+}
+
diff --git a/platform/www/lib/plugins/wrap/syntax/span.php b/platform/www/lib/plugins/wrap/syntax/span.php
new file mode 100644
index 0000000..2611c5a
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/syntax/span.php
@@ -0,0 +1,105 @@
+<?php
+/**
+ * Span Syntax Component of the Wrap Plugin
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Anika Henke <anika@selfthinker.org>
+ */
+
+if(!defined('DOKU_INC')) die();
+
+if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
+require_once(DOKU_PLUGIN.'syntax.php');
+
+class syntax_plugin_wrap_span extends DokuWiki_Syntax_Plugin {
+ protected $special_pattern = '<span\b[^>\r\n]*?/>';
+ protected $entry_pattern = '<span\b.*?>(?=.*?</span>)';
+ protected $exit_pattern = '</span>';
+
+ function getType(){ return 'formatting';}
+ function getAllowedTypes() { return array('formatting', 'substition', 'disabled'); }
+ function getPType(){ return 'normal';}
+ function getSort(){ return 195; }
+ // override default accepts() method to allow nesting - ie, to get the plugin accepts its own entry syntax
+ function accepts($mode) {
+ if ($mode == substr(get_class($this), 7)) return true;
+ return parent::accepts($mode);
+ }
+
+ /**
+ * Connect pattern to lexer
+ */
+ function connectTo($mode) {
+ $this->Lexer->addSpecialPattern($this->special_pattern,$mode,'plugin_wrap_'.$this->getPluginComponent());
+ $this->Lexer->addEntryPattern($this->entry_pattern,$mode,'plugin_wrap_'.$this->getPluginComponent());
+ }
+
+ function postConnect() {
+ $this->Lexer->addExitPattern($this->exit_pattern, 'plugin_wrap_'.$this->getPluginComponent());
+ }
+
+ /**
+ * Handle the match
+ */
+ function handle($match, $state, $pos, Doku_Handler $handler){
+ switch ($state) {
+ case DOKU_LEXER_ENTER:
+ case DOKU_LEXER_SPECIAL:
+ $data = strtolower(trim(substr($match,strpos($match,' '),-1)," \t\n/"));
+ return array($state, $data);
+
+ case DOKU_LEXER_UNMATCHED :
+ $handler->_addCall('cdata', array($match), $pos);
+ return false;
+
+ case DOKU_LEXER_EXIT :
+ return array($state, '');
+
+ }
+ return false;
+ }
+
+ /**
+ * Create output
+ */
+ function render($mode, Doku_Renderer $renderer, $indata) {
+ static $type_stack = array ();
+
+ if (empty($indata)) return false;
+ list($state, $data) = $indata;
+
+ if($mode == 'xhtml'){
+ switch ($state) {
+ case DOKU_LEXER_ENTER:
+ case DOKU_LEXER_SPECIAL:
+ $wrap = $this->loadHelper('wrap');
+ $attr = $wrap->buildAttributes($data);
+
+ $renderer->doc .= '<span'.$attr.'>';
+ if ($state == DOKU_LEXER_SPECIAL) $renderer->doc .= '</span>';
+ break;
+
+ case DOKU_LEXER_EXIT:
+ $renderer->doc .= '</span>';
+ break;
+ }
+ return true;
+ }
+ if($mode == 'odt'){
+ switch ($state) {
+ case DOKU_LEXER_ENTER:
+ $wrap = plugin_load('helper', 'wrap');
+ array_push ($type_stack, $wrap->renderODTElementOpen($renderer, 'span', $data));
+ break;
+
+ case DOKU_LEXER_EXIT:
+ $element = array_pop ($type_stack);
+ $wrap = plugin_load('helper', 'wrap');
+ $wrap->renderODTElementClose ($renderer, $element);
+ break;
+ }
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/platform/www/lib/plugins/wrap/syntax/spaninline.php b/platform/www/lib/plugins/wrap/syntax/spaninline.php
new file mode 100644
index 0000000..cc7a669
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/syntax/spaninline.php
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Alternate span syntax component for the wrap plugin
+ *
+ * Defines <inline> ... </inline> syntax
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Anika Henke <anika@selfthinker.org>
+ */
+
+require_once(dirname(__FILE__).'/span.php');
+
+class syntax_plugin_wrap_spaninline extends syntax_plugin_wrap_span {
+
+ protected $special_pattern = '<inline\b[^>\r\n]*?/>';
+ protected $entry_pattern = '<inline\b.*?>(?=.*?</inline>)';
+ protected $exit_pattern = '</inline>';
+
+}
+
diff --git a/platform/www/lib/plugins/wrap/syntax/spanwrap.php b/platform/www/lib/plugins/wrap/syntax/spanwrap.php
new file mode 100644
index 0000000..9c3d921
--- /dev/null
+++ b/platform/www/lib/plugins/wrap/syntax/spanwrap.php
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Alternate span syntax component for the wrap plugin
+ *
+ * Defines <wrap> ... </wrap> syntax
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Anika Henke <anika@selfthinker.org>
+ */
+
+require_once(dirname(__FILE__).'/span.php');
+
+class syntax_plugin_wrap_spanwrap extends syntax_plugin_wrap_span {
+
+ protected $special_pattern = '<wrap\b[^>\r\n]*?/>';
+ protected $entry_pattern = '<wrap\b.*?>(?=.*?</wrap>)';
+ protected $exit_pattern = '</wrap>';
+
+
+}
+