forum.coppermine-gallery.net

No Support => Modifications/Add-Ons/Hacks => Mods: Miscellaneous => Topic started by: Casper on February 07, 2005, 01:16:42 pm

Title: Photo of the day / week etc, with auto archive albums.
Post by: Casper on February 07, 2005, 01:16:42 pm
Photo of the Day / Week hack

This hack adds an admin settable photo of the Day, Photo of the Week, or both, to a gallery, without the need to move files around between albums.

These selected photos can be displayed on the gallery index page, or any other page on the site, or in their own page.

This hack also adds archive albums, which will display the previous selected photos, in reverse date order.


Although these are set as photos of the day or week, it is easy to change this to month or year etc, simply by changing 2 lines in the language file.

Included in the download are instructions how to edit existing files, plus the extra files needed.  These files are version 1.4 ready, so 1 minor edit is required to each for use with 1.3x, and is explained in the docs.

Title: Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
Post by: onuzu on February 13, 2005, 11:48:51 pm
I didn't find editpics.php
Title: Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
Post by: Tranz on February 13, 2005, 11:57:19 pm
I didn't find editpics.php
It should already exist in your gallery files. If not, did you get the installation from elsewhere?
Title: Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
Post by: MonkeyManx on April 14, 2005, 05:18:30 am
I couldnt find the second step in editpics
Code: [Select]
$reset_votes  = isset($_POST['reset_votes'.$pid]);
Title: Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
Post by: Casper on April 14, 2005, 11:59:35 am
my mistake, sorry.

In version 1.3, the code to look for here is;

Code: [Select]
$reset_votes  = isset($HTTP_POST_VARS['reset_votes'.$pid]);
Title: Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
Post by: Joachim Müller on April 14, 2005, 03:07:22 pm
Casper, this is a great mod. Can this be made into a plugin after cpg1.4.x release?

Joachim
Title: Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
Post by: MonkeyManx on April 14, 2005, 07:37:12 pm
I had a few issues while installing this. The fourth find was kind of fuzzy, and I think i messed something up. Look at the picture below. What did i mess up?
Title: Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
Post by: Casper on April 15, 2005, 12:17:43 am
@ MonkeyManx

what version are you using.  That radio button exists in version 1.4, but not in 1.3x.  It is the 'Set as my icon' button.

Are yousure you have not mixed upfiles from both versions.  Please give the exact version of coppermine you are using, and the cvs version id of the editpics.php file you have, which will look something like this;

Code: [Select]
// CVS version: $Id: editpics.php,v 1.7 2004/08/16 09:29:52 gaugau Exp $
Title: Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
Post by: MonkeyManx on April 15, 2005, 12:48:40 am
i am using version 1.3.2. It is possable that I mixed 1.3 and 1.4 files. The POTD works its just that the extra button is there.

Code: [Select]
CVS version: $Id: editpics.php,v 1.7 2004/08/16 09:29:52 gaugau Exp $
Title: Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
Post by: MonkeyManx on April 15, 2005, 06:15:17 pm
Is this automated, or must you move the current potd to the archive each day?
Title: Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
Post by: Casper on April 17, 2005, 08:32:26 pm
You have to move it, at the same time you add the new one, otherwise it stays as the current potd.
This is explained in the docs.
Title: Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
Post by: MonkeyManx on April 18, 2005, 08:34:04 pm
It would be sweet if the the admin could add the potd/w to a query, then each day it automatically updated with whatever has been in the query longest.
Title: Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
Post by: photoshopabuser on May 05, 2005, 02:31:01 pm
I have attempted to put this in my 1.33 gallery at rocklobsters.net (http://www.rocklobsters.net) and was able to choose a POTW but I can't get the image to show up on my gallery home page. The table shows up with all the text data but no image.

Am I missing something obvious? Thanks in advance.

Edit: I got it to work by archiving one image to POTW and the new image showed. Now I get this error msg when I click on View Archive:
Code: [Select]
Fatal error: Undefined class name 'cpgpluginapi' in /www/j/xxxxxx/htdocs/pictures/include/functions.inc.php on line 723
Title: Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
Post by: Casper on May 05, 2005, 03:55:23 pm
That error means you have used the file include/functions.inc.php from the package, which is meant for version 1.4x.

The instructions in the docs that come with the download for use with 1.3x tell you how to prepare the files you need using the 1.3x files.

You should get a fresh copy of the 1.3.3 functions.inc.php, and make the changes to that, then make sure you have follwed the rest of the instructions, and it should work.
Title: Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
Post by: photoshopabuser on May 05, 2005, 08:37:56 pm
Thanks man!

In my best Homer Simpson voice.......D'oh
I thought I fixed all of them....obviously not.... :-[
Title: Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
Post by: photoshopabuser on May 05, 2005, 11:21:53 pm
Hello Again!

I rechecked everything and it is done right as far as I can tell. I did apply the 1.3x changes and the
Code: [Select]
Fatal error: Undefined class name 'cpgpluginapi' instill comes up. Could there be some different code out there that I am not seeing? The 'cpgpluginapi' line of code  is included in both of the install instructions.

Very Cool concept btw!
Title: Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
Post by: Casper on May 06, 2005, 04:37:13 pm
My apologies, I missed that, which should have come out of the 1.3 change.

Please find this line of code, which is in there twice, and simply delete it;

Code: [Select]
$rowset = CPGPluginAPI::filter('thumb_caption_lastup',$rowset);
Title: Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
Post by: photoshopabuser on May 07, 2005, 03:25:00 am
Thanks Casper!

I was thinking about doing that but am not that good at php yet and had visions of the whole thing imploding  ;)
This is a very nice addition man. Your creativity is appreciated!
Title: Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
Post by: leotan on May 30, 2005, 02:16:33 pm
How do I remove it if I accidentally choose a wrong picture? Can I take it out of the ptd?
Title: Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
Post by: Casper on May 31, 2005, 09:05:07 pm
There is no way to do this at the moment, without going into the database to amend the entry in the pictures table.

Title: Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
Post by: lovingcolorado on June 27, 2005, 05:29:29 am
I followed the instructions for my installed version of coppermine (was an autoinstall through my webhosting).  I had the same problems as MonkeyManx.  After fixing the Archive problem, I still get the dreaded red x where my POTW picture should be.  

Is there something else in the php code that I need to change for the image to show properly?

I followed the instructions to the letter for my version, and only uploaded the two files I needed to be able to show POTW on the index ( page of the website (on the same server as coppermine).  

Coppermine version 1.3.2 with the eyeball theme    http://www.violetaholicsanonymous.org/museum/
The page I am trying to get to show my POTW is here:    http://www.violetaholicsanonymous.org

Sorry if this is a stupid question, but this is a great mod and I would like to figure out what I am doing wrong.
Title: Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
Post by: Casper on July 01, 2005, 12:49:10 am
The only thing you are doing wrong is trying to use a photo that has no 'normal' and 'full size' version.

Because the photo you are trying to display is smaller than the size you set for intermediate pics, coppermine does not create an intermediate version.  But this mod uses that version.

Try it with a larger pic.

Alternatively, you could edit your showweekpic.php.  Find this.

Code: [Select]
<img src=\"albums/{$picture['filepath']}normal_{$picture['filename']}\"

And change it to this;


Code: [Select]
<img src=\"albums/{$picture['filepath']}{$picture['filename']}\"
The mod will then show the full size pic, whatever the size.  But this may give you formatting problems if you use a large photo.
Title: Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
Post by: leotan on July 07, 2005, 05:09:01 pm
I got the message the 'The selected album/file does not exist ! '
when I try to go to the archive...

What was wrong?
Thanks.
Title: Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
Post by: Casper on July 09, 2005, 03:33:41 pm
Don't know.  You'll have to give more info than that, such as what files are you using.  What archive are you trying to view?  Have you replaced all the files with the ones in the download?

A link would help.
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: xmystique on July 13, 2005, 05:09:34 am
i tried to install this, but stopped after the last find/replace on editpics.php and the first find/add on english.php couldnt be found at all. i searched the entire files and the code listed in the doc is nowhere to be found.

i am using version 1.33
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Casper on July 13, 2005, 08:56:43 pm
You have found an error in my code for the last find in editpics php.  It includes one line that is only in version 1.4 files.

The code you need to replace is this, which in an unmoded file will be about line 254;

Code: [Select]
<tr>
                <td class="tableb" colspan="3" align="center">
                    <table border="0" cellspacing="0" cellpadding="0" width="100%">
                        <tr>
                            <td width="20%" align="center"><input type="checkbox" name="delete{$CURRENT_PIC['pid']}" id="delete{$CURRENT_PIC['pid']}" value="1" class="checkbox"><label for="delete{$CURRENT_PIC['pid']}" class="clickable_option">{$lang_editpics_php['del_pic']}</label></td>
                            <td width="20%" align="center"><input type="checkbox" name="reset_vcount{$CURRENT_PIC['pid']}" id="reset_vcount{$CURRENT_PIC['pid']}" value="1" class="checkbox"><label for="reset_vcount{$CURRENT_PIC['pid']}" class="clickable_option">{$lang_editpics_php['reset_view_count']}</label></td>
                            <td width="20%" align="center"><input type="checkbox" name="reset_votes{$CURRENT_PIC['pid']}" id="reset_votes{$CURRENT_PIC['pid']}" value="1" class="checkbox"><label for="reset_votes{$CURRENT_PIC['pid']}" class="clickable_option">{$lang_editpics_php['reset_votes']}</label></td>
                            <td width="20%" align="center"><input type="checkbox" name="del_comments{$CURRENT_PIC['pid']}" id="del_comments{$CURRENT_PIC['pid']}" value="1" class="checkbox"><label for="del_comments{$CURRENT_PIC['pid']}" class="clickable_option">{$lang_editpics_php['del_comm']}</label></td>
                        </tr>
                    </table>
                </td>
        </tr>

EOT;
        }
}


