File tagging
awolfey - June 30, 2009 - 22:02
| Project: | Community Tags |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
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.

#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.