Support Forum Project Downloads FAQ Documentation About Demo Tutorials Blog Plugins
November 21, 2009, 05:16:30 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Private messages disabled
Caused by the massive abuse of the PM system in the past, the sending of personal messages has been disabled for all regular users on the Coppermine forum.
[more]
   Home   Help Search Board rules Login Register  
Pages: [1]   Go Down
  Send this topic  |  Print  
Author Topic: Group Pictures plugin  (Read 2408 times)
0 Members and 1 Guest are viewing this topic.
Αndré Topic starter
Dev Team member
****
Gender: Male
Germany Germany

Posts: 2014



« on: July 23, 2009, 08:05:08 am »

I made this plugin for Stevo:
I love shipspotting. On my website http://www.stevo.be I have about 930 pictures.

Sometimes I take a new picture from a vessel that's better then the one I have on the website.
Yes, I can replace, but I like to put the new picture together with the already existing pictures, without counting the pictures. (930 pictures = 930 vessels)

So when I click on a thumbnail, I want to get on a page with the picture and file information and next to that picture I want some thumbnails with other shots I have for same vessel.


It groups pictures by user selectable database fields. In the thumbnail view only the latest picture is shown and the number of grouped pictures is added to the title. See attached screenshot of intermediate view or see the script in action here.

The plugin is fitted to Stevo's website, so there are some words like 'vessel' which could of course be changed.


Note: this is not a 'real' plugin, because you have to add a few lines to two core files. Installation instructions are included in the plugin package.

* cpg1.4.x_plugin_group_pictures_v1.0.zip (4.19 KB - downloaded 104 times.)

* group_pictures.jpg (86.58 KB, 602x649 - viewed 229 times.)
« Last Edit: July 23, 2009, 08:29:10 am by eenemeenemuu » Logged

Stevo
Coppermine regular visitor
**
Belgium Belgium

Posts: 65


« Reply #1 on: September 09, 2009, 04:40:47 pm »

André,

Hope you can help me with follow problem.

If you go to http://www.stevo.be/thumbnails.php?album=5 you see my dredgers (see attachement)

When I click on Vlaanderen I, I see Goliath (http://www.stevo.be/displayimage.php?album=5&pos=2)

Problem is that Vlaanderen I is thirth picture in row, but uploaded I have 1) Shoreway - 2) Shoreway - 3) Goliath - 4) Vlaanderen I

Thx in advance,

Stevo


* problem.jpg (29.33 KB, 666x270 - viewed 137 times.)
Logged
Joachim Müller
Administrator
*****
Gender: Male
Germany Germany

Posts: 45051


aka "GauGau"


WWW
« Reply #2 on: September 10, 2009, 09:40:10 am »

Actual deep link to a particular pic would be absolute, not relative, so the deep link to the Goliath would be http://www.stevo.be/displayimage.php?pos=-1319
But I can see and confirm your issue, the reference between the thumbnail and the target is off by one.
Logged
Αndré Topic starter
Dev Team member
****
Gender: Male
Germany Germany

Posts: 2014



« Reply #3 on: September 10, 2009, 10:49:12 am »

Copy the function theme_display_thumbnails to themes/<your_theme>/theme.php, if it does not exist.

Then, find
Code:
           if ($aid == 'lastalb') {
                $params = array('{CELL_WIDTH}' => $cell_width,
                    '{LINK_TGT}' => "thumbnails.php?album={$thumb['aid']}",
                    '{THUMB}' => $thumb['image'],
                    '{CAPTION}' => $thumb['caption'],
                    '{ADMIN_MENU}' => $thumb['admin_menu']
                    );
            } else {
                $params = array('{CELL_WIDTH}' => $cell_width,
                    '{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&amp;pos={$thumb['pos']}$uid_link",
                    '{THUMB}' => $thumb['image'],
                    '{CAPTION}' => $thumb['caption'],
                    '{ADMIN_MENU}' => $thumb['admin_menu']
                    );
            }
