Re: [Zope-CMF] Biography type
BIll Anderson wrote: Ok, so it's clearly been quite some time since I've done any CMF stuff. Obviously these are not part of Metadata OOTB. What would be the simplest way to add the ability to set/change these? I'd prefer to be able to have them set during the creation process and must be able to change them later. There are no docs I have found for this. I know how to add a property during creation, as well as use it in ZPT. BUT nothing on how to update it from a form. If it was me, I'd just use: .manage_addProperty(name,value,type) ..during creation, and: managed_changeProperties(name1=newvalue,name2=newvalue) ..for editting. cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
[Zope-CMF] Re: Finding the current skin name
Can anybody from the CMF team give some guidance to Laurence here? -- Alexander On Fri, 28 Oct 2005 06:31:42 -0700, Laurence Rowe [EMAIL PROTECTED] wrote: In Plone ResourceRegistries (1.1 branch) I need to get the current skin name so that the resource (a css or js file) is fetched from the correct skin. Unfortunately it seems that there is no easy way to get the current skin name (when it is not set by a cookie in the request). I can work around this like follows, but it's a bit ugly: security.declareProtected(permissions.View, 'getCurrentSkinName') def getCurrentSkinName(self): Returns the id of the current skin. Ugh, there really should be a better way of doing this. This is depending on internals in CMFCore and should be added there. skintool = getToolByName(self, 'portal_skins') default_skin_name = skintool.getDefaultSkin() tid = get_ident() if SKINDATA.has_key(tid): skinobj, ignore, resolve = SKINDATA.get(tid) current_skin_path = skinobj.getPhysicalPath() # # Perhaps test against default skin first? # skinnames = skintool.getSkinSelections() # loop through skin names looking for a match for name in skinnames: skin = skintool.getSkinByName(name) path = skin.getPhysicalPath() if current_skin_path == path: return name return default_skin_name Would it be reasonable to make Skinnable.SkinnableObjectManager.changeSkin set the skin request var name after changing the skin? Such as: security.declarePublic('changeSkin') def changeSkin(self, skinname): '''Change the current skin. Can be called manually, allowing the user to change skins in the middle of a request. ''' skinobj = self.getSkin(skinname) if skinobj is not None: tid = get_ident() SKINDATA[tid] = (skinobj, {}, {}) REQUEST = getattr(self, 'REQUEST', None) if REQUEST is not None: REQUEST._hold(SkinDataCleanup(tid)) sfn = self.getSkinsFolderName() if sfn is not None: sf = getattr(self, sfn, None) if sf is not None: REQUEST.set(sf.getRequestVarname(), skinname) Then getSkinNameFromRequest would work happily. Or is the a better way to do this? Regards, Laurence ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests -- _ Alexander Limi · Chief Architect · Plone Solutions · Norway Consulting · Training · Development · http://www.plonesolutions.com _ Plone Co-Founder · http://plone.org · Connecting Content Plone Foundation · http://plone.org/foundation · Protecting Plone ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
[Zope-CMF] CMF Collector: Open Issues
The following supporters have open issues assigned to them in this collector (http://www.zope.org/Collectors/CMF). Assigned and Open efge - CMFSetup: provide non-ascii im- and exports, [Accepted] http://www.zope.org/Collectors/CMF/292 - CMFSetup doesn't correctly detect DCWorkflow on export, [Accepted] http://www.zope.org/Collectors/CMF/298 jens - Discussion replies removal, [Accepted] http://www.zope.org/Collectors/CMF/391 mhammond - Windows DevelopmentMode penalty in CMFCore.DirectoryView, [Accepted] http://www.zope.org/Collectors/CMF/366 mj - CMFSetup doesn't correctly detect DCWorkflow on export, [Accepted] http://www.zope.org/Collectors/CMF/298 Pending / Deferred Issues - CMFCalendar weekday locale issue, [Pending] http://www.zope.org/Collectors/CMF/237 - Wrong cache association for FSObject, [Pending] http://www.zope.org/Collectors/CMF/255 - CMFSetup: Windows exports contain CR/LF, LF and even CR newlines, [Pending] http://www.zope.org/Collectors/CMF/266 - FSPropertiesObject.py cannot handle multiline input for lines, text attributes, [Pending] http://www.zope.org/Collectors/CMF/271 - PortalCatalog.ZopeFindAndApply should probably also search in opaqueItems, [Pending] http://www.zope.org/Collectors/CMF/296 - Can't invalidate skin items in a RAMCacheManager, [Pending] http://www.zope.org/Collectors/CMF/343 - CMFSetup: Workflow Tool export fails with workflows which have scripts, [Pending] http://www.zope.org/Collectors/CMF/373 - CMFCore.Skinnable.SkinnableObjectManager can merge skin data, [Pending] http://www.zope.org/Collectors/CMF/375 - Proxy Roles does't work for a Script using portal_catalog.searchResults, [Pending] http://www.zope.org/Collectors/CMF/380 - WorkflowAction deprecated warning should not printed for WorkflowMethod, [Pending] http://www.zope.org/Collectors/CMF/388 - workflow notify success should be after reindex, [Pending] http://www.zope.org/Collectors/CMF/389 Pending / Deferred Features - Favorite.py: queries and anchors in remote_url, [Pending] http://www.zope.org/Collectors/CMF/26 - Allow flexible date editing in Event.py (CMFCalendar), [Pending] http://www.zope.org/Collectors/CMF/40 - DefaultDublinCore should have Creator property, [Pending] http://www.zope.org/Collectors/CMF/61 - Make changeFromProperties accept sequences too, [Pending] http://www.zope.org/Collectors/CMF/99 - path criteria on Topic should honor VHM, [Pending] http://www.zope.org/Collectors/CMF/111 - Document.py: universal newlines, [Pending] http://www.zope.org/Collectors/CMF/174 - Permissions in PortalFolder: invokeFactory(), [Pending] http://www.zope.org/Collectors/CMF/175 - Add condition for transition's action like other action, [Pending] http://www.zope.org/Collectors/CMF/207 - Major action enhancement, [Pending] http://www.zope.org/Collectors/CMF/232 - portal_type is undefined in initialization code, [Pending] http://www.zope.org/Collectors/CMF/248 - Action._listsActions() should be more safe, [Pending] http://www.zope.org/Collectors/CMF/253 - Expose Document text_format metadata, [Pending] http://www.zope.org/Collectors/CMF/285 - customization of type of homefolder on creation, [Pending] http://www.zope.org/Collectors/CMF/288 - Allow contentFilter to use review_state, [Pending] http://www.zope.org/Collectors/CMF/294 - CMFTopic Does Not Cache, [Pending] http://www.zope.org/Collectors/CMF/295 - Wishlist: a flag that tags the selected action., [Pending] http://www.zope.org/Collectors/CMF/301 - CMFDefault should make use of allowCreate(), [Pending] http://www.zope.org/Collectors/CMF/340 - Nested Skins, [Pending] http://www.zope.org/Collectors/CMF/377 - CatalogVariableProvider code + tests, [Pending] http://www.zope.org/Collectors/CMF/378 - manage_doCustomize() : minor additions, [Pending] http://www.zope.org/Collectors/CMF/382 ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
[Zope-CMF] Re: Debugging security settings in .metadata files
I still have not solved this problem, Chris Any ideas? On 10/28/05, Floyd May [EMAIL PROTECTED] wrote: I have a set of files - page templates, python scripts, and zsql methods - that are set up as filesystem objects. I'm having trouble getting the security set the way I want it to be with the .metadata files. Here is the content of my .metadata files: --8- [security] View = 0:Manager Access contents information = 0:Manager Access Contents Information = 0:Manager -8-- However, I can still access my content through an anonymous context. Can anyone give me some ideas about debugging my situation? Thanks! Zope 2.7.7-final, python 2.3.5, freebsd5 CMF 1.4.8 fm ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
[Zope-CMF] Re: Finding the current skin name
Could you expand a bit on the use case ? I'm not sure I get what you want do to, do you change skins several times in the middle of the request ? In what way is this skin needed afterward, at what point ? What's a correct skin ? Florent Laurence Rowe wrote: In Plone ResourceRegistries (1.1 branch) I need to get the current skin name so that the resource (a css or js file) is fetched from the correct skin. Unfortunately it seems that there is no easy way to get the current skin name (when it is not set by a cookie in the request). I can work around this like follows, but it's a bit ugly: security.declareProtected(permissions.View, 'getCurrentSkinName') def getCurrentSkinName(self): Returns the id of the current skin. Ugh, there really should be a better way of doing this. This is depending on internals in CMFCore and should be added there. skintool = getToolByName(self, 'portal_skins') default_skin_name = skintool.getDefaultSkin() tid = get_ident() if SKINDATA.has_key(tid): skinobj, ignore, resolve = SKINDATA.get(tid) current_skin_path = skinobj.getPhysicalPath() # # Perhaps test against default skin first? # skinnames = skintool.getSkinSelections() # loop through skin names looking for a match for name in skinnames: skin = skintool.getSkinByName(name) path = skin.getPhysicalPath() if current_skin_path == path: return name return default_skin_name Would it be reasonable to make Skinnable.SkinnableObjectManager.changeSkin set the skin request var name after changing the skin? Such as: security.declarePublic('changeSkin') def changeSkin(self, skinname): '''Change the current skin. Can be called manually, allowing the user to change skins in the middle of a request. ''' skinobj = self.getSkin(skinname) if skinobj is not None: tid = get_ident() SKINDATA[tid] = (skinobj, {}, {}) REQUEST = getattr(self, 'REQUEST', None) if REQUEST is not None: REQUEST._hold(SkinDataCleanup(tid)) sfn = self.getSkinsFolderName() if sfn is not None: sf = getattr(self, sfn, None) if sf is not None: REQUEST.set(sf.getRequestVarname(), skinname) Then getSkinNameFromRequest would work happily. Or is the a better way to do this? Regards, Laurence ___ Zope-CMF maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests -- Florent Guillaume, Nuxeo (Paris, France) Director of RD +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests