Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: 1 [2] 3   Go Down

Author Topic: More meta albums for cpg1.5.x  (Read 36591 times)

0 Members and 1 Guest are viewing this topic.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15290
Re: More meta albums for cpg1.5.x
« Reply #20 on: November 06, 2010, 05:15:26 PM »

Sorry I was a little bit briefly and just had a look at the page title and not the title of the table. Seems that something went wrong while creating the package. Please try the updated package from the initial post.
Logged

mipavluk

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Female
  • Posts: 51
    • Scrapping Whispers
Re: More meta albums for cpg1.5.x
« Reply #21 on: November 06, 2010, 08:36:21 PM »

is perfect now!
thanks a lot!
 ;D
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15290
Re: More meta albums for cpg1.5.x
« Reply #22 on: May 06, 2011, 05:03:12 PM »

Version 1.5 attached to initial post. New meta albums 'panorama', 'randalb', 'randuseralb' and 'randpublicalb'.
Logged

profili

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 113
Re: More meta albums for cpg1.5.x
« Reply #23 on: August 22, 2011, 12:23:16 AM »

Something is not working properly here. For the meta album "Movie" it show only the first uploaded videos (in my case 4 videos) and not the new ones. My default order for the thumbnails is data descending.

Another problem is the fact that under the thumbnails is the album name, not the file name.

http://www.galsh.com/
http://www.galsh.com/pic-movie.html
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15290
Re: More meta albums for cpg1.5.x
« Reply #24 on: August 22, 2011, 05:40:28 PM »

For the meta album "Movie" it show only the first uploaded videos (in my case 4 videos) and not the new ones.
Seems to work as expected in my gallery and I also can see 6 videos in your gallery.


My default order for the thumbnails is data descending.
The current version disregards that setting. Maybe it will use it in a future version.


Another problem is the fact that under the thumbnails is the album name, not the file name.
Confirmed.
Logged

profili

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 113
Re: More meta albums for cpg1.5.x
« Reply #25 on: August 22, 2011, 10:44:03 PM »

Quote
The current version disregards that setting. Maybe it will use it in a future version.

Can't you write a hack that would solve this?  :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15290
Re: More meta albums for cpg1.5.x
« Reply #26 on: August 26, 2011, 08:38:26 PM »

Can't you write a hack that would solve this?  :)
Sure, but I'm currently very busy and it's not on top of my to-do list, sorry.
Logged

mayhem72

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: More meta albums for cpg1.5.x
« Reply #27 on: October 25, 2011, 10:52:38 AM »

Hi thanks for this.

Is there a way to show the number of album views under the thumbnail when using 'newalb'? At the moment it is showing the number of views of the image used for the album's thumbnail.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15290
Re: More meta albums for cpg1.5.x
« Reply #28 on: October 25, 2011, 02:35:25 PM »

Version 1.6 (attached to initial post) fixes the thumbnail titles issue and the number of views for the 'newalb' meta album.
Logged

mayhem72

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: More meta albums for cpg1.5.x
« Reply #29 on: October 26, 2011, 10:23:52 AM »

Thank you! Works great ;D
Logged

scifiguy

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: More meta albums for cpg1.5.x
« Reply #30 on: November 14, 2011, 04:31:22 AM »

Can you provide an example of how I use the meta albums this plugin creates? The references I find the docs don't provide any detail.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15290
Re: More meta albums for cpg1.5.x
« Reply #31 on: November 14, 2011, 06:41:19 PM »

You can use them exactly as the built-in meta albums of cpg1.5.x. That means you can add them to "The content of the main page" or access them directly via:
Quote
thumbnails.php?album=<meta album name>
Logged

scifiguy

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: More meta albums for cpg1.5.x
« Reply #32 on: November 15, 2011, 12:08:41 AM »

That's what I thought, but I kept getting critical errors so I thought I must be doing something wrong. I've tested it again and now realize that its only the randalb, randuseralb, and randpublicalb choices that give critical errors (database error) but the others work. I wanted to use randuseralb to pull some pics from user galleries to the home page.

My gallery (bridged with phpbb3) is at: http://speculativevision.com/art/index.php

Works: http://speculativevision.com/art/thumbnails.php?album=portrait

Fails: http://speculativevision.com/art/thumbnails.php?album=randuseralb

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15290
Re: More meta albums for cpg1.5.x
« Reply #33 on: November 15, 2011, 01:01:05 PM »

Please enable debug mode for everyone.
Logged

Hanna.

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 96
Re: More meta albums for cpg1.5.x
« Reply #34 on: November 15, 2011, 06:24:51 PM »

