Personal image filter

Note: ''This document is a submission to the Wikimedia Foundation Board of Trustees regarding the management of controversial content. It does not describe any project currently under development by the Foundation. It has been created by the request of the Board to help better frame understanding of the technologies required.''

This document describes a proposed system for management of controversial content. This document is a proposal. It does not describe an ideal system; rather, it describes a system that could be developed with minimal effort.

This document and the technology described applies only to multimedia content (images, video, and audio). Text documents and pages are not included or considered.

Flagging Mechanism
Flagging content as being controversial is handled by placing the content within one or more sub-categories of a global "Controversial Content" category. These sub-categories are will be automatically recognized by the system as being content that can be potentially hidden.

For example, a wiki's "Controversial Content" category could contain the following sub-categories: "Sexually Explicit", "Graphic Violence", "Medical", and "Other Controversial Content".

Images illustrative of sexual techniques would obviously be placed in the "Sexually Explicit" sub-category while images of Mohammed could be placed in "Other Controversial Content" (or even "Images of Mohammed").

Content can be placed within multiple categories. For example, a graphical depiction of an aborted fetus could be placed in both "Medical" and "Other Controversial Content" (or any number of additional categories).

Per-Wiki Default Content Hiding
It may be desirable for individual wikis to draw consensus to auto-hide certain types of content by default for all users.

Ideally, an administrative interface could be developed to allow wikis to easily define a set of auto-hidden categories. However, in a minimal sense, these categories can be defined in the wiki's LocalSettings.php file as an array ($wgAutoHiddenContentCategories).

Show/Hide Decision Tree
If a piece of content is within any category that is marked as "hide" by the user (either through preferences or by default flagging), the content will be hidden. Only one of the content flags need be set to "hide" for this to happen.

Display Preferences
Users will be able to set their show/hide preferences on individual content categories. They will not be able to set permanent preferences on individual content items. For logged in users these preferences will be stored in a database; for anonymous users the preference will be stored in a cookie.

For logged-in users, access to this preference dialog is available as a tab on the user's preferences screen.

For anonymous users, access to this preference dialog is available via a new link, "Display Settings", located near the "Log in/Create account" link on the screen.

The dialog is generated via javascript.

Additionally, the preferences dialog can be activated (for all users) by interacting with an image that falls under filtered protection (from both hidden and displayed content).

Workflows
In general, the workflows for anonymous users and logged in users are effectively the same (with the exception of direct activation of the filter preferences dialog for anonymous users). To save space, this document describes three workflows from the perspective of an anonymous user:


 * Adjusting Filter Settings from Navigation
 * Adjusting Filter Settings from a Displayed Image
 * Adjusting Filter Settings from a Hidden Image

Additional detail is given about various dialogs elsewhere in this document. This section concerns itself with workflow-specific details and not global details.

Adjusting Filter Settings from Navigation
For anonymous users, a new link is created on all pages for anonymous users, "Display Settings". This link appears in the upper-right, to the left of the "Log in/Create account" link. This link does not appear for logged in users; they can access the dialog through their preferences.

Clicking on the "Display Settings" link will activate a Javascript dialog, titled "Content Filter Settings". Note that the dialog is tabbed - this is "future-proofing" in case additional types of display settings are created in the future.

The user then enables or disables content filters according to their personal preference:


 * If a toggle is modified (changes from "Enabled" to "Disabled" or vice-versa), a smalled notification appears next to it ("changed") to help the user remember what changes they made.
 * The "Save Settings" button is disabled until a change is made. Once a toggle has been modified, the "Save Settings" button is enabled.

Clicking the "Save Changes" button has the following effects:


 * Any images present on the page that will change visibility based on the new settings are hidden or shown based on those changes (this is immediate, and occurs in the background)
 * A message indicating a successful save will appear
 * The "Save Settings" button will disable again
 * Any "changed" indicators will disappear

The dialog may then be dismissed, revealing the page with any display settings changes having already taken effect.

Adjusting Filter Settings from a Displayed Image
This workflow is identical for anonymous and logged in users.

The user begins with an image that is currently displayed but is managed by filter settings. A small "hide image" control is visible beneath the image.

Hovering over the control will cause a tooltip to appear that lists which filter categories the image is contained in.

Clicking on the control at this point will activate the "Content Filter Settings" dialog. When activated from an image, the dialog has a slight behavior change:


 * Instead of all filters being listed together, filters that are applicable to the image that has been interacted with are collected separately.
 * All other filters are visible as well, under a different heading.

At this point, the workflow is the same as with "Adjusting Filter Settings from Navigation": the user makes their desired changes, saves the settings, and dismisses the dialog.

Adjusting Filter Settings from a Hidden Image
This workflow is identical for anonymous and logged in users.

The user begins with an image that is currently hidden and is managed by filter settings. A message on this "shroud" indicates to the user that the content has been filtered.

Hovering over the "filter settings" link within the message will cause a tooltip to appear that lists which filter categories the image is contained in and which ones are currently enabled for the user.

Clicking the "Show Image" button or either of the "Filter Settings" links will activate the "Content Filter Settings" dialog.

When activated from an image, the dialog has a slight behavior change:


 * Instead of all filters being listed together, filters that are applicable to the image that has been interacted with are collected separately.
 * All other filters are visible as well, under a different heading.

At this point, the workflow is the same as with "Adjusting Filter Settings from Navigation": the user makes their desired changes, saves the settings, and dismisses the dialog.

Interface Behavior
This section concerns itself individual sections of the interface and their behaviors.

"Shown" Content Behavior
For content that is shown by default (either through a user's filter settings or by wiki-wide preferences), the content is displayed with a small control beneath it to allow the user to hide the content temporarily.

The control is greyed out until it is hovered over. When hovered over, the control gains color and a tooltip appears that displays the categories that this image is included in.

If clicked, the "Content Filter Settings" dialog is activated and displayed.

"Hidden" Content Behavior
For content that is hidden on load (either by user settings or by wiki-wide preference), the image shroud will already be in place.

Hovering over the words "filter settings" will display the categories that the image falls into that are possibly hidable.

Clicking on either of the "filter settings" links or the "Show Image" button will activate and display the "Content Filter Settings" dialog.

Filter Settings Dialog
This dialog behaves slightly different for anonymous users and for logged in users.

If the dialog is activated from an image, it will default to emphasise the filters applicable to the specific content item (shown at the top) with all other filters in a separate section below.

If the dialog is activated from navigation (anonymous users) or a preference pane (logged in users), all filters are visible in one section, alphabetically.

Note that the interface can comfortably support around 10-12 filters before becoming unweildy (this limitation also exists for anonymous user cookie preference).

For each category of content, an "Enable/Disable" control is displayed. Since checkboxes could be easily misunderstood (does checking it mean that it is hidden or shown?), a toggle control is used that explicitly states what the behavior will be regarding the individual categories.

Changing the setting of any specific toggle will cause a notification to appear indicating that the toggle has changed state.

Once any changes are made, the "Save Settings" button will become active (green).

Upon clicking the "Save Settings" button, changes are saved (either to the database or via cookies), the "changed" notifications are removed, a "success" message is displayed, and the "Save Settings" dialog is disabled.

The dialog may be dismissed by clicking the icon in the upper right corner.

Anonymous Users
Anonymous users will be informed that they are not logged in and that their filter preferences may expire (e.g., the cookie may get deleted). There will be a prompt for them to log in.