summaryrefslogtreecommitdiff
path: root/lib/plugins/imagebox
diff options
context:
space:
mode:
Diffstat (limited to 'lib/plugins/imagebox')
-rwxr-xr-xlib/plugins/imagebox/conf/default.php4
-rwxr-xr-xlib/plugins/imagebox/conf/metadata.php4
-rwxr-xr-xlib/plugins/imagebox/lang/ar/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/bg/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/ca/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/cs/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/da/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/de/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/el/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/en/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/eo/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/es/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/et/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/eu/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/fi/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/fo/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/fr/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/gl/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/he/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/hr/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/hu/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/id/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/it/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/ja/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/ko/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/ku/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/lt/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/lv/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/mg/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/nl/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/no/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/pl/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/pt/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/ro/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/ru/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/sk/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/sl/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/sr/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/sv/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/tr/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/uk/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/vi/lang.php2
-rwxr-xr-xlib/plugins/imagebox/lang/zh/lang.php2
-rwxr-xr-xlib/plugins/imagebox/magnify-clip.pngbin0 -> 267 bytes
-rwxr-xr-xlib/plugins/imagebox/style.css60
-rwxr-xr-xlib/plugins/imagebox/syntax.php119
46 files changed, 269 insertions, 0 deletions
diff --git a/lib/plugins/imagebox/conf/default.php b/lib/plugins/imagebox/conf/default.php
new file mode 100755
index 000000000..9d8a2655c
--- /dev/null
+++ b/lib/plugins/imagebox/conf/default.php
@@ -0,0 +1,4 @@
+<?php
+$conf['display_magnify'] = 'If necessary'; // Afficher magnify-clip.png, ou pas
+$conf['default_caption_style'] = 'Normal'; // Style de la legende par defaut
+$conf['center_align'] = 1; // Authoriser le centrage \ No newline at end of file
diff --git a/lib/plugins/imagebox/conf/metadata.php b/lib/plugins/imagebox/conf/metadata.php
new file mode 100755
index 000000000..1bcf34fe6
--- /dev/null
+++ b/lib/plugins/imagebox/conf/metadata.php
@@ -0,0 +1,4 @@
+<?php
+$meta['display_magnify'] = array('multichoice','_choices' => array('If necessary','Always','Never'));
+$meta['center_align'] = array('onoff');
+$meta['default_caption_style'] = array('multichoice','_choices' => array('Normal','Italic','Bold')); \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/ar/lang.php b/lib/plugins/imagebox/lang/ar/lang.php
new file mode 100755
index 000000000..54c0c801b
--- /dev/null
+++ b/lib/plugins/imagebox/lang/ar/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'تكبير'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/bg/lang.php b/lib/plugins/imagebox/lang/bg/lang.php
new file mode 100755
index 000000000..6d98147cf
--- /dev/null
+++ b/lib/plugins/imagebox/lang/bg/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Увеличаване'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/ca/lang.php b/lib/plugins/imagebox/lang/ca/lang.php
new file mode 100755
index 000000000..5e5142aa0
--- /dev/null
+++ b/lib/plugins/imagebox/lang/ca/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Ampliar'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/cs/lang.php b/lib/plugins/imagebox/lang/cs/lang.php
new file mode 100755
index 000000000..8d5df6520
--- /dev/null
+++ b/lib/plugins/imagebox/lang/cs/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Zvětšit'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/da/lang.php b/lib/plugins/imagebox/lang/da/lang.php
new file mode 100755
index 000000000..057d59e34
--- /dev/null
+++ b/lib/plugins/imagebox/lang/da/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Forstør'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/de/lang.php b/lib/plugins/imagebox/lang/de/lang.php
new file mode 100755
index 000000000..1d63b9726
--- /dev/null
+++ b/lib/plugins/imagebox/lang/de/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'vergrößern'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/el/lang.php b/lib/plugins/imagebox/lang/el/lang.php
new file mode 100755
index 000000000..eb2f65733
--- /dev/null
+++ b/lib/plugins/imagebox/lang/el/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Μεγέθυνση'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/en/lang.php b/lib/plugins/imagebox/lang/en/lang.php
new file mode 100755
index 000000000..4bf84676b
--- /dev/null
+++ b/lib/plugins/imagebox/lang/en/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Enlarge'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/eo/lang.php b/lib/plugins/imagebox/lang/eo/lang.php
new file mode 100755
index 000000000..dc61079d8
--- /dev/null
+++ b/lib/plugins/imagebox/lang/eo/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Pligrandigi'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/es/lang.php b/lib/plugins/imagebox/lang/es/lang.php
new file mode 100755
index 000000000..a77955f67
--- /dev/null
+++ b/lib/plugins/imagebox/lang/es/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Aumentar'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/et/lang.php b/lib/plugins/imagebox/lang/et/lang.php
new file mode 100755
index 000000000..d5b97a75c
--- /dev/null
+++ b/lib/plugins/imagebox/lang/et/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Suurenda'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/eu/lang.php b/lib/plugins/imagebox/lang/eu/lang.php
new file mode 100755
index 000000000..f4b9a5203
--- /dev/null
+++ b/lib/plugins/imagebox/lang/eu/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Handitu'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/fi/lang.php b/lib/plugins/imagebox/lang/fi/lang.php
new file mode 100755
index 000000000..16e18915d
--- /dev/null
+++ b/lib/plugins/imagebox/lang/fi/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Suurenna'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/fo/lang.php b/lib/plugins/imagebox/lang/fo/lang.php
new file mode 100755
index 000000000..f237e2d83
--- /dev/null
+++ b/lib/plugins/imagebox/lang/fo/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Víðka'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/fr/lang.php b/lib/plugins/imagebox/lang/fr/lang.php
new file mode 100755
index 000000000..48e3d29df
--- /dev/null
+++ b/lib/plugins/imagebox/lang/fr/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Agrandir';
diff --git a/lib/plugins/imagebox/lang/gl/lang.php b/lib/plugins/imagebox/lang/gl/lang.php
new file mode 100755
index 000000000..93493e86b
--- /dev/null
+++ b/lib/plugins/imagebox/lang/gl/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Agrandado'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/he/lang.php b/lib/plugins/imagebox/lang/he/lang.php
new file mode 100755
index 000000000..cc5e8d1cd
--- /dev/null
+++ b/lib/plugins/imagebox/lang/he/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'הגדל'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/hr/lang.php b/lib/plugins/imagebox/lang/hr/lang.php
new file mode 100755
index 000000000..8443f1f28
--- /dev/null
+++ b/lib/plugins/imagebox/lang/hr/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Povećaj'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/hu/lang.php b/lib/plugins/imagebox/lang/hu/lang.php
new file mode 100755
index 000000000..81b27e06f
--- /dev/null
+++ b/lib/plugins/imagebox/lang/hu/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Nagyít'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/id/lang.php b/lib/plugins/imagebox/lang/id/lang.php
new file mode 100755
index 000000000..252352ff6
--- /dev/null
+++ b/lib/plugins/imagebox/lang/id/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Perbesar'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/it/lang.php b/lib/plugins/imagebox/lang/it/lang.php
new file mode 100755
index 000000000..022481e03
--- /dev/null
+++ b/lib/plugins/imagebox/lang/it/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Ingrandisci'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/ja/lang.php b/lib/plugins/imagebox/lang/ja/lang.php
new file mode 100755
index 000000000..40717d795
--- /dev/null
+++ b/lib/plugins/imagebox/lang/ja/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = '拡大'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/ko/lang.php b/lib/plugins/imagebox/lang/ko/lang.php
new file mode 100755
index 000000000..1295026a5
--- /dev/null
+++ b/lib/plugins/imagebox/lang/ko/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = '실제 크기로'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/ku/lang.php b/lib/plugins/imagebox/lang/ku/lang.php
new file mode 100755
index 000000000..58d51fd23
--- /dev/null
+++ b/lib/plugins/imagebox/lang/ku/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Mezin bike'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/lt/lang.php b/lib/plugins/imagebox/lang/lt/lang.php
new file mode 100755
index 000000000..9e95533de
--- /dev/null
+++ b/lib/plugins/imagebox/lang/lt/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Padidinti'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/lv/lang.php b/lib/plugins/imagebox/lang/lv/lang.php
new file mode 100755
index 000000000..73b4a6e75
--- /dev/null
+++ b/lib/plugins/imagebox/lang/lv/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Palielināt'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/mg/lang.php b/lib/plugins/imagebox/lang/mg/lang.php
new file mode 100755
index 000000000..a99970386
--- /dev/null
+++ b/lib/plugins/imagebox/lang/mg/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Angezao'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/nl/lang.php b/lib/plugins/imagebox/lang/nl/lang.php
new file mode 100755
index 000000000..659f51108
--- /dev/null
+++ b/lib/plugins/imagebox/lang/nl/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Groter'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/no/lang.php b/lib/plugins/imagebox/lang/no/lang.php
new file mode 100755
index 000000000..4bc88bac2
--- /dev/null
+++ b/lib/plugins/imagebox/lang/no/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Forstørr'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/pl/lang.php b/lib/plugins/imagebox/lang/pl/lang.php
new file mode 100755
index 000000000..f0cedfc46
--- /dev/null
+++ b/lib/plugins/imagebox/lang/pl/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Powiększ'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/pt/lang.php b/lib/plugins/imagebox/lang/pt/lang.php
new file mode 100755
index 000000000..5e5142aa0
--- /dev/null
+++ b/lib/plugins/imagebox/lang/pt/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Ampliar'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/ro/lang.php b/lib/plugins/imagebox/lang/ro/lang.php
new file mode 100755
index 000000000..bec8fcc24
--- /dev/null
+++ b/lib/plugins/imagebox/lang/ro/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Extinde'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/ru/lang.php b/lib/plugins/imagebox/lang/ru/lang.php
new file mode 100755
index 000000000..740f21250
--- /dev/null
+++ b/lib/plugins/imagebox/lang/ru/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Увеличить'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/sk/lang.php b/lib/plugins/imagebox/lang/sk/lang.php
new file mode 100755
index 000000000..8cf014485
--- /dev/null
+++ b/lib/plugins/imagebox/lang/sk/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Zväčšiť'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/sl/lang.php b/lib/plugins/imagebox/lang/sl/lang.php
new file mode 100755
index 000000000..0f44ce762
--- /dev/null
+++ b/lib/plugins/imagebox/lang/sl/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Povečaj'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/sr/lang.php b/lib/plugins/imagebox/lang/sr/lang.php
new file mode 100755
index 000000000..eb849befe
--- /dev/null
+++ b/lib/plugins/imagebox/lang/sr/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'увећај'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/sv/lang.php b/lib/plugins/imagebox/lang/sv/lang.php
new file mode 100755
index 000000000..5b6be3b3e
--- /dev/null
+++ b/lib/plugins/imagebox/lang/sv/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Förstora'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/tr/lang.php b/lib/plugins/imagebox/lang/tr/lang.php
new file mode 100755
index 000000000..3842b35f9
--- /dev/null
+++ b/lib/plugins/imagebox/lang/tr/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Büyüt'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/uk/lang.php b/lib/plugins/imagebox/lang/uk/lang.php
new file mode 100755
index 000000000..7ddd8f4a6
--- /dev/null
+++ b/lib/plugins/imagebox/lang/uk/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Збільшити'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/vi/lang.php b/lib/plugins/imagebox/lang/vi/lang.php
new file mode 100755
index 000000000..d8959da51
--- /dev/null
+++ b/lib/plugins/imagebox/lang/vi/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = 'Phóng lớn'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/lang/zh/lang.php b/lib/plugins/imagebox/lang/zh/lang.php
new file mode 100755
index 000000000..702feb888
--- /dev/null
+++ b/lib/plugins/imagebox/lang/zh/lang.php
@@ -0,0 +1,2 @@
+<?php
+$lang['enlarge'] = '放大'; \ No newline at end of file
diff --git a/lib/plugins/imagebox/magnify-clip.png b/lib/plugins/imagebox/magnify-clip.png
new file mode 100755
index 000000000..50abcb682
--- /dev/null
+++ b/lib/plugins/imagebox/magnify-clip.png
Binary files differ
diff --git a/lib/plugins/imagebox/style.css b/lib/plugins/imagebox/style.css
new file mode 100755
index 000000000..4986f0c81
--- /dev/null
+++ b/lib/plugins/imagebox/style.css
@@ -0,0 +1,60 @@
+div.thumb2{
+margin-bottom:.5em;
+width:auto;
+}
+div.trien{
+float:left;
+margin:.5em 1.4em .8em 0;
+}
+div.tleft{
+clear:left;
+float:left;
+margin:.5em 1.4em .8em 0;
+}
+div.tright{
+clear:right;
+float:right;
+margin:.5em 0 .8em 1.4em;
+}
+div.tcenter{
+clear:both;
+margin:.5em auto .8em auto;
+}
+div.thumb2 .thumbinner{
+background-color:#F9F9F9;
+border:1px solid #CCC;
+font-size:94%;
+overflow:hidden;
+padding:3px;
+}
+div.thumb2 .mediabox2{
+background:#FFF none repeat scroll 0 0;
+margin:0;
+border:1px solid #CCC!important;
+}
+html .thumbcaption{
+border:medium none;
+font-size:94%;
+line-height:1.4em;
+padding:3px;
+text-align:left;
+}
+div.thumb2 .magnify{
+background:transparent none repeat scroll 0 0;
+border:medium none!important;
+float:right;
+}
+div.thumb2 .magnify a,div.thumb2 .magnify img{
+background:transparent none repeat scroll 0 0;
+border:medium none!important;
+display:block;
+}
+div.thumb2 .interwiki{
+background-position:0 center;
+padding-left:17px;
+}
+/* Uncomment these lines to force the edit button show up bellow the imagebox. */
+/* div.dokuwiki div.secedit input.button{
+ * clear:both !important;
+ * }
+ */ \ No newline at end of file
diff --git a/lib/plugins/imagebox/syntax.php b/lib/plugins/imagebox/syntax.php
new file mode 100755
index 000000000..1fe6fe1f3
--- /dev/null
+++ b/lib/plugins/imagebox/syntax.php
@@ -0,0 +1,119 @@
+<?php
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author FFTiger <fftiger@wikisquare.com>, myst6re <myst6re@wikisquare.com>
+ */
+
+if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/');
+if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
+require_once(DOKU_PLUGIN.'syntax.php');
+
+class syntax_plugin_imagebox extends DokuWiki_Syntax_Plugin {
+
+ function getInfo(){
+ return array(
+ 'author' => 'FFTiger / myst6re',
+ 'email' => 'myst6re@wikisquare.com',
+ 'date' => '2010-05-30',
+ 'name' => 'Imagebox Plugin',
+ 'desc' => 'Entoure les images avec un cadre de décoration.',
+ 'url' => 'http://www.wikisquare.com/',
+ );
+ }
+
+ function getType(){ return 'protected'; }
+ function getAllowedTypes() { return array('substition','protected','disabled','formatting'); }
+ function getSort(){ return 315; }
+ function getPType(){ return 'block'; }
+ function connectTo($mode) { $this->Lexer->addEntryPattern('\[\{\{[^\|\}]+\|*(?=[^\}]*\}\}\])',$mode,'plugin_imagebox'); }
+ function postConnect() { $this->Lexer->addExitPattern('\}\}\]','plugin_imagebox'); }
+
+ function handle($match, $state, $pos, &$handler){
+ switch($state){
+ case DOKU_LEXER_ENTER:
+ $match=Doku_Handler_Parse_Media(substr($match,3));
+ $match['w'] = $match['width'];
+ $dispMagnify = ($match['w'] || $match['height']) && $this->getConf('display_magnify')=='If necessary' || $this->getConf('display_magnify')=='Always';
+
+ $gimgs = false;
+ list($src,$hash) = explode('#',$match['src'],2);
+
+ if($match['type']=='internalmedia') {
+ global $ID;
+ $exists = false;
+ resolve_mediaid(getNS($ID), $src, $exists);
+
+ if($dispMagnify) {
+ $match['detail'] = ml($src,array('id'=>$ID,'cache'=>$match['cache']),($match['linking']=='direct'));
+ if($hash) $match['detail'] .= '#'.$hash;
+ }
+
+ if($exists) $gimgs = @getImageSize(mediaFN($src));
+ }
+ else {
+ if($dispMagnify) {
+ $match['detail'] = ml($src,array('cache'=>'cache'),false);
+ if($hash) $match['detail'] .= '#'.$hash;
+ }
+
+ $gimgs = @getImageSize($src);
+ }
+
+ $match['exist'] = $gimgs!==false;
+
+ if(!$match['w'] && $match['exist']){
+ ($match['height'])?
+ $match['w'] = $match['height']*$gimgs[0]/$gimgs[1]:
+ $match['w'] = $gimgs[0];
+ }
+
+ if(!$match['align'] || $match['align']=='center'&&!$this->getConf('center_align'))
+ $match['align'] = 'rien';
+ return array($state,$match);
+
+ case DOKU_LEXER_UNMATCHED:
+ return array($state,$match);
+
+ case DOKU_LEXER_EXIT:
+ return array($state,$match);
+ }
+ }
+
+ function render($mode, &$renderer, $data){
+ if($mode == 'xhtml'){
+ list($state,$match) = $data;
+
+ switch($state){
+ case DOKU_LEXER_ENTER:
+ $renderer->doc.= '<div class="thumb2 t'.$match['align'].'" style="width:'.($match['w']?($match['w']+10).'px':'auto').'"><div class="thumbinner">';
+ if($match['exist'])
+ $renderer->$match['type']($match['src'],$match['title'],'box2',$match['width'],$match['height'],$match['cache'],$match['linking']);
+ else
+ $renderer->doc.= 'Invalid Link';
+ $renderer->doc.= '<div class="thumbcaption">';
+ if($match['detail']) {
+ $renderer->doc.= '<div class="magnify">';
+ $renderer->doc.= '<a class="internal" title="'.$this->getLang('enlarge').'" href="'.$match['detail'].'">';
+ $renderer->doc.= '<img width="15" height="11" alt="" src="'.DOKU_BASE.'lib/plugins/imagebox/magnify-clip.png"/>';
+ $renderer->doc.= '</a></div>';
+ }
+ break;
+
+ case DOKU_LEXER_UNMATCHED:
+ $style=$this->getConf('default_caption_style');
+ if($style=='Italic') $renderer->doc .= '<em>'.$renderer->_xmlEntities($match).'</em>';
+ elseif($style=='Bold') $renderer->doc .= '<strong>'.$renderer->_xmlEntities($match).'</strong>';
+ else $renderer->doc .= $renderer->_xmlEntities($match);
+ break;
+
+ case DOKU_LEXER_EXIT:
+ $renderer->doc.= '</div></div></div>';
+ break;
+ }
+ return true;
+ }
+ return false;
+ }
+}
+
+//Setup VIM: ex: et ts=4 enc=utf-8 :