ZEXP-/(cOFS.Folder Folder q)tq.}q(U arriere.pngqU-0qQUunzip_file_formqU-1qQU rotate_cw.pngqU-2q QU remove.pngq U-3q QU avant.pngq U-4q QU album.pngqU-5qQU contributeursq(Uzwook@matisson.comqtqU rotate90fsqU-?qQU add_fs_imageqU-6qQU matrix.pngqU-]qQU config_okqU-7qQUskinqU1Unew_okqU-8qQU cle_admin.pngqU-FqQUadd_fs_thumbnailq U-Uq!QU previous.pngq"U-9q#QUidq$Ualbum_photo_jqueryq%Umove_imgq&U-:q'QUunzip_file_scriptq(U-Zq)QU certifwebq*Unonq+Uview_imgq,U-q1QUtitleq2U Album-photoq3Uzwo_config_htmlq4U-Qq5QUnoteq6MUdel_imgq7U-Iq8QUversionq9U2.7q:U add_image_okq;U-Bq(U meta_typeq?UScript (Python)q@UidqAUnew_okqBu}qC(U meta_typeqDUScript (Python)qEUidqFU add_imageqGu}qH(U meta_typeqIUScript (Python)qJUidqKh;u}qL(U meta_typeqMUScript (Python)qNUidqOh7u}qP(U meta_typeqQUScript (Python)qRUidqSh,u}qT(U meta_typeqUUScript (Python)qVUidqWU edit_htmlqXu}qY(hUhVhWUedit_okqZu}q[(U meta_typeq\UImageq]Uidq^U icone.pngq_u}q`(U meta_typeqaUScript (Python)qbUidqcU thumbscriptqdu}qe(haUExternal MethodqfhcU thumbnailqgu}qh(U meta_typeqiUScript (Python)qjUidqkU zwo_new_htmlqlu}qm(hihjhkU zwo_view_htmlqnu}qo(hihjhkh4u}qp(U meta_typeqqUScript (Python)qrUidqsU move_htmlqtu}qu(hqUImageqvhsUici.pngqwu}qx(hqhrhsh&u}qy(U meta_typeqzUImageq{Uidq|U eraser.pngq}u}q~(hzh{h|U fileopen.pngqu}q(hzh{h|Umove.pngqu}q(hzh{h|Unext.pngqu}q(hzh{h|h"u}q(hzh{h|h u}q(U meta_typeqUScript (Python)qUidqhu}q(U meta_typeqUExternal MethodqUidqUtestPILqu}q(hUScript (Python)qhU testPILscriptqu}q(U meta_typeqUImageqUidqhu}q(hUExternal MethodqhUrotate90qu}q(hUScript (Python)qhUrotate90scriptqu}q(U meta_typeqUFolderqUidqU Extensionsqu}q(U meta_typeqUImageqUidqU ajouter.gifqu}q(U meta_typeqUImageqUidqUinfo.pngqu}q(U meta_typeqUImageqUidqU info_no.pngqu}q(hhhhu}q(U meta_typeqUImageqUidqUcle_admin_no.pngqu}q(U meta_typeqUImageqUidqhu}q(hhhh u}q(hhhhu}q(U meta_typeqUExternal MethodqUidqU unzip_filequ}q(hUScript (Python)qhh(u}q(U meta_typeqUScript (Python)qUidqUadd_filequ}q(U meta_typeqUScript (Python)qUidqhu}q(U meta_typeqUImageqUidqU package.pngqu}q(U meta_typeqUExternal MethodqUidqUzip_filequ}q(hUScript (Python)qhUzip_file_scriptqu}q(U meta_typeqUScript (Python)qUidqUtestqu}q(U meta_typeqUImageqUidqh0u}q(U meta_typeqUImageqUidqhu}q(U meta_typeqUFolderqUidqU javascriptqu}q(U meta_typeqUFolderqUidqUcssqu}q(U meta_typeqUExternal MethodqUidqU add_fs_imagequ}q(U meta_typeqUExternal MethodqUidqUadd_fs_thumbnailqu}q(U meta_typeqUExternal MethodqUidqU rotate90fsqu}q(U meta_typerUExternal MethodrUidrU del_img_fsrutrhU-CrQhU-DrQU thumbnailrU-ErQUcssr U-ar QhXU-Ar QU thumbscriptr U-Jr QU javascriptrU-KrQU descriptionr(UAffiche un album photo, sous forme de pages de vignettes. Chaque image est affiche en taille relle lorsqu'on clique sur sa vignette, et peut tre accompagne d'un titre et d'une description.rU2La taille maximale des vignettes est paramtrable.rUSi la librairie graphique PIL est installe, ainsi que les extensions thumbnail.py, rotate90.py et testPIL.py (ce qui est le cas sur un ZEServer) :rUE- les vignettes des images tlcharges sont automatiquement cres ;rUA- il est possible de faire subir aux images des rotations de 90.rUL- il est aussi possible d'importer ou d'exporter des images en dossier zip.rtrhZU-HrQhU-TrQhU-^rQhU-GrQhU-LrQhGU-MrQhU-NrQhU-OrQUtestr U-Pr!QhU-Rr"QU Extensionsr#U-Sr$QU _propertiesr%(}r&(Utyper'Ustringr(Uidr)Utitler*Umoder+Uwu}r,(Utyper-Ustringr.Uidr/U experimentalr0u}r1(Utyper2Uintr3Uidr4Unoter5u}r6(j2Ustringr7j4Uversionr8u}r9(j2j7j4Udevr:u}r;(j2j7j4U certifdevr<u}r=(j2j7j4U certifwebr>u}r?(j2j7j4U moderateurr@u}rA(UtyperBUlinesrCUidrDU descriptionrEu}rF(UtyperGUlinesrHUidrIhu}rJ(UtyperKUstringrLUidrMhu}rN(jKjLjMUzone_principalerOu}rP(UtyperQUstringrRUidrSU access_redacrTutrUhU-\rVQhU-WrWQU certifdevrXUnonrYhU-XrZQhwU-Yr[QU access_redacr\Uutilisable par un rdacteurr]hU-[r^QU__ac_local_roles__r_}r`U del_img_fsraU-@rbQUdevrcU100%rdh}U-dreQhtU-_rfQU zwo_view_htmlrgU-`rhQU_ownerri(]rj(UvirtualrkU emencia.netrlU acl_usersrmeUrage2000rntrojOU1hU-VrpQhU-brqQh_U-crrQU moderateurrsUclaudiux@zwookedu.netrtU zwo_new_htmlruU-;rvQU experimentalrwUu.-0(cOFS.Image Image q)tq.}q(U preconditionqUUtitleqU arriere.pngqUdataqUɉPNG  IHDR Ӻ&'PLTEՠΏzzqqFFii..RRҙ::ȃ0VtRNS@f pHYs+;IDATEA Dhm"jd& q=Wb.?&:L"IENDB`qUheightq K Uwidthq K U content_typeq U image/pngq U__name__q hU__ac_local_roles__q}qUphilq]qUOwnerqasUsizeqKu.-1 :(cProducts.PythonScripts.PythonScript PythonScript q)tq.}q(U Python_magicqUm qUerrorsq)Uwarningsq)U Script_magicqKU_bodyq Thmem=context.zwo_lib.mem_data() print context.zwo_lib.standard_html_header(mem) print """ Votre fichier ZIP ne doit contenir que des images ou des photos.
Fichier ZIP :
""" %(instid) print context.zwo_lib.standard_html_footer(mem) return printed q U _filepathq UOScript (Python):/zwook_active_kz1_0_rc1/zwo_modules/album_photo/unzip_file_formq U_codeq Tc@s dZdS(Nc Cst}tttdd}|tttdd|IJ|d|IJ|tttdd|IJ|SdS(Ntzwo_libtmem_datatstandard_html_headers Votre fichier ZIP ne doit contenir que des images ou des photos.
Fichier ZIP :
tstandard_html_footer(t_print_t_printt _getattr_tcontexttmemtinstid(R RRRRR((sScript (Python)tunzip_file_forms $" "(R (R ((sScript (Python)stqU func_defaultsqNU _bind_namesq(cShared.DC.Scripts.Bindings NameAssignments qoq}qU_asgnsq}q(Uname_containerqU containerqU name_contextqUcontextqU name_subpathqUtraverse_subpathqU name_m_selfqUscriptqusbU func_codeq(cShared.DC.Scripts.Signature FuncCode qoq }q!(U co_argcountq"KU co_varnamesq#(Uinstidq$U_print_q%U_printq&U _getattr_q'Ucontextq(Umemq)tq*ubU__ac_local_roles__q+}q,Uclaudiuxq-]q.UOwnerq/asUidq0Uunzip_file_formq1U_paramsq2Uinstidq3U_dav_writelocksq4U-eq5Qu.-2(cOFS.Image Image q)tq.}q(U preconditionqUUtitleqU rotate_cw.pngqUdataqTPNG  IHDRasBIT|dtEXtSoftwarewww.inkscape.org<IDAT8_HSQww9&f(&2i)%.FRHC= h(R#mԹ;wvzXۋp·s0OE$;򆕛uJ.D#rkgu߲Xj g=`)CDI2,m93CH}P`7TC.Ɗ64-1Ǔ^̝ߣ 4!ոD ]9x؃$TY.br{NvTgf82m,PENKq(@a߆ [^ZM!)%Z@U˾0h~M9ocXf58 y z$l_Vk1d"hu6"Wp ur:iityotest{gTu@ ̙}Ϲ{>5zܒMvKqDY> v\4g4]Sgv,eV=oڲblى3Lr"!ȉ1mDG~2!d% ۞WCc}SX]}"}!mCI jJ'<0_lB,IENDB`qUheightq KUwidthq KU content_typeq U image/pngq U__name__q hU__ac_local_roles__q}qUadminq]qUOwnerqasUsizeqMu.-3(cOFS.Image Image q)tq.}q(U preconditionqUUtitleqU remove.pngqU__ac_local_roles__q}qUadminq ]q UOwnerq asUheightq KUwidthq KU content_typeqU image/pngqU__name__qhUdataqTPNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDATxbtg@~-cbbr($?bbA W2??/##_n޼_u捣̌-LL;`z [Gxx=77؀_1ܸa}+Wn\ &&) }fwff ,, ? 5(py?}z  fe߿vpWÛ7?~tw 4 e/^Vz @1[[HHJEE @ACC7@1))aqqA;wAPP  3m/?00pr5IJ0((H׷a͚ >aЛ?^ 00!/G]!1яANN  ֮30,X0@B۷ O}d001ܿn0ܺu_s@͉l 04|X@aL!쌜 QQkӻIENDB`qUsizeqL1027L u.-4(cOFS.Image Image q)tq.}q(U preconditionqUUtitleqU avant.pngqUdataqUĉPNG  IHDR Ӻ&'PLTEՠzzΏiiFFqqҙRR..::ȃ7ߗtRNS@f pHYs+6IDAT-̷0 @pNk$GQX(ѱ 2PL:?'GҳIENDB`qUheightq K Uwidthq K U content_typeq U image/pngq U__name__q hU__ac_local_roles__q}qUphilq]qUOwnerqasUsizeqKu.-51(cOFS.Image Image q)tq.}q(U preconditionqUUtitleqU album.pngqUdataqUcPNG  IHDR lΤPLTE uIDATc```|B@~8 sTIENDB`qUheightq K Uwidthq K U content_typeq U image/pngq U__name__q hU__ac_local_roles__q}qUphilq]qUOwnerqasUsizeqKcu.-?(cProducts.ExternalMethod.ExternalMethod ExternalMethod q)tq.}q(U_moduleqUfilemanagementqU _functionqU rotate_imageqU__ac_local_roles__q}q Urage2000q ]q UOwnerq asUidq U rotate90fsqUtitleqUu.-6(cProducts.ExternalMethod.ExternalMethod ExternalMethod q)tq.}q(U_moduleqUfilemanagementqU _functionqU write_fileqU__ac_local_roles__q}q Urage2000q ]q UOwnerq asUidq U add_fs_imageqUtitleqUu.-](cOFS.Image Image q)tq.}q(U preconditionqUUtitleqU matrix.pngqU__ac_local_roles__q}qUclaudiuxq ]q UOwnerq asUheightq KUwidthq KU content_typeqU image/pngqU__name__qhUdataqUPNG  IHDRagAMA a pHYs  d_IDATxR  ^c4Fc3Y FEP`\9(=,H˜*^! bZM!|QSOL MEw`1-y-Jd%͉^IS ^|דM[WmboM|TD }[yb8fB*x!IENDB`qUsizeqKu.-7:(cProducts.PythonScripts.PythonScript PythonScript q)tq.}q(U Python_magicqUm qU _proxy_rolesq(UManagerqtqUwarningsq )U Script_magicq KU_bodyq T# RECUPERATION DES PARAMETRES mem=context.zwo_lib.mem_mod_data() if type_rep=="skin": try: skin=context.zwo_info.skins[nom_rep] except: return 'nooo' obj=skin[instid] else: dossier=mem['rep_obj'] obj=dossier[instid] if mem['droit_edit_dossier']<>1 and not context.zwo_lib.droit_redac(mem,obj): return 'Vous n\'avez pas les droits pour cette action !' # EXEMPLE MODIFICATION #obj.manage_changeProperties(exemple=exemple) if obj.hasProperty('num_of_lines'): obj.manage_changeProperties(num_of_lines=num_of_lines) else: obj.manage_addProperty('num_of_lines',num_of_lines,'int') if obj.hasProperty('img_per_line'): obj.manage_changeProperties(img_per_line=img_per_line) else: obj.manage_addProperty('img_per_line',img_per_line,'int') if obj.hasProperty('biggest_width'): obj.manage_changeProperties(biggest_width=biggest_width) else: obj.manage_addProperty('biggest_width',biggest_width,'int') if obj.hasProperty('show_title'): obj.manage_changeProperties(show_title=show_title) else: obj.manage_addProperty('show_title',show_title,'string') if obj.hasProperty('show_desc'): obj.manage_changeProperties(show_desc=show_desc) else: obj.manage_addProperty('show_desc',show_desc,'string') img_width_max,img_height_max=dim_max.split('x') if obj.hasProperty('img_width_max'): obj.manage_changeProperties(img_width_max=img_width_max) else: obj.manage_addProperty('img_width_max',img_width_max,'int') if obj.hasProperty('img_height_max'): obj.manage_changeProperties(img_height_max=img_height_max) else: obj.manage_addProperty('img_height_max',img_height_max,'int') if obj.hasProperty('filesystem'): obj.manage_changeProperties(filesystem=isfs) else: obj.manage_addProperty('filesystem', isfs, 'boolean') # Rdacteurs: if mem['droit_redac']==1: if obj.hasProperty('redac_time'): obj.manage_changeProperties(redac_time=DateTime()) else: obj.manage_addProperty('redac_time',DateTime(),'date') elif mem['droit_edit_dossier']==1: context.zwo_lib.check_content_submited_by_redac(obj.getId(), obj.absolute_url(), 'chown', redacteur, imprimatur) # REDIRECTION PAGE ADMIN GENERALE PAGE OU SKIN. context.REQUEST.RESPONSE.redirect('../../') q U _filepathq U?Script (Python):/zwookedu_0.7/zwo_modules/album_photo/config_okqU_codeqT c@sdddddedZdS(Ntt0t640x480c DCs#tttdd}|djoFy%ttttdd|}Wn dSnXt||}nt|d}t||}t|dd jo tttdd || od Snt|d d ot|dd |nt|dd |dt|d dot|dd|nt|dd|dt|d dot|dd|nt|dd|dt|d dot|dd| nt|dd| dt|d dot|dd| nt|dd| dt|ddt\}}t|d dot|dd|nt|dd|dt|d dot|dd|nt|dd|dt|d dot|dd| nt|dd| dt|d d joSt|d dot|ddtnt|ddtdn[t|dd joDtttddt|dt|d d!||nttttd"d#d$d%dS(&Ntzwo_libt mem_mod_datatskintzwo_infotskinstnoootrep_objtdroit_edit_dossierit droit_redacs.Vous n'avez pas les droits pour cette action !t hasPropertyt num_of_linestmanage_changePropertiestmanage_addPropertytintt img_per_linet biggest_widtht show_titletstringt show_desctsplittxt img_width_maxtimg_height_maxt filesystemtbooleant redac_timetdatetcheck_content_submited_by_redactgetIdt absolute_urltchowntREQUESTtRESPONSEtredirects../../(t _getattr_tcontexttmemttype_rept _getitem_tnom_repRtinstidtobjtdossierR RRRRtdim_maxt _getiter_RRtisfstDateTimet redacteurt imprimatur(R+R*R(R RRR2R3R.RRR0R%R&R'R)RR,R-R/RRR1((sScript (Python)s config_oksT (9" D(tFalset config_ok(R4R5((sScript (Python)sRqU func_defaultsq(UU0U640x480qU0U0I00 tqUerrorsq)U _bind_namesq(cShared.DC.Scripts.Bindings NameAssignments qoq}qU_asgnsq}q(U name_contextqUcontextqU name_subpathqUtraverse_subpathqU name_m_selfqUscriptq Uname_containerq!U containerq"usbU_dav_writelocksq#U-fq$QU__ac_local_roles__q%}q&Uxavq']q(UOwnerq)asUidq*U config_okq+U_paramsq,Uinstid, nom_rep, type_rep, num_of_lines, img_per_line, biggest_width,redacteur='',imprimatur='0', dim_max='640x480', show_title='0', show_desc='0', isfs=Falseq-U func_codeq.(cShared.DC.Scripts.Signature FuncCode q/oq0}q1(U co_argcountq2K U co_varnamesq3(Uinstidq4Unom_repq5Utype_repq6U num_of_linesq7U img_per_lineq8U biggest_widthq9U redacteurq:U imprimaturq;Udim_maxqUisfsq?U _getattr_q@UcontextqAUmemqBU _getitem_qCUskinqDUobjqEUdossierqFU _getiter_qGU img_width_maxqHUimg_height_maxqIUDateTimeqJtqKubu.-8P(cProducts.PythonScripts.PythonScript PythonScript q)tq.}q(U Python_magicqUm qU _proxy_rolesq(UManagerqtqUwarningsq )U Script_magicq KU_bodyq T # RECUPERATION DES PARAMETRES mem=context.zwo_lib.mem_mod_data() if mem['droit_edit_dossier']<>1 and mem['droit_redac']!=1: return "Vous n'avez pas les droits pour cette action !" lieu=mem['parent'] url_lieu=mem['parent_bo_url'] idobj=context.zwo_lib.mix_id_zope(titre) img_width_max,img_height_max=dim_max.split('x') # REDIRECTION SI IDENTIFIANT MAL CHOISI if idobj in lieu.objectIds(): url='../ajout_element?type='+container.getId() print '' print '

Cet identifiant '+idobj+' est dja pris
' print 'Veuillez en choisir un autre
' print 'Redirection automatique dans 2 secondes.

' print 'Si la Redirection automatique ne fonctionne pas, cliquez ici : Redirection Manuelle' print '' return printed # CREATION INSTANCE MODULE (dossier, image, DTML Document ou Fichier selon Besoin. Folder conseill en cas de doute) lieu.manage_addFolder(idobj,titre) lieu[idobj].manage_addFolder('thumbnails','thumbnails') #lieu.manage_addImage(idobj,data,titre) #lieu.manage_addFile(idobj, file=data, title=titre) #lieu.manage_addDTMLDocument(idobj, titre) obj=lieu[idobj] # AJOUT DES PROPRIETES OBLIGATOIRE DU MODULES obj.manage_addProperty('type_zwook','element','string') obj.manage_addProperty('element',container.getId(),'string') # Ajout pour rdacteur : if mem['droit_redac']==1: obj.manage_addProperty('redacteur',mem['user_id'],'string') obj.manage_addProperty('imprimatur',"0",'string') obj.manage_addProperty('redac_time',DateTime(),'date') # AJOUT D'AUTRES PROPRIETE en fonction du module obj.manage_addProperty('num_of_lines',int(num_of_lines),'int') obj.manage_addProperty('img_per_line',int(img_per_line),'int') obj.manage_addProperty('num_img',0,'int') obj.manage_addProperty('biggest_width',int(biggest_width),'int') obj.manage_addProperty('img_width_max', int(img_width_max),'int') obj.manage_addProperty('img_height_max', int(img_height_max),'int') obj.manage_addProperty('show_title', show_title, 'string') obj.manage_addProperty('show_desc', show_desc, 'string') obj.manage_addProperty('filesystem', isfs, 'boolean') # AJOUT DE SOUS ELEMENTS en fonction du module # (si dossier choisi comme type uniquement) #obj.manage_addFolder('truc','bidulle') #obj.truc.manage_addProperty('nom_propriete','valeur default',type) context.REQUEST.RESPONSE.redirect('../../place?obj='+idobj) return q Uidq Unew_okqU_codeqT c@s"ddddddedZdS(Niiit640x480t0cCsgt} tttdd} t| ddjot| ddjodSnt| d}t| d}tttdd |}t|d d t \}}|t|d joud ttd}| d|dIJ| d|dIJ| dIJ| dIJ| d|dIJ| dIJ| Snt|d||tt||dddt||}t|ddddt|ddttddt| ddjo[t|ddt| ddt|dd d!dt|dd"td#nt|dd$t|d%t|dd&t|d%t|dd'd(d%t|dd)t|d%t|dd*t|d%t|dd+t|d%t|dd,|dt|dd-|dt|dd.|d/ttttd0d1d2d3|dSdS(4Ntzwo_libt mem_mod_datatdroit_edit_dossierit droit_redacs.Vous n'avez pas les droits pour cette action !tparentt parent_bo_urlt mix_id_zopetsplittxt objectIdss../ajout_element?type=tgetIds7s.

Cet identifiant s est dja pris
s"Veuillez en choisir un autre
s6Redirection automatique dans 2 secondes.

sGSi la Redirection automatique ne fonctionne pas, cliquez ici : Redirection Manuellestmanage_addFoldert thumbnailstmanage_addPropertyt type_zwooktelementtstringt redacteurtuser_idt imprimaturRt redac_timetdatet num_of_linestintt img_per_linetnum_imgit biggest_widtht img_width_maxtimg_height_maxt show_titlet show_desct filesystemtbooleantREQUESTtRESPONSEtredirects../../place?obj=(t_print_t_printt _getattr_tcontexttmemt _getitem_tlieuturl_lieuttitretidobjtdim_maxt _getiter_RRt containerturltobjtDateTimeRRRRRR tisfs(R.RRRR0RR R6R&R'R(R)R*R+R,R-R/R1RRR2R3R4R5R((sScript (Python)snew_oksH ,"    %" )(tFalsetnew_ok(R7R8((sScript (Python)stqU func_defaultsq(KKKiU640x480qU0U0I00 tqUerrorsq)U _bind_namesq(cShared.DC.Scripts.Bindings NameAssignments qoq}qU_asgnsq}q(U name_contextqUcontextqU name_subpathqUtraverse_subpathqU name_m_selfqUscriptq Uname_containerq!U containerq"usbU func_codeq#(cShared.DC.Scripts.Signature FuncCode q$oq%}q&(U co_argcountq'KU co_varnamesq((Utitreq)U num_of_linesq*U img_per_lineq+U biggest_widthq,Udim_maxq-U show_titleq.U show_descq/Uisfsq0U_print_q1U_printq2U _getattr_q3Ucontextq4Umemq5U _getitem_q6Ulieuq7Uurl_lieuq8Uidobjq9U _getiter_q:U img_width_maxq;Uimg_height_maxqUobjq?UDateTimeq@UintqAtqBubU__ac_local_roles__qC}qDUgregqE]qFUOwnerqGasU _filepathqHU