Project:Community Tags
Version:6.x-2.x-dev
Component:Code
Category:support request
Priority:minor
Assigned:Unassigned
Status:active

Issue Summary

I need to make this work on filefield files as displayed by views. Would be you interested in a patch to this module or should I fork it? I think it could be done pretty simply with a new column for the file id.

Essentially I need to have comments and tags on filefield images. Please see this for some idea of what I'm doing. http://groups.drupal.org/node/23759

Thanks.

Comments

#1

I have this working. Let me know if you're interested.

#2

Here's a patch to achieve community tagging on files as show by views.

To implement you need a views template or field template showing a single file.

Add this to your template file where you want the tag form to appear.

<?php
// Get the file id.
$xid = $row->node_data_field_fieldname_field_fieldname_fid;

// Add community tags and form.
print community_tags_node_view($node, $inline = TRUE, $xid);
?>

The patch adds a new column to the CT table, so you will need to reinstall to test. Sorry, didn't write the update function yet.

You can see it in action here: http://nyvelocity.com/content/gallery/race-photos/2009/chris-henry-tour-0
Page through the individual photos in the gallery to see the tags and form. It's not a demo, so you would have to create an account to test.

AttachmentSize
community_tags_6-1-beta1_filetags.patch 11.63 KB

#3

Version:6.x-1.x-dev» 6.x-2.x-dev
Priority:normal» minor

@awolfey - thanks for posting your patch!

I had a look at your patch and your excellent site. It looks like your site is still using your patch so perhaps you are still interested in following this issue... However, I have to wonder why go to so much trouble to make filefields behave like nodes - i.e. allow commenting, tagging etc - when each image could be a node?

Andy

#4

As multiple filefields it's easier to upload batches of images, at least it was 2 years ago when that site was built. Of course, there are a million ways to make photo galleries in drupal.