Re: [Tiki-devel] Indentation plugin
Volker Wysk <post-hhF2Jplw28UoZk/[email protected]>
| Newsgroups | gmane.comp.cms.tiki.devel |
|---|---|
| Message-ID | <[email protected]> |
Am Sonntag, dem 12.12.2021 um 12:27 +0000 schrieb Jonny Bradley via TikiWiki-devel: > Hi Volker > > Good stuff, you know you can make a draft merge request on gitlab and we > could discuss it there, but here's good too! > > Re the undocumented properties: > > > 'introduced' => 24, > > As you guessed, is the Tiki version it first appeared in, so 24 for this > is good. > > > 'filter' => 'wikicontent', > > is which filter is applied to the input data, and wikicontent is probably > fine here, it means anything you would put into a wiki page (but it would > be just text, a pagename or a username etc, again, probably not terribly > well documented) > > > 'tags' => [ 'basic' ], > > Is should the pref for this appear in basic, advanced or even experimental > views (in the control panels) - i'm not so sure that actually has much > effect on plugins these days... > > One that is missing is the 'format' property (which seems to be missing > from wikiplugin_div too). This defaults to 'wiki' but sometimes should be > set to 'html' if there is no further parsing of the output required, > whereas here you probably have more parsing to do on the $data in case > there is formatting or something to be done on what's being indented. But the 'format' property is there. Have you overlooked it? > > So good to go, i think, well done! > > Next, https://gitlab.com/tikiwiki/tiki/-/merge_requests/new :) This produces a "Page not found" error. I'm doing a merge request now. Cheers, Volker > > jonny > > > > > > > On 10 Dec 2021, at 17:56, Volker Wysk <post-hhF2Jplw28UoZk/[email protected]> wrote: > > > > Hi! > > > > I made a simple plugin, which allows for the indentation of arbitrary blocks > > of wiki content, not just inside of lists. It's a feature which MoinMoin > > has, which (it seems) is not present in Tiki so far. I'd like it to be > > included in Tiki 24. > > > > It's so small that I include it here: > > > > -----snip----- > > <?php > > // ... copyright notice ... > > function wikiplugin_indent_info() > > { > > return [ > > 'name' => tra('Indentation'), > > 'documentation' => 'PluginIndent', > > 'description' => > > tra('Indent a block of wiki content by one level.'), > > 'format' => 'wiki', > > 'prefs' => [ 'wikiplugin_indent' ], > > 'body' => tra('Wiki content (text) that is to be indented.'), > > 'introduced' => 24, > > 'filter' => 'wikicontent', > > 'tags' => [ 'basic' ], > > 'params' => [ ], > > ]; > > } > > > > function wikiplugin_indent($data, $params) > > { > > return "<ul><li style=\"list-style-type:none\">$data</li></ul>"; > > } > > -----snip----- > > > > I've taken PluginSup as a starting point. > > > > Now there are two points which need to be addressed before I can do a merge > > request. > > > > - Please have a look at the plugin properties (above). The properties > > 'introduced', 'filter' and 'tags' are guesswork. I've taken them from > > PluginSup. They aren't documented in any of these places: > > > > https://dev.tiki.org/Hello+World#To_create_a_new_plugin > > https://dev.tiki.org/Code-Howto%3A-Create-a-Wiki-Plugin > > > > - I'd like the wikiplugin_indent to be enabled by default. Is this okay? > > > > > > Cheers, > > Volker > > _______________________________________________ > > TikiWiki-devel mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel > > > _______________________________________________ > TikiWiki-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel _______________________________________________ TikiWiki-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE6QXGh82Ov3+2nrxp+K4ydFOsHoUFAmG2HRcACgkQ+K4ydFOs HoXmsA/+KzCkvEadtYuoQWbtA2EfULhEl6T4XYbYjo9Lsd1GyQYpnoktxGc3UIYO 9kuImQEg8f3p5Pl2XCh5SeUaueRZLYKs0PaTAD/Q7XMqeD1P1ATBpCnx0sNAbibM cQwjiQJ6AItJH/k3uS1BLVxq4Bw6mSCAgj10+XOzuSj7OYTE8YD/vn7gkTEnK4zm /qTRoy5TfiMmedW3EoPIQoKWgzriIC6p88yqp0Z5HgVsWf8jugg59DqM2OSKhZpl c+7/SNsaSof4kozOlRhM+X6yoIwhJcrSI0D5uIO5EaQkUqocigO1KQt9Yxpg5vxg ASk9tBPe6fRgY7Ww29LEiQpo04J45X+Z1wjtvCr2Ua5aCLbgSHs6uFHv4fv9liSr 3eALKjSThRRAk+rAQ+/fMRrVQ+7A+dKVwwnksb+eMDfZsuZ/Jh4WAj13+NY3UWwH PKRpW3Bk/zHoE8aaXsXxKjiec2q5c+Mdo88oyyWtvZNGRg7/ReYVvlHS6satRVrz FTJpa3iEm8IQxoqN9pWraP/0HQcZj2zYUnx38w4gRO8utKzjZtQCYHM2P0qONy7r 1PlPcXdxg8nTBsapJKpOzzTc5TkTSb/Q1OL4UNkUGfNInaXyhgu4r1lGsRMqjXaD 80m7YZ0Wctjuom5K2+75IiXqZ32HRb6G2HizXsjpW1gerHS0PQg= =jLPf -----END PGP SIGNATURE-----