Apparently Not Working

itaine - October 5, 2009 - 00:56
Project:Block Page Visibility
Version:6.x-1.0
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I don't think this is working with 6.13, I've followed the README.txt to the letter. I have enabled the module and added the following function to a custom module, but no go.

<?php
/**
* - positive: BPV_INCLUSIVE or BPV_EXCLUSIVE 
* - pages: array of Drupal paths
* - types: array of content types
* - bool: general-purpose boolean
*
* A block matches if pages or types matches or the boolean is
* true.  A block is shown if (exclude XOR match).
*
* The key is the name of the block. The first argument to its array must either be BPV_INCLUSIVE or BPV_EXCLUSIVE;
* BPV_INCLUSIVE only displays the block whenever it matches the second or third argument.
* BPV_EXCLUSIVE always displays the block unless it matches the second or third argument.
* The second argument is an array of paths like in block control, and the third argument is an array of content types to match.
* The fourth is a general purpose boolean. Put whatever php here you want, that returns a boolean.
*/

<?php
function HOOK_bpv_config($name) {
 
$blocks = array(
   
'user-2' => array(BPV_INCLUSIVE, array('<front>'), array('front'), NULL),
  );
  return
$blocks[$name];
}
?>

Am I missing something?

 
 

Drupal is a registered trademark of Dries Buytaert.