Commits

Davi Medeiros committed ba16867

Adds Likebox

  • Participants
  • Parent commits ea8cec7

Comments (0)

Files changed (6)

ploneorgbr/portal/policy/config.py

 # PRODUCTS format
 # (name,locked,hidden,install,profile,runProfile)
 
-PRODUCTS=[
-         ('collective.contentrules.mailtogroup',0,1,1,'collective.contentrules.mailtogroup:default',1),
-         ('collective.contentrules.mailtolocalrole',0,1,1,':collective.contentrules.mailtolocalroledefault',1),
-         ('collective.js.jqueryui',0,1,0,'collective.js.jqueryui:default',0),
-         ('collective.recaptcha',0,0,1,'collective.recaptcha:default',1),
-         ('ploneorgbr.portal.policy',0,1,0,'ploneorgbr.portal.policy:uninstall',0),
-         ('ploneorgbr.portal.theme',0,1,1,'ploneorgbr.portal.theme:default',1),
-         ('ploneorgbr.portal.theme',0,1,0,'ploneorgbr.portal.theme:uninstall',0),
-         ('ploneorg.kudobounty',0,0,1,'ploneorg.kudobounty:default',1),
-         ('ploneorg.kudobounty',0,0,0,'ploneorg.kudobounty:portlets',0),
-         ('sc.social.like',0,0,1,'sc.social.like:default',1),
-         ('sc.social.like',0,1,0,'sc.social.like:uninstall',0),
-         ('Products.Doormat',0,0,1,'Products.Doormat:default',1),
-         ('Products.Doormat',0,1,0,'Products.Doormat:uninstall',0),
-         ('Products.Carousel',0,0,1,'Products.Carousel:default',1),
-         ('Products.PloneFormGen',0,0,1,'Products.PloneFormGen:default',1),
-         ('Products.PloneHelpCenter',0,0,1,'Products.PloneHelpCenter:default',1),
-         #('Products.PloneSoftwareCenter',0,1,1,'Products.PloneSoftwareCenter:default',1),
-         ('Products.Poi',0,1,0,'Products.Poi:default',1),
+PRODUCTS = [
+    ('collective.contentrules.mailtogroup',0,0,1,'collective.contentrules.mailtogroup:default',1),
+    ('collective.contentrules.mailtolocalrole',0,0,1,':collective.contentrules.mailtolocalroledefault',1),
+    ('collective.js.jqueryui',0,0,0,'collective.js.jqueryui:default',0),
+    ('collective.recaptcha',0,0,1,'collective.recaptcha:default',1),
+    ('collective.simplesocial',0,0,1,'collective.simplesocial:default',1),
+    ('collective.watcherlist',0,0,1,'collective.watcherlist:default',1),
+    ('ploneorgbr.portal.policy',0,1,0,'ploneorgbr.portal.policy:uninstall',0),
+    ('ploneorgbr.portal.theme',0,0,1,'ploneorgbr.portal.theme:default',1),
+    ('ploneorgbr.portal.theme',0,0,0,'ploneorgbr.portal.theme:uninstall',0),
+    ('ploneorg.kudobounty',0,0,1,'ploneorg.kudobounty:default',1),
+    ('ploneorg.kudobounty',0,0,0,'ploneorg.kudobounty:portlets',0),
+    ('sc.social.like',0,0,1,'sc.social.like:default',1),
+    ('sc.social.like',0,0,0,'sc.social.like:uninstall',0),
+    ('Products.Doormat',0,0,1,'Products.Doormat:default',1),
+    ('Products.Doormat',0,0,0,'Products.Doormat:uninstall',0),
+    ('Products.Carousel',0,0,1,'Products.Carousel:default',1),
+    ('Products.PloneFormGen',0,0,1,'Products.PloneFormGen:default',1),
+    ('Products.PloneHelpCenter',0,0,1,'Products.PloneHelpCenter:default',1),
+    #('Products.PloneSoftwareCenter',0,0,1,'Products.PloneSoftwareCenter:default',1),
+    ('Products.Poi',0,0,0,'Products.Poi:default',1),
 ]

ploneorgbr/portal/policy/dependencies.zcml

     i18n_domain="ploneorgbr.portal.policy">
 
   <include package="collective.recaptcha" />
+  <include package="collective.simplesocial" />
   <include package="collective.contentrules.mailtogroup" />
   <include package="collective.contentrules.mailtolocalrole" />
   <include package="ploneorgbr.portal.theme" />

ploneorgbr/portal/policy/upgrades/configure.zcml

     <!-- Upgrades-->
     <genericsetup:upgradeStep
         title="Upgrade for ploneorgbr.portal.policy"
-        description=""
-        source="0.0"
-        destination="1.0"
+        description="Initial upgrade step for Plone.org.br"
+        source="0"
+        destination="1000"
         sortkey="1"
-        handler="ploneorgbr.portal.policy.upgrades.to01.upgrade0to1"
+        handler="ploneorgbr.portal.policy.upgrades.to1000.upgrade0to1000"
         profile="ploneorgbr.portal.policy:default" />
         
 </configure>

ploneorgbr/portal/policy/upgrades/to01.py

-# -*- coding: utf-8 -*-
-from zope import component
-import logging
-from Products.CMFCore.utils import getToolByName
-from Products.GenericSetup import interfaces as gsinterfaces
-from Products.GenericSetup.upgrade import listUpgradeSteps
-
-from Products.ZCatalog.ProgressHandler import ZLogHandler
-
-from ploneorgbr.portal.policy.config import PRODUCTS
-
-def upgrade0to1(context):
-    """ Upgrade to version 1.0
-    """
-    setup = getToolByName(context, 'portal_setup')
-    migration = getToolByName(context,'portal_migration')
-    catalog = getToolByName(context,'portal_catalog')
-    portal_properties = getToolByName(context,'portal_properties')
-    qi = getToolByName(context,'portal_quickinstaller')
-
-    # Install dependencies for this upgrade
-    # List package names
-    packages = [
-                'ploneorgbr.portal.theme',
-                'Products.Doormat',
-                'Products.Carousel',
-                'Products.PloneHelpCenter',
-                #'Products.PloneSoftwareCenter',
-                #'Products.Poi',
-                'sc.social.like',
-
-    ]
-    # (name,locked,hidden,install,profile,runProfile)
-    dependencies = [(name,locked,hidden,profile) for name,locked,hidden,install,profile,runProfile in PRODUCTS if ((name in packages) and install)]
-
-    for name,locked,hidden,profile in dependencies:
-        qi.installProduct(name, locked=locked, hidden=hidden, profile=profile)
-
-    # If we have blob and imaging installed
-    # uncomment lines bellow
-    # profiles = ['profile-plone.app.blob:file-replacement',
-    #            'profile-plone.app.blob:image-replacement',
-    #            ]
-    # for profile in profiles:
-    #     setup.runAllImportStepsFromProfile(profile)

ploneorgbr/portal/policy/upgrades/to1000.py

+# -*- coding: utf-8 -*-
+from zope import component
+import logging
+from Products.CMFCore.utils import getToolByName
+from Products.GenericSetup import interfaces as gsinterfaces
+from Products.GenericSetup.upgrade import listUpgradeSteps
+
+from Products.ZCatalog.ProgressHandler import ZLogHandler
+
+from ploneorgbr.portal.policy.config import PRODUCTS
+
+def upgrade0to1000(context):
+    """ Upgrade from version 0 to version 1000
+    """
+    setup = getToolByName(context, 'portal_setup')
+    migration = getToolByName(context,'portal_migration')
+    catalog = getToolByName(context,'portal_catalog')
+    portal_properties = getToolByName(context,'portal_properties')
+    qi = getToolByName(context,'portal_quickinstaller')
+
+    # Install dependencies for this upgrade
+    # List package names
+    packages = [
+        'Products.Carousel',
+        'Products.Doormat',
+        'Products.PloneHelpCenter',
+        'ploneorg.kudobounty',
+        'Products.PloneFormGen',
+        #'Products.PloneSoftwareCenter',
+        #'Products.Poi',
+        'collective.contentrules.mailtogroup',
+        'collective.contentrules.mailtolocalrole',
+        'collective.recaptcha',
+        'collective.simplesocial',
+        'collective.watcherlist',
+        'ploneorgbr.portal.theme',
+        'sc.social.like',
+    ]
+
+
+    # (name,locked,hidden,install,profile,runProfile)
+    dependencies = [(name,locked,hidden,profile) for name,locked,hidden,install,profile,runProfile in PRODUCTS if ((name in packages) and install)]
+
+    for name,locked,hidden,profile in dependencies:
+        qi.installProduct(name, locked=locked, hidden=hidden, profile=profile)
+
+    # If we have blob and imaging installed
+    # uncomment lines bellow
+    # profiles = ['profile-plone.app.blob:file-replacement',
+    #            'profile-plone.app.blob:image-replacement',
+    #            ]
+    # for profile in profiles:
+    #     setup.runAllImportStepsFromProfile(profile)
           'collective.contentrules.mailtogroup==1.2',
           'collective.contentrules.mailtolocalrole==1.1',
           'collective.recaptcha==1.1.3',
+          'collective.simplesocial==1.6',
           'collective.watcherlist==0.3',
           #'jarn.xmpp.collaboration',
           'sc.social.like==0.9',