SlideShare a Scribd company logo
In thisdocumentationyouwill understand
all the features and functionalities of
Liferay, Social Office and Social
Networking so that it will help in
collaboratingusersand organization in an
efficient and easy way.
Liferay
With Social Office & Social
Networking
Shikhar Saran Srivastava
shikhar.447@rediffmail.com
8339041831
http://shikhar.honor.es
Table of Contents
1. Purpose…………………………………………………………………………………………………………………….5
2. Liferay Portal…………………………………………………………………………………………………………….5
3. What is LiferayPortal CE?.…………………………………………………………………………………………5
4. Installationand Setup…………………………………………………………………………………………….5-6
5. After Downloading/Obtainingwhat to do?.................................................................6
6. UsingLiferay SetupWizard………………………………………………………………………………….…6-7
7. Usingthe Control Panel……………………………………………………………………………………….…7-8
8. What is Social Office?..................................................................................................8
9. InstallingSocial Office………………………………………………………………………………………….…8-9
10. Login into Social Office………………………………………………………………………………………….9-11
11. Installationof Social Office inside LIferayPortal…………………………………………………….…11
12. 2nd
Way ofInstallation ofSocial Office inside LiferayPortal………………………...….…...11-12
13. InstallingSocial Networking……………………………………...………………………………………...12-13
14. Liferay Featuresand Functionalities…………………………………………………………….…...….….13
14.1 Users………………………………………………………………………………………………...………………14
14.1.1 Usersand Organizations……………………………………………………...…………….14-15
14.1.2 UserGroups……………………………………………………………………………….……...15-16
14.1.3 Roles……………………………………………………………………………….……………………...16
14.1.4 Password Policies……………………………………………………………………………...……17
14.1.5 Monitoring………………………………………………………………………………………...…...18
14.2 Sites…………………………………………………………………………………………………….…………...18
14.2.1 Sites………………………………….……………………………………………………….…….18-29
14.2.2 Site Template……………………………………………………………………………...…………30
14.2.3 Page Template…………………………………………………………………………...………….30
14.2.4 Site Content……………………………………………………………………………………...30-31
14.2.5 Creatingthe Site Pages……………………………….…………………………….…………...31
14.2.6 Portlets…………………………………………………………………………………………….31-32
14.2.7 Page Permission……………………………………………………………………….……...32-33
14.3 Apps………………………………………………………………………………………………………………...33
14.3.1 App Manager………………………………………………………………………...…………33-34
14.3.2 Store………………………………………………………………………….…………………………34
14.3.3 Purchased……………………………………………………………………….……………………34
14.3.4 PluginsConfiguration………………………………………………………...…………….35-36
14.3.5 License Manager………………………………………………………………………...………...36
14.3.6 OpenSocial Admin…………………………………………………………….…………….36-37
14.4 Configuration………………………………………………………………………………….………………37
14.4.1 Portal Settings………………………………………………………………...………………37-40
14.4.2 Custom Fields……………………………………………………………...………………….40-42
14.4.3 ServerAdministration…………………………………………………………………….42-46
14.4.4 Portal Instances………………………………………………………………….………….46-47
14.4.5 Social Office Configuration………………………………………………………………….47
15. Social Office CE………………………………………………………………………………………….………….47
15.1 What is Social Office?......................................................................................47
15.2 What’sthe difference betweenLiferayPortal and LiferaySocial Office…….47-48
15.3 Social Office PluginsAvailable……………………………………………………………...….48-49
15.4 UsingLiferay as a Social Platform………………………………………………………...….49-51
15.5 How to Use Social Office?..............................................................................51
15.5.1 My Dashboard……………………………………………………………………….……...51-52
15.5.2 CreatingCommunities……………………………………………………….…….……52-53
15.5.3 Descriptionof pre-definedpages…………………………………….…………………53
15.5.3.1 Dashboard………………………………………………………...…………….53
15.5.3.2 Calendar………………………………………………………………...……….54
15.5.3.3 My Documents…………………………………………………………….54-55
15.5.3.4 Forums……………………………………………………………….………...….55
15.5.3.5 Blog………………………………………………………….………………...55-56
15.5.3.6 Wiki………………………………………………………….………...…………...56
15.5.3.7 Contacts Center……………………………………….………….……...56-57
15.5.3.8 Chat……………………………………………………….……….…….………...57
15.5.3.9 Messages………………………………………………….…...…….……57-58
16. WokingSmart with LiferaySocial Office………………………………………………………….58-59
17. Upgradingyour LiferaySocial Office Version………………………………………………...……...59
17.1 Upgradingfrom Social Office version2.x to 3.x……………………………….…………...59
17.2 Upgradingfrom Social Office 3.0.0. to 3.0.1…………………………………………………60
18. Some Out of the Box Features…………………………………………………………………………….60
18.1 AccessingLiferay Services………………………………………………...……………….……….60
18.2 Beanshell…………………………………………………………………………………….………….60-61
18.3 Groovy………………………………………………………………………………………………………...61
18.4 JavaScript……………………………………………………………………………………………….61-62
18.5 Ruby…………………………………………………………………………………………….……………...62
18.6 Python………………………………………………………………………………………………….…….62
19. Authoring the basic content……………………………………………………………………...………...62
19.1 CreatingContent the simple way………………………………………………………………...63
19.2 RICH, WYSIWYG Editing…………………………………………………………….…………...63-66
19.3 Creatinga displaypage……………………………………………………………….…………66-68
20. ConfiguringAdditional PortletSettings………………………………………………………………68
20.1 USERS……………………………………………………………………………………………………68-69
20.2 Mail host names………………………………………………………………………………………...69
20.3 E-Mail Notifications……………………………………………………………………….……...69-71
20.4 ContentSharing……………………………………………………………………………….………...71
20.5 Identification………………………………………………………………………………………….….71
20.6 Miscellaneous:DisplaySettings………………………………………………...………….71-73
21. ConfiguringLiferayfor high availability…………………………………………………….……….73
22. Integrating ExistingUsersinto Liferay………………………………………………………….……73
22.1 LDAP…………………………………………………………………………………………………....74-80
22.2 OpenSSO…………………………………………………………………………………………………...80
22.3 Authentication:Central AuthenticationService (CAS)…………………….…….80-81
22.4 Authentication:Facebook…………………………………………………………………….……81
22.5 Authentication:NTLM……………………………………………………………………………81-82
22.6 Authentication:OpenID………………………………………………………….……………….82
22.7 Authentication:OpenSSO…………………………………………………………………….82-83
23. UsingScripting for AdvancedFlexibility……………………………………………….…………….83
24. UsingLiferay Portal as A Collaborative Platform…………………………………….………84-85
25. Manual Configurationfor SendingMails…………………………………………………….….85-86
26. Running Scripts from the control panel………………………………………………………….86-88
27. Extendingand CustomizingLiferayfor your own needs………………………………………88
Purpose
The purpose of thisdocumentisto equipthe readerwiththe basicsetuprequiredbefore youstart
the basic setuprequiredbefore youstartthe developmentforthe Aakari3 InternshipProgram.As
far as possible there are linksandimagesshowninthe document,however due toversionupdates
there mightbe some differenceswhichwillhave tobe managedbythe reader.If there is anykindof
difficultyfacedpleasepostittoi3-internship-discuss@aakaronline.com .
Liferay Portal
LiferayPortal isan enterprise webplatformforbuildingbusinesssolutionsthatdeliverimmediate
resultsandlong-termvalue.
What is Liferay Portal CE?
LiferayPortal CE isthe opensource versionof Liferay'senterprise webplatformforbuildingbusiness
solutionsthatdeliverimmediate resultsandlong-termvalue.Itstartedoutasa personal
developmentprojectin2000 and wasopensourcedin2001.
Since then,LiferayPortal CE'spopularityhasskyrocketed,boastingover4milliondownloadsinits
lifetimeandwide acclaimfromindustryexpertstodeveloperstobusinessusers.
The projectis still thrivingwithavibrantcommunityof over45,000 thatcontributestothe growth
and developmentof the platform.
Installation and Setup
LiferayPortal isone of the mostflexible applicationsonthe markettodaywithregardto application
serverenvironments.Youcan install LiferayPortal oneverythingfromasharedTomcat installation
to a multi-node clusterrunningacommercial applicationserverandoneverythinginbetween.In
fact, Liferayisusedsuccessfullyinall of these scenarioseveryday.
You’ll findthatbecause Liferayisextremelyflexible initsdeploymentoptions,itiseasytoinstall as
well.If youalreadyhave anapplicationserver,youcanuse the toolsfordeploymentthatcame with
your applicationserver.If youdon’thave anapplicationserver,Liferayprovidesseveral application
serverbundlesfromwhichtochoose.These are veryeasytoinstall andwitha small amountof
configurationcanbe made intoproduction-readysystems.
The CE versionof Liferayisfreelydownloadable fromourwebsite at http://www.liferay.com.Click
the Downloads linkatthe topof the page andyou are presentedwithmultipleoptionsforgettinga
copy of Liferay,includingourconvenientbundlesora.war package for installationonyour
applicationserverof choice.
The EE versionof Liferayisprovidedtoyouasa resultof yoursupportsubscription.Everythingyou
needisprovidedinthe CustomerPortal,includingdownloadlinksthatallow youtoobtaina copy of
a Liferaybundle ora .war package for installationonyourapplicationserverof choice.
So whatis a bundle anyway?A bundle isanopensource applicationserverwithLiferaypreinstalled.
Thisis the mostconvenientwaytoinstall Liferay.Liferayisbundledwithanumberof opensource
applicationservers;all youneedtodois choose the one that bestfitsyourneeds.If youdon’t
currentlyhave anapplicationserver,youmaywantto start withthe Tomcat bundle,asTomcatis
one of the smallestandmoststraightforwardbundlestoconfigure.If youhave anopensource
applicationserverpreference,choose the serveryoupreferfromthe available LiferayPortal
bundles.All of the bundlesshipwithaJavaRuntime EnvironmentforWindows;if youare usinga
differentoperatingsystem,youwill needtohave a JDK(Java DevelopmentKit) installedpriorto
launchingLiferay.
Please note thatLiferayisnotable to provide applicationserverbundlesforproprietaryapplication
serverssuchas WebLogicor WebSphere,becausethe licensesforthese serversdon’tallow for
redistribution.LiferayPortal,however,runsjustaswell onthese applicationserversasitdoeson
opensource applicationservers.A .warfile anddependency.jarsare providedforproprietary
applicationserversand you’llneedtofollow aprocedure toinstall Liferayonthem.
After Obtaining/Downloading what to do?
1. Extract it to a particularlocation.
2. There are 2 ways to runthe tomcat server,checkoutboth:
3. Before runningityouhave to setupjavaenvironmentinyoursystem.
4. For that downloadjavafromthe java.com.
5. NowRightclickon the This PCicon onthe DesktopandGo to Properties->AdvancedSystem
Settings->EnvironmentVariables…
6. Clickon New…->Give name JAVA_HOME->Thengive the directorypathof java.
Example:C:ProgramFilesJavajdk1.7.0_25
7. Clickon New…Again->Give name CATALINA_HOME->Thengive the directorypathof Liferay
Tomcat directory(where youhadextractthe Liferay).
Example:D:liferay-portal-6.2-ce-ga5tomcat-7.0.62
8. Nowthere are 2 waysto run Liferay:
9. Go to cmd (CommandPrompt) &type commands:%CATALINA_HOME%binstartup.batrun
10. Go to extractedLiferaydirectory:liferay-portal-6.2-ce-ga5->tomcat-7.0.62->bin->startup.bat
11. It will take about5minto start the serverafterthat go to yourbrowserand type:
localhost:8080
NowYour Liferayisreadyto use.
Using Liferay Setup Wizard
To make it easyto configure Liferayoptimallyforyouruse,the firstthingyousee whenbrowsingto
your newlyinstalledLiferaybundleisasetupwizard.Thisgivesyoua convenientwaytoconfigure
Liferayforyour purposes.
There are three sectionsof the wizard:the portal,the administratorandthe database.Forthe
portal,youneedto supplythe followinginformation:
Portal Name: the name of the website you’re poweringwithLiferay.Inthisbook,we’llbuildasocial
networkforyournose.This site iscalledNosestersowe’ve suppliedNosesterinthe screenshot
below.
DefaultLanguage: choose the defaultlocale where yoursite resides.
For the administrator,youneedtosupplythe followinginformation:
First Name:the firstname of the user that hasthe administratoraccount.
Last Name:the lastname of the userthat has the administratoraccount.
Email: the email addressof the userthat has the administratoraccount.
LiferayisReadyto use Now.(Don’t change the username:test@liferay.com& Password: test)
Using The Control Panel
Reach the control panel byclickAdmindropdown:Admin->Control Panel. The Control Panel is
organizedinfourmainareas:Users, Sites,Apps,andConfiguration.The optionsinthe Configuration
sectionof the Control Panel categoryinclude configurationoptionswhichcontrol how the portal
operatesandintegrateswithothersystemsyoumayhave.Inthistopic,we’ll coverthe following
topics:
 Portal settings,suchasuser authenticationoptions,mail hostnames,emailnotifications,
identificationsettings,anddisplaysettings
 Customfields
 Serveradministrationoptions,includingoptionsforresources,loglevels,properties,
CAPTCHA,datamigration,file uploads,mail,external services,scripts,andshutdown
settings
 Portal instances
Afteryouhave createdusers,usergroups,organizations,roles,sites,andteamsyourportal will be
readyto host contentandapplications.Youcanconfigure Liferay’sportal settingstofityour
environmentandyourparticularportal project.It’seasyto adjustconfigurationsettingsusingthe
portlet-drivenuserinterface of Liferay’Control Panel.Let’sstartbyexaminingLiferay’sPortal
Settings.
What is Social Office?
Introduction
Social Office isateam workspace productthatcombinescollaborationandsocial networking
featuresina single package designedforenterprises.Itisanend-usersolutionwithaspecific
functionandpurpose outof the box.Ithas beenbuiltusingLiferay Portal asitsfoundation.
Use Case
 SharedWorkspacesforoffice teamstocollaborate.
 Documentsharing.
 Social networkinginanenterprise(Enterprise socialcomputing).
Installing Social Office
Here are some quickinstructionsonhow toinstall LiferaySocial Office v1.X. Thisis specificallyfor
windowsbutitwill alsorunon otheroperatingsystems.
If you wantto install Liferay2.0,please refertothe userguide:
http://www.liferay.com/documentation/social-office/2.0/user-guide
Windows
1. Downloadandsave the desiredbundle from
http://www.liferay.com/web/guest/downloads/social_office
2. Double click the icon on the desktop and install Social Office using all default values.
3. Once it is installed, click start then programs then Liferay social office and then start in order
to run social office.
Login
1. When prompted,signinusingthe defaultuseridandpassword.
. userid: admin
. password:admin
2. You will be askedtochoose a passwordreminder.There isalsoanoptiontocreate yourown.
1. You are thentakento the home page and can begincollaboratingusingall of the great
features!
This was the installationof Social Office outside the Liferayportal.
Installation of Social Office Inside Liferay
Portal
1. Go to Control Panel.
2. Clickon Store
3. Inside Store SearchSocial Office.
4. Clickon Social OFFICECE.
5. Purchase itfrom marketplace.
6. AfterpurchasingitGo to Control Panel->Purchased
7. Inside PurchasedSelectSocial Office CEandinstall it.
8. Afterthat Go to Control Panel->Social Office Configuration.
9. Here Selectthe userYou wantto assignthe Social Office toforfirsttime usersassignitfor
Joe Blogs(Admin).
10. ClickSave & Nowyou can enjoysocial office.
2nd way of Installing Social Office inside
Liferay Portal
1. Go to https://www.liferay.com
2. Go to marketplace andsearchSocial Office CE.
3. Afterfindingitpurchase it,goto purchased& itwill take toyou to the Social Office page
where youcan downloadlatestversionof Social Office.
4. A SocialOffice.lpkgwillbe downloadedtoyoursystem.
5. Nowgo to yourcontrol panel of Liferayandthengo to AppManager.
6. There youwill see install tabthere youjustuploadthe downloadedSocialOffice.lpkg.
7. Wait 1 min andthendo the step8-10 of above processes.
Installing Social Networking
What is Social Networking?
Since the first social networks rose to popularity, concepts such as Friend and later Like–
previously reserved for direct human interaction–have taken on new meaning in an always-
online, information driven culture. It could be argued that social networks have transformed
the way people interact with their friends, relatives and colleagues. Friends, connections,
followers, circles and lists have enabled people to connect and stay connected in ways
they’d never been able to before. Initially, these concepts proved to be highly successful for
casual web sites but they didn’t take to the business world as quickly. But many
organizations are now realizing the importance of leveraging social interactions for more
than just recreation. Liferay’s robust social features make it a great platform for business
web sites, casual web sites and everything in between.
Social applications have many differences when compared to Standard applications that are
vital to a social networking site. Standard applications have general and user specific data,
whereas social applications can share data within a defined network. This variation is a huge
advantage when trying to communicate important information to a large group of people.
This difference in communication settings is illustrated below:
Figure 6: The graphic above demonstrates Standard Apps vs. Social Apps.
Liferay has a constantly improving set of social features which enable you to encourage
social interactions on your own portal and to leverage the power and popularity of other
social networks. In this topic, we’ll discuss:
 General use social portlets
 Social portlets for personal pages
 Configuring personal pages for social networking
 How to connect users using Liferay social relations
 Social equity
 Integrating Liferay with other social sites
