It would be *outstanding* if I could insert a set or slideshow of group pool photos (not just photos or photosets) using the filters…

In my case, I have photographic lens reviews and would love to include random/recent photos from the associated group pools. I tried, but it seems to pull up some other random images that have nothing to do with the group pool. I can't use sets because they're from multiple users - and in a group pool. Tags might work, but generally include misses in the photos, which I'd like to avoid.

Comments

lolandese’s picture

Version: 7.x-1.4 » 7.x-1.x-dev
Status: Active » Needs review
Issue tags: -filter, -group, -pool
Related issues: +#2227571: Flickr Filter: add support to insert a slideshow of a set
StatusFileSize
new15.06 KB

Attached patch:

  • makes slideshows 'insertable' in the node body by specifying size=x (Flash) or size=y (non-Flash). Only for sets, e.g. [flickr-photoset:id=72157634563269642, size=y]
  • adds a filter for group photos. Try with [flickr-group:id=91484156@N00]. Only the Flash slideshow is available on this type of filter, whatever size you specify.
  • fixes a hiccup in the 'recent photos from group' block.

Based on the patch in #2227571: Flickr Filter: add support to insert a slideshow of a set.

mholve’s picture

Well how cool is that? I'll apply the patch, give it a try and report back. Thanks!

mholve’s picture

Worked well on all but one file:

patching file block/flickr_block.module
patching file field/flickrfield.module
patching file filter/flickr_filter.module
Hunk #3 FAILED at 115.
1 out of 3 hunks FAILED -- saving rejects to file filter/flickr_filter.module.rej
patching file flickr.api.inc
patching file flickr.inc
patching file flickr.module
patching file sets/flickr_sets.module

Reject file contains:

--- filter/flickr_filter.module
+++ filter/flickr_filter.module
@@ -115,12 +116,60 @@
if (!isset($config['size'])) {
$config['size'] = variable_get('flickr_default_size', 'm');
}
- return theme('flickr_photoset', array(
- 'photoset' => $photoset,
- 'owner' => $photoset['owner'],
- 'size' => $config['size'],
- 'attribs' => $attribs,
- ));
+ switch ($config['size']) {
+ case "x";
+ return theme('flickr_photoset_flickrcomslideshow', array(
+ 'id' => $photoset['id'],
+ ));
+ break;
+ case "y";
+ return theme('flickr_photoset_flickrcomslideshow_simple', array(
+ 'id' => $photoset['id'],
+ ));
+ break;
+ default:
+ return theme('flickr_photoset', array(
+ 'photoset' => $photoset,
+ 'owner' => $photoset['owner'],
+ 'size' => $config['size'],
+ 'attribs' => $attribs,
+ ));
+ }
+ }
+ }
+ return '';
+}
+
+/**
+ * Filter callback for a group.
+ */
+function flickr_filter_callback_group($matches) {
+ list($config, $attribs) = flickr_filter_split_config($matches[1]);
+
+ if (isset($config['id'])) {
+ if ($photoset = flickr_get_group_photos($config['id'])) {
+ if (!isset($config['size'])) {
+ $config['size'] = variable_get('flickr_default_size', 'm');
+ }
+// switch ($config['size']) {
+// case "x";
+ return theme('flickr_photoset_flickrcomslideshow', array(
+ 'id' => $config['id'],
+ ));
+// break;
+// case "y";
+// return theme('flickr_photoset_flickrcomslideshow_simple', array(
+// 'id' => $config['id'],
+// ));
+// break;
+// default:
+// return theme('flickr_photoset', array(
+// 'photoset' => $photoset,
+// 'owner' => $photoset['owner'],
+// 'size' => $config['size'],
+// 'attribs' => $attribs,
+// ));
+// }
}
}
return '';

lolandese’s picture

Applies cleanly, see my terminal output below. Try to follow the same steps, using the git version.

Thanks.

martin@martin-X501A1:~/www/temp$ git clone --branch 7.x-1.x http://git.drupal.org/project/flickr.git
Cloning into 'flickr'...
remote: Counting objects: 1073, done.
remote: Compressing objects: 100% (697/697), done.
remote: Total 1073 (delta 738), reused 543 (delta 373)
Receiving objects: 100% (1073/1073), 255.18 KiB | 160 KiB/s, done.
Resolving deltas: 100% (738/738), done.
martin@martin-X501A1:~/www/temp$ cd flickr
martin@martin-X501A1:~/www/temp/flickr$ wget https://drupal.org/files/issues/flickr_filter_group_pool_slideshow-2229255-1.patch
--2014-03-31 16:55:21--  https://drupal.org/files/issues/flickr_filter_group_pool_slideshow-2229255-1.patch
Resolving drupal.org (drupal.org)... 140.211.10.62, 140.211.10.16
Connecting to drupal.org (drupal.org)|140.211.10.62|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15424 (15K) [text/plain]
Saving to: `flickr_filter_group_pool_slideshow-2229255-1.patch'

100%[=============================================================================================================>] 15,424      61.4K/s   in 0.2s    

2014-03-31 16:55:22 (61.4 KB/s) - `flickr_filter_group_pool_slideshow-2229255-1.patch' saved [15424/15424]

martin@martin-X501A1:~/www/temp/flickr$ ls
block  filter            flickr.api.inc  flickr_filter_group_pool_slideshow-2229255-1.patch  flickr.info     flickr.module  sets
field  flickr.admin.inc  flickr.css      flickr.inc                                          flickr.install  README.txt     tags
martin@martin-X501A1:~/www/temp/flickr$ git apply -v flickr_filter_group_pool_slideshow-2229255-1.patch
Checking patch block/flickr_block.module...
Checking patch field/flickrfield.module...
Checking patch filter/flickr_filter.module...
Checking patch flickr.api.inc...
Checking patch flickr.inc...
Checking patch flickr.module...
Checking patch sets/flickr_sets.module...
Applied patch block/flickr_block.module cleanly.
Applied patch field/flickrfield.module cleanly.
Applied patch filter/flickr_filter.module cleanly.
Applied patch flickr.api.inc cleanly.
Applied patch flickr.inc cleanly.
Applied patch flickr.module cleanly.
Applied patch sets/flickr_sets.module cleanly.
martin@martin-X501A1:~/www/temp/flickr$ 
mholve’s picture

Ahh, that worked! I used patch rather than git for patching. Followed the steps above - and got a clean patch. Installed and will test...

Thanks! :)

