Hi,

Having looked at the tag-related feature requests on here that appear to be 'fixed', I'm a little confused as to whether what we need already exists (so apologies if that's the case, but am sure it's not following discussion with Paul B).

Essentially, we're looking to display photos from our Flickr collection based on their Flickr tags. At the moment, I believe the module only enables photos to be displayed based on specific IDs or sets. This functionality also needs to be specific to individual pages, e.g. we would want to display 'event' photos on our event page and 'activity' photos on our acitivyt page (and so not 'event' photos across the whole site, wherever the block is placed).

Out IT guy explained it thus: we need a field type similar to that used by the existing flickr module photo set; one that can be attached to any content type but allows the input of one or more flickr tags (as opposed to just single photo or set as is currently the case). As with the existing flickr photo set, we also need a content pane/block to present a random flickr photo based on the tag(s) specified.

Ideally, on the content creation/edit form, the user would be presented with a list of qualified tags pulled from the flickr account. Failing that, tags entered should be validated as having one or more flickr photos from the specified account on form submission.

As is the case with the standard module, when images are clicked on, a new page should open on the main flickr site showing this image (with the usual related set/tag based images).

We started work on this with Paul a long time ago, but were unable to complete at the time (our bad); but are now looking to resurrect the project for the new site design we have nearly completed - so would be great to have this 'like yesterday' if it's only a small amount of work ;)

PS Paul has just updated the flickr_block.module file that in theory should achieve at least some of the above, but mentioned it is based on the old module, so might need tweaking to work with the latest build; Paul also mentioned that Flickrfield may need some work, as he thinks some of the hooks are missing.

PPS we are a registered children's charity and social enterprise, so anyone helping to quickly resolve this would no doubt end the day with a nice warm glow ;)

Comments

lolandese’s picture

Component: flickr (main module) » flickr_tags
Assigned: blinkertoon » Unassigned
Priority: Critical » Normal
Status: Needs work » Active

Small correction of the issue properties.

lolandese’s picture

Version: 7.x-1.0 » 7.x-1.x-dev

A possible approach to start with:

  • Grab the Flickr tags used on the "Default Flickr User Id" account (the one on the Flickr settings page at admin/config/media/flickr) and put them in a dedicated taxonomy vocabulary on cron run or after saving the settings page.
  • A block that on a node page displays the images tagged identical to the node's taxonomy term.

Extension with Views functionality or the possibility to have a dedicated vocabulary per user could then be next.

An example of the result can be found here. However that one is done in D6 using a tweaked version of the Flickr Rippr module that reads flickr.com for users latest public photos, and turns these into content (nodes) on your drupal website.

blinkertoon’s picture

Thanks for the advice. Will ask our developer to look into it and get back to you with his response ;)

PS have also sent message to Dakku as suggested!

dakku’s picture

Hi Guys,

If I understood correctly, I kinda agree with whats been added above already:

Setup
- There are a bunch of nodes (contact, activities) etc
- Each node is tagged with some form of taxonomy terms

Requirement
- Display images from Flickr based on node (contact, activities)

Possible Solution

Flickr Tags to Taxonomy Terms

  1. Setup a new vocab called "flickr tags" or something similar
  2. Write some code to auto sync Flickr tags and create terms for each Flickr Tag
  3. Delete terms that are no longer required
  4. Create new terms
  5. Update old terms

Taxonomy to Node

  1. Associate all nodes to terms from the dedicated "Flickr Terms" vocab

Terms to Tags Block

  1. Write a block that displays on Node page
  2. Get terms for Node where vocab is "Flickr Terms" (Term name = Flickr Tag Name)
  3. Get photos for term (Flickr Tag) by using flickr.photosets.getPhotos. Tag is passed in the extras array
blinkertoon’s picture

Hi Dakku,

Thanks for getting back to me so quickly.

Whilst I'm not a developer myself (and so don't understand the detail of everything you say), am I right in thinking your suggestion in essence is that we attribute tags to drupal nodes as we create them (i.e. pages/content) which are then automatically picked up by the Flickr module to display a preset number of photos at random based on the same (where they exist)..?

If that's the case, I guess my key questions are:

- would this work with the standard module
- is there any value in/need for the extension Paul has already made for us (ability to read/filter by tags in a block)
- how much time/cost would be involved in developing this feature so we could use it on our new site (due to launch next week ;)

Thanks again! ;)

PS just a reminder that the key to what we're after is ability to pull/display images from our Flickr account based on tags in a block, distinct to any given page (i.e. not same photos/tags across whole site). Anything above this would be fab, but not as urgently required ;)

dakku’s picture

Hi Blinkertoon,
Please check your email :)

lolandese’s picture

Marked #2083287: Get images from Flickr by given tags as a duplicate.

Any progress?

ChrisValentine’s picture

I enabled the "Flickr Tags" module hoping it would help, but I don't see anywhere a field where you can specify the tag you want it to search for.

I thought using a Group might help but the provided block doesn't show random images - just however many you specify.

Incidentally, if you're scratching your head trying to find a numeric Flickr user or group ID, use this site:
http://idgettr.com/