When we’re finished, you’ll be well equipped to use Liferay to power your social network.
Installing Social Networking
Same as 2nd
wayof Social Office CE.
SearchSocial NetworkingCEinsteadof Social Office CE.
Liferay Features and Functionality
Go to Control Panel youwill see 4options:
1. Users
2. Sites
3. Apps
4. Configuration
NowI will give the tourof all functionalities LiferayOffers:
1. Users
1.1 Users and Organizations
In the figure youcan see there are 3 tabsbrowse,All Organizations,All Users.
Inside the browse tabClickonAdddropdown& choose the optionyouwantto
add: Like Useror RegularOrganization
If you choose User, it will take youtothe new page:
Enter the Detailsandclicksave the userwill be addedinthe portal.
If you choose RegularOrganization, itwilltake youthe new page:
Enter the details andthe Organizationwill be added.
In the browse sectionyoucansee addedUser andOrganizationsyouhave added.
The 3rd
optionExportUsers will generate the userslistinthe excel sheet(.csv)format.
1.2 User Groups
User groupsprovide away to groupusersindependentlyof the organizationsto
whichtheybelong.Administratorscandefine ausergroupand assignthe user
groupas a memberof a site to make all of its user’smembersautomatically.
Clickon Additwill take youthe new page:
Afterenteringthe details, the usergroupwill be created.
1.3 Roles
Rolesare groupingsof usersthat share a particularfunctionwithinthe portal,
accordingto a particularscope.Administratorscanaddroleswhichcan be
grantedpermissionstovariousfunctionswithinportletapplications.
You can add a newRolesaccordingto yourneedbutthere isno needof adding
roles,predefinedrolesare sufficient.
In orderto change or editany permissionof rolesclickonActionsoption youcan
change accordingto your need.
1.4 Password Policies
Passwordpoliciesdefine enterprise level securitymeasureswhichinclude user
lockoutandpasswordexpiration.Administratorscandefine policiesordelegate
to an LDAP server.
DefaultPassword isgivenasyoucan see inthe figure.
You can add newpasswordpolicyif there isrequirement.
Or you can change existingDefaultPasswordPolicybyclickingActionsoption:
You can change the passwordpolicyaccordingtoyourneedyouwant inthe
LoginProcess.
1.5 Monitoring
Monitoringallowsyoutosee all of the live sessionsinthe portal.For
performance reasons,thissettingisgenerallyturnedoff inproduction.
2. Sites
2.1 Sites
Sitesare a set of pagesthat displaycontentandprovide accessto specific
applications.Sitescanhave members,whichare givenexclusiveaccessto
specificpagesorcontent.
Withmost products,youwouldlearnwhatthe software cando interms of
settingupyourusersand securitymodel andthenstartbuildingyoursystem.
You’ddesignyourinfrastructure andgetyourserverenvironmentupand
runningwhile yourdeveloperswritethe applicationsthatlive onyourwebsite.
WithLiferayPortal,however,youstartfartherahead.LiferayPortal ismore than
justa containerforapplicationswitharobustsecuritymodel.Italreadyincludes
manyof the applicationsyou’llneed,outof the box,readyto goand integrated
withall the usermanagementandsecurityfeaturesyou’ve alreadylearned
about.
Nearlyall Liferayusers use Liferay’sWebContentManagementsystem(WCM).
Afterall,all everywebsite hascontentthatneedstobe managed.Liferay’s
WCM empowersyoutomanage all the contentonyour site quicklyandeasily
withinyourbrowser.Beyondmanagingexistingcontent,LiferayWCMletsusers
easilycreate andmanage everythingfromasimple article containingtextand
imagestofullyfunctional websites.Webpublishingworksalongside Liferay
Portal’slargercollectionof applications,whichmeansyoucanaddshoppingcart
functionality,visitorpolls,webforms,sitecollaborationtoolsandmore.
Everythingisdone withourcollectionof easy-to-use toolswithfamiliarrich-text
editorsandan intuitive interface.
In thissectionwe’ll coversome basicaspectsof LiferayWCM,including:
Page Types
Layouts
Page andcontentpermissions
Importingandexportingcontent
Contentcreationandediting
Contentpublishing
WCM Workflow
By the time we’re done,youshouldbe able toapplyall these conceptstoyour
owncontent.To demonstrate Liferay’sContentManagementfeatures,we’ll
create and manage contenton the portal for Nose-ster,anew social network
where people are connectedbasedonwhattheirnoseslooklike.
For creatingsitesclickonAddbutton& choose whattype of site youwant to
create:
Let’stake a example of creatingaBlankSite:
Enter the relevantdetailsandclickonsave page
Creating and Managing Pages
You have a fewoptionsforaccessingthe page creationinterface.Tosimplifythis,we’ll
coverthe Dockbar’s Managemenuslightlyoutof order.There are twointerfacestobe
aware of: Site Pages andPage.You can get to these frommultipleplaces.Dependingon
whatyou’re editingandwhere youare onthe portal,you’ll use eitherthe Managemenu
or the Control Panel towork withyourpages.Fromthe Control Panel,make sure you
have the correct site selectedinthe contextmenuselectorandclickthe Site Pages link
inthe contentsection.If you’ve alreadynavigatedtothe site youwishtomanage,click
Managefromthe Dockbarand select Site Pages.Thisisthe exactsame interface yousee
inthe Control Panel.Tomanage the specificpage of the site you’ve navigatedto,click
ManageandselectPage.
For convenience,youcanalsonavigate tothe Sitespage underthe Portal sectionof the
Control Panel andclick Actions → ManagePages.Toquicklyaddasingle page while to
the site you’re browsing,click Add fromthe Dockbarandselect Page.Justentera name
for the page and it’saddedimmediately.Clickthe name of the page inthe navigation
menuto visititandstart workingon it.
Site Pages isan interface toview existingpages,create new pages,view pagesand
exportor importpagesusingLiferayArchive (LAR) files.Note thatyoucanswitch
betweenmanagingasetof pagesand managinga single page usingthe left-handside
navigationmenu.Clickon PublicPages orPrivate Pages tomanage the groupor clickon
an individualpage tomanage justthat one.Switchingviewslike thischangesthe listof
available tabstothe right.By default,liferay.com, whichwe renamedtonosester.com,
containsa single publicpage called Welcome.
Liferay’spage groupsare alwaysassociatedwithsites.Evenusers’personalpagesare
part of theirpersonal sites.All pagesbelongtoone of twotypesof page sets:public
pagesand private pages.Bydefault,publicpagesare accessible toanyone,even non-
loggedinusers(guests).Private pagesare accessible onlytouserswhoare membersof
the site whichownsthe pages.Thismeansthe private pagesof an organization’ssite
wouldonlybe viewable bysite membersandmembersof the organization.
Regardlessof whetherthe pagesare publicorprivate,Liferayusesthe same interface to
manage them.Let’slookat thisinterface more closely.
More Page Management Tools
From the Manage Site Pagesdialogbox,youcanadd a page to the site byclickingthe
Add Pagebutton.Because PublicPages isselectedonthe left,clicking Add Pagehere
adds a top level page nexttothe Welcome page.Youcan, however,nestpagesas
deeplyasyoulike.Tocreate a sub-page underthe Welcome page,selectthe Welcome
page firstand thencreate your page.If youlater decide youdon’tlike the orderof your
pages,youcan drag and drop theminthe listto put theminwhateverorderyouwant.
Let’sgo aheadand add anothertoplevel page andname it Community.We’ll use this
page for the RecentBloggersandWiki portlets.
Whenyoucreate a newpage,youcan create eitherablankpage or a page prepopulated
withportletsfroma page template.Whenyou’re enteringthe name of the page,you
can selectfroma listof page templates thatare currentlyavailable.Toview the pages
once you addthem,clickthe View Pages button.Thisishow you’dpopulate yourpages
withcontentandapplications.
If you’re usingthe Manage Pagesinterface tocreate a new page,you’ll have some
additional optionstocreate differenttypesof pages.There are PortletPages,Panel
Pages,EmbeddedPages,URL Pagesand Link to Page. By default,all pagesare created
as portletpagesbutin some situationsyoumightwanttouse one of the otheroptions.
PortletPages are the pageswe’re usuallytalkingabout.Theyhave alayoutwhichyou
can drag and drop portletsinto.Mostof the pagesyoucreate will be portletpages.
Panel Pages can have any numberof portletsonthem, asselectedbyanadministrator,
but onlyone will be displayedatatime.Usersselectwhichportlettheywanttouse
froma menuonthe leftside of the page and the selectedportlettakesupthe entire
page.
EmbeddedPages displaycontentfromanotherwebsiteinside of yourportal.An
administratorcanseta URL frominthe page managementinterface andthatpage will
appearin the contextandwithinthe navigationof yourLiferayportal.
URL Pages are justredirectstoany URL specifiedbyanadministrator.Youcanuse URL
pagesto create linkstopagesbelongingtoothersitesof yourportal or to pagesof an
external site.Use URLpagescautiouslysince blindredirectscreate apooruser
experience.
Link to Page createsa portal page whichfunctionsasan immediateredirecttoanother
page withinthe same site.Youcan selectwhichpage tolinkto froma dropdowninthe
page managementinterface.Youcoulduse a Link to Pageto place a deeplynestedpage
inthe primarynavigationmenuof yoursite,forexample.
Once you’ve created pagesandpopulatedthemwithcontent,Liferayprovidesawayfor
youto back themup to separate files.Let’sseehow thatworks.
Backing Up and Restoring Pages
Nexttothe Add Pagebuttoninthe Manage Site Pagesscreenare twobuttonslabeled
Exportand Import.The Exportbuttonexportsthe pagesyoucreate intoa single file,
calleda LAR (LiferayArchive).Youcanthenimportthisfile intoanyserverrunning
Liferaytore-create the pages.If youhave a LAR youwouldlike toimport,use the Import
button.ExportingandImportingLARsisa great wayto take contentfromone
environment(say,adevelopmentorQA environment)andmove itall inone shotto
your productionserver.Note thatyoushouldnotmake thisaregularoccurrence.If you
wantto regularlymove pagesfromone servertoanother,youshoulduse Liferay’s
stagingenvironment.
LARs are also a goodway to back up yoursite’scontent.Youcan exportthemtoa
specificlocationonyourserverwhichisbackedup,andif you everhave torestore your
site,all youneedtodo isimportthe latestLAR file.One limitationonLARfiles,however,
isthat theyare versiondependent,soyoucan’tuse an exportfroman oldversionof
Liferayandimportit intoa newerversion.
Let’sbe good administratorsandexportaLAR file forbackuppurposes.Clickonthe
Exportbuttonand thenname the file nosesterv1.lar.Use the checkboxestodetermine
whatyou’dlike toexport.Forthisinitial export,selecteverything.Notethatif youselect
the More Options link,the listexpandstoinclude datafrommanyof Liferay’s
applications,includingthe DocumentsandMediaLibrary,Message BoardsandWeb
Content.Youcan also exportthe theme you’re using.
Once you click Export,yourbrowserpromptsyouto save the file.Once youhave the file,
youcan copyit to a backup locationforsafekeepingorimportitintoanotherinstallation
of LiferayPortal.If youmustrebuildorwishtorevertback to thisversionof yoursite,
youcan importthisfile byclicking the Importbuttonfromthe Manage Site Pagesdialog
box,browsingtoitand selectingit.
Next,we’ll lookatthe optionsonthe rightside menu,startingwithLookand Feel.
Customizing the Look and Feel
Whenyouopenthe Manage Site Pagesdialogbox itdefaultstothe Lookand Feel tab.
On thistab,you’re presentedwithaninterface thatallowsyoutochoose a theme for
the current site.Themescantransformthe entire lookof the portal.Theyare createdby
developersandare easilyinstalledusing the LiferayMarketplace.Since we don’thave
any themesbeyondthe defaultone installedyet,we’ll use the defaulttheme forour
pages.
Many themesinclude more thanone colorscheme.Thisallowsyoutokeepthe existing
lookand feel while givingyour site adifferentflavor.Changethe colorscheme fromblue
to greenbyselecting Green underColorSchemes.If younow go back to the site (by
clickingBackto yoursitename.cominthe topleftcornerof the Control Panel),you’ll see
some parts of the page are now tingedina greenishhue.
If you applya color scheme toa setof publicorprivate pagesitis, bydefault,appliedto
each page inthe set.If, however,youopenthe Manage Pagesdialogbox fora particular
page,youcan select Definea specific look and feel forthis page to make the color
scheme applytothispage only.You can use thisfeature tochoose a differentcolor
scheme fora particularpage than the one definedforthe setof publicor private pages
to whichitbelongs.
There are a fewmore configurable settingsforyourtheme.Youcanswitchthe bullet
style betweendotsandarrowsand youcan choose whetherornot to show portlet
bordersbydefault.
Alsonotice themescanapplytoregularbrowsersor mobile devices.Youcouldcreate
anothersite formobile usersattachedtothe http://m.yoursitename.com addressand
serve upa page designedforthe smallerscreensonphones.
The CSS sectionallowsyoutoentercustomCSSthat will also be servedupbyyour
theme.Inthisway,youcan tweaka theme inreal time byaddingnew stylesor
overridingexistingones.
The nextoptionconfiguresthe logothatappearsforyoursite.
Using a Custom Logo
If you wantto use your ownlogofor a specificsite,use the Logotab.Addinga custom
logoiseasy:selectthe Logo tab andbrowse to the locationof your logo.Make sure your
logofitsthe space in the top leftcornerof the theme you’re usingforyourwebsite.If
youdon’t,you couldwindup witha site that’sdifficulttonavigate,asotherpage
elementsare pushedaside tomake wayforthe logo.
In the logotab, youcan also choose whetherornotto displaythe site name onthe site.
If you checkthe box labeled Show SiteName, the site name will appearinthe topright
corner of the page.This optionisenabledbydefaultandcannotbe disabledif they
Allow Site Administratorsto settheir own logo optionisdisabledin PortalSettings.Itis
alsonot available forthe default site–onlynewlycreatedsitesanduserpageshave the
optiontohave the name display.
JavaScript
If you clickon JavaScriptfromthe Site Pagesinterface forapage set(eitherPublicPages
or Private Pages),you’llfindawindow where youcanenterJavaScriptcode the will be
executedatthe bottomof everypage inthe site.If your site’stheme usesJavaScript(as
isusuallythe case),it’sbesttoadd customJavaScriptcode to the theme and notinthis
window.Thisway,all of yoursite’sJavaScript code remainsinone place.
Usingthe JavaScriptwindow of yoursite’sSite Pagesinterface maybe usefulif your
site’stheme does notuse JavaScript.Inthiscase,the JavaScriptwindow of yoursite’s
Site Pagesinterface will contain allof your site’s JavaScriptandyoucan add some
dynamicfeaturestoyoursite’spages.
Next,let’slookatanadvancedfeature of the Site Pagesinterface:mergingthe current
site’spageswiththe pagesof the defaultsite.
Advanced
If you clickon Advanced fromthe Site Pagesinterface forapublicpage set,you’ll findan
optiontomerge the publicpagesof your portal’sdefaultsite withthe publicpagesof
the current site.If youenable thisoption,the pagesof the defaultsite appearinthe
currentsite’snavigationbar,alongwiththe currentsite’spages.Also,the pagesof the
currentsite appearin the navigationbarof the defaultsite,alongwiththe defaultsite’s
pages.This“merging”of pagesonlyaffectsthe listof pagesinthe defaultsite’sandthe
currentsite’s navigation bars.Thisallowsuserstomore easilynavigatefromthe current
site to the defaultsite,andvice versa.Thisoptioncanbe enabledforthe publicpagesof
bothpersonal sitesandregularsites.
Note that this“merging”of pagesisnot a “hard merge”.For example,supposethatthe
site administratorsof twentydifferentsitesonyourportal all enabledthe Mergedefault
site’s publicpages’ option.Wouldthe pagesof all these differentsitesbe mergedinto
each site’snavigationbar?No,thatwouldmake a mess!Instead,the portal keepstrack
of the currentscopeGroupId(the IDof the currentsite) andthe previousscopeGroupId
(the ID of the previouslyvisitedsite).If the Mergedefaultsite’spublic pages optionis
enabledforeitherthe currentsite orthe previoussite,the pagesof the defaultsite are
mergedinthe pagesof the othersite.
For example,suppose thatyourportal hasthree sites:the defaultsite,site A,andsite B.
All three siteshave some publicpages.Site A hasthe Mergedefaultsite’s public pages
optionenabled,siteBdoesnot.Whena userfirstlogsin,he’sdirectedtothe default
site.The scopeGroupIdisthat of the defaultsite andthere isnopreviousscopeGroupId,
so no additional pagesappearinthe defaultsite’snavigationbar.Thensuppose the user
navigatestosite A.Site A hasthe Mergedefaultsite’spublic pages optionenabled,so
the defaultsite’spagesare addedtosite A’snavigationbar.Now if the usergoesback to
the defaultsite,site A becomesthe previoussitesosite A’spagesare addedto the
defaultsite’snavigationbar.If the usernavigatestosite B,no additional pagesappearin
site B’snavigationbarbecause site Bdoesnot have the Merge defaultsite’spublic pages
optionenabled.Andif the usernavigatesbacktothe defaultsite,siteBbecomesthe
previoussite,and,again,since site Bdoesnothave the Mergedefaultsite’s publicpages
optionenabled,noadditional pagesare addedtothe defaultsite’snavigationmenu.
Next,let’sexaminehowtoconfigure individual pages.
Changing Options for Individual Pages
Whenyouselecta single page,some differentoptionsappear.Let’slookatwhatthese
do.
Details:letsyouname the page for anylocalizationsyouneed.Youcan alsosetthe
HTML title thatappearsin the browserwindow forthe page. Plus, youcanset an easyto
remember,friendlyURLfor the page.
SEO: providesseveral meansof optimizingthe datathe page providestoanindexer
that’scrawlingthe page.You can setthe variousmetatags fordescription,keywords
and robots.There’salsoa separate Robotssectionthatletsyoutell indexingrobotshow
frequentlythe page isupdatedandhow itshouldbe prioritized.If the page islocalized,
youcan selectabox to make Liferaygenerate canonical linksbylanguage.If youwantto
setsome of these settingsforthe entire site,youcanspecifythemfromthe Sitemaps
and Robotstabs of the Manage Site Settingsdialogbox (seebelow).
Look and Feel:letsyouseta page-specifictheme.
Layout: letsyouspecifyhow portletsare arrangedona page.Choose fromthe available
installedtemplatestomodifythe layout.It’sveryeasyfordeveloperstodefinecustom
layoutsandadd themto the list.Thisiscoveredmore thoroughlyinboththe Liferay
Developer’sGuide and inLiferay in Action.
JavaScript: givesyouthe abilitytopaste customJavaScriptcode tobe executedonthis
page.
Custom fields:If customfieldshave beendefinedforpages(whichcanbe done fromthe
CustomFields page of the Control Panel),theyappearhere.These are metadataabout
the page andcan be anythingyoulike,suchasauthor or creationdate.
Advanced: containsseveral optional features.Youcanseta querystringto provide
parameterstothe page.Thiscan become useful towebcontenttemplates.Youcanset
a target forthe page so that iteitherpopsupin a particularlynamedwindow orappears
ina frameset.Andyoucanset an iconfor the page that appearsinthe navigationmenu.
Mobile Rule Groups:allowsyouto applyrulesforhow thispage shouldbe renderedfor
variousmobile devices.Youcan setthese upinthe MobileDevice Rules sectionof the
Control Panel.
CustomizationSettings:letsyoumark specificsectionsof the page youwantuserstobe
able to customize.
Note that the Manage→ PageLayout menudirectsyoutothe same Layout tab that’sin
Manage→ Page
Modifying Page Layouts
Page layoutsallowyoutoarrange yourpagesso the contentappearsthe way you want
it to.Liferaycomeswithmanylayoutsalreadydefined.Developerscancreate more and
theycan be deployedtoyourportal for youruse.
To prepare forthe portletswe’llsoonbe adding,let’schange the layoutof the
Collaborationpage.Toaccesslayouts,selectManage→ PageLayout fromthe Dockbar.
Now,selectthe 2 Columns(70/30) layoutandclick Save.Once saved,you’ll returntothe
page and it’ll seemasthoughnothinghashappened.Once we startaddingportlets,
however,you’ll notice the page isnow equallydividedintotwocolumns.Youcanstack
portletsontop of each otherinthese columns.There are,of course,more complicated
layoutsavailable andyoucanplayaroundwiththemto get the layoutyouwant.
Sometimesaparticularlayoutis almostwhatyouwant butnot quite.Inthiscase use the
NestedPortletsportlettoembedalayoutinside anotherlayout.Thisportletisa
containerforotherportlets.Itletsyouselectfromanyof the layoutsinstalledinLiferay,
justlike the layouts fora page.Thisgivesyouvirtuallyunlimitedoptionsforlayingout
your pages.
The nextoptioninthe Managemenuispage customizations.
Page Customizations
Page Customizations are anew feature inLiferay6.2.With page customizations,any
userwiththe appropriate permissionscancreate personalizedversionsof anypublic
page.Before userscancreate personalizedversionsof pages,customizationsmustfirst
be enabledbyanadministrator.Administratorscanactivate ordeactivate
customizationsforanyrowor columnon anypage.Whenuserscustomize a page,they
have the optionto use eithertheirversionorthe defaultversionof apage.Userscan’t
see alternate versionsof pagesotherthantheirown.
Whenan administratoractivatespage customizationsforapage,anyportletsthatare in
a Customizablerowor columncan be movedaroundthe page or removedfromthe
page.Users can add newportletsof theirownchoosingtothese columnsof the page
and can alsocustomize portletconfigurations. If atany time usersdetermine theydon’t
like theircustomizations,theycanclick Reset My Customizations toreverttheirpages
back to the default.
Nowthat youknowhowto enable page customizations,let’slookatthe settingsforthe
site as a whole.
Configuring Site Settings
As withSite Pages,youcanaccess Site Settingsthroughthe Control Panel ordirectly
fromthe site usingthe Dockbar(Manage→ SiteSettings).
You’ll findoptionstospecifydetailsandmetadataaboutyoursite,setupfriendlyURLs
and virtual hosts,configure searchengine optimizationsettings,turnstagingonor off
and specifyaGoogle AnalyticsID.Let’stake a closerlook.
Details:allowsanadministratortochange the descriptionandmembershiptype of a
site andalso to specifytagsandcategoriesforthe site.The membershiptype canbe set
as open,restrictedorprivate basedonthe privacyneedsof the site.Userscan joinand
leave anopensite at will.Tojoinarestrictedsite,auserhas to be addedby the site
administrator.A usercan alsorequesttobe addedthroughthe Sitessectionof the
Control Panel.A private site islike arestrictedsite butdoesn’tappearinthe Sites
sectionof the Control Panel foruserswhoaren’tmembers.
Pages: FromSite Settings,clickon Pages tomanage some basicfeaturesof the pageson
a site.If no pageshave beendefinedyet,youcansetsite templatesforthe publicor
private pages. If pagesalreadyexist,linksare providedtoview them.Youcanalso
change the site’sapplicationadapter,whichisaspecial type of hookpluginthat
customizesoutof the box functionalityforspecificsites.
Site URL: Seta friendlyURLand/or a virtual hostforyour site here.The Friendly URL
optionletsyoumanage the pathto your site inthe portal’sURL. FriendlyURLsare used
for bothpublicandprivate pages.Forpublicpages,the friendlyURLis appendedto
http://localhost:8080/web.Forprivate pages,the friendlyURLis appendedto
http://localhost:8080/group.EachfriendlyURLneedstobe a unique name,of course.
Havinga human-readable friendlyURLassistsindexingbotsandiscritical togood search
engine optimization.
For example,suppose youwere creatingaportal for a bankcalledthe BestBank. If you
setthe friendlyURLof yourportal’sdefaultsite to/best-bank,the URL of your default
site’spublichome page wouldchange to http://localhost:8080/web/best-bank/home.If
your portal’sdefaultsite hadprivate pages,the URL of the defaultprivate home page
wouldchange to http://localhost:8080/group/best-bank/home.
Note that if you’re addingafriendlyURLfor yourportal’shome page,youshouldupdate
your portal’sHome URL fieldsothatpage requeststo http://localhost:8080redirect
properly.Todo this,navigate tothe Portal Settingspage of the Control Panel andfind
the Home URL fieldinthe Navigationsection.Forourbankexample,we wouldenter
/web/best-bank/homeintothe Home URLfield.Once you’ve enteredthissetting,page
requeststolocalhost:8080 will redirecttothe friendlyURLof yourportal’snew
homepage:http://localhost:8080/web/best-bank/home.
VirtualHosts make web navigationmucheasierforyourusersbyconnectingadomain
name to a site.Thistab allowsyoutodefine adomainname (i.e.,
www.mycompany.com)foryoursite.Thiscanbe a full domainora subdomain.This
enablesyoutohosta numberof websitesasseparate sitesonone Liferayserver.
For instance,if we setthisupfor Nose-ster’sDevelopmentNetwork,usersinthatsite
coulduse developers.nosester.comtogettotheirsite,providedNose-ster’snetwork
administratorscreatedthe domainname andpointedittothe Liferayserver.
To setthis up,the DNS name developers.nosester.com shouldpointtoyourportal’sIP
addressfirst.Thenenter*http://developers.noseter.com*inthe Virtual Hosttabfor the
Developerssite.Thishelpsusersquicklyaccesstheirsite withouthavingtorecall an
extendedURL.
Site Template:If you’ve createdthe site fromasite template,thissectiondisplays
informationaboutthe linkbetweenthe site template andthe site.Specifically,youcan
see whichsite template wasusedandwhetherornot itallowsmodificationstothe
pagesinheritedfromitbysite administrators.If you’re notusingsite templatesforthis
site,youcan safelyignore thissection.
Sitemap:letsyousenda sitemaptosome searchenginessotheycancrawl yoursite.It
usesthe sitemapprotocol,whichisanindustrystandard.Youcan publishyoursite to
Yahoo or Google andtheirwebcrawlerswill use the sitemaptoindex yoursite.Liferay
Portal makesthisverysimple foradministratorsbygeneratingthe sitemapXMLforall
publicwebsites.
By selectingone of the searchengine links,the sitemapwill be senttothem.It’sonly
necessarytodo thisonce per site.The searchengine crawlerwillperiodicallycrawl the
sitemaponce you’ve made the initial request.
If you’re interestedinseeingwhatisbeingsenttothe search engines,selectthe Preview
linktosee the generatedXML.
Robots: If you’re usingvirtual hostingforthissite,youcanconfigure robots.txtrulesfor
the domain.The Robotspage givesyouthe optionto configure yourrobots.txtforboth
publicandprivate pagesona site.If youdon’thave Virtual Hostingsetup,thistab is
rather boring.
Staging: enablesyoutoedit andrevise apage behindthe scenes,thenpublishchanges
to yoursite once theyhave beencompletedandreviewed.
Analytics: allowsyoutointegrate yourpageswithGoogle Analytics.Liferayprovides
seamlessintegrationwithGoogle Analytics,allowingyoutoplace yourID inone place,
thenit will getinsertedoneverypage.Thisenablesyoutofocusyoureffortsonbuilding
the page,rather thanrememberingtoputthe code everywhere.Google Analyticsisa
free service whichletsyoudoall kindsof trafficanalysisonyoursite soyoucan see who
visits,where visitorsare fromandwhatpagestheymost oftenvisit.Thishelpsyou
tweakyoursite so youcan provide the mostrelevantcontenttoyourusers.
Nowthat youknowhowto configure sites,let’slookatpage templatesandsite
templates.
2.2 & 2.3 Site Templates & Page Templates
Site Template
Site Templatesallow youtodefine pagesandwebcontenttoinclude when
creatingsites.Administratorsmaydefine andeditsite templatesaswell astheir
permissions.
Page Template
Page Templatesallow youtoselectapage to use and portletstobe included
whencreatinga page.Administratorsmaydefine andeditpage templatesas
well astheirpermissions.
PageTemplates and Site Templates are invaluable toolsforbuildingsimilar
pageson largerportals.Asyou continue toaddpagesto sitesinyourportal,
you’ll notice repeatablepatternsinthe designsof those pages.Page templates
enable youtopreconfigure asingle page andthenapplyittoany new page you
create.Site Templatesallowyoutodo the same thingbuton the scale of a site–
if you have multiplesitesthatuse asimilarstructure of pages,youcan create a
single site template anduse ittocreate as manysitesasdesired.
Site Content
Liferay6.1 makesit easiertoaccessWeb Contentmanagementwithoutusing
the Control Panel.Youcan now click Manageandthen Site Contenttoaccess
the same Web Contentcontrolsfeaturedinthe Control Panel rightfromyour
portal page.
You can manage the followingkindsof content:
 RecentContent
 WebContent
 DocumentsandMedia
 Bookmarks
 Calendar
 Message Boards
 Blogs
 Wiki
 Polls
 Software Catalog
 Tags
 Categories
 Social Activity
 DynamicData Lists
Creating the Sites Pages
There are a lotof otherthingsyoucan do beyondplacingportletsonapage.So
let’sstartworkingonthe Nose-stersite.Youcando thisby goingupto the
Dockbar and clickingGo to → Nose-ster.
We’ll use the Community page youcreatedearlierinthe topics.Navigate tothe
Community page andselectManage→ Pagefromthe Dockbar.
Thisscreenshouldnow be familiartoyoubut let’srecap.
The Page tab allowsyouto:
 Change the name of the page
 Enter HTML code for the title
 Choose the page type
 Hide the page from the theme navigation
 Define afriendlyURLto the page
 Choose anicon to be displayed
 Choose a frame targetfor the page
 Copyan existingpage
You can alsoentercustommeta tags or JavaScripttothe page if you’re a web
developer.Additionally,if youclickthe Permissions button,youcandefine
whichusers,groups,rolesororganizationscanview oreditthe page.
The Childrentabletsyoucreate childpagesunderneaththe page you’ve
selected.Youcannestpagesas deepas youlike butforeverypage below the
top level hierarchyyoumustprovide navigationtoitviaa Navigationor
Breadcrumbportlet,atleastwithmostthemes(includingthe default).
Developerscancreate themeswhichhave cascadingmenubarswhichshow the
full hierarchy.Some examplesof thatare in Liferay’spluginrepositories.
For now,click Return to full page.You shouldbe able todefine andmanage
pagesinLiferayat thispointso let’slookatwhat you’dputon a page.
Portlets
As we discussedearlier,LiferayPortal pagesare composedof portlets.All of
your site’sfunctionality,fromblogstoshopping,iscomposedof portlets.
Addingportletstoa page issimple.Let’saddsome toour Collaborationpage.
1. In the Dockbar,select Add → More.
2. In the menuthat appears,expandthe Collaborationcategory.
3. Drag the BlogsAggregatorportletoff the AddApplicationwindow ontothe rightcolumnof
our page.
4. Next,dragthe Wiki portlettothe left column.
See howeasyit isto add applicationstoyourpages?We’ve gone one step
further:we’ve gotthe Wiki portlet,the BlogsAggregatorportletandthena
nestedportletwithadifferentlayoutandthe Alerts,SearchandDictionary
portletsinthe figure below.
Page Permissions
By default,publicpagesare justthat: public.Theycanbe viewed byanybody,
loggedinor notloggedin.Andprivate pagesare reallyonlyprivate fromnon-
membersof the site.If someone hasjoinedyoursite orisa memberof your
organization,thatpersoncansee all the private pages.Youcan, however,
modifythe permissionsonindividual pagesineitherpage groupsoonlycertain
userscan viewthem.
Let’ssay we wantedtocreate a page onlyfor administratorstosee.We cando
thiswiththe followingprocedure:
1. Go to the Dockbarand select Manage→ ControlPanel.
2. Ensure you’ve selectedthe defaultsite inthe contextselector.
3. Clickthe Site Pages link.
4. Clickthe PrivatePages tab to switchto the Private Pages.Remember,thesepagesbydefault
are viewableonlybymembersof the site.
5. Create a page called Admin Tips.
6. Clickon the page inthe tree onthe leftandthenclick Permissions.
7. Uncheck the View and Add Discussion permissionsnexttothe Site Memberrole.
8. Clickthe Savebutton.
Congratulations!You’vejustchangedthe permissionsforthispage soonlysite
administratorscanview it.Anyusersyouaddto thisrole can now see the page.
Otherusers,evenmembersof thissite,won’thave permissiontosee it.
PagesinLiferayare as flexible aspagesyou’dcreate manuallywithoutaportal.
Usinga pointandclickinterface,youcan define yoursite anywayyouwant.You
can create and remove pages,exportandimportthem, settheirlayouts,define
howtheyare indexedbysearchenginesandmore.You’ve alsobeenintroduced
to Liferay’sconceptof sites.Again, usingapointandclickinterface,youcan
create multiple websitesanddefine how userscanaccessthem, whetherthey
are linkedtoa domainname andcreate all of theirpages.
3. Apps
3.1 App Manager
AppManager managesall the installedappsfromthe marketplace orby
installingmanually.
You can Activate itor Deactivate anyappsby clickingActionButton.
In Install TabYou can manuallyuploadafile andinstall itina liferayportal.
Afteruploadingyoucanmanage itfrom AppManager.
3.2 Store
LiferayMarketplace where youcanbuyapps,themesandmany cool stuffs.
3.3 Purchased
Thisis the place whenyoupurchase anyapp fromthe store will show here you
will install it.
3.4 Plugins Configuration
PluginsConfigurationallowsadministratorsto configure whichportal roleshave
access to certainplugins.
PortletPlugins
Theme Plugins
Layout Template Plugins
3.5 License Manager
In License Managerwe can see our liferayregistereddetailsorif we hadbuy a
liferay thenwe cangenerate licensebyenteringOrderId.
3.6 OpenSocial Admin
In OpenSocial Adminwe canbuildandpublishourownGadgets.
4. Configuration
4.1 Portal Settings
Settingsiswhere mostof the global portal settingsare includingnames,
authentication,defaultuserassociations,andmail hostnames.
Most global portal settingscanbe configuredfromthe Portal Settingssectionof
the Control Panel.The Configurationheadingcontainsthe followinglinks:
General:letsyouconfigure global settings,suchasthe companyname,domain,
the virtual host,a global portal logo,andmore.
Authentication:allowsyoutoconfigure userauthenticationmethodsand
connectionstoLDAPand Single Sign-Onservers.
Users:has three tabslabeledFields,ReservedCredentialsandDefaultUser
Associations.The Fieldstabenablesordisablessome userfields,suchas
birthdayor termsof use.The ReservedCredentialstabletsyoureservescreen
namesand email addressessouserscannotregisterusingthem.Youmightuse
thisto preventusersfromregisteringonthe portal withusernamesthatcontain
profanityorthat soundofficial,suchas admin or president.The DefaultUser
Associationstabletsyouconfigure defaultmembershiptoroles,usergroups,
sitesfornewusersand providesacheckbox whichallowsyoutoretroactively
applythese toexistingusers.
Mail Host Names:letsyouadd a listof othermail hostnamesto be associated
withyourorganization.Forexample,yourmaindomainmightbe
mycompany.combutyoumightuse mycompany-marketing.comforyouremail
newsletters.Anydomainnamesassociatedwithyourorganizationcangohere.
Email Notifications:allowsyoutoconfigure Liferaytosendemail notifications
for certainevents,suchasuserregistrations,passwordchanges,etc.Youcan
customize those messageshere.
ContentSharing: containsoptionsforenablingsite administratorstodisplay
contentinone site fromothersitestheyadminister.Youcanalsoconfigure rules
for whethersubsitesshouldbe able todisplaycontentfromtheirparentsites.
Afterclickingon PortalSettings inLiferay’sControl Panel,youcanconfigure any
of the areasshowninthisfigure.
General
The General linktakesyouto a screenwiththree headings:MainConfiguration,
Navigation,andAdditional Information.Underthe MainConfigurationheading,
youcan setthe name of the companyor organizationthat’sresponsiblefor
runningthe portal.Thisname alsodefinesthe name of yourportal’sdefaultsite.
Its defaultname isliferay.comsoyouwill definitelywanttochange thisto
reflectthe name of yourcompanyor organization.Youcanalsoset the mail
domain,virtual hostandcontentdeliverynetworkaddresshere.
Under the Navigationheading,youcanseta home page for your portal here as
well asdefaultlandingandlogoutpages.Forsettingthesepages,justuse the
part of the page’saddressthatfollowsyourdomain.Forexample,if youwant
the defaultlandingpage tobe http://localhost:8080/web/guest/login,use
/web/guest/login.Youcanalso use the variables${liferay:screenName} and
${liferay:userId}aspart of the address.Thiscomesinhandy if youwant to
redirectuserstotheirpersonal pagesuponlogin.Alternatively,youcansetthe
defaultloginorlogoutpage ina portal-ext.properties file withthe properties
default.landing.page.pathanddefault.logout.page.path, respectively.Underthe
Additional Informationheading,youcanspecifyaLegal name,ID,companytype,
SIC code,tickersymbol,industryandindustrytype.
Authentication
The Authenticationpage hasseveral tabs:General,LDAP,CAS,Facebook,NTLM,
OpenID,OpenSSOandSiteMinder.Youcanuse anyof these authentication
methodstoconfigure how userswill authenticatetoLiferay. Since Liferay
supportsquite afew authenticationmethods,thereare differentsettingsfor
each.
The settingsonthe General tab of the Authenticationpage affectonlyLiferay
functionalityanddon’thave anythingtodowiththe integrationoptionsonthe
othertabs. The General taballowsyouto customize Liferay’sstandard
authenticationbehavior.Specifically,the General taballowsyoutoselectfrom
several global authenticationsettings:
 Authenticate viaemailaddress(default),screenname,oruser ID(a numerical IDauto-
generatedinthe database–notrecommended).
 Enable/Disable automaticlogin.If enabled,Liferayallowsauserto checka box whichwill
