Added a new feature to allow filtering of Media Type in block config. Now you have the ability to choose if you want a block of Videos, Photos or Both..

Media Type Patch

(incorporates this feature request https://drupal.org/node/1820508)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lolandese’s picture

Status: Patch (to be ported) » Needs review

Thanks dakku.

Tagged #1820508: Broken video links in Flickr blocks as a duplicate of this one.

lolandese’s picture

Status: Needs review » Fixed

Thank you for helping out here dakku. It's much appreciated.

Tested and committed: https://drupal.org/commitlog/commit/2102/83d01939183c144343a48e36aea4d6a...

dakku’s picture

No problem :)
I had been meaning to add a few features for my own website anyway, glad to be of some help :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

lolandese’s picture

lolandese’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Issue summary: View changes
Status: Closed (fixed) » Patch (to be ported)

To backport to D6.

lolandese’s picture

Status: Patch (to be ported) » Fixed
lolandese’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Fixed » Needs work

Media type on images in sets seems to be ignored.

Thanks.

lolandese’s picture

If the Flickr Sets sub-module is enabled, on block nr. 1 'User recent sets' and block nr. 4 'Recent sets from user' a series of images gets displayed of the set that can be of both media types. (photo/video). Thus the media field applies. Now it results in 'undefined index' errors.

Patch fixes the issue. To do also for D6.

lolandese’s picture

lolandese’s picture

Status: Needs work » Needs review
FileSize
27.09 KB
lolandese’s picture

Attached patch:

  • respects media type settings 'all', 'photos' or 'videos' for all the blocks
  • adds the translatable term '(VIDEO)' to the image title caption if it's a video and the word 'video' is not already included in the title (not only for images in the blocks, but for all Flickr images)
  • replaces the word 'photos' in the block title with 'videos' if we selected 'videos' as the media type.
  • uses functions of flickr.api.inc instead of making direct flickr requests.

The code used in flickr_block.module for the function _flickr_block_tag_random isn't the most efficient, due to a possible Flickr API bug. See:
https://groups.yahoo.com/neo/groups/yws-flickr/conversations/messages/8692

lolandese’s picture

Attached patch:

  • as above
  • make extra links to the Flickr maps optional in the settings
  • data about the number of photos for the user, group or set available on Flickr
  • make the display of this data optional in the settings.
lolandese’s picture

Problem in the last patch was that the number of photos to display as set in the block configuration was used. In reality the real number available on Flickr can be inferior, leading to incorrect data.

Attached patch makes use of the real number of displayed images. This data is only available after rendering them, thus this line is moved to the bottom of the block. Personally we even prefer this.

  • Commit 3b61c6c on 7.x-1.x by lolandese:
    Issue #2023103 by dakku: Respect media types for all blocks and added...
lolandese’s picture

Status: Needs review » Fixed
FileSize
66.63 KB

Added:

  • numbers of photosets
  • some css to separate sets between each other
  • corrected bugs for 'no results'.

http://drupalcode.org/project/flickr.git/commitdiff/3b61c6c

lolandese’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Fixed » Patch (to be ported)
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.