Controlling Gallery2 block visibility in Drupal

decibel.places's picture

He has: 1,494 posts

Joined: Jun 2008

Trying to help out on a post at d.o.

I tried PHP code that should have worked and didn't.

According to http://drupal.org/node/181807 Gallery2 URLs are not recognized as Drupal system URLs so path include/exclude doesn't work.

Any ideas?

Now I am using this code

$gal = strrpos(request_uri(),'gallery');
if ($gal>0) $gal=0;
else $gal=1;
return ($gal);

I also tried

$gal = strrpos(request_uri(),'gallery');
if ($gal>0) $gal=FALSE;
else $gal=TRUE;
return ($gal);

Using Devel both return 1 on every page except gallery page they return nothing neither 0 nor 1

and

$gal = strrpos(request_uri(),'gallery');
if ($gal>0) $gal='FALSE';
else $gal='TRUE';
return ($gal);

returns TRUE on every page except gallery page returns nothing

But Gallery Block still displays on every page including gallery page