I don't see how you cannot find this code, which is in all language files;

Code: [Select]
$lang_meta_album_names = array(
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: kieranmullen on July 21, 2005, 03:55:25 am
I edited the pics fine but then when I go tot he main page

Fatal error: Call to undefined function cpg_db_query() in /home/virtual/site30/fst/var/www/html/potd.php on line 39

I have the page uploaded.  I am sure I did somethign wrong of course.


Another problem. IN order to work with mod you must edit pics in the albums. Would it be good to have the move to file of the day directly in the picture itself when editing description instead?  I only want to have file of the day on my main page.  I have a html based menu for the rest.

Thanks

Kieran Mullen
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: kieranmullen on July 21, 2005, 04:15:56 am
OK I am ansering my own question > I didnt make the changes to the other files as I am running 1.3  However I think my last point is still valid.

Also when I go to edit pics and I click "Add to archive and add to file of the day. Hit apply and basically the screen just refreshes. Nothing changes

Also how could I change it from File of the day to something like featured picture etc?

I managed to upload one before I had my previous error but there is no picture of it on the main page however theempy image (as a X on ie) is still a valid link to the right file.

Any ideas?

Thanks!

KM
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: kieranmullen on July 21, 2005, 05:23:03 am
OK I found out what it was. It was a gif problem. 

So now that I also edit the sql to show a thumb instead of a normal image and a title...

How can I edit albums without having the albums in the config?

Thanks!

KM
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Superior on July 23, 2005, 03:27:43 am
Dear,
I want to show My POTD on my websites main page.My template does not allow me to add large pics. So can i resize my pictures to show on main page???
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Casper on July 27, 2005, 10:30:45 am
Also how could I change it from File of the day to something like featured picture etc?

In the changes you made to the language file, just change that accordingly, i.e., this;

Code: [Select]
'potd' => 'Photo of the Day',
would be changed to this;

Code: [Select]
'potd' => 'Featured Picture',


I want to show My POTD on my websites main page.My template does not allow me to add large pics. So can i resize my pictures to show on main page???

The mod uses the 'normal', (intermediate) size picture stored on the server.  It cannot re-size photos, but it can be changed to use the full-sized pic or the thumb.  To use the thumb, just search the hack code for all cases of 'normal_' and replace it with 'thumb_'.  To use the full-size, just remove the 'normal_'

Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: graemerae on September 07, 2005, 10:38:07 pm


OK - Feature request :

 I've got POTD/POTW running beautifully on my coppermine - photos.surfline.com - (Locked at the moment until I bridge it to vbulletin) - Is there any chance of this feature being expanded to have a POTD or POTW on a per ALBUM basis, not just one for an entire gallery.  For example, I've got a dozen galleries for different regions of the world and I'd love to be able to specify different pics for different regions (that then appear on a separate website)

Any clues?  I managed to hack the code of menalto to do this, but the php and sql of coppermine are a little beyond my standard skills. 

We'd actually be willing to (gasp) pay someone to make this change - within reason.

PM for login password if you're interested in helping out.

(Running cpg134) 

Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: graemerae on September 10, 2005, 08:02:19 pm
OK I figured this out myself -

I only did it in weekthumb.php - I imagine modifying the others is simple, but this is the only
one I wanted:

replace:
Code: [Select]
global  $prefix, $dbi; with
Code: [Select]
global  $HTTP_GET_VARS, $prefix, $dbi;
$albumid=$HTTP_GET_VARS['albumid'];

Change the SQL statement from this:


Code: [Select]
   
   $result = db_query("SELECT pid, aid, filepath, filename, owner_name, owner_id from {$CONFIG['TABLE_PICTURES']} WHERE potw='1', $dbi);

To This:

Code: [Select]
   
   $result = db_query("SELECT pid, aid, filepath, filename, owner_name, potw_date, owner_id, caption from {$CONFIG['TABLE_PICTURES']} WHERE potw='1' AND aid='{$albumid}' ORDER BY 'potw_date' DESC", $dbi);

I added caption and ORDER BY ''potw_date', as I wanted the last POTW to always appear and I wanted the caption too.


Then call it as weekthumb.php?albumid=###

Where ### is the ID of the album you want.


If you want to see it in action:

photos.surfline.com has all my albums.

www.surfline.com has a random featured photo pulled into it (middle bottom)

And if you go to any regional surf page (Southern California for example) it only pulls the POTW for that region.


Here's the full code of weekthumb.php

Code: [Select]
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2005 Coppermine Dev Team
  v1.1 originaly written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  ********************************************
  Coppermine version: 1.4.1
 
**********************************************/

/**
* Coppermine Photo Gallery 1.4.1 weekthumb.php
*
* This file can be called using an iframe into any other page
*
* @copyright 2002,2005 Gregory DEMAR, Coppermine Dev Team
* @license http://opensource.org/licenses/gpl-license.php GNU General Public Lic
ense V2
* @package Coppermine


{$lang_meta_album_names['by']}</small><b> <a href=\"thumbnails.php?album=lastupb
y&uid={$picture['owner_id']}\" target=\"new\">{$picture['owner_name']}</a></b>


*/

define('WEEKTHUMB_PHP'true);
define('IN_COPPERMINE'true);

require(
'include/init.inc.php');

global  $HTTP_GET_VARS$prefix$dbi
$albumid=17;

print 
$HTTP_GET_VARS['albumid'];
$albumid=$HTTP_GET_VARS['albumid'];


{
    
   $result 
db_query("SELECT pid, aid, filepath, filename, owner_name, potw_dat
e, owner_id, caption from 
{$CONFIG['TABLE_PICTURES']} WHERE potw='1' AND aid='{$
albumid}' ORDER BY 'potw_date' DESC"$dbi);

    
  $picture 
mysql_fetch_array($result); 
  
 
  $aid
=$picture['aid'];
  
  $result2 
db_query("SELECT title from {$CONFIG['TABLE_ALBUMS']} WHERE aid='{$
aid}'"$dbi);
   
  $album 
mysql_fetch_array($result2); 
   
   
   
   
  $img 
"<img src=\"/albums/{$picture['filepath']}thumb_{$picture['filename']}\
"
  border=\"0\">"
   


   $content 
.= "<table><tr><td><center><a href=\"http://photos.surfline.com/disp
layimage.php?album=
{$picture['aid']}&pos=-{$picture['pid']}\" target=\"new\">$im
g</a><br /><br /> 
 
{$picture['caption']}
 
<br /> 
 From: <a href=\"http://photos.surfline.com/thumbnails.php?album=
{$aid}\"> {$alb
um
['title']}
 </a>
<br /><br />

 

 </center></td></tr></table>

"

$stop++; 


print 
$content;
?>





Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: lovingcolorado on September 25, 2005, 08:42:04 pm
The only thing you are doing wrong is trying to use a photo that has no 'normal' and 'full size' version.

Because the photo you are trying to display is smaller than the size you set for intermediate pics, coppermine does not create an intermediate version. But this mod uses that version.

Try it with a larger pic.

Alternatively, you could edit your showweekpic.php. Find this.

Code: [Select]
<img src=\"albums/{$picture['filepath']}normal_{$picture['filename']}\"

And change it to this;


Code: [Select]
<img src=\"albums/{$picture['filepath']}{$picture['filename']}\"
The mod will then show the full size pic, whatever the size. But this may give you formatting problems if you use a large photo.


Thanks Casper!  I finally got it to work.  I had to leave it alone for a long while after being too frustrated with it...but once I took a fresh look at it with your help, it works great now.  Thanks a ton!  You are awesome! 

Lori
lovingcolorado in Denver, Co.
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: leotan on October 01, 2005, 01:24:56 pm
I have got this error while trying to view the archive.

Code: [Select]
Fatal error: Call to undefined function: cpg_db_query() in /var/www/html/gallery/include/functions.inc.php on line 706
Anyone can help me?
Thanks.
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Casper on October 01, 2005, 02:10:42 pm
That error is likely if you have version 1.3x of coppermine, and did not change the queries.

If you do have 1.3x, open include/functions.inc.php and find;

Code: [Select]
cpg_db_query
Replace it with;

Code: [Select]
db_query
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: leotan on October 01, 2005, 06:59:47 pm
Thanks.. it works now. ;)
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: DustyNine on October 17, 2005, 02:02:00 am
Although there's possibly bugs and no support, does it make sense to upgrade to 1.4? Are there benefits for using it with the PotD?
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Joachim Müller on October 17, 2005, 07:37:21 am
Are there benefits for using it with the PotD?
no
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: antisa33 on October 17, 2005, 07:02:59 pm
Hello
I dont understand if you mod can do that i want !
I would like to put a photo of the day but automatically.
I have seen a website where we can put our script and the website run the cron automatically.
Did somebody do the photo of the day automatically ?
Thanks !
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Casper on October 17, 2005, 09:01:38 pm
No, this mod is not automatic, sorry.
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: claude258 on October 19, 2005, 02:27:42 am
I tried to install this, but stopped after the last find/replace on editpics.php. I searched the entire file and the code listed in the doc is nowhere to be found.

i am using version 1.32

I cant find this:
Code: [Select]
<tr>
                <td class="tableb" colspan="3" align="center">
                    <table border="0" cellspacing="0" cellpadding="0" width="100%">
                        <tr>
                            <td width="20%" align="center"><input type="radio" name="galleryicon" id="galleryicon{$CURRENT_PIC['pid']}" value="{$CURRENT_PIC['pid']}" {$isgalleryicon_selected}{$isgalleryicon_disabled}class="checkbox">{$lang_editpics_php['gallery_icon']}</td>
                            <td width="20%" align="center"><input type="checkbox" name="delete{$CURRENT_PIC['pid']}" id="delete{$CURRENT_PIC['pid']}" value="1" class="checkbox"><label for="delete{$CURRENT_PIC['pid']}" class="clickable_option">{$lang_editpics_php['del_pic']}</label></td>
                            <td width="20%" align="center"><input type="checkbox" name="reset_vcount{$CURRENT_PIC['pid']}" id="reset_vcount{$CURRENT_PIC['pid']}" value="1" class="checkbox"><label for="reset_vcount{$CURRENT_PIC['pid']}" class="clickable_option">{$lang_editpics_php['reset_view_count']}</label></td>
                            <td width="20%" align="center"><input type="checkbox" name="reset_votes{$CURRENT_PIC['pid']}" id="reset_votes{$CURRENT_PIC['pid']}" value="1" class="checkbox"><label for="reset_votes{$CURRENT_PIC['pid']}" class="clickable_option">{$lang_editpics_php['reset_votes']}</label></td>
                            <td width="20%" align="center"><input type="checkbox" name="del_comments{$CURRENT_PIC['pid']}" id="del_comments{$CURRENT_PIC['pid']}" value="1" class="checkbox"><label for="del_comments{$CURRENT_PIC['pid']}" class="clickable_option">{$lang_editpics_php['del_comm']}</label></td>
                        </tr>
                    </table>
                </td>
        </tr>

EOT;
        }
}

