From brian at zope.com Fri Aug 1 10:37:39 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:14 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/Extensions - NZOMigrate.py:1.35 Message-ID: <200308011437.h71EbdD16012@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/Extensions In directory cvs.zope.org:/tmp/cvs-serv15945 Modified Files: NZOMigrate.py Log Message: debugging change === Products/ZopeOrg-NV/Extensions/NZOMigrate.py 1.34 => 1.35 === def Folder2CMFPortalFolder(self, obj, source, dest): if dest is None or obj is None: return None - try: - dest.invokeFactory(id=obj.getId(), title=obj.title, \ - type_name="Folder") - except: - pass + dest.invokeFactory(id=obj.getId(), title=obj.title, \ + type_name="Folder") +## try: +## dest.invokeFactory(id=obj.getId(), title=obj.title, \ +## type_name="Folder") +## except: +## pass if not hasattr(aq_base(dest), obj.getId()): return None new = getattr(dest, obj.getId(), None) From brian at zope.com Fri Aug 1 10:47:56 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:14 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/Extensions - NZOMigrate.py:1.36 Message-ID: <200308011447.h71Elux17682@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/Extensions In directory cvs.zope.org:/tmp/cvs-serv17664 Modified Files: NZOMigrate.py Log Message: remove debugging === Products/ZopeOrg-NV/Extensions/NZOMigrate.py 1.35 => 1.36 === def Folder2CMFPortalFolder(self, obj, source, dest): if dest is None or obj is None: return None - dest.invokeFactory(id=obj.getId(), title=obj.title, \ - type_name="Folder") -## try: -## dest.invokeFactory(id=obj.getId(), title=obj.title, \ -## type_name="Folder") -## except: -## pass + try: + dest.invokeFactory(id=obj.getId(), title=obj.title, \ + type_name="Folder") + except: + pass if not hasattr(aq_base(dest), obj.getId()): return None new = getattr(dest, obj.getId(), None) From brian at zope.com Fri Aug 1 10:50:44 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:14 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/Extensions - NZOMigrate.py:1.37 Message-ID: <200308011450.h71Eoi518149@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/Extensions In directory cvs.zope.org:/tmp/cvs-serv18119 Modified Files: NZOMigrate.py Log Message: more debugging === Products/ZopeOrg-NV/Extensions/NZOMigrate.py 1.36 => 1.37 === def Folder2CMFPortalFolder(self, obj, source, dest): if dest is None or obj is None: return None - try: - dest.invokeFactory(id=obj.getId(), title=obj.title, \ - type_name="Folder") - except: - pass + dest.invokeFactory(id=obj.getId(), title=obj.title, \ + type_name="Folder") +## try: +## dest.invokeFactory(id=obj.getId(), title=obj.title, \ +## type_name="Folder") +## except: +## pass if not hasattr(aq_base(dest), obj.getId()): return None new = getattr(dest, obj.getId(), None) From brian at zope.com Fri Aug 1 11:00:11 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:14 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/Extensions - NZOMigrate.py:1.38 Message-ID: <200308011500.h71F0Bv19772@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/Extensions In directory cvs.zope.org:/tmp/cvs-serv19733 Modified Files: NZOMigrate.py Log Message: debugging === Products/ZopeOrg-NV/Extensions/NZOMigrate.py 1.37 => 1.38 === def Folder2CMFPortalFolder(self, obj, source, dest): if dest is None or obj is None: return None - dest.invokeFactory(id=obj.getId(), title=obj.title, \ - type_name="Folder") -## try: -## dest.invokeFactory(id=obj.getId(), title=obj.title, \ -## type_name="Folder") -## except: -## pass + try: + dest.invokeFactory(id=obj.getId(), title=obj.title, \ + type_name="Folder") + except: + pass if not hasattr(aq_base(dest), obj.getId()): return None new = getattr(dest, obj.getId(), None) From brian at zope.com Mon Aug 4 13:48:33 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:14 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - frontpage_menu_items.py:1.5 Message-ID: <200308041748.h74HmXM15019@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv14968 Modified Files: frontpage_menu_items.py Log Message: make dl zope link less expensive === Products/ZopeOrg-NV/skins/nzo/frontpage_menu_items.py 1.4 => 1.5 === subitems=[] menu.append({'label':'Download', 'url':'/Products/', 'subitems':subitems}) -subitems.append({'label':'Download Zope', 'url':'/Products/Zope/'}) +subitems.append({'label':'Download Zope', 'url':'/Products/'}) subitems.append({'label':'Zope Products', 'url':'/Products/'}) subitems.append({'label':'Zope CMF', 'url':'http://cmf.zope.org/'}) From brian at zope.com Mon Aug 4 20:47:21 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:14 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - login_success.pt:1.1 Message-ID: <200308050047.h750lLe16415@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv16386 Added Files: login_success.pt Log Message: added overridden login_success === Added File Products/ZopeOrg-NV/skins/nzo/login_success.pt === Disable the tabs

You are now logged in

You will notice that the top right bar has changed, it now contains several personalized items. These will stay there as long as you are logged in, and allow you to control your settings and your personal area.

You might want to head over to your folder and add some content, or set up your Preferences.

Items published since your last login

Title Type Modified Author Description
dummy  Type Modification Date Author Description
From brian at zope.com Mon Aug 4 20:56:09 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:14 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV - __init__.py:1.25 Message-ID: <200308050056.h750u9E17762@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV In directory cvs.zope.org:/tmp/cvs-serv17715 Modified Files: __init__.py Log Message: Added hack to support moved class in ZWiki === Products/ZopeOrg-NV/__init__.py 1.24 => 1.25 === def log(message, summary='', severity=0, dup=1): zLOG.LOG('ZopeOrg: ',severity,summary,message) +#Hack to deal with a moved class in ZWikis +from Products.ZWiki.Regulations import ZWikiRegulations +import Products.ZWiki.ZWikiPage +Products.ZWiki.ZWikiPage.ZWikiRegulations = ZWikiRegulations + + #Hackish workaround to allow accesing the broken ZODB on ZopeOrg class ImplicitAcquirerWrapper: pass From brian at zope.com Mon Aug 4 21:33:17 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:14 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - search.pt:1.2 Message-ID: <200308050133.h751XHq23607@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv23564 Modified Files: search.pt Log Message: Avoid unbounded search === Products/ZopeOrg-NV/skins/nzo/search.pt 1.1 => 1.2 === metal:use-macro="here/main_template/macros/master">
@@ -184,4 +184,4 @@
- \ No newline at end of file + From brian at zope.com Mon Aug 4 21:46:21 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:14 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - header.pt:1.1 Message-ID: <200308050146.h751kLg25613@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv25571 Added Files: header.pt Log Message: fix header image === Added File Products/ZopeOrg-NV/skins/nzo/header.pt === Title of page Inserts CSS specified from a page. Flexibility for published templates to inject stuff into the head tag. Inserts javascript specified from a page. function formtooltip(el,flag){}
This is here just in case actions is not defined. This would happen if you were calling from a DTML Document
  john You are not logged in dummy
You are here: Home » Home crumb » crumb

