Page 1 of 1

Php in custom block

Posted: 10. July 2009 18:39
by Delano
Your Portal Version:
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, how i can input php code in custom block ?

I try paste this

Code: Select all

openside("www.wsei.edu.pl"); 
echo "<a href='http://www.wsei.edu.pl/'><img src='http://www.esmart.cal.pl/pliki/logowsei.gif'>"; 
echo "<br>"; 
closeside(); 
This is only check code, i wanna paste another code.. But i cant paste php.. I try with <php> but no effect..

Any1 can help ?[/i]

Re: Php in custom block

Posted: 12. July 2009 00:47
by Mike
Did you enable php in templates via ACP ?

Also read this: http://area51.phpbb.com/phpBB/viewtopic ... 993#p79993
Check the first Post for the word PHP

There is an explanation about how to use php in template files.

And here you will find a tutorial about this stuff...

;)

Re: Php in custom block

Posted: 12. July 2009 13:58
by Delano
I enable PHP in security, and paste this code:

Code: Select all

<!-- PHP -->
echo "hello!";
<!-- ENDPHP -->
but at custom block i have this:

Code: Select all

echo "hello!";
No php reading..

BTW theme Black Pearl..

Re: Php in custom block

Posted: 12. July 2009 17:09
by Mike
Delano wrote:I enable PHP in security, and paste this code:

Code: Select all

    <!-- PHP -->
    echo "hello!";
    <!-- ENDPHP -->
where did you paste the code?

Re: Php in custom block

Posted: 12. July 2009 21:00
by Delano
In Administrator Panel, Custom Block..

Re: Php in custom block

Posted: 13. July 2009 17:18
by Mike
Did you try to make your own custom block? I use php code too on my Portal, but not at the existing cutom block.... i use my own.
Knowledge Base: Adding Custom Blocks
Maybe this works...