www: plugins: install wrap plugin needed for the new eo doc system

This commit is contained in:
Stefan Schmidt 2016-11-29 11:52:18 +01:00
parent f4b438e4a1
commit 943289fa2e
91 changed files with 3722 additions and 0 deletions

View File

@ -0,0 +1,13 @@
language: php
php:
- "5.6"
- "5.5"
- "5.4"
- "5.3"
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
script: cd _test && phpunit --stderr --group plugin_wrap

View File

@ -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.

View File

@ -0,0 +1 @@
see plugin.info.txt

View File

@ -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);
}
}

View File

@ -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 = '';
}
}
}

View File

@ -0,0 +1,321 @@
/********************************************************************
Screen and Print Styles for the Wrap Plugin
********************************************************************/
/* resetting the box model to something more sane makes life a whole lot easier */
.dokuwiki .plugin_wrap {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
/* tables in columns and boxes should span the whole width */
.dokuwiki .plugin_wrap table {
width: 100%;
}
/* emulate a headline */
.dokuwiki .plugin_wrap em strong {
font-size: 130%;
font-weight: bold;
font-style: normal;
display: block;
}
/* emulate a bigger headline with a bottom border */
.dokuwiki .plugin_wrap em strong em.u {
font-size: 115%;
border-bottom: 1px solid __border__;
font-style: normal;
text-decoration: none;
display: block;
}
/* different bigger headline for safety notes */
.dokuwiki .wrap_danger em strong em.u,
.dokuwiki .wrap_warning em strong em.u,
.dokuwiki .wrap_caution em strong em.u,
.dokuwiki .wrap_notice em strong em.u,
.dokuwiki .wrap_safety 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) */
.dokuwiki .wrap_box em strong em.u,
.dokuwiki .wrap_info em strong em.u,
.dokuwiki .wrap_important em strong em.u,
.dokuwiki .wrap_alert em strong em.u,
.dokuwiki .wrap_tip em strong em.u,
.dokuwiki .wrap_help em strong em.u,
.dokuwiki .wrap_todo em strong em.u,
.dokuwiki .wrap_download em strong em.u {
border-bottom-color: #999;
}
/* real headlines should not be indented inside a wrap */
.dokuwiki .plugin_wrap h1,
.dokuwiki .plugin_wrap h2,
.dokuwiki .plugin_wrap h3,
.dokuwiki .plugin_wrap h4,
.dokuwiki .plugin_wrap h5 {
margin-left: 0;
margin-right: 0;
}
/* columns
********************************************************************/
.dokuwiki .wrap_left,
.dokuwiki .wrap_column {
float: left;
margin-right: 1.5em;
}
[dir=rtl] .dokuwiki .wrap_column {
float: right;
margin-left: 1.5em;
margin-right: 0;
}
.dokuwiki .wrap_right {
float: right;
margin-left: 1.5em;
}
.dokuwiki .wrap_center {
display: block;
margin-left: auto;
margin-right: auto;
}
/*____________ CSS3 columns ____________*/
.dokuwiki .wrap_col2, .dokuwiki .wrap_col3, .dokuwiki .wrap_col4, .dokuwiki .wrap_col5 {
-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;
}
.dokuwiki .wrap_col2 {
-moz-column-count: 2;
-webkit-column-count: 2;
column-count: 2;
}
.dokuwiki .wrap_col3 {
-moz-column-count: 3;
-webkit-column-count: 3;
column-count: 3;
}
.dokuwiki .wrap_col4 {
-moz-column-count: 4;
-webkit-column-count: 4;
column-count: 4;
}
.dokuwiki .wrap_col5 {
-moz-column-count: 5;
-webkit-column-count: 5;
column-count: 5;
}
/* widths
********************************************************************/
.dokuwiki .wrap_half {
width: 48%;
margin-right: 4%;
}
.dokuwiki .wrap_third {
width: 30%;
margin-right: 5%;
}
.dokuwiki .wrap_quarter {
width: 22%;
margin-right: 4%;
}
[dir=rtl] .dokuwiki .wrap_half,
[dir=rtl] .dokuwiki .wrap_third,
[dir=rtl] .dokuwiki .wrap_quarter {
margin-right: 0;
margin-left: 4%;
}
[dir=rtl] .dokuwiki .wrap_third {
margin-left: 5%;
}
.dokuwiki .wrap_half:nth-of-type(2n),
.dokuwiki .wrap_third:nth-of-type(3n),
.dokuwiki .wrap_quarter:nth-of-type(4n) {
margin-right: 0;
}
[dir=rtl] .dokuwiki .wrap_half:nth-of-type(2n),
[dir=rtl] .dokuwiki .wrap_third:nth-of-type(3n),
[dir=rtl] .dokuwiki .wrap_quarter:nth-of-type(4n) {
margin-left: 0;
}
.dokuwiki .wrap_half:nth-of-type(2n+1),
.dokuwiki .wrap_third:nth-of-type(3n+1),
.dokuwiki .wrap_quarter:nth-of-type(4n+1) {
clear: left;
}
[dir=rtl] .dokuwiki .wrap_half:nth-of-type(2n+1),
[dir=rtl] .dokuwiki .wrap_third:nth-of-type(3n+1),
[dir=rtl] .dokuwiki .wrap_quarter:nth-of-type(4n+1) {
clear: right;
}
/* show 2 instead 4 columns on medium sized screens (mobile, etc) */
@media only screen and (max-width: 950px) {
.dokuwiki .wrap_quarter {
width: 48%;
}
.dokuwiki .wrap_quarter:nth-of-type(2n) {
margin-right: 0;
}
[dir=rtl] .dokuwiki .wrap_quarter:nth-of-type(2n) {
margin-left: 0;
}
.dokuwiki .wrap_quarter:nth-of-type(2n+1) {
clear: left;
}
[dir=rtl] .dokuwiki .wrap_quarter:nth-of-type(2n) {
clear: right;
}
} /* /@media */
/* show full width on smaller screens (mobile, etc) */
@media only screen and (max-width: 600px) {
.dokuwiki .wrap_half,
.dokuwiki .wrap_third,
.dokuwiki .wrap_quarter {
width: auto;
margin-right: 0;
margin-left: 0;
float: none;
}
} /* /@media */
/* alignments
********************************************************************/
.dokuwiki .wrap_leftalign {
text-align: left;
}
.dokuwiki .wrap_centeralign {
text-align: center;
}
.dokuwiki .wrap_rightalign {
text-align: right;
}
.dokuwiki .wrap_justify {
text-align: justify;
}
/* box
********************************************************************/
/* see styles for boxes and notes with icons in style.css */
/*____________ rounded corners ____________*/
/* (only for modern browsers) */
.dokuwiki div.wrap_round {
border-radius: 1.4em;
}
.dokuwiki span.wrap_round {
border-radius: .14em;
}
/* mark
********************************************************************/
.dokuwiki .wrap_lo {
color: __text_neu__;
font-size: 85%;
}
.dokuwiki .wrap_em {
color: #c00;
font-weight: bold;
}
.dokuwiki .wrap__dark.wrap_em {
color: #f66;
}
/* see styles for highlighted text in style.css */
/* miscellaneous
********************************************************************/
/*____________ indent ____________*/
.dokuwiki .wrap_indent {
padding-left: 1.5em;
}
[dir=rtl] .dokuwiki .wrap_indent {
padding-right: 1.5em;
padding-left: 0;
}
/*____________ outdent ____________*/
.dokuwiki .wrap_outdent {
margin-left: -1.5em;
}
[dir=rtl] .dokuwiki .wrap_outdent {
margin-right: -1.5em;
margin-left: 0;
}
/*____________ word wrapping in pre ____________*/
.dokuwiki div.wrap_prewrap pre {
white-space: pre-wrap;
word-wrap: break-word;/* for IE < 8 */
}
/*____________ spoiler ____________*/
.dokuwiki div.wrap_spoiler {
margin-bottom: 1.5em;
}
/* see rest of spoiler styles in style.css */
/*____________ clear float ____________*/
.dokuwiki .wrap_clear {
clear: both;
line-height: 0;
height: 0;
font-size: 1px;
visibility: hidden;
overflow: hidden;
}
/*____________ hide ____________*/
.dokuwiki .wrap_hide {
display: none;
}
/*____________ button-style link ____________*/
.dokuwiki .wrap_button a:link,
.dokuwiki .wrap_button a:visited {
background-image: none;
border: 1px solid __border__;
border-radius: .3em;
padding: .5em .7em;
text-decoration: none;
}
/* see rest of button link styles in style.css */

