Domanda

I'm using liferay-6.2.0-ce-ga1 and I wanted to turn on captcha for new message board posts. I'm fairly new with liferay and it's hooks concept.

To add captcha I've done following things:

  1. Created a new hook plugin project
  2. Created portal.properties file in my docroot/WEB-INF/src which is in my classpath
  3. Added captcha.check.portlet.message_boards.edit_message=true to the portal.properties
  4. Updated liferay-hook.xml with following entry: <portal-properties>portal.properties</portal-properties>
  5. Deployed hook to the liferay server:

    08:42:59,284 INFO  [ContainerBackgroundProcessor[StandardEngine[Catalina]]][HookHotDeployListener:687] Registering hook for msgboard-hook
    Loading file:/home/disper/dev/tools/liferay-portal-6.2.0-ce-ga1/tomcat-7.0.42/temp/10-msgboard-hook/WEB-INF/classes/portal.properties
    08:42:59,299 INFO  [ContainerBackgroundProcessor[StandardEngine[Catalina]]][HookHotDeployListener:814] Hook for msgboard-hook is available for use
    Dec 27, 2013 8:42:59 AM org.apache.catalina.core.StandardContext reload
    INFO: Reloading Context with name [/msgboard-hook] is completed
    

But the captcha isn't showing... What am I doing wrong?

È stato utile?

Soluzione

All portal properties can not be overridden with hook feature.

You can find out supported properties those can be overriden in dtd file :

liferay-portal-src-6.2.0-ce-ga1\definitions\liferay-hook_6_2_0.dtd

To achieve captcha on message board edit screen, you have to provide

captcha.check.portlet.message_boards.edit_message=true

in portal-ext.properties file. You have to keep portal-ext.properties file parallel to tomcat folder.

I have verified this, its working fine.

Regards,

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top