From: Hamatoma Date: Sat, 15 Jun 2024 18:36:54 +0000 (+0200) Subject: V 0.4.5 Mediawiki: field area button X-Git-Url: https://gitweb.hamatoma.de/?a=commitdiff_plain;h=f1d070d0214f3e161d573079f9a6fdf02c531ead;p=gadeku.git V 0.4.5 Mediawiki: field area button - MediaWiki: - Funktion %field() Änderung Parameter - neu: %area()% - neu: %button()% --- diff --git a/CHANGELOG.md b/CHANGELOG.md index ead613f..5c4a55d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# V 0.4.5 Mediawiki: field area button + +- MediaWiki: + - Funktion %field() Änderung Parameter + - neu: %area()% + - neu: %button()% + # V 0.4.4 MediaWiki, PageController ## Added diff --git a/app/Helpers/MediaWiki.php b/app/Helpers/MediaWiki.php index 10dc483..67cb7bc 100644 --- a/app/Helpers/MediaWiki.php +++ b/app/Helpers/MediaWiki.php @@ -59,17 +59,50 @@ class MediaWiki extends MediaWikiBase $rc = '' . (count($matches) == 4 ? ($matches[2] . $matches[3]) : $matches[2]) . ''; break; case 'field': + // name | width | default | solution1 ; solution2... $name = $matches[2]; $value = ''; - $size = 8; + $width = 8; if (count($matches) > 3) { $parts = explode('|', substr($matches[3], 1)); - $value = $parts[0]; + $width = $parts[0]; if (count($parts) > 1) { - $size = $parts[1]; + $value = $parts[1]; } } - $rc = ""; + $rc = ""; + break; + case 'area': + // name | width | rows | default | solution1 ; solution2... + $name = $matches[2]; + $value = ''; + $width = 8; + $rows = 2; + if (count($matches) > 3) { + $parts = explode('|', substr($matches[3], 1)); + $width = $parts[0]; + if (count($parts) > 1) { + $rows = $parts[1]; + } + if (count($parts) > 2) { + $value = htmlentities($parts[2]); + } + } + $rc = ""; + break; + case 'button': + // name | label | classes | options + $name = $matches[2]; + $label = $name; + $classes = ''; + if (count($matches) > 3) { + $parts = explode('|', substr($matches[3], 1)); + $label = htmlentities($parts[0]); + if (count($parts) > 1) { + $classes = $parts[1]; + } + } + $rc = ""; break; case 'icon': $name = $matches[2]; diff --git a/composer.lock b/composer.lock index 9387e15..22d54a6 100644 --- a/composer.lock +++ b/composer.lock @@ -1056,7 +1056,7 @@ "dist": { "type": "path", "url": "../laraknife", - "reference": "4a3bfab6a713d8615bc3a37c2c30d8a1014b8b63" + "reference": "65bd270a461f140eef0da6d36786a0577eab3385" }, "require-dev": { "phpunit/phpunit": "11.0.x-dev" @@ -6854,16 +6854,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.20", + "version": "10.5.21", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "547d314dc24ec1e177720d45c6263fb226cc2ae3" + "reference": "ac837816fa52078f7a5e17ed774f256a72a51af6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/547d314dc24ec1e177720d45c6263fb226cc2ae3", - "reference": "547d314dc24ec1e177720d45c6263fb226cc2ae3", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ac837816fa52078f7a5e17ed774f256a72a51af6", + "reference": "ac837816fa52078f7a5e17ed774f256a72a51af6", "shasum": "" }, "require": { @@ -6935,7 +6935,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.20" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.21" }, "funding": [ { @@ -6951,7 +6951,7 @@ "type": "tidelift" } ], - "time": "2024-04-24T06:32:35+00:00" + "time": "2024-06-15T09:13:15+00:00" }, { "name": "sebastian/cli-parser",