MyBB Community Forums

Full Version: How can I use php tags in the templates?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to do

<div class="logo">
<a href="{$mybb->settings['bburl']}/index.php"><img src="{$mybb->settings['bburl']}<?php include /php/randomImage.php; ?>" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /> </a></div>
How can I add that in?
Is that the only way?
Ok, so I can edit global.php and call stuff from it using {$varNameHere}?
If you're using ranjani's trick then you can include that php file directly into your template.
And if you're using the link I mentioned then can use it like the way you're saying. Smile
Thank you both very much, one last question tho. Which way is best in your opinions?
Either of these Wink
Ah, thanks again to you both, I just edited global.php so I can make it easier Toungue