php code in template file

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
User avatar
GoBieN
Registered User
Posts: 538
Joined: Fri Mar 05, 2004 5:22 pm
Location: Belgium
Contact:

php code in template file

Post by GoBieN » Fri Mar 05, 2004 5:33 pm

is it possible to use php code in a template file.

Here an example of my template file.

Code: Select all

<div align="center">
  <center>
  <table border="0" width="67%" id="AutoNumber1" style="border-collapse: collapse" cellpadding="0" cellspacing="0">
    <tr>
      <td width="20%">
      <p align="center">
      <img border="0" src="http://users.pandora.be/gobien/camino/eigen.jpg" width="400" height="300"></td>
      <td width="12%" align="center">
      <font color="#FFFF00" face="Verdana" size="2">
      <a href="#" target="_self" OnClick="window.open('http://ares.gobien.be:8080/php/camino/lijst/stem-new.php?id=een','STEM','width=300,height=250,scrollbars=0,location=0,toolbar=0');">
      <font color="#000080">STEM</font></a></font><font color="#000080"><br /><?php resultaat('een') ?></font></td>
    </tr>
</table>
</center>
</div>
so that is my entire template file, but this code "<?php resultaat('een') ?>" is not executed.

can it be done ?

PS: the function is defined

User avatar
AdamR
Former Team Member
Posts: 9731
Joined: Tue Mar 02, 2004 5:40 pm
Location: Tampa, Florida
Name: Adam Reyher
Contact:

Post by AdamR » Fri Mar 05, 2004 5:34 pm

Yes, it can be done. It requires a MOD though. Try this one:

http://www.phpbb.com/phpBB/viewtopic.php?t=125251
phpBB Support: Welcome | Userguide | Knowledge Base | Search
Honored supporter of the phpBB Group!
"If I have seen a little further it is by standing on the shoulders of Giants." - Isaac Newton

User avatar
GoBieN
Registered User
Posts: 538
Joined: Fri Mar 05, 2004 5:22 pm
Location: Belgium
Contact:

Post by GoBieN » Sat Mar 06, 2004 12:13 am

thx that did it :)

Locked

Return to “2.0.x Support Forum”