mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/16967] Remove support for INCLUDEPHP and PHP/ENDPHP in templates
PHPBB3-16967
This commit is contained in:
@@ -1302,24 +1302,6 @@ parent = prosilver</pre>
|
||||
<span class="comment"><!-- INCLUDE {$SOME_VAR} --></span>
|
||||
</pre></div>
|
||||
|
||||
<h4>PHP</h4>
|
||||
<p><strong class="error">The use of PHP in HTML files has been deprected in phpBB 3.3 and will be removed in phpBB 4.0.</strong></p>
|
||||
<p>A contentious decision has seen the ability to include PHP within the template introduced. This is achieved by enclosing the PHP within relevant tags:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
<span class="comment"><!-- PHP --></span>
|
||||
echo "hello!";
|
||||
<span class="comment"><!-- ENDPHP --></span>
|
||||
</pre></div>
|
||||
|
||||
<p>You may also include PHP from an external file using:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
<span class="comment"><!-- INCLUDEPHP somefile.php --></span>
|
||||
</pre></div>
|
||||
|
||||
<p>it will be included and executed inline.<br /><br />A note, it is very much encouraged that template designers do not include PHP. The ability to include raw PHP was introduced primarily to allow end users to include banner code, etc. without modifying multiple files (as with 2.0.x). It was not intended for general use ... hence <!-- w --><a href="https://www.phpbb.com">www.phpbb.com</a><!-- w --> will <strong>not</strong> make available template sets which include PHP. And by default templates will have PHP disabled (the admin will need to specifically activate PHP for a template).</p>
|
||||
|
||||
<h4>Conditionals/Control structures</h4>
|
||||
<p>The most significant addition to 3.x are conditions or control structures, "if something then do this else do that". The system deployed is very similar to Smarty. This may confuse some people at first but it offers great potential and great flexibility with a little imagination. In their most simple form these constructs take the form:</p>
|
||||
|
||||
|
Reference in New Issue
Block a user