View File

@ -0,0 +1,12 @@
<?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;

View File

@ -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

View File

@ -0,0 +1,12 @@
<?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');

View File

@ -0,0 +1,437 @@
====== 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
A **table** inside a column or box will always be **100% wide**. This makes positioning and sizing tables possible.
</WRAP>
<WRAP third column>
=== Widths ===
You can set any valid widths (but only on divs): ''%, px, em, ex, 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 three width keywords. These should not be combined with any other width.
* **''half''** fits two columns in a row
* **''third''** fits three columns in a row
* **''quarter''** fits four columns in a row
:!: Attention: In order to work properly, wraps with width keywords need an **additional ''%%<WRAP group>%%'' around a set** of them.
</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 Headlines ===
Every ''%%//**__text like this__**//%%'' or ''%%//**like that**//%%'' will create an "emulated headline" when used within a box or a column. Now that headlines within wraps are supported, they are not needed anymore, but are still supported for backwards-compatibility.
If you need text that is bold and italic, simply use it the other way around: ''%%**//No Headline//**%%''
=== Multi-columns ===
<WRAP col3>
For modern browsers (Firefox, Chrome and Safari, IE10+) you can use multi-columns. Just use **''%%col2%%''** for 2 columns, **''%%col3%%''** for 3 columns, **''%%col4%%''** for 4 columns and **''%%col5%%''** for 5 columns.
:!: 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:**
<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 />
=== 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.)

