SimplePortal

Development => Bugs => Fixed or Bogus Bugs => Topic started by: ccbtimewiz on September 12, 2011, 08:27:41 PM

Title: PHP Block that accepts multiple instances of PHP
Post by: ccbtimewiz on September 12, 2011, 08:27:41 PM
Refer to: http://simpleportal.net/index.php?topic=9649.0

There should be a way to write instances of PHP inside of an already-prepared HTML block, such as:

Code: [Select]
<div id="header">
<strong>This is some html code, <?=$context['user']['name']; ?>!</strong>
</div>

There is obviously a workaround to doing this, but this *should* work.
Title: Re: PHP Block that accepts multiple instances of PHP
Post by: [SiNaN] on September 14, 2011, 07:49:38 AM
We use eval() for the custom PHP blocks. With eval() although you can leave the PHP mode using the PHP closing that, the code should start with either PHP opening tag or PHP code; it can't be HTML. That's the limitation of eval(). I think at some point, we'll keep custom PHP block codes in files and display them by using output buffering.
SimplePortal 2.3.8 © 2008-2024, SimplePortal