From brian at zope.com Tue Aug 5 11:20:16 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:14 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - footer.pt:1.2 Message-ID: <200308051520.h75FKGr23540@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv23511 Modified Files: footer.pt Log Message: change webmaster email === Products/ZopeOrg-NV/skins/nzo/footer.pt 1.1 => 1.2 === tal:define="portal_url here/portal_url"> 2003 Zope Corporation. All rights reserved. -Legal | Contact +Legal | Contact
From brian at zope.com Wed Aug 6 10:08:31 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:14 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV - __init__.py:1.26 Message-ID: <200308061408.h76E8VH12021@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV In directory cvs.zope.org:/tmp/cvs-serv11958 Modified Files: __init__.py Log Message: checkin hack to avoid calling catalog TTW === Products/ZopeOrg-NV/__init__.py 1.25 => 1.26 === class ImplicitAcquirerWrapper: pass + +from Products.CMFCore.CatalogTool import CatalogTool + +# Monkey-patch the catalog tool to avoid unbounded searches! +_searchResults = CatalogTool.searchResults + +def searchResults(self, REQUEST=None, **kw): + '' + if (len(kw) == 0) and (REQUEST is not None): + url = REQUEST['URL'] + if url.endswith('portal_catalog') or \ + url.endswith('portal_catalog/') or \ + url.endswith('portal_catalog/index_html'): + raise ValueError, 'catalog not callable from the web' + + return apply(_searchResults, (self, REQUEST), kw) + +CatalogTool.__call__ = searchResults + + from Products.CMFDefault.DublinCore import DefaultDublinCoreImpl DefaultDublinCoreImpl._DefaultDublinCoreImpl__FLOOR_DATE = DateTime(1979, 0) DefaultDublinCoreImpl._DefaultDublinCoreImpl__CEILING_DATE = DateTime(2979, 0) From chrism at zope.com Wed Aug 6 11:02:25 2003 From: chrism at zope.com (Chris McDonough) Date: Sun Aug 10 17:02:14 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV - __init__.py:1.27 Message-ID: <200308061502.h76F2PE21280@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV In directory cvs.zope.org:/tmp/cvs-serv21227 Modified Files: __init__.py Log Message: Dont allow ttw call of portal_catalog. === Products/ZopeOrg-NV/__init__.py 1.26 => 1.27 === def searchResults(self, REQUEST=None, **kw): '' if (len(kw) == 0) and (REQUEST is not None): - url = REQUEST['URL'] - if url.endswith('portal_catalog') or \ + url = REQUEST.get('URL', None) + if url and (url.endswith('portal_catalog') or \ url.endswith('portal_catalog/') or \ - url.endswith('portal_catalog/index_html'): - raise ValueError, 'catalog not callable from the web' + url.endswith('portal_catalog/index_html')): + log('TTW call of portal_catalog. Referer: %s' % + REQUEST.get('HTTP_REFERER', '') + raise ValueError, 'catalog not callable from the web' return apply(_searchResults, (self, REQUEST), kw) From chrism at zope.com Wed Aug 6 11:10:07 2003 From: chrism at zope.com (Chris McDonough) Date: Sun Aug 10 17:02:14 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV - __init__.py:1.28 Message-ID: <200308061510.h76FA7S22590@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV In directory cvs.zope.org:/tmp/cvs-serv22545 Modified Files: __init__.py Log Message: Syntax error. :-( === Products/ZopeOrg-NV/__init__.py 1.27 => 1.28 === url.endswith('portal_catalog/') or \ url.endswith('portal_catalog/index_html')): log('TTW call of portal_catalog. Referer: %s' % - REQUEST.get('HTTP_REFERER', '') + REQUEST.get('HTTP_REFERER', '')) raise ValueError, 'catalog not callable from the web' return apply(_searchResults, (self, REQUEST), kw) From brian at zope.com Wed Aug 6 11:14:12 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:14 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV - __init__.py:1.29 Message-ID: <200308061514.h76FECN23366@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV In directory cvs.zope.org:/tmp/cvs-serv23338 Modified Files: __init__.py Log Message: fix indent === Products/ZopeOrg-NV/__init__.py 1.28 => 1.29 === url.endswith('portal_catalog/index_html')): log('TTW call of portal_catalog. Referer: %s' % REQUEST.get('HTTP_REFERER', '')) - raise ValueError, 'catalog not callable from the web' + raise ValueError, 'catalog not callable from the web' return apply(_searchResults, (self, REQUEST), kw) From brian at zope.com Wed Aug 6 11:58:10 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:14 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - frontpage_menu_items.py:1.6 Message-ID: <200308061558.h76FwA532128@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv32077 Modified Files: frontpage_menu_items.py Log Message: use absolute urls to avoid breakage under dev site. === Products/ZopeOrg-NV/skins/nzo/frontpage_menu_items.py 1.5 => 1.6 === menu = [] subitems=[] -menu.append({'label':'About Zope', 'url':'/WhatIsZope', +menu.append({'label':'About Zope', + 'url':'http://www.zope.org/WhatIsZope', 'subitems':subitems}) -subitems.append({'label':'What Is Zope?', 'url':'/WhatIsZope'}) +subitems.append({'label':'What Is Zope?', + 'url':'http://www.zope.org/WhatIsZope'}) subitems.append({'label':'Zope Powered Sites', - 'url':'/Resources/ZopePowered/'}) -subitems.append({'label':'About Zope.org', 'url':'/About/'}) -subitems.append({'label':'Zope News', 'url':'/news'}) + 'url':'http://www.zope.org/Resources/ZopePowered/'}) +subitems.append({'label':'About Zope.org', + 'url':'http://www.zope.org/About/'}) +subitems.append({'label':'Zope News', + 'url':'http://www.zope.org/news'}) subitems=[] -menu.append({'label':'Business', 'url':'/Resources/ZSP/', +menu.append({'label':'Business', + 'url':'http://www.zope.org/Resources/ZSP/', 'subitems':subitems}) -subitems.append({'label':'Zope Corporation', 'url':'http://www.zope.com', +subitems.append({'label':'Zope Corporation', + 'url':'http://www.zope.com', 'new' : 1}) subitems.append({'label':'Solution Providers', - 'url':'/Resources/ZSP/'}) + 'url':'http://www.zope.org/Resources/ZSP/'}) subitems.append({'label':'Zope Hosting', 'url':'http://www.google.com/search?q=Zope+hosting', 'new': 1}) @@ -35,44 +41,54 @@ subitems=[] -menu.append({'label':'Documentation', 'url':'/Documentation/', +menu.append({'label':'Documentation', + 'url':'http://www.zope.org/Documentation/', 'subitems':subitems}) subitems.append({'label':'The Zope Book', - 'url':'/Documentation/Books/ZopeBook/current'}) + 'url':'http://www.zope.org/Documentation/Books/ZopeBook/current'}) subitems.append({'label':'Developer Guide', - 'url':'/Documentation/Books/ZDG/current'}) + 'url':'http://www.zope.org/Documentation/Books/ZDG/current'}) subitems.append({'label':'Administrator Guide', - 'url':'/Documentation/Guides/ZAG'}) + 'url':'http://www.zope.org/Documentation/Guides/ZAG'}) subitems.append({'label':'API reference', - 'url':'/Documentation/Books/ZopeBook/current/AppendixB.stx'}) + 'url':'http://www.zope.org/Documentation/Books/ZopeBook/current/AppendixB.stx'}) subitems.append({'label':'ZPT reference', - 'url':'/Documentation/Books/ZopeBook/current/AppendixC.stx'}) + 'url':'http://www.zope.org/Documentation/Books/ZopeBook/current/AppendixC.stx'}) subitems.append({'label':'Using The CMF', 'url':'http://cmf.zope.org/Members/beehive/ZWACKChap5.html'}) -subitems.append({'label':'Zope Articles', 'url':'/Resources/Articles/'}) -subitems.append({'label':'Zope How-Tos', 'url':'/Documentation/How-To/'}) +subitems.append({'label':'Zope Articles', + 'url':'http://www.zope.org/Resources/Articles/'}) +subitems.append({'label':'Zope How-Tos', + 'url':'http://www.zope.org/Documentation/How-To/'}) subitems.append({'label':'Books In Print', 'url':'http://www.zope.com/Developers/Books/', 'new': 1}) subitems=[] -menu.append({'label':'Download', 'url':'/Products/', +menu.append({'label':'Download', + 'url':'http://www.zope.org/Products/', 'subitems':subitems}) -subitems.append({'label':'Download Zope', 'url':'/Products/'}) -subitems.append({'label':'Zope Products', 'url':'/Products/'}) -subitems.append({'label':'Zope CMF', 'url':'http://cmf.zope.org/'}) +subitems.append({'label':'Download Zope', + 'url':'http://www.zope.org/Products/'}) +subitems.append({'label':'Zope Products', + 'url':'http://www.zope.org/Products/'}) +subitems.append({'label':'Zope CMF', + 'url':'http://cmf.zope.org/'}) subitems=[] -menu.append({'label':'Developers', 'url':'http://dev.zope.org/', +menu.append({'label':'Developers', + 'url':'http://dev.zope.org/', 'subitems':subitems}) subitems.append({'label':'Zope Projects', 'url':'http://dev.zope.org/Projects/'}) -subitems.append({'label':'Zope 3', 'url':'/DevHome/Zope3'}) -subitems.append({'label':'Zope CVS', 'url':'http://dev.zope.org/CVS/'}) +subitems.append({'label':'Zope 3', + 'url':'http://dev.zope.org/Zope3'}) +subitems.append({'label':'Zope CVS', + 'url':'http://dev.zope.org/CVS/'}) subitems=[] @@ -80,8 +96,10 @@ 'subitems':subitems}) subitems.append({'label':'Report Bugs', 'url':'http://collector.zope.org/Zope/'}) -subitems.append({'label':'Mailing Lists', 'url':'/Resources/MailingLists'}) -subitems.append({'label':'User Groups', 'url':'/Resources/UserGroups/'}) +subitems.append({'label':'Mailing Lists', + 'url':'http://www.zope.org/Resources/MailingLists'}) +subitems.append({'label':'User Groups', + 'url':'http://www.zope.org/Resources/UserGroups/'}) subitems=[] From brian at zope.com Wed Aug 6 12:04:51 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:14 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV - __init__.py:1.30 Message-ID: <200308061604.h76G4pB01021@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV In directory cvs.zope.org:/tmp/cvs-serv994 Modified Files: __init__.py Log Message: fix another indent === Products/ZopeOrg-NV/__init__.py 1.29 => 1.30 === if url and (url.endswith('portal_catalog') or \ url.endswith('portal_catalog/') or \ url.endswith('portal_catalog/index_html')): - log('TTW call of portal_catalog. Referer: %s' % + log('TTW call of portal_catalog. Referer: %s' % REQUEST.get('HTTP_REFERER', '')) raise ValueError, 'catalog not callable from the web' From chrism at zope.com Wed Aug 6 13:52:57 2003 From: chrism at zope.com (Chris McDonough) Date: Sun Aug 10 17:02:14 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - frontpage_menu_items.py:1.7 Message-ID: <200308061752.h76Hqvs21238@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv21218 Modified Files: frontpage_menu_items.py Log Message: Make links dynamic. === Products/ZopeOrg-NV/skins/nzo/frontpage_menu_items.py 1.6 => 1.7 === ##title= ## menu = [] +portal_url = container.portal_url() subitems=[] menu.append({'label':'About Zope', - 'url':'http://www.zope.org/WhatIsZope', + 'url':'%s/WhatIsZope' % portal_url, 'subitems':subitems}) subitems.append({'label':'What Is Zope?', - 'url':'http://www.zope.org/WhatIsZope'}) + 'url':'%s/WhatIsZope' % portal_url}) subitems.append({'label':'Zope Powered Sites', - 'url':'http://www.zope.org/Resources/ZopePowered/'}) + 'url':'%s/Resources/ZopePowered/' % portal_url}) subitems.append({'label':'About Zope.org', - 'url':'http://www.zope.org/About/'}) + 'url':'%s/About/' % portal_url}) subitems.append({'label':'Zope News', - 'url':'http://www.zope.org/news'}) + 'url':'%s/news' % portal_url}) subitems=[] menu.append({'label':'Business', - 'url':'http://www.zope.org/Resources/ZSP/', + 'url':'%s/Resources/ZSP/' % portal_url, 'subitems':subitems}) subitems.append({'label':'Zope Corporation', 'url':'http://www.zope.com', 'new' : 1}) subitems.append({'label':'Solution Providers', - 'url':'http://www.zope.org/Resources/ZSP/'}) + 'url':'%s/Resources/ZSP/' % portal_url}) subitems.append({'label':'Zope Hosting', 'url':'http://www.google.com/search?q=Zope+hosting', 'new': 1}) - subitems=[] menu.append({'label':'Documentation', - 'url':'http://www.zope.org/Documentation/', + 'url':'%s/Documentation/' % portal_url, 'subitems':subitems}) subitems.append({'label':'The Zope Book', - 'url':'http://www.zope.org/Documentation/Books/ZopeBook/current'}) + 'url':'%s/Documentation/Books/ZopeBook/current' % portal_url}) subitems.append({'label':'Developer Guide', - 'url':'http://www.zope.org/Documentation/Books/ZDG/current'}) + 'url':'%s/Documentation/Books/ZDG/current' % portal_url}) subitems.append({'label':'Administrator Guide', - 'url':'http://www.zope.org/Documentation/Guides/ZAG'}) + 'url':'%s/Documentation/Guides/ZAG' % portal_url}) subitems.append({'label':'API reference', - 'url':'http://www.zope.org/Documentation/Books/ZopeBook/current/AppendixB.stx'}) + 'url':'%s/Documentation/Books/ZopeBook/current/AppendixB.stx' % portal_url}) subitems.append({'label':'ZPT reference', - 'url':'http://www.zope.org/Documentation/Books/ZopeBook/current/AppendixC.stx'}) + 'url':'%s/Documentation/Books/ZopeBook/current/AppendixC.stx' % portal_url}) subitems.append({'label':'Using The CMF', 'url':'http://cmf.zope.org/Members/beehive/ZWACKChap5.html'}) subitems.append({'label':'Zope Articles', - 'url':'http://www.zope.org/Resources/Articles/'}) + 'url':'%s/Resources/Articles/' % portal_url}) subitems.append({'label':'Zope How-Tos', - 'url':'http://www.zope.org/Documentation/How-To/'}) + 'url':'%s/Documentation/How-To/' % portal_url}) subitems.append({'label':'Books In Print', 'url':'http://www.zope.com/Developers/Books/', 'new': 1}) @@ -69,12 +69,12 @@ subitems=[] menu.append({'label':'Download', - 'url':'http://www.zope.org/Products/', + 'url':'%s/Products/' % portal_url, 'subitems':subitems}) subitems.append({'label':'Download Zope', - 'url':'http://www.zope.org/Products/'}) + 'url':'%s/Products/' % portal_url}) subitems.append({'label':'Zope Products', - 'url':'http://www.zope.org/Products/'}) + 'url':'%s/Products/' % portal_url}) subitems.append({'label':'Zope CMF', 'url':'http://cmf.zope.org/'}) @@ -97,9 +97,9 @@ subitems.append({'label':'Report Bugs', 'url':'http://collector.zope.org/Zope/'}) subitems.append({'label':'Mailing Lists', - 'url':'http://www.zope.org/Resources/MailingLists'}) + 'url':'%s/Resources/MailingLists' % portal_url}) subitems.append({'label':'User Groups', - 'url':'http://www.zope.org/Resources/UserGroups/'}) + 'url':'%s/Resources/UserGroups/' % portal_url}) subitems=[] From chrism at zope.com Wed Aug 6 14:35:36 2003 From: chrism at zope.com (Chris McDonough) Date: Sun Aug 10 17:02:14 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - search.pt:1.3 Message-ID: <200308061835.h76IZak28063@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv27960 Modified Files: search.pt Log Message: Changes from Andrew to fix reviewing. === Products/ZopeOrg-NV/skins/nzo/search.pt 1.2 => 1.3 === metal:use-macro="here/main_template/macros/master">
+ tal:define="global results python:(request.get('SearchableText', None) or request.get('review_state', None)) and here.doFormSearch( REQUEST=request ) or []; + global pss modules/Products.PythonScripts.standard; + global SearchableText request/SearchableText|nothing"> -
+
You searched for: + tal:attributes="value SearchableText" />
@@ -29,9 +30,10 @@ Results 1-10 of 290. - + Searching Zope.org for search term + tal:content="SearchableText">search term +
@@ -162,7 +164,7 @@ -
+
@@ -170,7 +172,7 @@ You searched for: + tal:attributes="value SearchableText" />
From brian at zope.com Wed Aug 6 15:42:02 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:14 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV - __init__.py:1.31 Message-ID: <200308061942.h76Jg2H06041@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV In directory cvs.zope.org:/tmp/cvs-serv6020 Modified Files: __init__.py Log Message: Move sort_limit fix to monkey-patch. === Products/ZopeOrg-NV/__init__.py 1.30 => 1.31 === REQUEST.get('HTTP_REFERER', '')) raise ValueError, 'catalog not callable from the web' + + if not kw.has_key('sort_limit'): + kw['sort_limit'] = 200 + return apply(_searchResults, (self, REQUEST), kw) CatalogTool.__call__ = searchResults From chrism at zope.com Thu Aug 7 00:52:28 2003 From: chrism at zope.com (Chris McDonough) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins - add_ldap_attributes.py:1.1 register.py:1.1 registered_notify_template.pt:1.1 Message-ID: <200308070452.h774qSq27375@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins In directory cvs.zope.org:/tmp/cvs-serv27278 Added Files: add_ldap_attributes.py register.py registered_notify_template.pt Log Message: Hack to make mailout work... override templates in Plone to deal with LDAP member data. === Added File Products/ZopeOrg-NV/skins/add_ldap_attributes.py === ## Script (Python) "add_ldap_attributes" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=request ##title=Register a User ## if request.form.get('cn') is None: request.form['cn'] = request['username'] if request.form.get('givenName') is None: request.form['givenName'] = request['fullname'] if request.form.get('lastName') is None: request.form['lastName'] = '' if request.form.get('mail') is None: email_addr = request['email'] request.form['mail'] = email_addr if request.form.get('o') is None: request.form['o']= '' if request.form.get('portalSkin') is None: request.form['portalSkin'] = 'NZO' if request.form.get('public') is None: request.form['public'] = '' #if request.form.get('prevLogin') is None: # request.form['prevLogin'] = str(request['prev_visit']) # #if request.form.get('lastLogin') is None: # request.form['lastLogin'] = str(request['last_visit']) return request === Added File Products/ZopeOrg-NV/skins/register.py === ## Script (Python) "register" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=password='password', confirm='confirm' ##title=Register a User ## REQUEST=context.REQUEST # add LDAP attributes REQUEST = context.add_ldap_attributes(REQUEST) errors = {} portal_registration=context.portal_registration site_properties=context.portal_properties.site_properties username = REQUEST['username'] password=REQUEST.get('password') or portal_registration.generatePassword() portal_registration.addMember(username, password, properties=REQUEST) if site_properties.validate_email or REQUEST.get('mail_me', 0): try: portal_registration.registeredNotify(username) except: context.plone_utils.logException() exception = context.plone_utils.exceptionString() errors['email'] = 'We were unable to send your password to this address.' return ('failure', context, {'portal_status_message':exception, 'errors':errors, 'came_from':context.REQUEST.get('came_from','logged_in')}) return ('success', context, {'portal_status_message':context.REQUEST.get('portal_status_message', 'Registered.'),\ 'came_from':context.REQUEST.get('came_from','logged_in')}) === Added File Products/ZopeOrg-NV/skins/registered_notify_template.pt === To: From: "" <> Subject: Portal Membership Information Content-Type: text/plain; charset=
You have been registered as a member of , which allows you to personalize your view of the website and participate in the community. Description: Visit us at Your login name and password are: Login name : Password :
-- From chrism at zope.com Thu Aug 7 01:01:10 2003 From: chrism at zope.com (Chris McDonough) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins - add_ldap_attributes.py:NONE register.py:NONE registered_notify_template.pt:NONE Message-ID: <200308070501.h7751AX28967@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins In directory cvs.zope.org:/tmp/cvs-serv28904 Removed Files: add_ldap_attributes.py register.py registered_notify_template.pt Log Message: These were added in the wrong place. === Removed File Products/ZopeOrg-NV/skins/add_ldap_attributes.py === === Removed File Products/ZopeOrg-NV/skins/register.py === === Removed File Products/ZopeOrg-NV/skins/registered_notify_template.pt === From chrism at zope.com Thu Aug 7 01:01:14 2003 From: chrism at zope.com (Chris McDonough) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - add_ldap_attributes.py:1.1 register.py:1.1 registered_notify_template.pt:1.1 Message-ID: <200308070501.h7751Ex28992@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv28904/nzo Added Files: add_ldap_attributes.py register.py registered_notify_template.pt Log Message: These were added in the wrong place. === Added File Products/ZopeOrg-NV/skins/nzo/add_ldap_attributes.py === ## Script (Python) "add_ldap_attributes" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=request ##title=Register a User ## if request.form.get('cn') is None: request.form['cn'] = request['username'] if request.form.get('givenName') is None: request.form['givenName'] = request['fullname'] if request.form.get('lastName') is None: request.form['lastName'] = '' if request.form.get('mail') is None: email_addr = request['email'] request.form['mail'] = email_addr if request.form.get('o') is None: request.form['o']= '' if request.form.get('portalSkin') is None: request.form['portalSkin'] = 'NZO' if request.form.get('public') is None: request.form['public'] = '' #if request.form.get('prevLogin') is None: # request.form['prevLogin'] = str(request['prev_visit']) # #if request.form.get('lastLogin') is None: # request.form['lastLogin'] = str(request['last_visit']) return request === Added File Products/ZopeOrg-NV/skins/nzo/register.py === ## Script (Python) "register" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=password='password', confirm='confirm' ##title=Register a User ## REQUEST=context.REQUEST # add LDAP attributes REQUEST = context.add_ldap_attributes(REQUEST) errors = {} portal_registration=context.portal_registration site_properties=context.portal_properties.site_properties username = REQUEST['username'] password=REQUEST.get('password') or portal_registration.generatePassword() portal_registration.addMember(username, password, properties=REQUEST) if site_properties.validate_email or REQUEST.get('mail_me', 0): try: portal_registration.registeredNotify(username) except: context.plone_utils.logException() exception = context.plone_utils.exceptionString() errors['email'] = 'We were unable to send your password to this address.' return ('failure', context, {'portal_status_message':exception, 'errors':errors, 'came_from':context.REQUEST.get('came_from','logged_in')}) return ('success', context, {'portal_status_message':context.REQUEST.get('portal_status_message', 'Registered.'),\ 'came_from':context.REQUEST.get('came_from','logged_in')}) === Added File Products/ZopeOrg-NV/skins/nzo/registered_notify_template.pt === To: From: "" <> Subject: Portal Membership Information Content-Type: text/plain; charset=
You have been registered as a member of , which allows you to personalize your view of the website and participate in the community. Description: Visit us at Your login name and password are: Login name : Password :
-- From chrism at zope.com Thu Aug 7 01:58:21 2003 From: chrism at zope.com (Chris McDonough) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/CMFLDAP-2.0b1-zopeorg Products/CMFLDAP-2.0b1-zopeorg - Imported sources Message-ID: <200308070558.h775wLi05945@cvs.baymountain.com> Update of /cvs-zopeorg/Products/CMFLDAP-2.0b1-zopeorg In directory cvs.zope.org:/tmp/cvs-serv5862 Log Message: Slightly hacked version of CMFLDAP for use with Zope.org (the only module that is initially changed is LDAPMembershipTool.py). Status: Vendor Tag: zc Release Tags: start N Products/CMFLDAP-2.0b1-zopeorg/CHANGES.txt N Products/CMFLDAP-2.0b1-zopeorg/INSTALL.txt N Products/CMFLDAP-2.0b1-zopeorg/LDAPMemberDataTool.py N Products/CMFLDAP-2.0b1-zopeorg/LDAPMembershipTool.py N Products/CMFLDAP-2.0b1-zopeorg/LICENSE.txt N Products/CMFLDAP-2.0b1-zopeorg/PloneLDAPMembershipTool.py N Products/CMFLDAP-2.0b1-zopeorg/README.txt N Products/CMFLDAP-2.0b1-zopeorg/VERSION.txt N Products/CMFLDAP-2.0b1-zopeorg/__init__.py N Products/CMFLDAP-2.0b1-zopeorg/tool.gif N Products/CMFLDAP-2.0b1-zopeorg/Extensions/Install.py N Products/CMFLDAP-2.0b1-zopeorg/dtml/memberdataContents.dtml N Products/CMFLDAP-2.0b1-zopeorg/skins/cmfldap/join_form.pt N Products/CMFLDAP-2.0b1-zopeorg/skins/cmfldap/mail_password_form.pt N Products/CMFLDAP-2.0b1-zopeorg/skins/cmfldap/mail_password_template.dtml N Products/CMFLDAP-2.0b1-zopeorg/skins/cmfldap/personalize_form.pt N Products/CMFLDAP-2.0b1-zopeorg/skins/cmfldap/register.py No conflicts created by this import From chrism at zope.com Thu Aug 7 02:02:02 2003 From: chrism at zope.com (Chris McDonough) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: NZO_SiteLayoutRedux - zproduct_targets.mk:1.9 Message-ID: <200308070602.h77622B06823@cvs.baymountain.com> Update of /cvs-zopeorg/NZO_SiteLayoutRedux In directory cvs.zope.org:/tmp/cvs-serv6686 Modified Files: zproduct_targets.mk Log Message: Use a slightly hacked version of CMFLDAP for Zope.org (LDAPMembershipTool.py's addMember stuffs the password in the newly created user object). === NZO_SiteLayoutRedux/zproduct_targets.mk 1.8 => 1.9 === src/ZopeProfiler-NV: CVS_TAG= src/CMFLDAP-2.0b1: CVS_REPOSITORY=${ZOPEORG_CVS_REPOSITORY} -src/CMFLDAP-2.0b1: CVS_MODULE=Products/CMFLDAP-2.0b1 +src/CMFLDAP-2.0b1: CVS_MODULE=Products/CMFLDAP-2.0b1-zopeorg src/CMFLDAP-2.0b1: CVS_TAG= src/LDAPUserFolder-2.2b2: CVS_REPOSITORY=${ZOPEORG_CVS_REPOSITORY} From jens at zope.com Thu Aug 7 11:44:24 2003 From: jens at zope.com (Jens Vagelpohl) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/Extensions - synchronizeSkeleton.py:1.32 Message-ID: <200308071544.h77FiOn08303@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/Extensions In directory cvs.zope.org:/tmp/cvs-serv8225 Modified Files: synchronizeSkeleton.py Log Message: - Just log a failure instead of blowing up completely === Products/ZopeOrg-NV/Extensions/synchronizeSkeleton.py 1.31 => 1.32 === if not hasattr( aq_base( cur_obj ), elem_id ) or getattr(cur_obj, elem_id) is None: _createObject( cur_obj, path ) - cur_obj = getattr( cur_obj, elem_id ) + try: + cur_obj = getattr( cur_obj, elem_id ) + except AttributeError: + log.append(' * FAILED TO CREATE "%s" in "%s" FROM "%s"' % ( + elem_id, cur_obj.absolute_url(), fs_file) ) return string.join( log, '\n' ) From brian at zope.com Thu Aug 7 17:01:10 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - frontpage_menu_items.py:1.8 Message-ID: <200308072101.h77L1AK27693@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv27666 Modified Files: frontpage_menu_items.py Log Message: added back some zope exits === Products/ZopeOrg-NV/skins/nzo/frontpage_menu_items.py 1.7 => 1.8 === subitems=[] menu.append({'label':'Zope Exits', 'url':'', 'subitems':subitems}) -subitems.append({'label':'ZopeZen', 'url':'http://www.zopezen.org', - 'new': 1}) -subitems.append({'label':'Zope Newbies', 'url':'http://www.zopenewbies.net', - 'new': 1}) -subitems.append({'label':'Plone', 'url':'http://www.plone.org', - 'new': 1}) -subitems.append({'label':'ZopeLabs', 'url':'http://www.zopelabs.com', - 'new': 1}) -subitems.append({'label':'Zope Europe', 'url':'http://www.zope-europe.org', - 'new': 1}) -subitems.append({'label':'OzZope', 'url':'http://www.ozzope.org', - 'new': 1}) -subitems.append({'label':'Zope.it', 'url':'http://www.zope.it', + +subitems.append({'label':'ZopeZen', + 'url':'http://www.zopezen.org', + 'new': 1}) + +subitems.append({'label':'Zope Newbies', + 'url':'http://www.zopenewbies.net', + 'new': 1}) + +subitems.append({'label':'Plone', + 'url':'http://www.plone.org', + 'new': 1}) + +subitems.append({'label':'ZopeLabs', + 'url':'http://www.zopelabs.com', + 'new': 1}) + +subitems.append({'label':'Zope Europe', + 'url':'http://www.zope-europe.org', + 'new': 1}) + +subitems.append({'label':'German Zope User Group', + 'url':'http://www.zope-europe.org', + 'new': 1}) + +subitems.append({'label':'Zope Italia', + 'url':'http://www.zope.it', + 'new': 1}) + +subitems.append({'label':'Zope Brazil', + 'url':'http://www.tchezope.org', + 'new': 1}) + +subitems.append({'label':'OzZope', + 'url':'http://www.ozzope.org', 'new': 1}) From brian at zope.com Thu Aug 7 17:10:04 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - frontpage_menu_items.py:1.9 Message-ID: <200308072110.h77LA4K29065@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv29029 Modified Files: frontpage_menu_items.py Log Message: fixed url === Products/ZopeOrg-NV/skins/nzo/frontpage_menu_items.py 1.8 => 1.9 === 'url':'http://www.zope-europe.org', 'new': 1}) -subitems.append({'label':'German Zope User Group', - 'url':'http://www.zope-europe.org', +subitems.append({'label':'Zope Germany', + 'url':'http://www.dzug.org', 'new': 1}) subitems.append({'label':'Zope Italia', From jens at zope.com Fri Aug 8 09:30:57 2003 From: jens at zope.com (Jens Vagelpohl) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/CMFLDAP-2.0b1-zopeorg - LDAPMemberDataTool.py:1.2 Message-ID: <200308081330.h78DUv622759@cvs.baymountain.com> Update of /cvs-zopeorg/Products/CMFLDAP-2.0b1-zopeorg In directory cvs.zope.org:/tmp/cvs-serv22745 Modified Files: LDAPMemberDataTool.py Log Message: - wrong method call === Products/CMFLDAP-2.0b1-zopeorg/LDAPMemberDataTool.py 1.1.1.1 => 1.2 === ) acl.manage_editUser(dn, kwargs=mapping) - user_obj._expire() + acl._expireUser(user_obj) except: pass From jens at zope.com Fri Aug 8 10:35:15 2003 From: jens at zope.com (Jens Vagelpohl) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - join_form.pt:1.1 personalize.py:1.3 personalize_form.pt:1.1 main_template.pt:1.5 register.py:1.2 Message-ID: <200308081435.h78EZFq00515@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv417 Modified Files: main_template.pt register.py Added Files: join_form.pt personalize.py personalize_form.pt Log Message: - put some of the membership skins stuff into nzo skins folder - make it work again === Added File Products/ZopeOrg-NV/skins/nzo/join_form.pt ===

Please register

By registering with us, you will have your own account with the possibility to have personalized content, and you will be able to add your own documents, images and files to the site.

Personal Details
Full Name
Error
User Name
Error
E-mail
Error
Password
Error
Confirm
Password
Error
Mail Password?
A password will be generated and e-mailed to you to complete the registration process.
Property Name
 
##### HIDDEN VARIABLES FOR THE FORM_TOOL -- CUT AND PASTE THESE INTO YOUR FORM ####
=== Products/ZopeOrg-NV/skins/nzo/personalize.py 1.2 => 1.3 === +## Script (Python) "personalize" +##title=Personalization Handler. +##parameters= +REQUEST=context.REQUEST +member = context.portal_membership.getAuthenticatedMember() + +failMessage = context.portal_registration.testPropertiesValidity(REQUEST, + member) +if failMessage: + REQUEST.set('portal_status_message', failMessage) + return context.personalize_form(context, REQUEST, + portal_status_message=failMessage) + +member.setProperties(REQUEST) + +if REQUEST.has_key('portal_skin'): + context.portal_skins.updateSkinCookie() + +qs = '/personalize_form?portal_status_message=Member+changed.' + +context.REQUEST.RESPONSE.redirect(context.portal_url() + qs) === Added File Products/ZopeOrg-NV/skins/nzo/personalize_form.pt ===

My Preferences

Click here to change your password.

Member Details
Full name
Error
E-mail
Error
Content editor
Property Name
Listed status

Form Help

Display Names

Look
Portrait

 
=== Products/ZopeOrg-NV/skins/nzo/main_template.pt 1.4 => 1.5 === wf_actions actions/workflow; folder_actions actions/folder; local_actions python:actions.get('object_tabs', []); - isFolder python:test(here.getTypeInfo().getId() in site_properties.use_folder_tabs,1,0); + typ here/getTypeInfo|nothing; + isFolder python:test(typ and typ.getId() in site_properties.use_folder_tabs,1,0); template_id options/template_id|template_id|template/getId|nothing; slots_mapping options/slots_mapping|here/prepare_slots|nothing; Iterator python:modules['Products.CMFPlone'].IndexIterator; === Products/ZopeOrg-NV/skins/nzo/register.py 1.1 => 1.2 === ## Script (Python) "register" -##bind container=container -##bind context=context -##bind namespace= -##bind script=script -##bind subpath=traverse_subpath +##title=Register a user +##bind namespace=_ ##parameters=password='password', confirm='confirm' -##title=Register a User -## REQUEST=context.REQUEST - -# add LDAP attributes -REQUEST = context.add_ldap_attributes(REQUEST) errors = {} -portal_registration=context.portal_registration -site_properties=context.portal_properties.site_properties - -username = REQUEST['username'] - -password=REQUEST.get('password') or portal_registration.generatePassword() -portal_registration.addMember(username, password, properties=REQUEST) - -if site_properties.validate_email or REQUEST.get('mail_me', 0): - try: - portal_registration.registeredNotify(username) - except: - context.plone_utils.logException() - exception = context.plone_utils.exceptionString() - errors['email'] = 'We were unable to send your password to this address.' - return ('failure', context, {'portal_status_message':exception, - 'errors':errors, - 'came_from':context.REQUEST.get('came_from','logged_in')}) +portal_registration = context.portal_registration +site_properties = context.portal_properties.site_properties -return ('success', context, {'portal_status_message':context.REQUEST.get('portal_status_message', 'Registered.'),\ - 'came_from':context.REQUEST.get('came_from','logged_in')}) +email = REQUEST.get('mail', '') or REQUEST.get('email', '') or '' +REQUEST.set('email', email) +REQUEST.form['mail'] = email + +if not site_properties.validate_email: + failMessage = portal_registration.testPasswordValidity(password, confirm) + if failMessage: + REQUEST.set( 'error', failMessage ) + return context.join_form( context, REQUEST, error=failMessage ) + +failMessage = portal_registration.testPropertiesValidity(REQUEST) + +if failMessage: + REQUEST.set( 'error', failMessage ) + return context.join_form( context, REQUEST, error=failMessage ) + +else: + password=REQUEST.get('password') or portal_registration.generatePassword() + portal_registration.addMember(REQUEST['username'], password, properties=REQUEST) + + if site_properties.validate_email or REQUEST.get('mail_me', 0): + portal_registration.registeredNotify(REQUEST['username']) + + msg = REQUEST.get('portal_status_message', 'Registered.') + + #return context.registered( context, REQUEST ) + return ( 'success' + , context + , { 'portal_status_message' : msg + , 'came_from' : REQUEST.get('came_from','logged_in') + } + ) From jens at zope.com Fri Aug 8 10:35:45 2003 From: jens at zope.com (Jens Vagelpohl) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV - ZopeOrgMemberDataTool.py:1.4 ZopeOrgMembershipTool.py:1.6 __init__.py:1.32 Message-ID: <200308081435.h78EZj700630@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV In directory cvs.zope.org:/tmp/cvs-serv572 Modified Files: __init__.py Added Files: ZopeOrgMemberDataTool.py ZopeOrgMembershipTool.py Log Message: - new day, new CMF tools === Products/ZopeOrg-NV/ZopeOrgMemberDataTool.py 1.3 => 1.4 === +##################################################################### +# +# ZopeOrgMemberDataTool LDAP-enabled CMF Memberdata Tool +# +# This software is governed by a license. See +# LICENSE.txt for the terms of this license. +# +##################################################################### +__version__='$Revision$'[11:-2] + + +from Products.CMFCore.utils import getToolByName +from Products.CMFLDAP.LDAPMemberDataTool import LDAPMemberDataTool +from Products.CMFLDAP.LDAPMemberDataTool import LDAPMemberData +from Globals import Acquisition, InitializeClass, DTMLFile +from Acquisition import aq_base +from ZPublisher.Converters import type_converters +from AccessControl import ClassSecurityInfo +from time import strftime, localtime, time +import string, re + +_marker=[] + + +class ZopeOrgMemberData( LDAPMemberData ): + security = ClassSecurityInfo() + + def __init__( self, tool, id ): + self.id = id + # Make a temporary reference to the tool. + # The reference will be removed by notifyModified(). + self._tool = tool + + + def getProperty( self, id, default=_marker ): + """ Need to "defuse" the exception-happy standard implementation""" + try: + inherited_method = ZopeOrgMemberData.inheritedAttribute( 'getProperty' ) + prop_val = apply( inherited_method, ( self, id, default ) ) + except: + prop_val = '' + + return prop_val + + + security.declarePrivate('setLastLogin') + def setLastLogin( self ): + """ Reset my last login times """ + user_obj = self.getUser() + user_dn = user_obj.getUserDN() + acl_manager = self.acl_users + + last_login = user_obj.getProperty('lastLogin') or '20000101000000Z' + acl_manager.manage_setUserProperty( user_dn = user_dn + , prop_name = 'prevLogin' + , prop_value = last_login + ) + + new_login = strftime('%Y%m%d%H%M%SZ', localtime(time())) + acl_manager.manage_setUserProperty( user_dn = user_dn + , prop_name = 'lastLogin' + , prop_value = new_login + ) + acl_manager._expireUser(user_obj) + + + security.declarePrivate('setStartupPage') + def setStartupPage( self, target_obj ): + """ Set the member's default startup page """ + url_tool = getToolByName( self, 'portal_url' ) + startup_page = url_tool.getRelativeContentURL( target_obj ) + user_obj = self.getUser() + user_dn = user_obj.getUserDN() + acl_manager = self.acl_users + + acl_manager.manage_setUserProperty( user_dn = user_dn + , prop_name = 'startupPage' + , prop_value = startup_page + ) + acl_manager._expireUser(user_obj) + + + security.declarePublic( 'getStartupPage' ) + def getStartupPage( self ): + """ return the member's startup page """ + try: + s_url = self.getProperty( 'startupPage' ) + except: # No startup page in record + return None + + try: + self.unrestrictedTraverse( s_url ) + except: + s_url = None + + return s_url + + +InitializeClass( ZopeOrgMemberData ) + +class ZopeOrgMemberDataTool( LDAPMemberDataTool ): + '''This tool wraps user objects, making them act as Member objects. + ''' + security = ClassSecurityInfo() + meta_type = 'Zope.Org Member Data Tool' + title = 'Zope.Org Member Data Tool' + manage_showContents = DTMLFile('dtml/memberdataContents', globals()) + + + def __init__( self, id='portal_memberdata' ): + self.id = id + LDAPMemberDataTool.__init__( self, id ) + self._setProperty('listed', '', 'boolean') + self._setProperty('formtooltips', '', 'boolean') + + def wrapUser( self, u ): + """ + If possible, returns the Member object that corresponds + to the given User object. + """ + id = u.getUserName() + members = self._members + + if not members.has_key( id ): + # Get a temporary member that might be + # registered later via registerMemberData(). + temps = self._v_temps + + if temps is not None and temps.has_key( id ): + m = temps[id] + else: + base = aq_base( self ) + m = ZopeOrgMemberData( base, id ) + + if temps is None: + self._v_temps = { id : m } + else: + temps[id] = m + else: + m = members[id] + + # Return a wrapper with self as containment and + # the user as context. + return m.__of__( self ).__of__( u ) + + +InitializeClass( ZopeOrgMemberDataTool ) + + + + +def manage_addZopeOrgMemberDataTool( self, REQUEST=None ): + """ Need factory method for some special processing """ + id = 'portal_memberdata' + + memdata_tool = ZopeOrgMemberDataTool( id ) + self._setObject( id, memdata_tool ) + + if REQUEST is not None: + return self.manage_main(self, REQUEST) === Products/ZopeOrg-NV/ZopeOrgMembershipTool.py 1.5 => 1.6 === +##################################################################### +# +# LDAPMembershipTool LDAP-enabled CMF Membership Tool +# +# This software is governed by a license. See +# LICENSE.txt for the terms of this license. +# +##################################################################### +__version__='$Revision$'[11:-2] + +import re, os.path +from Products.CMFLDAP.LDAPMembershipTool import LDAPMembershipTool +from Products.CMFCore.utils import _getAuthenticatedUser, _checkPermission, \ + getToolByName +from Products.CMFCore.CMFCorePermissions import ManagePortal, SetOwnProperties +from Products.CMFCore.CMFCorePermissions import AccessContentsInformation +from Products.CMFCore.CMFCorePermissions import AddPortalContent, View +from ZopeOrgPermissions import AnointMaintainer, DemoteMaintainer +from Products.CMFCore.ActionInformation import ActionInformation +from Products.CMFCore.Expression import Expression +from Products.CMFCore.PortalFolder import manage_addPortalFolder +from Products.CMFDefault.SkinnedFolder import addSkinnedFolder +from Products.CMFDefault import Document +from Globals import InitializeClass, DTMLFile +from Acquisition import aq_inner, aq_parent +from AccessControl import ClassSecurityInfo +from DateTime import DateTime + + +class ZopeOrgMembershipTool( LDAPMembershipTool ): + """ LDAP-enabled CMF Membership Tool """ + security = ClassSecurityInfo() + meta_type = 'Zope.Org Membership Tool' + title = 'Zope.Org Membership Tool' + manage_mapRoles = DTMLFile('dtml/membershipRolemapping', globals()) + + + def __init__( self, id='portal_membership' ): + self.id = id + + + security.declarePublic( 'getSearchableAttributes' ) + def getUserSearchableAttributes( self ): + """ get user attributes that are allowed for searching """ + excluded = ( 'lastLogin', 'prevLogin', 'public' + , 'startupPage', 'portalSkin', 'cn' ) + + attrs = list( self.acl_users.getLDAPSchema() ) + deletables = [] + + for attr in attrs: + if attr[0] in excluded: + deletables.append( attr ) + + for deletable in deletables: + del attrs[attrs.index( deletable )] + + attrs.sort( self._schemaSort ) + + return tuple( attrs ) + + + security.declarePrivate( '_schemaSort' ) + def _schemaSort( self, a, b ): + """ sorting for nice looks on personalize page """ + return cmp( a[1], b[1] ) + + + def getRoster( self, search_param="cn", search_term='' ): + """ get the membership roster """ + isManager = _checkPermission('Manage portal', self) + uf = self.acl_users + results = uf.findUser( search_param=search_param + , search_term=search_term + ) + + if not isManager: + results = filter( lambda x: int( x.get( 'public', 0 ) ) != 0 + , results + ) + + return results + + + def searchMembers( self, search_param, search_term ): + """ Search the membership """ + uf = self.acl_users + results = uf.findUser( search_param=search_param + , search_term=search_term + ) + return results + + + def getCandidateLocalRoles( self, obj ): + """ What local roles can I assign? """ + member = self.getAuthenticatedMember() + + if 'Manager' in member.getRoles(): + return self.getPortalRoles() + else: + member_roles = list( member.getRolesInContext( obj ) ) + for forbidden in ( 'Anonymous' + , 'Maintainer' + , 'Pending Maintainer' + , 'Member' + ): + if forbidden in member_roles: + del member_roles[member_roles.index( forbidden )] + + return member_roles + + + def createMemberarea( self, id ): + """ Create this member's home area """ + mem_folder = getattr( aq_parent( aq_inner( self ) ), 'Members', None ) + if mem_folder is not None: + user = self.acl_users.getUser( id ) + # Create Member's home folder + # check to avoid collision with automatic member area creation + if user is not None and id not in mem_folder.objectIds(): + f_title = "%s's Home" % id + addSkinnedFolder( mem_folder, id, f_title ) + f = getattr( mem_folder, id ) + f._setPortalTypeName( 'Member Folder' ) + + # Grant executable ownership to Member + try: + f.changeOwnership( user.__of__( self.acl_users ) ) + except AttributeError: + pass # Zope 2.1.x compatibility + + # Set owner local role for member + f.manage_setLocalRoles(id, ['Owner']) + + + security.declareProtected(SetOwnProperties, 'getLastLogin') + def getLastLogin( self, member ): + """ Retrieve the last login time and return as DateTime object """ + try: + ll = member.getProperty('lastLogin') or '20000101000000Z' + except: + ll = '20000101000000Z' + yr = ll[0:4] + mo = ll[4:6] + dy = ll[6:8] + hr = ll[8:10] + mn = ll[10:12] + sc = ll[12:14] + + return DateTime('%s/%s/%s %s:%s:%s' % (yr, mo, dy, hr, mn, sc)) + + + security.declareProtected(SetOwnProperties, 'setLastLogin') + def setLastLogin( self ): + """ Update the last login time """ + member = self.getAuthenticatedMember() + + if member is not None: + member.setLastLogin() + + + security.declareProtected(SetOwnProperties, 'setupMemberArea') + def setupMemberArea( self ): + """ Set up my member area """ + member = self.getAuthenticatedMember() + + if member is not None: + member_id = member.getUserName() + mem_folder = getattr( aq_parent( aq_inner( self ) ), 'Members' ) + if not member_id in mem_folder.objectIds(): + self.createMemberarea( member_id ) + + + security.declareProtected(SetOwnProperties, 'setStartupPage') + def setStartupPage( self, target_obj ): + """ Set this member's preferred startup page """ + member = self.getAuthenticatedMember() + + if member is not None: + member.setStartupPage( target_obj ) + + + def listActions( self, info=None ): + """ Lists actions available to the user. """ + actions_list = None + base_list = LDAPMembershipTool.listActions( self, info ) or [] + + ##actions_list = [ ActionInformation( + ## id='Set Start Page', + ## action=Expression( + ## text='string: ${object_url}/setStartPage'), + ## condition=Expression('member'), + ## permissions=[], + ## category='user'), ] + base_list + + return base_list + + +InitializeClass( ZopeOrgMembershipTool ) + + +def manage_addZopeOrgMembershipTool( self, REQUEST=None ): + """ Need factory method for some special processing """ + id = 'portal_membership' + + mem_tool = ZopeOrgMembershipTool( id ) + self._setObject( id, mem_tool ) + + if REQUEST is not None: + return self.manage_main(self, REQUEST) === Products/ZopeOrg-NV/__init__.py 1.31 => 1.32 === from Products.CMFCore.utils import registerIcon, ToolInit, ContentInit from Products.CMFCore.CMFCorePermissions import AddPortalContent from Products.CMFCore import PortalFolder +import ZopeOrgMembershipTool +import ZopeOrgMemberDataTool import ZopeOrgWorkflow import ContentList import Acquisition @@ -115,3 +117,11 @@ ), fti = ftis , ).initialize(context) + + ToolInit( + 'Zope.Org Tools', + tools = ( ZopeOrgMemberDataTool.ZopeOrgMemberDataTool + , ZopeOrgMembershipTool.ZopeOrgMembershipTool + ), + product_name='ZopeOrg', + icon='tool.gif' ).initialize( context ) From jens at zope.com Fri Aug 8 11:34:23 2003 From: jens at zope.com (Jens Vagelpohl) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/Extensions - setupZopeOrgMembership.py:1.17 Message-ID: <200308081534.h78FYNs12938@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/Extensions In directory cvs.zope.org:/tmp/cvs-serv12836/Extensions Modified Files: setupZopeOrgMembership.py Log Message: - last fixes and preparation of external method to transition to new tools smoothly === Products/ZopeOrg-NV/Extensions/setupZopeOrgMembership.py 1.16 => 1.17 === # import string, os -#from Products.LDAPUserFolder.LDAPUserFolder import manage_addLDAPUserFolder +from Products.LDAPUserFolder.LDAPUserFolder import manage_addLDAPUserFolder from Products.ZopeOrg import zopeorg_globals from Products.CMFCore.DirectoryView import addDirectoryViews from Products.CMFCore.utils import getToolByName -#from Products.ZopeOrg.ZopeOrgMembershipTool import ZopeOrgMembershipTool -#from Products.ZopeOrg.ZopeOrgMembershipTool import manage_addZopeOrgMembershipTool -#from Products.ZopeOrg.ZopeOrgMemberDataTool import ZopeOrgMemberDataTool -#from Products.ZopeOrg.ZopeOrgMemberDataTool import manage_addZopeOrgMemberDataTool +from Products.ZopeOrg.ZopeOrgMembershipTool import ZopeOrgMembershipTool +from Products.ZopeOrg.ZopeOrgMembershipTool import manage_addZopeOrgMembershipTool +from Products.ZopeOrg.ZopeOrgMemberDataTool import ZopeOrgMemberDataTool +from Products.ZopeOrg.ZopeOrgMemberDataTool import manage_addZopeOrgMemberDataTool # # List all specially initialized components ######################################################## -# TOOL_CLASSES = ( -# ('portal_membership', ZopeOrgMembershipTool), -# ('portal_memberdata', ZopeOrgMemberDataTool), -# ) - -# if os.environ.get('HOSTNAME', '') in ( 'faux.digicool.com' -# , 'waldorf' -# , 'zoc.zope.com' -# ): -# LDAP_SERVER = 'waldorf.zope.com' -# else: -# LDAP_SERVER = 'storage' - -# LDAP_SCHEMA = [ -# ('cn', 'Login Name'), ('sn', 'Last Name'), -# ('givenName', 'First Name'), ('mail', 'Email Address'), -# ('o', 'Organization'), ('public', 'Listed'), -# ('portalSkin', 'Portal Skin'), ('lastLogin', 'Last Login'), -# ('prevLogin', 'Previous Login'), ('startupPage', 'Start Page') -# ] - -# LDAP_NAME_MAPPINGS = { -# 'mail':'email', -# 'cn':'full_name', -# 'portalSkin':'portal_skin' -# } - -# LDAP_SETTINGS = { 'login_attr' : 'cn' -# , 'rdn_attr' : 'cn' -# , 'users_base' : 'ou=people,dc=zope,dc=org' -# , 'users_scope' : 2 -# , 'groups_base' : 'ou=www.zope.org,ou=websites,ou=groups,dc=zope,dc=org' -# , 'groups_scope' : 2 -# , 'bind_uid' : 'cn=Manager,dc=zope,dc=org' -# , 'bind_pwd' : '5ecret' -# , 'default_roles' : 'Anonymous' -# , 'use_cookies' : 0 -# , 'objectClasses' : 'top,zopeOrgPerson' -# } +TOOL_CLASSES = ( + ('portal_membership', ZopeOrgMembershipTool), + ('portal_memberdata', ZopeOrgMemberDataTool), + ) + +if os.environ.get('HOSTNAME', '') in ( 'faux.digicool.com' + , 'waldorf' + , 'zoc.zope.com' + ): + LDAP_SERVER = 'waldorf.zope.com' +else: + LDAP_SERVER = 'storage' + +LDAP_SCHEMA = [ + ('cn', 'Login Name'), ('sn', 'Last Name'), + ('givenName', 'First Name'), ('mail', 'Email Address'), + ('o', 'Organization'), ('public', 'Listed'), + ('portalSkin', 'Portal Skin'), ('lastLogin', 'Last Login'), + ('prevLogin', 'Previous Login'), ('startupPage', 'Start Page') + ] + +LDAP_NAME_MAPPINGS = { + 'mail':'email', + 'cn':'full_name', + 'portalSkin':'portal_skin' + } + +LDAP_SETTINGS = { 'login_attr' : 'cn' + , 'rdn_attr' : 'cn' + , 'users_base' : 'ou=people,dc=zope,dc=org' + , 'users_scope' : 2 + , 'groups_base' : 'ou=www.zope.org,ou=websites,ou=groups,dc=zope,dc=org' + , 'groups_scope' : 2 + , 'bind_uid' : 'cn=Manager,dc=zope,dc=org' + , 'bind_pwd' : '5ecret' + , 'default_roles' : 'Anonymous' + , 'use_cookies' : 0 + , 'objectClasses' : 'top,zopeOrgPerson' + } # # Initialize the log @@ -69,41 +69,36 @@ # the external method object to be instantiated and run in Zope ######################################################### -# def setupZopeOrgMembership( self ): -# """ The central conversion method """ -# log.append('Starting LDAP Membership conversion\n') - -# # Find the portal to be modified. It is assumed that the external method -# # is instantiated at the root of the portal. -# portal = self -# if portal.meta_type != 'CMF Site': -# return 'You are not running this method inside a CMF Portal Instance!' -# else: -# log.append('Found CMF Site') # at %s' % portal.absolute_url()) - - -# # Instantiate tools that are not in the standard CMF site -# log.append('\n * Instantiating Tools in the portal:') -# for tool_tuple in TOOL_CLASSES: -# registerTool(portal, tool_tuple) - -# # Making LDAP Schema mods to the LDAPUserManager and LDAPLoginAdapter -# log.append('\n * Modifying LDAP tools for our LDAP schema') -# modifyLDAPTools(portal) - -# # Register the skins directories as Filesystem Directory View -# # in the skins tool (portal_skins) -# log.append('\n * Registering skins directories with the Skins Tool:') -# registerSkins(portal) - -# log.append('\nFinished conversion process!\n\n') - -# return string.join(log, '\n') - def setupZopeOrgMembership( self ): """ The central conversion method """ - log.append('LDAP Membership was disabled for now.\n') - return string.join(log, '\n') + log.append('Starting LDAP Membership conversion\n') + + # Find the portal to be modified. It is assumed that the external method + # is instantiated at the root of the portal. + portal = self + if portal.meta_type != 'CMF Site': + return 'You are not running this method inside a CMF Portal Instance!' + else: + log.append('Found CMF Site') # at %s' % portal.absolute_url()) + + + # Instantiate tools that are not in the standard CMF site + log.append('\n * Instantiating Tools in the portal:') + for tool_tuple in TOOL_CLASSES: + registerTool(portal, tool_tuple) + + #### Making LDAP Schema mods to the LDAPUserManager and LDAPLoginAdapter + ###log.append('\n * Modifying LDAP tools for our LDAP schema') + ###modifyLDAPTools(portal) + + #### Register the skins directories as Filesystem Directory View + #### in the skins tool (portal_skins) + ###log.append('\n * Registering skins directories with the Skins Tool:') + ###registerSkins(portal) + + log.append('\nFinished conversion process!\n\n') + + return string.join(log, '\n') # # Helper methods to register varous components with the CMF machinery @@ -115,19 +110,24 @@ tool_obj = tool_tuple[1]() if hasattr(portal_obj, tool_id): + tool = getattr(portal_obj, tool_id) + existing_actions = getattr(tool, '_actions', []) + if tool_id == 'portal_memberdata': - tool = getattr(portal_obj, tool_id) existing_membership = tool._members + portal_obj._delObject(tool_id) if tool_id == 'portal_membership': manage_addZopeOrgMembershipTool(portal_obj) tool = getattr(portal_obj, tool_id) tool.memberareaCreationFlag = 1 + tool._actions = existing_actions elif tool_id == 'portal_memberdata': manage_addZopeOrgMemberDataTool(portal_obj) tool = getattr(portal_obj, tool_id) tool._members = existing_membership + tool._actions = existing_actions else: portal_obj._setObject(tool_id, tool_obj) From jens at zope.com Fri Aug 8 11:34:51 2003 From: jens at zope.com (Jens Vagelpohl) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV - ZopeOrgMemberDataTool.py:1.5 Message-ID: <200308081534.h78FYpe13014@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV In directory cvs.zope.org:/tmp/cvs-serv12836 Modified Files: ZopeOrgMemberDataTool.py Log Message: - last fixes and preparation of external method to transition to new tools smoothly === Products/ZopeOrg-NV/ZopeOrgMemberDataTool.py 1.4 => 1.5 === def __init__( self, id='portal_memberdata' ): self.id = id LDAPMemberDataTool.__init__( self, id ) - self._setProperty('listed', '', 'boolean') - self._setProperty('formtooltips', '', 'boolean') + try: + self._setProperty('listed', '', 'boolean') + except: + pass + + try: + self._setProperty('formtooltips', '', 'boolean') + except: + pass def wrapUser( self, u ): """ From jens at zope.com Fri Aug 8 14:12:20 2003 From: jens at zope.com (Jens Vagelpohl) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - personalize_form.pt:1.2 Message-ID: <200308081812.h78ICKT06444@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv6363 Modified Files: personalize_form.pt Log Message: - be more careful determining the value for the "listed status" === Products/ZopeOrg-NV/skins/nzo/personalize_form.pt 1.1 => 1.2 ===
Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv20038/skins/nzo Modified Files: join_form.pt register.py Log Message: - must create Plone folder, not Skinned Folder. === Products/ZopeOrg-NV/skins/nzo/join_form.pt 1.1 => 1.2 ===
+ tal:define="allowEnterPassword here/portal_properties/site_properties/validate_email|nothing;"> Personal Details === Products/ZopeOrg-NV/skins/nzo/register.py 1.2 => 1.3 === msg = REQUEST.get('portal_status_message', 'Registered.') - #return context.registered( context, REQUEST ) - return ( 'success' - , context - , { 'portal_status_message' : msg - , 'came_from' : REQUEST.get('came_from','logged_in') - } - ) + return context.registered( context, REQUEST ) + ##return ( 'success' + ## , context + ## , { 'portal_status_message' : msg + ## , 'came_from' : REQUEST.get('came_from','logged_in') + ## } + ## ) From jens at zope.com Fri Aug 8 15:35:14 2003 From: jens at zope.com (Jens Vagelpohl) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV - ZopeOrgMembershipTool.py:1.7 Message-ID: <200308081935.h78JZEi20194@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV In directory cvs.zope.org:/tmp/cvs-serv20038 Modified Files: ZopeOrgMembershipTool.py Log Message: - must create Plone folder, not Skinned Folder. === Products/ZopeOrg-NV/ZopeOrgMembershipTool.py 1.6 => 1.7 === from Acquisition import aq_inner, aq_parent from AccessControl import ClassSecurityInfo from DateTime import DateTime +from Products.CMFPlone.MembershipTool import MembershipTool as PloneMembership +from Products.CMFPlone.PloneFolder import addPloneFolder +from Products.CMFDefault.Document import addDocument + +DEFAULT_MEMBER_CONTENT = """\ +Default page for %s + +This is the default document created for you when +you joined this community. + +To change the content just click the 'edit' +tab above. +""" class ZopeOrgMembershipTool( LDAPMembershipTool ): @@ -112,6 +125,75 @@ def createMemberarea( self, id ): """ Create this member's home area """ + ##parent = self.aq_inner.aq_parent + ##members = getattr(parent, 'Members', None) + + ##if members is None: + ## parent.manage_addPloneFolder(id='Members', title='Members') + ## members = getattr(parent, 'Members', None) + + ##if members is not None and not hasattr(members, member_id): + ## f_title = "%s's Home" % member_id + ## try: + ## addPloneFolder(members, id=member_id, title=f_title) + ## except: + ## members.manage_addPloneFolder(id=member_id, title=f_title) + ## f=getattr(members, member_id) + ## # Grant ownership to Member + ## acl_users = self.__getPUS() + ## user = acl_users.getUser(member_id) + ## if user is not None: + ## user= user.__of__(acl_users) + ## else: + ## from AccessControl import getSecurityManager + ## user= getSecurityManager().getUser() + ## # check that we do not do something wrong + ## if user.getUserName() != member_id: + ## raise NotImplementedError, \ + ## 'cannot get user for member area creation' + ## f.changeOwnership(user) + ## f.manage_setLocalRoles(member_id, ['Owner']) + ## # Create Member's home page. + ## # go get the home page text from the skin + ## try: + ## member_content = self.homePageText() + ## except: + ## member_content = DEFAULT_MEMBER_CONTENT + + ## addDocument( f + ## , 'index_html' + ## , member_id+"'s Home Page" + ## , member_id+"'s front page" + ## , "structured-text" + ## , (DEFAULT_MEMBER_CONTENT % member_id) + ## ) + ## f.index_html._setPortalTypeName( 'Document' ) + ## # Overcome an apparent catalog bug. + ## f.index_html.reindexObject() + ## wftool = getToolByName( f, 'portal_workflow' ) + ## wftool.notifyCreated( f.index_html ) + ## #XXX the above is copy/pasted from CMFDefault.MembershipTool only because + ## #its not using invokeFactory('Folder') -- FIX IT! + + ## #XXX Below is what really is Plone customizations + ## member_folder=self.getHomeFolder(member_id) + ## member_folder.description = 'Home page area that contains the items created and ' \ + ## + 'collected by %s' % member_id + + ## member_folder.manage_addPloneFolder('.personal', 'Personal Items') + ## personal=getattr(member_folder, '.personal') + ## personal.description = "contains personal workarea items for %s" % member_id + ## personal.changeOwnership(user) + ## personal.manage_setLocalRoles(member_id, ['Owner']) + + ## catalog = getToolByName(self, 'portal_catalog') + ## catalog.unindexObject(personal) #dont add .personal folders to catalog + + ## # Hook to allow doing other things after memberarea creation. + ## notify_script = getattr(member_folder, 'notifyMemberAreaCreated', None) + + ## if notify_script is not None: + ## notify_script() mem_folder = getattr( aq_parent( aq_inner( self ) ), 'Members', None ) if mem_folder is not None: user = self.acl_users.getUser( id ) @@ -119,9 +201,9 @@ # check to avoid collision with automatic member area creation if user is not None and id not in mem_folder.objectIds(): f_title = "%s's Home" % id - addSkinnedFolder( mem_folder, id, f_title ) + addPloneFolder( mem_folder, id, f_title ) f = getattr( mem_folder, id ) - f._setPortalTypeName( 'Member Folder' ) + #f._setPortalTypeName( 'Member Folder' ) # Grant executable ownership to Member try: @@ -131,6 +213,26 @@ # Set owner local role for member f.manage_setLocalRoles(id, ['Owner']) + + # Create Member's home page. + # go get the home page text from the skin + try: + member_content = self.homePageText() + except: + member_content = DEFAULT_MEMBER_CONTENT + + addDocument( f + , 'index_html' + , id+"'s Home Page" + , id+"'s front page" + , "structured-text" + , (DEFAULT_MEMBER_CONTENT % id) + ) + f.index_html._setPortalTypeName( 'Document' ) + # Overcome an apparent catalog bug. + f.index_html.reindexObject() + wftool = getToolByName( f, 'portal_workflow' ) + wftool.notifyCreated( f.index_html ) security.declareProtected(SetOwnProperties, 'getLastLogin') From brian at zope.com Mon Aug 11 09:58:04 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - frontpage_menu_items.py:1.10 Message-ID: <200308111358.h7BDw4119556@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv19512 Modified Files: frontpage_menu_items.py Log Message: fix abs url on prod site === Products/ZopeOrg-NV/skins/nzo/frontpage_menu_items.py 1.9 => 1.10 === ##title= ## menu = [] -portal_url = container.portal_url() + +# This is needed to keep people from getting 'stuck' in the dev site, + +if context.REQUEST.get('URL', '').find('zope.org') > -1: + root = 'http://www.zope.org' +else: + root = container.portal_url() + subitems=[] menu.append({'label':'About Zope', - 'url':'%s/WhatIsZope' % portal_url, + 'url':'%s/WhatIsZope' % root, 'subitems':subitems}) subitems.append({'label':'What Is Zope?', - 'url':'%s/WhatIsZope' % portal_url}) + 'url':'%s/WhatIsZope' % root}) subitems.append({'label':'Zope Powered Sites', - 'url':'%s/Resources/ZopePowered/' % portal_url}) + 'url':'%s/Resources/ZopePowered/' % root}) subitems.append({'label':'About Zope.org', - 'url':'%s/About/' % portal_url}) + 'url':'%s/About/' % root}) subitems.append({'label':'Zope News', - 'url':'%s/news' % portal_url}) + 'url':'%s/news' % root}) subitems=[] menu.append({'label':'Business', - 'url':'%s/Resources/ZSP/' % portal_url, + 'url':'%s/Resources/ZSP/' % root, 'subitems':subitems}) subitems.append({'label':'Zope Corporation', 'url':'http://www.zope.com', 'new' : 1}) subitems.append({'label':'Solution Providers', - 'url':'%s/Resources/ZSP/' % portal_url}) + 'url':'%s/Resources/ZSP/' % root}) subitems.append({'label':'Zope Hosting', 'url':'http://www.google.com/search?q=Zope+hosting', 'new': 1}) @@ -42,26 +49,26 @@ subitems=[] menu.append({'label':'Documentation', - 'url':'%s/Documentation/' % portal_url, + 'url':'%s/Documentation/' % root, 'subitems':subitems}) subitems.append({'label':'The Zope Book', - 'url':'%s/Documentation/Books/ZopeBook/current' % portal_url}) + 'url':'%s/Documentation/Books/ZopeBook/current' % root}) subitems.append({'label':'Developer Guide', - 'url':'%s/Documentation/Books/ZDG/current' % portal_url}) + 'url':'%s/Documentation/Books/ZDG/current' % root}) subitems.append({'label':'Administrator Guide', - 'url':'%s/Documentation/Guides/ZAG' % portal_url}) + 'url':'%s/Documentation/Guides/ZAG' % root}) subitems.append({'label':'API reference', - 'url':'%s/Documentation/Books/ZopeBook/current/AppendixB.stx' % portal_url}) + 'url':'%s/Documentation/Books/ZopeBook/current/AppendixB.stx' % root}) subitems.append({'label':'ZPT reference', - 'url':'%s/Documentation/Books/ZopeBook/current/AppendixC.stx' % portal_url}) + 'url':'%s/Documentation/Books/ZopeBook/current/AppendixC.stx' % root}) subitems.append({'label':'Using The CMF', 'url':'http://cmf.zope.org/Members/beehive/ZWACKChap5.html'}) subitems.append({'label':'Zope Articles', - 'url':'%s/Resources/Articles/' % portal_url}) + 'url':'%s/Resources/Articles/' % root}) subitems.append({'label':'Zope How-Tos', - 'url':'%s/Documentation/How-To/' % portal_url}) + 'url':'%s/Documentation/How-To/' % root}) subitems.append({'label':'Books In Print', 'url':'http://www.zope.com/Developers/Books/', 'new': 1}) @@ -69,12 +76,12 @@ subitems=[] menu.append({'label':'Download', - 'url':'%s/Products/' % portal_url, + 'url':'%s/Products/' % root, 'subitems':subitems}) subitems.append({'label':'Download Zope', - 'url':'%s/Products/' % portal_url}) + 'url':'%s/Products/' % root}) subitems.append({'label':'Zope Products', - 'url':'%s/Products/' % portal_url}) + 'url':'%s/Products/' % root}) subitems.append({'label':'Zope CMF', 'url':'http://cmf.zope.org/'}) @@ -97,9 +104,9 @@ subitems.append({'label':'Report Bugs', 'url':'http://collector.zope.org/Zope/'}) subitems.append({'label':'Mailing Lists', - 'url':'%s/Resources/MailingLists' % portal_url}) + 'url':'%s/Resources/MailingLists' % root}) subitems.append({'label':'User Groups', - 'url':'%s/Resources/UserGroups/' % portal_url}) + 'url':'%s/Resources/UserGroups/' % root}) subitems=[] From brian at zope.com Mon Aug 11 10:55:17 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - search.pt:1.4 Message-ID: <200308111455.h7BEtHg28572@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv28539 Modified Files: search.pt Log Message: remove dead links === Products/ZopeOrg-NV/skins/nzo/search.pt 1.3 => 1.4 ===
-
@@ -176,11 +171,6 @@ -
From brian at zope.com Mon Aug 11 11:27:08 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - editform.pt:1.2 Message-ID: <200308111527.h7BFR8V01239@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv1210 Modified Files: editform.pt Log Message: fix syntax error === Products/ZopeOrg-NV/skins/nzo/editform.pt 1.1 => 1.2 === (page, request, action=action, text=text, id=id, page=page, oldid=oldid) -
+

Creating @@ -18,6 +19,7 @@ page

+
@@ -102,6 +104,8 @@
In case master has no "footer" macro.
+
+
From brian at zope.com Mon Aug 11 13:21:39 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV - __init__.py:1.33 Message-ID: <200308111721.h7BHLdH20178@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV In directory cvs.zope.org:/tmp/cvs-serv20145 Modified Files: __init__.py Log Message: add vary hack === Products/ZopeOrg-NV/__init__.py 1.32 => 1.33 === CatalogTool.__call__ = searchResults +# Monkey-patch to ensure that (a) a Vary tag is put in the response +# headers of all requests and (b) that the CMF cache policy tool is +# called on all requests. + +from ZServer.HTTPResponse import ZServerHTTPResponse + +real__str__ = ZServerHTTPResponse.__str__ + +def resp__str__(self, func=real__str__): + headers = self.headers + if not (headers.has_key('vary') or headers.has_key('Vary')): + self.setHeader('Vary', 'Cookie') + + return func(self) + +ZServerHTTPResponse.__str__ = resp__str__ + + + + + from Products.CMFDefault.DublinCore import DefaultDublinCoreImpl DefaultDublinCoreImpl._DefaultDublinCoreImpl__FLOOR_DATE = DateTime(1979, 0) DefaultDublinCoreImpl._DefaultDublinCoreImpl__CEILING_DATE = DateTime(2979, 0) From brian at zope.com Wed Aug 20 09:37:08 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - frontpage_menu_items.py:1.11 Message-ID: <200308201337.h7KDb8S14237@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv14191 Modified Files: frontpage_menu_items.py Log Message: Add Zopera === Products/ZopeOrg-NV/skins/nzo/frontpage_menu_items.py 1.10 => 1.11 === 'url':'http://www.ozzope.org', 'new': 1}) +subitems.append({'label':'Zopera', + 'url':'http://www.zopera.org', + 'new': 1}) + return menu From brian at zope.com Thu Aug 21 10:01:12 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - search.pt:1.5 Message-ID: <200308211401.h7LE1C507227@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv7056 Modified Files: search.pt Log Message: remove a thing that had been commented out with a note that it would be expensive (commenting doesnt prevent it from running, so it was still expensive!) === Products/ZopeOrg-NV/skins/nzo/search.pt 1.4 => 1.5 ===
http://some.url/ - 12-Apr-2002

From brian at zope.com Thu Aug 21 16:32:56 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - logo.gif:1.1 header.pt:1.2 ploneCustom.css.dtml:1.4 search.pt:1.6 Message-ID: <200308212032.h7LKWuX14386@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv14366 Modified Files: header.pt ploneCustom.css.dtml search.pt Added Files: logo.gif Log Message: Fix search, logo, css === Added File Products/ZopeOrg-NV/skins/nzo/logo.gif === === Products/ZopeOrg-NV/skins/nzo/header.pt 1.1 => 1.2 ===
- - + + alt="" />
=== Products/ZopeOrg-NV/skins/nzo/ploneCustom.css.dtml 1.3 => 1.4 === div.searchResults { background: #e0e0e0; - padding: 0.5em; - margin: 0.5em; display: block; clear: both; + border: #000000 1px solid; + padding: 0.5em 0em 0.5em 0em; + } div.searchNav { padding: 0.5em; - margin: 0.5em; + /* margin: 0.5em; */ display: block; clear: both; - text-align: center; + text-align: left; } +/* div.searchNav div{ padding: 0.5em; } +*/ div.searchResults span.right { text-align: right; === Products/ZopeOrg-NV/skins/nzo/search.pt 1.5 => 1.6 === - - -
- -
-
- - You searched for: - - -
- -
- -
- -Results 1-10 of 290. - - -Searching Zope.org for search term - - -
- - -
-Result Page: - - - - - Previous - - - - X - X - - - - Next - - - - -
- - - -
- -
- -
- -
-
- - - - Title -
- -
- Description: - Description -
- -
- Related subjects: - - somesubject - -
- -
- http://some.url/ - 12-Apr-2002 -
-
-
-
- -
- -
- - -
-Result Page: - - - - - Previous - - - - X - X - - - - Next - - - - -
- - - -
- -
- - You searched for: - - -
- -
- -
- - - + + +
+ +
+ +
+ Search results - +of 290 +for "search term" +
+ + + +
+ + +
+Result Page: + + + + + Previous + + + + X + X + + + + Next + + + + +
+ + + +
+ +
+ +
+ +
+
+ + + + Title + +
+ +
+ Description: + Description +
+ + + +
+ http://some.url/ +
+
+ 12-Apr-2002 +
+
+
+
+ +
+ There were no items found matching your search. +
+ +
+ + +
+Result Page: + + + + + Previous + + + + X + X + + + + Next + + + + +
+ + + + +
+ + + From brian at zope.com Wed Aug 20 15:39:05 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - latestContentBySubject.py:1.2 news.pt:1.2 Message-ID: <200308201939.h7KJd5H13705@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv13538 Modified Files: latestContentBySubject.py news.pt Log Message: Fix listings === Products/ZopeOrg-NV/skins/nzo/latestContentBySubject.py 1.1 => 1.2 === ctool = context.portal_catalog if subject: - results = ctool.searchResults(portal_type=portal_type, Subject=subject, sort_on='Date', sort_order="reverse") + results = ctool.searchResults(portal_type=portal_type, Subject=subject, sort_on='modified', sort_order="reverse", sort_limit=max_items) else: - results = ctool.searchResults(portal_type=portal_type, sort_on='Date', sort_order="reverse") + results = ctool.searchResults(portal_type=portal_type, sort_on='modified', sort_order="reverse", sort_limit=max_items) results = results[:max_items] === Products/ZopeOrg-NV/skins/nzo/news.pt 1.1 => 1.2 ===
From brian at zope.com Wed Aug 20 15:14:30 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - insufficient_privileges.pt:1.1 Message-ID: <200308201914.h7KJEUg09784@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv9610 Added Files: insufficient_privileges.pt Log Message: Make insufficient privs page more descriptive to deal with confusion when people forget to retract items before editing. This isnt the final solution, but will probably save a lot of email traffic :) === Added File Products/ZopeOrg-NV/skins/nzo/insufficient_privileges.pt ===

Insufficient Privileges

You do not have sufficient privileges to view this page.

If you are getting this message when trying to edit your own zope.org content, remember that you must retract published items before you may edit them. To retract an item, click on the State link to view the publishing status form and select "retract" from the publishing options.

If you believe you are receiving this message in error, please send an e-mail to Email Admin.

From brian at zope.com Thu Aug 21 12:00:46 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - frontpage_menu_items.py:1.14 Message-ID: <200308211600.h7LG0kK27239@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv27225 Modified Files: frontpage_menu_items.py Log Message: Fix links === Products/ZopeOrg-NV/skins/nzo/frontpage_menu_items.py 1.13 => 1.14 === subitems=[] -menu.append({'label':'Community', 'url':'', +menu.append({'label':'Resources', + 'url':'%s/Resources/' % root, 'subitems':subitems}) subitems.append({'label':'Report Bugs', 'url':'http://collector.zope.org/Zope/'}) From brian at zope.com Thu Aug 21 16:34:32 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - nzo_listing_macros.pt:1.3 Message-ID: <200308212034.h7LKYWS14710@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv14696 Modified Files: nzo_listing_macros.pt Log Message: fix logo ref === Products/ZopeOrg-NV/skins/nzo/nzo_listing_macros.pt 1.2 => 1.3 ===
- From brian at zope.com Thu Aug 21 11:58:37 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - frontpage_menu_items.py:1.13 Message-ID: <200308211558.h7LFwbp26274@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv26260 Modified Files: frontpage_menu_items.py Log Message: fixed hosting providers link === Products/ZopeOrg-NV/skins/nzo/frontpage_menu_items.py 1.12 => 1.13 === subitems.append({'label':'Solution Providers', 'url':'%s/Resources/ZSP/' % root}) subitems.append({'label':'Zope Hosting', - 'url':'http://www.google.com/search?q=Zope+hosting', + 'url':'%s/Resources/ZHP/' % root, 'new': 1}) From brian at zope.com Wed Aug 20 15:21:03 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - frontpage_menu_items.py:1.12 Message-ID: <200308201921.h7KJL3510848@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv10754 Modified Files: frontpage_menu_items.py Log Message: Add help link === Products/ZopeOrg-NV/skins/nzo/frontpage_menu_items.py 1.11 => 1.12 === 'url':'%s/Resources/ZopePowered/' % root}) subitems.append({'label':'About Zope.org', 'url':'%s/About/' % root}) +subitems.append({'label':'Using Zope.org', + 'url':'%s/Help/' % root}) subitems.append({'label':'Zope News', 'url':'%s/news' % root}) From brian at zope.com Thu Aug 21 13:56:33 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - frontpage_menu_items.py:1.15 Message-ID: <200308211756.h7LHuX617429@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv17412 Modified Files: frontpage_menu_items.py Log Message: Fixup news link to support caching. === Products/ZopeOrg-NV/skins/nzo/frontpage_menu_items.py 1.14 => 1.15 === subitems.append({'label':'Using Zope.org', 'url':'%s/Help/' % root}) subitems.append({'label':'Zope News', - 'url':'%s/news' % root}) + 'url':'%s/News/' % root}) subitems=[] From brian at zope.com Thu Aug 21 09:50:44 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - editform.pt:1.3 footer.pt:1.3 logo.jpg:1.2 nzo_listing_macros.pt:1.2 ploneCustom.css.dtml:1.3 Message-ID: <200308211350.h7LDoiv04887@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv4865 Modified Files: editform.pt footer.pt logo.jpg nzo_listing_macros.pt ploneCustom.css.dtml Log Message: checkin customized skin elements === Products/ZopeOrg-NV/skins/nzo/editform.pt 1.2 => 1.3 === - - - -yuck... editform is actually a method, and it calls us with - (page, request, action=action, - text=text, id=id, page=page, oldid=oldid) - -
-
-

