Showing posts with label Liferay. Show all posts
Showing posts with label Liferay. Show all posts

Monday, April 12, 2010

Email Notification for Announcements portlet.

Configure users setting.
Go to Control Panel > Users

Edit users with assigning them Guest community, and Announcement.

Configure Server Administration (Control Panel > Server Administration)

For outgoing port, use port 2525

Then add this properties in portal-ext.properties
announcements.email.from.address=webmaster@mysolution.net
announcements.email.from.name=Webmaster

Problem statement and Solution

The current email_body.tmpl is very simple.




Sometimes, we need to modify it so that the message becomes formal (Official).
Example,




How to modify email_body.tmpl in Announcements portlet?

In liferay Enterprise Edition (Liferay EE), email_body.tmpl located in folder dependencies.
Path: ~/html/portlet/announcements/WEB-INF/classes/com/liferay/portlet/announcements/dependencies

For those who use liferay Community Edition (Liferay CE), this file can be found in liferay-portal-src-5.2.3
Path: liferay-portal-src-5.2.3/portal-impl/src/com/liferay/portlet/announcements/dependencies

Then we need to do ant deploy in ext-impl. Copy email_body.tmpl and paste in ~/ext/ext-impl/src/com/liferay/portlet/announcements/dependencies
Notes that we need to create folders announcements and dependencies if they not existed.

Go to ~/ext/ext-impl
Then run command: ant deploy

Testing an announcement.

1. Add annoucement portlet in admin page (or any page).
2. Write your announcement.





Output



Monday, January 11, 2010

Linux: Cannot find ./catalina.sh

Subject: Liferay Development Troubleshooting 1

Problem: Cannot find ./catalina.sh
OS: Ubuntu 9.04

Descritption
Cannot start tomcat sever with error 'Cannot find ./catalina.sh'. Refer to Figure 1 below

Figure 1: Cannot start tomcat server.


Solution

Make sure file permission to all files in bin (../tomcat-6.0.18/bin) directory can be executed.
Default mod: -rw-r--r--; means that the file can be read only.

Back to server directory, command line: cd ../../
Then change the file mode command line: sudo chmod 755 -R tomcat-6.0.18/*