or this (as mentioned in the reply of july 13):

Code: [Select]
<tr>
                <td class="tableb" colspan="3" align="center">
                    <table border="0" cellspacing="0" cellpadding="0" width="100%">
                        <tr>
                            <td width="20%" align="center"><input type="checkbox" name="delete{$CURRENT_PIC['pid']}" id="delete{$CURRENT_PIC['pid']}" value="1" class="checkbox"><label for="delete{$CURRENT_PIC['pid']}" class="clickable_option">{$lang_editpics_php['del_pic']}</label></td>
                            <td width="20%" align="center"><input type="checkbox" name="reset_vcount{$CURRENT_PIC['pid']}" id="reset_vcount{$CURRENT_PIC['pid']}" value="1" class="checkbox"><label for="reset_vcount{$CURRENT_PIC['pid']}" class="clickable_option">{$lang_editpics_php['reset_view_count']}</label></td>
                            <td width="20%" align="center"><input type="checkbox" name="reset_votes{$CURRENT_PIC['pid']}" id="reset_votes{$CURRENT_PIC['pid']}" value="1" class="checkbox"><label for="reset_votes{$CURRENT_PIC['pid']}" class="clickable_option">{$lang_editpics_php['reset_votes']}</label></td>
                            <td width="20%" align="center"><input type="checkbox" name="del_comments{$CURRENT_PIC['pid']}" id="del_comments{$CURRENT_PIC['pid']}" value="1" class="checkbox"><label for="del_comments{$CURRENT_PIC['pid']}" class="clickable_option">{$lang_editpics_php['del_comm']}</label></td>
                        </tr>
                    </table>
                </td>
        </tr>

