This project is not covered by Drupal’s security advisory policy.

DISCLAIMER

2015-04-21 This module is under active development, and only commits that have undergone basic testing are pushed to Drupal.org, but I currently offer no assurance about the safety of this module when used together with Flag. At least some of the features of Flag Plus make changes to the flag applicability state in the Flag database tables. Use at your own risk.

That said, it's already very handy, and I use it on a number of my own sites daily without any real problems so far.

It is offered with moderate support (being a bit better than minimal) in the hope it may also be useful to other Flag users.

The main reason for its existence as a public Drupal.org project is in fact to demonstrate progressive refactoring of an old-style Drupal7 module to a more UML-friendly PHP OOP form (using mostly static helper classes) with graphical UML diagrams as an educational, academic exercise, and to demonstrate the Webel recipe for UML-friendly PHP.

CAVEATS

- It has only been used so far on Flags for node content, not other entity types, although long term it will also be tested on Flags for some other entity types.

- Because the Flag module does not yet use Drupal7-style AJAX a Flag Plus banner will not visually update without a page reload (does not use AJAX refresh) if you change a Flag state using an AJAX Flag link, so please on creating or editing a Flag choose the option to use a non-AJAX Normal refresh link NOT a JavaScript toggle.

- The non-JavaScript fallback of one of the AJAX forms is known to be a bit buggy (but the module is really only intended for use with full JavaScript support anyway)

SYNOPSIS

The simple-yet-powerful Flag project is one of the most popular Drupal contributed projects. The Flag Plus project extends Flag with some convenient features such as:

- The ability to conveniently view and set flag applicability by custom content type (by entity type and bundle name) so that one does not have to edit each flag and select it as applicable to a newly added custom type, which can be tedious and error prone.

- An easy system for indicating whether a given content node/page is flagged or not flagged with easily-configured flag banner blocks or page decorators and CSS style options. This simple flag banner strategy can be very effective for indicating publishing workflow.

This is an actively maintained and evolving tutorial development project, with a live demonstration site home page.

The Flag Plus module also now has a set of unique graphical Unified Modeling Language (UML) models that track progressive refactoring of the Flag Plus module into a more object-oriented form (so far mostly just using static helper classes).

Similar projects and how they are different

There are many modules that use or complement Flag, but none with the particular feature extensions offered by Flag Plus.

REQUIREMENTS

This module requires:

- PHP (at least PHP 5.3).

- Drupal7 (at least version Drupal-7.30).

- The fabulous Flag module (at least version 7.x-3.0).

- The essential X Autoload (at least version xautoload-7.x-5.2, otherwise the install will fail to find the the schema description). The X Autoload module is highly recommended for object-oriented Drupal7 projects.

- The convenient Libraries API module (at least version 7.x-2.1 ).

- The nifty JQuery Colorpicker module (at least version 7.x-1.1) and the JQuery Colorpicker lib. This obviously requires JavaScript to work correctly.

This version of the Flag Plus module is being progressively migrated to leverage more OOP - mostly in the form of static helper classes - but without yet full integration with Webel IT Australia's OOE object-oriented examples bridge project for Drupal7).

INSTALLATION

Install as you would normally install a contributed drupal module. See Installing modules (Drupal 7) for further information.

Given the relatively large number of module dependencies, you will probably find it easiest to use the Drush command line utility for Drupal (assuming you have shell access to your server).

CONFIGURATION

There are currently two main completely separate admin capabilities, both are self-explanatory, and they are accessible via tabs or links from an overview admin page at:

/admin/structure/flagplus

Flag Plus banners configuration

The first thing you will probably want to try out are the Flag Plus banners, which are rectangular strips Flag state indicators displayed using either a Page Decorator (preferred) or a Banners Block (gives you more flexibility in placement). They are well explained in the Flag Plus Banners admin page at:

/admin/structure/flagplus/banners

You must have at least Flag Plus banner administration rights
to edit Flag Plus banner styles and policies.

For each defined Flag (you must already have some Flags for it to make sense) you can currently set for each corrresponding Flag Plus banner:

- Whether to show the Flag title (as per the Flag database) in the banner.

- An additional user-defined Flag Plus banner message, and whether to show it (recommended).

- CSS styling: the colour of the text, the background, and the border of the rectangular banner strip.

- Whether to show the banner when the Flag is true, false, or for both. Note your do not have to show a Flag Plus banner at all for a Flag if you don't want to.

The "show when false" mode is handy if you have, for example, a Flag such as 'resolved' for use with an Issue node content type and you want to indicate when a given Issue node is 'NOT resolved'.

You can also choose, for all banners:

- Whether to capitalise the Flag title in the banner text (for negation mode the NOT prefix is currently always capitalised).

- Whether to centre (as opposed to left-align) the text in all banners.

For some examples, please visit http://drupal7demo.webel.com.au.

Or simply create a Flag, create some applicable content, and try it out.

You must have at least Flag Plus banner view rights to view
the Flag Plus banner strips in content pages and blocks
(as well as permission to the view the block in the theme).

Fine-tuning of banner styles

You may fine tune the appearance of the banners by overriding the CSS styles of: .../flagplus/css/flagplus-banners.css

Flag applicability power editing

This admin section enables you to conveniently set the Flag applicability by entity type and bundle. This saves a lot of time, because you don't have to edit each Flag whenever you add a new content type. There are currently two versions, an AJAX version, and a non-AJAX version, both seem to work fine, and are completely self-explanatory:

/admin/structure/flagplus/bybundle/edit
/admin/structure/flagplus/bybundle/ppu

(The 'ppu' above stands for Partial Page Update AJAX mode).

Both modes offers the ability to filter by entity type.

Is a Drupal8 version planned ?

Yes, but not in a hurry, only once both Drupal8 and Flag for Drupal8 are very stable.

MAINTAINERS

webel - http://drupal.org/user/392755

No other maintainers are currently sought.

CREDITS

The Flag Plus module is developed by Webel IT Australia, specialists in PHP-driven Drupal CMS web engineering, UML, SysML, Java and XML. In addition to using Drupal CMS for developing clients' web sites, Webel has used Drupal CMS for many years to develop educational web sites promoting graphical software engineering with Unified Modeling Language (UML) and graphical systems engineering with Systems Modeling Language (SysML):

- http://www.webel.com.au

- http://drupal7demo.webel.com.au

SPONSORS SOUGHT

If you are interesting in seeing Flag Plus expanded, or in seeing a Drupal8 version developed, please consider supporting the project. Donations to the Flag Plus project may be made online via PayPal at: http://drupal7demo.webel.com.au/lm_paypal/donations

Project information

Releases