def migrateTo1100(context):
    setup_tool = getToolByName(context, 'portal_setup')
    setup_tool.runImportStepFromProfile(PROFILE_ID, 'plone.app.registry')
    logger.info('Migrated to version 0.2')
# -*- coding: utf-8 -*-

from zope.interface import Interface
from zope import schema

from collective.fbshare import messageFactory as _
from collective.fbshare import logger

# We customize some of the sc.social.like behavior in this way
try:
    from sc.social.like.interfaces import ISocialLikeLayer as BaseLayerInterface
    logger.info('sc.social.like found. collective.fbshare will override Facebook OpenGraph meta')
except ImportError:
    from zope.interface import Interface as BaseLayerInterface


class IFbShareBrowserLayer(BaseLayerInterface):
    """Marker interface for collective.fbshare products layer"""


class IFbShareSettings(Interface):
    """
    Settings used in the control panel for Facebook (opengraph) share
    """
    
    image_to_share = schema.Choice(
        title=_(u"Default site image to share"),
        description=_('help_image_to_share',
                      default=u"You can choose to provide a custom image or use the site logo.\n"
                              u"If you choose a custom image without providing it, it will not provide any og:image meta content."),
        required=True,
Beispiel #3
0
def uninstall(portal, reinstall=False):
    if not reinstall:
        # Don't want to delete all registry values if a Manager simply reinstall the product from ZMI
        setup_tool = portal.portal_setup
        setup_tool.runAllImportStepsFromProfile('profile-collective.fbshare:uninstall')
        logger.info("Uninstall done")
Beispiel #4
0
def migrateTo1100(context):
    setup_tool = getToolByName(context, 'portal_setup')
    setup_tool.runImportStepFromProfile(PROFILE_ID, 'plone.app.registry')
    logger.info('Migrated to version 0.2')