MyBB-Plugins Forums

Full Version: Help for a new developer
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm a new plugin developer and I understand most of the stuff but some thing are really confusing to me. One of them is templates. What exactly are templates? Like I know you can create them but that's all. Also how do variables in templates work? Do they get passed in automatically? Also if I wanted for example to add a button to every thread in showthread.php how would I got about it? Also how to get for example the thread id? Is there a public resource where I can see how to get all the parameters of a page or all the globals and their parameters?? Also what is a breadcrumb? And I'm reading this page and idk why did they put this in: 
PHP Code:
eval('$sections  = "' $templates->get('hello_world_template') . '";'); 

thanks in advance

Templates are HTML blocks. Basically, they're evaluated into variables. And they may also contain other variables. So if you look at the 'index' template, it has several variables that will correspond to other templates if you search for those variables in the 'index.php' file.

Look at -> eval() to understand how it works.