## Script (Python) "evanescent_content"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=arg=0,usepicture=0,showsecret=0,list=0
##title=
##
if list:
#lines below have < and > in them and won't display correctly.
print ''
print script.document_src()
print '
'
return printed
nuses=3 # change URL for secret image after 3 usages
def renew():
global newvalue
newvalue = int(random.random()*10000)
try: context.manage_delProperties(['secretUrl'])
except: pass
context.manage_addProperty('secretUrl', newvalue, 'int', )
def secretUsed():
''' update count, renew secret after a few uses '''
try: uses = context.secretUses+1
except: uses=0
if (uses>=nuses):
renew()
uses=0
try: context.manage_delProperties(['secretUses'])
except: pass
context.manage_addProperty('secretUses', uses, 'int', )
def getSecret():
''' update count, renew secret after a few uses '''
try: return context.secretUrl
except:
renew()
return context.secretUrl
if showsecret: return context.pics.troop_movementsi.data
if not context.hasProperty("secretUrl"):
renew()
if int(arg)>0:
if int(arg) == int(context.secretUrl):
secretUsed()
if not usepicture:
return "secretData"
# return secret picture
#line below has < and > in them and won't display correctly.
return ''+str(context.pics.troop_movementsi)+'
Image that violates the DMCA.
Now click reload a few times. The URL doesn\'t change.'
#
s = script.absolute_url()+'?arg='+str(context.secretUrl)+'&usepicture=1'
if not usepicture:
print "harmlessData, the secret code is now "+str(context.secretUrl)+". Can can use it %d times."%nuses
print
print "Try: "
#line below has < and > in them and won't display correctly.
print '%s'%(s,s)
return printed
#line below has < and > in them and won't display correctly.
return ''+str(context.pics.schnoodle_facei)+'
No secrets here. Secret URL now: %s'%(s,s)+''