Page 1 of 1

Not executing PHP code

Posted: 18. April 2010 15:38
by xTz
Your Portal Version: 1.0.5
Your phpBB Type: Standard phpBB3
MODs installed: Yes
Your knowledge: Basic Knowledge
Boardlink: http://Techn0.eu

MySQL Version: MySQL(i) 5.0.37-log

What have you done before the problem was there?


What have you already tryed to solve the problem?


Description and Message
Hi guys,

I am trying to implement a modification in the portal and for that - I need a PHP script to fill me a table in the center of the portal. I am trying to modify the following file:
portal_root/styles/acidtech/template/portal/block/announcements.html
But it doesn't want to execute ANY PHP script inside. It executes the HTML part and just does not run the PHP one. The script is tested and it's working correctly. But that's not the issue, id doesn't want to execute even phpinfo(); for testing purposes. No PHP code is executed from this file. Does anyone know why?

Re: Not executing PHP code

Posted: 18. April 2010 16:05
by Marc
That's because phpBB does not execute PHP code inside HTML files. Maybe this helps you:
viewtopic.php?f=21&t=310

Re: Not executing PHP code

Posted: 18. April 2010 18:15
by xTz
Oh, okay, thanks. I got it already fpr the block, this just helps me create it the right way. But, it still does not solve the issue with the PHP code :(
Any way to override that?

Re: Not executing PHP code

Posted: 18. April 2010 21:18
by Marc
I updated the article for Board3 Portal 1.0.5:
knowledge/kb_show.php?id=51

Re: Not executing PHP code

Posted: 19. April 2010 21:55
by xTz
Wouldn't do me any good, I've already done that the updated way, but thanks for the efforts anyway.
It appeared, that what I needed is described here:
http://www.velvetblues.com/web-developm ... templates/

Re: Not executing PHP code

Posted: 20. April 2010 00:04
by Marc
Did you take a look at the bottom part where I tell you how you execute PHP code for your block?

Anyhow, if the PHP Code writes the table and you don't know how to write it for phpBB, it's probably better if you do it the way it is described in that link.

Re: Not executing PHP code

Posted: 21. April 2010 02:55
by xTz
Yes, I did. And yes - the PHP code writes the table. I guess it is possible to be done in your way, but then it has to be done the phpBB way - setting template variables etc., which seems to be a lot of work for what I need to be done :mrgreen: