Add php on template

Modifications for phpBB3.
Try the Mods here and share Your own Mods
Forum rules
You dont have to use ModX or make your mod AutoMod compatible. A simple textfile is fine
But if you post Mods here You also have to give support

Add php on template

Post by artikkk »

Hi
i would insert php code on my template.
I have actived php option from acp -> security




pagina1.html

Code: Select all

<?php
    define('IN_PHPBB', true);
    $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
    $phpEx = substr(strrchr(__FILE__, '.'), 1);
    include($phpbb_root_path . 'common.' . $phpEx);

    // Start session management
    $user->session_begin();
    $auth->acl($user->data);
    $user->setup();

    page_header('Title Here');

    $template->set_filenames(array(
        'body' => 'pagina1.html',
    ));


    make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
    page_footer();
?>
pagina1.html

Code: Select all

<!-- PHP -->
MY PHPCODE <!-- ENDPHP -->


<!-- INCLUDE overall_header.html -->








<h2>Title Here</h2>

<div class="panel">
   <div class="inner"><span class="corners-top"><span></span></span>

   <div class="content">
      <p>

MY HTML CODE
	<!-- PHP -->echo $risposta; <!-- ENDPHP -->
	
	</p>
   </div>

   <span class="corners-bottom"><span></span></span></div>
</div>

<!-- INCLUDE jumpbox.html -->
<!-- INCLUDE overall_footer.html -->
The problem is that

Code: Select all

<!-- PHP -->echo $risposta; <!-- ENDPHP -->
doesn't show...
Where is the problem?
Can anyone help me?
Sorry for my bad english :oops:

Add php on template

Post by artikkk »

Solved