Installation
============

Buildout
--------

To install quintagroup.plonecaptchas to your buildout-based project:

* Add ``quintagroup.plonecaptchas`` to the list of eggs to install::

    [buildout]
    ...
    eggs =
        ...
        quintagroup.plonecaptchas
       
* Tell the plone.recipe.zope2instance recipe to install a ZCML slug::

    [instance]
    recipe = plone.recipe.zope2instance
    ...
    zcml =
        quintagroup.plonecaptchas
      
* Re-run buildout, e.g. with::

    $ ./bin/buildout
    
* Restart the Zope server, e.g with the following command in the terminal::

   $ ./bin/instance restart
   
* Install ``Plone Captchas`` with Quickinstaller in Plone (Site Setup -> Add/Remove Products). 
``Quintagroup Captcha Core`` will automatically be installed as dependency.
        
	
Traditional Zope 2 instance
---------------------------

To install quintagroup.plonecaptchas into the global Python environment (or a workingenv),
using a traditional Zope 2 instance, you can do this:

* Copy ``quintagroup`` folder to your instance's ``/lib/python`` directory.

* Create a file called ``quintagroup.plonecaptchas-configure.zcml`` in your instance's ``/etc/package-includes`` directory. The file
should only contain this::

    <include package="quintagroup.plonecaptchas" />

* Restart the Zope server, for example with the following command in the terminal::

   $ ./bin/zopectl restart

* Install ``Plone Captchas`` with Quickinstaller in Plone (Site Setup -> Add/Remove Products). 
``Quintagroup Captcha Core`` will automatically be installed as dependency.


Protecting Register form with captcha
-------------------------------------

quintagroup.plonecaptchas does not automatically plug to Plone's default registration
(/@@register), to protect register form with captcha - you must follow the instructions here:
http://projects.quintagroup.com/products/wiki/quintagroup.plonecaptchas#JoinForm


Migration notes
===============

Following migration notes must be done only if you protect join (registration) form with captcha.
All steps performed in ZMI (<portal>/manage_main).

=== Migration from Plone-3.X to Plone-3.Y ===

If you have Plone-3.X site with installed quintagroup.plonecaptchas v3 package, and want to migrate site to Plone-3.Y, you must perform following steps:
  * migrate your plone site to Plone-3.Y
  * update *Directory:* property of `<portal>/portal_skins/captchas_join_form` Filesystem Directory View' - go to `<portal>/portal_skins/captchas_join_form/manage_propertiesForm` and update value of the *Directory* property according to the following rooles:
    *  for Plone-3.0: quintagroup.plonecaptchas:skins/captchas_join_form_30
    *  for Plone-3.1 or Plone-3.2: quintagroup.plonecaptchas:skins/captchas_join_form_31_32
    *  for Plone-3.3+: quintagroup.plonecaptchas:skins/captchas_join_form_33
    

=== Migration from Plone-3 to Plone-4 ===

If you have Plone-3 site with installed quintagroup.plonecaptchas v3 package, and want to migrate site to Plone-4, you must perform following steps:
  * update plone-4 buildout/instance - to use quintagroup.plonecaptchas v4 package instead of quintagroup.plonecaptchas v3
  * migrate your plone site to Plone-4
  * remove `<portal>/portal_skins/captchas_join_form` Filesystem Directory View'
  * remove *captchas_join_form* layer from all skins in `<portal>/portal_skins/manage_propertiesForm`
  * run all steps with "Plone Captchas Register Forms for Plone 4" upgrade profile - go to `<portal>/portal_setup/manage_importSteps`, select mentioned profile and push "Import all steps" button.