View File

@ -0,0 +1,489 @@
<?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;
/**
* 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) {
$attr = array();
$tokens = preg_split('/\s+/', $data, 9);
$noPrefix = array_map('trim', explode(',', $this->getConf('noPrefix')));
$restrictedClasses = $this->getConf('restrictedClasses');
if ($restrictedClasses) {
$restrictedClasses = array_map('trim', explode(',', $this->getConf('restrictedClasses')));
}
$restrictionType = $this->getConf('restrictionType');
foreach ($tokens as $token) {
//get width
if (preg_match('/^\d*\.?\d+(%|px|em|ex|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 = in_array(trim($token), $restrictedClasses);
// either allow only certain classes
if ($restrictionType) {
if (!$classIsInList) continue;
// or disallow certain classes
} else {
if ($classIsInList) continue;
}
}
$prefix = in_array($token, $noPrefix) ? '' : 'wrap_';
$attr['class'] = (isset($attr['class']) ? $attr['class'].' ' : '').$prefix.$token;
}
if ($this->getConf('darkTpl')) {
$attr['class'] = (isset($attr['class']) ? $attr['class'].' ' : '').'wrap__dark';
}
//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);
$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 ('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);
return 'span';
} else {
$this->renderODTOpenParagraph ($renderer, $attr ['class'], $style, $language, $is_indent, $is_outdent, true);
return 'paragraph';
}
} else if ( $HTMLelement == 'div' ) {
if ( $is_box === true ) {
$this->renderODTOpenBox ($renderer, $attr ['class'], $style);
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, $language, $is_indent, $is_outdent, false);
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);
return 'column';
} else if ( $is_group === true ) {
$this->renderODTOpenGroup ($renderer, $attr ['class'], $style);
return 'group';
}
}
return 'other';
}
/**
* render ODT element, Close
*/
function renderODTElementClose($renderer, $element) {
switch ($element) {
case 'box':
$this->renderODTCloseBox ($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) {
$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, $language, $is_indent, $is_outdent, $indent_first) {
$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, 'p', $class, $style);
if ( empty($properties ['background-image']) === false ) {
$properties ['background-image'] =
$renderer->replaceURLPrefix ($properties ['background-image'], DOKU_INC);
}
if ( empty($language) === false ) {
$properties ['lang'] = $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;
}
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;
}
} 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;
}
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
}
}
$renderer->p_close();
$renderer->_odtParagraphOpenUseProperties($properties);
}
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) {
$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, NULL, $class, $style);
// 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.
$column_width = $properties ['width'];
$properties ['width'] = '100%';
$renderer->_odtTableOpenUseProperties($properties);
$renderer->_odtTableRowOpenUseProperties($properties);
$properties ['width'] = $column_width;
}
// Convert rel-width to absolute width.
// The width in percentage works strange in LibreOffice, this is a workaround.
$length = strlen ($properties ['width']);
if ( $length > 0 && $properties ['width'] [$length-1] == '%' ) {
$properties ['width'] = trim ($properties ['width'], '%');
$properties ['width'] = $renderer->_getAbsWidthMindMargins ($properties ['width']).'cm';
}
// 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.
$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) {
$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, 'span', $class, $style);
if ( empty($properties ['background-image']) === false ) {
$properties ['background-image'] =
$renderer->replaceURLPrefix ($properties ['background-image'], DOKU_INC);
}
if ( empty($language) === false ) {
$properties ['lang'] = $language;
}
$renderer->_odtSpanOpenUseProperties($properties);
}
function renderODTCloseSpan ($renderer) {
if ( method_exists ($renderer, '_odtSpanClose') === false ) {
// Function is not supported by installed ODT plugin version, return.
return;
}
$renderer->_odtSpanClose();
}
}

