pub:vfexpression
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | pub:vfexpression [2022/06/25 17:02] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ====== Using *EXPRESSION in Virtual Folders ====== | ||
+ | |||
+ | Using the *EXPRESSION rule type, you may key up to 1024 characters of valid Php code in the ' | ||
+ | |||
+ | * The code must be valid Php. | ||
+ | * Do not enclose the code in quotes - eval() would evaluate that as a string and return NULL. | ||
+ | * You may reference the archive index field value using the variable **$fieldValue**. You may want to trim() this value. | ||
+ | * The code must use **return**, and should return TRUE, FALSE, | ||
+ | * **Prefix all variables you use**, except $fieldValue, | ||
+ | |||
+ | |||
+ | Examples:< | ||
+ | |||
+ | < | ||
+ | if( trim( $fieldValue ) == "Able Anderson" | ||
+ | < | ||
+ | < | ||
+ | $u_firstChar = substr( trim( $fieldValue ), 0, 1 );< | ||
+ | if( $u_firstChar == ' | ||
+ | < | ||
+ | |||
+ | A rules specification for the above would look thus: | ||
+ | |||
+ | {{pub: | ||
+ | |||
+ | For more information see [[http:// | ||
+ | |||
+ | < | ||
+ | The ability to paste any Php code into this field is a glaring security | ||
+ | |||
+ | < | ||
+ | |||
+ | ---- | ||
+ | |||
+ | < | ||
pub/vfexpression.txt · Last modified: 2022/06/25 17:02 by 127.0.0.1