EOT;
        }
}
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: DustyNine on October 19, 2005, 05:42:47 am
I'm getting an error on the picture of the day archive page. It's the same one though from before when the one line repeated (and I subsequently took the extra one out).

Code: [Select]
Fatal error: Undefined class name 'cpgpluginapi' in /u/t/thegate/www.thegate.ca/gallery/include/functions.inc.php on line 690

Any ideas? Everything else works fine. You can find the page at http://www.thegate.ca/gallery/thumbnails.php?album=potdarch.
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Casper on October 19, 2005, 10:22:49 am
@ DustyNine

The answer to your problem is in this reply,
http://forum.coppermine-gallery.net/index.php?topic=14600.msg81947#msg81947


@ claud258

first, you should update to the current version, which is 1.3.5.

The code you need to find is;

Code: [Select]
        <tr>
                <td class="tableb" colspan="3" align="center">
                        <b><input type="checkbox" name="delete{$CURRENT_PIC['pid']}" value="1" class="checkbox">{$lang_editpics_php['del_pic']}</b>&nbsp;
                        <b><input type="checkbox" name="reset_vcount{$CURRENT_PIC['pid']}" value="1" class="checkbox">{$lang_editpics_php['reset_view_count']}</b>&nbsp;
                        <b><input type="checkbox" name="reset_votes{$CURRENT_PIC['pid']}" value="1" class="checkbox">{$lang_editpics_php['reset_votes']}</b>&nbsp;
                        <b><input type="checkbox" name="del_comments{$CURRENT_PIC['pid']}" value="1" class="checkbox">{$lang_editpics_php['del_comm']}</b>&nbsp;
                </td>
        </tr>

EOT;
        }
}

You should replace it with this;

Code: [Select]
        <tr>
                <td class="tableb" colspan="3" align="center">
                        <b><input type="checkbox" name="delete{$CURRENT_PIC['pid']}" value="1" class="checkbox">{$lang_editpics_php['del_pic']}</b>&nbsp;
                        <b><input type="checkbox" name="reset_vcount{$CURRENT_PIC['pid']}" value="1" class="checkbox">{$lang_editpics_php['reset_view_count']}</b>&nbsp;
                        <b><input type="checkbox" name="reset_votes{$CURRENT_PIC['pid']}" value="1" class="checkbox">{$lang_editpics_php['reset_votes']}</b>&nbsp;
                        <b><input type="checkbox" name="del_comments{$CURRENT_PIC['pid']}" value="1" class="checkbox">{$lang_editpics_php['del_comm']}</b>&nbsp;
                </td>
        </tr>

EOT;

if (GALLERY_ADMIN_MODE){
echo <<<EOT
                    <tr>
                <td class="tableb" colspan="3" align="center">
                    <table border="0" cellspacing="0" cellpadding="0" width="100%">
                        <tr>
    <tr>
                            <td width="25%" align="center">
<b><input type="checkbox" name="reset_potd{$CURRENT_PIC['pid']}" value="YES" class="checkbox" />{$lang_editpics_php['potdnew']}</b></td><td width="25%" align="center"><b><input type="checkbox" name="reset_potdn{$CURRENT_PIC['pid']}" value="NO" class="checkbox" />{$lang_editpics_php['potdold']}</b>

<td width="25%" align="center">
<b><input type="checkbox" name="reset_potw{$CURRENT_PIC['pid']}" value="YES" class="checkbox" />{$lang_editpics_php['potwnew']}</b></td><td width="25%" align="center"><b><input type="checkbox" name="reset_potwn{$CURRENT_PIC['pid']}" value="NO" class="checkbox" />{$lang_editpics_php['potwold']}</b>
</td>
                        </tr>
                    </table>
                </td>
        </tr>

EOT;
}
        }
}
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: claude258 on October 19, 2005, 02:16:01 pm
I have done some mods to the files and I am afraid to overwrite those files with the update (from 1.3.2 to 1.3.5).
If I do the manual update as Gaugau recommands, I think I will be in the same situation (the editpics.php file will not be changed).

What should I do? Do the update and do all the mods again? :( I am not sure to remember all the mods I have done.

 
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: DustyNine on October 19, 2005, 02:53:37 pm
Sorry Casper, that's what I meant in my message - I've already removed one of those lines. There is only one of those lines of code, here's where it sits:

Code: [Select]
$caption = $user_link.'<span class="thumb_caption">'.localised_date($row['potd_date'], $lastup_date_fmt).'</span>';
                        $rowset[$key]['caption_text'] = $caption;
                }

                $rowset = CPGPluginAPI::filter('thumb_caption_lastup',$rowset);

                return $rowset;
                break;