View File

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 883 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 929 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 841 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 797 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 870 B

View File

@ -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'] = 'أقل أهمية';

View File

@ -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'] = 'تقييد للفئات المذكورة أعلاه فقط وليس غيرها';

View File

@ -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'] = 'কম গুরুত্বপূর্ণ';

View File

@ -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'] = 'কোন বাক্য গঠন ইনলাইন গোপন জন্য টুলবার জুতো ব্যবহার করা উচিত?';

View File

@ -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é';

View File

@ -0,0 +1,14 @@
<?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? ';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -0,0 +1,14 @@
<?php
/**
* German language file for config of Wrap plugin
*
*/
$lang['noPrefix'] = 'Welche (mit Komma getrennten) Klassen sollen nicht mit "wrap_" anfangen?';
$lang['restrictedClasses'] = 'Beschränke die Benutzung des Plugins auf diese (mit Komma getrennten) Klassen';
$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?';

View File

@ -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';

View File

@ -0,0 +1,14 @@
<?php
/**
* German language file for config of Wrap plugin
*
*/
$lang['noPrefix'] = 'Welche (mit Komma getrennten) Klassen sollen nicht mit "wrap_" anfangen?';
$lang['restrictedClasses'] = 'Beschränke die Benutzung des Plugins auf diese (mit Komma getrennten) Klassen';
$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?';

View File

@ -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';

View File

@ -0,0 +1,14 @@
<?php
/**
* English language file for config of Wrap plugin
*
*/
$lang['noPrefix'] = 'Which (comma separated) class names should be excluded from being prefixed with "wrap_"?';
$lang['restrictedClasses'] = 'restrict usage of plugin to these (comma separated) classes';
$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?';

View File

@ -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';

View File

@ -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?';

View File

@ -0,0 +1,20 @@
<?php
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
*/
$lang['picker'] = 'Wrap Plugin';
$lang['column'] = 'columna';
$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';

View File

@ -0,0 +1,15 @@
<?php
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @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 ecluidas';
$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?';

View File

@ -0,0 +1,20 @@
<?php
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author reza_khn <reza_khn@yahoo.com>
*/
$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'] = 'کم اهمیت';

View File

