Flag State is a small module that implements a very basic Flag type which can be used to control and maintain a boolean state flag for use in code or Rules evaluations. It gets all the benefits and features of the flag module including per user/global state, anonymous user support (Flag 2.x), flexible UI, export (features) friendly, integration with rules and views modules etc.

State flags are useful as a quick way of adding per user or global on/off switches.

The flag can be displayed on a block or elsewhere. Either do this in your theme, custom module or use the php filter in a custom block etc, Views header text etc. The code to render the flag is:

<?php
 
return flag_create_link('<flag_name>', 1);
?>

For example use see my browsing history feature demo where the "Turn OFF browsing history" link (rendered in the View header) sets or unsets a state flag that is used in rules as a) a condition to disable the user's browsing history and b) as an event to clear the user's browsing history.

Downloads

Version Downloads Date Links
6.x-1.0 tar.gz (7.49 KB) | zip (7.97 KB) 2011-May-06 Notes

Project Information


Maintainers for Flag State

  • chaps2 - 2 commits
    last: 1 year ago, first: 1 year ago

Issues for Flag State

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports
nobody click here