Changeset 650

Show
Ignore:
Timestamp:
11/23/06 09:50:11
Author:
crchemist
Message:

Added configlet.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • qPloneCaptchas/trunk/Extensions/Install.py

    r649 r650  
    3939    else: 
    4040        raise Exception("Error - Unsupported version. Suported versions: Plone 2.0.5-2.5") 
    41      
     41 
    4242    DiscussionLayer = LAYER_DISCUSSION 
    4343    if qi.isProductInstalled('PloneFormMailer'): 
     
    4646    discussion_layer = DiscussionLayer+'/'+plone_version 
    4747    Layers.append(discussion_layer) 
    48      
     48 
     49    # Add Configlet. Delete old version before adding, if exist one. 
     50    controlpanel_tool = getToolByName(self, 'portal_controlpanel') 
     51    controlpanel_tool.unregisterConfiglet(CONFIGLET_ID) 
     52    controlpanel_tool.registerConfiglet(id=CONFIGLET_ID, name=CONFIGLET_NAME, category='Products', 
     53                                        action='string:${portal_url}/%s' % CONFIGLET_ID, 
     54                                        appId=PRODUCT_NAME, permission=ManagePortal, imageUrl='group.gif') 
    4955 
    5056    out.write('Call setupSkin... \n') 
    5157    setupSkin(self, out, Layers) 
    52      
    53      
     58 
     59 
    5460def setupSkin(self, out, layers): 
    5561    """Setup skins""" 
  • qPloneCaptchas/trunk/config.py

    r649 r650  
    22PRODUCT_NAME = 'qPloneCaptchas' 
    33CAPTCHAS_COUNT = 165 
    4 LAYERS = ['captchas'
     4LAYERS = ['captchas', 'plone_captchas'
    55LAYER_DISCUSSION = 'captchas_discussion' 
    66LAYER_FORMMAILER = 'captchas_ploneformmailer' 
    7 LAYER_DYNAMIC_CAPTCHAS = 'plone_captchas
    8 LAYER_STATIC_CAPTCHAS = 'plone_captchas_static' 
     7LAYER_DYNAMIC_CAPTCHAS = 'plone_captchas/dynamic
     8LAYER_STATIC_CAPTCHAS = 'plone_captchas/static' 
    99ALL_LAYERS = LAYERS + [LAYER_DISCUSSION, LAYER_FORMMAILER, LAYER_STATIC_CAPTCHAS, LAYER_DYNAMIC_CAPTCHAS] 
    1010TOOL_ICON = 'tool.gif' 
    1111TOOL_ID = 'portal_captchas' 
     12CONFIGLET_ID = "prefs_captchas_setup_form" 
     13CONFIGLET_NAME = "qPloneCaptchas setup" 
    1214 
    1315try: