This wiki does not contain official documentation and is currently deprecated and read only. Please try reading the documentation on the Liferay Developer Network, the new site dedicated to Liferay documentation. DISCOVER Build your web site, collaborate with your colleagues, manage your content, and more. DEVELOP Build applications that run inside Liferay, extend the features provided out of the box with Liferay's APIs. DISTRIBUTE Let the world know about your app by publishing it in Liferay's marketplace. PARTICIPATE Become a part of Liferay's community, meet other Liferay users, and get involved in the open source project. Terms of Use
When a user logs in for the first time, they are prompted to accept the site's "Terms of Use", in English. The actual text in the document can be found here:
portal/portal-web/docroot/html/portal/terms_of_use.jsp
Disabling the "Terms of Use"#
Not all sites will need this page. This feature can easily be turned off by modifying the "/ext/ext-impl/classes/portal-ext.properties" file with this value:
terms.of.use.required=false
Customizing the text in "Terms of Use"#
5.2.x and later #
From version 5.2 up you can easily use a Web Content article for the Terms of Use. See the How to Create a Dynamic Page for Terms of Use article for more information.
prior to 5.2 #
As mentioned previously, the "Terms of Use" is actually a jsp that is found here:
portal/portal-web/docroot/html/portal/terms_of_use.jsp, here is an excerpt:
<%@ include file="/html/portal/init.jsp" %> <form action="<%= themeDisplay.getPathMain() %>/portal/update_terms_of_use" name="fm"> <input name="doAsUserId" type="hidden" value="<%= themeDisplay.getDoAsUserId() %>" /> <input name="<%= WebKeys.REFERER %>" type="hidden" value="<%= themeDisplay.getPathMai... Welcome to our site. We maintain this web site as a service to our members. ... <br /><br /> <ol> <li> <b><u>Acceptance of Agreement</u></b>.<br /> You agree to the terms and conditions outlined in this Terms of ... <br /><br /> </li> <li> <b><u>Copyright</u></b>.<br /> The content, organization, graphics, design, compilation, magnetic ... <br /><br /> </li>
If you wanted to customize the "Terms of Use", then you should copy that file to your ext environment in the parallel folder structure:
ext/ext-web/docroot/html/portal/terms_of_use.jsp
make the desired modifications and deploy your changes
How to change the language for your "Terms of Use" page#
If you want to have multiple languages in your "Terms of Use" you will not be able to do this using the standard method of modifying "language.properties". This is because the Terms of Use isnt stored in the language.properties file. Instead it is a .jsp file and you will need to directly edit the jsp. Here is an excerpt of the file:
Before:
<ol> <li> <b><u>Acceptance of Agreement</u></b>.<br /> You agree to the terms and conditions ...
After:
<!-- English -->
<c:if test="<%= themeDisplay.getLanguageId().equals("en_US") %>">
<ol>
<li>
<b><u>Acceptance of Agreement</u></b>.<br />
You agree to the terms and conditions ...
</c:if>
<!-- French -->
<c:if test="<%= themeDisplay.getLanguageId().equals("fr_FR") %>">
<ol>
<li>
<b><u>Acceptance of Agreement</u></b>.<br />
You agree to the terms and conditions ...
</c:if>
<!-- German -->
<c:if test="<%= themeDisplay.getLanguageId().equals("de_DE") %>">
<ol>
<li>
<b><u>Acceptance of Agreement</u></b>.<br />
You agree to the terms and conditions ...
</c:if>
<!-- Vietnamese -->
<c:if test="<%= themeDisplay.getLanguageId().equals("vi_VN") %>">
<ol>
<li>
<b><u>Acceptance of Agreement</u></b>.<br />
You agree to the terms and conditions ...
</c:if>
<!-- Spanish -->
<c:if test="<%= themeDisplay.getLanguageId().equals("es_ES") %>">
<ol>
<li>
<b><u>Acceptance of Agreement</u></b>.<br />
You agree to the terms and conditions ...
</c:if>
Notes:#
- See your portal.properties file for a full listing of available locales. Here is an excerpt of portal.properties from Liferay Portal 4.3.3
locales=ar_SA,ca_AD,ca_ES,zh_CN,zh_TW,cs_CZ,nl_NL,en_US,fi_FI,fr_FR,de_DE,el_GR,hu_HU,it_IT,ja_JP,ko_KR,fa_IR,pt_BR,ru_RU,es_ES,sv_SE,tr_TR,vi_VN