So you know, the $rowset line sits at line 690 (although that's probably obvious). Any other options?
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Joachim Müller on October 20, 2005, 08:15:55 am
If I do the manual update as Gaugau recommands, I think I will be in the same situation (the editpics.php file will not be changed).
What are you refering to? What manual update do I recommend? Take a look at the instructions posted by Makc666 that explain how to update a modded version: http://forum.coppermine-gallery.net/index.php?topic=22132.msg102767#msg102767
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: claude258 on October 20, 2005, 02:25:06 pm
I am referring to this:
 http://forum.coppermine-gallery.net/index.php?topic=22132.msg102767#msg102767
see the first post (on top).

Anyway, I think I will have to do the "regular" update soon. 
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Joachim Müller on October 20, 2005, 06:20:36 pm
yes, definitely: as suggested in the posting you refered to: the manual fix is only for experienced users. Cpg1.3.5 contains other fixes for minor issues as well. For details on updating coppermine, please don't post on this thread, as it is meant for discussion related to the potd mod only.
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: claude258 on October 22, 2005, 07:39:46 am
I did erevything for this mod (POTD) but I get an error while trying to use it as an "anyontent insert":

There was an error while processing a database query.

The debug is:

While executing query "SELECT pid, aid, filepath, filename, owner_name, owner_id  from cpg_pictures WHERE potd='1'" on

mySQL error: Unknown column 'potd' in 'where clause'

Any idea of the problem?
I am on version 1.3.5
Thanks
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: claude258 on October 23, 2005, 04:03:29 am
I found my problem, the update have not been done properly... Everythin is ok now...  ;D
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: trackman on December 04, 2005, 01:42:50 am
I've tried this and I get the following error:

Fatal error: Call to undefined function: db_query() in D:\home\Default\cdcoverhideout.com\htdocs\coppermine_gallery\potd.php on line 39

 ??? ???
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Paver on December 04, 2005, 02:42:38 am
trackman: It sounds like you're using the 1.3 version of the mod since in 1.4, the correct function is "cpg_db_query".

1.3: db_query
1.4: cpg_db_query
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: trackman on December 04, 2005, 10:34:18 am
Changed it back to cpg_db_query but getting this following error now:

There was an error while processing a database query

 ??? ???
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Paver on December 04, 2005, 04:37:54 pm
Under Config - Maintenance Settings, Enable Debug Mode so you can find out more info.
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: DustyNine on December 16, 2005, 03:10:41 am
Sorry if the answer is obvious, but what should we do with the POTD add-on if we're upgrading from 1.3 to 1.4?
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Joachim Müller on December 17, 2005, 02:05:53 am
http://forum.coppermine-gallery.net/index.php?topic=24540.0
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: DustyNine on December 17, 2005, 02:31:52 am
GauGau - I understand you're trying to keep people from asking for hacks and changes every time there's an update, however at the same time this mod was made for 1.3 and 1.4. I only asked for assistance since I wanted to know if updating to 1.4 with this 1.3-edited hack would wreck havok on my gallery. Since I must be the biggest noob here, I'm assuming if I upgrade to 1.4, I should then reverse the steps on the mod instructions to get it to 1.4 as well, but I guess I'll see.
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Casper on December 29, 2005, 09:16:41 pm
Sorry if the answer is obvious, but what should we do with the POTD add-on if we're upgrading from 1.3 to 1.4?

Sorry, been away a while.

The answer is to simply re-apply the mod, using the instructions for the 1.4x version.
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: DustyNine on December 29, 2005, 10:14:19 pm
Thanks Casper. I knew it would be something like that, but didn't want to bring the whole thing crashing down. Appreciate the help!
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Zanelli on January 03, 2006, 12:40:56 am
Is there any way of making this work with animated .gif or shockwave files?

My galley's at: http://theaahc.net/Gallery (http://theaahc.net/Gallery)
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Casper on January 03, 2006, 01:16:14 am
Should work, but you will have to edit the files you are using to remove all instances of 'normal_', as these files do not have a 'normal_' version.
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Zanelli on January 03, 2006, 01:39:35 am
Should work, but you will have to edit the files you are using to remove all instances of 'normal_', as these files do not have a 'normal_' version.

Thanks that worked for .gif files but not for shockwave but I'm not bothered.
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Timbli on April 17, 2006, 05:02:24 pm
G'day
Could someone maybe show me how to edit my weekthumb.php so it displays:

*Image*
Title:
Descripion:
Date:
Submitted By:

Cheers
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: modiba on April 17, 2006, 11:51:48 pm
Hello,

Can someone tell me how to remove a photo from the Photo of the Day/Week Archive?

Very grateful for any help.

Thank you,
Greg
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Timbli on April 23, 2006, 01:55:58 pm
Any help on the two above issues?
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Joachim Müller on April 27, 2006, 09:42:38 am
on the very first page of this thread, leotan asked
How do I remove it if I accidentally choose a wrong picture? Can I take it out of the ptd?
and Casper replied:
There is no way to do this at the moment, without going into the database to amend the entry in the pictures table.
Please read the thread before posting to avoid the same question being asked over and over again.

If you need the mod modified, you're basically on your own. This thread is meant to help users applying the mod in the first place. It's not meant to be used for questions related to modifications of the mod. If you can't figure out how to modify it, you shouldn't use it in the first place.
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: DustyNine on June 29, 2006, 06:57:45 pm
Sorry folks, it's me again. I had to move servers recently and so I installed the new version of Coppermine, moved my MySQL databases over, and then re-installed the PotD mod. The problem is, it's not updating the databases with the 1s and 2s to signify that the picture is the current PotD or an archived one. I manually went in and did it for today and it worked, but using the control panel isn't working to change the status.

I've checked and rechecked it all, and I did everything - anyone know what could be wrong?
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: leotan on July 02, 2006, 08:15:15 am
I upgraded to 1.4.8 and it seems like this mod is not working for me now.
I am not able to move the picture to the archieve and not able to set a new picture of the week.

I notice this at the debug message:
/editpics.php
Notice line 101: Undefined index: galleryicon

Anyone can help?
Thank you.
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Joachim Müller on July 05, 2006, 06:59:21 am
Ignore notices, or (even better) turn them off in coppermine's config unless you're a dev and know what they mean.
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: leotan on July 05, 2006, 12:02:18 pm
i turn it out hoping to see some answer why it is not working for me anymore... :(

I am not able to move the potw picture to the achieve and set new potw picture...
The last potw picture just refused to be changed. :(
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: gelaskimgel on August 16, 2006, 12:23:24 am
It does not work for me... And I'm using 1.4.8 version... Anyone help?
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Senator on August 23, 2006, 04:27:41 pm
Hello, great hack, i've change all files, and update the sql. cpg135_pictures.

Everything looks fine. but the pictures in potd.php and potw.php are not vissable.

I get no error or something.

Do you have any idea what iám doing wrong.
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Senator on August 23, 2006, 07:26:15 pm
I.ve findout, that when i change my cgp135_pictures manualy it works, so my db is not changing when is select a pic in editpics.php and save.

So i think there is something wrong in my editpics.php

Code: [Select]
$isgalleryicon = ($galleryicon===$pid);

                $delete       = isset($_POST['delete'.$pid]);
                $reset_vcount = isset($_POST['reset_vcount'.$pid]);
                $reset_votes  = isset($_POST['reset_votes'.$pid]);
$reset_potd  = isset($_POST['reset_potd'.$pid]);
$reset_potd_date  = isset($_POST['reset_potd_date'.$pid]);
$reset_potdn  = isset($_POST['reset_potdn'.$pid]);
$reset_potw  = isset($_POST['reset_potw'.$pid]);
$reset_potw_date  = isset($_POST['reset_potw_date'.$pid]);
$reset_potwn  = isset($_POST['reset_potwn'.$pid]);
                $del_comments = isset($_POST['del_comments'.$pid]) || $delete;

                $query = "SELECT category, filepath, filename, owner_id FROM {$CONFIG['TABLE_PICTURES']}, {$CONFIG['TABLE_ALBUMS']} WHERE {$CONFIG['TABLE_PICTURES']}.aid = {$CONFIG['TABLE_ALBUMS']}.aid AND pid='$pid'";
                $result = cpg_db_query($query);
                if (!mysql_num_rows($result)) cpg_die(CRITICAL_ERROR, $lang_errors['non_exist_ap'], __FILE__, __LINE__);
                $pic = mysql_fetch_array($result);
                mysql_free_result($result);

                if (!GALLERY_ADMIN_MODE) {
                        if ($pic['category'] != FIRST_USER_CAT + USER_ID) cpg_die(ERROR, $lang_errors['perm_denied']."<br />(picture category = {$pic['category']}/ $pid)", __FILE__, __LINE__);
                        if (!isset($user_album_set[$aid])) cpg_die(ERROR, $lang_errors['perm_denied']."<br />(target album = $aid)", __FILE__, __LINE__);
                }

                $update  = "aid = '".$aid."'";
                $update .= ", title = '".addslashes($title)."'";
                $update .= ", caption = '".addslashes($caption)."'";
                $update .= ", keywords = '".addslashes($keywords)."'";
                $update .= ", user1 = '".addslashes($user1)."'";
                $update .= ", user2 = '".addslashes($user2)."'";
                $update .= ", user3 = '".addslashes($user3)."'";
                $update .= ", user4 = '".addslashes($user4)."'";

                if ($isgalleryicon && $pic['category']>FIRST_USER_CAT) {
                                        $sql = 'update '.$CONFIG['TABLE_PICTURES'].' set galleryicon=0 where owner_id='.$pic['owner_id'].';';
                                        cpg_db_query($sql);
                                        $update .= ", galleryicon = ".addslashes($galleryicon);
                                }

                                if (is_movie($pic['filename'])) {
                                        $pwidth = get_post_var('pwidth', $pid);
                                        $pheight = get_post_var('pheight', $pid);
                                        $update .= ", pwidth = " .  (int) $pwidth;
                                        $update .= ", pheight = " . (int) $pheight;
                                }

                if ($reset_vcount) {
                    $update .= ", hits = '0'";
                    resetDetailHits($pid);
                }
                if ($reset_votes) {
                    $update .= ", pic_rating = '0', votes = '0'";
if (GALLERY_ADMIN_MODE) {
if ($reset_potd) $update .= ", potd = '1', potd_date = '$timestamp'";
if ($reset_potdn) $update .= ", potd = '2'";
if ($reset_potw) $update .= ", potw = '1', potw_date = '$timestamp'";
if ($reset_potwn) $update .= ", potw = '2'";
}
                    resetDetailVotes($pid);
                }

                if (UPLOAD_APPROVAL_MODE) {
                    $approved = get_post_var('approved', $pid);
                        if ($approved == 'YES') {
                                $update .= ", approved = 'YES'";
                        } elseif ($approved == 'DELETE') {
                                $del_comments = 1;
                                $delete = 1;
                        }
                }

                if ($del_comments) {
                        $query = "DELETE FROM {$CONFIG['TABLE_COMMENTS']} WHERE pid='$pid'";
                        $result =cpg_db_query($query);
                }

                if ($delete) {
                        $dir=$CONFIG['fullpath'].$pic['filepath'];
                        $file=$pic['filename'];

                        if (!is_writable($dir)) cpg_die(CRITICAL_ERROR, sprintf($lang_errors['directory_ro'], $dir), __FILE__, __LINE__);
    $files=array($dir . $file, $dir . $CONFIG['normal_pfx'] . $file, $dir . $CONFIG['orig_pfx'] . $file, $dir . $CONFIG['thumb_pfx'] . $file, $dir . $CONFIG['mini_pfx'] . $file);
                        //$files=array($dir.$file, $dir.$CONFIG['normal_pfx'].$file, $dir.$CONFIG['thumb_pfx'].$file);
                        foreach ($files as $currFile){
                                if (is_file($currFile)) @unlink($currFile);
                        }

                        $query = "DELETE FROM {$CONFIG['TABLE_PICTURES']} WHERE pid='$pid' LIMIT 1";
                        $result = cpg_db_query($query);
                } else {
                        $query = "UPDATE {$CONFIG['TABLE_PICTURES']} SET $update WHERE pid='$pid' LIMIT 1";
                        $result = cpg_db_query($query);
                }
        }
}

function form_label($text)
{
        global $CURENT_PIC;

        echo <<<EOT
        <tr>
                <td class="tableh2" colspan="3">
                        <b>$text</b>
                </td>
        </tr>

EOT;
}




                               
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Nibbler on August 23, 2006, 09:30:03 pm
Check the output of debug mode immediately after saving and see if the UPDATE query is being run.
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Senator on August 23, 2006, 09:46:36 pm
Sorry, but can you see it for me? iám not very good with mysql.

Here is my debugcode.

Code: [Select]
USER:
------------------
Array
(
    [ID] => 6036ec705c212113cff050268184eca3
    [am] => 1
    [liv] => Array
        (
            [0] => 4462
            [1] => 4461
            [2] => 4460
            [3] => 4459
            [4] => 4455
        )

    [uid] => 181
    [search] => Array
        (
            [search] => annie
            [album] => search
            [title] => on
            [newer_than] =>
            [caption] => on
            [older_than] =>
            [keywords] => on
            [owner_name] => on
            [type] => AND
            [params] => Array
                (
                    [title] => on
                    [caption] => on
                    [keywords] => on
                    [owner_name] => on
                )

        )

    [lang] => english
    [lap] => 1
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => annie
    [groups] => Array
        (
            [0] => 1
        )

    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [ufc_max] => 3
    [ufc_min] => 3
    [custom_user_upload] => 0
    [num_file_upload] => 5
    [num_URI_upload] => 3
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 0
    [has_admin_access] => 1
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [group_name] => Administrators
    [upload_form_config] => 3
    [group_quota] => 0
    [can_see_all_albums] => 1
    [group_id] => 1
)

==========================
Queries:
------------------
Array
(
    [0] => SELECT extension, mime, content, player FROM cpg135_filetypes; (0s)
    [1] => select * from cpg135_plugins order by priority asc; (0s)
    [2] => delete from `sextekort`.cpg135_sessions where time<1156358589 and remember=0; (0.001s)
    [3] => delete from `sextekort`.cpg135_sessions where time<1155152589; (0s)
    [4] => select user_id from `sextekort`.cpg135_sessions where session_id=md5("d770569a5855f59095b0269c638d6b7aab3ccfcb31501c718c90748e5529b79e"); (0s)
    [5] => select user_id as id, user_password as password from `sextekort`.cpg135_users where user_id=1 (0s)
    [6] => SELECT u.user_id AS id, u.user_name AS username, u.user_password AS password, u.avatar_url AS avatar_url, u.enable_admin_email AS notify, u.auto_subscribe_post AS auto_subscribe_post, u.auto_subscribe_comment AS auto_subscribe_comment, u.user_group+100 AS group_id FROM `sextekort`.cpg135_users AS u INNER JOIN `sextekort`.cpg135_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0s)
    [7] => SELECT user_group_list FROM `sextekort`.cpg135_users AS u WHERE user_id='1' and user_group_list <> ''; (0s)
    [8] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM cpg135_usergroups WHERE group_id in (1) (0s)
    [9] => SELECT group_name FROM  cpg135_usergroups WHERE group_id= 1 (0s)
    [10] => update `sextekort`.cpg135_sessions set time='1156362189' where session_id=md5('d770569a5855f59095b0269c638d6b7aab3ccfcb31501c718c90748e5529b79e'); (0s)
    [11] => SELECT user_favpics FROM cpg135_favpics WHERE user_id = 1 (0.001s)
    [12] => DELETE FROM cpg135_mod_online WHERE last_action < NOW() - INTERVAL 10 MINUTE (0s)
    [13] => REPLACE INTO cpg135_mod_online (user_id, user_name, user_ip, last_action) VALUES ('1', 'annie', '83.98.239.43', NOW()) (0s)
    [14] => SELECT count(*) FROM  cpg135_pms WHERE owner=1 (0.002s)
    [15] => SELECT count(*) FROM  cpg135_pms WHERE owner=1 AND showed='0' (0.002s)
    [16] => SELECT count(*) FROM  cpg135_buddy WHERE user_id=1 (0s)
    [17] => SELECT count(*) FROM  cpg135_buddy_req WHERE buddy_to=1 (0s)
    [18] => DELETE FROM cpg135_banned WHERE expiry < '2006-08-23 21:47:57' (0s)
    [19] => SELECT * FROM cpg135_banned WHERE (ip_addr='83.98.239.43' OR ip_addr='83.98.239.43' OR user_id=1) AND brute_force=0 (0s)
    [20] => SELECT title, category FROM cpg135_albums WHERE aid = '51' (0s)
    [21] => SELECT DISTINCT aid, title, IF(category = 0, CONCAT('> ', title), CONCAT(name,' < ',title)) AS cat_title FROM cpg135_albums, cpg135_categories WHERE category < '10000' AND (category = 0 OR category = cid) ORDER BY cat_title (0.001s)
    [22] => SELECT aid, title FROM cpg135_albums WHERE category='10001'  OR category='10001' ORDER BY title (0s)
    [23] => SELECT category, filepath, filename, owner_id FROM cpg135_pictures, cpg135_albums WHERE cpg135_pictures.aid = cpg135_albums.aid AND pid='4202' (0s)
    [24] => UPDATE cpg135_pictures SET aid = '51', title = 'ondanks alles', caption = 'wel oud maar zo heerlijk!!!', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='4202' LIMIT 1 (0s)
    [25] => SELECT category, filepath, filename, owner_id FROM cpg135_pictures, cpg135_albums WHERE cpg135_pictures.aid = cpg135_albums.aid AND pid='4371' (0s)
    [26] => UPDATE cpg135_pictures SET aid = '51', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='4371' LIMIT 1 (0s)
    [27] => SELECT count(*) FROM cpg135_pictures WHERE aid = '51' (0s)
    [28] => SELECT p.*,a.category FROM cpg135_pictures as p INNER JOIN cpg135_albums as a ON a.aid=p.aid WHERE p.aid = '51' ORDER BY p.filename LIMIT 0, 25 (0s)
    [29] => SELECT COUNT(*) FROM cpg135_pictures WHERE approved = 'NO' (0.003s)
    [30] => SELECT aid, title FROM cpg135_albums WHERE category='10001'  OR category='10607' ORDER BY title (0s)
    [31] => SELECT aid, title FROM cpg135_albums WHERE category='10001'  ORDER BY title (0s)
)

