Warning: Declaration of action_plugin_blockquote::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /homepages/28/d368155305/htdocs/RYT/lib/plugins/blockquote/action.php on line 46

Warning: Declaration of action_plugin_columns::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /homepages/28/d368155305/htdocs/RYT/lib/plugins/columns/action.php on line 141

Warning: Declaration of action_plugin_logstats::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /homepages/28/d368155305/htdocs/RYT/lib/plugins/logstats/action.php on line 184

Warning: Declaration of action_plugin_orgapp::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /homepages/28/d368155305/htdocs/RYT/lib/plugins/orgapp/action.php on line 28

Warning: Declaration of action_plugin_pixshow::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /homepages/28/d368155305/htdocs/RYT/lib/plugins/pixshow/action.php on line 177

Warning: Declaration of action_plugin_wrap::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /homepages/28/d368155305/htdocs/RYT/lib/plugins/wrap/action.php on line 148

Warning: Cannot modify header information - headers already sent by (output started at /homepages/28/d368155305/htdocs/RYT/lib/plugins/blockquote/action.php:46) in /homepages/28/d368155305/htdocs/RYT/inc/auth.php on line 543

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/28/d368155305/htdocs/RYT/inc/parser/handler.php on line 1427

Warning: Declaration of syntax_plugin_wrap_div::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /homepages/28/d368155305/htdocs/RYT/lib/plugins/wrap/syntax/div.php on line 14

Warning: Declaration of syntax_plugin_wrap_div::render($mode, &$renderer, $indata) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /homepages/28/d368155305/htdocs/RYT/lib/plugins/wrap/syntax/div.php on line 14

Warning: Declaration of syntax_plugin_translate::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /homepages/28/d368155305/htdocs/RYT/lib/plugins/translate/syntax.php on line 154

Warning: Declaration of syntax_plugin_translate::render($mode, &$renderer, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /homepages/28/d368155305/htdocs/RYT/lib/plugins/translate/syntax.php on line 154

Warning: Declaration of syntax_plugin_vshare::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /homepages/28/d368155305/htdocs/RYT/lib/plugins/vshare/syntax.php on line 162

Warning: Declaration of syntax_plugin_vshare::render($mode, &$R, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /homepages/28/d368155305/htdocs/RYT/lib/plugins/vshare/syntax.php on line 162

Warning: Cannot modify header information - headers already sent by (output started at /homepages/28/d368155305/htdocs/RYT/lib/plugins/blockquote/action.php:46) in /homepages/28/d368155305/htdocs/RYT/inc/actions.php on line 217
wiki_plugin_development [Redesign Your Town]

Redesign Your Town

Urban Regeneration in Four European Countries

User Tools

Site Tools


wiki_plugin_development

Translate Plugin Development

In order to make the wiki easier to use, I've developed a new dokuwiki plugin whitch I'm going to introduce you. As you know, In the wiki there is a page for glossaries where students translate common words for different situations. Then, they record themselves saying that words so the rest can hear the correct pronunciation. And lastly, they edit the glossaries and use a special tag (mp3play) to insert the sound player. That is really cool and useful, but we needed to do something more interactive.

The idea was to allow the editors of the page to use a new tag in the wiki editor, just as they use one to insert the sound. But this one will work different. Maybe yoy have seen some pages where, if you place the mouse over some word or content, a small tooltip is showed with useful information (or not). That was what we wanted to do, but with the recoded translation instead of the info. That is to say, a tag that means a word in which you place the mouse over and a tooltip is shown with the recorded translation. And that is what I did.

The plugin is really easy to use. Just open a page for editing as you usually do, and write the tag with the following syntax:

{{translate>words||mp3_file}}

For the mp3 file, you must insert the direction just like with mp3play plugin. At the end, It will look like this

Hello
Hello:

:


Hello World!
Hello World!:


I've made a little video showing the process. It doesn't have audio, but I think It's self-explanatory.


When you're using the plugin is important to be careful. By desing, this plugin can't be included in things like headers. It will simply not work, or even It could break the page design. Always remember that the preview feature is your friend.


This is everything for now. I'm currently working to use the plugin for even more amazing things, but for the moment this is all I can show you. I hope you'll find it useful. See you soon.

By Ángel García Jiménez (Kamisama666)

TOP

wiki_plugin_development.txt · Last modified: 2014/10/15 22:38 by antony