Tuesday, July 12, 2011

Complete Liferay Learning Process

To create environment for liferay follow the steps

Step L :
Before you go create a directory called java(any name you prefer) in any location you prefer. Also you must be installed java 1.6 or grater and you must defined the environment variable as follows.



Step I :
Download Liferay latest version here bundled with tomcat and extract it into the folder java/liferay/

Step F :
Download Liferay plug-ins SDK latest version here and extract it into the folder java/liferaysdk/

Step E :
Download Eclipse Java EE IDE for Web Developers and unpack into a directory java/eclipse/

Step R :
Now click on the below link and follow the steps for installing the Liferay into Eclipse.
http://www.liferay.com/community/wiki/-/wiki/Main/Liferay+IDE+Installation+Guide

Step A :
Click here to expand your development environment and install liferay plugin SDK into eclipse.
http://www.liferay.com/community/wiki/-/wiki/Main/Liferay+IDE+Getting+Started+Tutorial

Step Y :
How to create or connect mysql with liferay portal?
Step A :
Goto the below path
MY_JAVA_PATH\liferay-portal-6.0.6\data\hsql\
delete lportal.script and lportal.properties

Step B :
Goto
MY_JAVA_PATH\liferay-portal-6.0.6\tomcat-6.0.29\webapps\
delete the folders sevencogs-hook, sevencogs-mobile-theme and sevencogs-theme

Step C :
Create mysql database called lportal.

Step D :
Goto
MY_JAVA_PATH\liferay-portal-6.0.6\tomcat-6.0.29\webapps\ROOT\WEB-INF\classes\
create file called portal-ext.properties
and edit with following lines:

jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?
useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=MYSQL_USERNAME
jdbc.default.password=MYSQL_PASSWORD

Now save the file and start the server.

External useful links to develop good Liferay portal.

How to create Liferay theme using eclipse?
Liferay theme development part 1
Liferay theme development part 2

How to create and install PHP portlet?
Step A :
create a file called index.php
Step B :
Edit index.php with
<?php

echo "This not the usual Hello world.
Here is the new PHP liferay portlet";

?>
Step C :
Make a zip of index.php to phpportlet.zip
Step D :
From control panel plugins installation upload the phpportlet.zip and give context name same phpportlet and click on install
Step E :
Now add this porlet to any of your page just like drag and drop.

That's it finish.

How to add JavaScript(JS) into Liferay portlet?
Liferay JavaScript into portlet