Changeset 639

Show
Ignore:
Timestamp:
11/17/06 14:04:27
Author:
crchemist
Message:

Remove qPloneComments skins.

Files:

Legend:

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

    r638 r639  
    3434     
    3535    DiscussionLayer = LAYER_DISCUSSION 
    36     if qi.isProductInstalled('qPloneComments'): 
    37         DiscussionLayer = LAYER_QCOMMENTS 
    3836    if qi.isProductInstalled('PloneFormMailer'): 
    3937        formmailer_layer = LAYER_FORMMAILER+'/'+plone_version 
     
    7775                if (l == skin) or (l.startswith(skin+'/')): 
    7876                    path.remove(l) 
     77 
    7978        skinstool.addSkinSelection(skinName, ','.join(path)) 
    8079 
  • qPloneCaptchas/trunk/README.txt

    r638 r639  
    1 qPloneCaptchas is simple captchas implementasion for Plone, designed for validation human input in unsecure forms. This is standalone implementation with static and dynamic captcha images, which does not depend on captchas.net services. 
     1qPloneCaptchas is simple captchas implementasion for Plone, designed for validation human input in unsecure forms. This is standalone implementation with static captcha images, which does not depend on captchas.net services. 
    22 
    33Supported Plone versions: 
     
    1414Install: 
    1515 
    16     * If qPloneCaptchas is expected to be used with qPloneComments or PloneFormMailer please make sure that qPloneCaptchas installed only after these products. 
     16If qPloneCaptchas is expected to be used with qPloneComments or PloneFormMailer please make sure that qPloneCaptchas installed only after these products. 
    1717 
    1818Authors: 
    1919 
    20     * Volodymyr Cherepanyak - chervol@quintagroup.com 
    21     * Mykola Kharechko - crchemist@quintagroup.com 
     20Volodymyr Cherepanyak - chervol@quintagroup.com 
     21Mykola Kharechko - crchemist@quintagroup.com 
    2222 
    2323Future: 
    24  
    25     * Options for captchas images generation 
     24* Dynamic captchas option implementation depending on PIL presence. 
     25* Options for captchas images generation 
  • qPloneCaptchas/trunk/__init__.py

    r638 r639  
    11from Products.CMFCore.DirectoryView import registerDirectory 
     2from Products.CMFCore.utils import ToolInit 
    23from AccessControl import allow_module 
    34import config 
     5import CaptchaTool 
    46allow_module('Products.qPloneCaptchas.utils') 
    57allow_module('Products.qPloneCaptchas.config') 
     
    1214 
    1315registerDirectory('skins', config.GLOBALS) 
     16tools = (CaptchaTool.CaptchaTool, ) 
     17def initialize(context): 
     18    ToolInit("CaptchaTool", tools=tools, icon=config.TOOL_ICON).initialize(context) 
  • qPloneCaptchas/trunk/config.py

    r638 r639  
    33CAPTCHAS_COUNT = 165 
    44LAYERS = ['captchas', 'plone_captchas'] 
    5 LAYER_QCOMMENTS = 'captchas_qcomments' 
    65LAYER_DISCUSSION = 'captchas_discussion' 
    76LAYER_FORMMAILER = 'captchas_ploneformmailer' 
    8 ALL_LAYERS = LAYERS + [LAYER_QCOMMENTS, LAYER_DISCUSSION, LAYER_FORMMAILER] 
     7ALL_LAYERS = LAYERS + [LAYER_DISCUSSION, LAYER_FORMMAILER] 
     8TOOL_ICON = 'tool.gif' 
     9TOOL_ID = 'portal_captchas' 
    910havePIL = True 
  • qPloneCaptchas/trunk/utils.py

    r638 r639  
    9191 
    9292def encrypt(key, s): 
    93     return Crypto.new(key).encrypt(s).encode("hex"
     93    return toHex(Crypto.new(key).encrypt(s)
    9494     
    9595def decrypt(key, s): 
    96     return Crypto.new(key).decrypt(s.decode("hex")) 
     96    return Crypto.new(key).decrypt(toStr(s)) 
    9797 
    9898def parseKey(s): 
     
    103103    context.portal_captchas.new(key) 
    104104 
     105def toHex(s): 
     106    lst = [] 
     107    for ch in s: 
     108        hv = hex(ord(ch)).replace('0x', '') 
     109        if len(hv) == 1: 
     110            hv = '0'+hv 
     111        lst.append(hv) 
     112     
     113    return reduce(lambda x,y:x+y, lst) 
     114 
     115def toStr(s): 
     116    return s and chr(atoi(s[:2], base=16)) + toStr(s[2:]) or ''