Hey guys and gals,
I have a question that is bugging me because I can't seem to figure out how different php based applications achieve it (curiosity killed the cat right). My question is this, how does forum/cms/etc software utilize functions in their templates without using php code to wrap each function. For example, if you were to build a function in php it might look like so:
<html>
<body>
<?php
function writeName()
{
echo "Kai Jim Refsnes";
}
echo "My name is ";
writeName();
?>
</body>
</html>
(Credit to W3schools for this example)
But if you look at say phpbb in your template file you have all sorts of words wrapped in {}'s.....example:
<title>{SITENAME} • <!-- IF S_IN_MCP -->{L_MCP} • <!-- ELSEIF S_IN_UCP -->{L_UCP} • <!-- ENDIF -->{PAGE_TITLE}</title>
Joomla on the other hand uses kind of a <jdoc> include type function to bring pieces of its template together.
So my question remains how do they embed these kind of sub-languages into their php applications, is it through a second language like xml? javascript? etc? Or is it just a lesson I have failed see?