ZEXP((U App.ProductqUProductqtqNt.}q(UBannerFolder_add_permissionq(Upq(UApp.PermissionqU PermissionqttQUidq U BannerFolderq U__ac_local_roles__q }q Ulaloq ]qUOwnerqasU_objectsq(}q(U meta_typeqU DTML MethodqUidqUAdBanner_addFormqu}q(hhhU AdBanner_addqu}q(hUZope PermissionqhUAdBanner_add_permissionqu}q(hU Zope FactoryqhUAdBanner_factoryqu}q(hhhUBannerFolder_addFormqu}q (hhhUBannerFolder_addq!u}q"(hhhUBannerFolder_add_permissionq#u}q$(hhhUBannerFolder_factoryq%u}q&(U meta_typeq'UZ Classq(Uidq)UAdBannerq*u}q+(U meta_typeq,UZ Classq-Uidq.U BannerFolderq/utU BannerFolderq0(Uq1(UZClasses.ZClassq2UZClassq3ttQUBannerFolder_addFormq4(Urq5(UOFS.DTMLMethodq6U DTMLMethodq7ttQUversionq8U0.4q9UAdBannerq:(Uq;(h2UZClassq(hU Permissionq?ttQU AdBanner_addq@(UaqA(h6U DTMLMethodqBttQUAdBanner_addFormqC(U_qD(h6U DTMLMethodqEttQUAdBanner_factoryqF(U`qG(U App.FactoryqHUFactoryqIttQUtitleqJUBanner Advertising ProductqKUconfigurable_objects_qL]qMUBannerFolder_addqN(UsqO(h6U DTMLMethodqPttQUBannerFolder_factoryqQ(UtqR(hHUFactoryqSttQu.p((UApp.PermissionqU PermissionqtqNt.}q(UtitleqU#BannerFolder constructor permissionqUidqUBannerFolder_add_permissionqUnameq UAdd Advertising Banner Foldersq U__ac_local_roles__q }q Ulaloq ]qUOwnerqasu.e((UZClasses.ZClassqUZClassqtqNt.}q(U_permissionMapperqcAccessControl.PermissionMapping PM qNRq}q(U"_Create_class_instances_Permissionq U*_Add_Advertising_Banner_Folders_Permissionq U_Change_permissions_Permissionq U_Change_permissions_Permissionq U_View_Permissionq U_View_PermissionqU'_Access_contents_information_PermissionqU'_Access_contents_information_PermissionqU_Delete_objects_PermissionqU_Delete_objects_PermissionqU_Manage_properties_PermissionqU_Manage_properties_PermissionqubU_zclass_propertysheets_classqUqQUidqU BannerFolderqU_zbasesq]q(cZClasses.ZClass ZObject qcProducts.Renderable _ZClass_for_Renderable qcZClasses.ObjectManager ZObjectManager qeU__ac_local_roles__q}qUlaloq ]q!UOwnerq"asU_zclass_q#Uq$QUtitleq%UAdvertising Banner Folderq&Upropertysheetsq'(Uq(Uq)QtQu.rT((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(UtitleqU#BannerFolder constructor input formqUrawqT{ Add Advertising Banner Folder

Add Advertising Banner Folder