The link in the main post isnt working for me? :/
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15290
Re: More meta albums for cpg1.5.x
« Reply #35 on: November 15, 2011, 07:50:53 PM »

The link in the main post isnt working for me? :/
Works for me as expected. However, this plugin is also available in our plugin download section.
Logged

scifiguy

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: More meta albums for cpg1.5.x
« Reply #36 on: November 15, 2011, 11:06:32 PM »

Debug is on.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15290
Re: More meta albums for cpg1.5.x
« Reply #37 on: November 16, 2011, 11:58:12 AM »

Open codebase.php, find (right at the end)
Code: [Select]
        case 'randalb': // Random albums
        case 'randuseralb': // Random albums in user categories
        case 'randpublicalb': // Random albums in public categories
            $condition = array(
                'randalb' => '',
                'randuseralb' => 'AND a.category > '.FIRST_USER_CAT,
                'randpublicalb' => 'AND a.category < '.FIRST_USER_CAT
            );

            $album_name = cpg_fetch_icon('alb_mgr', 2)." ".$lang_plugin_more_meta_albums[$meta['album'].'_title'];
            if ($CURRENT_CAT_NAME) {
                $album_name .= " - $CURRENT_CAT_NAME";
            }

            $query = "SELECT COUNT(*)
                    FROM {$CONFIG['TABLE_PICTURES']} AS r
                    INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON a.aid = r.aid
                    $RESTRICTEDWHERE
                    AND approved = 'YES'
                    {$condition[$meta['album']]}
                    GROUP BY r.aid
                    HAVING COUNT(r.pid) > 0
                    ORDER BY RAND()";
            $result = cpg_db_query($query);
            $count = mysql_num_rows($result);
            mysql_free_result($result);

            $query = "SELECT p.*
                    FROM {$CONFIG['TABLE_PICTURES']} AS r
                    INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON a.aid = r.aid
                    $RESTRICTEDWHERE
                    AND approved = 'YES'
                    {$condition[$meta['album']]}
                    GROUP BY r.aid
                    HAVING COUNT(r.pid) > 0
                    ORDER BY RAND()
                    {$meta['limit']}";
            $result = cpg_db_query($query);
            $rowset = cpg_db_fetch_rowset($result);
            mysql_free_result($result);

            build_caption($rowset, array('ctime'));
            break;
and replace with
Code: [Select]
        case 'randalb': // Random albums
        case 'randuseralb': // Random albums in user categories
        case 'randpublicalb': // Random albums in public categories
            $condition = array(
                'randalb' => '',
                'randuseralb' => 'AND r.category > '.FIRST_USER_CAT,
                'randpublicalb' => 'AND r.category < '.FIRST_USER_CAT
            );

            $album_name = cpg_fetch_icon('alb_mgr', 2)." ".$lang_plugin_more_meta_albums[$meta['album'].'_title'];
            if ($CURRENT_CAT_NAME) {
                $album_name .= " - $CURRENT_CAT_NAME";
            }

            $query = "SELECT COUNT(*)
                    FROM {$CONFIG['TABLE_PICTURES']} AS p
                    INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS r ON r.aid = p.aid
                    $RESTRICTEDWHERE
                    AND approved = 'YES'
                    {$condition[$meta['album']]}
                    GROUP BY p.aid
                    HAVING COUNT(p.pid) > 0
                    ORDER BY RAND()";
            $result = cpg_db_query($query);
            $count = mysql_num_rows($result);
            mysql_free_result($result);

            $query = "SELECT p.*
                    FROM {$CONFIG['TABLE_PICTURES']} AS p
                    INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS r ON r.aid = p.aid
                    $RESTRICTEDWHERE
                    AND approved = 'YES'
                    {$condition[$meta['album']]}
                    GROUP BY p.aid
                    HAVING COUNT(p.pid) > 0
                    ORDER BY RAND()
                    {$meta['limit']}";
            $result = cpg_db_query($query);
            $rowset = cpg_db_fetch_rowset($result);
            mysql_free_result($result);

            build_caption($rowset, array('ctime'));
            break;
Logged

scifiguy

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: More meta albums for cpg1.5.x
« Reply #38 on: November 16, 2011, 11:21:44 PM »

Worked. Thank you :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15290
Re: More meta albums for cpg1.5.x
« Reply #39 on: November 17, 2011, 04:35:46 PM »

Version 1.7 attached to initial post.

Changelog:
  • Fixed meta albums 'randalb', 'randuseralb', 'randpublicalb'
  • Added meta album 'lastcommented'
  • Added meta album 'toprateda'
Logged
Pages: 1 [2] 3   Go Up
 

Page created in 0.085 seconds with 20 queries.