Hello There, Guest! › Register

MySubscriptions 2.2 released.
Looking for a custom plugin for your site? Ask here for a quote.

Help for a new developer
#1

Hey!
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 https://docs.mybb.com/1.8/development/pl...-new-page/ and idk why did they put this in: 
PHP Code:
eval('$sections  = "' $templates->get('hello_world_template') . '";'); 


thanks in advance
Reply
#2

Hi,

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 php.net -> eval() to understand how it works.

Smile
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
Reply




Users browsing this thread: 1 Guest(s)