Smarty 3 and {php} (General)
I had to scratch my head a bit to figure out why it stopped working, but then I realized I could do the same thing with this approach, and that it's actually a better way. Keep in mind you can use this same approach to assign all kinds of new Smarty variables depending on familiar PHP logic; e.g., an {$adsense} variable that is assigned only when certain conditions are met, or a greeting that displays only on holidays. Just sprinkle the Smarty variables in the tpl files and put all the logic for them in index.php.