- Creating - Editing - page -

-
-
- -
- -
- -
- In case master has no "header" macro. -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-  - - -
-Optional note: - - -  -
-Upload a file or image: - -
-Render this page as: - - -
-
- -
- In case master has no "footer" macro. -
-
- -
- -
- -
- - - + + + +yuck... editform is actually a method, and it calls us with + (page, request, action=action, + text=text, id=id, page=page, oldid=oldid) + +
+
+

+ Creating + Editing + page +

+
+
+ +
+ +
+ +
+ In case master has no "header" macro. +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+  + + +
+Optional note: + + +  +
+Upload a file or image: + +
+Render this page as: + + +
+
+ +
+ In case master has no "footer" macro. +
+
+ +
+ +
+ +
+ + + === Products/ZopeOrg-NV/skins/nzo/footer.pt 1.2 => 1.3 === - - - - - + + + + + === Products/ZopeOrg-NV/skins/nzo/logo.jpg 1.1 => 1.2 === === Products/ZopeOrg-NV/skins/nzo/nzo_listing_macros.pt 1.1 => 1.2 === - - - The title - - -
- - - - - -
- - - Company - -

- - - Website - - - - - - Company profile - -

- -
- - Location:
-

-
- - Service Info:
- - -
-
-
- -
- - - - -
- -

