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] 2 3 4 5   Go Down

Author Topic: Photo of the day / week etc, with auto archive albums.  (Read 111687 times)

0 Members and 1 Guest are viewing this topic.

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Photo of the day / week etc, with auto archive albums.
« 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.

« Last Edit: July 10, 2005, 11:52:32 am by GauGau »
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

onuzu

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
« Reply #1 on: February 13, 2005, 11:48:51 pm »

I didn't find editpics.php
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
« Reply #2 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?
Logged

MonkeyManx

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 45
Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
« Reply #3 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]);
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
« Reply #4 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]);
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
« Reply #5 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
Logged

MonkeyManx

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 45
Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
« Reply #6 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?
« Last Edit: April 14, 2005, 09:27:41 pm by MonkeyManx »
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
« Reply #7 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 $
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

MonkeyManx

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 45
Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
« Reply #8 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 $
Logged

MonkeyManx

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 45
Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
« Reply #9 on: April 15, 2005, 06:15:17 pm »

Is this automated, or must you move the current potd to the archive each day?
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
« Reply #10 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.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

MonkeyManx

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 45
Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
« Reply #11 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.
Logged

photoshopabuser

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 20
  • Just Havin Fun
    • rocklobsters.net
Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
« Reply #12 on: May 05, 2005, 02:31:01 pm »

I have attempted to put this in my 1.33 gallery at 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
« Last Edit: May 05, 2005, 02:46:19 pm by photoshopabuser »
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
« Reply #13 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.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

photoshopabuser

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 20
  • Just Havin Fun
    • rocklobsters.net
Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
« Reply #14 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.... :-[
Logged

photoshopabuser

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 20
  • Just Havin Fun
    • rocklobsters.net
Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
« Reply #15 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!
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
« Reply #16 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);
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

photoshopabuser

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 20
  • Just Havin Fun
    • rocklobsters.net
Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
« Reply #17 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!
Logged

leotan

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
« Reply #18 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?
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: 1.3x 1.4x Photo of the day / week etc, with auto archive albums.
« Reply #19 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.

Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here
Pages: [1] 2 3 4 5   Go Up
 

Page created in 0.025 seconds with 20 queries.