[Tiki-devel] Indentation plugin

Volker Wysk <post-hhF2Jplw28UoZk/[email protected]>
Newsgroups gmane.comp.cms.tiki.devel
Message-ID <[email protected]>
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
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE6QXGh82Ov3+2nrxp+K4ydFOsHoUFAmGzlOMACgkQ+K4ydFOs
HoVG1xAA2KvpApob4ycVd7BSrTuvZWx4/Q+ob7yd3NiWXstQIDzLOP8bacYMNQpn
+qz5OwB0GCiCde6R5reMKjCrx4KBGU/BK1frrNUoCEm/oqm0rnjP8UodCaHzSxvv
gJ/6HMPvm/oda/h71NuRfPAWgLmlspdx0FKCM9HKLIinZH9OgX8UEO3d1F3dIWHA
RHp5YvDcqBud2s7B4Qt/pCgaIHw/jTJp2pky7RzKOD12Q8tnr7nZDMcGpH9sNCMV
PS+sc0NM8Fbb23ZhGxOW6bnnNzQ8AToEjbbVhUfKMhDkbUhwsYbPz1kENp10ZSAK
awtN8eL0jnff+EbjhK9Bpn/0cQwbyr5uFnouGCtPARefwL692VuYnjeHT9cH/jz2
9wplrv7eX3xaDk1FsGU7jGgwAAnB5vZ8OBqex4DE8UveVmjp0MhvSkgbPxHq8fuu
jF8eTPNVy90lQBbmqhoSPKicPo4/2KK6vKmPtahDAXQLcJuXf0FdUkst5pOoiJRU
BjTSqkF2RDsEbSBqYpD1Jc7MCqJru/16oFTVVygIXyA9osNM7u7OSQZ64ipGXlQm
QbpLdU7gV06B0D2UwX467RYYer3iw3Nb/ZW+XgmRSRjpfnQ+QsZFNNYqAIpsBoch
NV+IoJG5XWXADUMvMHEmuAZvhFxaKaxYm+ToEfKefaamhhK3XKw=
=nDVF
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.