Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Meta albums - stopping some info from them.  (Read 4241 times)

0 Members and 1 Guest are viewing this topic.

Steve-R

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
Meta albums - stopping some info from them.
« on: November 08, 2007, 11:55:39 am »

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

Code: [Select]
$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

Code: [Select]
$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

Code: [Select]
$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.
Logged

Nibbler

  • Guest
Logged

Steve-R

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
Re: Meta albums - stopping some info from them.
« Reply #2 on: November 09, 2007, 04:10:28 am »

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
Logged

Nibbler

  • Guest
Re: Meta albums - stopping some info from them.
« Reply #3 on: November 09, 2007, 09:59:17 am »

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.
Logged

Steve-R

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
Re: Meta albums - stopping some info from them.
« Reply #4 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. 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
Logged

Steve-R

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
Re: Meta albums - stopping some info from them.
« Reply #5 on: November 09, 2007, 12:11:08 pm »

rs.php

S
Logged

Nibbler

  • Guest
Re: Meta albums - stopping some info from them.
« Reply #6 on: November 09, 2007, 12:21:25 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?
Logged

Steve-R

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
Re: Meta albums - stopping some info from them.
« Reply #7 on: November 09, 2007, 12:39:26 pm »

Logged

Steve-R

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
Re: Meta albums - stopping some info from them.
« Reply #8 on: November 09, 2007, 01:08:47 pm »

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
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.