Meta albums - stopping some info from them. Meta albums - stopping some info from them.
 

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]

Main Menu

Meta albums - stopping some info from them.

Started by Steve-R, November 08, 2007, 11:55:39 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Steve-R

Hi,

I'm trying to edit the meta album "Most voted on Images" (Line 1503 in the included functions.inc.php attached below) so that the albums or aid's "2" and albums "100 to 200" are not added to the list..a little explanation for you.

Album aid 2 is a competition album, and album's 100 to 200 are set aside for moving finished competitions to and I want to display a listing of "Most voted on Images" without the competition results being involved.

I've tried adding


$query = "SELECT COUNT(*) from {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' AND (aid < '2' OR aid > '2') AND (aid < '200' OR aid > '100')  $META_ALBUM_SET";


I've also tried editing the current queries on line 1506 to


$query = "SELECT pid, votes FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' AND (aid < '2' OR aid > '2') AND (aid < '200' OR aid > '100')  $META_ALBUM_SET";


and an edit to line's 1521 query


$query = "SELECT * FROM {$CONFIG['TABLE_PICTURES']} as p WHERE p.pid = '$image' AND (aid < '2' OR aid > '2') AND (aid < '200' OR aid > '100')";


What is it that I am missing? I'm thinking it must be easy to stop some albums results from showing in the list...but I cannot figure it out and request a little help from the coders here.

Many thanks!

Steve.


Steve-R

Thanks for that Nibbler, works great for the display at the gallery.

I'm actually using the meta album "mostvot" for an rss feed, but on the feed it shows ALL, not the displayed content from the gallery thats minus the blocked albums.

Can I ask for support here or do I need to start another topic? (I'm mindfull of the one question per topic rule, but think this is linked)

Regards

S

Nibbler

There is no such thing as a 'mostvot' meta album by default, so it is not surprising the plugin is unaware of it. You will need to adjust where the filters are registered in the plugin and where they are called in functions.inc.php where the 'mostvot' meta album is defined. Shouldn't be too hard - just copy from the code that exists for the regular meta albums.

Steve-R

I have extra meta albums working "mostvot" is one of them, and the unwanted metas is working fine on that section...it blocks the albums I want it too. I have an rss feed that displays this meta album's contents..but the feed shows all the content...even the photos that the unwanted metas are blocking on the home page. So I need to find a way to block albums with aid 2 and also aid's 100 to 200 from displaying in the feed.

I'll attach just the rss feed page here to see if that will help anyone help me, if anyone needs to full rss plugin let me know and I'll zip that up and attach.

S

Steve-R


Nibbler

Quote from: Steve-R on November 09, 2007, 12:10:04 PM
I have extra meta albums working "mostvot" is one of them, and the unwanted metas is working fine on that section...it blocks the albums I want it too

Are you sure?

Can you post a link to your gallery?


Steve-R

For clarification purposes, I've reset everything to use the "top rated" meta album (you can still see the extra one I created at the bottom of the page - "mostvot")

Here is the rss link that works and displays best in Firefox v2 http://www.photocumbria.com/SdGall/rss.php and my gallery link is here http://www.photocumbria.com/SdGall/index.php. If you compare the two you can see "Mouse bits" and "Frogsticks" at the top of the rss page...but they are blocked by "unwanted metas" on the gallery home page.

What I want to be able to do is selctively block albums from showing on the rss page.

S