@ -0,0 +1,23 @@
<?php
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Laynee <seedfloyd@gmail.com>
* @author schplurtz <Schplurtz@laposte.net>
* @author Schplurtz le Déboulonné <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';

View File

@ -0,0 +1,18 @@
<?php
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Laynee <seedfloyd@gmail.com>
* @author schplurtz <Schplurtz@laposte.net>
* @author Schplurtz le Déboulonné <schplurtz@laposte.net>
* @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?';

View File

@ -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';

View File

@ -0,0 +1,15 @@
<?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?';

View File

@ -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';

View File

@ -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?';

View File

@ -0,0 +1,12 @@
<?php
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Edmondo <snarchio@gmail.com>
* @author Giovanni <Giovanni.Garofalo@outlook.com>
*/
$lang['column'] = 'colonne';
$lang['em'] = 'enfatizzato speciale';
$lang['hi'] = 'evidenziato';
$lang['lo'] = 'meno importante';

View File

@ -0,0 +1,12 @@
<?php
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Edmondo <snarchio@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';

View File

@ -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'] = '非強調(薄色表示)';

View File

@ -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'] = '色の濃いテンプレート用に最適化しますか?';

View File

@ -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'] = '덜 중요함';

View File

@ -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'] = '어두은 템플릿을 위해 색을 최적화하겠습니까?';

View File

@ -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';

View File

@ -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?';

View File

@ -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';

View File

@ -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?';

View File

@ -0,0 +1,21 @@
<?php
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Sérgio Motta <sergio@cisne.com.br>
*/
$lang['picker'] = 'Plugin Wrap';
$lang['column'] = 'coluna';
$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';

View File

@ -0,0 +1,13 @@
<?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>
*/
$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';

View File

@ -0,0 +1,23 @@
<?php
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Aleksandr Selivanov <alexgearbox@gmail.com>
* @author Ilya Rozhkov <impeck@ya.ru>
* @author Aleksandr Selivanov <alexgearbox@yandex.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'] = 'пометить неважным';

View File

@ -0,0 +1,16 @@
<?php
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Ilya Rozhkov <impeck@ya.ru>
* @author Aleksandr Selivanov <alexgearbox@yandex.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'] = 'Какой синтаксис использовать для создания блоков выделения внутри текста?';

View File

@ -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ý';

View File

@ -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é';

View File

@ -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';

View File

@ -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?';

View File

@ -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'] = '不重要';

View File

@ -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'] = '只允許上述的類別。';

View File

@ -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'] = '不重要';

View File

@ -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'] = '优化黑模板的颜色?';

View File

@ -0,0 +1,2 @@
downloadurl=https://github.com/selfthinker/dokuwiki_plugin_wrap/archive/stable.zip
installed=Thu, 08 Sep 2016 12:06:06 +0000

View File

@ -0,0 +1,8 @@
base wrap
author Anika Henke
email anika@selfthinker.org
date 2015-07-19
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

View File

@ -0,0 +1,57 @@
/********************************************************************
Print Styles for the Wrap Plugin (additional to all.css)
********************************************************************/
/* boxes and notes with icons
********************************************************************/
.dokuwiki div.wrap_box,
.dokuwiki div.wrap_danger, .dokuwiki div.wrap_warning, .dokuwiki div.wrap_caution, .dokuwiki div.wrap_notice, .dokuwiki div.wrap_safety,
.dokuwiki div.wrap_info, .dokuwiki div.wrap_important, .dokuwiki div.wrap_alert, .dokuwiki div.wrap_tip, .dokuwiki div.wrap_help, .dokuwiki div.wrap_todo, .dokuwiki div.wrap_download {
border: 2px solid #999;
padding: 1em 1em .5em;
margin-bottom: 1.5em;
}
.dokuwiki span.wrap_box,
.dokuwiki span.wrap_danger, .dokuwiki span.wrap_warning, .dokuwiki span.wrap_caution, .dokuwiki span.wrap_notice, .dokuwiki span.wrap_safety,
.dokuwiki span.wrap_info, .dokuwiki span.wrap_important, .dokuwiki span.wrap_alert, .dokuwiki span.wrap_tip, .dokuwiki span.wrap_help, .dokuwiki span.wrap_todo, .dokuwiki span.wrap_download {
border: 1px solid #999;
padding: 0 .3em;
}
/* mark
********************************************************************/
.dokuwiki .wrap_hi {
border: 1px solid #999;
}
/* miscellaneous
********************************************************************/
/*____________ spoiler ____________*/
.dokuwiki .wrap_spoiler {
visibility: hidden;
}
/*____________ pagebreak ____________*/
.dokuwiki .wrap_pagebreak {
page-break-after: always;
}
/*____________ avoid page break ____________*/
/* not yet supported by most browsers */
.dokuwiki .wrap_nopagebreak {
page-break-inside: avoid;
}
/*____________ no print ____________*/
.dokuwiki .wrap_noprint {
display: none;
}

