MyBB Community Forums
Change language variable by plugin - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Development (https://community.mybb.com/forum-68.html)
+---- Thread: Change language variable by plugin (/thread-212497.html)



Change language variable by plugin - Krugerz - 2017-08-21

Hi,
Is there any way to change language variable (online_note in index) by plugin?


RE: Change language variable by plugin - .m. - 2017-08-21

can you tell us how does it appear now & what exactly you want to change ? btw, what is your forum url ?


RE: Change language variable by plugin - Krugerz - 2017-08-21

(2017-08-21, 01:23 PM).m. Wrote: can you tell us how does it appear now & what exactly you want to change ? btw, what is your forum url ?

I want to edit online_note by a plugin, I know I can do that manually in ACP but I need to that by a plugin.
I'm writing plugin on localhost, so I can't give you forum url.


RE: Change language variable by plugin - fizz - 2017-08-21

Could you not just hook in after it loads the variable and change it manually?
Something like
// hook
function myfunc()
{
        global $lang;

        if($lang->online_note) $lang->online_note = 'your special new text';
}