justuptime.com - monitor your servers & websites

Controlling Gallery2 block visibility in Drupal

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.
decibel.places's picture

They have: 665 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