From 060422af22f8bab79df2c8b323d2a79aa31c5457 Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Wed, 8 Jan 2025 21:22:24 +0100 Subject: [PATCH 01/31] Adaptations to Mod bash --- Plugin.txt | 23 +++++++++++++---------- action.php | 6 +++--- image/codebash.png | Bin 0 -> 4290 bytes lang/de/lang.php | 2 +- lang/en/lang.php | 2 +- plugin.info.txt | 12 ++++++------ 6 files changed, 24 insertions(+), 21 deletions(-) create mode 100644 image/codebash.png diff --git a/Plugin.txt b/Plugin.txt index b364d9d..2317f41 100644 --- a/Plugin.txt +++ b/Plugin.txt @@ -1,7 +1,7 @@ -====== CodeButton Mod 1 Plugin (codebuttonmod1) ====== +====== CodeButton Mod 1 Plugin (codebuttonmodbash) ====== ---- plugin ---- -description: Inserts a code button into the toolbar. +description: Inserts a bash code button into the toolbar. author : Georg Schmidt email : gs-develop@gs-sys.de type : action @@ -9,11 +9,11 @@ lastupdate : 2021-01-09 compatible : 2018-04-22b depends : similar : codebutton, custombuttons -tags : button, code, toolbar +tags : button, code, toolbar, bash -downloadurl: https://github.com/user9209/dokuwiki_plugin_codebutton/archive/master.zip -bugtracker: https://github.com/user9209/dokuwiki_plugin_codebutton/issues -sourcerepo: https://github.com/user9209/dokuwiki_plugin_codebutton/ +downloadurl: https://github.com/unimetal/dokuwiki_plugin_codebuttonmodbash/archive/master.zip +bugtracker: https://github.com/unimetal/dokuwiki_plugin_codebuttonmodbash/issues +sourcerepo: https://github.com/unimetal/dokuwiki_plugin_codebuttonmodbash donationurl: screenshot_img : @@ -21,25 +21,28 @@ screenshot_img : ===== Installation ===== -Search and install the plugin **"codebuttonmod1"** using the Extension Manager. +Search and install the plugin **"codebuttonmodbash"** using the Extension Manager. or Install the plugin over the webfrontend by using the url: -https://github.com/user9209/dokuwiki_plugin_codebutton/archive/master.zip +https://github.com/unimetal/dokuwiki_plugin_codebuttonmodbash/archive/master.zip ===== Syntax and Usage ===== After installation you'll find a new button at the end of your regular toolbar. Use them to add "''Insert_Code''" to your DokuWiki markup. -=== Mod 1 contains === - * Default title is set to "download" +=== Mod bash contents === + * Default title is set to "$this->getLang('insertcode')" + +=== contents from Mod 1 === * file has been replaced by code * Placeholder text can select by a single double click. * plugin.info.txt for easy setup using a named zip file === Author === + * Simon Jacob (Mod bash) [https://github.com/unimetal/dokuwiki_plugin_codebuttonmodbash|Plugin on GitHub] * Georg Schmidt (Mod 1) [[https://github.com/user9209/dokuwiki_plugin_codebutton|Plugin on GitHub]] * Heiko Barth (Original) [[https://github.com/casperklein/dokuwiki_plugin_codebutton|Plugin on GitHub]] diff --git a/action.php b/action.php index d4c4906..579e0b6 100644 --- a/action.php +++ b/action.php @@ -9,7 +9,7 @@ if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/'); require_once (DOKU_PLUGIN . 'action.php'); -class action_plugin_codebuttonmod1 extends DokuWiki_Action_Plugin { +class action_plugin_codebuttonmodbash extends DokuWiki_Action_Plugin { /** * Register the eventhandlers @@ -24,8 +24,8 @@ function register(Doku_Event_Handler $controller) { function insert_button(& $event, $param) { $event->data[] = array ( 'type' => 'format', - 'title' => $this->getLang('insertcode'), - 'icon' => '../../plugins/codebuttonmod1/image/code.png', + 'title' => $this->getLang('insertcodebash'), + 'icon' => '../../plugins/codebuttonmodbash/image/codebash.png', 'open' => '\n', 'close' => '\n', ); diff --git a/image/codebash.png b/image/codebash.png new file mode 100644 index 0000000000000000000000000000000000000000..f98276e772a3f539b2e66a8b4207c2497b169f31 GIT binary patch literal 4290 zcmeHLe{dAl9p3~b@j^1eqNE{#okdbD?(OdFC3m;Yk%YU09OS|^xhiJ{%--(X%TDfY zkKMi8B??4H7$d1rsaj}2QifUxGKH}OiX(y`KTCtDP(+;+TScl39WAkn(6@U@NJeLz z%+&vKGkb5}d!O&;`~802_r1AyZQjZSnTA{gf*_gha%UB6v$ZFE68xU|*=-g!N1A*~ z)G9WPMrBD5LjYA9qW}d7Q9zKyJ7MqT%s0sNn*&qxpL`)d=Y&|bbGmx-O6jfxpStH} z{r=pq_8s23UY?Hr5{sP|UVhS1(f-Gb*3y!kvaE9xE2+27yi~R1d{0fTKbLY%=-qard)p@CMPm0)&h}WrhO5Ol7Qgnz zjs4g9$@Aw<_MLq&hx1zFt$1 z>3(|M_P$4>*Mobn^ z@Y~N?*01{Oe-{0{>g3NR%{q~~s|P)_@_NY^_L?rz_P5!tdrAk^eegtkYUk2z{&+_} zcS78X90~R9OP{QB`&P4$iDGx@bwPi^pAdT#YAE%Q$Nkmz$9;j#l1jUFQ>pyfDLq*<>JyPf)Jy8d!6U&=q zP~BAN}csy>5(?&@S5|qtmBS;frGT{(`D~%DA zP2dq_mPV1}Z~}#s#i%Mu5me)315!-2V;G!AhvExIJ)U9uh%%@G)PqQ{QGzm(L^w>0 zv`|!610)#?=vyrmAKarv6;Py@%mG&eh^VthQt;fceKaPA^mKTR03i^DPz8FWM!8(z z_IQUaGzo%YII3Ggu}2|QQMe=4sMxd_J)Mz(K=WbVQRt!EbudJEJd9J~Vp@1^rybM$ zGrYu!Jd=E-0c~SJ5pE?dX537g%(#s$>7K$fFP`M+D%0@V#Q9*K}2zfYK zC<*|9#VKI1;bzvt<5o)%z>7>mA#VYuBAP84L9tjCVO6rBkx^+>JfspVW;1Ck5^yfS z(YRR8J7zK_1J_5q zAyyTjfgP(5BeBFCs80-oYL(U0q%3q1O&3~CHj1Q8wB-)yVIV885;abWG}6gzv}Ivn zGEi7nt5ZmzTfkfxhYVO%l6{gCvSV5RsAf4l?Sb2gXI0k8ssNIbrb33K7}DyaObksj zCfgjXI|489qR{wVXl?VL#mOZv7ZvEgQ6Ea~sA{l0*-LgqqP~?-RNoW~%Oz7#*apDs zaYC--6j#Saf&iW#gXKCjE`CcX*n~ohnF0b1C|bbH9LM6;04xQwKntvyHWyl`q2`hdPr4~~u{UI(;QfP g@02pVlZJsJ2QqdE+)RANwE$X zamYZs;8{ovABKaP!Fa#V&)`~opDs{z+{u{q9hYldt}!VvCh&N5jmtGA1;zv( zude@_T!uT>DG-6bg5vP9ly_9Q3NKod0*e+nVS5`v7F=HcEPT5=TJBd6B;yC#lY(sS z$bo}ts@vmA`#2>%V@CdK{-xS~1rfKi%x69GkBy76n$gM5$L{T4Wr}Z|&s{rO;OnV7 zzQvJ#_^i4XX`b}eQ;yWjD-C;p`orw!SLBNCw_$-)WKPc^133QHsmT?~`Z}VsYlAzn z_g~KFd}cnM_9b?-J8PwyCbwVA>s;AZwtwR7Kx?MlQYt)j?}M$-GvantI`_=0UHw1z CQVEm* literal 0 HcmV?d00001 diff --git a/lang/de/lang.php b/lang/de/lang.php index f53d96b..0bf2a9f 100644 --- a/lang/de/lang.php +++ b/lang/de/lang.php @@ -1,2 +1,2 @@ Date: Wed, 8 Jan 2025 21:35:11 +0100 Subject: [PATCH 02/31] adaptations to new plugin name --- Plugin.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugin.txt b/Plugin.txt index 2317f41..e33bb9f 100644 --- a/Plugin.txt +++ b/Plugin.txt @@ -51,8 +51,8 @@ After installation you'll find a new button at the end of your regular toolbar. * Icon path fixed * **2019-01-19** * Update plugin name and id - * **2019-01-16** - * Fork from [codebutton](https://www.dokuwiki.org/plugin:codebutton) + * **2025-01-08** + * Fork from [codebutton](https://www.dokuwiki.org/plugin:codebuttonmod2) === Known Bugs and Issues === From 7bc0ac2c98fbd9384881a3879086482e23b125d6 Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Wed, 8 Jan 2025 21:36:16 +0100 Subject: [PATCH 03/31] adaptations to new plugin name --- Plugin.txt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Plugin.txt b/Plugin.txt index e33bb9f..bf21e33 100644 --- a/Plugin.txt +++ b/Plugin.txt @@ -1,12 +1,12 @@ -====== CodeButton Mod 1 Plugin (codebuttonmodbash) ====== +====== CodeButton Mod bash Plugin (codebuttonmodbash) ====== ---- plugin ---- description: Inserts a bash code button into the toolbar. -author : Georg Schmidt -email : gs-develop@gs-sys.de +author : Simon Jacob +email : dev@unimetal.me type : action -lastupdate : 2021-01-09 -compatible : 2018-04-22b +lastupdate : 2025-01-08 +compatible : 2024-02-06b depends : similar : codebutton, custombuttons tags : button, code, toolbar, bash @@ -47,9 +47,7 @@ After installation you'll find a new button at the end of your regular toolbar. * Heiko Barth (Original) [[https://github.com/casperklein/dokuwiki_plugin_codebutton|Plugin on GitHub]] === Change Log === - * **2021-01-09** - * Icon path fixed - * **2019-01-19** + * **2025-01-08** * Update plugin name and id * **2025-01-08** * Fork from [codebutton](https://www.dokuwiki.org/plugin:codebuttonmod2) From e4091307a2c4b280fbd6533e0acab94e7f974707 Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Wed, 8 Jan 2025 21:38:22 +0100 Subject: [PATCH 04/31] Added Name --- action.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.php b/action.php index 579e0b6..971dad4 100644 --- a/action.php +++ b/action.php @@ -2,7 +2,7 @@ /** * Action Plugin: Inserts a button into the toolbar to add file tags * - * @author Georg Schmidt, Heiko Barth + * @author Simon Jacob, Georg Schmidt, Heiko Barth */ if (!defined('DOKU_INC')) die(); From 3ffa6eb615b5235f5f3240445e6d27809dd72305 Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Wed, 8 Jan 2025 21:47:21 +0100 Subject: [PATCH 05/31] adaptations --- README.MD | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.MD b/README.MD index d4fdbb9..21cb3d8 100644 --- a/README.MD +++ b/README.MD @@ -1,4 +1,4 @@ -# CodeButtonMod 1 Plugin - Toolbar Code Button +# CodeButtonModBash Plugin - Toolbar BCode Button @@ -10,7 +10,7 @@ In the default toolbar there is no code button available. This plugin will add o **Mod 1 version:** -Search and install "codebuttonmod1" +Search and install "codebuttonmodbash" or @@ -31,11 +31,11 @@ https://github.com/AnonTester/dokuwiki_plugin_codebutton/archive/master.zip **Orginal Version:** -Search and install "codebutton" +Search and install "codebuttonmod1" ### Author - -- Georg Schmidt (Mod 1) [Plugin on GitHub](https://github.com/user9209/dokuwiki_plugin_codebutton) +- Simon Jacob (Mod Bash) [Plugin on GitHub](https://github.com/unimetal/dokuwiki_plugin_codebuttonmodbash) +- Georg Schmidt (parts of Mod 1) [Plugin on GitHub](https://github.com/user9209/dokuwiki_plugin_codebutton) - Heiko Barth (Original) [Plugin on GitHub](https://github.com/casperklein/dokuwiki_plugin_codebutton) ### Mod 1 contains From 51556cd70ecc49b2fd8b38353bc322a348a4fe19 Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Wed, 8 Jan 2025 22:26:33 +0100 Subject: [PATCH 06/31] ref https://www.dokuwiki.org/devel:action_plugins#sampleadd_toolbar_button --- action.php | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/action.php b/action.php index 971dad4..55aec91 100644 --- a/action.php +++ b/action.php @@ -1,33 +1,41 @@ register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array ()); + public function register(EventHandler $controller) { + $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', []); } /** * Inserts the toolbar button + * + * @param Event $event event object + * @param mixed $param [the parameters passed as fifth argument to + * register_hook() when this handler was registered, + * here just an empty array..] */ - function insert_button(& $event, $param) { - $event->data[] = array ( + public function insert_button(Event $event, $param) { + $event->data[] = [ 'type' => 'format', 'title' => $this->getLang('insertcodebash'), - 'icon' => '../../plugins/codebuttonmodbash/image/codebash.png', - 'open' => '\n', + 'icon' => '../../plugins/codebuttonmodbash/codebash.png', + 'open' => '\n', 'close' => '\n', - ); + ]; } } From c7f2541a5cf03dee06050d4678cfd6ca4e6d46e3 Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Wed, 8 Jan 2025 22:28:30 +0100 Subject: [PATCH 07/31] ref https://www.dokuwiki.org/devel:action_plugins#sampleadd_toolbar_button --- image/codebash.png => codebash.png | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename image/codebash.png => codebash.png (100%) diff --git a/image/codebash.png b/codebash.png similarity index 100% rename from image/codebash.png rename to codebash.png From b67d2c397782d914fb25370303ddf7196199e266 Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Wed, 8 Jan 2025 22:29:17 +0100 Subject: [PATCH 08/31] ref https://www.dokuwiki.org/devel:action_plugins#sampleadd_toolbar_button --- image/code.png | Bin 677 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 image/code.png diff --git a/image/code.png b/image/code.png deleted file mode 100644 index 71a51b71c2d00e4275ebaaa31f91cdf120f4f4e3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 677 zcmV;W0$TlvP)_rspLGV_DDpb5lh2#(sMDXN) zAVrJEih`it1hELq?!oM4^RY>Gcbu8*Zkqb}!kcAx=J~zvb`_5o62!kMCze~Q(s@3WvzITSFB6T|e=Y_b{YO!{^ou=!$tkGyN z%d#ZIG)-2k)lx_zCITQfbh};F>-FSQr003eaU5pbwghxK9VUv@>vahs0>IBN0Oy=` ze=DQ1^srGB$pTym4n?6*82d9+Rh?Ipm+Xm3?%rz$ZV=(|<^8z1;UEi!m4zHKDuu4= z;GIaQ02+odgovN=>c?VfT3aWSfOdvJ8ZoFk!P=&Wm5VuKbyakVFbqNI$SCFP{jXQg z%o*Ryv&FLKhPZoapIo@JuosROf@r|)mrZPZ@^8D3&WZ*lvJ>lLRk5cM&l~Ru_;I@Znwa`WLh37j;S>zH(qS0=Zyu;rbf~c~!x- z-N)j|3^bKUfTAcVK)Nuq^mh92A$@c1v{ClC@ac^sxc1z_o(XQV7hrAi0P>Sc>P+l_ zbU}Xo_H6#g`zK4c&>(7;2c6AEr1oS00000 LNkvXXu0mjfXi7b4 From b92bccc8bac940585438b0a5e76843c74d7d2d28 Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Wed, 8 Jan 2025 22:35:11 +0100 Subject: [PATCH 09/31] adapted to new example --- action.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.php b/action.php index 55aec91..577e342 100644 --- a/action.php +++ b/action.php @@ -7,7 +7,7 @@ /** * Action Plugin: Inserts a button into the toolbar to add file tags * - * @author Simon Jacob, Georg Schmidt, Heiko Barth + * @author Simon Jacob, Gina Haeussge */ class action_plugin_codebuttonmodbash extends ActionPlugin { From adc44791a683a4fc490376dad65c9ac2fa702833 Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Wed, 8 Jan 2025 22:48:26 +0100 Subject: [PATCH 10/31] adapted to template --- Plugin.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Plugin.txt b/Plugin.txt index bf21e33..49da78f 100644 --- a/Plugin.txt +++ b/Plugin.txt @@ -1,4 +1,4 @@ -====== CodeButton Mod bash Plugin (codebuttonmodbash) ====== +====== codebuttonmodbash Plugin ====== ---- plugin ---- description: Inserts a bash code button into the toolbar. @@ -11,7 +11,7 @@ depends : similar : codebutton, custombuttons tags : button, code, toolbar, bash -downloadurl: https://github.com/unimetal/dokuwiki_plugin_codebuttonmodbash/archive/master.zip +downloadurl: https://github.com/unimetal/dokuwiki_plugin_codebuttonmodbash/zipball/master bugtracker: https://github.com/unimetal/dokuwiki_plugin_codebuttonmodbash/issues sourcerepo: https://github.com/unimetal/dokuwiki_plugin_codebuttonmodbash donationurl: @@ -54,4 +54,11 @@ After installation you'll find a new button at the end of your regular toolbar. === Known Bugs and Issues === - * not yet known \ No newline at end of file + * CAUTION - NOT TESTED YET - DO NOt iNSTALL + +=== ToDo/Wish List === + + * Settings file to edit bash string + +===== FAQ ===== + From 1403c4d83bd20a9f93f104194ef64844f548585a Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Wed, 8 Jan 2025 22:50:09 +0100 Subject: [PATCH 11/31] forgot adaptations --- Plugin.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugin.txt b/Plugin.txt index 49da78f..c12db2c 100644 --- a/Plugin.txt +++ b/Plugin.txt @@ -31,7 +31,7 @@ https://github.com/unimetal/dokuwiki_plugin_codebuttonmodbash/archive/master.zip ===== Syntax and Usage ===== -After installation you'll find a new button at the end of your regular toolbar. Use them to add "''Insert_Code''" to your DokuWiki markup. +After installation you'll find a new button at the end of your regular toolbar. Use them to add "''Insert_Code''" to your DokuWiki markup. === Mod bash contents === * Default title is set to "$this->getLang('insertcode')" From 9940594ea4c1abd196855dd97867bf1374a8e3a9 Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Wed, 8 Jan 2025 22:52:45 +0100 Subject: [PATCH 12/31] adapt readme --- README.MD | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.MD b/README.MD index 21cb3d8..404a722 100644 --- a/README.MD +++ b/README.MD @@ -38,9 +38,11 @@ Search and install "codebuttonmod1" - Georg Schmidt (parts of Mod 1) [Plugin on GitHub](https://github.com/user9209/dokuwiki_plugin_codebutton) - Heiko Barth (Original) [Plugin on GitHub](https://github.com/casperklein/dokuwiki_plugin_codebutton) -### Mod 1 contains +## Mod bash contents +- Default title is set to "$this->getLang('insertcode')" +- code.png icon replaced with -- Default **title** is set to "download" +### parts from Mod 1 - *file* has been replaced by **code** - *Placeholder text* can select by a **single double click**. - **plugin.info.txt** for easy setup using a named zip file From d067400e2476a6fc8905f096499d2594dadc0f86 Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Wed, 8 Jan 2025 22:53:44 +0100 Subject: [PATCH 13/31] replacements --- README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.MD b/README.MD index 404a722..82221aa 100644 --- a/README.MD +++ b/README.MD @@ -8,7 +8,7 @@ In the default toolbar there is no code button available. This plugin will add o ### Install -**Mod 1 version:** +**Mod bash version:** Search and install "codebuttonmodbash" From 3f21791562ab2a491a0e470b741e1cf5c94983be Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Wed, 8 Jan 2025 22:55:15 +0100 Subject: [PATCH 14/31] edits --- Plugin.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugin.txt b/Plugin.txt index c12db2c..09514ae 100644 --- a/Plugin.txt +++ b/Plugin.txt @@ -27,7 +27,7 @@ or Install the plugin over the webfrontend by using the url: -https://github.com/unimetal/dokuwiki_plugin_codebuttonmodbash/archive/master.zip +https://github.com/unimetal/dokuwiki_plugin_codebuttonmodbash/zipball/master ===== Syntax and Usage ===== From 2d72780a100c589781d1ae12d4dfd9e706e61e7b Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Thu, 9 Jan 2025 03:12:12 +0100 Subject: [PATCH 15/31] updates --- Plugin.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Plugin.txt b/Plugin.txt index 09514ae..2c44dd1 100644 --- a/Plugin.txt +++ b/Plugin.txt @@ -35,6 +35,8 @@ After installation you'll find a new button at the end of your regular toolbar. === Mod bash contents === * Default title is set to "$this->getLang('insertcode')" + * using updated examples to create plugin + * new (green) icon === contents from Mod 1 === * file has been replaced by code From c838daa2c5a6fbfca28982c9989e0e885bd39862 Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Fri, 10 Jan 2025 17:20:00 +0100 Subject: [PATCH 16/31] Creating files for Settings --- conf/default.php | 7 +++++++ conf/metadata.php | 7 +++++++ lang/de/settings.php | 7 +++++++ lang/en/settings.php | 7 +++++++ 4 files changed, 28 insertions(+) create mode 100644 conf/default.php create mode 100644 conf/metadata.php create mode 100644 lang/de/settings.php create mode 100644 lang/en/settings.php diff --git a/conf/default.php b/conf/default.php new file mode 100644 index 0000000..a066ea7 --- /dev/null +++ b/conf/default.php @@ -0,0 +1,7 @@ + ...'; \ No newline at end of file diff --git a/lang/en/settings.php b/lang/en/settings.php new file mode 100644 index 0000000..d1c90a0 --- /dev/null +++ b/lang/en/settings.php @@ -0,0 +1,7 @@ + ...'; \ No newline at end of file From 3a039d02c17e2d80c6ee0f200a88e24fddff16bb Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Fri, 10 Jan 2025 17:27:58 +0100 Subject: [PATCH 17/31] include settings into action.php --- action.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/action.php b/action.php index 577e342..688c90f 100644 --- a/action.php +++ b/action.php @@ -30,11 +30,14 @@ public function register(EventHandler $controller) { * here just an empty array..] */ public function insert_button(Event $event, $param) { + + $codeStr = $this->getConf('codeStr'); + $event->data[] = [ 'type' => 'format', 'title' => $this->getLang('insertcodebash'), 'icon' => '../../plugins/codebuttonmodbash/codebash.png', - 'open' => '\n', + 'open' => '\n', 'close' => '\n', ]; } From 96f85aa79106cc7d91c47cd3549e96f459ec0c5e Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Fri, 10 Jan 2025 17:36:00 +0100 Subject: [PATCH 18/31] added changes in readme etc. --- Plugin.txt | 2 ++ README.MD | 3 ++- plugin.info.txt | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Plugin.txt b/Plugin.txt index 2c44dd1..b6a1e59 100644 --- a/Plugin.txt +++ b/Plugin.txt @@ -49,6 +49,8 @@ After installation you'll find a new button at the end of your regular toolbar. * Heiko Barth (Original) [[https://github.com/casperklein/dokuwiki_plugin_codebutton|Plugin on GitHub]] === Change Log === + * **2025-01-10** + * Added codeStr Parameter to modify ... in config. * **2025-01-08** * Update plugin name and id * **2025-01-08** diff --git a/README.MD b/README.MD index 82221aa..d5b5181 100644 --- a/README.MD +++ b/README.MD @@ -40,7 +40,8 @@ Search and install "codebuttonmod1" ## Mod bash contents - Default title is set to "$this->getLang('insertcode')" -- code.png icon replaced with +- code.png icon replaced with codebash.png +- Added codeStr Parameter to modify ... in config. ### parts from Mod 1 - *file* has been replaced by **code** diff --git a/plugin.info.txt b/plugin.info.txt index 940926e..a2c089b 100644 --- a/plugin.info.txt +++ b/plugin.info.txt @@ -3,5 +3,5 @@ author Simon Jacob email dev@unimetal.me date 2025-01-08 name Toolbar Code Button - Mod bash -desc Inserts a code button into the toolbar. +desc Inserts a code button into the toolbar with the possibility to modify code type in config. url https://www.dokuwiki.org/plugin:codebuttonmodbash From de8e0fcf73ef8cbf0512076fb7706345d617bc86 Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Fri, 10 Jan 2025 17:39:03 +0100 Subject: [PATCH 19/31] deleted todo --- Plugin.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugin.txt b/Plugin.txt index b6a1e59..23ee708 100644 --- a/Plugin.txt +++ b/Plugin.txt @@ -62,7 +62,7 @@ After installation you'll find a new button at the end of your regular toolbar. === ToDo/Wish List === - * Settings file to edit bash string + * Settings file to edit bash string ===== FAQ ===== From 5fdd19d3015782ed0101da252cd7181c37e9f7bf Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Fri, 10 Jan 2025 17:40:34 +0100 Subject: [PATCH 20/31] removed bugs info --- Plugin.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Plugin.txt b/Plugin.txt index 23ee708..8110270 100644 --- a/Plugin.txt +++ b/Plugin.txt @@ -58,11 +58,8 @@ After installation you'll find a new button at the end of your regular toolbar. === Known Bugs and Issues === - * CAUTION - NOT TESTED YET - DO NOt iNSTALL + * no known bugs === ToDo/Wish List === * Settings file to edit bash string - -===== FAQ ===== - From edc581cc9cfbeb812142e6324cd8a03bc40b283d Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Fri, 10 Jan 2025 17:59:43 +0100 Subject: [PATCH 21/31] show predefined value in editor --- lang/de/lang.php | 2 +- lang/de/settings.php | 2 +- lang/en/lang.php | 2 +- lang/en/settings.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lang/de/lang.php b/lang/de/lang.php index 0bf2a9f..f1b4074 100644 --- a/lang/de/lang.php +++ b/lang/de/lang.php @@ -1,2 +1,2 @@ ...'; \ No newline at end of file + $lang['codeStr'] = 'Definiere Wert für den Parameter codeStr, Standard = BASH '; \ No newline at end of file diff --git a/lang/en/lang.php b/lang/en/lang.php index 3f8efa2..482c5f7 100644 --- a/lang/en/lang.php +++ b/lang/en/lang.php @@ -1,2 +1,2 @@ ...'; \ No newline at end of file + $lang['codeStr'] = 'Define value of codeStr =codeStr, default = BASH '; \ No newline at end of file From 0e61f6907bb64cab236b0ace9d37b534d01d55e5 Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Fri, 10 Jan 2025 18:16:20 +0100 Subject: [PATCH 22/31] bugfix --- action.php | 3 ++- lang/de/lang.php | 2 +- lang/en/lang.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/action.php b/action.php index 688c90f..fcae4a8 100644 --- a/action.php +++ b/action.php @@ -32,12 +32,13 @@ public function register(EventHandler $controller) { public function insert_button(Event $event, $param) { $codeStr = $this->getConf('codeStr'); + $insert = $this->getLang('insert'); $event->data[] = [ 'type' => 'format', 'title' => $this->getLang('insertcodebash'), 'icon' => '../../plugins/codebuttonmodbash/codebash.png', - 'open' => '\n', + 'open' => $insert.': \n', 'close' => '\n', ]; } diff --git a/lang/de/lang.php b/lang/de/lang.php index f1b4074..e98fbe3 100644 --- a/lang/de/lang.php +++ b/lang/de/lang.php @@ -1,2 +1,2 @@ Date: Fri, 10 Jan 2025 18:18:57 +0100 Subject: [PATCH 23/31] bugfix --- action.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.php b/action.php index fcae4a8..2d801a3 100644 --- a/action.php +++ b/action.php @@ -35,10 +35,10 @@ public function insert_button(Event $event, $param) { $insert = $this->getLang('insert'); $event->data[] = [ - 'type' => 'format', + 'type' => $insert.': ...', 'title' => $this->getLang('insertcodebash'), 'icon' => '../../plugins/codebuttonmodbash/codebash.png', - 'open' => $insert.': \n', + 'open' => '\n', 'close' => '\n', ]; } From f7853ca9cf51c89d1258bdb90fd4d8a1f5c33a16 Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Fri, 10 Jan 2025 18:21:16 +0100 Subject: [PATCH 24/31] bugfix --- action.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.php b/action.php index 2d801a3..4c97788 100644 --- a/action.php +++ b/action.php @@ -35,8 +35,8 @@ public function insert_button(Event $event, $param) { $insert = $this->getLang('insert'); $event->data[] = [ - 'type' => $insert.': ...', - 'title' => $this->getLang('insertcodebash'), + 'type' => 'format', + 'title' => $insert.': ...', 'icon' => '../../plugins/codebuttonmodbash/codebash.png', 'open' => '\n', 'close' => '\n', From 6500a8e70acb46124aad333bbd95668654ce814c Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Fri, 10 Jan 2025 18:24:45 +0100 Subject: [PATCH 25/31] update flag --- plugin.info.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.info.txt b/plugin.info.txt index a2c089b..3a70d6e 100644 --- a/plugin.info.txt +++ b/plugin.info.txt @@ -1,7 +1,7 @@ base codebuttonmodbash author Simon Jacob email dev@unimetal.me -date 2025-01-08 +date 2025-01-10 name Toolbar Code Button - Mod bash desc Inserts a code button into the toolbar with the possibility to modify code type in config. url https://www.dokuwiki.org/plugin:codebuttonmodbash From 9655c228750050e8b4bbd0d51bf7c6ddb15c5f3a Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Fri, 10 Jan 2025 18:25:36 +0100 Subject: [PATCH 26/31] updated wiki text --- Plugin.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugin.txt b/Plugin.txt index 8110270..c5dced3 100644 --- a/Plugin.txt +++ b/Plugin.txt @@ -5,7 +5,7 @@ description: Inserts a bash code button into the toolbar. author : Simon Jacob email : dev@unimetal.me type : action -lastupdate : 2025-01-08 +lastupdate : 2025-01-10 compatible : 2024-02-06b depends : similar : codebutton, custombuttons From 64b8ae336f85f7f749f6e66ffa77216e34056577 Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Fri, 10 Jan 2025 18:32:30 +0100 Subject: [PATCH 27/31] Update README.MD update --- README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.MD b/README.MD index d5b5181..5995f5e 100644 --- a/README.MD +++ b/README.MD @@ -1,4 +1,4 @@ -# CodeButtonModBash Plugin - Toolbar BCode Button +# CodeButtonModBash Plugin - Toolbar to add bash Code Button From f3aa61ed957c02de3f978a200a27574f84eb533b Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Fri, 10 Jan 2025 18:55:09 +0100 Subject: [PATCH 28/31] Update Plugin.txt --- Plugin.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugin.txt b/Plugin.txt index c5dced3..8af16b5 100644 --- a/Plugin.txt +++ b/Plugin.txt @@ -44,7 +44,7 @@ After installation you'll find a new button at the end of your regular toolbar. * plugin.info.txt for easy setup using a named zip file === Author === - * Simon Jacob (Mod bash) [https://github.com/unimetal/dokuwiki_plugin_codebuttonmodbash|Plugin on GitHub] + * Simon Jacob (Mod bash) [[https://github.com/unimetal/dokuwiki_plugin_codebuttonmodbash|Plugin on GitHub]] * Georg Schmidt (Mod 1) [[https://github.com/user9209/dokuwiki_plugin_codebutton|Plugin on GitHub]] * Heiko Barth (Original) [[https://github.com/casperklein/dokuwiki_plugin_codebutton|Plugin on GitHub]] From 7f2e915143a7c57ff33a752ff52cc2fff0a1af2d Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Fri, 10 Jan 2025 21:35:50 +0100 Subject: [PATCH 29/31] replaced by --- Plugin.txt | 4 ++-- action.php | 4 ++-- conf/default.php | 2 +- lang/de/settings.php | 2 +- lang/en/settings.php | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Plugin.txt b/Plugin.txt index 8af16b5..7552ad0 100644 --- a/Plugin.txt +++ b/Plugin.txt @@ -31,7 +31,7 @@ https://github.com/unimetal/dokuwiki_plugin_codebuttonmodbash/zipball/master ===== Syntax and Usage ===== -After installation you'll find a new button at the end of your regular toolbar. Use them to add "''Insert_Code''" to your DokuWiki markup. +After installation you'll find a new button at the end of your regular toolbar. Use them to add "''Insert_Code''" to your DokuWiki markup. === Mod bash contents === * Default title is set to "$this->getLang('insertcode')" @@ -50,7 +50,7 @@ After installation you'll find a new button at the end of your regular toolbar. === Change Log === * **2025-01-10** - * Added codeStr Parameter to modify ... in config. + * Added codeStr Parameter to modify ... in config. * **2025-01-08** * Update plugin name and id * **2025-01-08** diff --git a/action.php b/action.php index 4c97788..e42787b 100644 --- a/action.php +++ b/action.php @@ -36,9 +36,9 @@ public function insert_button(Event $event, $param) { $event->data[] = [ 'type' => 'format', - 'title' => $insert.': ...', + 'title' => $insert.': ...', 'icon' => '../../plugins/codebuttonmodbash/codebash.png', - 'open' => '\n', + 'open' => '\n', 'close' => '\n', ]; } diff --git a/conf/default.php b/conf/default.php index a066ea7..c00b415 100644 --- a/conf/default.php +++ b/conf/default.php @@ -4,4 +4,4 @@ * */ -$conf['codeStr'] = 'BASH'; \ No newline at end of file +$conf['codeStr'] = 'bash'; \ No newline at end of file diff --git a/lang/de/settings.php b/lang/de/settings.php index c5bfc40..79823ea 100644 --- a/lang/de/settings.php +++ b/lang/de/settings.php @@ -4,4 +4,4 @@ * */ - $lang['codeStr'] = 'Definiere Wert für den Parameter codeStr, Standard = BASH '; \ No newline at end of file + $lang['codeStr'] = 'Definiere Wert für den Parameter codeStr, Standard = bash '; \ No newline at end of file diff --git a/lang/en/settings.php b/lang/en/settings.php index aa2c6c6..8bbeda3 100644 --- a/lang/en/settings.php +++ b/lang/en/settings.php @@ -4,4 +4,4 @@ * */ - $lang['codeStr'] = 'Define value of codeStr =codeStr, default = BASH '; \ No newline at end of file + $lang['codeStr'] = 'Define value of codeStr =codeStr, default = bash '; \ No newline at end of file From 832861436dfb5afa41e3c5cb37b508b46fcd3b87 Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Fri, 10 Jan 2025 21:36:26 +0100 Subject: [PATCH 30/31] removed wiki text --- Plugin.txt | 65 ------------------------------------------------------ 1 file changed, 65 deletions(-) delete mode 100644 Plugin.txt diff --git a/Plugin.txt b/Plugin.txt deleted file mode 100644 index 7552ad0..0000000 --- a/Plugin.txt +++ /dev/null @@ -1,65 +0,0 @@ -====== codebuttonmodbash Plugin ====== - ----- plugin ---- -description: Inserts a bash code button into the toolbar. -author : Simon Jacob -email : dev@unimetal.me -type : action -lastupdate : 2025-01-10 -compatible : 2024-02-06b -depends : -similar : codebutton, custombuttons -tags : button, code, toolbar, bash - -downloadurl: https://github.com/unimetal/dokuwiki_plugin_codebuttonmodbash/zipball/master -bugtracker: https://github.com/unimetal/dokuwiki_plugin_codebuttonmodbash/issues -sourcerepo: https://github.com/unimetal/dokuwiki_plugin_codebuttonmodbash -donationurl: - -screenshot_img : ----- - -===== Installation ===== - -Search and install the plugin **"codebuttonmodbash"** using the Extension Manager. - -or - -Install the plugin over the webfrontend by using the url: - -https://github.com/unimetal/dokuwiki_plugin_codebuttonmodbash/zipball/master - -===== Syntax and Usage ===== - -After installation you'll find a new button at the end of your regular toolbar. Use them to add "''Insert_Code''" to your DokuWiki markup. - -=== Mod bash contents === - * Default title is set to "$this->getLang('insertcode')" - * using updated examples to create plugin - * new (green) icon - -=== contents from Mod 1 === - * file has been replaced by code - * Placeholder text can select by a single double click. - * plugin.info.txt for easy setup using a named zip file - -=== Author === - * Simon Jacob (Mod bash) [[https://github.com/unimetal/dokuwiki_plugin_codebuttonmodbash|Plugin on GitHub]] - * Georg Schmidt (Mod 1) [[https://github.com/user9209/dokuwiki_plugin_codebutton|Plugin on GitHub]] - * Heiko Barth (Original) [[https://github.com/casperklein/dokuwiki_plugin_codebutton|Plugin on GitHub]] - -=== Change Log === - * **2025-01-10** - * Added codeStr Parameter to modify ... in config. - * **2025-01-08** - * Update plugin name and id - * **2025-01-08** - * Fork from [codebutton](https://www.dokuwiki.org/plugin:codebuttonmod2) - -=== Known Bugs and Issues === - - * no known bugs - -=== ToDo/Wish List === - - * Settings file to edit bash string From d72df6a8ad604e836cb38c95ac82daea5f77a8e9 Mon Sep 17 00:00:00 2001 From: unimetal <97829149+unimetal@users.noreply.github.com> Date: Fri, 10 Jan 2025 21:37:53 +0100 Subject: [PATCH 31/31] date --- plugin.info.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.info.txt b/plugin.info.txt index 3a70d6e..80772f3 100644 --- a/plugin.info.txt +++ b/plugin.info.txt @@ -1,7 +1,7 @@ base codebuttonmodbash author Simon Jacob email dev@unimetal.me -date 2025-01-10 +date 2025-01-10b name Toolbar Code Button - Mod bash desc Inserts a code button into the toolbar with the possibility to modify code type in config. url https://www.dokuwiki.org/plugin:codebuttonmodbash