MyBB Community Forums

Full Version: MyBB Plugins Explained
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'll be posting a some docs regarding MyBB plugins.

Part 1 - The Basics
[attachment=29050]

Part 2 - Hooks
[attachment=29051]

Part 3 - Templates
[attachment=31261]

Part 4 - Database

Part 5 - Language Files
I'll grab a copy as well. Thanks Pirata.
First post updated.
Updated Basics.pdf and Hooks.pdf - both contain more information and an example.
Please feel free to point out any errors/mistakes. I'll start working on the next document.
Thanks a lot for sharing this, it'll come in handy.
Corrected Hooks.pdf and added Templates.pdf
You have to add on templates this task.

When you want to add a group of templates you have to add this:

	//Adding new group
	$templategrouparray = array(
		'prefix' => 'prefix_templates',
		'title'  => 'My plugin'
	);
	$db->insert_query("templategroups", $templategrouparray);

And then for examle a temlate have to be.

        // Adding new temlpate for my grouped templates
	$templatearray = array(
		'title' => 'prefix_templates_mytemplate',
		'template' => "Here the content of your entire template",
		'sid' => '-2'
		);	
	$db->insert_query("templates", $templatearray);

Only changes sid to -2 and prefix of any template you made xD.

Hope it helps to add more things on new plugins.
Thank you for your suggestion. I personally believe new developers should focus on simple things first. Then they can improve what they've made so starting by just creating, using and removing templates is, in my opinion, the best place to start, rather than creating groups for them Smile
Yes, you're right xD.

Then i help on lang files on single ways to use on plugins and maybe some database sentences but as you say the best way to learn is from basic things and next can use more improvements.

I made some tutorials to do plugins but in basically ways to do it, i have more complex examples, but i don't share because nobody interests on made plugins unfortunatelly Sad, or maybe they know how to do it.
part 4 and 5?
Pages: 1 2