PHP in OJS 3.1.2

Hello, I updated OJS yesterday to version 3.1.2. Before I could use {php} code in php {php} and it worked. How can I add php code now?
Thank you!

Hi @Medfac9,

Starting with OJS 3.1.2 we’re using version 3 of the Smarty templaate library, and embedding PHP is deprecated. The SmartyBC class (Chapter 19. SmartyBC - Backwards Compatibility Wrapper | Smarty) is available but not recommended. I’d suggest putting PHP code in classes rarher than templates.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Ahh Okay! Thank you!!!