Skip to content

Instantly share code, notes, and snippets.

View rotty3000's full-sized avatar

Raymond Augé rotty3000

View GitHub Profile
@rotty3000
rotty3000 / liferay-portlet.xml
Created October 21, 2011 18:13
Embedding a portlet into the theme, the best way
<add-default-resource>true</add-default-resource>
<system>true</system>
@rotty3000
rotty3000 / facets.json
Created October 23, 2011 15:47
original facets JSON with some docs
{
/*
* You can have any number of facet objects in the facet array, including 0.
*/
facets: [
/*
* Each object has required fields:
*
* className: the classname of the entity (used for finding the
* indexer, etc.)
@rotty3000
rotty3000 / script.groovy
Created October 28, 2011 14:36
Groovy script for re-verifying and re-indexing Organizations from the script console
import com.liferay.portal.service.CompanyLocalServiceUtil
import com.liferay.portal.verify.VerifyOrganization
import com.liferay.portlet.usersadmin.util.OrganizationIndexer
vp = new VerifyOrganization()
vp.verify()
out << " Verify Done!"
@rotty3000
rotty3000 / diff.patch
Created October 29, 2011 04:33
JSON RPC Services Deserialize Locale
commit 337cd8f5629e36ede6fc2ac704d68873824dcd10
Author: Raymond Auge <[email protected]>
Date: Sat Oct 29 00:26:54 2011 -0400
JSON RPC Services Deserialize Locale
diff --git a/portal-impl/src/com/liferay/portal/action/JSONServiceAction.java b/portal-impl/src/com/liferay/portal/action/JSONServiceAction.java
index 87bd7dd..ca22bca 100644
--- a/portal-impl/src/com/liferay/portal/action/JSONServiceAction.java
+++ b/portal-impl/src/com/liferay/portal/action/JSONServiceAction.java
@rotty3000
rotty3000 / portlet.xml
Created November 2, 2011 13:31
PHP Portlet sample portlet.xml file
<?xml version="1.0"?>
<portlet-app
version="2.0"
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
>
<portlet>
<portlet-name>1</portlet-name>
@rotty3000
rotty3000 / my_portlet.jsp
Created November 23, 2011 16:25
custom portlet dynamic headers
request.setAttribute("MY_CUSTOM_HEADERS", ...);
@rotty3000
rotty3000 / portal_normal.vm
Created December 8, 2011 01:12 — forked from farmerbradllc/portal_normal.vm
Embeded Web Form Portlet into theme
#set ($locPortletId = "1_WAR_webformportlet_INSTANCE_dfer")
#set ($portletPreferencesFactoryUtil = $portal.getClass().forName("com.liferay.portlet.PortletPreferencesFactoryUtil"))
#set ($portletSetup = $portletPreferencesFactoryUtil.getLayoutPortletSetup($layout, $locPortletId))
#set ($temp = $portletSetup.setValue("portletSetupShowBorders", "true"))
#set ($temp = $portletSetup.setValue("title", "Sign up for SEVENCOGS updates!"))
#set ($temp = $portletSetup.setValue("description", " "))
#set ($temp = $portletSetup.setValue("subject", "Subscription"))
#set ($temp = $portletSetup.setValue("saveToDatabase", "true"))
Hi Ray,
During the migration to 6.1 we make sure to move all the files from the hook used by the portal to the DLHook. Then, in 6.1 we force the user to use DLHook (we have hardcoded that and we don't ready the portal.property anymore)
In order to trigger the migration of data the user must set this property before upgrading (you can also run the migration manually to DLHook before upgrading from the Control Panel):
#
# In versions prior to 6.1, the Image Gallery portlet supported persisting
# images via com.liferay.portal.image.DatabaseHook,
# com.liferay.portal.image.DLHook, or
@rotty3000
rotty3000 / liferay-hook.xml
Created December 14, 2011 14:45
localization hook
<?xml version="1.0"?>
<hook>
<language-properties>content/Language</language-properties>
</hook>
@rotty3000
rotty3000 / manifest.mf
Created December 16, 2011 15:48
jar manifest headers
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.1
Created-By: 1.6.0_22-b22 (Sun Microsystems Inc.)
Bundle-ManifestVersion: 2
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: Liferay, Inc.
Bundle-Version: 6.1.0
Export-Package: ...
Liferay-Portal-Code-Name: Paton
Liferay-Portal-Build-Date: Thu Dec 15 00:00:00 EST 2011