Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: [Solved]: testing on which view we are  (Read 3026 times)

0 Members and 1 Guest are viewing this topic.

mala

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
[Solved]: testing on which view we are
« 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

« Last Edit: March 27, 2008, 02:43:40 pm by Nibbler »
Logged
Andreas

Nibbler

  • Guest
Re: testing on which view we are
« Reply #1 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

Code: [Select]
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.
« Last Edit: March 27, 2008, 03:01:08 pm by Nibbler »
Logged

mala

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: testing on which view we are
« Reply #2 on: March 27, 2008, 02:43:28 pm »

OK. It works. Also thanks  for the tip (I will end up by learning php)!
Logged
Andreas

mala

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: [Solved]: testing on which view we are
« Reply #3 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.

Logged
Andreas

Nibbler

  • Guest
Re: [Solved]: testing on which view we are
« Reply #4 on: March 27, 2008, 03:01:33 pm »

I updated the code above. Try now.
Logged

mala

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: [Solved]: testing on which view we are
« Reply #5 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

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

}


Logged
Andreas
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.