MyBB Central

Full Version: Plugin languages...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is PHP really the only language you need to know in order to write your own plugins?
How hard is it to learn PHP?
Depends how advanced a plugin you want to make. If you'll be doing database stuff you'll need at least basic SQL knowledge but that's pretty easy one you look at it.

PHP Code:
UPDATE `mybb_usersSET `usergroup` = '4' WHERE `uid` = '1'

Should be quite clear what that's doing. What sort of plugin are you thinking about??
UPDATE `mybb_users` SET `usergroup` = '4' WHERE `uid` = '1';

Would be

$db->update_query("users", array("usergroup" => "4"), "uid='1'");

Oddly the exact amount of character but the point is that it will use the $db class and be compatible with all the existing databases for MyBB.
Ya no clue what that code bit does/means. I really am starting off at the very bottom of the rung. However this was only a simple question. I don't really have any ideas for plugins nor wish to create any right now. I was simply curious about whether or not PHP was the basic language needed.

I do however have a question that is relevant to something current! lol
On WMM's web site he is using a plugin to highlight the quick reply box in red if the thread is closed.
My question is how you could do this without using a plugin. He highlighted the whole box around the input section.
I'd like to turn the BG of the input sections color for closed threads only. Is this possible through the templates and such?
If so I would love an explanation.