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: Upgadring to 1.4.5 kills Photo of the Day / Week hack  (Read 3996 times)

0 Members and 1 Guest are viewing this topic.

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos
Upgadring to 1.4.5 kills Photo of the Day / Week hack
« on: April 23, 2006, 04:24:13 pm »

If you are using Casper's Photo of the Day / Week hack (http://forum.coppermine-gallery.net/index.php?topic=14600.0) and you find it stops working after applying the 1.4.5 fix (partial upgrade only... see http://forum.coppermine-gallery.net/index.php?topic=30655.0), you should check the index.php file to see if contains the following code. If not, go back and put it back in since this is the only file that needs to be hacked. Yes... instead of downloading the file that's on the server and fixing it, I spent an hour looking for the problem until I realized I uploaded an unhacked index.php.  :P

Find:

Code: [Select]
            case 'lasthits':
                display_thumbnails('lasthits', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
                flush();
                break;

Add after (if not already there):

Code: [Select]
case 'potd':
                if ($cat == 0) {
                    include('potd.php');
                }
                flush();
                break;

case 'potw':
                if ($cat == 0) {
                    include('potw.php');
                }
                flush();
                break;

Cheers,

Billy
Logged
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

leotan

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Upgadring to 1.4.5 kills Photo of the Day / Week hack
« Reply #1 on: May 16, 2006, 08:41:02 am »

Thanks.. this helps alot. :P
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 19 queries.