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: Modifying the main page  (Read 2572 times)

0 Members and 1 Guest are viewing this topic.

jgsketch

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 47
Modifying the main page
« on: January 17, 2006, 07:47:16 pm »

Hello,
This thread directly relates to http://forum.coppermine-gallery.net/index.php?topic=22326.msg118718#msg118718 but instead of trying to get it to work in 1.32, I am now trying to get it to work in 1.42.

Basicly I'm trying to get this page of my site http://www.ratemyscrapbook.net/rateme.php to appear on the index.php page along with lastup, and toprated boxes. I've managed to use some of the code from 1.32 but then run into problems and errors. I've tried different combinations of code from the rateme.php file and inserted them into the index.php file. I've tried eliminating some of the previous code that I thought might not appyl anymore.

It has been brought to my attention  that anycontent option would work. It does work, but only if I want the rateme function to appear in my album list as well. I wish for the rateme function to only be on the main page and the album list left the way it is.

The easiest way to fix this is to use .htaccess and redirect the main page to rateme.php page. But I was hoping to code it into the main.

Please let me know if I'm on the right track here. Thanks.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Modifying the main page
« Reply #1 on: January 18, 2006, 12:27:29 am »

easiest way is not to use .htaccess redirect, but to use anycontent.php and add an if/then switch that checks what category is being displayed. The var to check for is $cat. If it equals 0 (no category at all), then your rateme stuff should be displayed. Pseudo code:
Code: [Select]
if ($cat==0) {
  // display the rateme stuff
}
Logged
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 20 queries.