Hash Variables: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
Hash Variables | There are 2 places Hash Variables can be used.. | ||
*PHP | |||
::Hash Variables allow you to customise your PHP code. | |||
::Before running any custom PHP code, nuBuilder does a search and replace with all currently available Hash Variables and refered to in your code. | |||
::To find what Hash Variables are available you can use [[PHP#nuHash|nuHash()]]. | |||
Example of using Hash Variables in PHP. | |||
::Example of using Hash Variables in PHP. | |||
<source lang="php"> | <source lang="php"> | ||
Line 12: | Line 15: | ||
nuRunQuery($s); | nuRunQuery($s); | ||
</source> | |||
*HTML | |||
::Hash Variables allow you to customise your HTML Objects. | |||
::Example of using Hash Variables in HTML. | |||
<source lang="html"> | |||
<a target='_blank' href='http://maps.googleapis.com/maps/api/staticmap?center=#zper_lat#,#per_long#&zoom=16&size=300x300&sensor=false&markers=color:green%7Clabel:Click%7C#per_lat#,#per_long#'> | |||
<img src='http://maps.googleapis.com/maps/api/staticmap?center=#per_lat#,#per_long#&zoom=16&size=300x300&sensor=false&markers=color:green%7Clabel:Click%7C#per_lat#,#per_long#'/> | |||
</a> | |||
</source> | </source> |
Revision as of 14:02, 15 July 2017
There are 2 places Hash Variables can be used..
- PHP
- Hash Variables allow you to customise your PHP code.
- Before running any custom PHP code, nuBuilder does a search and replace with all currently available Hash Variables and refered to in your code.
- To find what Hash Variables are available you can use nuHash().
- Example of using Hash Variables in PHP.
<source lang="php">
$s = "CREATE TABLE #TABLE_ID# SELECT * FROM invoice";
nuRunQuery($s);
</source>
- HTML
- Hash Variables allow you to customise your HTML Objects.
- Example of using Hash Variables in HTML.
<source lang="html">
<a target='_blank' href='http://maps.googleapis.com/maps/api/staticmap?center=#zper_lat#,#per_long#&zoom=16&size=300x300&sensor=false&markers=color:green%7Clabel:Click%7C#per_lat#,#per_long#'>
<img src='http://maps.googleapis.com/maps/api/staticmap?center=#per_lat#,#per_long#&zoom=16&size=300x300&sensor=false&markers=color:green%7Clabel:Click%7C#per_lat#,#per_long#'/>
</a>
</source>