- - Website - -

- - Summary - - - Read More... - - -
-
-
- - + + + The title + + +
+ + + + + +
+ + + Company + +

+ + + Website + + - + + + Company profile + +

+ +
+ + Location:
+

+
+ + Service Info:
+ + +
+
+
+ +
+ + + + +
+ +

+ + Website + +

+ + Summary + + + Read More... + + +
+
+
+ + === Products/ZopeOrg-NV/skins/nzo/ploneCustom.css.dtml 1.2 => 1.3 === (718/818 lines abridged) -/* Plone for Zope.org changes */ - -div.document, -body { - font-size: 11px; - background-color: white; - color: black; -} - -p { - text-align: left; - line-height: 1.4em; -} - -h1, h2, h3, h4, h5 { - color: black; - font-weight: bold; - border-bottom: none; -} - -h1 { - font-size: 180%; -} - -h2 { - font-size: 140%; - font-weight: bold; -} - -h3 { - font-size: 130%; -} - -h4 { - font-size: 120%; -} - -h5 { - font-size: 110%; -} - -body>div { - background-color: #FFFFFF; -} - -td{ - vertical-align: top; -} - -a, [-=- -=- -=- 718 lines omitted -=- -=- -=-] + color: Black; + font-weight: normal; + text-transform: none; +} + +ul { + padding-bottom: 0.5em; +} + +div.footer { + margin: 0; + padding: 0; +} + +div.hilite { + color: #666666; + font-style: italic; + font-size: 110%; + font-weight: bold; + padding: 0.5em 0em 0.5em 0em; +} + +div.searchResults { + background: #e0e0e0; + padding: 0.5em; + margin: 0.5em; + display: block; + clear: both; +} + +div.searchNav { + padding: 0.5em; + margin: 0.5em; + display: block; + clear: both; + text-align: center; +} + +div.searchNav div{ + padding: 0.5em; +} + +div.searchResults span.right { + text-align: right; + display: inline; +} + +span.resultURL { + color: #009900; +} From brian at zope.com Mon Aug 25 09:55:45 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV - __init__.py:1.34 Message-ID: <200308251355.h7PDtjM03269@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV In directory cvs.zope.org:/tmp/cvs-serv3255 Modified Files: __init__.py Log Message: Add md5 workaround. === Products/ZopeOrg-NV/__init__.py 1.33 => 1.34 === from Products.CMFCore.utils import registerIcon, ToolInit, ContentInit from Products.CMFCore.CMFCorePermissions import AddPortalContent from Products.CMFCore import PortalFolder +from Acquisition import aq_base import ZopeOrgMembershipTool import ZopeOrgMemberDataTool import ZopeOrgWorkflow @@ -59,19 +60,33 @@ # headers of all requests and (b) that the CMF cache policy tool is # called on all requests. -from ZServer.HTTPResponse import ZServerHTTPResponse +## from ZServer.HTTPResponse import ZServerHTTPResponse -real__str__ = ZServerHTTPResponse.__str__ +## real__str__ = ZServerHTTPResponse.__str__ -def resp__str__(self, func=real__str__): - headers = self.headers - if not (headers.has_key('vary') or headers.has_key('Vary')): - self.setHeader('Vary', 'Cookie') +## def resp__str__(self, func=real__str__): +## headers = self.headers +## if not (headers.has_key('vary') or headers.has_key('Vary')): +## self.setHeader('Vary', 'Cookie') - return func(self) +## return func(self) -ZServerHTTPResponse.__str__ = resp__str__ +## ZServerHTTPResponse.__str__ = resp__str__ + + +# Hack to fix MD5 sums for CMFPackage SW release files. This really +# should go back into that product, once the owner is identified. + +def MD5(self, RESPONSE): + """monkey patch""" + v = getattr(aq_base(self), '_md5', '') + if v and v[0] == '0': + return v[1:] + return v + +from Products.CMFPackage.SoftwareReleaseFile import SoftwareReleaseFile +SoftwareReleaseFile.MD5 = MD5 From brian at zope.com Mon Aug 25 09:59:37 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV - __init__.py:1.35 Message-ID: <200308251359.h7PDxbG04407@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV In directory cvs.zope.org:/tmp/cvs-serv4348 Modified Files: __init__.py Log Message: fix bug === Products/ZopeOrg-NV/__init__.py 1.34 => 1.35 === # Hack to fix MD5 sums for CMFPackage SW release files. This really # should go back into that product, once the owner is identified. -def MD5(self, RESPONSE): +def MD5(self, RESPONSE=None): """monkey patch""" v = getattr(aq_base(self), '_md5', '') if v and v[0] == '0': From brian at zope.com Mon Aug 25 10:23:27 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV - __init__.py:1.36 Message-ID: <200308251423.h7PENRu08504@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV In directory cvs.zope.org:/tmp/cvs-serv8488 Modified Files: __init__.py Log Message: Fixed md5 bugs === Products/ZopeOrg-NV/__init__.py 1.35 => 1.36 === # Hack to fix MD5 sums for CMFPackage SW release files. This really # should go back into that product, once the owner is identified. +def _calculateMD5(self): + """monkey patch""" + body = str(self) + hash = md5.new(body).digest() + func = lambda x: '%0.2x' % ord(x) + self._md5 = ''.join(map(func, hash)) + self._md5_ok = 1 + def MD5(self, RESPONSE=None): """monkey patch""" - v = getattr(aq_base(self), '_md5', '') - if v and v[0] == '0': - return v[1:] - return v + # This is evil - write on read, but avoids a conversion effort. + if not getattr(self, '_md5_ok', 0): + self._calculateMD5() + return getattr(aq_base(self), '_md5', '') + from Products.CMFPackage.SoftwareReleaseFile import SoftwareReleaseFile +SoftwareReleaseFile._calculateMD5 = _calculateMD5 SoftwareReleaseFile.MD5 = MD5 From brian at zope.com Mon Aug 25 10:26:05 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV - __init__.py:1.37 Message-ID: <200308251426.h7PEQ5h08973@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV In directory cvs.zope.org:/tmp/cvs-serv8811 Modified Files: __init__.py Log Message: Fix missing import === Products/ZopeOrg-NV/__init__.py 1.36 => 1.37 === # Hack to fix MD5 sums for CMFPackage SW release files. This really # should go back into that product, once the owner is identified. +import md5 def _calculateMD5(self): """monkey patch""" From brian at zope.com Mon Aug 25 10:55:40 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV - __init__.py:1.38 Message-ID: <200308251455.h7PEte413435@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV In directory cvs.zope.org:/tmp/cvs-serv13421 Modified Files: __init__.py Log Message: better md5 hack for now. === Products/ZopeOrg-NV/__init__.py 1.37 => 1.38 === def MD5(self, RESPONSE=None): """monkey patch""" - # This is evil - write on read, but avoids a conversion effort. + # temp hack if not getattr(self, '_md5_ok', 0): - self._calculateMD5() + return '' return getattr(aq_base(self), '_md5', '') From brian at zope.com Mon Aug 25 11:09:36 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV - status.txt:1.1 Message-ID: <200308251509.h7PF9aX16288@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV In directory cvs.zope.org:/tmp/cvs-serv16270 Added Files: status.txt Log Message: Added status file to capture outstanding hacks and things that need doing. === Added File Products/ZopeOrg-NV/status.txt === NZO software status: - the CMFPackage is hacked; we need to find the maintainer to commit back security and md5 fixes. From brian at zope.com Mon Aug 25 14:43:15 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - swpackage_releases.html:1.1 swpackage_view.html:1.1 Message-ID: <200308251843.h7PIhF802281@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv2132 Added Files: swpackage_releases.html swpackage_view.html Log Message: Add sw package view overrides === Added File Products/ZopeOrg-NV/skins/nzo/swpackage_releases.html ===

Available Releases

Version Maturity   Released
1.0b1 Development   01/01/2003
  afile.tgz linux ppc md5
=== Added File Products/ZopeOrg-NV/skins/nzo/swpackage_view.html ===

Software Package

Description
Latest Release: 1.0b1
Release Date: 01/01/2003
Author: Me!
License: GPL
Categories: Server, User
Maturity: Development
  Information
  Changes
  Installation
  License
From brian at zope.com Mon Aug 25 16:06:45 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - header.pt:1.3 Message-ID: <200308252006.h7PK6jk16874@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv16860 Modified Files: header.pt Log Message: fix title === Products/ZopeOrg-NV/skins/nzo/header.pt 1.2 => 1.3 === Title of page + , '');"> + From brian at zope.com Mon Aug 25 17:51:59 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - main_template.pt:1.6 Message-ID: <200308252151.h7PLpxD01283@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv1269 Modified Files: main_template.pt Log Message: fix main template base href === Products/ZopeOrg-NV/skins/nzo/main_template.pt 1.5 => 1.6 === tal:attributes="href python:here.absolute_url()+'/'" /> From brian at zope.com Tue Aug 26 13:45:31 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - frontpage_menu_items.py:1.16 latestContentBySubject.py:1.3 Message-ID: <200308261745.h7QHjVJ14254@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv14238 Modified Files: frontpage_menu_items.py latestContentBySubject.py Log Message: check in fixes from customized. === Products/ZopeOrg-NV/skins/nzo/frontpage_menu_items.py 1.15 => 1.16 === 'url':'%s/Resources/ZopePowered/' % root}) subitems.append({'label':'About Zope.org', 'url':'%s/About/' % root}) -subitems.append({'label':'Using Zope.org', +subitems.append({'label':'Member FAQ', 'url':'%s/Help/' % root}) subitems.append({'label':'Zope News', 'url':'%s/News/' % root}) === Products/ZopeOrg-NV/skins/nzo/latestContentBySubject.py 1.2 => 1.3 === ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath -##parameters=portal_type, subject=None, max_items=5 +##parameters=portal_type, subject=None, max_items=5, sort_on='modified' ##title= ## ctool = context.portal_catalog if subject: - results = ctool.searchResults(portal_type=portal_type, Subject=subject, sort_on='modified', sort_order="reverse", sort_limit=max_items) + results = ctool.searchResults(portal_type=portal_type, Subject=subject, sort_on=sort_on, sort_order="reverse", sort_limit=max_items) else: - results = ctool.searchResults(portal_type=portal_type, sort_on='modified', sort_order="reverse", sort_limit=max_items) + results = ctool.searchResults(portal_type=portal_type, sort_on=sort_on, sort_order="reverse", sort_limit=max_items) results = results[:max_items] From brian at zope.com Tue Aug 26 15:15:41 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/Extensions - fixwikis.py:1.1 Message-ID: <200308261915.h7QJFfh29716@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/Extensions In directory cvs.zope.org:/tmp/cvs-serv29702 Added Files: fixwikis.py Log Message: Added wiki fixer === Added File Products/ZopeOrg-NV/Extensions/fixwikis.py === def fixwikis(self): """Fix old ZWiki instances.""" members = self.restrictedTraverse('/zopeorg/Members') testing = members.aq_parent names = ['advancedform', 'backlinks', 'commentform', 'editform', 'pagehistory', 'search', 'standard_wiki_footer', 'standard_wiki_header', 'standard_wiki_page', 'title_prefix'] result = self.ZopeFind(members, obj_ids=['FrontPage'], obj_metatypes=['ZWiki Page'], search_sub=1) for objid, page in result: made_changes = 0 obj = page.aq_parent print 'Converting: %s' % obj.id ids = obj.objectIds() for name in names: if name in ids: obj.manage_renameObject(name, 'old__' + name) made_changes = 1 if made_changes: get_transaction().commit() print 'converted %s' % obj.id return printed From brian at zope.com Tue Aug 26 15:23:24 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/Extensions - fixwikis.py:1.2 Message-ID: <200308261923.h7QJNOj30942@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/Extensions In directory cvs.zope.org:/tmp/cvs-serv30928 Modified Files: fixwikis.py Log Message: fix printing === Products/ZopeOrg-NV/Extensions/fixwikis.py 1.1 => 1.2 === obj_metatypes=['ZWiki Page'], search_sub=1) + output = [] + for objid, page in result: made_changes = 0 obj = page.aq_parent - print 'Converting: %s' % obj.id + output.append('Converting: %s' % obj.id) ids = obj.objectIds() for name in names: if name in ids: @@ -26,6 +28,7 @@ made_changes = 1 if made_changes: get_transaction().commit() - print 'converted %s' % obj.id + output.append('converted %s' % obj.id) + + return '\n'.join(output) - return printed From brian at zope.com Tue Aug 26 16:00:51 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/Extensions - fixwikis.py:1.3 Message-ID: <200308262000.h7QK0pw04793@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/Extensions In directory cvs.zope.org:/tmp/cvs-serv4779 Modified Files: fixwikis.py Log Message: narrow down items === Products/ZopeOrg-NV/Extensions/fixwikis.py 1.2 => 1.3 === 'title_prefix'] - result = self.ZopeFind(members, obj_ids=['FrontPage'], - obj_metatypes=['ZWiki Page'], + result = self.ZopeFind(members, obj_ids=['standard_wiki_header'], + obj_metatypes=['DTML Method'], search_sub=1) output = [] From brian at zope.com Thu Aug 28 10:23:50 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - frontpage_menu_items.py:1.17 Message-ID: <200308281423.h7SENoE06460@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv6432/skins/nzo Modified Files: frontpage_menu_items.py Log Message: Added zopemag link; documented zwiki hack === Products/ZopeOrg-NV/skins/nzo/frontpage_menu_items.py 1.16 => 1.17 === 'url':'http://www.zopera.org', 'new': 1}) +subitems.append({'label':'ZopeMag', + 'url':'http://www.zopemag.com', + 'new': 1}) return menu From brian at zope.com Thu Aug 28 10:24:20 2003 From: brian at zope.com (Brian Lloyd) Date: Sun Aug 10 17:02:15 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV - status.txt:1.2 Message-ID: <200308281424.h7SEOKk06610@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV In directory cvs.zope.org:/tmp/cvs-serv6432 Modified Files: status.txt Log Message: Added zopemag link; documented zwiki hack === Products/ZopeOrg-NV/status.txt 1.1 => 1.2 === - the CMFPackage is hacked; we need to find the maintainer to commit back security and md5 fixes. + - The buildout uses and old version of ZWiki; we need to update + it to use the version in /opt. + + - ZWiki is hacked to fix a problem with support for old page + formats. (ZWikiPage.py) +