cause the site to“remember”the user’sloginbyplacinga cookie onhisor herbrowser.If
disabled,userswill alwayshave tologinmanually.
 Enable/Disable forgottenpasswordfunctionality.
 Enable/Disable requestpasswordresetlinks.
 Enable/Disable accountcreationbystrangers.If youare runningan Internetsite,youwill
probablywantto leave thisonsovisitorscan create accountson your site.
 Enable/Disable accountcreationbythose usinganemail addressinthe domainof the
companyrunningthe site (whichyoujustsetonthe General page of Portal Settings).Thisis
handyif you are usingLiferayto hostbothinternal andexternal websites.Youcanmake
sure all internal IDshave to be createdby administratorsbutexternaluserscanregisterfor
IDs themselves.
 Enable / Disable email addressverification.If youenable this,Liferaywill sendusersa
verificationemail withalinkbackto the portal to verifythe email addresstheyenteredisa
validone theycan access.
By default,all settingsexceptforthe lastare enabled.Userauthenticationby
email addressisanimportantdefaultforthe followingreasons:
1. An email addressis,bydefinition,unique tothe userwhoownsit.
2. People cangenerallyremembertheiremail addresses.If youhave userswhohaven’tlogged
intothe portal for a while,itispossible theywill forgettheirscreennames,especiallyif they
weren’tallowedtouse theirscreennamesof choice (because theywere alreadytaken).
3. If a userchangeshisor her email address,itismore likelythe userwill forgettoupdate his
or her email addressinhisorher profile,if the email addressisnotusedtoauthenticate.If
the user’semail addressisnotupdated,all notificationssentbythe portal will fail toreach
the user.So it isimportanttokeepthe email addressatthe forefrontof a user’smindwhen
he or she logsinto helpthe userkeepitupto date.
Next,we’ll examine how tointegrate existingusersfromotherenvironments,
such as LDAPservers,intoLiferay.
4.2 Custom Fields
CustomfieldsappearbeneathPortal Settingsunderthe Configurationheadingof the Control Panel.
Customfieldsare away to add attributestomanytypesof assetsand resourcesinthe portal.For
example,if you’reusingLiferayPortal tocreate a site forrating books,youmightcreate a custom
fieldcalled FavoriteBooks forUserresource.If you’re usingthe Wiki forbookreviews,youmight
add fieldscalled BookTitleand BookAuthor.
It’spossible toaddcustomfieldstofollowingkindsof portal resources:
 BlogsEntry
 BookmarksEntry
 BookmarksFolder
 CalendarBooking
 Document
 DocumentsFolder
 Message Boards Category
 Message Boards Message
 Organization
 Page
 Role
 Site
 User
 User Group
 WebContentArticle
 Wiki Page
The abilitytoadd customfieldstoanyof these resourcesaffordsflexibilitytoportal developers.For
example,suppose you’dlike todefine alimitationonthe numberof usersthatcan be assignedto
certainroles.A portal administratorcancreate a customfieldcalled max-usersforthe Role resource.
Thena portal developercancreate a hookpluginthatchecksthisfielduponuserassignmenttoroles
to make sure that there aren’ttoomany usersassignedtothe role.
To add a custom field,clickonthe CustomFields linkinthe Control Panel.Thenchoose aresource,
clickon the Edit linknexttoit and select Add CustomField.
From here youneedtoadd the customfieldkey.The keyappearsasthe label
for the fieldonthe form.Forsome portal resources(like the User),customfields
are a separate sectionof the form.For others,ascan be seenabove,custom
fieldsare integratedwiththe defaultfieldsonthe form.Additionally,developers
can access customfieldsprogramaticallythroughthe <liferay-ui:custom-
attribute /> tag.
You can create fieldsof manydifferenttypes:textfields(indexedorsecret),
integers,selectionof multiple valuesandmore.Once you’ve createdafield,you
cannot change itstype.However,youcandelete custom fieldsandcreate new
ones.Next,let’slookathow toapplyserverconfigurations.
4.3 Server Administration
ServerAdministrationsettingscontrol logs,caching,searchindexing,andother
advancedfeatures.Advancedadministratorscanmonitorsystem performance,
alterdetailedserversettings,reindexsearchesandmodifycaching.
The ServerAdministrationpage of the Control Panel letsyouperformvarious
tasksrelatedtothe portal serveritself thataren’tdirectlyrelatedtothe
resourcesinthe portal.Clickingthe linkmakesthisclear:you’re immediately
presentedwithagraphshowingthe resourcesavailable inthe JVM.
Resources
The firsttab is called Resources.Thistabcontainsthe aforementionedgraphplusseveral
serverwide actions thatan administratorcanexecute.Theseinclude the following:
Run the garbage collector: Youcan sendina requesttothe JVMto beginthe garbage
collectiontask.
Clear contentcached by this VM: You can sendina requesttothe JVMto clearcontent
storedinthe local cache. Ehcache usage issplitintotwogroups:local JVMscope and
clusterscope.Thisactiononlyclearsthe contentof the local Ehcache.
Clear contentcached across the cluster: You can sendina requesttothe JVMto clear
contentcachedacross the entire cluster.Thisactionclearsthe contentof the clustered
Ehcache.
Clear the database cache: You can sendina requesttothe JVMto clear the database
cache.LiferayusesEhcache mainly,butnotonly,at the persistence layerforcaching
objectsobtainedfromthe database.Thisactiononlyclearsthe database resultcache.
Clear the direct servletcache: You can sendina requestto the JVMto clearthe direct
servletcache.The directservletcontextisafeature that optimizesJSPserving
performance bycachingand accessingthe generatedservletsdirectlyinsteadof
accessingthemoverthe applicationserver’sdispatcherchain.Thisisonlysuitablefor
caseswhere nofilterisrequiredforthe JSPs.Forproductionmode,thiscache shouldbe
enabledtoimprove performance.Incase emergencyfixesneedtobe applied,thisaction
allowsanadministratortomanuallyclearoutthe cache to force JSPsto reload.For
developmentmode,the directservletcontextshouldbe disabledtoallow JSPservletsto
be reloadedonthe fly.See the DirectServletContextsectionof the portal.propertiesfile
for details.
Reindexall search indexes: Youcan sendina requesttoregenerate all searchindexes.If
youare not usinga Solrsearch serverthiswill impactportal performance so, tryto do
thisat non-peaktimes.
Reindexall spell checks indexes:Youcan sendina requesttoregenerate all spell check
indexes.
Resetpreviewand thumbnail filesforthe Documentsand Mediaportlet: You can send
ina requesttoresetthe preview andthumbnailfilesforeachiteminyourportal’s
DocumentsandMedialibraries.
Generate ThreadDump: If you are performance testing,youcangenerate athread
dumpwhichcan be examinedlatertodetermineif there are anydeadlocksandwhere
theymightbe.
Verifydatabase tablesof all plugins: You can checkall tablesagainsttheirindexesfor
accuracy of data retrieval.
VerifyMembershipPolicies:Youcancheck that existingsite membershippolicieshave
beencorrectlyappliedandautomaticallymake updatesif necessary.Forexample,
suppose thatsomeone manuallychangedthe Liferaydatabase orthatthe Liferay
database washacked,resultinginauserbeingassignedtoa site inviolationof asite
membershippolicy.Whenthe Verify Membership Policies buttonisclicked,the verify
methodsof all the site membershippoliciesthathave beenimplementedare triggered.
These methodscheckthatall site membershipsare inaccord withthe site membership
policies;if theyare not, the necessarychanges(suchasremovingusersfromforbidden
sites) are made.
Cleanup Permissions:Thisprocessremovesthe assignmentof some permissionsonthe
Guest,User,and PowerUser rolestosimplifythe managementof “UserCustomizable
Pages”.Notably,the “AddToPage” permissionsisremovedfromthe GuestandUser
rolesforall portlets.Likewise,the same permissionisreducedinscope forPowerUsers
fromportal wide toscopedto“User Personal Site.”
Log Levels
The Log Levelstabof the ServerAdministrationpage allowsyoutodynamicallymodify
the log levelsforanyclasshierarchyinthe portal.If youhave custom code youhave
deployedwhichisn’tinthe list,youcanuse the Add Category tabto add it.If youchange
the log level nearthe topof the classhierarchy(suchas at com.liferay),all the classes
underthat hierarchywill have theirloglevelschanged.If youare testingsomething
specific,itismuchbetterto be as specificasyoucan whenyouchange loglevels.
Modifyingthemtoohighinthe hierarchygeneratesalotmore logmessagesthanyou
need.
Properties
Liferayandthe JVMcontainmany settingswhichare definedasproperties.There are
twosubtabsof the propertiestabof the ServerAdministrationpage:one showing
systempropertiesandone showingportal properties.
The systempropertiestabshowsanexhaustivelistof systempropertiesforthe JVM,as
well asmanyLiferaysystemproperties.Thisinformationcanbe usedfordebugging
purposesorto check the configurationof the currentlyrunningportal.
The portal propertiestabshowsanexhaustivelistof the portal properties.These
propertiescanbe customized;youcanperuse the full listof customizable properties
online athttp://docs.liferay.com/portal/6.2/propertiesdoc/portal.properties.html.If you
needtocheck the currentvalue of a particularproperty,itcan be viewedfromthis
screenwithouthavingtoshutdownthe portal or openany propertiesfiles.
CAPTCHA
By default,LiferayshipswithitsownsimpleCAPTCHA service whichisdesignedto
thwartbots fromregisteringforaccountsonsitespoweredbyLiferay.If youwantto
insteaduse Google’sreCAPTCHA service,youcanenable thissettingfromthe CAPTCHA
tab of the ServerAdministrationpage.
Simplycheckthe EnableReCAPTCHA box andenteryour publicandprivate keysintothe
providedfields,thenclick Save.LiferayPortal will thenuse reCAPTCHA insteadof simple
CAPTCHA.
Data Migration
If you are upgradingfroma previousrelease of LiferayPortal orif youneedtomigrate
your data fromone systemtoanother,the Data Migrationtab helpsyouto do that
withoutyourdevelopers havingtowrite customscripts.
The firstsectionletsyoucopyyour entire Liferaydatabase fromthe currentdatabase
underwhichitis runningtothe database you specifyinthissetof fields.You’ll needto
enterthe driverclassname (andthe driver will needtobe onLiferay’sclasspath),the
JDBC URL of the database to whichyou’ll be copyingyourdataand the credentialsof a
userwithaccess tothat database.Once you have all of thisinformationentered,click
Executeto copy the data.
The nextsectionhelpsyoumigrate yourdocuments.If youwanttomove off of the
JackrabbitJSR-170 repositorytothe file system, ortothe Jackrabbitrepositoryfromthe
file system,ortoany of the other repositoriessupportedbythe DocumentsandMedia
library,youcan do so veryeasily.Make sure youhave alreadysetupyour portal-
ext.propertiesfilesothe hookisproperlyconfiguredbefore runningthismigration.
Selectthe DocumentLibraryhookthat representsthe locationtowhichyouwantyour
documents tobe migrated,thenclick Execute.Your documentswill be migratedtothe
newrepository.Youcanthenshut downLiferay,make the new repositorythe defaultin
the portal-ext.propertiesfile,andthenrestart.
You can migrate imagesfromthe Image Galleryinthe same manner.(InLiferay6.0 and
previousversions,the DocumentLibraryandImage Gallerywere distinctrepositories.In
Liferay6.1 and laterversions,these have beencombinedintoasingle Documentsand
Mediarepository.)
File Uploads
Since Liferayallowsuserstouploadfilesinvariousplaces,youmaywanttolockdown
the type of filesandthe size of filesusersare allowedtoupload.The File Uploadstabof
the ServerConfigurationtabletsyousetthe overall maximumfile sizeandthenoverride
that size forspecificapplicationswithinLiferay.Youcanlimitthe allowedfile extensions
generallyorbyapplication.Youhave alot of flexibilityastohow youwant filestobe
managedwithinyourportal.
Mail
Insteadof usingyourLiferay server’sportal-ext.propertiesfiletoconfigure amail server,
youcan configure amail serverfromthe Mail tab of the ServerConfigurationsectionof
the Control Panel.If yourportal is to receive mail (see,forexample,ourcoverage of the
Message Boards portlet ),youcan connecta POP mail server.If yourportal isto send
mail,whichisuseful forsendingnotificationstousers,youcan connectto an SMTP
server.We highlyrecommendsettingupmail serversforyourportal.
Note that if youconfigure mail serversettingshere inthe Control Panel,these settings
will override anymail serversettingsinyourportal-ext.propertiesfile.
External Services
LiferayPortal enablesuserstouploadandshare contentviathe DocumentsandMedia
library,a customizable andpermissionable online repository.Userscanuploadfilesof
any type to the DocumentsandMedialibrary.LiferayshipswithPDFBox andusesitto
generate automaticpreviewsforcertaintypesof documents,bydefault.Youcan also
install three additional toolsthatofferhigherqualitypreviewsanddocumentconversion
functionality:OpenOffice orLibreOffice,ImageMagickandXuggler.WithLiferay
configuredtouse these tools,youcangenerate automaticpreviewsformanytypesof
filesincludingtextfiles,office suitefiles,PDFs,images,audiofilesandvideos.Userswill
alsobe able touse the conversionfunctionalitytodownloaddocumentsinavarietyof
formats.Please see the AutomaticPreviewsandMetadata sectionformore information.
LibreOffice isavailable here: LibreOffice,ImageMagickisavailablehere: ImageMagick,
and Xugglerisavailable here:Xuggler.Make sure tochoose the correct versionsof these
applicationsforyouroperatingsystem.We recommendthatyouinstall the lateststable
versions.LibreOffice 3.6,ImageMagick6.7.7, and Xuggler5.4 workwithLiferay6.2. You
needtoinstall LibreOffice andImageMagickmanuallybutyoucaninstall Xugglerfrom
Liferay’sServerAdministrationControlPanel interface.
Once you’ve installedthesetools,youcanuse the External Servicestab of the Control
Panel toconfigure Liferaytouse them.
Script
Liferayincludesascriptingconsole whichletsadministratorsexecute migrationor
managementcode instantly.Several scriptinglanguagesare supported,including
JavaScript,Groovy,Python,RubyandBeanshell.Thisguide containsa topicsthat
explainshowtouse Liferay’sscriptingconsoleandprovidessome examples.
Shutdown
If you everneedtoshutdownyour LiferayPortal serverwhileusersare loggedin,you
can use the Shutdowntabto informyourlogged-inusersof the impendingshutdown.
You can define the numberof minutesuntil the shutdownandacustom message that
will be displayed.
Users will see yourmessage atthe topof theirportal pagesfor the durationof time you
specified.Whenthe time expires,all portal pageswilldisplayamessage sayingthe
portal has beenshutdown.Atthispoint,the serverwill needtobe restartedtorestore
access.Next,let’sexamine how tomanage multiple portal instances.
4.4 Portal Instances
Portal Instancesallow administratorstorunmore than one portal instance ona
single server.Dataforeachportal instance are keptseparate fromeveryother
portal instance.
Portal Instances
LiferayPortal allowsyoutorun more than one portal instance ona single server.
The Portal Instancessectionof the Control Panel appearsunderthe
Configurationheading.Thissectionletsyoumanage multiple portal instances
froma single Liferayinstallation.Eachportal instance’sdataiskeptseparate
fromeveryotherportal instance’sdata.All portal data,however,iskeptinthe
same database.
Each portal instance requiresitsowndomainname.Liferaydirectsuserstothe
properportal instance basedonthisdomainname.Sobefore youconfigure an
instance,configure itsdomainname inyournetworkfirst.Whenyou’re readyto
add an instance,clickthe Add buttonhere.
You’ll be promptedforfourfieldsandacheck box:
WebID: A general conventionistouse the domainname forthis.It’sa user-
generatedIDforthe instance.
Virtual Host: Put the domainname youconfiguredinyournetworkhere.When
users are directedtoyour Liferayserverviathisdomainname, Liferaywill then
be able to sendthemto the properportal instance.
Mail Domain: Enterthe domainname forthe mail hostfor thisinstance.Liferay
will use thistosendemail notificationsfromthe portal.
Max Users:Enter the maximumnumbersof useraccountsyouwouldlike your
portal instance tosupport.
Active:Use thischeck box to choose whethertocreate an active oran inactive
portal instance.
Whenyouare finishedfillingoutthe form, click Save.Now navigate tothe portal
usingyournewdomain name.Youwill see youare broughtto what lookslike a
cleaninstall of Liferay.Thisisyournew portal instance whichcannow be
configuredanywayyoulike.
4.5 Social Office Configurations
Already told in above topics. (When we
were installing Social Office.)
SOCIAL OFFICE CE
LiferaySocial Office isasocial collaborationsolutionforthe enterprisethatstreamlines
communication,savestime,buildsgroupcohesionandraisesproductivity.
What is Social Office?
LiferaySocial Office isasocial collaborationsolutionforthe enterprisethatstreamlines
communication,savestime,buildsgroupcohesionandraisesproductivity.
It was createdinresponse towide demandforimplementingthe LiferayPortal platform
as a team collaborationsolution.To be clear,LiferaySocial Office isbuiltonLiferay
Portal,createdbypicking,integrating,andpackagingLiferayPortal'smostasked-for
featuresandcapabilitiesforsocial collaborationuse cases.
What's the difference between Liferay Portal
and Liferay Social Office?
If you wanta heavily customizable solution,take alookat LiferayPortal--ithasall the
featuresof Social Office andmore.If you're lookingforasolid,simple touse
collaborationsolutionanddon'twantto botherwithheavycustomization,LiferaySocial
Office will be abetterfitforyou.
Social Office Plugins Available for use:
CE Plugins:
 calendar-portlet
 chat-portlet
 contacts-portlet
 deploy-listener-hook
 events-display-portlet
 microblogs-portlet
 notifications-portlet
 portal-compact-hook
 private-messaging-portlet
 so-activities-hook
 so-announcements-portlet
 so-configurations-portlet
 so-hook
 so-portlet
 so-theme
 tasks-portlet
 WYSIWYG-portlet
If all the Social Office pluginshave beensuccessfullydeployed,checkthatyoucan accessthe
followingitemsinyourportal,eitherinthe Control Panel orona defaultSocial Office site:
Role:
 Social Office User
Site Templates:
 DefaultSocial Office Site
 Social Office UserHome (Dashboard)
 Social Office UserProfile
Portlets:
 Chat
 Contacts
 EventsDisplay
 Microblogs
 Private Messaging
 Social Office Configurations
 Social Office Portlet
 Tasks
 WYSIWYG
Hooks:
 DeployListener
 Portal Compact Hook
 Social Office Hook
Themes:
 Social Office theme
