Talk:Liferay

MPDL,GAVO

Where i can find some more information about the Liferay concepts?

 * Liferay concepts

Where i can find some more information about the Community roles in Liferay?

 * Community roles

How is a new web content set from "pending" to "approved"?

 * I create a new web content (e.g. via the "web content" button in the control panel). In the control panel I have the buttons "My workflow taks" and "My submissions". I do not arrive to activate my contribution (despite being administrator).
 * It depends on the workflow. When creating the web content, saving is not enough, it needs to be submitted for publishing. As present Liferay setting is 1 level of approval, the content first needs to pass the approval workflow in the Liferay. When activating "My workflow tasks" one could approve or reject the web content. Later on, the web content shall be included by invoking the Menu (top of the browser window) "Add" and "Web content display". This would add a new "Web content display" portlet. In the portlet configuration (top right corner of the portlet) you may link the web content you wish to be displayed.

How can I get rid of the error message "Blogs is temporarily unavailable", which shows up frequently when I try to edit or post a blog?

 * Possibly, the solution is described here: http://www.liferay.com/de/community/forums/-/message_boards/message/6928665 - an sql-file to fix the bug.

Delete private layout of all users (except system administrators)

 * usefull when changing personal templates (see also http://www.permeance.com.au/web/terry.mueller/home/-/blogs/script-to-delete-liferay-users )
 * this is a Beanshell script that shall be run from Liferay Server Administration->Scripts

import com.liferay.portal.util.PortalUtil; import com.liferay.portal.service.UserLocalServiceUtil; import java.util.concurrent.*; import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.LayoutLocalServiceUtil; import com.liferay.portal.model.Group;

pool = Executors.newFixedThreadPool(20); serviceContext=new ServiceContext;

for (user : UserLocalServiceUtil.getUsers(0, 99999)) { if (user.isDefaultUser || PortalUtil.isOmniadmin(user.getUserId)) { System.out.println("Skipping user " + user.getScreenName); } else { final Object userToDelete = user; pool.execute(new Runnable {       public void run {           System.out.println("Deleting user pages" + userToDelete.getScreenName);           //here code to delete user pages            System.out.println("This many pages to delete " + userToDelete.getPrivateLayoutsPageCount);  	    LayoutLocalServiceUtil.deleteLayouts(userToDelete.getGroup.getGroupId, true, serviceContext);  	    System.out.println("This many pages after delete " + userToDelete.getPrivateLayoutsPageCount);

}   });          } }

Delete all Sites
import com.liferay.portal.util.PortalUtil; import com.liferay.portal.service.GroupLocalServiceUtil; import java.util.concurrent.*; import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.LayoutLocalServiceUtil; import com.liferay.portal.model.Group;

pool = Executors.newFixedThreadPool(20); serviceContext=new ServiceContext;

for (group : GroupLocalServiceUtil.getGroups(0, 99999)) { if (group.isRegularSite) { System.out.println("RegularSite " + group.getName);

final Object groupToDelete = group; pool.execute(new Runnable {       public void run {           System.out.println("Deleting group" + groupToDelete.getName);           //here code to delete user pages          GroupLocalServiceUtil.deleteGroup(groupToDelete.getGroupId);	            }    });

} else { System.out.println("Skiping Group" +group.getName); }     }

CleanUp AWOB
delete from so_extgroupmember where groupid not in (select groupid from group_); delete from so_extgroupstatuslog where groupid not in (select groupid from group_); delete from so_extgroup where groupid not in (select groupid from group_); delete from mbmessage where groupid not in (select groupid from group_); delete from mbmessage; delete from mbstatsuser where groupid not in (select groupid from group_); delete from mbthread where groupid not in (select groupid from group_); delete from mbdiscussion where threadid not in (select threadid from mbthread); delete from usernotificationevent; delete from so_memberrequest; delete from so_favoritesite; delete from assetentry where groupid not in (select groupid from group_); delete from chat_entry; delete from chat_status; delete from ticket; delete from tms_taskassignee; delete from tms_tasksentry; delete from pm_userthread;
 * run Beanshell script to delete all sites
 * login to LR as admin
 * deactivate from Control Panel all not needed users
 * delete from Control Panel all not needed users
 * run following script in postgreSQL

How can I deploy Aladin tool?
 image/fits fits FITS
 * deploy hooks/awob-hook
 * deploy webs/resources
 * create an Aladin page (hidden) in Projects Site Template
 * set friendly URL to the /aladin page
 * add document and media portlet to the page
 * add web-content display portlet to the page
 * add wev content, title: Aladin applet in scope Global, give permissions for this Web content to User and Social Office user, source of the web content is:
 * add image/fits entry into the system mime-types file according to the following rules, e.g. here: JAVA_HOME/lib/mime.types:
 * the fits files can be open with document library action context menu:
 * in aladin applet on the same page (Open in Aladin action)
 * in a separate window (Open in Aladin (separate window) action)

Reset the SocialActivity for Tasks and Projects for 0.6 release to fill-in the Extra data
create table socialactivity_backup as select * from socialactivity;
 * Beanshell Script in SVN
 * before running the script, please make backup of the socialactivity table in the database

import com.liferay.portlet.social.model.SocialActivity; import com.liferay.portlet.social.service.SocialActivityLocalServiceUtil; import java.util.concurrent.*;

pool = Executors.newFixedThreadPool(20); int counter=0;

for (activity : SocialActivityLocalServiceUtil.getSocialActivities(0, 999999)) { System.out.println("SocialActivity groupId is " +  activity.getGroupId); if (activity.getExtraData.isEmpty) {

System.out.println("SocialActivity empty message in extra data " );

counter++; final Object activityToChange = activity;

//the AwobHook onAfterUpdate listener will only trigger if the extra data is "change-me" activityToChange.setExtraData("change-me"); pool.execute(new Runnable {              public void run {                    SocialActivityLocalServiceUtil. updateSocialActivity(activityToChange);  	            System.out.println("Just like updating it");               }           }); } }

System.out.println("Total Empties "+counter);