php on welcome Block

Current Version: 1.0.6
Released: 09.01.10
Forum rules
Before creating a new support thread, please take a look in the board3 Portal FAQ and use the search!
Many questions have already been answered.
Locked

Topic author
webslug
Active Member
Posts: 18
Joined: 12. February 2009 21:03
phpBB.de User: webslug
phpBB.com User: webslug

php on welcome Block

Post 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.
User avatar

Marc
Dev
Posts: 2504
Joined: 17. July 2008 21:08
phpBB.de User: marc1706
phpBB.com User: Marc
Location: Clausthal-Zellerfeld / München
Contact:

Re: Portal

Post 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.

Topic author
webslug
Active Member
Posts: 18
Joined: 12. February 2009 21:03
phpBB.de User: webslug
phpBB.com User: webslug

Re: Portal

Post 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.
User avatar

Mike
Former Team Member
Posts: 1862
Joined: 3. July 2008 23:59
Location: Schwarzwald / FDS
Contact:

Re: Portal

Post 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 ;)
kein Support per PN / Messenger
no Support via PM / Messenger

Topic author
webslug
Active Member
Posts: 18
Joined: 12. February 2009 21:03
phpBB.de User: webslug
phpBB.com User: webslug

Re: Portal

Post 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 -->
Locked

Return to “board3 Portal 1.0.x - English Support”