2012-12-09, 03:42 PM
(This post was last modified: 2012-12-09, 03:44 PM by frostschutz.)
This user has been denied support.
(2012-12-09, 03:31 PM)RichardGv Wrote: There are some strings (messages shown to the user) in the plugin that should be translatable. Is there any guides that I could follow regarding handling of languages and translations in plugins? I don't want to make extra design mistakes.
You'd have to create a language file in inc/languages/<language>/ and use $lang->load() to load it when necessary. You should be aware that all language files share the same namespace (keys of a single array or object properties if you like), so your plugin name should be incorporated in the key somehow.
(2012-12-09, 03:31 PM)RichardGv Wrote: Is there a convenient function somewhere to insert a task?
Not that I know of, but I don't use tasks much. When I attempted to write my own captcha plugin (unfinished, I don't have a spam problem currently), I just hooked into MyBB's captcha and used MyBB's random image string as reproducable random number source for my own captcha so I got by without creating my own table / task for it. I still have the code somewhere if you're interested, but I can't vouch for its quality at all. It's a bit of a hack.
While on the topic of tasks, I'd allow more than just one hour of time. People leave their tabs open and forget about them, so... you could make it a setting
(2012-12-09, 03:31 PM)RichardGv Wrote: Then the MyBB Authoring Plugins page on wiki probably needs an update. It says I should insert settings from _install(), if I didn't misunderstand the whole thing.
That'd probably be what you'd do when not using PluginLibrary. When you don't have a method to update settings, you would end up removing and recreating everything anyway.