==========================
GET :
------------------
Array
(
    [album] => 51
    [start] => 0
    [count] => 25
)

==========================
POST :
------------------
Array
(
    [count] => 25
    [pid] => Array
        (
            [0] => 4202
            [1] => 4371
        )

    [aid4202] => 51
    [title4202] => ondanks alles
    [caption4202] => wel oud maar zo heerlijk!!!
    [keywords4202] =>
    [user14202] =>
    [user24202] =>
    [user34202] =>
    [user44202] =>
    [reset_potd4202] => YES
    [aid4371] => 51
    [title4371] =>
    [caption4371] =>
    [keywords4371] =>
    [user14371] =>
    [user24371] =>
    [user34371] =>
    [user44371] =>
)

==========================
VERSION INFO :
------------------
PHP version: 5.1.4-pl0-gentoo - OK
------------------
mySQL version: 4.0.18
------------------
Coppermine version: 1.4.8(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.28 compatible)
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support: 1
GIF Read Support: 1
GIF Create Support: 1
JPG Support: 1
PNG Support: 1
WBMP Support: 1
XPM Support:
XBM Support: 1
JIS-mapped Japanese Font Support:

==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 0
Active Links 1
Client API version 4.0.18
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/run/mysqld/mysqld.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient 
==========================
Module: zlib
------------------
ZLib Support enabled
Stream Wrapper support compress.zlib://
Stream Filter support zlib.inflate, zlib.deflate
Compiled Version 1.1.4
Linked Version 1.1.4
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | On | On
safe_mode_exec_dir | /home/chroot/home/sites/bin | /home/chroot/home/sites/bin
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | /home/chroot/home/sites/bin | /home/chroot/home/sites/bin
sql.safe_mode | Off | Off
disable_functions | exec,system,shell_exec,popen,chown,chmod,passthru,posix_kill,touch | exec,system,shell_exec,popen,chown,chmod,passthru,posix_kill,touch
file_uploads | On | On
include_path | .:/usr/lib/php:/usr/lib/php/DB:/usr/lib/php/PEAR | .:/usr/lib/php:/usr/lib/php/DB:/usr/lib/php/PEAR
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | no value
sendmail_path | /usr/sbin/sendmail -t -i -fwebmaster@sextekort.nl | /usr/sbin/sendmail -t -i
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30
max_input_time | 60 | 60
upload_max_filesize | 2M | 2M
post_max_size | 8M | 8M
==========================
Page generated in 0.124 seconds - 32 queries in 0.01 seconds - Album set : ; Meta set: ;
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Senator on August 23, 2006, 09:54:51 pm
i thing here is something wrong, but i dont now what.