mholve’s picture

Progress! The modified group filter works - sort of. I created test content with:

[flickr-group:id=16655495@N00, size=x]

...but it doesn't seem to scale to the width of the content area, and no controls, etc. are visible. I tried Mac OS X Safari (sort of works) and Firefox (displays nothing) and Windows IE (works in between the two).

You can test it here: http://lavidaleica.com/content/test

mholve’s picture

Windows Firefox also displays nothing.

lolandese’s picture

You're right. I've overlooked something. Sorry.

Try to substitute line 547 in flickr.module with:
return '<div class="flickr-photoset-slideshow"><object type="application/x-shockwave-flash" data="https://www.flickr.com/apps/slideshow/show.swf?v=140556"><param name="movie" value="https://www.flickr.com/apps/slideshow/show.swf?v=140556"></param><param name="flashvars" value="offsite=true&lang=en-us&page_show_url=%2Fgroups%2F' . $id . '%2Fpool%2Fshow%2F&page_show_back_url=%2Fgroups%2F' . $id . '%2Fpool%2F&group_id=' . $id . '&jump_to=&start_index="></param><param name="allowFullScreen" value="true"><param name="wmode" value="opaque" /></param></object></div>';

Thanks.

mholve’s picture

Hmm, didn't seem to make any difference.

lolandese’s picture

StatusFileSize
new304.01 KB

I grabbed the generated HTML from your site (see below) and pasted it in a local test site running Responsive Bartik D7 where it shows and works just fine (see image).

I suspect it's a theme issue. What theme are you using? Have you set the text filter to 'Full HTML'?

