Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: txp PHP does not output
towndock wrote #319604:
Could you explain how to register php functions in advanced prefs? (I can’t find this in the docs)
I do indeed have a site with complex calculations. I’m unable to determine a way that doesn’t involve a second pass to display some of our content.
Sure, though this will only help with simple one-line calculations. Go to Preferences/Admin pane, switch Advanced options on and save. You will then gain access to Advanced options pane, where you will find PHP functions enabled in txp:evaluate pref. Its help is rather terse, so don’t hesitate to post your calculations here if needed.
Offline
Re: txp PHP does not output
Now <txp:php /> should work (almost) as before in dev branch, testers welcome. Article context is preserved on second+ passes, so users without php rights should not be able to bypass this restriction any more.
An extra bonus is that (mistyped) things like
<txp:article_custom id="1,2,3" break=",">
<txp:variable name="id" value="<txp:article_id />" />
<txp:variable name="id" />
</txp:article_custom>
now work as expected, outputting 1,2,3. You can try it in 4.7- to see the difference.
Offline
Re: txp PHP does not output
etc wrote #319641:
Now
<txp:php />should work (almost) as before in dev branch, testers welcome. Article context is preserved on second+ passes, so users withoutphprights should not be able to bypass this restriction any more.
Now testing the 4.80 dev branch – all working fine with content that requires that second pass. Thank you much. Will be testing this version further.
Offline
Re: txp PHP does not output
towndock wrote #319710:
Now testing the 4.80 dev branch – all working fine with content that requires that second pass.
Nice to know it, thanks for testing. Sorry for the trouble it could have caused, but we patch all potential security holes asap, sometimes brutally.
Offline