Differences

This shows you the differences between two versions of the page.

Link to this comparison view

glfusion:block_admin [2010/02/06 15:55]
Geiss
glfusion:block_admin [2014/05/24 20:20] (current)
Line 56: Line 56:
 If you would like to have one of your blocks use PHP code, enter the name of the function above. Your function name must start with the prefix **phpblock_** (i.e. phpblock_getweather). If it does not have this prefix, your function will **NOT** be called. This is a security feature to ensure that arbitrary PHP code is not called by your site.  Be sure not to put empty parenthesis '()' after your function name. Finally, it is recommended that you put all your PHP Block code in private/system/lib-custom.php. That will allow the code to stay with you even when you upgrade to a newer version of glFusion.  If you would like to have one of your blocks use PHP code, enter the name of the function above. Your function name must start with the prefix **phpblock_** (i.e. phpblock_getweather). If it does not have this prefix, your function will **NOT** be called. This is a security feature to ensure that arbitrary PHP code is not called by your site.  Be sure not to put empty parenthesis '()' after your function name. Finally, it is recommended that you put all your PHP Block code in private/system/lib-custom.php. That will allow the code to stay with you even when you upgrade to a newer version of glFusion. 
  
-A PHP block will only be displayed if the function actually returned any content to be displayed in the block. This can be used to create blocks that only show up under certain conditions. +A PHP block will only be displayed if the function actually returned any content to be displayed in the block. This can be used to create blocks that only show up under certain conditions. For example, starting in glFusion v1.3.0, there are example functions in private/system/lib-common.php.dist that show how to target a block to a specific set of URLs on your site.
  
 ==== Portal Block ==== ==== Portal Block ====
glfusion/block_admin.1265471749.txt.gz · Last modified: 2014/05/24 20:20 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: GNU Free Documentation License 1.3