Posts

10 Useful Libraries and Resources for Responsive Web Design

Image
Let’s talk about responsive web design. People are increasingly dependent on their smart mobile devices, and chances are that a large portion of the visitors of your website have used their phone or tablet to get to it. In this article you will find 10 articles, tools and resources, which will help you learn what responsiveness is, and how to apply these techniques to your current website. Happy learning! Basics Let’s start with these articles which explain the basic ideas of responsiveness. 1. Make it Responsive Google’s “Make it Responsive” is a great introduction in the topic. It will get you into the responsive web-designs. During this course, you will be building a site that works across multiple screen sizes and device types. They also have other useful guides which we recommend.                                                     Make it ...

The Simplest Way To Center Elements Vertically And Horizontally

Flexbox is a relatively new addition to the CSS world and we keep finding more and more excellent applications for it. We can even solve the age-old problem with centering an element both vertically and horizontally with CSS. It is easier than you can imagine – it is only three lines of code, doesn’t require you to specify the size of the centered element and is responsive-friendly! This technique works in all modern browsers – IE10+, Chrome, Firefox and Safari (with the -webkit- prefix). See the full compatibility table here . The HTML The idea, of course, revolves around flexbox. First, we create a container in which we want everything to be centered: <div class="container"> <h3> All content in here will be centered. </h3> </div> You can place this container div anywhere you want. In the live example above we’ve made it take up the whole width and height of the page. The CSS As we said earlier, we will be u...

Don't Change password for first time login

Image
In Liferay, first time user will prompted to change password screen, where user can change password. Some times, we may not require user to change password, when we import users manually from outside. In this case, user would have already changed password, so we don't need to redirect user again. There are different ways to do that. Let's check following how we can do that. 1. While creating user through admin interface, uncheck the checkbox 'Password Reset Required' 2. Uncheck 'Change Password' checkbox in Default Password Policy. This can be done through control panel, Password policies > Default Password Policy.  3. Also you can override Lifeay's core classes and set passwordReset  property of User bean to false .

Hide and disable access to Liferay's 6.1 control panel.

It is often needed to hide control panel dockbar for simple users. This article I'll describe different ways to achieve this. First we need to change theme little in order to hide dockbar, it can be done in following way. Create new theme if you don't have theme ready. In portal_normal.vm file, change following lines of code #if ($is_signed_in) #dockbar() #end in to following. #if (($is_signed_in) && $permissionChecker.isCompanyAdmin($company_id))  #dockbar() #end It will remove dockbar for all non admin users. But user still can be able to access control panel by typing the following url  http://localhost:8080/group/control_panel. To avoid this, we can write costume hook to restrict user to doing so. Let's check how this can be done: In liferay-hook.xml add following lines of code. <portal-properties>portal.properties</portal-properties> Add portal.properties file to hook's src folder and add following line to i...

Add SEARCH BAR in theme in LIFERAY

Following steps are to add search in theme: 1. Open file in Liferay SDK location [LIFRAY_SDK]/themes/{theme-ame}/docroot/_diffs/templates/portal_normal.vm 2. Add $theme.search() at your desired location. 3. Build and deploy the theme. 4. A search text box will appear where the code was placed Steps to customize the search: In case you need to customize the search functionality to search only specific content types, follow the steps below. 1.  Open file in Liferay SDK location [LIFERAY_HOME]/tomcat-6.0.26/webapps/ROOT/WEB-INF/classes/portal-ext.properties 2. Add following lines: com.liferay.portlet.blogs.util.BlogsOpenSearchImpl=true com.liferay.portlet.bookmarks.util.BookmarksOpenSearchImpl=true com.liferay.portlet.calendar.util.CalendarOpenSearchImpl=true com.liferay.portlet.directory.util.DirectoryOpenSearchImpl=true com.liferay.portlet.documentlibrary.util.DLOpenSearchImpl=true com.liferay.portlet.imagegallery.util.IGOpenSearchImpl=true com.lif...

Liferay Resources for Developers - Liferay Portal 6.1 - Development Guide

The following resources are useful references for developers who working with the Liferay Platform Liferay specific resources: What is a portal? -  http://www.liferay.com/products/what-is-a-portal Platform Javadocs -   http://docs.liferay.com/portal/6.1/javadocs/ Reference documentation for Liferay's XML files -  http://docs.liferay.com/portal/6.1/definitions/ Reference documentation for Liferay's taglibs -  http://docs.liferay.com/portal/6.1/taglibs/ Liferay 6.1 resources: https://github.com/liferay/liferay-portal/tags https://github.com/liferay/liferay-plugins/tags Development resources version: https://github.com/liferay/liferay-portal https://github.com/liferay/liferay-plugins Related specifications and standards: Java 5 Javadocs:  http://download.oracle.com/javase/1.5.0/docs/api/ JavaEE 5 Javadocs:  http://download.oracle.com/javaee/5/api/ JavaEE Overview: http://www.oracle.com/technetwork/java/javaee/tech/index.html Portlet S...

Liferay Migration From 6.1 EE To 6.2 EE

Introduction When using a portal platform/app server such as Liferay, major version upgrades are a periodic fact of life. Having a set of standard steps to follow in migrating from one version to another is essential in easing the process and making it repeatable across environments–never do an upgrade in a production environment first, and never do an upgrade without sufficient backups of your current Liferay install folder, database, and document library. This post will cover repeatable steps to upgrading a Liferay EE installation from 6.1 to 6.2. For this example, you will need a valid Liferay customer account with access to the Customer Portal to download Liferay and related artifacts. In this example, we have an existing installation with Liferay 6.1 EE GA3 and we are migrating to Liferay 6.2 EE SP4 Database This example assumes MySQL is the Liferay target database. Other databases would have a similar process. 1. First, take the backup of existing database by ex...