The customer I work for, wants that for all Forum entries a notification is sent as default and the user should not have the possibility to disable this. Though I don't think, this is a good idea but anyway, here is the description how to do this.
The following changes have then been applied to tick the notifications checkboxed by default and hide them in the Web UI:
- Edit
Communities.ear/comm.web.war/WEB-INF/forum/views/topicThread.jsp
- Locate:
<div id="contentArea" class="lotusLimit">
<c:if test="${not topic.deleted}">
<div id="forum" class="lotusForum">
<div class="lotusMessage lotusHidden"></div>
<c:if test='${canSubscribe}'> - set the body content of the innermost tag (c:if) to
<div class="lotusRight" style="display:none;">
<input id="${subscribeCheckId}" type="checkbox" checked="checked"/>
<label for="${subscribeCheckId}"><fmt:message key="label.forum.notify" /></label>
</div> - Edit
Communities.ear/comm.web.war/javascript/build/dojo/communities.js
- Locate
<td><input name=\"subscribe\" dojoAttachPoint=\"subscribeNode\" type=\"checkbox\" id=\"${id}_subscribe\" value=\"true\" ${checkedAttr} />
- Change to
<td style="display:none"><input name=\"subscribe\" dojoAttachPoint=\"subscribeNode\" type=\"checkbox\" id=\"${id}_subscribe\" value=\"true\" checked=\"checked\" />
Important: the changes applied to both files are not recommended as they are no official and supported customization option for Lotus Connections!
At first the customer did this by themselves, but they did not hide (display:none) the elements, but removed the first one (in jsp) entirely from the file, without documenting which files have been changed and what was changed. DONT TRY THIS AT HOME!
Always:
- Create a backup of the files you change
- Document which file you change
- Document what you change
- Avoid modifying the HTML structure by REMOVING elements. Try to hide them instead, either by CSS-Stylesheet (best), style-element (ok) or javascript (last option)
No comments:
Post a Comment