Page 1 of 1

php on welcome Block

Posted: 26. February 2009 14:10
by webslug
Your Portal Version: 1.0.0RC3
Your phpBB Type: Standard phpBB3
MODs installed: No
Your knowledge: Beginner

What have you done before the problem was there?


What have you already tryed to solve the problem?


Description and Message
Hi,

I've installed Board3 and its awesome

Its a stupid question but can I add my own HTML and PHP to the Welcome Box?

Which file do I need to edit to go about this. Can it only be done purely through the ACP?

Thanks in advance.

Re: Portal

Posted: 26. February 2009 23:35
by Marc
If you want to add your own html, you could edit the welcome.html in your styles/prosilver/template/portal/block/ folder.
But you could also use BBCode, since it basically does the same as html code.

Re: Portal

Posted: 4. March 2009 12:31
by webslug
Ok thanks, expanding on this.

I've added the following line to the .htaccess file to allow PHP in HTML files in the root folder.

AddType application/x-httpd-php .html .htm


However it doesn't seem to be working when I use the <? echo ("hello"); ?> statement in the welcome.html file.

Do I need to create a .htaccess within the template/portal/block/ to allow PHP to be used in this file.

Re: Portal

Posted: 4. March 2009 12:49
by Mike
You dont need any changes of your htaccess files. Just allow php in templates via ACP ;)
Server Config -> Security -> allow php in Templates...
I dont know the exactly wording in english cause i use another language pack ;)

Re: Portal

Posted: 4. March 2009 15:04
by webslug
Thanks it worked great although I had to enclose the PHP statements in the following. I thought I'd post it here to save somebody else some time.

Code: Select all

<!-- PHP -->
   echo ("test");
<!-- ENDPHP -->