Re: [Tiki-devel] Indentation Plugin
luciash via TikiWiki-devel <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.devel |
|---|---|
| Message-ID | <[email protected]> |
Good idea! Feel free to edit and improve the wiki page on dev.tiki.org!
Thanks,
luci
On 19.05.2021 15:07, Volker Wysk wrote:
> Am Mittwoch, den 19.05.2021, 14:46 +0200 schrieb luciash via TikiWiki-devel:
>> Everything you put between {INDENT()}...{INDENT} is the body of your plugin.
> So it should read:
> 'body' => tra('Explain what the plugin does with its body')
>
> Bye
> Volker
>
>> luci
>>
>>
>>
>> On 19.05.2021 14:27, Volker Wysk wrote:
>>> Am Mittwoch, den 19.05.2021, 14:16 +0200 schrieb Volker Wysk:
>>>> Hi!
>>>>
>>>> I've followed Brendan's advice (in tikiwiki-users) and built an indentation
>>>> plugin. This was easy - I've taken the PluginSup as a starting point.
>>>> However, I couldn't find documentation for some of the output parameters in
>>>> the wikiplugin_indent_info() function. I've commented them out and it
>>>> appears to work fine:
>>> Um, I also don't know what that 'body' parameter does. The section in the
>>> Hello World page says:
>>>
>>> 'body' => tra('Explain what the body of the plugin does')
>>>
>>> But I don't understand this comment. What's the "body of the plugin"?
>>>
>>>
>>> Cheers,
>>> Volker
>>>
>>>> <?php
>>>> function wikiplugin_indent_info()
>>>> {
>>>> return [
>>>> 'name' => tra('Indentation'),
>>>> 'documentation' => 'PluginIndent',
>>>> 'description' => tra('Indent a text block'),
>>>> //'prefs' => [ 'wikiplugin_indent' ],
>>>> 'body' => tra('text'),
>>>> //'iconname' => 'superscript',
>>>> //'introduced' => 2,
>>>> //'filter' => 'wikicontent',
>>>> //'tags' => [ 'basic' ],
>>>> 'params' => [
>>>> ],
>>>> ];
>>>> }
>>>>
>>>> function wikiplugin_indent($data, $params)
>>>> {
>>>> return "<ul><li style=\"list-style-type:none\">$data</li></ul>";
>>>> }
>>>>
>>>>
>>>> (I've removed the copyright notice for clarity. The file is also attached,
>>>> with the copyright notice in place.)
>>>>
>>>> Now I'm wondering what those five unknown output parameters do. I think this
>>>> plugin should be included in the next Tiki release. Therefore I want to do
>>>> it right.
>>>>
>>>> I guess there must be documentation for them somewhere. I've found
>>>> documentation here:
>>>> http://dev.tiki.org/Hello+World#To_create_a_new_plugin . But it's
>>>> incomplete. Have I missed something?
>>>>
>>>> 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