MyBB Community Forums

Full Version: A couple of questions:
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a few questions that i really need an answer to.
I create a new template, and within this template i specify two variables:

example:
<table>
<tr>
{$variable1}
{$variable2}
</tr>
</table>

Now how do i display a custom string for each of those variables. When displaying the template on the postbit. By echoing the whole template in one go, which brings me to the next question.

How can i grab that template and display it by using a variable in the postbit like:

{$postbitvariable}

To echo out the content of the template and also show the information of the previous mentioned variables.
I always thought you could hook the specific function to the correct hook. And after you would have done that you could in that function simply specify the variable for example:

function something_random()
{
      global $mybb, $db, $variable1;
    

      $variable1 = "some random string of information";
}

And then in the template connected with that hook simply specify the variable like:


bla bla bla <br />
{$variable1}