To check a literal package name, use the |PACKAGE| token. Does not need to be specific to an item within the package nor a "custom package item" feature (which is used to add more variables to a package).
For example, to change save to a custom a.log if package A is used, and b.log if any other package is used, this would be the codeLet us know if you have any other specific scenarios you're after.Code:
|*if PACKAGE="A"| CustomLog /path/a.log combined |*else| CustomLog /path/b.log combined |*endif|
this check is not good
1. Every i create new package i need to update template
2.What happen if i want to have custom for user
eg user a1 and a2 using same package A which default disable dangerous php functions
but i want user a1 to be able to access to all functions. then I uncheck Secure php check (custom package item) for a1. It will be very useful if i can use
My target is build a function which help toggle secure_php function per user easily. So I added custom package item called secure_php which is checkbox in skin
secure_php=type=checkbox&string=Secure PHP&desc=Disable dangerous functions&checked=yes
|*if CUSTOM_PACKAGE_ITEM_secure_php="on"| php_admin_value[disable_functions] = exec,system,passthru,shell_exec |*endif|
I think this is easy to implement, since we had implemented CUSTOM_DOMAIN_ITEM_%s for domain, so this one is same.
Now custom package item useless because we cannot retrieve value in config template