View File

@ -0,0 +1,203 @@
/********************************************************************
Screen Styles for the Wrap Plugin (additional to all.css)
********************************************************************/
/* box
********************************************************************/
.dokuwiki .wrap_box {
background: __background_alt__;
color: __text__;
}
.dokuwiki div.wrap_box,
.dokuwiki div.wrap_danger,
.dokuwiki div.wrap_warning,
.dokuwiki div.wrap_caution,
.dokuwiki div.wrap_notice,
.dokuwiki div.wrap_safety {
padding: 1em 1em .5em;
margin-bottom: 1.5em;
overflow: hidden;
}
.dokuwiki span.wrap_box,
.dokuwiki span.wrap_danger,
.dokuwiki span.wrap_warning,
.dokuwiki span.wrap_caution,
.dokuwiki span.wrap_notice,
.dokuwiki span.wrap_safety {
padding: 0 .3em;
}
/*____________ notes with icons ____________*/
/* general styles for all note divs */
.dokuwiki div.wrap_info,
.dokuwiki div.wrap_important,
.dokuwiki div.wrap_alert,
.dokuwiki div.wrap_tip,
.dokuwiki div.wrap_help,
.dokuwiki div.wrap_todo,
.dokuwiki 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 */
.dokuwiki span.wrap_info,
.dokuwiki span.wrap_important,
.dokuwiki span.wrap_alert,
.dokuwiki span.wrap_tip,
.dokuwiki span.wrap_help,
.dokuwiki span.wrap_todo,
.dokuwiki 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] .dokuwiki div.wrap_info,
[dir=rtl] .dokuwiki div.wrap_important,
[dir=rtl] .dokuwiki div.wrap_alert,
[dir=rtl] .dokuwiki div.wrap_tip,
[dir=rtl] .dokuwiki div.wrap_help,
[dir=rtl] .dokuwiki div.wrap_todo,
[dir=rtl] .dokuwiki div.wrap_download {
padding: 1em 60px .5em 1em;
background-position: right 50%;
}
[dir=rtl] .dokuwiki span.wrap_info,
[dir=rtl] .dokuwiki span.wrap_important,
[dir=rtl] .dokuwiki span.wrap_alert,
[dir=rtl] .dokuwiki span.wrap_tip,
[dir=rtl] .dokuwiki span.wrap_help,
[dir=rtl] .dokuwiki span.wrap_todo,
[dir=rtl] .dokuwiki span.wrap_download {
padding: 0 18px 0 2px;
background-position: right 50%;
}
/*____________ info ____________*/
.dokuwiki .wrap_info { background-color: #d1d7df; }
.dokuwiki .wrap__dark.wrap_info { background-color: #343e4a; }
.dokuwiki div.wrap_info { background-image: url(images/note/48/info.png); }
.dokuwiki span.wrap_info { background-image: url(images/note/16/info.png); }
/*____________ important ____________*/
.dokuwiki .wrap_important { background-color: #ffd39f; }
.dokuwiki .wrap__dark.wrap_important { background-color: #6c3b00; }
.dokuwiki div.wrap_important { background-image: url(images/note/48/important.png); }
.dokuwiki span.wrap_important { background-image: url(images/note/16/important.png); }
/*____________ alert ____________*/
.dokuwiki .wrap_alert { background-color: #ffbcaf; }
.dokuwiki .wrap__dark.wrap_alert { background-color: #6b1100; }
.dokuwiki div.wrap_alert { background-image: url(images/note/48/alert.png); }
.dokuwiki span.wrap_alert { background-image: url(images/note/16/alert.png); }
/*____________ tip ____________*/
.dokuwiki .wrap_tip { background-color: #fff79f; }
.dokuwiki .wrap__dark.wrap_tip { background-color: #4a4400; }
.dokuwiki div.wrap_tip { background-image: url(images/note/48/tip.png); }
.dokuwiki span.wrap_tip { background-image: url(images/note/16/tip.png); }
/*____________ help ____________*/
.dokuwiki .wrap_help { background-color: #dcc2ef; }
.dokuwiki .wrap__dark.wrap_help { background-color: #3c1757; }
.dokuwiki div.wrap_help { background-image: url(images/note/48/help.png); }
.dokuwiki span.wrap_help { background-image: url(images/note/16/help.png); }
/*____________ todo ____________*/
.dokuwiki .wrap_todo { background-color: #c2efdd; }
.dokuwiki .wrap__dark.wrap_todo { background-color: #17573e; }
.dokuwiki div.wrap_todo { background-image: url(images/note/48/todo.png); }
.dokuwiki span.wrap_todo { background-image: url(images/note/16/todo.png); }
/*____________ download ____________*/
.dokuwiki .wrap_download { background-color: #d6efc2; }
.dokuwiki .wrap__dark.wrap_download { background-color: #345717; }
.dokuwiki div.wrap_download { background-image: url(images/note/48/download.png); }
.dokuwiki span.wrap_download { background-image: url(images/note/16/download.png); }
/*____________ safety notes ____________*/
.dokuwiki .wrap_danger {
background-color: #c00;
color: #fff;
}
.dokuwiki .wrap_warning {
background-color: #f60;
color: #000;
}
.dokuwiki .wrap_caution {
background-color: #ff0;
color: #000;
}
.dokuwiki .wrap_notice {
background-color: #06f;
color: #fff;
}
.dokuwiki .wrap_safety {
background-color: #090;
color: #fff;
}
/* mark
********************************************************************/
.dokuwiki .wrap_hi {
background-color: #ff9;
overflow: hidden;
}
.dokuwiki .wrap__dark.wrap_hi {
background-color: #4e4e0d;
}
/* miscellaneous
********************************************************************/
/*____________ spoiler ____________*/
.dokuwiki .wrap_spoiler {
background-color: __background__ !important;
color: __background__ !important;
border: 1px dotted red;
}
/*____________ only print ____________*/
.dokuwiki .wrap_onlyprint {
display: none;
}
/*____________ tabs ____________*/
/* in addition to template styles */
.dokuwiki .plugin_wrap.tabs {
margin-bottom: 1.4em;
}
/*____________ button-style link ____________*/
.dokuwiki .wrap_button a:link,
.dokuwiki .wrap_button a:visited {
background-color: __background_alt__;
}
.dokuwiki .wrap_button a:link:hover,
.dokuwiki .wrap_button a:visited:hover,
.dokuwiki .wrap_button a:link:focus,
.dokuwiki .wrap_button a:visited:focus,
.dokuwiki .wrap_button a:link:active,
.dokuwiki .wrap_button a:visited:active {
background-color: __background_neu__;
}

View File

@ -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;
}
}

View File

@ -0,0 +1,132 @@
<?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:
// add a section edit right at the beginning of the wrap output
$renderer->startSectionEdit(0, 'plugin_wrap_start');
$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, 'plugin_wrap_end');
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;
}
}

View File

@ -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>';
}

View File

@ -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>';
}

View File

@ -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;
}
}

View File

@ -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>';
}

View File

@ -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>';
}