Week in Review: Community Road map, liferay.org and las call for 100 Paper Cuts

Week in Review: community programs, localization,

  • Jonas X. Yuan has twitted some interesting stuff:

#Liferay 6.1 - Allow for #retrieval of #localized  title and summary from #AssetPublisher
#Liferay 6.1 - #Localization of #title and #description of web content

       At last, Liferay localization features got proper attention. Building multi-language sites will be much easier with those changes.

  • Liferay annouced training courses schedule. As Jeffrey Handa wrote there are new tranings prepared for this year: Theme training, Advanced Developer training and Social Office Admin training (which will be based on Social Office 1.6!!!). Enroll today – there are early bird discounts
  • James Falkner annouced two community programs.  First is “100 Paper Cuts” based on similar project from Canonical Ltd. (makers of Ubuntu Linux). The second one is Community Leadership Program. Now you can be a leader and close some unecessary tickets or review community contribiutions. Both should speed up process of applying community made patches to Liferay core and rise up ease of use for Liferay Portal CMS.
  • Some nice improvements were maid to Category portlet
  • Alimozzaman Rony wrote on his blog a post about velocity variables that are defined in init.vm. We think it’s a very good compilation so we added those to Liferay Wiki page about velocity template language

Tips & Tricks: hide Home Page in menu

As you know Liferay has a very nice feature that allows you to edit structure of your website by dragging and dropping pages where you want them. You might didn’t notice that beacuse there is a little GUI bug –  mouse cursor doesn’t change when you are over the right area.
Ok, so now you now how to change your sitemap. Now a little trik.

You know that Liferay allows you to select default page for your site. It is obvious that you want to show you Home Page (in example above it’s a “Welcome” page). But when you put on the first place it also be shown in you menu. There are websites when such entry in menu is ok but also there are websites with so many items in menu that editors want to skip that one in favor of something more interesting to their users. I know what you are thinking: “I can always mark that page as hidden”.

WRONG.

Liferay doesn’t allow first page in structure to be hidden. Don’t know why but as default he can just show pages that are not hidden and are Portlet, Panel, Embedded or Web Content type. This bug was mentioned in LPS-8007, LEP-2369 and in comments to other tickets but still it isn’t fixed. For our luck there is a little work around.

If you try to set first page as hidden you will see an error. If you move your page to other position (for example second) you will be able to hide it but as the defualt one Liferay will show new first page in structure. But if you move your deisred page, change it to “hidden”, save your changes and then move it (by drag’n’drop) to first position Liferay won’t show you any error.

Voila! You have your defualt first page and it isn’t showed in menu any more and all this without any hook coding 🙂

Liferay themes are not so easy to find and buy

I was talking to my friend yesterday about a website he is preparing on Liferay. It’s a very simple site with 6 pages about his start in “Marathon des sables”. He ask me if I know any site where he can easily buy nice looking theme for his site. First I thought about pointing him to the Community Plugins Respository but  after I saw whats in there I’ve changed my mind. Themes published there look like they were made 3 – 4 years ago. Most of them consist of nice picture for header and some additional colors. Well colors I can change by myself using “Look and feel” property of any portlet. I don’t need whole theme for that!

Ok, so I googled for “templates liferay buy” but i found nothing. I don’t know why but you won’t find any Liferays themes and skins on such sites like templatemonster.com. So where’s the problem?
Is there no demand for such themes (which means Liferay is used only for big projects and not for low-cost ones)?
Or maybe portlets are the problem? You can have so many of them it’s hard to develop skin that will work with all configurations.
Maybe developing time is so long the cost of such skin is 3 times bigger than developing WP skin?

So let’s sit and think about it for minute or two because without such low-cost skins Liferay Portal can’t compete with low-to-build-site-on CMS systems like WordPress or Drupal. Andy ideas?

 

Update:

Just had a interesting discussion with Tomas Polesovsky. In his opinion Liferay theme is no harder to develop than Joomla theme. If we make such equation “little/stagnant community=few themes=less interesting product=goto start” it’s obvious that by stimulating theme development we can stimulate whole LR grow.

Newsletter portlet for Liferay 6 CE

Liferay 6 is a very nice CMS but sometimes it lacks basic features. One of it is Newsletter. If you go through blogs, forum, google a little bit you will see there is a big demand for that functionality. There are even two ticket in JIRA (LEP-2177 and LPS-14426) and one wiki page butit looks like the work is on hold.

So we decided to make our own Newsletter portlet 🙂

It’s a version 1.0 and it lack most of features mentioned on Liferay wiki page for proposals but:

1. Admin can define as many topics / newsletter lists as he wants.

2. Admin can deploy as many newsletter portlets as he wants.

 

3. Admin can configure what topics will be available to subscribe / unsubscribe in each newsletter portlet.

4. If there is only one lists defined for portlet it won’t show “choose your topic” lists.

5. Users can subcribe withour beign registered in portal

6. After signing up user will recieve confirmation email with “click this link to confirm” message

7. Admin can add user to topic manualy

8. Admin can add users by uploading CSV file

9. Admin can export all users to CSV file

10. Editor can compose email using WYSIWYG editor (with images too).

 

Roadmap for our newsletter portlet is:

1. Add abillity to send categorized / tagged web content

2.  Send automaticaly web content using its “Publish date” field

3.  Control Panel configuration page should be scope-aware

For couple of projects such functionality is enough. I wonder will it ever be done in Liferay CE. For now we’re thinking about releasing our portlet on double licence for free (non-profit, educational) and for commercial use similar to what MyOffice24x7 did with their Survey portlet. If you’re interested in this portlet – just call us or send us an email 🙂

Lesson learned

Some time ago there was a big discussion on Liferay forum and blogs about poor developer documentation of Java code. Liferay presented argument that there was a problem with not so actual comments that lead to errors. Well, if LR developers don’t update comments in javadoc it’s not our fault. We shouldn’t drop that documentation based on such argument. So every one decided that Javadocs will be updated to point where they are useful for developers. At December I saw Javadocs for Lr 6.0.5 and they were impressing.

But i still don’t know what

public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findByC_G_A_V_T_D_C_T_S_T_D_S_R

means 😀

Tips & Tricks: Private Pages

As you probably know Liferay can automatically create private pages for new user. He can also use existing page as a template for new one. To do this you will need to:
1. Prepare your page using Sitemap, portles, themes etc.
2. Exports your page to lar file
3. Copy this lar to deploy/ (deploy/example.lar)
4. Add this to your portal-ext.properties
default.user.private.layouts.lar=${liferay.home}/deploy/example.lar
5. Restart application

You can also perform some tricks with this functionality. For example you want every user to have his own 3 web contents (resume, about me, my stuff). To do this just follow those steps:
1. Prepare your page using Sitemap, portles, themes etc.
2. Prepare your articles and publish them
3. Exports your page with all data to lar file
4. Copy this lar to deploy/ (deploy/example.lar)
5. Add this to your portal-ext.properties
default.user.private.layouts.lar=${liferay.home}/deploy/example.lar
6. Restart application

Now not only theme and pages are connected to private pages but Web content too. If there already is a web content with ID like on your template page Liferay will create new one changeing Owner to the user he is creating private page for. If there existssuch user in the system LR will publish those WC (Web contet) with that user as owner.