This is a part of my debugcode

Code: [Select]
[24] => UPDATE cpg135_pictures SET aid = '51', title = 'ondanks alles', caption = 'wel oud maar zo heerlijk!!!', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='4202' LIMIT 1 (0s)
    [25] => SELECT category, filepath, filename, owner_id FROM cpg135_pictures, cpg135_albums WHERE cpg135_pictures.aid = cpg135_albums.aid AND pid='4371' (0s)
    [26] => UPDATE cpg135_pictures SET aid = '51', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='4371' LIMIT 1 (0s)
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: th3m4sk on September 14, 2006, 12:17:45 pm
Dear Fellows,
I got two problems installing this Plugin.
First , when I update the database , all information concerning number of hits etc GONE. The members of my gallery was quit killing me.
Second , I respect all instructions to put my POTW on the first page , and Nothing . I was killing my brain  with no success. More there are two diferent reaction on the IE and Firefox. On both I got the information  the Member so and so but on IE instead of a Pic apperas a X on the Firefox nothing appears.
If there is any person that had already installed this plugin , pls send me a msg I will organize a conttact even by skype or phone to help me.
Tks in advance, and congratulationsfor all efforts on this forum to help us running sujch a beatifull software .

Th3m4sk

Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: modiba on September 28, 2006, 04:57:49 pm
It does not work for me... And I'm using 1.4.8 version... Anyone help?

