Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
| dokuwiki:infobox [2015-Dec-02 17:07] – MOLINIER Etienne | dokuwiki:infobox [2018-Sep-18 22:39] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 10: | Ligne 10: | ||
| <infobox type=" | <infobox type=" | ||
| <infobox type=" | <infobox type=" | ||
| - | <infobox type=" | + | <infobox type=" |
| ==== The code ==== | ==== The code ==== | ||
| Ligne 21: | Ligne 21: | ||
| | | ||
| * @license | * @license | ||
| - | * @author | + | * @author |
| - | * @copyright | + | * @copyright |
| */ | */ | ||
| Ligne 32: | Ligne 32: | ||
| class syntax_plugin_bootswrapper_infobox extends syntax_plugin_bootswrapper_bootstrap { | class syntax_plugin_bootswrapper_infobox extends syntax_plugin_bootswrapper_bootstrap { | ||
| - | protected | + | public |
| - | | + | |
| - | | + | |
| + | public | ||
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| ' | ' | ||
| - | ' | + | |
| - | | + | ' |
| - | | + | ' |
| - | ); | + | ); |
| - | | + | |
| - | | + | |
| - | | + | |
| + | if ($mode !== ' | ||
| - | if ($mode == ' | + | /** @var Doku_Renderer_xhtml $renderer */ |
| + | list($state, $match, $attributes) = $data; | ||
| - | /** @var Doku_Renderer_xhtml $renderer */ | + | switch($state) |
| - | list($state, $match, $attributes) = $data; | + | |
| - | switch($state) { | + | case DOKU_LEXER_ENTER: |
| - | case DOKU_LEXER_ENTER: | + | extract($attributes); |
| - | extract($attributes); | + | $html_attributes = $this-> |
| + | $html_attributes[' | ||
| + | $html_attributes[' | ||
| + | $html_attributes[' | ||
| + | |||
| + | $style=[]; | ||
| + | if ($center) | ||
| + | if (!is_null($width)) {$style[" | ||
| + | $html_attributes[' | ||
| - | $markup=""; | + | |
| - | if ($center!=" | + | |
| - | $markup.=sprintf('<div style=" | + | |
| - | } | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | $markup .= '< | + | $markup .= '< |
| - | } | + | } |
| - | | + | |
| - | $markup .= sprintf('< | + | $markup .= sprintf('< |
| - | } else { | + | } |
| - | if ($type==" | + | |
| - | $icon = ' | + | |
| - | } | + | |
| - | if ($type==" | + | |
| - | $icon = ' | + | |
| - | } | + | |
| - | if ($type==" | + | |
| - | $icon = ' | + | |
| - | } | + | |
| - | if ($type==" | + | |
| - | $icon = ' | + | |
| - | } | + | |
| - | $markup .= sprintf('< | + | |
| - | } | + | |
| - | | + | |
| - | return true; | + | return true; |
| - | | + | |
| - | if ($center!=" | + | $renderer-> |
| - | | + | return true; |
| - | } else { | + | |
| - | $renderer-> | + | |
| - | } | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | } | + | |
| - | + | ||
| - | return false; | + | |
| - | + | ||
| - | | + | |
| } | } | ||
| </ | </ | ||