source: products/qPloneCaptchas/trunk/skins/plone_captchas/getCaptchaType.py

Last change on this file was 1, checked in by myroslav, 14 years ago

Building directory structure

  • Property svn:eol-style set to native
File size: 585 bytes
Line 
1## Script (Python) "getCaptchaType"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=actions=None
8##title=
9##
10from Products.CMFCore.utils import getToolByName
11import string
12skinsTool = getToolByName(context, 'portal_skins')
13default_skin = skinsTool.getDefaultSkin()
14path = skinsTool.getSkinPath(default_skin)
15path = map( string.strip, string.split( path,',' ) )
16
17if 'plone_captchas/static' in path:
18    return 'static'
19elif 'plone_captchas/dynamic' in path:
20    return 'dynamic'
21else:
22    return None
Note: See TracBrowser for help on using the repository browser.