and replace with
Code:
           if ($aid == 'lastalb') {
                $params = array('{CELL_WIDTH}' => $cell_width,
                    '{LINK_TGT}' => "thumbnails.php?album={$thumb['aid']}",
                    '{THUMB}' => $thumb['image'],
                    '{CAPTION}' => $thumb['caption'],
                    '{ADMIN_MENU}' => $thumb['admin_menu']
                    );
            } elseif (is_numeric($aid)) {
                $params = array('{CELL_WIDTH}' => $cell_width,
                    '{LINK_TGT}' => "displayimage.php?pos=-{$thumb['pid']}",
                    '{THUMB}' => $thumb['image'],
                    '{CAPTION}' => $thumb['caption'],
                    '{ADMIN_MENU}' => $thumb['admin_menu']
                    );
            } else {
                $params = array('{CELL_WIDTH}' => $cell_width,
                    '{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&amp;pos={$thumb['pos']}$uid_link",
                    '{THUMB}' => $thumb['image'],
                    '{CAPTION}' => $thumb['caption'],
                    '{ADMIN_MENU}' => $thumb['admin_menu']
                    );
            }
Logged

Stevo
Coppermine regular visitor
**
Belgium Belgium

Posts: 65


« Reply #4 on: September 10, 2009, 12:04:45 pm »

Thx, looks oke now.
Logged
Inspired101
Coppermine newbie

United States United States

Posts: 5


« Reply #5 on: October 03, 2009, 08:54:12 pm »

Hi Αndré,

I am also using your Group Pictures plugin. It is working fine except the album links. When I click on picture 1, I see picture 3 on the next page. Similar to what Steveo said above.

I'm trying to follow your directions on the theme_display_thumbnails post... Where do I find the code for that to copy over to my theme.php?
Logged
Αndré Topic starter
Dev Team member
****
Gender: Male
Germany Germany

Posts: 2014



« Reply #6 on: October 03, 2009, 09:39:29 pm »

themes/sample/theme.php
Logged

Inspired101
Coppermine newbie

United States United States

Posts: 5


« Reply #7 on: October 04, 2009, 01:01:21 am »

Thanks it worked!!
Logged
friendjain1
Coppermine newbie

Posts: 7


« Reply #8 on: November 14, 2009, 04:24:19 pm »

@Αndré

Thank you for such a beautiful plugin.
But my question is that can we display the name of file below the files in group.
Like we display in thumbnail view.

Thanks
Logged
Αndré Topic starter
Dev Team member
****
Gender: Male
Germany Germany

Posts: 2014



« Reply #9 on: November 14, 2009, 05:31:53 pm »

Am I right that you want to display the file name below the thumbnails in the intermediate view?
Logged

friendjain1
Coppermine newbie

Posts: 7


« Reply #10 on: November 14, 2009, 06:50:09 pm »

Am I right that you want to display the file name below the thumbnails in the intermediate view?

Yes, u are right


* TITLE.JPG (55.04 KB, 745x502 - viewed 11 times.)
Logged
friendjain1
Coppermine newbie

Posts: 7


« Reply #11 on: November 14, 2009, 06:52:10 pm »

I mean title or file name so that viewers can judge "what file is all about".
Logged
Αndré Topic starter
Dev Team member
****
Gender: Male
Germany Germany

Posts: 2014



« Reply #12 on: November 16, 2009, 08:56:33 am »

Open codebase.php, find
Code:
            $new_html .= "<a href=\"displayimage.php?pos=-{$row['pid']}\"><img src=\"".get_pic_url($row, 'thumb')."\" class=\"image\" /></a>";
and replace with
Code:
            $title = $row['title'] ? $row['title'] : $row['filename'];
            $new_html .= "<span style=\"display:inline-block; text-align:center; padding-right:8px;\"><a href=\"displayimage.php?pos=-{$row['pid']}\"><img src=\"".get_pic_url($row, 'thumb')."\" class=\"image\" /></a><br />$title</span>";
Logged

Pages: [1]   Go Up
  Send this topic  |  Print  
 
Jump to:  

Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
Page created in 0.122 seconds with 17 queries.