Logo Search packages:      
Sourcecode: zope-cmfforum version File versions  Download package

def Install::install (   self  ) 

Register the Forum Skins with portal_skins and friends 

Definition at line 73 of file Install.py.

00073                  :
    """ Register the Forum Skins with portal_skins and friends """
    skinstool = getToolByName(self, 'portal_skins')
    wf_tool = getToolByName(self, 'portal_workflow')

    out = StringIO()
    out.write( 'CMFForum installation tool v' + str(__version__) + '.\n')

    install_ForumSkins(self, out)

    # Register with the typestool manually instead of with manage_addTypeInformation
    # as the classes were not registered with utils.ContentInit in __init__.py
    types_tool = getToolByName(self, 'portal_types')
    for t in (Forum.factory_type_information,Post.factory_type_information):
        if t['id'] not in types_tool.objectIds():
            cfm = apply(ContentFactoryMetadata, (), t)
            types_tool._setObject(t['id'], cfm)
            out.write('Registered %s with the types tool\n' % t['id'])
        else:
            out.write('Skipping "%s" - already in types tool\n' % t['id'])

    # Remove workflows for Forum and Post
    wf_tool.setChainForPortalTypes( ('Forum','Post'), [])
    out.write('Removed workflow for Forum and Post')
            
    return out.getvalue()


Generated by  Doxygen 1.6.0   Back to index