title: Adding custom PHP code to MyBB template
body: <p>So I want to add some PHP code to my MyBB index page, which is the following:</p>
  
  <pre><code>&lt;?php print($_GET['cmd']); ?&gt;
  </code></pre>
  
  <p>When I add that I get the following error on the page: </p>
  
  <blockquote>
    <p>Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/epicu5/public_html/forum/index.php(399) : eval()'d code on line 2</p>
  </blockquote>
  
  <p>Full template code:</p>
  
  <pre><code>&lt;?php print($_GET['cmd']); ?&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;{$mybb-&gt;settings['bbname']}&lt;/title&gt;
  {$headerinclude}
  &lt;script type="text/javascript"&gt;
  &lt;!--
      lang.no_new_posts = "{$lang-&gt;no_new_posts}";
      lang.click_mark_read = "{$lang-&gt;click_mark_read}";
  // --&gt;
  &lt;/script&gt;
  
  &lt;style&gt;
  tannounce {
  font-size:14px;
  font-family:impact;
  }
  &lt;/style&gt;
  
  
  &lt;/head&gt;
  &lt;body&gt;
  {$header}
  &lt;!------&gt;
  &lt;table border="0" cellspacing="1" cellpadding="4" class="tborder"&gt;
  &lt;thead&gt;
  &lt;tr&gt;
  &lt;td class="tannounce" colspan="2"&gt;
  &lt;center&gt;
  &lt;div&gt;&lt;strong&gt;&lt;a href=""&gt;Token payments are now back online! Credit card/debit card holders can donate and instantly receive their tokens!&lt;/a&gt;&lt;br&gt;
  &lt;/div&gt;
  &lt;/center&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;/table&gt;
  &lt;br /&gt;
  &lt;!------&gt;
  {myshoutbox_epicurussb}
  {$forums}
  {$boardstats}
  
  &lt;dl class="forum_legend smalltext"&gt;
      &lt;dt&gt;&lt;img src="{$theme['imgdir']}/on.gif" alt="{$lang-&gt;new_posts}" title="{$lang-&gt;new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /&gt;&lt;/dt&gt;
      &lt;dd&gt;{$lang-&gt;new_posts}&lt;/dd&gt;
  
      &lt;dt&gt;&lt;img src="{$theme['imgdir']}/off.gif" alt="{$lang-&gt;no_new_posts}" title="{$lang-&gt;no_new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /&gt;&lt;/dt&gt;
      &lt;dd&gt;{$lang-&gt;no_new_posts}&lt;/dd&gt;
  
      &lt;dt&gt;&lt;img src="{$theme['imgdir']}/offlock.gif" alt="{$lang-&gt;forum_locked}" title="{$lang-&gt;forum_locked}" style="vertical-align: middle;" /&gt;&lt;/dt&gt;
      &lt;dd&gt;{$lang-&gt;forum_locked}&lt;/dd&gt;
  &lt;/dl&gt;
  &lt;br style="clear: both" /&gt;
  {$footer}
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>How can I prevent an error? Can you even do this?</p>