Id
qU__ac_local_roles__q }q Ulaloq ]q UOwnerq asUglobalsq}qU__name__qUBannerFolder_addFormqU_varsq}qu.@((UZClasses.ZClassqUZClassqtqNt.}q(U_permissionMapperqcAccessControl.PermissionMapping PM qNRq}q(U_View_Permissionq U_View_Permissionq U"_Create_class_instances_Permissionq U*_Add_Advertising_Banner_Folders_Permissionq U_Manage_properties_Permissionq U_Manage_properties_PermissionqU_Change_permissions_PermissionqU_Change_permissions_PermissionqU_Delete_objects_PermissionqU_Delete_objects_PermissionqU'_Access_contents_information_PermissionqU'_Access_contents_information_PermissionqubU_zclass_propertysheets_classqUqQUidqUAdBannerqU_zbasesq]q(cZClasses.ZClass ZObject qcProducts.Renderable _ZClass_for_Renderable qcProducts.OFSP _ZClass_for_Image qeU__ac_local_roles__q}qUlaloq ]q!UOwnerq"asU_zclass_q#Uq$QUtitleq%UUpropertysheetsq&(Uq'Uq(QtQu.^((UApp.PermissionqU PermissionqtqNt.}q(UtitleqUAdBanner constructor permissionqUidqUAdBanner_add_permissionqUnameq UAdd Advertising Bannersq U__ac_local_roles__q }q Ulaloq ]qUOwnerqasu.a((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(UtitleqUAdBanner constructorqUrawqT. Add AdBanner We add the new object by calling the class in a with tag. Not only does this get the thing added, it adds the new thing's attributes to the DTML name space, so we can call methods to initialize the object. You can ad code that modifies the new instance here. For example, if you have a property sheet that you want to update from form values, you can call it here: Now we need to return something. We do this via a redirect so that the URL is correct. Unfortunately, the way we do this depends on whether we live in a product or in a class. If we live in a product, we need to use DestinationURL to decide where to go. If we live in a class, DestinationURL won't be available, so we use URL2. qU__ac_local_roles__q }q Ulaloq ]q UOwnerq asUglobalsq}qU__name__qU AdBanner_addqU_varsq}qu._T((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(UtitleqUAdBanner constructor input formqUrawqT Add Advertising Banner

Add Advertising Banner

Id
URL
Allowed views
Image
Alt string

qU__ac_local_roles__q }q Ulaloq ]q UOwnerq asUglobalsq}qU__name__qUAdBanner_addFormqU_varsq}qu.`((U App.FactoryqUFactoryqtqNt.}q(UtitleqUAdBanner factoryqUidqUAdBanner_factoryqUinitialq UAdBanner_addFormq U object_typeq UAdvertising Bannerq U__ac_local_roles__q }qUlaloq]qUOwnerqasU permissionqUAdd Advertising Bannersqu.s((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(UtitleqUBannerFolder constructorqUrawqT Add BannerFolder We add the new object by calling the class in a with tag. Not only does this get the thing added, it adds the new thing's attributes to the DTML name space, so we can call methods to initialize the object. You can ad code that modifies the new instance here. For example, if you have a property sheet that you want to update from form values, you can call it here: Now we need to return something. We do this via a redirect so that the URL is correct. Unfortunately, the way we do this depends on whether we live in a product or in a class. If we live in a product, we need to use DestinationURL to decide where to go. If we live in a class, DestinationURL won't be available, so we use URL2. qU__ac_local_roles__q }q Ulaloq ]q UOwnerq asUglobalsq}qU__name__qUBannerFolder_addqU_varsq}qu.t((U App.FactoryqUFactoryqtqNt.}q(UtitleqUBannerFolder factoryqUidqUBannerFolder_factoryqUinitialq UBannerFolder_addFormq U object_typeq UAdvertising Banner Folderq U__ac_local_roles__q }qUlaloq]qUOwnerqasU permissionqUAdd Advertising Banner Foldersqu. (cExtensionClass ExtensionClass q(U BannerFolder_PropertySheetsClassq(cZClasses.ZClass PersistentClass qcZClasses.Property ZInstanceSheets qtq}q(UiconqUU _p_changedqKU__doc__q UBannerFolder Property Sheetsq U_p_oidq Uq U __module__q Nutqt.N.@(cExtensionClass ExtensionClass q(U BannerFolderq(cZClasses.ZClass PersistentClass qcProducts.Renderable.Renderable Renderable qcZClasses.ObjectManager ObjectManager qcOFS.SimpleItem SimpleItem qtq}q(Uiconq U;Control_Panel/Products/BannerFolder/BannerFolder/ziconImageq U _p_changedq KU__doc__q U BannerFolderq U meta_typesq(}q(U permissionqUAdd Advertising BannersqUnameqUAdvertising BannerqUproductqU BannerFolderqUactionqU/manage_addProduct/BannerFolder/AdBanner_factoryqu}q(U permissionqU Add Documents, Images, and FilesqUnameqU DTML MethodqUproductqUOFSPqUactionqU manage_addProduct/OFSP/methodAddq utq!U_p_oidq"Uq#U meta_typeq$UAdvertising Banner Folderq%Upropertysheetsq&(Uq'Uq(QtQU ziconImageq)(Uq*(U OFS.Imageq+UImageq,ttQUisPrincipiaFolderishq-UYU__ac_permissions__q.)Urenderq/cZClasses.Method MW q0NRq1}q2U$_ZClassMethodPermissionMapperMethod_q3(Uq4(U"Products.PythonMethod.PythonMethodq5U PythonMethodq6ttQsbU _p_serialq7U/ Dq8U __module__q9U*JPKBNN0kBp2JEJtHobe2wg==q:utq;t.N.(cExtensionClass ExtensionClass q(U!BannerFolder_ZPropertySheetsClassq(cZClasses.ZClass PersistentClass qcOFS.PropertySheets PropertySheets qcZClasses.ObjectManager ZObjectManagerPropertySheets qcZClasses.ZClass ZClassSheets qcApp.PersistentExtra Persistent qtq}q (Uiconq UU _p_changedq KU__doc__q U!BannerFolder_ZPropertySheetsClassq U_p_oidqUqU __module__qNutqt.N.(UqQNt.}q(Ucommonq(Uq(UZClasses.PropertyqUZInstanceSheetsSheetqttQUmethodsq(Uq(UZClasses.Methodq UZClassMethodsSheetq ttQu.(cExtensionClass ExtensionClass q(UAdBanner_PropertySheetsClassq(cZClasses.ZClass PersistentClass qcZClasses.Property ZInstanceSheets qtq}q(UiconqUU _p_changedqKU__doc__q UAdBanner Property Sheetsq Uad_infoq (Uq (UZClasses.Propertyq UZInstanceSheetqttQU__propset_attrs__q(Uad_infoqtqU_p_oidqUqU __module__qNU _p_serialqU/w qutqt.N.(cExtensionClass ExtensionClass q(UAdBannerq(cZClasses.ZClass PersistentClass qcProducts.Renderable.Renderable Renderable qcOFS.Image Image qcOFS.SimpleItem SimpleItem qtq}q(Uiconq U7Control_Panel/Products/BannerFolder/AdBanner/ziconImageq U _p_changedq KU__doc__q UAdBannerq U__ac_permissions__q)UhitqcZClasses.Method MW qNRq}qU$_ZClassMethodPermissionMapperMethod_q(U q(UOFS.DTMLMethodqU DTMLMethodqttQsbU_p_oidqUqU alt_stringqU&Please click here to support this siteqU meta_typeqUAdvertising BannerqUhit_URLqUhttp://www.zope.org/qUpropertysheetsq(Uq Uq!QtQU __module__q"U*/z19MlDlV7e7P0QHV0lJ5A==q#Umanage_optionsq$(}q%(Ulabelq&UAdvertising Infoq'Uactionq(Upropertysheets/ad_info/manageq)u}q*(h&UUploadq+h(Umanage_uploadFormq,u}q-(h&U Propertiesq.h(Umanage_propertiesFormq/u}q0(h&UViewq1h(Uview_image_or_fileq2u}q3(h&USecurityq4h(U manage_accessq5utq6U ziconImageq7(Uq8(U OFS.Imageq9UImageq:ttQUremaining_viewsq;KUviewsqUstatsq?hNRq@}qAU$_ZClassMethodPermissionMapperMethod_qB(U qC(hU DTMLMethodqDttQsbUhitsqEKUrenderqFhNRqG}qHU$_ZClassMethodPermissionMapperMethod_qI(UqJ(hU DTMLMethodqKttQsbutqLt.N.K(cExtensionClass ExtensionClass q(UAdBanner_ZPropertySheetsClassq(cZClasses.ZClass PersistentClass qcOFS.PropertySheets PropertySheets qhcZClasses.ZClass ZClassSheets qcApp.PersistentExtra Persistent qtq}q(Uiconq UU _p_changedq KU__doc__q UAdBanner_ZPropertySheetsClassq U_p_oidq UqU __module__qNutqt.N.(UqQNt.}q(Ucommonq(Uq(UZClasses.PropertyqUZInstanceSheetsSheetqttQUmethodsq(Uq(UZClasses.Methodq UZClassMethodsSheetq ttQu.(UqQNt.}q.((U OFS.ImageqUImageqtqNt.}q(UsizeqKUdataqUGIF89aPPP@@@@@!Made with GIMP!,X#dI `oޢ<|vS1  ARhRQ bB?p{Mpt"!;qU__name__qU ziconImageq Utitleq UU content_typeq U image/gifq U preconditionq UUwidthqU16qUheightqU16qu.((U"Products.PythonMethod.PythonMethodqU PythonMethodqtqNt.}q(U func_codeq(cProducts.PythonMethod.PythonMethod AnObject qoq}q(U co_argcountq KU co_varnamesq (Uselfq UREQUESTq Ukeysq UbannerqU bannerobjqUbanneridqU$guardqtqubU_paramsqUself, REQUEST, **keysqUidqUrenderqU__ac_local_roles__q}qUlaloq]qUOwnerqasU_tq(UrenderqN(KKKK Tct}t}x| oti|d}|ddjo||d} |idjo  t}n> |idjo* |iii h|idd<n|o*|iii h|i dd<nn||d}qW|ddjo5d |i |df}d |||i fSnt|SdSq(NU_objectsqU meta_typeq UAdvertising Bannerq!Uidq"KKUremaining_viewsq#Uviewsq$U%s/%sq%U5%sq&t(UNoneq'hUwhrandomq(Uchoiceq)h hh#Upropertysheetsq*Uad_infoq+Umanage_changePropertiesq,h$h"hU alt_stringq-Ustrq.U$guardq/t(h h h hhhh/tUq0hKU"   * .q1tN}q2tq3U_bodyq4T`banner = None while not banner: bannerobj = whrandom.choice (self['_objects']) if bannerobj['meta_type'] == 'Advertising Banner': banner = self[bannerobj['id']] if banner.remaining_views == 0: banner = None elif banner.remaining_views > 0: banner.propertysheets.ad_info.manage_changeProperties ({ 'remaining_views': banner.remaining_views - 1 }) if banner: banner.propertysheets.ad_info.manage_changeProperties ({ 'views': banner.views + 1, }) else: banner = self[bannerobj['id']] #banner = banner + `keys` #banner = str (keys['debian_banner']) #banner = whrandom.choice (objectValues()) if bannerobj['meta_type'] == 'Advertising Banner': bannerid = '%s/%s' % (self.id, bannerobj['id']) return ('%s' % (bannerid, bannerid, banner.alt_string)) else: return str (banner)q5Uwarningsq6]q7Uerrorsq8]q9Utitleq:UU _proxy_rolesq;(UManagerqU func_defaultsq?Nu.9((UZClasses.PropertyqUZInstanceSheetsSheetqtqNt.}q.((UZClasses.MethodqUZClassMethodsSheetqtqNt.}q(U_mdq}qUidqUmethodsqU_objectsq (}q (U meta_typeq U Python Methodq Uidq Urender qutu.|((UZClasses.PropertyqUZInstanceSheetqtqNt.}q(U_mdq}qU_baseq(Uq(hU ZCommonSheetq ttQUidq Uad_infoq u. ((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(UtitleqUUrawqU{ qU__ac_local_roles__q}q Ulaloq ]q UOwnerq asUglobalsq }qU__name__qUhitqU_varsq}qu.(UqQNt.}q.((U OFS.ImageqUImageqtqNt.}q(UsizeqKUdataqUGIF89aPPP@@@@@!Made with GIMP! ,A#d9 h*Kj(B@2pL7 3m(`A!l:CsuLի3er_mZut;qU__name__qU ziconImageq Utitleq UU content_typeq U image/gifq U preconditionq UUwidthqU16qUheightqU16qu. ((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(UtitleqUUrawqT!

banner statistics

Unlimited views remaining views
views and hits since last reset qU__ac_local_roles__q}q Ulaloq ]q UOwnerq asUglobalsq }qU__name__qUstatsqU_varsq}qu.*((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUlaloq]qUOwnerq asU__name__q Urenderq Utitleq UU _proxy_rolesq (UManagerqUOwnerqtqUglobalsq}qUrawqU_<dtml-var alt_string> qU_varsq}qu.((UZClasses.PropertyqUZInstanceSheetsSheetqtqNt.}q(Uad_infoq(Uq(hU ZCommonSheetqttQU_objectsq(}q (U meta_typeq UCommon Instance Property Sheetq Uidq Uad_infoq utu.((UZClasses.MethodqUZClassMethodsSheetqtqNt.}q(U_mdq}qUidqUmethodsqU_objectsq (}q (U meta_typeq U DTML Methodq hUrender q u}q(U meta_typeqU DTML MethodqUidqUhit qu}q(U meta_typeqU DTML MethodqUidqUstats qutu."((UZClasses.PropertyqU ZCommonSheetqtqNt.}q(UtitleqUU_mdq}qUidqUad_infoq U _propertiesq (}q (Umetaq }q hUremaining_viewsqUtypeqUintqu}q(h }qhUviewsqhUintqu}q(h }qhUhitsqhUintqu}q(h }qhUhit_URLqhUstringqu}q(h }qhU alt_stringqhUstringq utu.