SMFHacks.com
SMF Store => Support => Topic started by: shuban on January 10, 2017, 06:29:01 pm
-
Instead of using bbcode, I'd like to use PHP instead, is that possible?
-
Harder to do.
Would have to use the php eval() statement
-
Could you elaborate on this?
-
It's a lot of steps actually. Since you have to change the template from parse_bbc to eval then also remove the security checks/changes made in Store2.php for descriptions for adding/editing products.
-
I noticed that
'.parse_bbc(stripslashes($context['store_item']['description'])).'
Needs to be changed.
I'd like to do a test run where I manually added php code into the database of a product. But I'm not sure how to use:
ob_start();
eval("echo "Some awesome output. "");
$this_string = ob_get_contents();
ob_end_flush();
as suggested here: https://cgd.io/2008/how-to-execute-php-code-in-a-php-string/