The context_flag module exposes flags from the Flag module for use as conditions of the Context module. To date I haven't been able to find any other modules providing this functionality.
I've put together a features module showing a couple simple examples on github: context_flag_examples.
Project page: https://drupal.org/sandbox/mraichelson/2047083
Git repository: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/mraichelson/2047083.git context_flag
Projects reviewed:
- TukTuk theme: https://drupal.org/node/2214073
- Hamdomains module: https://drupal.org/node/2184079
- Gravatar Favicon: https://drupal.org/node/2214557
- Custom token features: https://drupal.org/node/2209969
- Entityform to node module: https://drupal.org/node/2191051
- Field group delimiter: https://drupal.org/node/2210741
- Hsoub captcha: https://drupal.org/node/2209565
Comment | File | Size | Author |
---|---|---|---|
#12 | Screen Shot 2014-03-11 at 8.57.34 PM.png | 168.27 KB | mraichelson |
Screen Shot 2014-03-08 at 11.09.02 AM.png | 59.45 KB | mraichelson |
Comments
Comment #1
PA robot CreditAttribution: PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxmraichelson2047083git
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #2
mraichelson CreditAttribution: mraichelson commentedThe issues flagged by the PA review script are really issues with the coding style of the Context module (which this module just adds plugins for). This can be seen by reviewing the codebase for Context itself and looking at the notes for the standard context condition plugin files (context_condition_book.inc makes for a good example).
Comment #3
mraichelson CreditAttribution: mraichelson commentedUpdated reviewed project list.
Comment #4
mraichelson CreditAttribution: mraichelson commentedUpdated list of reviewed modules.
Comment #5
mraichelson CreditAttribution: mraichelson commentedUpdated reviewed projects list.
Comment #6
mraichelson CreditAttribution: mraichelson commentedUpdated reviewed projects list.
Comment #7
mraichelson CreditAttribution: mraichelson commentedUpdated reviewed projects list.
Comment #8
mraichelson CreditAttribution: mraichelson commentedUpdated reviewed projects list.
Comment #9
mraichelson CreditAttribution: mraichelson commented(Since most of the reviews I provided weren't particularly deep don't feel like I've earned a reviewer bonus.)
Comment #10
mraichelson CreditAttribution: mraichelson commentedUpdated reviewed projects list.
Comment #11
nonsieRequirements - Flag 2.x branch or 3.x branch? Both are supported.
Info file - no need for double quotes around the name and description (see https://drupal.org/node/542202)
No hook_help() in .module file.
In your readme file perhaps clarify user account vs active user since node flags can apply to anonymous users as well.
Any planned support for other types of flags (comments, terms etc)?
Comment #12
mraichelson CreditAttribution: mraichelson commentedPushed a new update up to the 7.x-1.x branch.
I did look at adding support for comments and other entity types, comments are a possibility for something that can be added. Adding a generic "show all entity types" option was a little more than I wanted to bite off for an initial release (and may be better suited as a submodule of some sort or by providing some stub/example code for making a new set of flag condition triggers that a machine name can be dropped into).
The PAReview items that are present following this update are the same as before (see comment #2), a side effect of the structure from the main Context module.
Comment #13
nonsieComment #14
mpdonadioManual Review.
1. context_flag_context_registry() has untranslated titles.
2. _context_flag_requireall_form() should have a proper docblock.
Looks like a useful module, and project page looks good. I'll mark as RBTC once the titles are fixed.
Comment #15
mraichelson CreditAttribution: mraichelson commentedComment #16
mraichelson CreditAttribution: mraichelson commentedComment #17
mpdonadioI agree that PAReview issues in the Context plugins can be ignored.
Manual Review.
Do classes loaded via plugins still need to be declared in the files[] section in the .info? I don't really know this answer, but you may want to check into it.
Project page looks good. Not seeing any security issues, duplicate projects, third-party-code, or major API problems, so I think this is RBTC.
Comment #18
mraichelson CreditAttribution: mraichelson commentedRe: files listings in the .info file - Looks like the answer is "no", I'll push another update to clean them out.
Comment #19
klausiReview of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
manual review:
But otherwise looks good to me, so ...
Thanks for your contribution, mraichelson!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #20
mraichelson CreditAttribution: mraichelson commentedWoohoo! Thanks, klausi!
Excess whitespace was in part of a comment block, cleaned it up after you posted this.
Will make another run through the condition plugin .inc files to clean up the commenting and make them more legible.
Comment #21
joachim CreditAttribution: joachim commentedOh nice, I didn't know about this!
Be sure to add your module to the list of Flag ecosystem modules in the docs pages.
(And please look at #1323826: Make it easier to identify and discover ecosystem modules too!)