If anyone has got this hack to work on version 1.4.8 could they please post up how they did it?

Thanks,
Greg
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Gizmo on September 28, 2006, 07:39:56 pm
You should upgrade to 1.4.9 and I've had it running on many earlier versions. I installed it using the instructions set forth by Casper without any modifications. Do you have other plugins installed or using a customized theme?
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: cattivix on September 28, 2006, 09:02:46 pm
hello excused my English are Italian, I have installed this modificasolo that from as she is looked at in my situated http://www.expres.it images are not looked at, task of to have made all exact thanks
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: modiba on September 28, 2006, 10:00:28 pm
You should upgrade to 1.4.9 and I've had it running on many earlier versions. I installed it using the instructions set forth by Casper without any modifications. Do you have other plugins installed or using a customized theme?

Hi Gizmo,

I had it working perfectly on my earlier versions and then when I upgraded to 1.4.8 it wouldn't work.

Today I thought I would try to resolve it so re-installed it following Casper's instructions but I can't move pictures to the Archive and can't set new images as Photo of the Week/Day.

If you have any further advice please help.

I am going to stick at it and try to get it working.

Thanks!
Greg
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Gizmo on September 28, 2006, 11:45:44 pm
Ummm... check out this post and see if this is your problem - http://forum.coppermine-gallery.net/index.php?topic=30741.0 (http://forum.coppermine-gallery.net/index.php?topic=30741.0)
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: modiba on September 29, 2006, 01:02:05 am
Hello,

Thanks for your help. I had already made sure that I had updated index.php

I have upgraded to 1.4.9 and re-installed the POTW hack from scratch.

I still can't set photos as POTW/POTD using the checkboxes in editpics.php

To overcome this problem I seem to be able to display a photo in 'week.php' by going into phpMyAdmin and setting the 'potw' field to '1', from the default '0'.

Could someone tell me what value I need to set the 'potd' field to be in order to display a photo on 'day.php'?
I have tried setting it to '1' and '2' and neither seem to work.

Thank you,
Greg
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: cattivix on September 29, 2006, 09:36:45 am
hello excused my English are Italian, I have installed this modificasolo that from as she is looked at in my situated http://www.expres.it images are not looked at, task of to have made all exact thanks
help me ? :'(
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Gizmo on September 29, 2006, 10:34:32 am
@cattivix, sorry but I don't understand your question and you site is not responding.
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: cattivix on September 29, 2006, 11:20:32 am
excuse you I was making of the tests... now the situated one is online. my problem is that the fotche are not visualized put like photo of the day or the week, I tax the photo as photo of the day but then is not looked at


http://www.expres.it/displayimage.php?pid=46419&fullsize=1 (http://www.expres.it/displayimage.php?pid=46419&fullsize=1)

http://www.expres.it/displayimage.php?pid=46420&fullsize=1 (http://www.expres.it/displayimage.php?pid=46420&fullsize=1)

Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: cattivix on September 30, 2006, 08:49:58 am
 ::)
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Paver on October 03, 2006, 08:18:11 am
I just submitted a plugin conversion of this mod/hack: http://forum.coppermine-gallery.net/index.php?topic=36916.0

The plugin does require one hack to a core script, but it's a simple one-block hack that can be left in without any effect if the plugin is uninstalled.  However, you must apply this hack after every upgrade in order for the "archive" feature to work.

If you have questions about the plugin, please post on the plugin thread (linked above).  Do not discuss the plugin on this thread.
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: campxor on December 07, 2006, 09:01:26 pm
i have installed the plugin but i don't see the photo of the week on my index what do i have to do??
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: Nibbler on December 07, 2006, 09:14:16 pm
Did you read the post above yours?
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: reallyfunny on April 07, 2007, 09:53:07 am
I installed this mod, but when i go to the showdaypic.php or the other files, no pictures apear. Even after i set the potd and send it to the achrive. What happed? how can i fix this?
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: outpatient on September 24, 2007, 03:12:51 am
I'm a little bit confused  ??? , hopefully someone will be able to help me.

Are we suposed to use the plugin version of this mod now? 
Because I installed the mod before I ever made it to that post and it's not working for me.

I'm running 1.4.12
Eyeball for a theme (http://www.saurre.com/galeria) and I'm getting the red X box.

YES, I checked my index.php file
YES, I tried changing the normal_ size of the pictures to make the full sized one appear


I installed without any problems, no errors or anything. And when I browse down to edit the images I can set the pic to POTW, I apply modifications but the picture never shows up and when I browse back to it, it's never checked for POTW.

Please help, this is making my head hurt.
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: n0rb3rt on November 02, 2007, 02:34:54 pm
polish lang :)
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: technozeus on November 19, 2007, 03:32:05 pm
I've installed the plugin but has a problem of a blank page for any post (everytime I try to 'submit' something using a form button I get a blank page returned, I read other topic in this forum with the same problem without solution) so I must disable it.

My question is: this mod, has the same problem? or it work correctly?
Thanks a lot
Title: Re: Photo of the day / week etc, with auto archive albums.
Post by: technozeus on November 22, 2007, 02:12:34 pm
ok, I've done the mod, it works correctly.