Variables added to vchart joomla sql query not picked up

▼魔方 西西 提交于 2019-12-11 18:48:40

问题


The vchart module installed in Joomla, allows you to create charts with your own sql query. It even suggests by example that you can add a custom variable in the query, stating:

You can also include dynamic variables in your SQL query. You just need to enter variable name within curly braces. e.g. {catid}.
{loggedinuserid} is reserverd for Logged-in User

So I assume I would need to create a php variable $username for example and if this is in page where I embedded the chart it should get picked up by {username} in sql query?

However seems that php code embedded by custompage builder just shows as text

 <pre class="language-php"><code>echo 'hi';</code></pre>

prints out

echo 'hi';

and doesn't execute php. Has anyone got an ideas on how to make the php variable available?

来源:https://stackoverflow.com/questions/58121940/variables-added-to-vchart-joomla-sql-query-not-picked-up

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!