# -*- coding: utf-8 -*- # Copyright (c) 2011-2013 RelationWare, Benno Luthiger. All rights reserved. # See also LICENSE.txt from silva.core import conf as silvaconf from silva.core.conf.installer import DefaultInstaller from zope.interface import Interface _extensionName = "RwLayout" silvaconf.extensionName(_extensionName) silvaconf.extensionTitle("RelationWare Layout") silvaconf.extensionDepends(("SilvaDocument", "SilvaExternalSources")) from Products.PythonScripts.Utility import allow_module allow_module('Products.RwLayout.helpers') class IExtension(Interface): ''' RwLayout Extension ''' class RwLayoutInstaller(DefaultInstaller): def install_custom(self, root): pass def uninstall_custom(self, root): pass install = RwLayoutInstaller(_extensionName, IExtension)
# -*- coding: utf-8 -*- # Copyright (c) 2002-2013 Infrae. All rights reserved. # See also LICENSE.txt from silva.core import conf as silvaconf silvaconf.extensionName('silva.core.layout') silvaconf.extensionTitle('Silva Core Layout') silvaconf.extensionSystem()
# -*- coding: utf-8 -*- # Copyright (c) 2008-2013 Infrae. All rights reserved. # See also LICENSE.txt from silva.core import conf as silvaconf silvaconf.extensionName('BadExtension') silvaconf.extensionTitle('Bad Extension')
# -*- coding: utf-8 -*- # Copyright (c) 2008-2013 Infrae. All rights reserved. # See also LICENSE.txt from silva.core import conf as silvaconf silvaconf.extensionName('SimpleTestExtension') silvaconf.extensionTitle('Simple Test Extension') from silva.core.conf.installer import DefaultInstaller from zope.interface import Interface class ISimpleTestExtension(Interface): """The default installer use an interface to known if an extension is installed. So you need to define a specific interface for your extension. """ install = DefaultInstaller('SimpleTestExtension', ISimpleTestExtension)
# -*- coding: utf-8 -*- # Copyright (c) 2002-2013 Infrae. All rights reserved. # See also LICENSE.txt from silva.core import conf as silvaconf silvaconf.extensionName('silva.core.views') silvaconf.extensionTitle('Silva Core Views') silvaconf.extensionSystem() import zope.deferredimport zope.deferredimport.deprecated( 'Forms moved into silva.core.forms.', forms = 'silva.core.forms.forms', z3cforms = 'silva.core.forms.z3cforms')
# Copyright (c) 2011-2013 RelationWare. All rights reserved. # See also LICENSE.txt import AccessControl #from Products.SilvaExternalSources import install from zope.interface import Interface from silva.core.conf.installer import DefaultInstaller from silva.core import conf as silvaconf from Products.SilvaPhotoGallery.configuration import cs_container, dft_id, dft_title _extensionName = "SilvaPhotoGallery" silvaconf.extensionName(_extensionName) silvaconf.extensionTitle('Silva Photo Gallery') silvaconf.extensionDepends(["SilvaExternalSources"]) class IExtension(Interface): ''' SilvaPhotoGallery Extension ''' class GalleryInstaller(DefaultInstaller): def install_custom(self, root): folder = getattr(root, cs_container, root) if hasattr(folder.aq_inner.aq_explicit, dft_id): return constructor = getattr(folder.manage_addProduct['SilvaPhotoGallery'], 'manage_addPhotoGallery') if constructor:
from silva.core import conf as silvaconf from silva.core.conf.installer import DefaultInstaller from zope.interface import Interface from Products.SilvaExternalSources.CodeSourceService import INSTALLERS from Products.RwCSCollection.code_source.configure import code_sources, code_sources_derived pjoin = os.path.join _fs_cs_path = pjoin(package_home(globals()), 'code_source', 'plain') _cs_prefix = 'cs_rw_' logger = logging.getLogger('Products.RwCSCollection') _extensionName = "RwCSCollection" silvaconf.extensionName(_extensionName) silvaconf.extensionTitle("RelationWare Code Sources") silvaconf.extensionDepends(["RwLayout", "SilvaExternalSources"]) _cs_service = 'service_codesources' class IExtension(Interface): ''' RwCSCollection Extension ''' class RwCSCollectionInstaller(DefaultInstaller): def install_custom(self, root): install_code_sources(root, _fs_cs_path, code_sources, code_sources_derived) def uninstall_custom(self, root): delete_code_sources(root, code_sources_derived) delete_code_sources(root, code_sources)
# -*- coding: utf-8 -*- # Copyright (c) 2012 RelationWare. All rights reserved. # See also LICENSE.txt from zope.interface import Interface from silva.core.conf.installer import DefaultInstaller from silva.core import conf as silvaconf # from Products.Silva.install import add_fss_directory_view from Products.Silva import roleinfo _extensionName = "StaticSite" _meta_type = "Static Site" silvaconf.extensionName(_extensionName) silvaconf.extensionTitle("Static Site") silvaconf.extensionDepends(["Silva"]) class IExtension(Interface): """ StaticSite Extension """ class StaticSiteInstaller(DefaultInstaller): def install_custom(self, root): # TODO # add_fss_directory_view( # root.service_views, _extensionName, __file__, 'views') # also register views # registerViews(root.service_view_registry)
# Copyright (c) 2009-2010 Infrae. All rights reserved. # See also LICENSE.txt # $Id$ from silva.core import conf as silvaconf silvaconf.extensionName('silva.searchandreplace') silvaconf.extensionTitle('Silva Search and Replace') silvaconf.extensionSystem()
# Copyright (c) 2010 Infrae. All rights reserved. # See also LICENSE.txt # $Id$ from silva.core import conf as silvaconf silvaconf.extensionName('silva.security.logging') silvaconf.extensionTitle('Silva Security Logging') silvaconf.extensionSystem()
# -*- coding: utf-8 -*- # Copyright (c) 2008-2013 Infrae. All rights reserved. # See also LICENSE.txt from silva.core import conf as silvaconf silvaconf.extensionName('TestExtension') silvaconf.extensionTitle('Test Extension')
# Python import os # Zope #TODO: package_home is deprecated, import from App.Common instead from Globals import package_home from zope.interface import Interface # Silva from silva.core.conf.installer import DefaultInstaller from silva.core import conf as silvaconf _extensionName = "RelationsLayout" silvaconf.extensionName(_extensionName) silvaconf.extensionTitle('Relations Layout') silvaconf.extensionDepends('RwLayout') pjoin = os.path.join metadatasets = [('relations-layout', 'relations.xml', ('Silva Root', 'Silva Publication')), ] class IExtension(Interface): ''' RelationsLayout Extension ''' class RelationsLayoutInstaller(DefaultInstaller):