ChrisValentine’s picture

I've modified block/flickr_block.module to provide an extra block that can display n random images from a given Flickr Group. I'm not a git user so have no idea how to contribute - can I just upload the file here? I've not modified any other module file.

lolandese’s picture

Hi Chris,

Usually you roll a patch. If you are not able to do that, compress your file to .zip format, upload it here and I will have a look. Alternatively you can also change the extension from .module to .txt and upload it. Whatever you like best.

Looking at your description it seems unrelated to this issue, but never mind. It might be useful anyway. Important you started from the dev version of the module (is the same as 7.x-1.1. for now).

Thanks.

ChrisValentine’s picture

I'm working on displaying by Flickr tags now. I'm afraid I've based this on the 7.x-1.1.

lolandese’s picture

7.x-1.1 is okay. No need to change.

ChrisValentine’s picture

StatusFileSize
new21.59 KB

Group and Tags blocks now both working. Modified block/flickr_block.module file attached.

lolandese’s picture

Status: Active » Needs review
StatusFileSize
new37.75 KB

Rolled into a patch. I will have a look over the weekend.

Thanks Chris.

lolandese’s picture

Status: Needs review » Reviewed & tested by the community

A test on http://simplytest.me/project/flickr/7.x-1.x?patch[]=https://drupal.org/files/group_and_tags_blocks-2024133-14.patch shows that:

  • the patch applies cleanly.
  • the changes do not break the site.
  • it offers two new blocks that work as expected, with one of them fulfilling the request of this issue.

Furthermore a quick manual code review reveals that coding standards are respected and even adds clarifying code comments to existing code.

Thanks again Chris for your work on this.

lolandese’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Status: Closed (fixed) » Needs review

Would it be possible to be able to add the functionality of a tag filter along the lines of:

[flickr-tag:id=tag,size=s]

or

[flickr-tag:id="tags in here",size=s]

This would be very helpful in being able to add different images in the body of a page.

Many Thanks,

Alan

lolandese’s picture

Status: Needs review » Needs work

Just to clarify:

We might consider to grab the tag dynamically from the node displayed. E.g. a blog post tagged with the taxonomy term 'Venice' would grab all identical tagged images from a specified Flickr user account and display them in a accompanying block (see the example mentioned in #2 and possible approach in #4).

If I understood well, this is what the original poster intended. By mistake I tagged the issue as being fixed. The committed patch has another use case, though is useful on its own. Furthermore it brings the solution a step closer.

As I understood, the suggestion in #18 is intended to display a series of images inline in the node body that probably follow the condition of using the node author's Flickr account and having an identical tag as the node (node author && identical tag).

Do not expect a solution soon (if any) from the current module maintainers. Priority goes to porting the Flickr module to D8. But, as always, patches are welcomed by reviewing them instantly. Furthermore, the added value of this feature is highly recognized, especially for (multi-user) blogs.

Thanks.

Anonymous’s picture

Thank you for the update and for information about the possible use of tags.

I will check back for any developments from time to time.

Alan

lolandese’s picture

Issue summary: View changes
Status: Needs work » Active

As the submitted patches that were unrelated to this issue are committed, the original issue is not solved and there are no patches to review, setting this back to 'Active'.

@dakku, @blinkertoon:
What is the current status? Is there anything that could be committed back on D.O.?

Thanks.

lolandese’s picture

FYI:
I am working on an extension module that turns all image info from a user, group or set into nodes, except for the image file itself (only the URL). That means that blocks can then be created with Views:

  • giving more flexibility to the site builder to customize and extend
  • so that arguments can be used easier to make the blocks context sensitive to fulfill this feature request
  • making image titles and descriptions translatable
  • so that also other types of slideshows can be used
  • making it more reliable and stable as data queries are done by something made for it
  • making it better maintainable as data queries are handled outside of the module itself.
lolandese’s picture

Status: Active » Needs work
StatusFileSize
new5.89 KB

Made a start. Too early to be reviewed. To be extracted in the Flickr module folder.

lolandese’s picture

Unrelated to the previous work of #22 and #23 which will go it's own way, attached patch modifies the existing block #2 from 'User random Flickr photos' to 'User random Flickr photos by term from node'. It "looks" in the Flickr account of the node author (has to be set) for media that has a Flickr tag similar to the terms of a specific vocabulary found for the node. Thus it results in a block that only shows the photos relevant to the post. Ideal for blogs.

Once enabled, this block is by default shown on node and user pages. To have the field to specify a vocabulary to use, the taxonomy module must be enabled. If no vocabulary is chosen, the behaviour of the block is as it was before, thus an upgrade of the Flickr module would have no consequences for existing sites, without having to introduce a new block.

If a site is used by multiple users https://drupal.org/project/private_taxonomy would be a good addition. It avoids the terms added by others showing up (as suggestions) in the vocabulary used to filter Flickr tags. To add to the documentation once this goes into the stable version.

lolandese’s picture

Reroll against latest dev.

  • Commit a961072 on 7.x-1.x by lolandese:
    Issue #2024133 by blinkertoon: Dynamically display photos based on...
lolandese’s picture

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.