Hi - I would like to be able to have a block read from different photosets depending on which particular page the block is being shown.
I cannot think how to do this using the predefined blocks that installs with this module.
I have attempted this by creating a content type and a node per photoset and using views, which gets me some of the way there, but with this approach I cannot limit or specify a random number of images to be shown from the photoset.
Any suggestions would be appreciated.
Regards
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | flickr_block.module.zip | 3.14 KB | michael_clark |
Comments
Comment #1
michael_clark commentedI am attempting to accomplish the same thing. However, I am wanting to have 4 blocks on one page that all display a different random photo from 4 different photo sets. I am creating a high school theme and want each grade to have a random picture displayed.
Comment #2
michael_clark commentedWanted to note that I am trying to do with Drupal 7.
I thought I might have found a solution with MultBlock, but it doesn't appear to be working nicely with the flickr module.
http://drupal.org/project/multiblock
Comment #3
michael_clark commentedI figured out a way to hack the module, which I am sure is not the ideal system... In any event I just opened up the "flickr_block.module" file and duplicated all instances of the block that I was interested in. I just gave the additional blocks a different name. I would be available to help the developer with ways that I would like to see the module behave with regards to additional blocks.
Comment #4
areikiera commentedThanks for the tip, michael_clark! Used the same approach with D7 and worked great!
Comment #5
lolandese commentedMoving this to D7 as it is mentioned several times above.
Most viable option seems to make use of the Multiblock module. Patches are welcome for a new 7.x-2.x branch that can include also some other patches that add dependency on other modules (#907164: Integrate with Flickr API) or consist of a major change (#1128612: Big Flickr Field changes to D7).
To aggregate similar requests, we have tagged some other issues as duplicates of this one:
Have a look also at the work done here:
Thanks.
Comment #6
lolandese commentedWaiting for a commit in the MultiBlock module at #1370966: Wrong parameters, can't make config per instance.
Comment #7
lolandese commentedAnother possible solution to investigate:
Make a form 'Create Flickr Block', store the data in a DB table and create blocks programmatically based on that. Fields to include in the form:
text: user/group/set ID (general setting if empty)
radio: recent/random (required, defaults to recent)
text: number of images (general setting if empty)
text: size (general setting if empty)
radio: all/photos/videos(required, defaults to photos).
The proposed solution at https://drupal.org/comment/8645273#comment-8645273 would make this obsolete as all blocks can then be created through Views, having the other advantage that arguments could be used in combination with all kind of slideshows and it would allow for translations of Flickr titles and descriptions as well.
More info:
https://drupal.org/search/site/create%20blocks%20programmatically?f[0]=s...
How can I create a block programmatically, then assign a term to it? | Drupal.org
Comment #8
lolandese commentedFYI:
This is somehow possible now in the dev version for most blocks, but based on Flickr tags instead of sets. See #2024133: Display photos based on Flickr tags
Renaming title based on the proposal of #7 that seems would satisfy the OP request.
Comment #9
lolandese commentedChanging title back to original.
The original request is now possible thanks to #383792: Additional parameters for a filter tag by creating a new block and using a text filter that uses the Flickr Filter, such as
[flickr-photoset:id=72157634563269642,size=s,num=8,media=all,random=true,count=false].Furthermore that way you can now:
If you use a photo size one step bigger than the block width, it will automatically limit the image width to that of the block, without leaving adjacent whitespace.
Use the block's visibility settings to specify what pages it should show on. Don't use a block title, as this is added already. If you don't want that, use parameter
heading=none.Thanks.