Adding terms and conditions to media galleriesAdded by IBM on February 11, 2013 | Version 1 (Original)
|Make users agree to terms and conditions when they upload new photos or videos to media galleries. This is optional.
To add a terms and conditions agreement to the media gallery widget, complete the following steps.
Parent topic: Configuring media galleries
Adding custom strings for widgets and other specified scenarios
Using the widgets-config.xml file for Communities
- Create a string bundle, for example tc.properties. See Adding custom strings for widgets and other specified scenarios.
- Create a new string properties file, for example tc.properties. It must contain a key-value pair with the string that you want to use in your terms and conditions agreement. For example:
tc=These are the terms and conditions you must agree to before uploading a photo or video file.
If you want tc for different languages, create _<lang>.properties
files instead. For example, for a Spanish string create tc_es.properties
. The agreement will only be available to browsers set for Spanish.
- Create a jar file that declares an OSGI extension. To see an example, download this sample JAR file by right-clicking the following link: com.ibm.lconn.mediagallery.web.resources.examples_1.0.0.jar
- Place your properties files in the _properties folder of the OSGI bundle jar
- Add the following items to media gallery widget definition in widgets-config.xml:
<item name="tc_bundle" value="my.custom.TermsConditions.messages" />
<item name="tc_key" value="tc" />
<item name="tc_checkbox" value="false" />
- The tc_bundle value must be the name of the object that is set in the file, which is referenced by the bind attribute of the net.jazz.ajax.dojoModuleBinding in the OSGI bundle. In this case, the value is my.custom.TermsConditions.messages.
- The value of tc_key is the key used in the properties file located in the _properties directory of the OSGI bundle jar, for example, com.ibm.lconn.mediagallery.web.resources.example.jar
- The value attribute of the tc_checkbox item can be true or false. If true, users must check a box in the agreement before they can access the media gallery.
See Using the widgets-config.xml file for Communities
- Place the jar from step 3 on the IBM Connections server in the provision\webresources directory and then restart the common ear.
Note: The provision directory is typically CONNECTIONS_HOME/data/shared/provision.