Group Pictures plugin Group Pictures plugin
 

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

Group Pictures plugin

Started by Αndré, July 23, 2009, 09:05:08 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Αndré

I made this plugin for Stevo:
Quote from: Stevo on July 10, 2009, 05:04:30 PM
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.

Stevo

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

Joachim Müller

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.

Αndré

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

Then, find
           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
           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']
                   );
           }

Stevo


Inspired101

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?

Αndré


Inspired101


friendjain1

@Α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

Αndré

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

friendjain1

Quote from: Αndré on November 14, 2009, 06:31:53 PM
Am I right that you want to display the file name below the thumbnails in the intermediate view?

Yes, u are right

friendjain1

I mean title or file name so that viewers can judge "what file is all about".

Αndré

Open codebase.php, find
            $new_html .= "<a href=\"displayimage.php?pos=-{$row['pid']}\"><img src=\"".get_pic_url($row, 'thumb')."\" class=\"image\" /></a>";
and replace with
            $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>";

Stevo

Quote from: Αndré on July 23, 2009, 09:05:08 AM
I made this plugin for Stevo:

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.


Dear André,
Do you think this could work (or you could make it work) with the latest coppermine version??

I'm still using this plugin and I love it.

Stevo

Αndré

Hi Stevo,

I'll have a look at the code soon if it can be ported easily.


Regards
André

Stevo

Quote from: Αndré on August 15, 2010, 07:10:58 PM
Hi Stevo,

I'll have a look at the code soon if it can be ported easily.


Regards
André

That would be nice.
Thx André

Stevo

Dear André,

I have a problem.
I installed the cpg 1.4.25 again and made a new database because I had some problem with my old database.

Everything is running again but not the group pictures plugin. When I install it, I can see it in admin mode, but in guestmode I have a blank page.
I changed the search.inc and functions.inc as was mentioned in the readme
When I delete the plugin in the database, I see my gallery again.


What can I do, because this plugin is important for me.
Can you help me please
cpg is running good, only the plugin is not working for me.

http://www.stevo.be/gallery



Αndré

A blank page is nothing I can work with. I suggest to update to the most recent release of cpg1.4.x (cpg1.4.27), check again if the modifications of the core files are correct and if no plugin file is corrupt. I cannot confirm your issue yet, as I currently don't have a cpg1.4.x testbed.

Stevo

André,

Will update soon.
Only problem I have now is that something changed between 1.4.25 and 1.4.27 for the image_processor.php

http://forum.coppermine-gallery.net/index.php/topic,35263.msg335978.html#msg335978

Stevo

Quote from: Αndré on October 30, 2010, 11:39:44 AM
A blank page is nothing I can work with. I suggest to update to the most recent release of cpg1.4.x (cpg1.4.27), check again if the modifications of the core files are correct and if no plugin file is corrupt. I cannot confirm your issue yet, as I currently don't have a cpg1.4.x testbed.
core files are correct and I downloaded plugin again.
When I'm in admin mode, the plugin is working without any problem but when I logout, I have a blank screen.

Is there a way that I can read what is going wrong so you can understand the problem.
I know I still have to upgrade to cpg1.4.27, but I also know it was working for cpg1.4.25

If you want, I have a cpg1.4.x testbed but can I post logindetails here on forum??

Do you have an idea this can work also in 1.5.x??