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] 2   Go Down

Author Topic: Group Pictures plugin  (Read 53225 times)

0 Members and 1 Guest are viewing this topic.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Group Pictures plugin
« on: July 23, 2009, 09: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.
« Last Edit: July 23, 2009, 09:29:10 am by eenemeenemuu »
Logged

Stevo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 86
Re: Group Pictures plugin
« Reply #1 on: September 09, 2009, 05: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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Group Pictures plugin
« Reply #2 on: September 10, 2009, 10: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é

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Group Pictures plugin
« Reply #3 on: September 10, 2009, 11:49:12 am »

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

Then, find
Code: [Select]
           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: [Select]
           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
  • **
  • Offline Offline
  • Posts: 86
Re: Group Pictures plugin
« Reply #4 on: September 10, 2009, 01:04:45 pm »

Thx, looks oke now.
Logged

Inspired101

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Group Pictures plugin
« Reply #5 on: October 03, 2009, 09: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é

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Group Pictures plugin
« Reply #6 on: October 03, 2009, 10:39:29 pm »

themes/sample/theme.php
Logged

Inspired101

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Group Pictures plugin
« Reply #7 on: October 04, 2009, 02:01:21 am »

Thanks it worked!!
Logged

friendjain1

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Group Pictures plugin
« Reply #8 on: November 14, 2009, 05: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é

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Group Pictures plugin
« Reply #9 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?
Logged

friendjain1

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Group Pictures plugin
« Reply #10 on: November 14, 2009, 07: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
Logged

friendjain1

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Group Pictures plugin
« Reply #11 on: November 14, 2009, 07:52:10 pm »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Group Pictures plugin
« Reply #12 on: November 16, 2009, 09:56:33 am »

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

Stevo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 86
Re: Group Pictures plugin
« Reply #13 on: August 15, 2010, 03:06:04 pm »

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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Group Pictures plugin
« Reply #14 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é
Logged

Stevo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 86
Re: Group Pictures plugin
« Reply #15 on: August 15, 2010, 10:57:28 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é
Logged

Stevo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 86
Re: Group Pictures plugin
« Reply #16 on: October 30, 2010, 05:33:05 am »

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


Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Group Pictures plugin
« Reply #17 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.
Logged

Stevo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 86
Re: Group Pictures plugin
« Reply #18 on: October 30, 2010, 11:17:52 pm »

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
Logged

Stevo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 86
Re: Group Pictures plugin
« Reply #19 on: November 02, 2010, 05:42:30 pm »

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??


Logged
Pages: [1] 2   Go Up
 

Page created in 0.039 seconds with 20 queries.