Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
hey
we have node/user/comment is flagged (with x flag)
and we have node/user/comment has flag count (with x flag)
need a flag being flagged (with x flag) condition
that possible?
at the moment i am attempting to use PHP code for the condition:
if $flag == "node_report" then {
return TRUE;
} else {
return FALSE;
}
the rule is inside a ruleset, which has node+flag argument.
but it's a bit raw... i don't like it much
Comments
Comment #1
lpalgarvio CreditAttribution: lpalgarvio commentedtypos in it...
but it didn't worked.
resolved by using Rules » Textual comparison: [flag:flag-name] with node_report
a flag being flagged condition (requiring $flag arg) would still be optimal though
Comment #2
quicksketchI don't provide help on custom PHP code, especially within Rules (since I don't use that module).
Comment #3
lpalgarvio CreditAttribution: lpalgarvio commentedin the top of the thread i mentioned a feature request: add a flag being flagged (with x flag) condition, for rules integration
similarly to
- node/user/comment is flagged (with x flag)
- node/user/comment has flag count (with x flag)
the code i provided is just a workaround that didn't worked. the Rules » Textual comparison: [flag:flag-name] with node_report did though. but it's raw.
Comment #4
fagoThere is a "flag is flagged" event - a condition doesn't make sense for that?
Comment #5
lpalgarvio CreditAttribution: lpalgarvio commentedif i'm not mistaken (last time i checked), the condition won't allow checking with the flag was flagged with a particular flag. just got flagged. needs further investigation