<div class="flickr-photoset-slideshow"><object type="application/x-shockwave-flash" data="https://www.flickr.com/apps/slideshow/show.swf?v=140556"><param name="movie" value="https://www.flickr.com/apps/slideshow/show.swf?v=140556"><param name="flashvars" value="offsite=true&amp;lang=en-us&amp;page_show_url=%2Fgroups%2F16655495@N00%2Fpool%2Fshow%2F&amp;page_show_back_url=%2Fgroups%2F16655495@N00%2Fpool%2F&amp;group_id=16655495@N00&amp;jump_to=&amp;start_index="><param name="allowFullScreen" value="true"><param name="wmode" value="opaque"></object></div>

mholve’s picture

Ugh. Just my luck, eh? I'm using the Andromeda theme.

Yes, added to the Full HTML text format.

I do recall having oddness with the Flash slideshows in testing; non-Flash worked fine. Any chance of a non-Flash version?

lolandese’s picture

Strangely enough this works:
<div class="flickr-photoset-slideshow"><object type="text/html" data="https://www.flickr.com/slideShow/index.gne?group_id=&amp;user_id=98518260@N02&amp;set_id=&amp;text="></object></div>

..but this doesn't work:
<div class="flickr-photoset-slideshow"><object type="text/html" data="https://www.flickr.com/slideShow/index.gne?group_id=16655495@N00&amp;user_id=&amp;set_id=&amp;text="></object></div>

Try to copy and paste into your test site. I can't find much about it in the Flickr forum. It will be appreciated if you can do a more extensive search as i would prefer this solution also for groups.

As an alternative we could implement http://manos.malihu.gr/simple-jquery-fullscreen-image-gallery/ or some other jQuery gallery that maybe is touch enabled (swipe). It should be GNU GPL licensed or compatible. In any case it would take some time to come up with something.

mholve’s picture

Yes, that top one works, at least better. Something shows up, even in Linux Firefox. Still not full-width and the controls are missing, as are the thumbnails below. I've updated the test page with all three examples.

I'll see what I can find also. JQuery for a gallery would be nice as it's built into Drupal, and one that's touch friendly is an additional bonus. Plus, you know, no Flash. :p

So weird, and so frustrating. I'm beginning to think this theme has it out for me. I've been searching for a new one; the problem is finding one that won't require massive work - and supports all the current features, etc. I've narrowed it down somewhat.

lolandese’s picture

StatusFileSize
new756 bytes

Somehow the changes I made to flickr.css didn't go into the patch. Override it with the extracted attached file.

Sorry (again).

mholve’s picture

Behold - it WORKS! Using just the filter, with Flash.

Thanks so much for your help! :)

lolandese’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new15.06 KB

Good. I guess this is RTBC then. New patch attached that includes #8.

#14 was already in the dev. When doing testing for issues always make sure you use the latest version of dev or, even better, git. Having your test URL to inspect things helped though to find out why it didn't work for you.

Thanks for the cooperation.

  • Commit cf3393b on 7.x-1.x by lolandese:
    Issue #2229255 by mholve: Flickr Filter group pool slideshow.
    
lolandese’s picture

Status: Reviewed & tested by the community » Fixed
lolandese’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Fixed » Patch (to be ported)
lolandese’s picture

TO DO: Update README.txt and online module documentation.

mholve’s picture

Glad to help lolandese - thank YOU for all your help and support!

lolandese’s picture

Title: Group Pools Added to Filters » Add slideshows to filters, sets and group pools
lolandese’s picture

Title: Add slideshows to filters, sets and group pools » Add slideshows to filters (sets and group pools)

  • Commit 4cf6290 on 7.x-1.x by lolandese:
    Issue #2229255 by mholve: Avoid that the slideshow size can be used for...
lolandese’s picture

Status: Patch (to be ported) » Closed (won't fix)
lolandese’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Closed (won't fix) » Closed (fixed)

Setting this back to D7 and being 'fixed (closed)'.

Main reason is the fact that links to this issue show the status on hover without revealing the version (6 or 7). This might give the impression that the mentioned issue will not be solved, while in fact it is already fixed for the D7 version. 'Fixed (closed)' reflects the current status correctly for D7. 'Closed (won't fix)' is only valid for the minimally maintained D6 version of the module.