Closed (fixed)
Project:
Flag
Version:
7.x-3.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Mar 2009 at 09:08 UTC
Updated:
4 Feb 2015 at 20:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sirkitree commentedIt's possible, any is ;) But I doubt you'll get the maintainers to add it to the module directly.
Instead, I would suggest taking a look at how Flag Friend (http://drupal.org/project/flag_friend) works with Flag's API in order to do something similar. Flag Friend allows the sending of a message when you flag a person. You could use a similar technique to accomplish what you're looking to do I believe.
Comment #2
mr.andrey commentedI would love to see this functionality as well. We're using this module as an inappropriate content flagging system. It would be great to allow users to write a message as to why they're flagging rather than have a generic "inappropriate" thing, and without resorting to multiple flagging categories.
Andrey.
Comment #3
sirkitree commentedI've also used Flag as a means to flag inappropriate content. I've also added some extra functionality for administrators to unflag things and have a few other things I'd like to add here: http://drupal.org/project/flag_abuse
This might be more of a feature request for that module.
Comment #4
mr.andrey commentedI think adding a comment to a flag can be used in other instances besides abuse flagging.
I'll start looking into implementation in a bit.
Any ideas?
Best,
Andrey.
Comment #5
sirkitree commentedAs I said in #1, flag_friend has a way to do this, so take a look at that code and you can probably rip out the relevant parts.
Comment #6
quicksketchWe've discussed creating a "flag_history" module in the past that would make this a generic piece of functionality.
http://drupal.org/project/issues/flag?text=flag_history&status=All
Comment #7
dropchew commented+subscribe. Flag content have this feature and they are going to port it to D6
Comment #8
mitchell commentedI don't see why you would want flag to store a comment as well. This data would make a lot more sense to put into the node tables. I'm not sure what the exact workflow would be, but I doubt it would be too difficult to put a node entry form where you need it and relate it to the two users.
Or, you could do what sirkitree suggested and make flag_friend's message system into a separate module.
Marking as postponed.
Comment #9
mitchell commentedMarked #400900: associate a text / message with a flag as a duplicate of this issue.
Comment #10
gunzip commentedtwo examples:
1. flag friend with comment (ok flag_friend has it but this could be done in a more generic way)
2. flag a node for abuse with a message
generally: add a memo with a flag
(p.s. the issue markes as duplicate was the oldest one actually)
Comment #11
mitchell commented@gunzip: What about when a user uses a certain flag, popup a flag-memo node form and prepopulate it with a nodereference to the node you just flagged?
Comment #12
gunzip commentedi think it's a bigger overhead than adding a text field in the flag table. anyway thanks for the hint =)
Comment #13
mitchell commentedTo help with the overhead, you could clean up the nodes that are no longer useful.
Comment #14
crea commentedGuys, this is must-have feature. With comments Flag can be used to make document workflows with audit history.
Flag + Rules = complete workflow, no need for buggy and unmaintained Workflow module.
Comment #15
simonmd commented+1 suscribing
Comment #16
ngaur commented+1 subscribe
I'm also interested in this for the ability to document reasons for adding a flag.
Comment #17
black silence commentedflag friend uses its own table to store messages
is someone already working on a module or something?
Comment #18
quicksketchThis issue shouldn't be postponed, since it's not waiting on anything.
back silence is correct that a separate table would be necessary for this feature (and probably a separate module). There is nothing preventing this behavior in any way, it's just a matter of someone taking the time to write it. We need a separate table because the same piece of content may be flagged or unflagged multiple times, and each time a message should be left on why the content is being flagged or unflagged. We can't just use the existing "flag_content" table because it only stores a single row, so if a piece of content were flagged, then unflagged, the message on why the content was flagged would be completely deleted.
So that's why I've suggested a few times in the past calling the module "Flag History", so that you can see the flagging history on why a piece of content was flagged or unflagged.
No one is writing this module as far as I know.
Comment #19
black silence commentedwith the way it works in flag_friend, you will not be able to keep a history.
flag messages reference entries in the flag_content table, thus when content is unflagged, all comments will be lost. you could only workaround that by duplicating the flag_content table and not deleting anything from that new table - a full history of all flags
this is probly more than my customer wants so i guess i will not write this kind of module. but i'll ask him, maybe he wanna pay that :)
Comment #20
black silence commentedyou may modify the attached module to suit your needs, it will NOT run in a normal drupal install.
license: GPL v2
description:
adds a comment text field when flagging a node, and a menu callback to view the messages
this is quick and dirty, please don't complain
Comment #21
gunzip commentedi did a rewrite of @black silence module that runs on a normal drupal installation and integrates with views and popup.
it's a merge between @black silence flag_comment and flag_friend code.
i think that the name "flag_comment" is somewhat ambiguos, so i renamed it to "flag_message".
this doesn't build any flag history. it just ties a message (the last one) with a flag.
messages are displayed through views (default views not provided).
if everybody agrees i can make a project page for this.
if there's the need to keep old flags and messages (flag history) i can work on it.
the problem imho is not to save this information, but to implement a decent view integration for that
(a relationship with flag_content table or with node/user ?)
p.s. does anybody know this: when you already have drupal cvs account (because you are a project mantainer) do you have to ask CVS mantainers for every project/module you create ?
Comment #22
pahariwalla commented@gunzip I guess great minds think alike - well almost. I've actually also just built a module Flag Note that does essentially the same thing as flag_message (comment 21). I see advantages to some aspects of both modules and am wondering if you'd like to join efforts and put together the best of both. The main differences are
Things I like better about flag_message
Things I like better about flag_note
So .. if you have a CVS account and would like to pull these two modules into one better one, I'll happily make you co-maintainer :-)
It seems that there's plenty of need for this functionality, and I'm glad that we're close to having an easy to use way to do it.
Please let me know what you think..
Comment #23
gunzip commentedsure :]
i like the hook_flag_link_types idea and the better handling of flag/node deletion. these are my first notes about flag_note:
EDIT:
above all, if you want to mantain multiple flags for a content_id then you have to save the whole information about the flag
(not just the flag_content id) because when the content gets unflagged you still want to keep the older flag notes. so you have to save
the type of operation (flag/unflag), flag name, timestamp, content_id, etc.
in the other case, if you only want to keep the latest note then the primary key "fccid" is not needed because you have a one to one relation with flag_content.
i see you want to delete notes based on content type in nodeapi but you cannot do this without checking for the content type too (user or node ?). you risk to delete users instead of nodes and viceversa.
I'm doing a quick rewrite integrating views/popup, then I'll send to you the result. I'll be glad to be a co-mantainer but we have to clarify if we want a flag history or just a flag note =)
Comment #24
pahariwalla commentedExcellent !!! Wow, I sure left a bunch of holes ... do'h ... good eyes @gunzip.
I think all your ideas are great .
I'm excited about all this - really happened very quickly. I had this requirement for a project, and looked at this issue only a few days ago... went off to build the thing, and when I came back there was all this new action ! Really glad you're in on this with me.
So, going forward we should refer this issue to flag-note project? and take up the individual issues, patches there?
Do you have a CVS account already? If so, let me know and I'll ask the folks to add you as a maintainer. Actually, I think that there's this arcane protocol - like you havce to create an issue on flag_note asking for maintainship. I have to say it's all good, then you have to ask the Drupal Gods to make you a maintainer on the project and give them a link to the issue where I say it's all good... hmm hmm hmm
I'll take a look at the docs, feel free to do so yourself, and let's rock and roll.
Thanks much
Comment #25
gunzip commentedswitched to #505230: some thoughts about a flag history and some fixes/improvements
Comment #26
quicksketchFantastic, thanks guys! Any interested users should report questions/bugs to the new Flag Note issue queue.
Comment #28
WorldFallz commentedI've just encountered a need for flag history functionality. I've spent a while researching in the issue queue for flag and flag_note, but the issues are old and it seems nothing has been done since and there is no flag history for the current d7 version of flag now (please correct me if I'm wrong).
Now that flags are fieldable entities, it seems those discussions are no longer applicable. I would think flag history should now be more like enabling revisions for individual flags much like revisions for content types. This probably could be done in a separate module, but it seems more like it belongs to the core flag module.
My question is, for the current maintainers, how do you see flag history functionality fitting into the flag module?
Comment #29
joachim commentedWell first off, we'd have to look at this on D8 first, as development on that branch is well under way.
Then for the D7 version of this, it would make sense to use the revisioning system in Entity API rather than write ours from scratch. But introducing a dependency on Entity API is something we've deliberately avoided so far.
So in conclusion, I would say: file a new issue to consider making Flaggings revisionable in D8, and look at a new contrib module for this on D7.