coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: mala on March 27, 2008, 12:34:00 PM

Title: [Solved]: testing on which view we are
Post by: mala on March 27, 2008, 12:34:00 PM
In a previous topic
http://forum.coppermine-gallery.net/index.php/topic,51265.0.html
nibbler explained to me how to make disappear the CUSTOM_HEADER in the image view level.

I would like to do something similar with the CUSTOM_FOOTER only that this time I want it to disappear everywhere
except in the starting page, like the anycontent which I use for a different reason.

More generally (I hope this will not be considered as a multiposting) can we test (and how) where we are in the views
of the gallery?

Our gallery is in http://sikinos.unige.ch/NOB

Title: Re: testing on which view we are
Post by: Nibbler on March 27, 2008, 02:01:25 PM
There is a mod posted for multiple anycontents. If you want to use the custom footer then the code wil be something like


if (defined('INDEX_PHP') && !defined('THUMBNAILS_PHP') && empty($_GET['cat'])){

}


Each file sets a constant at the start, you can check that or something like $PHP_SELF for the filename.
Title: Re: testing on which view we are
Post by: mala on March 27, 2008, 02:43:28 PM
OK. It works. Also thanks  for the tip (I will end up by learning php)!
Title: Re: [Solved]: testing on which view we are
Post by: mala on March 27, 2008, 02:54:18 PM
Sorry. I answered too fast. In fact the solution you gave does not work fully.
It works until we arrive at the thumbnail view and then the footer appears again.
In your post
http://forum.coppermine-gallery.net/index.php/topic,51265.0.html
you told me how to test for  image view, so the only thing thats left is the thumbnail view.
If you have a fast solution I would be thankful.

Title: Re: [Solved]: testing on which view we are
Post by: Nibbler on March 27, 2008, 03:01:33 PM
I updated the code above. Try now.
Title: Re: [Solved]: testing on which view we are
Post by: mala on March 27, 2008, 03:50:26 PM
OK. This time it really works. In case somebody else needs the full line, here it is


if (defined('INDEX_PHP') && !defined('THUMBNAILS_PHP') && empty($_GET['cat']) && !defined('DISPLAYIMAGE_PHP')) {

}