MyBB Community Forums

Full Version: PHP Help?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ok, I would like to understand something about PHP.

In admin control panels, for almost all PHP/MySQL based web applications, there are lots of little check boxes and options. In myBB as well. But, how do they work? Does it edit a text file that has the options in it? Or are the options stored in the database?

I know basic PHP stuff, and enough to make user registration scripts and stuff, but the Admin panels have always alluded me. How do you get the options there to edit a particular line in a script for setting them, or...what?

I hope this makes sense. I really want to start coding a very specialized mini-forum, and just trying to expand my PHP knowledge.
I can't understand what you're asking but I'll give it a go.

For constructing some of the radio/checkbox options, you have some predefined functions like
makeyesnocode('left side of table aka title', 'name_of_field', 'value of field');
makeonoffcode('left side of table aka title', 'name_of_field', 'value of field');
There are also functions for text inputs, textareas, and select menus.

The best idea would be to look at a particular page (eg editing a forum) and examine the code for that section.

The settings area of the admin CP comes from the database. Any settings you edit are updated in the db, and then a settings file (inc/settings.php) is made with the values you selected. The settings file is included with every page load and acts as a cache so MyBB doesn't have to query the database getting all the values every time.

Does this answer your question?
Cool, decswxaqz is back Big Grin
I think you should check this site out Click here to view site (Not a refferal link)
You will learn how to be a pro php scripter in less then a week.
decswxaqz Wrote:I can't understand what you're asking but I'll give it a go.

For constructing some of the radio/checkbox options, you have some predefined functions like
makeyesnocode('left side of table aka title', 'name_of_field', 'value of field');
makeonoffcode('left side of table aka title', 'name_of_field', 'value of field');
There are also functions for text inputs, textareas, and select menus.

The best idea would be to look at a particular page (eg editing a forum) and examine the code for that section.

The settings area of the admin CP comes from the database. Any settings you edit are updated in the db, and then a settings file (inc/settings.php) is made with the values you selected. The settings file is included with every page load and acts as a cache so MyBB doesn't have to query the database getting all the values every time.

Does this answer your question?

Ah, settings.php takes from the DB. Ok, that answers the question I had, thanks!

And thanks rcpalace, but I already have a 700 page book that tells me how to be a PHP programmer with MySQL, and I'm halfway done. Just asking about something that it didn't mention.