Posted on: 12/07/05 03:56pm
By: timatlee
I am working on a plugin with several different sections in it .. Would make the appearance of the page a lot nicer if a block could appear if a certain feature were present...
Anyone done anything like this before?
Is it possible for a block to appear if a user has access to a certain feature?
Posted on: 12/07/05 05:20pm
By: Dirk
The really simple approach: When a PHP block returns an empty string, it's not displayed.
For the more complex approach, there's also a plugin API function, which the forum uses here to display that Forum Menu block on the left, btw.
bye, Dirk
Is it possible for a block to appear if a user has access to a certain feature?
Posted on: 12/07/05 07:51pm
By: timatlee
Whats the chance that the API function has some documentaion around it? The closest I could find digging through functions.inc in the forum plugin was the phpblock_..() function ...
Thanks,
Is it possible for a block to appear if a user has access to a certain feature?
Posted on: 12/08/05 01:59am
By: Dirk
Check lib-plugins.php
bye, Dirk