To actuallystart usingSocial Office afterit’sbeeninstalled,youneedtograntthe Social Office User
role to one or more users.Please refertothe Using SocialOfficesectionformore detailsaboutthe
Social Office Userrole andthe featuresprovidedbySocial Office.
Using Liferay as A Social Platform
Whetheryouplanto buildasocial networkor enable social applicationsaspart of your overall user
experience, LiferayPortal hasthe toolstomake those featuresworkforyou. Startingwitha suite of
applications–includingaprofile summary,activitiesfeeds,socialrequests,awall,andmore–and
roundingthingsoutwithanAPI to handle relationshipsbetweenusersaswell aspublishtheir
activitiestoeachother,LiferayPortal helpsyouimplementcommonfeaturesof social networks.
LiferayPortal providesfeedsof social activities.These feedscancontainentriesfromanyof Liferay’s
built-inapplicationsorapplicationsthatyouwrite.
Social relationshipsinLiferayPortal are ideallysuitedforeverythingfrompublicsocial networksto
enablingsocial featuresinyourcorporate Intranet.Userscanform relationshipswithone another,
allowingthemtosee updatesfromthose whose activitytheyneedtotrack.That’s far more powerful
than havingthemsubscribe tomultiple individualRSSfeedsorvisitmultipleprofiles,becausethe
systemkeepstrackof the updatesfromthose withwhomyouhave a relationship,automatically.
More than this,however,Liferayisagreatintegrationplatformforsocial applications.Itfully
supportsthe OpenSocial framework.Youcanpublishgadgetsyoufindonline,oryoucanuse Liferay
Portal’sbuilt-inOpenSocial gadgeteditortocreate andserve yourownOpenSocial gadgets.
LiferayPortal’sOpenSocial gadgeteditorletsyourapidlycreate social applicationsthatcanbe
servedacrossthe webto any otherOpenSocial container.
LiferayPortal alsosupportsthe creationof Facebookapplications;infact,noadditional codingis
necessarytopublishyourLiferayapplicationsonFacebook(youwould,of course,needtouse
Facebook’sAPItouse Facebook-specificfeatureslikepostingonusers’timelines).All youneedtodo
isget an APIkeyand canvaspage URL from Facebook.
AnyLiferayapplicationcanbe publishedtomultiple social networkswithafew clicks.
As youcan see,LiferayPortal isbuiltwithsocial applicationsinmind.It’shighlylikely,howeverthat
youalso have yourownapplicationyouneedtorunon your website.The LiferayPortal platformis
ideal forthe webapplicationyou’re consideringwriting.Inadditiontothis,LiferayPortal iseasily
configuredtobe usedas a sharedhostingplatformformultiplewebsites.Let’slookatthe benefits
youcan reapby usingLiferayPortal inthese ways.
How to use Social Office?
My Dashboard
Thisis the user'shomepage.The leftside of the page liststhe communitiesorsitesthe userbelongs
to as well asa buttonto add sitesif youare the admin.The rightside of the page has three view
activityoptions,Mysites,MyFriendsandMe. My siteslistsall the recentactivitiesforthe sitesthat
youbelongto.My friendsliststhe recentactivitiesforyourfriendsandMe listsall of your (the
loggedinuser's) activities.
Creating Communities
Once loggedinyouwant to start bycreatingcommunities.Theseare essentiallymini-sitesthatare
usedto collaborate on.Youcan create sitesforany groupingof people whowanttocollaborate
togetherincludingbutnotlimitedto,specificdepartmentswithinabusiness(e.g.,marketing,sales,
or pr),groups of co-workersacrossdepartments(e.g.,thosewhoare organizingthe company-wide
summerbbq),andspecificprojects(e.g.,ProductAlpha,Beta,orDelta) thatwill alsohave members
frommany departmentswithinacompanycollaboratingonit.Once a communityiscreatedyoucan
start addingcontentto thatsite.Clickonthe My Sitesbuttononthe top rightto navigate to the sites
youbelongto.Once you've navigatedtoa site you are presentedwithasetof pre-definedpagesfor
that site.The advantage tothisis nothavingto spendtime populatingyoursite withpagesand
collaborationportletsorworryingaboutlayout.Youcan justset itup and go,literallythe abilityto
start workingassoon as yousignon. Once there isno more needfora particularsite,(e.g.,The
summerbbqisover) the admincan just delete the site andcreate anew one for the next
collaborative need.Youcansee fromthisscreenshotthat three communitiesorsiteswere created,
one for marketing,one foreventsandone fora projectnamedAlpha.
Descriptions of the pre-defined pages
Dashboard
Thisis the home page of the marketingcommunitywe created.Itishere thatyoucan see all of the
latestactivitiesof userswithinthiscommunity.If youneedtoknow whatpeople are doingthisis
where youwouldgoto see an aggregatedlistof all theiractivities.
Calendar
The Calendarpage allowsyouto see all of the events,appointments,meetings,andsuchthatare
associatedwiththatparticularcommunity.Asadminyoucanautomaticallyaddandediteventsin
the calendar.
My Documents
The Documentspage is where the documentlibraryislocated.
Forums
The Forums page iswhere youcan findthat site'smessage board.A listof quicklinksisdisplayedon
the leftside of the page.Thisallowsyouto quicklynavigate righttothe contentyouwantto see.As
withthe documents,blog,andwiki pages,asectionwithrelatedcontentisonthe rightside of the
page.Thisautomaticallybringsupall contentthatistaggedwiththe same tag as the contentyouare
currentlyviewing.
Blog
Once on the Blog page,youcan navigate throughall the blogscreatedbyuserswithinthissite.For
easyaccess,a listof recententriesisonthe left-handsideof the page.
Wiki
The Wiki page isthe perfectplace tocreate documentationorpostinformationforyourcommunity.
It too hasa listof quicklinksonthe lefthandside andrelatedcontentonthe right.
Contacts Center
The Contacts Centerpage listsall the membersof thatparticularcommunityonthe left.Youcan
clicka specificpersontosee more informationonhimorher.
Chat
The numberof online friendsshowsupinthe bottomrightcornerof the screen.Clickittopull up a
listof those friendsandclickona specificpersontoopenachat box withthat friend.
Messages
You can sendmessagestopersonswhichare incontact withu.
Working Smart with Liferay Social Office
LiferaySocial Office isLiferay’ssocial collaborationproductforthe enterprise.Previouslyreleasedas
a separate productthat was basedonLiferayPortal,it’snow available asanapplicationthatcan be
installedonLiferay.We are excitedtobringbothSocial Office andthisguide toyou,inthe hope that
you’ll be able touse eachto enable yourteamsto worktogethermore efficiently.Thisguideisfor
those whoare settingupandadministeringaninstance of LiferayPortal usingSocial Office.From
installingSocial Officetointroducingyoutoitsentire feature set,we’ll discussall of the thingsyou
can do withSocial Office tohelpyourteam.We hope you’ll use itasa tool to getSocial Office up,
running,andintegratedintoyourenterprise. Youcanfindmuchmore informationaboutinstallation
and administrationinthe LiferayUserGuide.
“Help!”
Thishas beenthe cry of informationworkers everywherewhohave triedtomanage complex
projectsthroughemail andsharedfolders.You’veprobablyhadasimilarexperience:you’re
collaboratingona documentwithateamof people andare emailingitbackandforth.PersonA
createsthe initial documentandPersonBreplieswithsome edits.PersonCreplieswithadditional
editsat the same time PersonA replieswiththe correctionsfromPersonB.PersonDtakesthisand
rewritesawhole sectionof the documentwhile PersonBandC respondtoPersonA’supdate.Pretty
soon,it becomesverydifficulttodeterminewhichdocumentisthe latestdocument.The same
scenarioplaysitself outwhenworkinginsharedfolders,exceptthere’snotrail of email messagesto
figure outwhodidwhat andwhen.
The Social Office pluginforLiferayPortal isdesignedtoanswerthiscall forhelp.Social Office isa
dynamicteamcollaborationsolutionforthe enterprise that’sdesignedtostreamline
communication,save time,andraise productivity.Organizationsandgroups can use Social Office to
share resources,collaborate onprojects,andraise the visibilityof importantactivity.We createdthe
productto provide a simple,outof the box solutionforteamcollaboration.Social Office provides
youwitha fantasticarray of featuresthatyoudon’tneedto spendalot of time configuring.It’s
readyto use rightout of the box.Once installed,aquicksetupwizardwill helpyousetupateam
collaborationsite soyoucanbeginworkingimmediately.Infact,youcan have a full production
environmentsetupinlesstime thanittakesto brew a potof coffee.
If you needanyassistance beyondwhat’scoveredinthisbook,Liferay,Inc.offerstraining,
consulting,andsupportservicestofill anyneedthatyoumighthave.Pleasesee
http://www.liferay.com/services forfurtherinformationaboutthe serviceswe canprovide.As
always,we welcome anyfeedback.If there isanywayyouthinkwe couldmake thisbookbetter,
please feel free tomentionitonourforums.Youcan alsouse any of the email addressesonour
Contact Us page http://www.liferay.com/contact_us.We are here toserve you,ourusersand
customers,andto helpmake yourexperience usingSocial Office the bestitcanbe.
Upgrading Your Liferay Social Office
version
There are a fewstepsandproceduresthatyouneedto follow if you’re upgradingtoa newerversion
of Social Office.The sectionsbelowdescribe how toupgrade fromSocial Office 2.x to3.x,and from
Social Office 3.0.0 to 3.0.1.
Upgrading from Social Office 2.X to 3.X
Social Office 3.x onlyrunson LiferayPortal 6.2.x.If you’dlike toupgrade fromSocial Office 2.x to 3.x,
youfirstneedto upgrade your portal from Liferay6.1 to Liferay6.2. For informationonupgrading
Liferay,please referto UpgradingLiferay.RemembertoundeployyourSocial Office 2.x plugins
before upgradingyourportal to6.2. If you have a LiferayPortal EE subscription,make sure toapply
any available fixpacksbefore deployingyourSocial Office 3.x plugins.
Once your 6.2 portal isready,deployyourSocial Office 3.x plugins. Whenyoufirstlogintoyour
portal as an administratorafterinstallingSocial Office 3,you’ll see the Social Officeconfigurations
portlet.Youcan use thisportletto grant the Social Office Userrole tousers.The Social Office User
providesaccesstothe Dashboardhome page,the publicProfile page,andall of theirapplications.
You’re nowreadyto use Social Office!
Upgrading from Social Office 3.0.0 to 3.0.1
Before upgradingfromSocial Office 3.0.0to 3.0.1, make sure to sethot.undeploy.on.redeploy=true
inyour portal-ext.propertiesfile.ThispropertymakesLiferaycompletelyundeployapluginbefore
deployinganewversionof the plugin.If youdon’tsethot.undeploy.on.redeploy=true before
upgrading,the upgrade mightnotcorrectlyhandle activities.Settinghot.undeploy.on.redeploy=true
ensuresthatactivitiesare handledcorrectly.
Afterinstallingthe newversionof Social Office,you’re all set!
SOME OUT OF THE BOX FEATURES
Accessing Liferay Services
In manycases,you’ll wanttointeractwithone of Liferay’smanyservices.Thisispossible fromall of
the scriptinglanguagessupported,butthe syntax isa little differentforeachlanguage.
To illustrate the correctsyntax forinteractingwithLiferayservices,let’slookata simple example
that usesthe UserLocalService toretrievealistof usersand thenprintstheirnamestothe log file.
We’ll initiallyimplementthe exampleinJavapseudo-code.
Let’ssee firsthowthiswouldworkinBeanshell,whichisverysimilartoJava.
Beanshell
Beanshell isaJavascriptinglanguage that’sdesignedtorunJava code withlittle ornochanges.In
thisexample,we onlyhave one smallchange tomake because Beanshell doesn’tsupportthe use of
Java Generics.
Groovy
Groovyis alsobasedon Javaand isperhapsa little easierthanBeanshell because literallyanycode
writteninJavaalsoruns inGroovy. Thismeanswe can execute the exactsame code fromourJava
example withoutanychanges.
Of course,we couldmake thissomewhatGroovierbysimplifyingthe programasfollows:
The script engine supportsmore thanjustJava-like languages.Despitethe name,youshouldbe
aware that JavaScriptbearslittle resemblancetoJava,butyou can still use itinLiferay’sscript
engine.
JavaScript
Liferayusesthe Rhino JavaScriptEngine toprovide JavaScriptsupportinthe scriptengine.The
followingcode providesa JavaScriptversionof ouroriginal Javaprogram.
You can see the Javascriptexample iscompact.Rubyisevenmore compact.
Ruby
Rubyis supported throughthe use of JRubyandour previousexample couldbe implementedin
Rubyas follows:
Python
Lastly,LiferayprovidesPythonsupportbasedonJythonandthe previousexamplecouldbe
implementedwiththe followingcode.
As youcan see,Liferay’sservicescanbe accessedfromanyof these languages.
Authoring The Basic Content
Let’stake an example:
You’ve beenassignedthe tasktobuildawebsite foran innovative new social networkingsitecalled
Nose-ster.You’vedecidedtotake advantage of LiferayPortal anditsrapiddeploymentfeaturesas
well asitsabilitytogeta fullyfunctional,content-richwebsite withintegratedsocial featuresup
and runninginlittle time.Together,we cangetyoustarted.
We’ll walkthroughthe creationof Nose-ster’swebsite,startingbycreatingandpublishingsome
simple contentusingLiferay’sbuilt-inWYSIWYGeditor.We’ll thentake advantage of Liferay’srobust
structure editor.We’ll use templatestodisplaythe contentandthenexploresome of the advanced
publishingfeaturessuchasthe built-inworkflow andAssetPublisher.
Creating Content The Simple Way
As we’ve statedabove,contentisthe reasonwebsitesexist.LiferayPortal has made iteasierthan
everto getcontentpublishedtoyoursite.Because LiferayPortal issoflexible,youcanuse basic
authoringtoolsrightawayor take advantage of the more advancedfeatures.It’sadaptable toyour
needs.
We’ll beginbycreatingsimplecontentusingLiferay’sWYSIWYGEditorandthenwe’ll publishitto
the home page of Nose-ster’swebsite.Thisisafastand straightforwardprocessthatdemonstrates
howeasyit isto create and publishcontentonyourLiferayPortal instance.Let’slearnaboutthe
WebContentsectionof the control panel sowe can create and publishourfirstpiecesof content.
Choosing a Site in the Content Section
Whenyoumanage webcontentfromthe Control Panel youcanselectthe locationwhere the
contentresides.Forinstance,youcanaddcontentthat’s available toaspecificsite orgloballyacross
the portal.The Contentsectionof the Control Panel displaysasitsheadingthe name of the site
you’re currentlyworkingon.Thisheadingiscalledthe contextmenu selector:youcan change the
scope of where you’dlike toview,editorcreate contentbyusingthe drop-downselectorattached
to the heading.
Rich, WYSIWYG Editing
Once you have the Nose-stersite selected,clickonthe Web Contentlinkinthe Control Panel.Next,
clickthe Add buttonunderthe Web Contenttab.This isa highlycustomizableformthatbydefault
has twofields:atitle anda powerful WYSIWYGeditor.We couldcustomize thisformtocontain
whateverfieldsourcontent needsbutlet’skeepthingssimplefornow.
For now,type the words Welcome to Nose-sterinthe Namefield.Notice thatcontentcanbe
localizedinwhateverlanguage youwant.If youclickonthe localize checkbox,twoselectboxes
appearwhichallowyou to pickthe language you’re workinginandthe defaultlanguage.Youcan
entertranslationsof yourcontentforany language inthe list.The screenshotbelow showsthis
interface butfornow,we won’tbe usingit,so youcan leave itunchecked.Inthe contentfield,adda
short sentence announcingthe website isupandrunning.
The Web ContentEditorprovidesmanyoptionsforcustomization.
Gettinga newwebsite upand runningisan excitingstepforanyone,whetheritisa large
corporationor a small non-profitcharity.Tocelebrate thismomentousachievementatNose-ster,
let’sgive ourannouncementsome of the pompandcircumstance we thinkitdeserves!
Usingthe editor,selectall the textandthenchange the style to Heading 1 and the color to Dark
Green.
You couldinsertanimage here or evenmore textwithadifferentstyle,asdemonstratedinthe
screenshotbelow.Youcan alsoadd bullets,numbering,linkstoanothersite orcustomimages.You
can evenaddan emoticon.Let’sadda smileyface at the endof our announcement.
: Viewyourcontentchangesdirectlyinthe editor.
The WYSIWYG editorisa flexible tool thatgivesyouthe abilitytoaddtext,images,tables,linksand
more.Additionally,youcanmodifythe displaytomatchthe purpose of the content. Plus, it’s
integratedwiththe restof LiferayPortal:forexample,whenyouuploadanimage tobe addedto a
page,that image can be viewedandmanipulatedinthe DocumentsandMediaportlet.
If you’re HTML savvy,LiferayWCMdoesn’tleave yououtinthe cold.You can clickthe Source button
and write yourownHTML if youwish.
On the rightof the NewWebContentformare optionsthatallow youtocustomize yourweb
content.
Newwebcontentcanbe customizedinvariouswaysusingthe menuonthe right.
Abstract: letsyouto create a brief summaryof the webcontent.You can alsopair the textwitha
small image.
Categorization:specifiesthe contenttype fromalistof options.Theyare Announcements,Blogs,
General, News,PressRelease,and Test. You can alsocreate tags to make the contenteasiertofind
ina search.Note thatthese categoriesare definedbyapropertyinthe propertiesfile.
Schedule:customizesthe date andtime yourcontentpublishesand/orexpires.
Display Page:letsyou determinewhere the webcontentsare displayedwhenlinkedfromother
pages.The conceptof the Canonical URL is new toLiferay6.1. The Canonical URL is unique for
articlesthatredirectthe visitortothe article’sdefaultdisplaypage.
Imagine youhave a newspaperwithasportssectionanda technologysection.Youadda Sports
page and a Tech page to your site,eachone witha specificbannerandlookandfeel.Youwantthe
articlestoappear inthe appropriate pages,butyouknow inLiferayarticlesare notrelatedto pages.
You can add an article as oftenasyou like indifferentwebcontentdisplayportletsorinconfigured
AssetPublishers.Butif youhave a Viewin contextlink,where willyoushow yourarticle?Thisis
where you’duse adefaultdisplaypage.Articlesthathave adefaultdisplaypage definedare shown
withotherrelatedarticlesinthe same displaypage.
Imagine youhave 100 sportsarticlesand100 tech articles.Inpreviousversionsof Liferayyou’dneed
to create a page foreach article to show it.Now withonlyone sportspage and one techpage,you
can showall articlesinone place ina consistentfashion.
Creating A Display Page
There are twowaysof creatinga displaypage.Youcan use a ContentDisplay Pagetemplate,which
automaticallycreateseverythingyouneed,oryoucancreate one manually.The ContentDisplay
Page template isfoundunder PageTemplates inthe Portal sectionof the Control Panel.
To create a displaypage manually,addanAssetPublishertoa page.Thenmake it the DefaultAsset
Publisherforthe page.ThisdefinesthisAssetPublisherasthe one that displaysthe contentif
several AssetPublishersare onthe same page.Setthisup by clicking Configuration onyourAsset
Publisher.Underthe Setup tab,navigate to Display Settings andcheck the checkbox labeled Setas
the DefaultAssetPublisherfor This Page.
Once you’ve givenanarticle itsdefaultdisplaypage,linkstothe article redirectthe usertoits
defaultdisplaypage.Tosee howthisworks,addanAssetPublishertoanotherpage,like the Home
page of the newspaper,andconfigure itto View in a Specific Portlet.Thissettingisfoundinthe
AssetLink BehaviormenuunderDisplaySettings.If youclickonthe link,you’llbe redirectedtothe
DefaultDisplayPage of the article.
You nowsee that the linklookssomethinglikethis:
www.nosester.com/nose-article
Thisis an example of acanonical URL, and it’sa nice enhancementforSearchEngine Optimization
(SEO) because the article’sURLbecomesthe page URL. To a searchengine that’scrawlingyoursite,
thismeansthat the locationof yourarticle neverchanges.Andif youdecide touse the contenton
anotherpage inthe future,the article isstill availableatthisURL. This feature isusedinsearch
results,inrelatedassetsandinAssetPublishers.
RelatedAssets:enablesyoutoconnectany numberof assetswithinasite or across the portal,even
if theydon’tshare any tags and aren’tinthe same category.You can connectyourcontentto a Blogs
Entry, Message BoardsMessage,WebContent,CalendarEvent,BookmarksEntry,Documentsand
MediaDocument,anda Wiki Page.
Thisblogentryhas linkstothree RelatedAssets:one webcontentdisplayandtwoblogentries.
Permissions:customize whohasaccessto the content.Bydefault,contentisviewable byAnyone
(GuestRole).Youcan limitviewablepermissionsbyselectinganyRole fromthe drop-downorinthe
list.Additionally,LiferayPortal providesthe abilitytocustomize permissionsinmore detail.Select
the More Options linknexttothe dropdownbuttonand you’ll findthe differentactivitiesyoucan
grant or denyto yourwebcontent.
PermissionsforWebContentallowyoutofine-tune how yourcontentisaccessed.
Custom fields:customize metadataaboutthe webcontent.The fieldscanrepresentanythingyou
like,suchasthe webcontent’sauthororcreationdate.If customfieldshave beendefinedforweb
content(whichcanbe done fromthe CustomFields page of the Control Panel),theyappearhere.
For thispiece of webcontent,we don’tneedtochange anything.Afteryou’re finishedwith
permissions,click SaveasDraft.Thissavesthe contentindraftform.Once you’re satisfiedwithyour
changes,selectPublish.Thismakesthe contentavailable fordisplay,butwe still have someworkto
do to enable userstosee it.InLiferayWCM, all contentresidesinacontainer,whichisone of two
portlets:WebContentDisplayorWebContentList.Byfar the most frequentlyusedisthe Web
ContentDisplay portlet.
Configuring Additional Portlet Settings
Go back to the Control Panel,andclickon PortalSettings underthe Configuration heading.We’ve
alreadylookedatthe optionsavailablefromthe Generaland Authentication links.Now let’sexamine
the otherportal settingsoptions.
USERS
If you clickon Usersfromthe Portal Settingsscreen,you’ll findthree tabs:Fields,Reserved
CredentialsandDefaultUserAssociations.
The Fieldstaballowsyouto enable/disable the followingfields:
 Enable/disablerequiringthe Termsof Use
 Enable/disableuserscreennames autogeneration
 Enable/disablerequiringthe lastnames
 Enable/disablethe birthdayfield
 Enable/disablethe genderfield
LiferayDocumentation-Shikhar
LiferayDocumentation-Shikhar
LiferayDocumentation-Shikhar
LiferayDocumentation-Shikhar
LiferayDocumentation-Shikhar
LiferayDocumentation-Shikhar
LiferayDocumentation-Shikhar
LiferayDocumentation-Shikhar
LiferayDocumentation-Shikhar
LiferayDocumentation-Shikhar
LiferayDocumentation-Shikhar
LiferayDocumentation-Shikhar
LiferayDocumentation-Shikhar
LiferayDocumentation-Shikhar
LiferayDocumentation-Shikhar
LiferayDocumentation-Shikhar
LiferayDocumentation-Shikhar
LiferayDocumentation-Shikhar
LiferayDocumentation-Shikhar
LiferayDocumentation-Shikhar
LiferayDocumentation-Shikhar

More Related Content

What's hot

Sony Xperia XZ2 Premium Manual/User Guide
Sony Xperia XZ2 Premium Manual/User GuideSony Xperia XZ2 Premium Manual/User Guide
Sony Xperia XZ2 Premium Manual/User Guide
manualsheet
 
Mongo db security guide
Mongo db security guideMongo db security guide
Mongo db security guide
Deysi Gmarra
 
Sugar Crm Manuale25
Sugar Crm Manuale25Sugar Crm Manuale25
Sugar Crm Manuale25
guest90625bf
 
Lay out2help
Lay out2helpLay out2help
Lay out2help
vujinz
 
Creating andrCreating-Android-Applicationsoid-applications
Creating andrCreating-Android-Applicationsoid-applicationsCreating andrCreating-Android-Applicationsoid-applications
Creating andrCreating-Android-Applicationsoid-applications
Marwoutta Dh
 
TEST UPLOAD
TEST UPLOADTEST UPLOAD
TEST UPLOAD
James Meldrum
 
Java web programming
Java web programmingJava web programming
Java web programming
Mumbai Academisc
 
SafeDNS Content Filtering Service Guide
SafeDNS Content Filtering Service GuideSafeDNS Content Filtering Service Guide
SafeDNS Content Filtering Service Guide
SafeDNS
 
Enterprise portal development cookbook
Enterprise portal development cookbookEnterprise portal development cookbook
Enterprise portal development cookbook
Ahmed Farag
 
Drools expert-docs
Drools expert-docsDrools expert-docs
Drools expert-docs
Erick Ulisses Monfil Contreras
 
CallQ scope and user specification summary
CallQ scope and user specification summaryCallQ scope and user specification summary
CallQ scope and user specification summary
MakeNET
 
Sg246399
Sg246399Sg246399
Sg246399
kumarmbaarun
 
Plesk 8.1 for Windows
Plesk 8.1 for WindowsPlesk 8.1 for Windows
Plesk 8.1 for Windows
webhostingguy
 
Silverlight
SilverlightSilverlight
Specification of the Linked Media Layer
Specification of the Linked Media LayerSpecification of the Linked Media Layer
Specification of the Linked Media Layer
LinkedTV
 
Hacking.pdf
Hacking.pdfHacking.pdf
Hacking.pdf
Ambuj Sharma
 
Castor Reference Guide 1 3 1
Castor Reference Guide 1 3 1Castor Reference Guide 1 3 1
Castor Reference Guide 1 3 1
paripelly
 

What's hot (17)

Sony Xperia XZ2 Premium Manual/User Guide
Sony Xperia XZ2 Premium Manual/User GuideSony Xperia XZ2 Premium Manual/User Guide
Sony Xperia XZ2 Premium Manual/User Guide
 
Mongo db security guide
Mongo db security guideMongo db security guide
Mongo db security guide
 
Sugar Crm Manuale25
Sugar Crm Manuale25Sugar Crm Manuale25
Sugar Crm Manuale25
 
Lay out2help
Lay out2helpLay out2help
Lay out2help
 
Creating andrCreating-Android-Applicationsoid-applications
Creating andrCreating-Android-Applicationsoid-applicationsCreating andrCreating-Android-Applicationsoid-applications
Creating andrCreating-Android-Applicationsoid-applications
 
TEST UPLOAD
TEST UPLOADTEST UPLOAD
TEST UPLOAD
 
Java web programming
Java web programmingJava web programming
Java web programming
 
SafeDNS Content Filtering Service Guide
SafeDNS Content Filtering Service GuideSafeDNS Content Filtering Service Guide
SafeDNS Content Filtering Service Guide
 
Enterprise portal development cookbook
Enterprise portal development cookbookEnterprise portal development cookbook
Enterprise portal development cookbook
 
Drools expert-docs
Drools expert-docsDrools expert-docs
Drools expert-docs
 
CallQ scope and user specification summary
CallQ scope and user specification summaryCallQ scope and user specification summary
CallQ scope and user specification summary
 
Sg246399
Sg246399Sg246399
Sg246399
 
Plesk 8.1 for Windows
Plesk 8.1 for WindowsPlesk 8.1 for Windows
Plesk 8.1 for Windows
 
Silverlight
SilverlightSilverlight
Silverlight
 
Specification of the Linked Media Layer
Specification of the Linked Media LayerSpecification of the Linked Media Layer
Specification of the Linked Media Layer
 
Hacking.pdf
Hacking.pdfHacking.pdf
Hacking.pdf
 
Castor Reference Guide 1 3 1
Castor Reference Guide 1 3 1Castor Reference Guide 1 3 1
Castor Reference Guide 1 3 1
 

Viewers also liked

CLAVES PARA DESPLEGAR UNA INTRANET SOCIAL
CLAVES PARA DESPLEGAR UNA INTRANET SOCIALCLAVES PARA DESPLEGAR UNA INTRANET SOCIAL
CLAVES PARA DESPLEGAR UNA INTRANET SOCIAL
Ibermatica Social Business y CRM
 
Leveraging social media for admins
Leveraging social media for adminsLeveraging social media for admins
Leveraging social media for admins
Crystal Coleman
 
Mapa conceptual 26 de julio milena villamizar power point
Mapa conceptual 26 de julio milena villamizar power pointMapa conceptual 26 de julio milena villamizar power point
Mapa conceptual 26 de julio milena villamizar power point
celimer
 
Presentación Iriana Colina Seguridad industrial 2 semestre
Presentación Iriana Colina Seguridad industrial 2 semestrePresentación Iriana Colina Seguridad industrial 2 semestre
Presentación Iriana Colina Seguridad industrial 2 semestre
albanyta
 
How FreeeUp Works
How FreeeUp WorksHow FreeeUp Works
How FreeeUp Works
Nathan Hirsch
 
Artificial Intelligence 06.2 More on Causality Bayesian Networks
Artificial Intelligence 06.2 More on  Causality Bayesian NetworksArtificial Intelligence 06.2 More on  Causality Bayesian Networks
Artificial Intelligence 06.2 More on Causality Bayesian Networks
Andres Mendez-Vazquez
 
Digimon leonardo zec & ivan đopar 7.d
Digimon   leonardo zec & ivan đopar 7.dDigimon   leonardo zec & ivan đopar 7.d
Digimon leonardo zec & ivan đopar 7.d
silvijedevald
 
Peter LaBrash resume
Peter LaBrash resumePeter LaBrash resume
Peter LaBrash resume
Peter LaBrash
 
Getting Started With INBOUND Marketing
Getting Started With INBOUND MarketingGetting Started With INBOUND Marketing
Getting Started With INBOUND Marketing
Digital AdDoctor
 
Docker.io
Docker.ioDocker.io
Cake Phpで簡単問い合わせフォームの作り方
Cake Phpで簡単問い合わせフォームの作り方Cake Phpで簡単問い合わせフォームの作り方
Cake Phpで簡単問い合わせフォームの作り方
柴田 篤志
 
Introducción a la computacón
Introducción a la computacónIntroducción a la computacón
Introducción a la computacón
Cabrera Miguel
 
Evolucion De La Ead
Evolucion De La EadEvolucion De La Ead
Evolucion De La Ead
Hector Bentui
 
How to prepare for class 12 board exams
How to prepare for class 12 board examsHow to prepare for class 12 board exams
How to prepare for class 12 board exams
Ednexa
 
áGuia azul gracilene pinto
áGuia azul gracilene pintoáGuia azul gracilene pinto
áGuia azul gracilene pinto
Luzia Gabriele
 
A mulher tarcísio costa
A mulher tarcísio costaA mulher tarcísio costa
A mulher tarcísio costa
Luzia Gabriele
 

Viewers also liked (17)

CLAVES PARA DESPLEGAR UNA INTRANET SOCIAL
CLAVES PARA DESPLEGAR UNA INTRANET SOCIALCLAVES PARA DESPLEGAR UNA INTRANET SOCIAL
CLAVES PARA DESPLEGAR UNA INTRANET SOCIAL
 
Leveraging social media for admins
Leveraging social media for adminsLeveraging social media for admins
Leveraging social media for admins
 
Mapa conceptual 26 de julio milena villamizar power point
Mapa conceptual 26 de julio milena villamizar power pointMapa conceptual 26 de julio milena villamizar power point
Mapa conceptual 26 de julio milena villamizar power point
 
Presentación Iriana Colina Seguridad industrial 2 semestre
Presentación Iriana Colina Seguridad industrial 2 semestrePresentación Iriana Colina Seguridad industrial 2 semestre
Presentación Iriana Colina Seguridad industrial 2 semestre
 
How FreeeUp Works
How FreeeUp WorksHow FreeeUp Works
How FreeeUp Works
 
Artificial Intelligence 06.2 More on Causality Bayesian Networks
Artificial Intelligence 06.2 More on  Causality Bayesian NetworksArtificial Intelligence 06.2 More on  Causality Bayesian Networks
Artificial Intelligence 06.2 More on Causality Bayesian Networks
 
Digimon leonardo zec & ivan đopar 7.d
Digimon   leonardo zec & ivan đopar 7.dDigimon   leonardo zec & ivan đopar 7.d
Digimon leonardo zec & ivan đopar 7.d
 
Peter LaBrash resume
Peter LaBrash resumePeter LaBrash resume
Peter LaBrash resume
 
Getting Started With INBOUND Marketing
Getting Started With INBOUND MarketingGetting Started With INBOUND Marketing
Getting Started With INBOUND Marketing
 
Docker.io
Docker.ioDocker.io
Docker.io
 
testimonial
testimonialtestimonial
testimonial
 
Cake Phpで簡単問い合わせフォームの作り方
Cake Phpで簡単問い合わせフォームの作り方Cake Phpで簡単問い合わせフォームの作り方
Cake Phpで簡単問い合わせフォームの作り方
 
Introducción a la computacón
Introducción a la computacónIntroducción a la computacón
Introducción a la computacón
 
Evolucion De La Ead
Evolucion De La EadEvolucion De La Ead
Evolucion De La Ead
 
How to prepare for class 12 board exams
How to prepare for class 12 board examsHow to prepare for class 12 board exams
How to prepare for class 12 board exams
 
áGuia azul gracilene pinto
áGuia azul gracilene pintoáGuia azul gracilene pinto
áGuia azul gracilene pinto
 
A mulher tarcísio costa
A mulher tarcísio costaA mulher tarcísio costa
A mulher tarcísio costa
 

Similar to LiferayDocumentation-Shikhar

Getting Started Guide
Getting Started GuideGetting Started Guide
Getting Started Guide
webhostingguy
 
Xi3 voyager userguide_en
Xi3 voyager userguide_enXi3 voyager userguide_en
Xi3 voyager userguide_en
Anil Damara
 
Installing and conf guide for hp sm connector
Installing and conf guide for hp sm connectorInstalling and conf guide for hp sm connector
Installing and conf guide for hp sm connector
TheEnferRimbaud
 
Plesk Modules
Plesk ModulesPlesk Modules
Plesk Modules
webhostingguy
 
Guia definitiva de shodan
Guia definitiva de shodanGuia definitiva de shodan
Guia definitiva de shodan
noc_313
 
Moss2007
Moss2007Moss2007
Moss2007
LiquidHub
 
social_connected_administrators_and_developers_guide_30-a4
social_connected_administrators_and_developers_guide_30-a4social_connected_administrators_and_developers_guide_30-a4
social_connected_administrators_and_developers_guide_30-a4
Eugene Lymar
 
Sql server community_fa_qs_manual
Sql server community_fa_qs_manualSql server community_fa_qs_manual
Sql server community_fa_qs_manual
Steve Xu
 
Double entry document, Analysis and Design
Double entry document, Analysis and DesignDouble entry document, Analysis and Design
Double entry document, Analysis and Design
Mohsin Yaseen
 
Plesk 8.1 for Linux/UNIX
Plesk 8.1 for Linux/UNIXPlesk 8.1 for Linux/UNIX
Plesk 8.1 for Linux/UNIX
webhostingguy
 
Report on e-Notice App (An Android Application)
Report on e-Notice App (An Android Application)Report on e-Notice App (An Android Application)
Report on e-Notice App (An Android Application)
Priyanka Kapoor
 
CA Service Desk Administrator Guide with Examples
CA Service Desk Administrator Guide with ExamplesCA Service Desk Administrator Guide with Examples
CA Service Desk Administrator Guide with Examples
Arshad Havaldar
 
Pc 811 troubleshooting_guide
Pc 811 troubleshooting_guidePc 811 troubleshooting_guide
Pc 811 troubleshooting_guide
makhaderms
 
ZebraNet Bridge Enterprise - Manual do Software
ZebraNet Bridge Enterprise - Manual do SoftwareZebraNet Bridge Enterprise - Manual do Software
ZebraNet Bridge Enterprise - Manual do Software
UseZ
 
Guia de usuario arena
Guia de usuario arenaGuia de usuario arena
Guia de usuario arena
Sadamii Rap
 
Innovation Trends: Web 2.0
Innovation Trends: Web 2.0Innovation Trends: Web 2.0
Innovation Trends: Web 2.0
Jari Ognibeni
 
2013HT12504-Dissertation Report
2013HT12504-Dissertation Report2013HT12504-Dissertation Report
2013HT12504-Dissertation Report
Sri Kumaran
 
Clearspan Enterprise Guide
Clearspan Enterprise GuideClearspan Enterprise Guide
Clearspan Enterprise Guide
guest3a91b8b
 
Musvo security agents
Musvo security agentsMusvo security agents
Musvo security agents
sadombajoel
 
DM_DanielDias_2020_MEI.pdf
DM_DanielDias_2020_MEI.pdfDM_DanielDias_2020_MEI.pdf
DM_DanielDias_2020_MEI.pdf
Muthusankaranarayana1
 

Similar to LiferayDocumentation-Shikhar (20)

Getting Started Guide
Getting Started GuideGetting Started Guide
Getting Started Guide
 
Xi3 voyager userguide_en
Xi3 voyager userguide_enXi3 voyager userguide_en
Xi3 voyager userguide_en
 
Installing and conf guide for hp sm connector
Installing and conf guide for hp sm connectorInstalling and conf guide for hp sm connector
Installing and conf guide for hp sm connector
 
Plesk Modules
Plesk ModulesPlesk Modules
Plesk Modules
 
Guia definitiva de shodan
Guia definitiva de shodanGuia definitiva de shodan
Guia definitiva de shodan
 
Moss2007
Moss2007Moss2007
Moss2007
 
social_connected_administrators_and_developers_guide_30-a4
social_connected_administrators_and_developers_guide_30-a4social_connected_administrators_and_developers_guide_30-a4
social_connected_administrators_and_developers_guide_30-a4
 
Sql server community_fa_qs_manual
Sql server community_fa_qs_manualSql server community_fa_qs_manual
Sql server community_fa_qs_manual
 
Double entry document, Analysis and Design
Double entry document, Analysis and DesignDouble entry document, Analysis and Design
Double entry document, Analysis and Design
 
Plesk 8.1 for Linux/UNIX
Plesk 8.1 for Linux/UNIXPlesk 8.1 for Linux/UNIX
Plesk 8.1 for Linux/UNIX
 
Report on e-Notice App (An Android Application)
Report on e-Notice App (An Android Application)Report on e-Notice App (An Android Application)
Report on e-Notice App (An Android Application)
 
CA Service Desk Administrator Guide with Examples
CA Service Desk Administrator Guide with ExamplesCA Service Desk Administrator Guide with Examples
CA Service Desk Administrator Guide with Examples
 
Pc 811 troubleshooting_guide
Pc 811 troubleshooting_guidePc 811 troubleshooting_guide
Pc 811 troubleshooting_guide
 
ZebraNet Bridge Enterprise - Manual do Software
ZebraNet Bridge Enterprise - Manual do SoftwareZebraNet Bridge Enterprise - Manual do Software
ZebraNet Bridge Enterprise - Manual do Software
 
Guia de usuario arena
Guia de usuario arenaGuia de usuario arena
Guia de usuario arena
 
Innovation Trends: Web 2.0
Innovation Trends: Web 2.0Innovation Trends: Web 2.0
Innovation Trends: Web 2.0
 
2013HT12504-Dissertation Report
2013HT12504-Dissertation Report2013HT12504-Dissertation Report
2013HT12504-Dissertation Report
 
Clearspan Enterprise Guide
Clearspan Enterprise GuideClearspan Enterprise Guide
Clearspan Enterprise Guide
 
Musvo security agents
Musvo security agentsMusvo security agents
Musvo security agents
 
DM_DanielDias_2020_MEI.pdf
DM_DanielDias_2020_MEI.pdfDM_DanielDias_2020_MEI.pdf
DM_DanielDias_2020_MEI.pdf
 

LiferayDocumentation-Shikhar

  • 1. In thisdocumentationyouwill understand all the features and functionalities of Liferay, Social Office and Social Networking so that it will help in collaboratingusersand organization in an efficient and easy way. Liferay With Social Office & Social Networking Shikhar Saran Srivastava shikhar.447@rediffmail.com 8339041831 http://shikhar.honor.es
  • 2. Table of Contents 1. Purpose…………………………………………………………………………………………………………………….5 2. Liferay Portal…………………………………………………………………………………………………………….5 3. What is LiferayPortal CE?.…………………………………………………………………………………………5 4. Installationand Setup…………………………………………………………………………………………….5-6 5. After Downloading/Obtainingwhat to do?.................................................................6 6. UsingLiferay SetupWizard………………………………………………………………………………….…6-7 7. Usingthe Control Panel……………………………………………………………………………………….…7-8 8. What is Social Office?..................................................................................................8 9. InstallingSocial Office………………………………………………………………………………………….…8-9 10. Login into Social Office………………………………………………………………………………………….9-11 11. Installationof Social Office inside LIferayPortal…………………………………………………….…11 12. 2nd Way ofInstallation ofSocial Office inside LiferayPortal………………………...….…...11-12 13. InstallingSocial Networking……………………………………...………………………………………...12-13 14. Liferay Featuresand Functionalities…………………………………………………………….…...….….13 14.1 Users………………………………………………………………………………………………...………………14 14.1.1 Usersand Organizations……………………………………………………...…………….14-15 14.1.2 UserGroups……………………………………………………………………………….……...15-16 14.1.3 Roles……………………………………………………………………………….……………………...16 14.1.4 Password Policies……………………………………………………………………………...……17 14.1.5 Monitoring………………………………………………………………………………………...…...18 14.2 Sites…………………………………………………………………………………………………….…………...18 14.2.1 Sites………………………………….……………………………………………………….…….18-29 14.2.2 Site Template……………………………………………………………………………...…………30 14.2.3 Page Template…………………………………………………………………………...………….30 14.2.4 Site Content……………………………………………………………………………………...30-31 14.2.5 Creatingthe Site Pages……………………………….…………………………….…………...31 14.2.6 Portlets…………………………………………………………………………………………….31-32 14.2.7 Page Permission……………………………………………………………………….……...32-33 14.3 Apps………………………………………………………………………………………………………………...33 14.3.1 App Manager………………………………………………………………………...…………33-34 14.3.2 Store………………………………………………………………………….…………………………34 14.3.3 Purchased……………………………………………………………………….……………………34 14.3.4 PluginsConfiguration………………………………………………………...…………….35-36 14.3.5 License Manager………………………………………………………………………...………...36 14.3.6 OpenSocial Admin…………………………………………………………….…………….36-37 14.4 Configuration………………………………………………………………………………….………………37 14.4.1 Portal Settings………………………………………………………………...………………37-40 14.4.2 Custom Fields……………………………………………………………...………………….40-42 14.4.3 ServerAdministration…………………………………………………………………….42-46 14.4.4 Portal Instances………………………………………………………………….………….46-47 14.4.5 Social Office Configuration………………………………………………………………….47 15. Social Office CE………………………………………………………………………………………….………….47 15.1 What is Social Office?......................................................................................47 15.2 What’sthe difference betweenLiferayPortal and LiferaySocial Office…….47-48 15.3 Social Office PluginsAvailable……………………………………………………………...….48-49
  • 3. 15.4 UsingLiferay as a Social Platform………………………………………………………...….49-51 15.5 How to Use Social Office?..............................................................................51 15.5.1 My Dashboard……………………………………………………………………….……...51-52 15.5.2 CreatingCommunities……………………………………………………….…….……52-53 15.5.3 Descriptionof pre-definedpages…………………………………….…………………53 15.5.3.1 Dashboard………………………………………………………...…………….53 15.5.3.2 Calendar………………………………………………………………...……….54 15.5.3.3 My Documents…………………………………………………………….54-55 15.5.3.4 Forums……………………………………………………………….………...….55 15.5.3.5 Blog………………………………………………………….………………...55-56 15.5.3.6 Wiki………………………………………………………….………...…………...56 15.5.3.7 Contacts Center……………………………………….………….……...56-57 15.5.3.8 Chat……………………………………………………….……….…….………...57 15.5.3.9 Messages………………………………………………….…...…….……57-58 16. WokingSmart with LiferaySocial Office………………………………………………………….58-59 17. Upgradingyour LiferaySocial Office Version………………………………………………...……...59 17.1 Upgradingfrom Social Office version2.x to 3.x……………………………….…………...59 17.2 Upgradingfrom Social Office 3.0.0. to 3.0.1…………………………………………………60 18. Some Out of the Box Features…………………………………………………………………………….60 18.1 AccessingLiferay Services………………………………………………...……………….……….60 18.2 Beanshell…………………………………………………………………………………….………….60-61 18.3 Groovy………………………………………………………………………………………………………...61 18.4 JavaScript……………………………………………………………………………………………….61-62 18.5 Ruby…………………………………………………………………………………………….……………...62 18.6 Python………………………………………………………………………………………………….…….62 19. Authoring the basic content……………………………………………………………………...………...62 19.1 CreatingContent the simple way………………………………………………………………...63 19.2 RICH, WYSIWYG Editing…………………………………………………………….…………...63-66 19.3 Creatinga displaypage……………………………………………………………….…………66-68 20. ConfiguringAdditional PortletSettings………………………………………………………………68 20.1 USERS……………………………………………………………………………………………………68-69 20.2 Mail host names………………………………………………………………………………………...69 20.3 E-Mail Notifications……………………………………………………………………….……...69-71 20.4 ContentSharing……………………………………………………………………………….………...71 20.5 Identification………………………………………………………………………………………….….71 20.6 Miscellaneous:DisplaySettings………………………………………………...………….71-73 21. ConfiguringLiferayfor high availability…………………………………………………….……….73 22. Integrating ExistingUsersinto Liferay………………………………………………………….……73 22.1 LDAP…………………………………………………………………………………………………....74-80 22.2 OpenSSO…………………………………………………………………………………………………...80 22.3 Authentication:Central AuthenticationService (CAS)…………………….…….80-81 22.4 Authentication:Facebook…………………………………………………………………….……81 22.5 Authentication:NTLM……………………………………………………………………………81-82 22.6 Authentication:OpenID………………………………………………………….……………….82 22.7 Authentication:OpenSSO…………………………………………………………………….82-83 23. UsingScripting for AdvancedFlexibility……………………………………………….…………….83 24. UsingLiferay Portal as A Collaborative Platform…………………………………….………84-85 25. Manual Configurationfor SendingMails…………………………………………………….….85-86
  • 4. 26. Running Scripts from the control panel………………………………………………………….86-88 27. Extendingand CustomizingLiferayfor your own needs………………………………………88
  • 5. Purpose The purpose of thisdocumentisto equipthe readerwiththe basicsetuprequiredbefore youstart the basic setuprequiredbefore youstartthe developmentforthe Aakari3 InternshipProgram.As far as possible there are linksandimagesshowninthe document,however due toversionupdates there mightbe some differenceswhichwillhave tobe managedbythe reader.If there is anykindof difficultyfacedpleasepostittoi3-internship-discuss@aakaronline.com . Liferay Portal LiferayPortal isan enterprise webplatformforbuildingbusinesssolutionsthatdeliverimmediate resultsandlong-termvalue. What is Liferay Portal CE? LiferayPortal CE isthe opensource versionof Liferay'senterprise webplatformforbuildingbusiness solutionsthatdeliverimmediate resultsandlong-termvalue.Itstartedoutasa personal developmentprojectin2000 and wasopensourcedin2001. Since then,LiferayPortal CE'spopularityhasskyrocketed,boastingover4milliondownloadsinits lifetimeandwide acclaimfromindustryexpertstodeveloperstobusinessusers. The projectis still thrivingwithavibrantcommunityof over45,000 thatcontributestothe growth and developmentof the platform. Installation and Setup LiferayPortal isone of the mostflexible applicationsonthe markettodaywithregardto application serverenvironments.Youcan install LiferayPortal oneverythingfromasharedTomcat installation to a multi-node clusterrunningacommercial applicationserverandoneverythinginbetween.In fact, Liferayisusedsuccessfullyinall of these scenarioseveryday. You’ll findthatbecause Liferayisextremelyflexible initsdeploymentoptions,itiseasytoinstall as well.If youalreadyhave anapplicationserver,youcanuse the toolsfordeploymentthatcame with your applicationserver.If youdon’thave anapplicationserver,Liferayprovidesseveral application serverbundlesfromwhichtochoose.These are veryeasytoinstall andwitha small amountof configurationcanbe made intoproduction-readysystems. The CE versionof Liferayisfreelydownloadable fromourwebsite at http://www.liferay.com.Click the Downloads linkatthe topof the page andyou are presentedwithmultipleoptionsforgettinga copy of Liferay,includingourconvenientbundlesora.war package for installationonyour applicationserverof choice. The EE versionof Liferayisprovidedtoyouasa resultof yoursupportsubscription.Everythingyou needisprovidedinthe CustomerPortal,includingdownloadlinksthatallow youtoobtaina copy of a Liferaybundle ora .war package for installationonyourapplicationserverof choice.
  • 6. So whatis a bundle anyway?A bundle isanopensource applicationserverwithLiferaypreinstalled. Thisis the mostconvenientwaytoinstall Liferay.Liferayisbundledwithanumberof opensource applicationservers;all youneedtodois choose the one that bestfitsyourneeds.If youdon’t currentlyhave anapplicationserver,youmaywantto start withthe Tomcat bundle,asTomcatis one of the smallestandmoststraightforwardbundlestoconfigure.If youhave anopensource applicationserverpreference,choose the serveryoupreferfromthe available LiferayPortal bundles.All of the bundlesshipwithaJavaRuntime EnvironmentforWindows;if youare usinga differentoperatingsystem,youwill needtohave a JDK(Java DevelopmentKit) installedpriorto launchingLiferay. Please note thatLiferayisnotable to provide applicationserverbundlesforproprietaryapplication serverssuchas WebLogicor WebSphere,becausethe licensesforthese serversdon’tallow for redistribution.LiferayPortal,however,runsjustaswell onthese applicationserversasitdoeson opensource applicationservers.A .warfile anddependency.jarsare providedforproprietary applicationserversand you’llneedtofollow aprocedure toinstall Liferayonthem. After Obtaining/Downloading what to do? 1. Extract it to a particularlocation. 2. There are 2 ways to runthe tomcat server,checkoutboth: 3. Before runningityouhave to setupjavaenvironmentinyoursystem. 4. For that downloadjavafromthe java.com. 5. NowRightclickon the This PCicon onthe DesktopandGo to Properties->AdvancedSystem Settings->EnvironmentVariables… 6. Clickon New…->Give name JAVA_HOME->Thengive the directorypathof java. Example:C:ProgramFilesJavajdk1.7.0_25 7. Clickon New…Again->Give name CATALINA_HOME->Thengive the directorypathof Liferay Tomcat directory(where youhadextractthe Liferay). Example:D:liferay-portal-6.2-ce-ga5tomcat-7.0.62 8. Nowthere are 2 waysto run Liferay: 9. Go to cmd (CommandPrompt) &type commands:%CATALINA_HOME%binstartup.batrun 10. Go to extractedLiferaydirectory:liferay-portal-6.2-ce-ga5->tomcat-7.0.62->bin->startup.bat 11. It will take about5minto start the serverafterthat go to yourbrowserand type: localhost:8080 NowYour Liferayisreadyto use. Using Liferay Setup Wizard To make it easyto configure Liferayoptimallyforyouruse,the firstthingyousee whenbrowsingto your newlyinstalledLiferaybundleisasetupwizard.Thisgivesyoua convenientwaytoconfigure Liferayforyour purposes.
  • 7. There are three sectionsof the wizard:the portal,the administratorandthe database.Forthe portal,youneedto supplythe followinginformation: Portal Name: the name of the website you’re poweringwithLiferay.Inthisbook,we’llbuildasocial networkforyournose.This site iscalledNosestersowe’ve suppliedNosesterinthe screenshot below. DefaultLanguage: choose the defaultlocale where yoursite resides. For the administrator,youneedtosupplythe followinginformation: First Name:the firstname of the user that hasthe administratoraccount. Last Name:the lastname of the userthat has the administratoraccount. Email: the email addressof the userthat has the administratoraccount. LiferayisReadyto use Now.(Don’t change the username:test@liferay.com& Password: test) Using The Control Panel Reach the control panel byclickAdmindropdown:Admin->Control Panel. The Control Panel is organizedinfourmainareas:Users, Sites,Apps,andConfiguration.The optionsinthe Configuration sectionof the Control Panel categoryinclude configurationoptionswhichcontrol how the portal operatesandintegrateswithothersystemsyoumayhave.Inthistopic,we’ll coverthe following topics:
  • 8.  Portal settings,suchasuser authenticationoptions,mail hostnames,emailnotifications, identificationsettings,anddisplaysettings  Customfields  Serveradministrationoptions,includingoptionsforresources,loglevels,properties, CAPTCHA,datamigration,file uploads,mail,external services,scripts,andshutdown settings  Portal instances Afteryouhave createdusers,usergroups,organizations,roles,sites,andteamsyourportal will be readyto host contentandapplications.Youcanconfigure Liferay’sportal settingstofityour environmentandyourparticularportal project.It’seasyto adjustconfigurationsettingsusingthe portlet-drivenuserinterface of Liferay’Control Panel.Let’sstartbyexaminingLiferay’sPortal Settings. What is Social Office? Introduction Social Office isateam workspace productthatcombinescollaborationandsocial networking featuresina single package designedforenterprises.Itisanend-usersolutionwithaspecific functionandpurpose outof the box.Ithas beenbuiltusingLiferay Portal asitsfoundation. Use Case  SharedWorkspacesforoffice teamstocollaborate.  Documentsharing.  Social networkinginanenterprise(Enterprise socialcomputing). Installing Social Office Here are some quickinstructionsonhow toinstall LiferaySocial Office v1.X. Thisis specificallyfor windowsbutitwill alsorunon otheroperatingsystems. If you wantto install Liferay2.0,please refertothe userguide: http://www.liferay.com/documentation/social-office/2.0/user-guide Windows 1. Downloadandsave the desiredbundle from http://www.liferay.com/web/guest/downloads/social_office 2. Double click the icon on the desktop and install Social Office using all default values.
  • 9. 3. Once it is installed, click start then programs then Liferay social office and then start in order to run social office. Login 1. When prompted,signinusingthe defaultuseridandpassword. . userid: admin . password:admin
  • 10. 2. You will be askedtochoose a passwordreminder.There isalsoanoptiontocreate yourown. 1. You are thentakento the home page and can begincollaboratingusingall of the great features!
  • 11. This was the installationof Social Office outside the Liferayportal. Installation of Social Office Inside Liferay Portal 1. Go to Control Panel. 2. Clickon Store 3. Inside Store SearchSocial Office. 4. Clickon Social OFFICECE. 5. Purchase itfrom marketplace. 6. AfterpurchasingitGo to Control Panel->Purchased 7. Inside PurchasedSelectSocial Office CEandinstall it. 8. Afterthat Go to Control Panel->Social Office Configuration. 9. Here Selectthe userYou wantto assignthe Social Office toforfirsttime usersassignitfor Joe Blogs(Admin). 10. ClickSave & Nowyou can enjoysocial office. 2nd way of Installing Social Office inside Liferay Portal 1. Go to https://www.liferay.com 2. Go to marketplace andsearchSocial Office CE. 3. Afterfindingitpurchase it,goto purchased& itwill take toyou to the Social Office page where youcan downloadlatestversionof Social Office. 4. A SocialOffice.lpkgwillbe downloadedtoyoursystem. 5. Nowgo to yourcontrol panel of Liferayandthengo to AppManager.
  • 12. 6. There youwill see install tabthere youjustuploadthe downloadedSocialOffice.lpkg. 7. Wait 1 min andthendo the step8-10 of above processes. Installing Social Networking What is Social Networking? Since the first social networks rose to popularity, concepts such as Friend and later Like– previously reserved for direct human interaction–have taken on new meaning in an always- online, information driven culture. It could be argued that social networks have transformed the way people interact with their friends, relatives and colleagues. Friends, connections, followers, circles and lists have enabled people to connect and stay connected in ways they’d never been able to before. Initially, these concepts proved to be highly successful for casual web sites but they didn’t take to the business world as quickly. But many organizations are now realizing the importance of leveraging social interactions for more than just recreation. Liferay’s robust social features make it a great platform for business web sites, casual web sites and everything in between. Social applications have many differences when compared to Standard applications that are vital to a social networking site. Standard applications have general and user specific data, whereas social applications can share data within a defined network. This variation is a huge advantage when trying to communicate important information to a large group of people. This difference in communication settings is illustrated below: Figure 6: The graphic above demonstrates Standard Apps vs. Social Apps. Liferay has a constantly improving set of social features which enable you to encourage social interactions on your own portal and to leverage the power and popularity of other social networks. In this topic, we’ll discuss:
  • 13.  General use social portlets  Social portlets for personal pages  Configuring personal pages for social networking  How to connect users using Liferay social relations  Social equity  Integrating Liferay with other social sites When we’re finished, you’ll be well equipped to use Liferay to power your social network. Installing Social Networking Same as 2nd wayof Social Office CE. SearchSocial NetworkingCEinsteadof Social Office CE. Liferay Features and Functionality Go to Control Panel youwill see 4options: 1. Users 2. Sites 3. Apps 4. Configuration NowI will give the tourof all functionalities LiferayOffers:
  • 14. 1. Users 1.1 Users and Organizations In the figure youcan see there are 3 tabsbrowse,All Organizations,All Users. Inside the browse tabClickonAdddropdown& choose the optionyouwantto add: Like Useror RegularOrganization If you choose User, it will take youtothe new page:
  • 15. Enter the Detailsandclicksave the userwill be addedinthe portal. If you choose RegularOrganization, itwilltake youthe new page: Enter the details andthe Organizationwill be added. In the browse sectionyoucansee addedUser andOrganizationsyouhave added. The 3rd optionExportUsers will generate the userslistinthe excel sheet(.csv)format. 1.2 User Groups User groupsprovide away to groupusersindependentlyof the organizationsto whichtheybelong.Administratorscandefine ausergroupand assignthe user groupas a memberof a site to make all of its user’smembersautomatically. Clickon Additwill take youthe new page:
  • 16. Afterenteringthe details, the usergroupwill be created. 1.3 Roles Rolesare groupingsof usersthat share a particularfunctionwithinthe portal, accordingto a particularscope.Administratorscanaddroleswhichcan be grantedpermissionstovariousfunctionswithinportletapplications. You can add a newRolesaccordingto yourneedbutthere isno needof adding roles,predefinedrolesare sufficient. In orderto change or editany permissionof rolesclickonActionsoption youcan change accordingto your need.
  • 17. 1.4 Password Policies Passwordpoliciesdefine enterprise level securitymeasureswhichinclude user lockoutandpasswordexpiration.Administratorscandefine policiesordelegate to an LDAP server. DefaultPassword isgivenasyoucan see inthe figure. You can add newpasswordpolicyif there isrequirement. Or you can change existingDefaultPasswordPolicybyclickingActionsoption: You can change the passwordpolicyaccordingtoyourneedyouwant inthe LoginProcess.
  • 18. 1.5 Monitoring Monitoringallowsyoutosee all of the live sessionsinthe portal.For performance reasons,thissettingisgenerallyturnedoff inproduction. 2. Sites 2.1 Sites Sitesare a set of pagesthat displaycontentandprovide accessto specific applications.Sitescanhave members,whichare givenexclusiveaccessto specificpagesorcontent. Withmost products,youwouldlearnwhatthe software cando interms of settingupyourusersand securitymodel andthenstartbuildingyoursystem. You’ddesignyourinfrastructure andgetyourserverenvironmentupand runningwhile yourdeveloperswritethe applicationsthatlive onyourwebsite. WithLiferayPortal,however,youstartfartherahead.LiferayPortal ismore than justa containerforapplicationswitharobustsecuritymodel.Italreadyincludes manyof the applicationsyou’llneed,outof the box,readyto goand integrated withall the usermanagementandsecurityfeaturesyou’ve alreadylearned about. Nearlyall Liferayusers use Liferay’sWebContentManagementsystem(WCM). Afterall,all everywebsite hascontentthatneedstobe managed.Liferay’s WCM empowersyoutomanage all the contentonyour site quicklyandeasily withinyourbrowser.Beyondmanagingexistingcontent,LiferayWCMletsusers easilycreate andmanage everythingfromasimple article containingtextand imagestofullyfunctional websites.Webpublishingworksalongside Liferay Portal’slargercollectionof applications,whichmeansyoucanaddshoppingcart functionality,visitorpolls,webforms,sitecollaborationtoolsandmore. Everythingisdone withourcollectionof easy-to-use toolswithfamiliarrich-text editorsandan intuitive interface. In thissectionwe’ll coversome basicaspectsof LiferayWCM,including: Page Types Layouts Page andcontentpermissions Importingandexportingcontent Contentcreationandediting Contentpublishing WCM Workflow By the time we’re done,youshouldbe able toapplyall these conceptstoyour owncontent.To demonstrate Liferay’sContentManagementfeatures,we’ll create and manage contenton the portal for Nose-ster,anew social network where people are connectedbasedonwhattheirnoseslooklike.
  • 19. For creatingsitesclickonAddbutton& choose whattype of site youwant to create: Let’stake a example of creatingaBlankSite: Enter the relevantdetailsandclickonsave page Creating and Managing Pages
  • 20. You have a fewoptionsforaccessingthe page creationinterface.Tosimplifythis,we’ll coverthe Dockbar’s Managemenuslightlyoutof order.There are twointerfacestobe aware of: Site Pages andPage.You can get to these frommultipleplaces.Dependingon whatyou’re editingandwhere youare onthe portal,you’ll use eitherthe Managemenu or the Control Panel towork withyourpages.Fromthe Control Panel,make sure you have the correct site selectedinthe contextmenuselectorandclickthe Site Pages link inthe contentsection.If you’ve alreadynavigatedtothe site youwishtomanage,click Managefromthe Dockbarand select Site Pages.Thisisthe exactsame interface yousee inthe Control Panel.Tomanage the specificpage of the site you’ve navigatedto,click ManageandselectPage. For convenience,youcanalsonavigate tothe Sitespage underthe Portal sectionof the Control Panel andclick Actions → ManagePages.Toquicklyaddasingle page while to the site you’re browsing,click Add fromthe Dockbarandselect Page.Justentera name for the page and it’saddedimmediately.Clickthe name of the page inthe navigation menuto visititandstart workingon it.
  • 21. Site Pages isan interface toview existingpages,create new pages,view pagesand exportor importpagesusingLiferayArchive (LAR) files.Note thatyoucanswitch betweenmanagingasetof pagesand managinga single page usingthe left-handside navigationmenu.Clickon PublicPages orPrivate Pages tomanage the groupor clickon an individualpage tomanage justthat one.Switchingviewslike thischangesthe listof available tabstothe right.By default,liferay.com, whichwe renamedtonosester.com, containsa single publicpage called Welcome. Liferay’spage groupsare alwaysassociatedwithsites.Evenusers’personalpagesare part of theirpersonal sites.All pagesbelongtoone of twotypesof page sets:public pagesand private pages.Bydefault,publicpagesare accessible toanyone,even non- loggedinusers(guests).Private pagesare accessible onlytouserswhoare membersof the site whichownsthe pages.Thismeansthe private pagesof an organization’ssite wouldonlybe viewable bysite membersandmembersof the organization. Regardlessof whetherthe pagesare publicorprivate,Liferayusesthe same interface to manage them.Let’slookat thisinterface more closely. More Page Management Tools From the Manage Site Pagesdialogbox,youcanadd a page to the site byclickingthe Add Pagebutton.Because PublicPages isselectedonthe left,clicking Add Pagehere adds a top level page nexttothe Welcome page.Youcan, however,nestpagesas deeplyasyoulike.Tocreate a sub-page underthe Welcome page,selectthe Welcome page firstand thencreate your page.If youlater decide youdon’tlike the orderof your pages,youcan drag and drop theminthe listto put theminwhateverorderyouwant. Let’sgo aheadand add anothertoplevel page andname it Community.We’ll use this page for the RecentBloggersandWiki portlets. Whenyoucreate a newpage,youcan create eitherablankpage or a page prepopulated withportletsfroma page template.Whenyou’re enteringthe name of the page,you can selectfroma listof page templates thatare currentlyavailable.Toview the pages
  • 22. once you addthem,clickthe View Pages button.Thisishow you’dpopulate yourpages withcontentandapplications. If you’re usingthe Manage Pagesinterface tocreate a new page,you’ll have some additional optionstocreate differenttypesof pages.There are PortletPages,Panel Pages,EmbeddedPages,URL Pagesand Link to Page. By default,all pagesare created as portletpagesbutin some situationsyoumightwanttouse one of the otheroptions. PortletPages are the pageswe’re usuallytalkingabout.Theyhave alayoutwhichyou can drag and drop portletsinto.Mostof the pagesyoucreate will be portletpages. Panel Pages can have any numberof portletsonthem, asselectedbyanadministrator, but onlyone will be displayedatatime.Usersselectwhichportlettheywanttouse froma menuonthe leftside of the page and the selectedportlettakesupthe entire page. EmbeddedPages displaycontentfromanotherwebsiteinside of yourportal.An administratorcanseta URL frominthe page managementinterface andthatpage will appearin the contextandwithinthe navigationof yourLiferayportal. URL Pages are justredirectstoany URL specifiedbyanadministrator.Youcanuse URL pagesto create linkstopagesbelongingtoothersitesof yourportal or to pagesof an external site.Use URLpagescautiouslysince blindredirectscreate apooruser experience. Link to Page createsa portal page whichfunctionsasan immediateredirecttoanother page withinthe same site.Youcan selectwhichpage tolinkto froma dropdowninthe page managementinterface.Youcoulduse a Link to Pageto place a deeplynestedpage inthe primarynavigationmenuof yoursite,forexample. Once you’ve created pagesandpopulatedthemwithcontent,Liferayprovidesawayfor youto back themup to separate files.Let’sseehow thatworks. Backing Up and Restoring Pages Nexttothe Add Pagebuttoninthe Manage Site Pagesscreenare twobuttonslabeled Exportand Import.The Exportbuttonexportsthe pagesyoucreate intoa single file, calleda LAR (LiferayArchive).Youcanthenimportthisfile intoanyserverrunning Liferaytore-create the pages.If youhave a LAR youwouldlike toimport,use the Import button.ExportingandImportingLARsisa great wayto take contentfromone environment(say,adevelopmentorQA environment)andmove itall inone shotto your productionserver.Note thatyoushouldnotmake thisaregularoccurrence.If you
  • 23. wantto regularlymove pagesfromone servertoanother,youshoulduse Liferay’s stagingenvironment. LARs are also a goodway to back up yoursite’scontent.Youcan exportthemtoa specificlocationonyourserverwhichisbackedup,andif you everhave torestore your site,all youneedtodo isimportthe latestLAR file.One limitationonLARfiles,however, isthat theyare versiondependent,soyoucan’tuse an exportfroman oldversionof Liferayandimportit intoa newerversion. Let’sbe good administratorsandexportaLAR file forbackuppurposes.Clickonthe Exportbuttonand thenname the file nosesterv1.lar.Use the checkboxestodetermine whatyou’dlike toexport.Forthisinitial export,selecteverything.Notethatif youselect the More Options link,the listexpandstoinclude datafrommanyof Liferay’s applications,includingthe DocumentsandMediaLibrary,Message BoardsandWeb Content.Youcan also exportthe theme you’re using. Once you click Export,yourbrowserpromptsyouto save the file.Once youhave the file, youcan copyit to a backup locationforsafekeepingorimportitintoanotherinstallation of LiferayPortal.If youmustrebuildorwishtorevertback to thisversionof yoursite, youcan importthisfile byclicking the Importbuttonfromthe Manage Site Pagesdialog box,browsingtoitand selectingit. Next,we’ll lookatthe optionsonthe rightside menu,startingwithLookand Feel. Customizing the Look and Feel Whenyouopenthe Manage Site Pagesdialogbox itdefaultstothe Lookand Feel tab. On thistab,you’re presentedwithaninterface thatallowsyoutochoose a theme for the current site.Themescantransformthe entire lookof the portal.Theyare createdby developersandare easilyinstalledusing the LiferayMarketplace.Since we don’thave any themesbeyondthe defaultone installedyet,we’ll use the defaulttheme forour pages.
  • 24. Many themesinclude more thanone colorscheme.Thisallowsyoutokeepthe existing lookand feel while givingyour site adifferentflavor.Changethe colorscheme fromblue to greenbyselecting Green underColorSchemes.If younow go back to the site (by clickingBackto yoursitename.cominthe topleftcornerof the Control Panel),you’ll see some parts of the page are now tingedina greenishhue. If you applya color scheme toa setof publicorprivate pagesitis, bydefault,appliedto each page inthe set.If, however,youopenthe Manage Pagesdialogbox fora particular page,youcan select Definea specific look and feel forthis page to make the color scheme applytothispage only.You can use thisfeature tochoose a differentcolor scheme fora particularpage than the one definedforthe setof publicor private pages to whichitbelongs. There are a fewmore configurable settingsforyourtheme.Youcanswitchthe bullet style betweendotsandarrowsand youcan choose whetherornot to show portlet bordersbydefault. Alsonotice themescanapplytoregularbrowsersor mobile devices.Youcouldcreate anothersite formobile usersattachedtothe http://m.yoursitename.com addressand serve upa page designedforthe smallerscreensonphones. The CSS sectionallowsyoutoentercustomCSSthat will also be servedupbyyour theme.Inthisway,youcan tweaka theme inreal time byaddingnew stylesor overridingexistingones. The nextoptionconfiguresthe logothatappearsforyoursite. Using a Custom Logo If you wantto use your ownlogofor a specificsite,use the Logotab.Addinga custom logoiseasy:selectthe Logo tab andbrowse to the locationof your logo.Make sure your logofitsthe space in the top leftcornerof the theme you’re usingforyourwebsite.If youdon’t,you couldwindup witha site that’sdifficulttonavigate,asotherpage elementsare pushedaside tomake wayforthe logo. In the logotab, youcan also choose whetherornotto displaythe site name onthe site. If you checkthe box labeled Show SiteName, the site name will appearinthe topright corner of the page.This optionisenabledbydefaultandcannotbe disabledif they Allow Site Administratorsto settheir own logo optionisdisabledin PortalSettings.Itis alsonot available forthe default site–onlynewlycreatedsitesanduserpageshave the optiontohave the name display. JavaScript If you clickon JavaScriptfromthe Site Pagesinterface forapage set(eitherPublicPages or Private Pages),you’llfindawindow where youcanenterJavaScriptcode the will be executedatthe bottomof everypage inthe site.If your site’stheme usesJavaScript(as isusuallythe case),it’sbesttoadd customJavaScriptcode to the theme and notinthis window.Thisway,all of yoursite’sJavaScript code remainsinone place. Usingthe JavaScriptwindow of yoursite’sSite Pagesinterface maybe usefulif your site’stheme does notuse JavaScript.Inthiscase,the JavaScriptwindow of yoursite’s Site Pagesinterface will contain allof your site’s JavaScriptandyoucan add some dynamicfeaturestoyoursite’spages.
  • 25. Next,let’slookatanadvancedfeature of the Site Pagesinterface:mergingthe current site’spageswiththe pagesof the defaultsite. Advanced If you clickon Advanced fromthe Site Pagesinterface forapublicpage set,you’ll findan optiontomerge the publicpagesof your portal’sdefaultsite withthe publicpagesof the current site.If youenable thisoption,the pagesof the defaultsite appearinthe currentsite’snavigationbar,alongwiththe currentsite’spages.Also,the pagesof the currentsite appearin the navigationbarof the defaultsite,alongwiththe defaultsite’s pages.This“merging”of pagesonlyaffectsthe listof pagesinthe defaultsite’sandthe currentsite’s navigation bars.Thisallowsuserstomore easilynavigatefromthe current site to the defaultsite,andvice versa.Thisoptioncanbe enabledforthe publicpagesof bothpersonal sitesandregularsites. Note that this“merging”of pagesisnot a “hard merge”.For example,supposethatthe site administratorsof twentydifferentsitesonyourportal all enabledthe Mergedefault site’s publicpages’ option.Wouldthe pagesof all these differentsitesbe mergedinto each site’snavigationbar?No,thatwouldmake a mess!Instead,the portal keepstrack of the currentscopeGroupId(the IDof the currentsite) andthe previousscopeGroupId (the ID of the previouslyvisitedsite).If the Mergedefaultsite’spublic pages optionis enabledforeitherthe currentsite orthe previoussite,the pagesof the defaultsite are mergedinthe pagesof the othersite. For example,suppose thatyourportal hasthree sites:the defaultsite,site A,andsite B. All three siteshave some publicpages.Site A hasthe Mergedefaultsite’s public pages optionenabled,siteBdoesnot.Whena userfirstlogsin,he’sdirectedtothe default site.The scopeGroupIdisthat of the defaultsite andthere isnopreviousscopeGroupId, so no additional pagesappearinthe defaultsite’snavigationbar.Thensuppose the user navigatestosite A.Site A hasthe Mergedefaultsite’spublic pages optionenabled,so the defaultsite’spagesare addedtosite A’snavigationbar.Now if the usergoesback to the defaultsite,site A becomesthe previoussitesosite A’spagesare addedto the defaultsite’snavigationbar.If the usernavigatestosite B,no additional pagesappearin site B’snavigationbarbecause site Bdoesnot have the Merge defaultsite’spublic pages optionenabled.Andif the usernavigatesbacktothe defaultsite,siteBbecomesthe previoussite,and,again,since site Bdoesnothave the Mergedefaultsite’s publicpages optionenabled,noadditional pagesare addedtothe defaultsite’snavigationmenu. Next,let’sexaminehowtoconfigure individual pages. Changing Options for Individual Pages Whenyouselecta single page,some differentoptionsappear.Let’slookatwhatthese do. Details:letsyouname the page for anylocalizationsyouneed.Youcan alsosetthe HTML title thatappearsin the browserwindow forthe page. Plus, youcanset an easyto remember,friendlyURLfor the page. SEO: providesseveral meansof optimizingthe datathe page providestoanindexer that’scrawlingthe page.You can setthe variousmetatags fordescription,keywords and robots.There’salsoa separate Robotssectionthatletsyoutell indexingrobotshow frequentlythe page isupdatedandhow itshouldbe prioritized.If the page islocalized,
  • 26. youcan selectabox to make Liferaygenerate canonical linksbylanguage.If youwantto setsome of these settingsforthe entire site,youcanspecifythemfromthe Sitemaps and Robotstabs of the Manage Site Settingsdialogbox (seebelow). Look and Feel:letsyouseta page-specifictheme. Layout: letsyouspecifyhow portletsare arrangedona page.Choose fromthe available installedtemplatestomodifythe layout.It’sveryeasyfordeveloperstodefinecustom layoutsandadd themto the list.Thisiscoveredmore thoroughlyinboththe Liferay Developer’sGuide and inLiferay in Action. JavaScript: givesyouthe abilitytopaste customJavaScriptcode tobe executedonthis page. Custom fields:If customfieldshave beendefinedforpages(whichcanbe done fromthe CustomFields page of the Control Panel),theyappearhere.These are metadataabout the page andcan be anythingyoulike,suchasauthor or creationdate. Advanced: containsseveral optional features.Youcanseta querystringto provide parameterstothe page.Thiscan become useful towebcontenttemplates.Youcanset a target forthe page so that iteitherpopsupin a particularlynamedwindow orappears ina frameset.Andyoucanset an iconfor the page that appearsinthe navigationmenu. Mobile Rule Groups:allowsyouto applyrulesforhow thispage shouldbe renderedfor variousmobile devices.Youcan setthese upinthe MobileDevice Rules sectionof the Control Panel. CustomizationSettings:letsyoumark specificsectionsof the page youwantuserstobe able to customize. Note that the Manage→ PageLayout menudirectsyoutothe same Layout tab that’sin Manage→ Page Modifying Page Layouts Page layoutsallowyoutoarrange yourpagesso the contentappearsthe way you want it to.Liferaycomeswithmanylayoutsalreadydefined.Developerscancreate more and theycan be deployedtoyourportal for youruse. To prepare forthe portletswe’llsoonbe adding,let’schange the layoutof the Collaborationpage.Toaccesslayouts,selectManage→ PageLayout fromthe Dockbar. Now,selectthe 2 Columns(70/30) layoutandclick Save.Once saved,you’ll returntothe page and it’ll seemasthoughnothinghashappened.Once we startaddingportlets, however,you’ll notice the page isnow equallydividedintotwocolumns.Youcanstack portletsontop of each otherinthese columns.There are,of course,more complicated layoutsavailable andyoucanplayaroundwiththemto get the layoutyouwant. Sometimesaparticularlayoutis almostwhatyouwant butnot quite.Inthiscase use the NestedPortletsportlettoembedalayoutinside anotherlayout.Thisportletisa
  • 27. containerforotherportlets.Itletsyouselectfromanyof the layoutsinstalledinLiferay, justlike the layouts fora page.Thisgivesyouvirtuallyunlimitedoptionsforlayingout your pages. The nextoptioninthe Managemenuispage customizations. Page Customizations Page Customizations are anew feature inLiferay6.2.With page customizations,any userwiththe appropriate permissionscancreate personalizedversionsof anypublic page.Before userscancreate personalizedversionsof pages,customizationsmustfirst be enabledbyanadministrator.Administratorscanactivate ordeactivate customizationsforanyrowor columnon anypage.Whenuserscustomize a page,they have the optionto use eithertheirversionorthe defaultversionof apage.Userscan’t see alternate versionsof pagesotherthantheirown. Whenan administratoractivatespage customizationsforapage,anyportletsthatare in a Customizablerowor columncan be movedaroundthe page or removedfromthe page.Users can add newportletsof theirownchoosingtothese columnsof the page and can alsocustomize portletconfigurations. If atany time usersdetermine theydon’t like theircustomizations,theycanclick Reset My Customizations toreverttheirpages back to the default. Nowthat youknowhowto enable page customizations,let’slookatthe settingsforthe site as a whole. Configuring Site Settings As withSite Pages,youcanaccess Site Settingsthroughthe Control Panel ordirectly fromthe site usingthe Dockbar(Manage→ SiteSettings).
  • 28. You’ll findoptionstospecifydetailsandmetadataaboutyoursite,setupfriendlyURLs and virtual hosts,configure searchengine optimizationsettings,turnstagingonor off and specifyaGoogle AnalyticsID.Let’stake a closerlook. Details:allowsanadministratortochange the descriptionandmembershiptype of a site andalso to specifytagsandcategoriesforthe site.The membershiptype canbe set as open,restrictedorprivate basedonthe privacyneedsof the site.Userscan joinand leave anopensite at will.Tojoinarestrictedsite,auserhas to be addedby the site administrator.A usercan alsorequesttobe addedthroughthe Sitessectionof the Control Panel.A private site islike arestrictedsite butdoesn’tappearinthe Sites sectionof the Control Panel foruserswhoaren’tmembers. Pages: FromSite Settings,clickon Pages tomanage some basicfeaturesof the pageson a site.If no pageshave beendefinedyet,youcansetsite templatesforthe publicor private pages. If pagesalreadyexist,linksare providedtoview them.Youcanalso change the site’sapplicationadapter,whichisaspecial type of hookpluginthat customizesoutof the box functionalityforspecificsites. Site URL: Seta friendlyURLand/or a virtual hostforyour site here.The Friendly URL optionletsyoumanage the pathto your site inthe portal’sURL. FriendlyURLsare used for bothpublicandprivate pages.Forpublicpages,the friendlyURLis appendedto http://localhost:8080/web.Forprivate pages,the friendlyURLis appendedto http://localhost:8080/group.EachfriendlyURLneedstobe a unique name,of course. Havinga human-readable friendlyURLassistsindexingbotsandiscritical togood search engine optimization. For example,suppose youwere creatingaportal for a bankcalledthe BestBank. If you setthe friendlyURLof yourportal’sdefaultsite to/best-bank,the URL of your default site’spublichome page wouldchange to http://localhost:8080/web/best-bank/home.If your portal’sdefaultsite hadprivate pages,the URL of the defaultprivate home page wouldchange to http://localhost:8080/group/best-bank/home. Note that if you’re addingafriendlyURLfor yourportal’shome page,youshouldupdate your portal’sHome URL fieldsothatpage requeststo http://localhost:8080redirect properly.Todo this,navigate tothe Portal Settingspage of the Control Panel andfind
  • 29. the Home URL fieldinthe Navigationsection.Forourbankexample,we wouldenter /web/best-bank/homeintothe Home URLfield.Once you’ve enteredthissetting,page requeststolocalhost:8080 will redirecttothe friendlyURLof yourportal’snew homepage:http://localhost:8080/web/best-bank/home. VirtualHosts make web navigationmucheasierforyourusersbyconnectingadomain name to a site.Thistab allowsyoutodefine adomainname (i.e., www.mycompany.com)foryoursite.Thiscanbe a full domainora subdomain.This enablesyoutohosta numberof websitesasseparate sitesonone Liferayserver. For instance,if we setthisupfor Nose-ster’sDevelopmentNetwork,usersinthatsite coulduse developers.nosester.comtogettotheirsite,providedNose-ster’snetwork administratorscreatedthe domainname andpointedittothe Liferayserver. To setthis up,the DNS name developers.nosester.com shouldpointtoyourportal’sIP addressfirst.Thenenter*http://developers.noseter.com*inthe Virtual Hosttabfor the Developerssite.Thishelpsusersquicklyaccesstheirsite withouthavingtorecall an extendedURL. Site Template:If you’ve createdthe site fromasite template,thissectiondisplays informationaboutthe linkbetweenthe site template andthe site.Specifically,youcan see whichsite template wasusedandwhetherornot itallowsmodificationstothe pagesinheritedfromitbysite administrators.If you’re notusingsite templatesforthis site,youcan safelyignore thissection. Sitemap:letsyousenda sitemaptosome searchenginessotheycancrawl yoursite.It usesthe sitemapprotocol,whichisanindustrystandard.Youcan publishyoursite to Yahoo or Google andtheirwebcrawlerswill use the sitemaptoindex yoursite.Liferay Portal makesthisverysimple foradministratorsbygeneratingthe sitemapXMLforall publicwebsites. By selectingone of the searchengine links,the sitemapwill be senttothem.It’sonly necessarytodo thisonce per site.The searchengine crawlerwillperiodicallycrawl the sitemaponce you’ve made the initial request. If you’re interestedinseeingwhatisbeingsenttothe search engines,selectthe Preview linktosee the generatedXML. Robots: If you’re usingvirtual hostingforthissite,youcanconfigure robots.txtrulesfor the domain.The Robotspage givesyouthe optionto configure yourrobots.txtforboth publicandprivate pagesona site.If youdon’thave Virtual Hostingsetup,thistab is rather boring. Staging: enablesyoutoedit andrevise apage behindthe scenes,thenpublishchanges to yoursite once theyhave beencompletedandreviewed. Analytics: allowsyoutointegrate yourpageswithGoogle Analytics.Liferayprovides seamlessintegrationwithGoogle Analytics,allowingyoutoplace yourID inone place, thenit will getinsertedoneverypage.Thisenablesyoutofocusyoureffortsonbuilding the page,rather thanrememberingtoputthe code everywhere.Google Analyticsisa free service whichletsyoudoall kindsof trafficanalysisonyoursite soyoucan see who visits,where visitorsare fromandwhatpagestheymost oftenvisit.Thishelpsyou tweakyoursite so youcan provide the mostrelevantcontenttoyourusers. Nowthat youknowhowto configure sites,let’slookatpage templatesandsite templates. 2.2 & 2.3 Site Templates & Page Templates
  • 30. Site Template Site Templatesallow youtodefine pagesandwebcontenttoinclude when creatingsites.Administratorsmaydefine andeditsite templatesaswell astheir permissions. Page Template Page Templatesallow youtoselectapage to use and portletstobe included whencreatinga page.Administratorsmaydefine andeditpage templatesas well astheirpermissions. PageTemplates and Site Templates are invaluable toolsforbuildingsimilar pageson largerportals.Asyou continue toaddpagesto sitesinyourportal, you’ll notice repeatablepatternsinthe designsof those pages.Page templates enable youtopreconfigure asingle page andthenapplyittoany new page you create.Site Templatesallowyoutodo the same thingbuton the scale of a site– if you have multiplesitesthatuse asimilarstructure of pages,youcan create a single site template anduse ittocreate as manysitesasdesired. Site Content Liferay6.1 makesit easiertoaccessWeb Contentmanagementwithoutusing the Control Panel.Youcan now click Manageandthen Site Contenttoaccess the same Web Contentcontrolsfeaturedinthe Control Panel rightfromyour portal page. You can manage the followingkindsof content:  RecentContent  WebContent  DocumentsandMedia  Bookmarks
  • 31.  Calendar  Message Boards  Blogs  Wiki  Polls  Software Catalog  Tags  Categories  Social Activity  DynamicData Lists Creating the Sites Pages There are a lotof otherthingsyoucan do beyondplacingportletsonapage.So let’sstartworkingonthe Nose-stersite.Youcando thisby goingupto the Dockbar and clickingGo to → Nose-ster. We’ll use the Community page youcreatedearlierinthe topics.Navigate tothe Community page andselectManage→ Pagefromthe Dockbar. Thisscreenshouldnow be familiartoyoubut let’srecap. The Page tab allowsyouto:  Change the name of the page  Enter HTML code for the title  Choose the page type  Hide the page from the theme navigation  Define afriendlyURLto the page  Choose anicon to be displayed  Choose a frame targetfor the page  Copyan existingpage You can alsoentercustommeta tags or JavaScripttothe page if you’re a web developer.Additionally,if youclickthe Permissions button,youcandefine whichusers,groups,rolesororganizationscanview oreditthe page. The Childrentabletsyoucreate childpagesunderneaththe page you’ve selected.Youcannestpagesas deepas youlike butforeverypage below the top level hierarchyyoumustprovide navigationtoitviaa Navigationor Breadcrumbportlet,atleastwithmostthemes(includingthe default). Developerscancreate themeswhichhave cascadingmenubarswhichshow the full hierarchy.Some examplesof thatare in Liferay’spluginrepositories. For now,click Return to full page.You shouldbe able todefine andmanage pagesinLiferayat thispointso let’slookatwhat you’dputon a page. Portlets As we discussedearlier,LiferayPortal pagesare composedof portlets.All of your site’sfunctionality,fromblogstoshopping,iscomposedof portlets. Addingportletstoa page issimple.Let’saddsome toour Collaborationpage. 1. In the Dockbar,select Add → More.
  • 32. 2. In the menuthat appears,expandthe Collaborationcategory. 3. Drag the BlogsAggregatorportletoff the AddApplicationwindow ontothe rightcolumnof our page. 4. Next,dragthe Wiki portlettothe left column. See howeasyit isto add applicationstoyourpages?We’ve gone one step further:we’ve gotthe Wiki portlet,the BlogsAggregatorportletandthena nestedportletwithadifferentlayoutandthe Alerts,SearchandDictionary portletsinthe figure below. Page Permissions By default,publicpagesare justthat: public.Theycanbe viewed byanybody, loggedinor notloggedin.Andprivate pagesare reallyonlyprivate fromnon- membersof the site.If someone hasjoinedyoursite orisa memberof your organization,thatpersoncansee all the private pages.Youcan, however, modifythe permissionsonindividual pagesineitherpage groupsoonlycertain userscan viewthem. Let’ssay we wantedtocreate a page onlyfor administratorstosee.We cando thiswiththe followingprocedure: 1. Go to the Dockbarand select Manage→ ControlPanel. 2. Ensure you’ve selectedthe defaultsite inthe contextselector. 3. Clickthe Site Pages link. 4. Clickthe PrivatePages tab to switchto the Private Pages.Remember,thesepagesbydefault are viewableonlybymembersof the site. 5. Create a page called Admin Tips. 6. Clickon the page inthe tree onthe leftandthenclick Permissions. 7. Uncheck the View and Add Discussion permissionsnexttothe Site Memberrole. 8. Clickthe Savebutton.
  • 33. Congratulations!You’vejustchangedthe permissionsforthispage soonlysite administratorscanview it.Anyusersyouaddto thisrole can now see the page. Otherusers,evenmembersof thissite,won’thave permissiontosee it. PagesinLiferayare as flexible aspagesyou’dcreate manuallywithoutaportal. Usinga pointandclickinterface,youcan define yoursite anywayyouwant.You can create and remove pages,exportandimportthem, settheirlayouts,define howtheyare indexedbysearchenginesandmore.You’ve alsobeenintroduced to Liferay’sconceptof sites.Again, usingapointandclickinterface,youcan create multiple websitesanddefine how userscanaccessthem, whetherthey are linkedtoa domainname andcreate all of theirpages. 3. Apps 3.1 App Manager AppManager managesall the installedappsfromthe marketplace orby installingmanually.
  • 34. You can Activate itor Deactivate anyappsby clickingActionButton. In Install TabYou can manuallyuploadafile andinstall itina liferayportal. Afteruploadingyoucanmanage itfrom AppManager. 3.2 Store LiferayMarketplace where youcanbuyapps,themesandmany cool stuffs. 3.3 Purchased Thisis the place whenyoupurchase anyapp fromthe store will show here you will install it.
  • 35. 3.4 Plugins Configuration PluginsConfigurationallowsadministratorsto configure whichportal roleshave access to certainplugins. PortletPlugins Theme Plugins Layout Template Plugins
  • 36. 3.5 License Manager In License Managerwe can see our liferayregistereddetailsorif we hadbuy a liferay thenwe cangenerate licensebyenteringOrderId. 3.6 OpenSocial Admin In OpenSocial Adminwe canbuildandpublishourownGadgets.
  • 37. 4. Configuration 4.1 Portal Settings Settingsiswhere mostof the global portal settingsare includingnames, authentication,defaultuserassociations,andmail hostnames. Most global portal settingscanbe configuredfromthe Portal Settingssectionof the Control Panel.The Configurationheadingcontainsthe followinglinks: General:letsyouconfigure global settings,suchasthe companyname,domain, the virtual host,a global portal logo,andmore. Authentication:allowsyoutoconfigure userauthenticationmethodsand connectionstoLDAPand Single Sign-Onservers. Users:has three tabslabeledFields,ReservedCredentialsandDefaultUser Associations.The Fieldstabenablesordisablessome userfields,suchas birthdayor termsof use.The ReservedCredentialstabletsyoureservescreen namesand email addressessouserscannotregisterusingthem.Youmightuse thisto preventusersfromregisteringonthe portal withusernamesthatcontain profanityorthat soundofficial,suchas admin or president.The DefaultUser Associationstabletsyouconfigure defaultmembershiptoroles,usergroups, sitesfornewusersand providesacheckbox whichallowsyoutoretroactively applythese toexistingusers. Mail Host Names:letsyouadd a listof othermail hostnamesto be associated withyourorganization.Forexample,yourmaindomainmightbe mycompany.combutyoumightuse mycompany-marketing.comforyouremail newsletters.Anydomainnamesassociatedwithyourorganizationcangohere. Email Notifications:allowsyoutoconfigure Liferaytosendemail notifications for certainevents,suchasuserregistrations,passwordchanges,etc.Youcan customize those messageshere.
  • 38. ContentSharing: containsoptionsforenablingsite administratorstodisplay contentinone site fromothersitestheyadminister.Youcanalsoconfigure rules for whethersubsitesshouldbe able todisplaycontentfromtheirparentsites. Afterclickingon PortalSettings inLiferay’sControl Panel,youcanconfigure any of the areasshowninthisfigure.
  • 39. General The General linktakesyouto a screenwiththree headings:MainConfiguration, Navigation,andAdditional Information.Underthe MainConfigurationheading, youcan setthe name of the companyor organizationthat’sresponsiblefor runningthe portal.Thisname alsodefinesthe name of yourportal’sdefaultsite. Its defaultname isliferay.comsoyouwill definitelywanttochange thisto reflectthe name of yourcompanyor organization.Youcanalsoset the mail domain,virtual hostandcontentdeliverynetworkaddresshere. Under the Navigationheading,youcanseta home page for your portal here as well asdefaultlandingandlogoutpages.Forsettingthesepages,justuse the part of the page’saddressthatfollowsyourdomain.Forexample,if youwant the defaultlandingpage tobe http://localhost:8080/web/guest/login,use /web/guest/login.Youcanalso use the variables${liferay:screenName} and ${liferay:userId}aspart of the address.Thiscomesinhandy if youwant to redirectuserstotheirpersonal pagesuponlogin.Alternatively,youcansetthe defaultloginorlogoutpage ina portal-ext.properties file withthe properties default.landing.page.pathanddefault.logout.page.path, respectively.Underthe Additional Informationheading,youcanspecifyaLegal name,ID,companytype, SIC code,tickersymbol,industryandindustrytype. Authentication The Authenticationpage hasseveral tabs:General,LDAP,CAS,Facebook,NTLM, OpenID,OpenSSOandSiteMinder.Youcanuse anyof these authentication methodstoconfigure how userswill authenticatetoLiferay. Since Liferay supportsquite afew authenticationmethods,thereare differentsettingsfor each. The settingsonthe General tab of the Authenticationpage affectonlyLiferay functionalityanddon’thave anythingtodowiththe integrationoptionsonthe othertabs. The General taballowsyouto customize Liferay’sstandard authenticationbehavior.Specifically,the General taballowsyoutoselectfrom several global authenticationsettings:  Authenticate viaemailaddress(default),screenname,oruser ID(a numerical IDauto- generatedinthe database–notrecommended).  Enable/Disable automaticlogin.If enabled,Liferayallowsauserto checka box whichwill cause the site to“remember”the user’sloginbyplacinga cookie onhisor herbrowser.If disabled,userswill alwayshave tologinmanually.  Enable/Disable forgottenpasswordfunctionality.  Enable/Disable requestpasswordresetlinks.  Enable/Disable accountcreationbystrangers.If youare runningan Internetsite,youwill probablywantto leave thisonsovisitorscan create accountson your site.  Enable/Disable accountcreationbythose usinganemail addressinthe domainof the companyrunningthe site (whichyoujustsetonthe General page of Portal Settings).Thisis handyif you are usingLiferayto hostbothinternal andexternal websites.Youcanmake sure all internal IDshave to be createdby administratorsbutexternaluserscanregisterfor IDs themselves.
  • 40.  Enable / Disable email addressverification.If youenable this,Liferaywill sendusersa verificationemail withalinkbackto the portal to verifythe email addresstheyenteredisa validone theycan access. By default,all settingsexceptforthe lastare enabled.Userauthenticationby email addressisanimportantdefaultforthe followingreasons: 1. An email addressis,bydefinition,unique tothe userwhoownsit. 2. People cangenerallyremembertheiremail addresses.If youhave userswhohaven’tlogged intothe portal for a while,itispossible theywill forgettheirscreennames,especiallyif they weren’tallowedtouse theirscreennamesof choice (because theywere alreadytaken). 3. If a userchangeshisor her email address,itismore likelythe userwill forgettoupdate his or her email addressinhisorher profile,if the email addressisnotusedtoauthenticate.If the user’semail addressisnotupdated,all notificationssentbythe portal will fail toreach the user.So it isimportanttokeepthe email addressatthe forefrontof a user’smindwhen he or she logsinto helpthe userkeepitupto date. Next,we’ll examine how tointegrate existingusersfromotherenvironments, such as LDAPservers,intoLiferay. 4.2 Custom Fields CustomfieldsappearbeneathPortal Settingsunderthe Configurationheadingof the Control Panel. Customfieldsare away to add attributestomanytypesof assetsand resourcesinthe portal.For example,if you’reusingLiferayPortal tocreate a site forrating books,youmightcreate a custom fieldcalled FavoriteBooks forUserresource.If you’re usingthe Wiki forbookreviews,youmight add fieldscalled BookTitleand BookAuthor. It’spossible toaddcustomfieldstofollowingkindsof portal resources:  BlogsEntry  BookmarksEntry  BookmarksFolder  CalendarBooking  Document  DocumentsFolder  Message Boards Category  Message Boards Message  Organization  Page  Role  Site  User  User Group  WebContentArticle  Wiki Page The abilitytoadd customfieldstoanyof these resourcesaffordsflexibilitytoportal developers.For example,suppose you’dlike todefine alimitationonthe numberof usersthatcan be assignedto certainroles.A portal administratorcancreate a customfieldcalled max-usersforthe Role resource. Thena portal developercancreate a hookpluginthatchecksthisfielduponuserassignmenttoroles to make sure that there aren’ttoomany usersassignedtothe role.
  • 41. To add a custom field,clickonthe CustomFields linkinthe Control Panel.Thenchoose aresource, clickon the Edit linknexttoit and select Add CustomField. From here youneedtoadd the customfieldkey.The keyappearsasthe label for the fieldonthe form.Forsome portal resources(like the User),customfields are a separate sectionof the form.For others,ascan be seenabove,custom fieldsare integratedwiththe defaultfieldsonthe form.Additionally,developers can access customfieldsprogramaticallythroughthe <liferay-ui:custom- attribute /> tag.
  • 42. You can create fieldsof manydifferenttypes:textfields(indexedorsecret), integers,selectionof multiple valuesandmore.Once you’ve createdafield,you cannot change itstype.However,youcandelete custom fieldsandcreate new ones.Next,let’slookathow toapplyserverconfigurations. 4.3 Server Administration ServerAdministrationsettingscontrol logs,caching,searchindexing,andother advancedfeatures.Advancedadministratorscanmonitorsystem performance, alterdetailedserversettings,reindexsearchesandmodifycaching. The ServerAdministrationpage of the Control Panel letsyouperformvarious tasksrelatedtothe portal serveritself thataren’tdirectlyrelatedtothe resourcesinthe portal.Clickingthe linkmakesthisclear:you’re immediately presentedwithagraphshowingthe resourcesavailable inthe JVM.
  • 43. Resources The firsttab is called Resources.Thistabcontainsthe aforementionedgraphplusseveral serverwide actions thatan administratorcanexecute.Theseinclude the following: Run the garbage collector: Youcan sendina requesttothe JVMto beginthe garbage collectiontask. Clear contentcached by this VM: You can sendina requesttothe JVMto clearcontent storedinthe local cache. Ehcache usage issplitintotwogroups:local JVMscope and clusterscope.Thisactiononlyclearsthe contentof the local Ehcache. Clear contentcached across the cluster: You can sendina requesttothe JVMto clear contentcachedacross the entire cluster.Thisactionclearsthe contentof the clustered Ehcache. Clear the database cache: You can sendina requesttothe JVMto clear the database cache.LiferayusesEhcache mainly,butnotonly,at the persistence layerforcaching objectsobtainedfromthe database.Thisactiononlyclearsthe database resultcache. Clear the direct servletcache: You can sendina requestto the JVMto clearthe direct servletcache.The directservletcontextisafeature that optimizesJSPserving performance bycachingand accessingthe generatedservletsdirectlyinsteadof accessingthemoverthe applicationserver’sdispatcherchain.Thisisonlysuitablefor caseswhere nofilterisrequiredforthe JSPs.Forproductionmode,thiscache shouldbe enabledtoimprove performance.Incase emergencyfixesneedtobe applied,thisaction allowsanadministratortomanuallyclearoutthe cache to force JSPsto reload.For developmentmode,the directservletcontextshouldbe disabledtoallow JSPservletsto be reloadedonthe fly.See the DirectServletContextsectionof the portal.propertiesfile for details. Reindexall search indexes: Youcan sendina requesttoregenerate all searchindexes.If youare not usinga Solrsearch serverthiswill impactportal performance so, tryto do thisat non-peaktimes. Reindexall spell checks indexes:Youcan sendina requesttoregenerate all spell check indexes. Resetpreviewand thumbnail filesforthe Documentsand Mediaportlet: You can send ina requesttoresetthe preview andthumbnailfilesforeachiteminyourportal’s DocumentsandMedialibraries. Generate ThreadDump: If you are performance testing,youcangenerate athread dumpwhichcan be examinedlatertodetermineif there are anydeadlocksandwhere theymightbe. Verifydatabase tablesof all plugins: You can checkall tablesagainsttheirindexesfor accuracy of data retrieval. VerifyMembershipPolicies:Youcancheck that existingsite membershippolicieshave beencorrectlyappliedandautomaticallymake updatesif necessary.Forexample, suppose thatsomeone manuallychangedthe Liferaydatabase orthatthe Liferay database washacked,resultinginauserbeingassignedtoa site inviolationof asite membershippolicy.Whenthe Verify Membership Policies buttonisclicked,the verify methodsof all the site membershippoliciesthathave beenimplementedare triggered. These methodscheckthatall site membershipsare inaccord withthe site membership policies;if theyare not, the necessarychanges(suchasremovingusersfromforbidden sites) are made.
  • 44. Cleanup Permissions:Thisprocessremovesthe assignmentof some permissionsonthe Guest,User,and PowerUser rolestosimplifythe managementof “UserCustomizable Pages”.Notably,the “AddToPage” permissionsisremovedfromthe GuestandUser rolesforall portlets.Likewise,the same permissionisreducedinscope forPowerUsers fromportal wide toscopedto“User Personal Site.” Log Levels The Log Levelstabof the ServerAdministrationpage allowsyoutodynamicallymodify the log levelsforanyclasshierarchyinthe portal.If youhave custom code youhave deployedwhichisn’tinthe list,youcanuse the Add Category tabto add it.If youchange the log level nearthe topof the classhierarchy(suchas at com.liferay),all the classes underthat hierarchywill have theirloglevelschanged.If youare testingsomething specific,itismuchbetterto be as specificasyoucan whenyouchange loglevels. Modifyingthemtoohighinthe hierarchygeneratesalotmore logmessagesthanyou need. Properties Liferayandthe JVMcontainmany settingswhichare definedasproperties.There are twosubtabsof the propertiestabof the ServerAdministrationpage:one showing systempropertiesandone showingportal properties. The systempropertiestabshowsanexhaustivelistof systempropertiesforthe JVM,as well asmanyLiferaysystemproperties.Thisinformationcanbe usedfordebugging purposesorto check the configurationof the currentlyrunningportal. The portal propertiestabshowsanexhaustivelistof the portal properties.These propertiescanbe customized;youcanperuse the full listof customizable properties online athttp://docs.liferay.com/portal/6.2/propertiesdoc/portal.properties.html.If you needtocheck the currentvalue of a particularproperty,itcan be viewedfromthis screenwithouthavingtoshutdownthe portal or openany propertiesfiles. CAPTCHA By default,LiferayshipswithitsownsimpleCAPTCHA service whichisdesignedto thwartbots fromregisteringforaccountsonsitespoweredbyLiferay.If youwantto insteaduse Google’sreCAPTCHA service,youcanenable thissettingfromthe CAPTCHA tab of the ServerAdministrationpage. Simplycheckthe EnableReCAPTCHA box andenteryour publicandprivate keysintothe providedfields,thenclick Save.LiferayPortal will thenuse reCAPTCHA insteadof simple CAPTCHA. Data Migration If you are upgradingfroma previousrelease of LiferayPortal orif youneedtomigrate your data fromone systemtoanother,the Data Migrationtab helpsyouto do that withoutyourdevelopers havingtowrite customscripts. The firstsectionletsyoucopyyour entire Liferaydatabase fromthe currentdatabase underwhichitis runningtothe database you specifyinthissetof fields.You’ll needto
  • 45. enterthe driverclassname (andthe driver will needtobe onLiferay’sclasspath),the JDBC URL of the database to whichyou’ll be copyingyourdataand the credentialsof a userwithaccess tothat database.Once you have all of thisinformationentered,click Executeto copy the data. The nextsectionhelpsyoumigrate yourdocuments.If youwanttomove off of the JackrabbitJSR-170 repositorytothe file system, ortothe Jackrabbitrepositoryfromthe file system,ortoany of the other repositoriessupportedbythe DocumentsandMedia library,youcan do so veryeasily.Make sure youhave alreadysetupyour portal- ext.propertiesfilesothe hookisproperlyconfiguredbefore runningthismigration. Selectthe DocumentLibraryhookthat representsthe locationtowhichyouwantyour documents tobe migrated,thenclick Execute.Your documentswill be migratedtothe newrepository.Youcanthenshut downLiferay,make the new repositorythe defaultin the portal-ext.propertiesfile,andthenrestart. You can migrate imagesfromthe Image Galleryinthe same manner.(InLiferay6.0 and previousversions,the DocumentLibraryandImage Gallerywere distinctrepositories.In Liferay6.1 and laterversions,these have beencombinedintoasingle Documentsand Mediarepository.) File Uploads Since Liferayallowsuserstouploadfilesinvariousplaces,youmaywanttolockdown the type of filesandthe size of filesusersare allowedtoupload.The File Uploadstabof the ServerConfigurationtabletsyousetthe overall maximumfile sizeandthenoverride that size forspecificapplicationswithinLiferay.Youcanlimitthe allowedfile extensions generallyorbyapplication.Youhave alot of flexibilityastohow youwant filestobe managedwithinyourportal. Mail Insteadof usingyourLiferay server’sportal-ext.propertiesfiletoconfigure amail server, youcan configure amail serverfromthe Mail tab of the ServerConfigurationsectionof the Control Panel.If yourportal is to receive mail (see,forexample,ourcoverage of the Message Boards portlet ),youcan connecta POP mail server.If yourportal isto send mail,whichisuseful forsendingnotificationstousers,youcan connectto an SMTP server.We highlyrecommendsettingupmail serversforyourportal. Note that if youconfigure mail serversettingshere inthe Control Panel,these settings will override anymail serversettingsinyourportal-ext.propertiesfile. External Services LiferayPortal enablesuserstouploadandshare contentviathe DocumentsandMedia library,a customizable andpermissionable online repository.Userscanuploadfilesof any type to the DocumentsandMedialibrary.LiferayshipswithPDFBox andusesitto generate automaticpreviewsforcertaintypesof documents,bydefault.Youcan also install three additional toolsthatofferhigherqualitypreviewsanddocumentconversion functionality:OpenOffice orLibreOffice,ImageMagickandXuggler.WithLiferay configuredtouse these tools,youcangenerate automaticpreviewsformanytypesof filesincludingtextfiles,office suitefiles,PDFs,images,audiofilesandvideos.Userswill
  • 46. alsobe able touse the conversionfunctionalitytodownloaddocumentsinavarietyof formats.Please see the AutomaticPreviewsandMetadata sectionformore information. LibreOffice isavailable here: LibreOffice,ImageMagickisavailablehere: ImageMagick, and Xugglerisavailable here:Xuggler.Make sure tochoose the correct versionsof these applicationsforyouroperatingsystem.We recommendthatyouinstall the lateststable versions.LibreOffice 3.6,ImageMagick6.7.7, and Xuggler5.4 workwithLiferay6.2. You needtoinstall LibreOffice andImageMagickmanuallybutyoucaninstall Xugglerfrom Liferay’sServerAdministrationControlPanel interface. Once you’ve installedthesetools,youcanuse the External Servicestab of the Control Panel toconfigure Liferaytouse them. Script Liferayincludesascriptingconsole whichletsadministratorsexecute migrationor managementcode instantly.Several scriptinglanguagesare supported,including JavaScript,Groovy,Python,RubyandBeanshell.Thisguide containsa topicsthat explainshowtouse Liferay’sscriptingconsoleandprovidessome examples. Shutdown If you everneedtoshutdownyour LiferayPortal serverwhileusersare loggedin,you can use the Shutdowntabto informyourlogged-inusersof the impendingshutdown. You can define the numberof minutesuntil the shutdownandacustom message that will be displayed. Users will see yourmessage atthe topof theirportal pagesfor the durationof time you specified.Whenthe time expires,all portal pageswilldisplayamessage sayingthe portal has beenshutdown.Atthispoint,the serverwill needtobe restartedtorestore access.Next,let’sexamine how tomanage multiple portal instances. 4.4 Portal Instances Portal Instancesallow administratorstorunmore than one portal instance ona single server.Dataforeachportal instance are keptseparate fromeveryother portal instance. Portal Instances LiferayPortal allowsyoutorun more than one portal instance ona single server. The Portal Instancessectionof the Control Panel appearsunderthe Configurationheading.Thissectionletsyoumanage multiple portal instances froma single Liferayinstallation.Eachportal instance’sdataiskeptseparate fromeveryotherportal instance’sdata.All portal data,however,iskeptinthe same database. Each portal instance requiresitsowndomainname.Liferaydirectsuserstothe properportal instance basedonthisdomainname.Sobefore youconfigure an
  • 47. instance,configure itsdomainname inyournetworkfirst.Whenyou’re readyto add an instance,clickthe Add buttonhere. You’ll be promptedforfourfieldsandacheck box: WebID: A general conventionistouse the domainname forthis.It’sa user- generatedIDforthe instance. Virtual Host: Put the domainname youconfiguredinyournetworkhere.When users are directedtoyour Liferayserverviathisdomainname, Liferaywill then be able to sendthemto the properportal instance. Mail Domain: Enterthe domainname forthe mail hostfor thisinstance.Liferay will use thistosendemail notificationsfromthe portal. Max Users:Enter the maximumnumbersof useraccountsyouwouldlike your portal instance tosupport. Active:Use thischeck box to choose whethertocreate an active oran inactive portal instance. Whenyouare finishedfillingoutthe form, click Save.Now navigate tothe portal usingyournewdomain name.Youwill see youare broughtto what lookslike a cleaninstall of Liferay.Thisisyournew portal instance whichcannow be configuredanywayyoulike. 4.5 Social Office Configurations Already told in above topics. (When we were installing Social Office.) SOCIAL OFFICE CE LiferaySocial Office isasocial collaborationsolutionforthe enterprisethatstreamlines communication,savestime,buildsgroupcohesionandraisesproductivity. What is Social Office? LiferaySocial Office isasocial collaborationsolutionforthe enterprisethatstreamlines communication,savestime,buildsgroupcohesionandraisesproductivity. It was createdinresponse towide demandforimplementingthe LiferayPortal platform as a team collaborationsolution.To be clear,LiferaySocial Office isbuiltonLiferay Portal,createdbypicking,integrating,andpackagingLiferayPortal'smostasked-for featuresandcapabilitiesforsocial collaborationuse cases. What's the difference between Liferay Portal and Liferay Social Office? If you wanta heavily customizable solution,take alookat LiferayPortal--ithasall the featuresof Social Office andmore.If you're lookingforasolid,simple touse
  • 48. collaborationsolutionanddon'twantto botherwithheavycustomization,LiferaySocial Office will be abetterfitforyou. Social Office Plugins Available for use: CE Plugins:  calendar-portlet  chat-portlet  contacts-portlet  deploy-listener-hook  events-display-portlet  microblogs-portlet  notifications-portlet  portal-compact-hook  private-messaging-portlet  so-activities-hook  so-announcements-portlet  so-configurations-portlet  so-hook  so-portlet  so-theme  tasks-portlet  WYSIWYG-portlet If all the Social Office pluginshave beensuccessfullydeployed,checkthatyoucan accessthe followingitemsinyourportal,eitherinthe Control Panel orona defaultSocial Office site: Role:  Social Office User Site Templates:  DefaultSocial Office Site  Social Office UserHome (Dashboard)  Social Office UserProfile Portlets:
  • 49.  Chat  Contacts  EventsDisplay  Microblogs  Private Messaging  Social Office Configurations  Social Office Portlet  Tasks  WYSIWYG Hooks:  DeployListener  Portal Compact Hook  Social Office Hook Themes:  Social Office theme To actuallystart usingSocial Office afterit’sbeeninstalled,youneedtograntthe Social Office User role to one or more users.Please refertothe Using SocialOfficesectionformore detailsaboutthe Social Office Userrole andthe featuresprovidedbySocial Office. Using Liferay as A Social Platform Whetheryouplanto buildasocial networkor enable social applicationsaspart of your overall user experience, LiferayPortal hasthe toolstomake those featuresworkforyou. Startingwitha suite of applications–includingaprofile summary,activitiesfeeds,socialrequests,awall,andmore–and roundingthingsoutwithanAPI to handle relationshipsbetweenusersaswell aspublishtheir activitiestoeachother,LiferayPortal helpsyouimplementcommonfeaturesof social networks.
  • 50. LiferayPortal providesfeedsof social activities.These feedscancontainentriesfromanyof Liferay’s built-inapplicationsorapplicationsthatyouwrite. Social relationshipsinLiferayPortal are ideallysuitedforeverythingfrompublicsocial networksto enablingsocial featuresinyourcorporate Intranet.Userscanform relationshipswithone another, allowingthemtosee updatesfromthose whose activitytheyneedtotrack.That’s far more powerful than havingthemsubscribe tomultiple individualRSSfeedsorvisitmultipleprofiles,becausethe systemkeepstrackof the updatesfromthose withwhomyouhave a relationship,automatically. More than this,however,Liferayisagreatintegrationplatformforsocial applications.Itfully supportsthe OpenSocial framework.Youcanpublishgadgetsyoufindonline,oryoucanuse Liferay Portal’sbuilt-inOpenSocial gadgeteditortocreate andserve yourownOpenSocial gadgets. LiferayPortal’sOpenSocial gadgeteditorletsyourapidlycreate social applicationsthatcanbe servedacrossthe webto any otherOpenSocial container. LiferayPortal alsosupportsthe creationof Facebookapplications;infact,noadditional codingis necessarytopublishyourLiferayapplicationsonFacebook(youwould,of course,needtouse Facebook’sAPItouse Facebook-specificfeatureslikepostingonusers’timelines).All youneedtodo isget an APIkeyand canvaspage URL from Facebook.
  • 51. AnyLiferayapplicationcanbe publishedtomultiple social networkswithafew clicks. As youcan see,LiferayPortal isbuiltwithsocial applicationsinmind.It’shighlylikely,howeverthat youalso have yourownapplicationyouneedtorunon your website.The LiferayPortal platformis ideal forthe webapplicationyou’re consideringwriting.Inadditiontothis,LiferayPortal iseasily configuredtobe usedas a sharedhostingplatformformultiplewebsites.Let’slookatthe benefits youcan reapby usingLiferayPortal inthese ways. How to use Social Office? My Dashboard Thisis the user'shomepage.The leftside of the page liststhe communitiesorsitesthe userbelongs to as well asa buttonto add sitesif youare the admin.The rightside of the page has three view activityoptions,Mysites,MyFriendsandMe. My siteslistsall the recentactivitiesforthe sitesthat youbelongto.My friendsliststhe recentactivitiesforyourfriendsandMe listsall of your (the loggedinuser's) activities.
  • 52. Creating Communities Once loggedinyouwant to start bycreatingcommunities.Theseare essentiallymini-sitesthatare usedto collaborate on.Youcan create sitesforany groupingof people whowanttocollaborate togetherincludingbutnotlimitedto,specificdepartmentswithinabusiness(e.g.,marketing,sales, or pr),groups of co-workersacrossdepartments(e.g.,thosewhoare organizingthe company-wide summerbbq),andspecificprojects(e.g.,ProductAlpha,Beta,orDelta) thatwill alsohave members frommany departmentswithinacompanycollaboratingonit.Once a communityiscreatedyoucan start addingcontentto thatsite.Clickonthe My Sitesbuttononthe top rightto navigate to the sites youbelongto.Once you've navigatedtoa site you are presentedwithasetof pre-definedpagesfor that site.The advantage tothisis nothavingto spendtime populatingyoursite withpagesand collaborationportletsorworryingaboutlayout.Youcan justset itup and go,literallythe abilityto start workingassoon as yousignon. Once there isno more needfora particularsite,(e.g.,The summerbbqisover) the admincan just delete the site andcreate anew one for the next collaborative need.Youcansee fromthisscreenshotthat three communitiesorsiteswere created, one for marketing,one foreventsandone fora projectnamedAlpha.
  • 53. Descriptions of the pre-defined pages Dashboard Thisis the home page of the marketingcommunitywe created.Itishere thatyoucan see all of the latestactivitiesof userswithinthiscommunity.If youneedtoknow whatpeople are doingthisis where youwouldgoto see an aggregatedlistof all theiractivities.
  • 54. Calendar The Calendarpage allowsyouto see all of the events,appointments,meetings,andsuchthatare associatedwiththatparticularcommunity.Asadminyoucanautomaticallyaddandediteventsin the calendar. My Documents The Documentspage is where the documentlibraryislocated.
  • 55. Forums The Forums page iswhere youcan findthat site'smessage board.A listof quicklinksisdisplayedon the leftside of the page.Thisallowsyouto quicklynavigate righttothe contentyouwantto see.As withthe documents,blog,andwiki pages,asectionwithrelatedcontentisonthe rightside of the page.Thisautomaticallybringsupall contentthatistaggedwiththe same tag as the contentyouare currentlyviewing. Blog Once on the Blog page,youcan navigate throughall the blogscreatedbyuserswithinthissite.For easyaccess,a listof recententriesisonthe left-handsideof the page.
  • 56. Wiki The Wiki page isthe perfectplace tocreate documentationorpostinformationforyourcommunity. It too hasa listof quicklinksonthe lefthandside andrelatedcontentonthe right. Contacts Center The Contacts Centerpage listsall the membersof thatparticularcommunityonthe left.Youcan clicka specificpersontosee more informationonhimorher.
  • 57. Chat The numberof online friendsshowsupinthe bottomrightcornerof the screen.Clickittopull up a listof those friendsandclickona specificpersontoopenachat box withthat friend. Messages You can sendmessagestopersonswhichare incontact withu.
  • 58. Working Smart with Liferay Social Office LiferaySocial Office isLiferay’ssocial collaborationproductforthe enterprise.Previouslyreleasedas a separate productthat was basedonLiferayPortal,it’snow available asanapplicationthatcan be installedonLiferay.We are excitedtobringbothSocial Office andthisguide toyou,inthe hope that you’ll be able touse eachto enable yourteamsto worktogethermore efficiently.Thisguideisfor those whoare settingupandadministeringaninstance of LiferayPortal usingSocial Office.From installingSocial Officetointroducingyoutoitsentire feature set,we’ll discussall of the thingsyou can do withSocial Office tohelpyourteam.We hope you’ll use itasa tool to getSocial Office up, running,andintegratedintoyourenterprise. Youcanfindmuchmore informationaboutinstallation and administrationinthe LiferayUserGuide. “Help!” Thishas beenthe cry of informationworkers everywherewhohave triedtomanage complex projectsthroughemail andsharedfolders.You’veprobablyhadasimilarexperience:you’re collaboratingona documentwithateamof people andare emailingitbackandforth.PersonA createsthe initial documentandPersonBreplieswithsome edits.PersonCreplieswithadditional editsat the same time PersonA replieswiththe correctionsfromPersonB.PersonDtakesthisand rewritesawhole sectionof the documentwhile PersonBandC respondtoPersonA’supdate.Pretty soon,it becomesverydifficulttodeterminewhichdocumentisthe latestdocument.The same scenarioplaysitself outwhenworkinginsharedfolders,exceptthere’snotrail of email messagesto figure outwhodidwhat andwhen. The Social Office pluginforLiferayPortal isdesignedtoanswerthiscall forhelp.Social Office isa dynamicteamcollaborationsolutionforthe enterprise that’sdesignedtostreamline communication,save time,andraise productivity.Organizationsandgroups can use Social Office to share resources,collaborate onprojects,andraise the visibilityof importantactivity.We createdthe
  • 59. productto provide a simple,outof the box solutionforteamcollaboration.Social Office provides youwitha fantasticarray of featuresthatyoudon’tneedto spendalot of time configuring.It’s readyto use rightout of the box.Once installed,aquicksetupwizardwill helpyousetupateam collaborationsite soyoucanbeginworkingimmediately.Infact,youcan have a full production environmentsetupinlesstime thanittakesto brew a potof coffee. If you needanyassistance beyondwhat’scoveredinthisbook,Liferay,Inc.offerstraining, consulting,andsupportservicestofill anyneedthatyoumighthave.Pleasesee http://www.liferay.com/services forfurtherinformationaboutthe serviceswe canprovide.As always,we welcome anyfeedback.If there isanywayyouthinkwe couldmake thisbookbetter, please feel free tomentionitonourforums.Youcan alsouse any of the email addressesonour Contact Us page http://www.liferay.com/contact_us.We are here toserve you,ourusersand customers,andto helpmake yourexperience usingSocial Office the bestitcanbe. Upgrading Your Liferay Social Office version There are a fewstepsandproceduresthatyouneedto follow if you’re upgradingtoa newerversion of Social Office.The sectionsbelowdescribe how toupgrade fromSocial Office 2.x to3.x,and from Social Office 3.0.0 to 3.0.1. Upgrading from Social Office 2.X to 3.X Social Office 3.x onlyrunson LiferayPortal 6.2.x.If you’dlike toupgrade fromSocial Office 2.x to 3.x, youfirstneedto upgrade your portal from Liferay6.1 to Liferay6.2. For informationonupgrading Liferay,please referto UpgradingLiferay.RemembertoundeployyourSocial Office 2.x plugins before upgradingyourportal to6.2. If you have a LiferayPortal EE subscription,make sure toapply any available fixpacksbefore deployingyourSocial Office 3.x plugins. Once your 6.2 portal isready,deployyourSocial Office 3.x plugins. Whenyoufirstlogintoyour portal as an administratorafterinstallingSocial Office 3,you’ll see the Social Officeconfigurations portlet.Youcan use thisportletto grant the Social Office Userrole tousers.The Social Office User providesaccesstothe Dashboardhome page,the publicProfile page,andall of theirapplications. You’re nowreadyto use Social Office!
  • 60. Upgrading from Social Office 3.0.0 to 3.0.1 Before upgradingfromSocial Office 3.0.0to 3.0.1, make sure to sethot.undeploy.on.redeploy=true inyour portal-ext.propertiesfile.ThispropertymakesLiferaycompletelyundeployapluginbefore deployinganewversionof the plugin.If youdon’tsethot.undeploy.on.redeploy=true before upgrading,the upgrade mightnotcorrectlyhandle activities.Settinghot.undeploy.on.redeploy=true ensuresthatactivitiesare handledcorrectly. Afterinstallingthe newversionof Social Office,you’re all set! SOME OUT OF THE BOX FEATURES Accessing Liferay Services In manycases,you’ll wanttointeractwithone of Liferay’smanyservices.Thisispossible fromall of the scriptinglanguagessupported,butthe syntax isa little differentforeachlanguage. To illustrate the correctsyntax forinteractingwithLiferayservices,let’slookata simple example that usesthe UserLocalService toretrievealistof usersand thenprintstheirnamestothe log file. We’ll initiallyimplementthe exampleinJavapseudo-code. Let’ssee firsthowthiswouldworkinBeanshell,whichisverysimilartoJava. Beanshell Beanshell isaJavascriptinglanguage that’sdesignedtorunJava code withlittle ornochanges.In thisexample,we onlyhave one smallchange tomake because Beanshell doesn’tsupportthe use of Java Generics.
  • 61. Groovy Groovyis alsobasedon Javaand isperhapsa little easierthanBeanshell because literallyanycode writteninJavaalsoruns inGroovy. Thismeanswe can execute the exactsame code fromourJava example withoutanychanges. Of course,we couldmake thissomewhatGroovierbysimplifyingthe programasfollows: The script engine supportsmore thanjustJava-like languages.Despitethe name,youshouldbe aware that JavaScriptbearslittle resemblancetoJava,butyou can still use itinLiferay’sscript engine. JavaScript Liferayusesthe Rhino JavaScriptEngine toprovide JavaScriptsupportinthe scriptengine.The followingcode providesa JavaScriptversionof ouroriginal Javaprogram.
  • 62. You can see the Javascriptexample iscompact.Rubyisevenmore compact. Ruby Rubyis supported throughthe use of JRubyandour previousexample couldbe implementedin Rubyas follows: Python Lastly,LiferayprovidesPythonsupportbasedonJythonandthe previousexamplecouldbe implementedwiththe followingcode. As youcan see,Liferay’sservicescanbe accessedfromanyof these languages. Authoring The Basic Content Let’stake an example: You’ve beenassignedthe tasktobuildawebsite foran innovative new social networkingsitecalled Nose-ster.You’vedecidedtotake advantage of LiferayPortal anditsrapiddeploymentfeaturesas well asitsabilitytogeta fullyfunctional,content-richwebsite withintegratedsocial featuresup and runninginlittle time.Together,we cangetyoustarted. We’ll walkthroughthe creationof Nose-ster’swebsite,startingbycreatingandpublishingsome simple contentusingLiferay’sbuilt-inWYSIWYGeditor.We’ll thentake advantage of Liferay’srobust
  • 63. structure editor.We’ll use templatestodisplaythe contentandthenexploresome of the advanced publishingfeaturessuchasthe built-inworkflow andAssetPublisher. Creating Content The Simple Way As we’ve statedabove,contentisthe reasonwebsitesexist.LiferayPortal has made iteasierthan everto getcontentpublishedtoyoursite.Because LiferayPortal issoflexible,youcanuse basic authoringtoolsrightawayor take advantage of the more advancedfeatures.It’sadaptable toyour needs. We’ll beginbycreatingsimplecontentusingLiferay’sWYSIWYGEditorandthenwe’ll publishitto the home page of Nose-ster’swebsite.Thisisafastand straightforwardprocessthatdemonstrates howeasyit isto create and publishcontentonyourLiferayPortal instance.Let’slearnaboutthe WebContentsectionof the control panel sowe can create and publishourfirstpiecesof content. Choosing a Site in the Content Section Whenyoumanage webcontentfromthe Control Panel youcanselectthe locationwhere the contentresides.Forinstance,youcanaddcontentthat’s available toaspecificsite orgloballyacross the portal.The Contentsectionof the Control Panel displaysasitsheadingthe name of the site you’re currentlyworkingon.Thisheadingiscalledthe contextmenu selector:youcan change the scope of where you’dlike toview,editorcreate contentbyusingthe drop-downselectorattached to the heading. Rich, WYSIWYG Editing Once you have the Nose-stersite selected,clickonthe Web Contentlinkinthe Control Panel.Next, clickthe Add buttonunderthe Web Contenttab.This isa highlycustomizableformthatbydefault has twofields:atitle anda powerful WYSIWYGeditor.We couldcustomize thisformtocontain whateverfieldsourcontent needsbutlet’skeepthingssimplefornow. For now,type the words Welcome to Nose-sterinthe Namefield.Notice thatcontentcanbe localizedinwhateverlanguage youwant.If youclickonthe localize checkbox,twoselectboxes appearwhichallowyou to pickthe language you’re workinginandthe defaultlanguage.Youcan entertranslationsof yourcontentforany language inthe list.The screenshotbelow showsthis interface butfornow,we won’tbe usingit,so youcan leave itunchecked.Inthe contentfield,adda short sentence announcingthe website isupandrunning.
  • 64. The Web ContentEditorprovidesmanyoptionsforcustomization. Gettinga newwebsite upand runningisan excitingstepforanyone,whetheritisa large corporationor a small non-profitcharity.Tocelebrate thismomentousachievementatNose-ster, let’sgive ourannouncementsome of the pompandcircumstance we thinkitdeserves! Usingthe editor,selectall the textandthenchange the style to Heading 1 and the color to Dark Green. You couldinsertanimage here or evenmore textwithadifferentstyle,asdemonstratedinthe screenshotbelow.Youcan alsoadd bullets,numbering,linkstoanothersite orcustomimages.You can evenaddan emoticon.Let’sadda smileyface at the endof our announcement.
  • 65. : Viewyourcontentchangesdirectlyinthe editor. The WYSIWYG editorisa flexible tool thatgivesyouthe abilitytoaddtext,images,tables,linksand more.Additionally,youcanmodifythe displaytomatchthe purpose of the content. Plus, it’s integratedwiththe restof LiferayPortal:forexample,whenyouuploadanimage tobe addedto a page,that image can be viewedandmanipulatedinthe DocumentsandMediaportlet. If you’re HTML savvy,LiferayWCMdoesn’tleave yououtinthe cold.You can clickthe Source button and write yourownHTML if youwish. On the rightof the NewWebContentformare optionsthatallow youtocustomize yourweb content.
  • 66. Newwebcontentcanbe customizedinvariouswaysusingthe menuonthe right. Abstract: letsyouto create a brief summaryof the webcontent.You can alsopair the textwitha small image. Categorization:specifiesthe contenttype fromalistof options.Theyare Announcements,Blogs, General, News,PressRelease,and Test. You can alsocreate tags to make the contenteasiertofind ina search.Note thatthese categoriesare definedbyapropertyinthe propertiesfile. Schedule:customizesthe date andtime yourcontentpublishesand/orexpires. Display Page:letsyou determinewhere the webcontentsare displayedwhenlinkedfromother pages.The conceptof the Canonical URL is new toLiferay6.1. The Canonical URL is unique for articlesthatredirectthe visitortothe article’sdefaultdisplaypage. Imagine youhave a newspaperwithasportssectionanda technologysection.Youadda Sports page and a Tech page to your site,eachone witha specificbannerandlookandfeel.Youwantthe articlestoappear inthe appropriate pages,butyouknow inLiferayarticlesare notrelatedto pages. You can add an article as oftenasyou like indifferentwebcontentdisplayportletsorinconfigured AssetPublishers.Butif youhave a Viewin contextlink,where willyoushow yourarticle?Thisis where you’duse adefaultdisplaypage.Articlesthathave adefaultdisplaypage definedare shown withotherrelatedarticlesinthe same displaypage. Imagine youhave 100 sportsarticlesand100 tech articles.Inpreviousversionsof Liferayyou’dneed to create a page foreach article to show it.Now withonlyone sportspage and one techpage,you can showall articlesinone place ina consistentfashion. Creating A Display Page There are twowaysof creatinga displaypage.Youcan use a ContentDisplay Pagetemplate,which automaticallycreateseverythingyouneed,oryoucancreate one manually.The ContentDisplay Page template isfoundunder PageTemplates inthe Portal sectionof the Control Panel. To create a displaypage manually,addanAssetPublishertoa page.Thenmake it the DefaultAsset Publisherforthe page.ThisdefinesthisAssetPublisherasthe one that displaysthe contentif several AssetPublishersare onthe same page.Setthisup by clicking Configuration onyourAsset Publisher.Underthe Setup tab,navigate to Display Settings andcheck the checkbox labeled Setas the DefaultAssetPublisherfor This Page.
  • 67. Once you’ve givenanarticle itsdefaultdisplaypage,linkstothe article redirectthe usertoits defaultdisplaypage.Tosee howthisworks,addanAssetPublishertoanotherpage,like the Home page of the newspaper,andconfigure itto View in a Specific Portlet.Thissettingisfoundinthe AssetLink BehaviormenuunderDisplaySettings.If youclickonthe link,you’llbe redirectedtothe DefaultDisplayPage of the article. You nowsee that the linklookssomethinglikethis: www.nosester.com/nose-article Thisis an example of acanonical URL, and it’sa nice enhancementforSearchEngine Optimization (SEO) because the article’sURLbecomesthe page URL. To a searchengine that’scrawlingyoursite, thismeansthat the locationof yourarticle neverchanges.Andif youdecide touse the contenton anotherpage inthe future,the article isstill availableatthisURL. This feature isusedinsearch results,inrelatedassetsandinAssetPublishers. RelatedAssets:enablesyoutoconnectany numberof assetswithinasite or across the portal,even if theydon’tshare any tags and aren’tinthe same category.You can connectyourcontentto a Blogs Entry, Message BoardsMessage,WebContent,CalendarEvent,BookmarksEntry,Documentsand MediaDocument,anda Wiki Page. Thisblogentryhas linkstothree RelatedAssets:one webcontentdisplayandtwoblogentries.
  • 68. Permissions:customize whohasaccessto the content.Bydefault,contentisviewable byAnyone (GuestRole).Youcan limitviewablepermissionsbyselectinganyRole fromthe drop-downorinthe list.Additionally,LiferayPortal providesthe abilitytocustomize permissionsinmore detail.Select the More Options linknexttothe dropdownbuttonand you’ll findthe differentactivitiesyoucan grant or denyto yourwebcontent. PermissionsforWebContentallowyoutofine-tune how yourcontentisaccessed. Custom fields:customize metadataaboutthe webcontent.The fieldscanrepresentanythingyou like,suchasthe webcontent’sauthororcreationdate.If customfieldshave beendefinedforweb content(whichcanbe done fromthe CustomFields page of the Control Panel),theyappearhere. For thispiece of webcontent,we don’tneedtochange anything.Afteryou’re finishedwith permissions,click SaveasDraft.Thissavesthe contentindraftform.Once you’re satisfiedwithyour changes,selectPublish.Thismakesthe contentavailable fordisplay,butwe still have someworkto do to enable userstosee it.InLiferayWCM, all contentresidesinacontainer,whichisone of two portlets:WebContentDisplayorWebContentList.Byfar the most frequentlyusedisthe Web ContentDisplay portlet. Configuring Additional Portlet Settings Go back to the Control Panel,andclickon PortalSettings underthe Configuration heading.We’ve alreadylookedatthe optionsavailablefromthe Generaland Authentication links.Now let’sexamine the otherportal settingsoptions. USERS If you clickon Usersfromthe Portal Settingsscreen,you’ll findthree tabs:Fields,Reserved CredentialsandDefaultUserAssociations. The Fieldstaballowsyouto enable/disable the followingfields:  Enable/disablerequiringthe Termsof Use  Enable/disableuserscreennames autogeneration  Enable/disablerequiringthe lastnames  Enable/disablethe birthdayfield  Enable/disablethe genderfield