coppermine-gallery.com/forum

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: heavensportal on January 16, 2013, 06:46:06 AM

Title: Favorites -- listing of images
Post by: heavensportal on January 16, 2013, 06:46:06 AM
We use this feature immensely at our gallery and several have asked if:

1. Email notifications can be sent when the "faved" owner uploads a new image

2. If there is a way to set the images to show ascending (newest added first) order.

Thanks for the gallery and improvements and help.

gallery: 1.5.22
Title: Re: Favorites -- listing of images
Post by: ΑndrĂ© on January 16, 2013, 04:24:54 PM
Quote from: heavensportal on January 16, 2013, 06:46:06 AM
Email notifications can be sent when the "faved" owner uploads a new image
This isn't possible out of the box. However, it should be possible to add this as a plugin or mod. Side note: unfortunately Coppermine stores the users' favorite pictures in a way it's not possible to get the values with a single database query. Instead, you have to decode the user strings and then again query the database.


Quote from: heavensportal on January 16, 2013, 06:46:06 AM
If there is a way to set the images to show ascending (newest added first) order.
Open include/functions.inc.php, find
ORDER BY pid ASC
and replace with
ORDER BY pid DESC

find
            AND pid IN ($favs)
            AND pid < $pid";

and replace with
            AND pid IN ($favs)
            AND pid > $pid";
Title: Re: Favorites -- listing of images
Post by: heavensportal on January 16, 2013, 06:39:35 PM
Thanks for setting order part and I totally understand about the email part...maybe at some point in time may be added to a future update, if possible.

But for now maybe there is a plugin for it so will go looking.