[Zope-dev] ZWikiZC comments

2000-08-28 Thread Ross Boylan

Two substantive comments, and some editorial ones.

You write that you are thinking of different schemes for generating
paths and ids.  I suggest one of the things you consider is whether
your scheme will work if someone cuts the ZWikiZC and pastes it
somewhere else in the tree.

I'm not sufficiently versed in the different methods you discussed to
understand their implications--they seem to involve yet more
undocumented interfaces in Zope.


Second, I think the facility for email notification of changes is
really interesting.  It seems to me that a problem with the Wiki
concept (for some uses) is that they are very difficult to monitor for
changes.  Sending email, perhaps combined with diff, could help with
this.


Editorial comments:

"Summary" is spelled with an "a" (not summery).
"Product" is spelled with a "c" (not produkt).
Since these words are prominent in the documentation, and at least one
(summary) is to be a critical method, it would be good to clean this up.

The "!" in the paths baffled me (e.g., "!WikiPage").

Why Catalogs distinguish metadata from indices also eludes me.  It
should be explained in the Z/Catalog writeup, but since it's not, it
was there to bother me while I read your description.

It's hazardous to claim a performance advantage without benchmarks.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] inheritedAttribute

2000-08-28 Thread Steve Alexander

In the latest Zope source, I've noticed calls to inheritedAttribute in
the Python code.

I've found the C source code in ExtensionClass.c, but it doesn't help me
understand when I should use it from Python, and why.


*reads more source*

Ah! About 70 lines further on in ExtensionClass.c:

   "inheritedAttribute(class,name) -- Get an inherited attribute\n\n"
   "Get an attribute that would be inherited if the given (extension)\n"
   "class did not define it.  This method is used when overriding\n"
   "inherited methods.  It provides 2 advantages over accessing\n"
   "\n"
   "attributes directly through a superclass:\n"
   "\n"
   "1. The superclass need not be known,\n"
   "\n"
   "2. The superclass may be a Python class.  Without this method, it
would\n"
   "   be possible to override methods inherited from python classes
because\n"
   "   unbound methods gotten from Python classes cannot be called with
\n"
   "   extension class instances.  \n"


Is there some documentation of this on zope.org or dev.zope.org that
I've missed?

Thanks.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] New version of BTreeFolder

2000-08-28 Thread Shane Hathaway

Hi gang,

This version just fixes a bug with the folder contents tab on Windows. 
For some reason, on Windows 95 (and perhaps other platforms) the Python
interpreter behaves differently enough that if you use a class
attribute from a different module and put it in your own class, you may
in fact be modifying its global context.  It's probably a bug in
Python.  As a workaround, this version of BTreeFolders doesn't have the
"details" tab anymore.

http://www.zope.org/Members/hathawsh/BTreeFolder/BTreeFolder-0.1.1.tar.gz

BTW has anyone done any semi-formal speed tests?  It's rumored that a
custom getattr in Python can cause a bit of a slowdown.  We could write
a custom getattr in C to solve the problem.  But we don't want to do
any premature optimization.

Shane

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] Transaction question

2000-08-28 Thread Johan Carlsson

I just want to check if things work the way I think (hope) it does.

In a transaction, are objects attributes safe from other threads.

self._v_mytemp in my request does not conflict with other requests?

(I suppose the have to be otherwise REQUEST's would interfere with each other.)

I know that _v_* attributes aren't persistent but do they remain active in memory
and there by accessible to other requests after the transaction commit?

(I suppose class attributes needs to be protected to be thread-safe?
 Does anybody have an example how to do that?)

Regards,
Johan

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] New version of BTreeFolder. Just a Newbie Question

2000-08-28 Thread LEE Kwan Soo

Oh, well, I'd bet this is a silly question. But I can not resist nor find answer by 
myself.

Q: Why don't you BTree-fy all the subclasses of ObjectManager? 
Is there a reason that anyone but can a newbie see?

LEE Kwan Soo.

ps. I only hope to be able to make clear statement in English, but i am already too 
sleepy now. sorry.

- Original Message - 
From: "Shane Hathaway" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 28, 2000 10:26 PM
Subject: [Zope-dev] New version of BTreeFolder


 Hi gang,
 
 This version just fixes a bug with the folder contents tab on Windows. 
 For some reason, on Windows 95 (and perhaps other platforms) the Python
 interpreter behaves differently enough that if you use a class
 attribute from a different module and put it in your own class, you may
 in fact be modifying its global context.  It's probably a bug in
 Python.  As a workaround, this version of BTreeFolders doesn't have the
 "details" tab anymore.
 
 http://www.zope.org/Members/hathawsh/BTreeFolder/BTreeFolder-0.1.1.tar.gz
 
 BTW has anyone done any semi-formal speed tests?  It's rumored that a
 custom getattr in Python can cause a bit of a slowdown.  We could write
 a custom getattr in C to solve the problem.  But we don't want to do
 any premature optimization.
 
 Shane
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )
 
 

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] New version of BTreeFolder. Just a Newbie Question

2000-08-28 Thread Shane Hathaway

LEE Kwan Soo wrote:
 
 Oh, well, I'd bet this is a silly question. But I can not resist nor find answer by 
myself.
 
 Q: Why don't you BTree-fy all the subclasses of ObjectManager?
 Is there a reason that anyone but can a newbie see?

Obviously what BTreeFolder does should be available in standard
folders.  That is a long-term goal for Zope.  BTreeFolder only exists
to scope out the need for big folders as well as provide the capability
in the short term.

Shane

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] New version of BTreeFolder

2000-08-28 Thread Kapil Thangavelu

Shane Hathaway wrote:
 
 Hi gang,
 
 This version just fixes a bug with the folder contents tab on Windows.
 For some reason, on Windows 95 (and perhaps other platforms) the Python
 interpreter behaves differently enough that if you use a class
 attribute from a different module and put it in your own class, you may
 in fact be modifying its global context.  It's probably a bug in
 Python.  As a workaround, this version of BTreeFolders doesn't have the
 "details" tab anymore.
 
 http://www.zope.org/Members/hathawsh/BTreeFolder/BTreeFolder-0.1.1.tar.gz
 
 BTW has anyone done any semi-formal speed tests?  It's rumored that a
 custom getattr in Python can cause a bit of a slowdown.  We could write
 a custom getattr in C to solve the problem.  But we don't want to do
 any premature optimization.
 
 Shane

I'll work on some tests.

Kapil

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




RE: [Zope-dev] Transaction question

2000-08-28 Thread Chris McDonough

Using a mutex by way of example, without using anything Zope-specific
(the following uses the Python threading module):

import threading
lock = threading.Lock()
myglobal = []

def changeglobal(val):
lock.acquire()
try:
myglobal.append(val)
finally:
lock.release()

  (I suppose class attributes needs to be protected to be thread-safe?
   Does anybody have an example how to do that?)
 
 You can use allocate_lock() to accomplish thread safety with class
 attributes.

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Transaction question

2000-08-28 Thread Erik Enge

[Shane Hathaway]

| Johan Carlsson wrote:
|  
|  I just want to check if things work the way I think (hope) it does.
|  
|  In a transaction, are objects attributes safe from other threads.
|  
|  self._v_mytemp in my request does not conflict with other requests?
| 
| This is correct (or it's supposed to be.) 

What do you mean by "supposed to be"?  Is it, or is it not correct?

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Transaction question

2000-08-28 Thread Shane Hathaway

Erik Enge wrote:
 
 [Shane Hathaway]
 
 | Johan Carlsson wrote:
 | 
 |  I just want to check if things work the way I think (hope) it does.
 | 
 |  In a transaction, are objects attributes safe from other threads.
 | 
 |  self._v_mytemp in my request does not conflict with other requests?
 |
 | This is correct (or it's supposed to be.)
 
 What do you mean by "supposed to be"?  Is it, or is it not correct?

It means that a correctly operating ZODB will behave this way.  I
suspected that Johan may have been facing some kind of ZODB bug,
therefore I qualified my statement.  The phrasing was designed to
elicit a response if he were indeed facing a defect.

Shane

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Transaction question

2000-08-28 Thread Johan Carlsson

  | 
  |  I just want to check if things work the way I think (hope) it does.
  | 
  |  In a transaction, are objects attributes safe from other threads.
  | 
  |  self._v_mytemp in my request does not conflict with other requests?
  |
  | This is correct (or it's supposed to be.)
  
  What do you mean by "supposed to be"?  Is it, or is it not correct?
 
 It means that a correctly operating ZODB will behave this way.  I
 suspected that Johan may have been facing some kind of ZODB bug,
 therefore I qualified my statement.  The phrasing was designed to
 elicit a response if he were indeed facing a defect.

I haven't experienced any problems so far, but I havn't tested it yet either.
The reason I asked was to not make any stupied assumptions before starting
coding.
If I experience any problems I'll let you know, naturally :-)

Cheers,
JOhan



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Transaction question

2000-08-28 Thread Erik Enge

[Shane Hathaway]

| It means that a correctly operating ZODB will behave this way.

Oh, I see.  Thanks for clarifying that.  :)

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] New version of BTreeFolder. Just a Newbie Question

2000-08-28 Thread Bill Anderson

Shane Hathaway wrote:
 
 LEE Kwan Soo wrote:
 
  Oh, well, I'd bet this is a silly question. But I can not resist nor find answer 
by myself.
 
  Q: Why don't you BTree-fy all the subclasses of ObjectManager?
  Is there a reason that anyone but can a newbie see?
 
 Obviously what BTreeFolder does should be available in standard
 folders.  That is a long-term goal for Zope.  BTreeFolder only exists
 to scope out the need for big folders as well as provide the capability
 in the short term.


Any chance at a BTree Folder w/customizer suppor tin the near future? :)

--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] New version of BTreeFolder. Just a Newbie Question

2000-08-28 Thread Shane Hathaway

Bill Anderson wrote:
 Any chance at a BTree Folder w/customizer support in the near future? :)

It should be quite easy to do.  I vaguely recall Steve A or Steve S
might have done it.

Shane

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] New version of BTreeFolder. Just a Newbie Question

2000-08-28 Thread Steve Alexander

Bill Anderson wrote:

 
 Any chance at a BTree Folder w/customizer suppor tin the near future? :)

I did some work towards this. However, I didn't continue.

I realised that I could get the same effect by having a BTreeFolder 
inside a Customizer Folder. The only downside is a slightly longer URL 
for objects in the BTreeFolder.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] ZPatterns bug with patch

2000-08-28 Thread Steve Alexander

"Phillip J. Eby" wrote:
 
 At 10:22 AM 8/27/00 +0100, Steve Alexander wrote:
 
 I've fixed this by adding a test to the start of __set_attr__ of
 DataSkins.py:
 
 def __set_attr__(self,name,val,_v_dm_=_v_dm_):
 +   if name=='id' and val==self.__dict__['id']:
 +   return
 dm = self.__dict__[_v_dm_]
 
 This looks reasonable, and backward-compatible, since __init__ guarantees
 the dict will have an id.  I'm not thrilled with adding more overhead to
 attribute setting, however, so I'll probably do it like this:
 
 try:
 dm = self.__dict__[_v_dm_]
 except KeyError:
 if name=='id' and val==self.__dict__['id']: return
 raise
 
 Hopefully this should only perform the extra computations when the first
 part fails...

Are Python classes derived from DataSkin supposed to call
DataSkin.__init__ ?

Anyway, perhaps this would be a small improvement:

try:
dm = self.__dict__[_v_dm_]
except KeyError:
if (name=='id' and self.__dict__.has_key('id') 
and val==self.__dict__['id']): return
raise


--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] New version of BTreeFolder

2000-08-28 Thread Shane Hathaway

Steve Alexander wrote:
 BTreeFolder doesn't do the
 
 from Globals import default__class_init__
 default__class_init__(BTreeFolder)
 
 thing.
 
 Does that matter at all?
 
 As none of the classes it is derived from have a __init__ method, I
 guess not. Or, does default__class_init__ do anything else?

It converts __ac_permissions__ into usable permissions declarations
(__roles__ attributes.)  default__class_init__ really ought to be
there; it's only recently that Brian started saying we need to use it
everywhere.  I forgot.  :-)

Shane

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] ZPatterns bug with patch

2000-08-28 Thread Steve Alexander

 "Phillip J. Eby" wrote:
  
  try:
  dm = self.__dict__[_v_dm_]
  except KeyError:
  if name=='id' and val==self.__dict__['id']: return
  raise
  
  Hopefully this should only perform the extra computations when the first
  part fails...

 Are Python classes derived from DataSkin supposed to call
 DataSkin.__init__ ?

 Anyway, perhaps this would be a small improvement:

 try:
 dm = self.__dict__[_v_dm_]
 except KeyError:
 if (name=='id' and self.__dict__.has_key('id') 
 and val==self.__dict__['id']): return
 raise

What rubbish! I didn't mean that at all!

I think what I meant was this:

try:
dm = self.__dict__[_v_dm_]
except KeyError:
if name=='id':
if self.__dict__.has_key('id') and val==self.__dict__.['id']:
return
else:
self.__dict__['id']=val
return
raise  


--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] ZPatterns bug with patch

2000-08-28 Thread Steve Alexander

Steve Alexander wrote:
  
 What rubbish! I didn't mean that at all!
 
 I think what I meant was this:
 
 try:
 dm = self.__dict__[_v_dm_]
 except KeyError:
 if name=='id':
 if self.__dict__.has_key('id') and val==self.__dict__.['id']:
 return
 else:
 self.__dict__['id']=val
 return
 raise

I think what I *really* meant was this:

try:
dm = self.__dict__[_v_dm_]
except KeyError:
if name=='id':
if self.__dict__.has_key('id') and val==self.__dict__['id']:
return
else:
self.__dict__['id']=val
self._p_changed = 1
return
raise

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] ANN: ZWikiZC version 0.7.3 alpha

2000-08-28 Thread Johan Carlsson

The ZWikiZC version 0.7.3 alpha completely rely on ZCatalog
for looking up WikiPages from WikiNames.

No references are stored in the ZWikiZG page letting cutpaste,
delete and other management actions ignore updating links.

I bellew this is a more scalable solution than in the version 0.7.2 alpha.
Bottle neck might be if a page contains alote of WikiNames.

I also cleaned it up a bit (remove some hacky stuff from the old ZWiki).

Also added are keywords, wiki_meta_types and author_ids.

http://www.zope.org/Members/johanc/ZWikiZG/wiki

Cheers,
Johan Carlsson


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] ANN: ZWikiZC version 0.7.3 alpha

2000-08-28 Thread Johan Carlsson

The ZWikiZC version 0.7.3 alpha completely rely on ZCatalog
for looking up WikiPages from WikiNames.

No references are stored in the ZWikiZG page letting cutpaste,
delete and other management actions ignore updating links.

I bellew this is a more scalable solution than in the version 0.7.2 alpha.
Bottle neck might be if a page contains alote of WikiNames.

I also cleaned it up a bit (remove some hacky stuff from the old ZWiki).

Also added are keywords, wiki_meta_types and author_ids.

http://www.zope.org/Members/johanc/ZWikiZG/wiki

Cheers,
Johan Carlsson


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope] Email files via a form thru Zope

2000-08-28 Thread Curtis Maloney

On Mon, 28 Aug 2000, Michelle wrote:
 Hi,

 I was wondering if anyone can help me.

 I would like to have people send files through a form so I have created a
 form:

*snip*

 Now (theoretically) you are supposed to be able to attach a file
 (either a .doc or a .xls file and it magically gets emailed to me. I
 get an email but the file does not attach.

Not quite.  To attach a file, you must make your message a "multi part MIME" 
message.  This is actually not all that difficult to do, and you can find the 
details in the DTML documentation.


 Unfortunatley I am not the most techo-minded person around and I have
 probably missed the most simplest bit but I just cant make it work!!!
 This whole Python and external methods and all that sort of stuff has
 been confusing me like you wouldnt believe! Soo I was hoping that
 there would be some wonderful person out there to show me the light! :)

One think you might want, tho, is to get the MIME patch, that allows 
expressions for the various fields in the dtml-sendmail tags.  This will be 
helpful for things like user-supplied file names.

Check out these pages:
http://www.zope.org/Members/rossl/emailattach
http://www.zope.org/Members/jephte/MIMETag

 Look forward to hearing from you!

 Michelle


Have a better one,
Curtis Maloney

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Calling list.remove() bug

2000-08-28 Thread Kapil Thangavelu

Tim Cook wrote:
 
 Kapil Thangavelu wrote:
 
  dtml-var "foobar(_.None, _)"
 
  this passes it None for a client, and the current namespace as the
  mapping, and no keyword args.
 
  hope that was clearer than mud.
 
 
 So the 'key' to this confusion is that we are passing the 'Zope
 namespace' to the python method (function) call?
 (Which I guess is REALLY just a Python namespace anyway?)

the highlights.
one is DTML tags automatically calls and give the proper
args to what they call. the second is that when you not in pure DTML, 
you need to call methods explicitly and pass them args they might need.

note the namespace is just a glorified mapping(dictionary) parts of
which, ie the REQUEST are built dynamically during the Publishing
process. you could pass the method any dictionary. but since you're
accessing the DateTime module in your function you need to access it
through the namespace.

again, all of this is more a function of how DocumentTemplate works in
the context of Zope's Publishing Process.
 
 Maybe I should study the Python source where this occurs. It's
 still VERY foggy! g

The source is the answer. what is the question?

from  DTMLMethod.py

   def __call__(self, client=None, REQUEST={}, RESPONSE=None, **kw):
"""Render the document given a client object, REQUEST mapping,
Response, and key word arguments."""


Cheers

Kapil
 -- Tim Cook --
 FreePM Project Coordinator http://www.freepm.org
 OS Health Care Alliance Supporter http://www.oshca.org

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] OT: Website design / spec / development resources

2000-08-28 Thread Michael Bernstein

"J. Atwood" wrote:
 
 Hey Zopers,
 
 I am looking for some good guidelines in designing, spec'ing and
 developing large complex websites. Anything like guidelines, steps,
 howtos, etc would be much appreciates. From theory to practice.

The first book on this subject that opened my eyes was
'Secrets of Successful Websites', which in particular offers
advice on the many pitfalls that a web project can face
(with case studies), and reccomended procedures for handling
and/or avoiding them. It's getting a bit dated (1996), but
still has a lot of valuable advice.

Two O'Reilly books that I have found very helpful are
'Information Architecture' and 'Designing Navigation for the
Web', both of which will help keep your sites well organized
and easily navigable by end users.

Another good book is 'Website Usability - The Practice of
Simplicity' which will help keep your sites users happy and
productive.

A recent book that I've found useful, though not as original
as some of the others I've mentioned, is 'Great Web
Architecture'.

I have other, more specific suggestions, but it would help
if you could say at least what types of sites you're
attempting to design.

BTW, I heartily concur with the recomendation made by Kapil:
'Philip and Alex's Guide to Website Publishing' is a
monumental tour-de-force, and should definitely be read by
anyone who wants to work in the web industry, even though I
think that some of his technical reccomendations are a
little close-minded (ie. 'Use Oracle and big Sun Iron').

I hope these help you as much as they did me.

Michael Bernstein.

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Newbie question: FORM processing in Zope.

2000-08-28 Thread Amit Redij


hi,

I am a Perl/CGI programmer, trying out Zope.
I am confused right now about
 HOW TO process FORM variables?
and most important thing is
how to validate form inputs.(like same thing is best done in PERL using
regex)

that is, if I have a html having some form variables and a submit
button. I click on the submit button. it should call some script..right?
My question is how to pass values from one script to another. how is
this done in Zope?

thanks a lot in advance.

regards
Amit
 

 .--.
|o_o |
|\_/ |
   //   \ \Amit Redij
  (| | )   mailto:[EMAIL PROTECTED]
 /'\_   _/`\   
 \___)=(___/ 


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Showing the name of a file-type form variable

2000-08-28 Thread Jean Jordaan

Hi Zopers

I've got this::

  tdinput type="file" 
 name="file"
 dtml-if file value="dtml-var "file"" /dtml-if
 /td 

Which returns::

  ZPublisher.HTTPRequest.FileUpload instance at 131dc48

in the input box. I'd really rather have the filename. How does
one do that?

-- 
Jean Jordaan   --technical writer--
Mosaic Software--Zope 2.1.6 on WinNT and W2K

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Smarter Forms (variant example)

2000-08-28 Thread Jean Jordaan

Hi all 

While playing with jules's nice Smarter Forms example, I've made a 
(perhaps obvious) slightly elaborated variant of it. 


dtml-comment njj == Jean Jordaan
/dtml-comment 

dtml-var standard_html_header

dtml-comment njj: from

How-To: (Hopefully) Smarter Forms 0.1
Created by jules. Last modified on 2000/01/30.

/dtml-comment

dtml-comment

One of my pet peeves is filling out a form, only to find something
is wrong. Then I hit the back button to lose all my input. Grrr! The
Web GUI doesn't have to be A Bad Thing and with a little effort on
the part of the programmer/designer, gently prompting a user to
correct their mistakes is quite easy.

This is a simple example of a form that is smart enough to know when
something is wrong and not lose data. All we're asking for is the
user's name -- if it's empty, we print out an error message and
don't continue.

/dtml-comment

dtml-comment njj: 
Instead of calling the form in a separate method (as recommended by
the How-To), build it in the handler page. If necessary, one could
factor out the individual *inputs* into separate methods. This
allows you to show per-input prompts.
/dtml-comment
form method="post"

dtml-if expr="REQUEST.REQUEST_METHOD=='POST'"
dtml-comment
If we're here, the user has hit the submit button and we have
form data to consider.
/dtml-comment

dtml-call "REQUEST.set('finished','true')"
dtml-comment
Assume things are OK by setting finished to 'true'
If they're not, change the value of finished as
we hit an error.
/dtml-comment

dtml-unless "firstname"
liPlease fill in your first name .. 
dtml-call "REQUEST.set('finished','false')"
/dtml-unless 
dtml-comment njj: to avoid repeating the input below, make it a
separate method:
dtml-var expr="input_firstname()"
/dtml-comment
First name: 
input type="text" name="firstname"
dtml-if firstname value="dtml-var "firstname"" /dtml-if
br

dtml-unless "surname"
liPlease fill in your surname .. 
dtml-call "REQUEST.set('finished','false')"
/dtml-unless 
dtml-comment njj:
dtml-var expr="input_surname()"
/dtml-comment
Surname:
input type="text" name="surname"
dtml-if surname value="dtml-var "surname"" /dtml-if
br

dtml-unless "otherstuff"
liPlease fill in your other stuff .. 
dtml-call "REQUEST.set('finished','false')"
/dtml-unless 
dtml-comment njj:
dtml-var expr="input_otherstuff()"
/dtml-comment
Other stuff:
input type="text" name="otherstuff"
dtml-if otherstuff value="dtml-var "otherstuff"" /dtml-if
br

dtml-if "REQUEST.get('finished')=='true'"
dtml-comment
If finished is true, all is well in user-land. Show a nice
thank you message and instructions on what to do next.
Your save data code should go here and before the thank you
message is sent.
/dtml-comment
dtml-comment njj: "save data code":
dtml-call "edit_properties"
/dtml-comment
p You're done! Thanks for your input dtml-var firstname.
/p
p You could put a link to somewhere else on your site here...
/p
dtml-else
p Some of the fields above still need to be filled in. Please
complete them to continue. /p
/dtml-if

dtml-else
dtml-comment
If we're here, it's the first time through. Print out the form
as-is.
If you use a form's POST rather than an href link to get here,
your user will get an error message which will confuse the
whatsits out of them.
/dtml-comment
pHello, dear user. Please fill out the form below. Note that the
bbold/b items are required before you can continue./p

dtml-comment njj: or do it this way:
dtml-var expr="input_firstname()"
dtml-var expr="input_surname()"
dtml-var expr="input_otherstuff()"
/dtml-comment

First name: 
input type="text" name="firstname"
dtml-if firstname value="dtml-var "firstname"" /dtml-if
br
Surname:
input type="text" name="surname"
dtml-if surname value="dtml-var "surname"" /dtml-if
br
Other stuff:
input type="text" name="otherstuff"
dtml-if otherstuff value="dtml-var "otherstuff"" /dtml-if


/dtml-if

input type="submit" value="Next"
/form

dtml-var standard_html_footer


-- 
Jean Jordaan   --technical writer--
Mosaic Software--Zope 2.1.6 on WinNT and W2K

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 

[Zope] dedicated folder for each user

2000-08-28 Thread Vincent

Hi,

is it possible to creat automatically a folder with the name of the logged
user ?

Thanks Vincent


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] SOAP (Re: [Zope] Oracle ZODB (Paul's talk in Paris))

2000-08-28 Thread Petru Paler

 ps. I've got to ask, Is there any prelim work being done on SOAP?

I did write once a patch that worked (i.e. you could call methods inside
Zope using SOAP and get the results back; the problems were with some type
marshalling and error handling). You can get it from
http://www.ppetru.net , though I haven't done anything on it in the last
month (lack of time and lack of people's interest...)

Petru



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Advice for new zope installation

2000-08-28 Thread Henk Schets

Hi,

After reading all the info about zope, I am very impressed with the
possibilities it can deliver.  However, before I migrate our existing site,
I need to be certain about certain topics :
- how easy and reliably can I manage my virtual hosts (about 8 sites
right now) ? Very important.
- how stable is Zope regarding to Apache on Linux ?
- we have a MySql database, is it easy to connect with Zope ?
- can I access the Zope internal database with e.g. ODBC ?
- can I use log analyzers to get some statistics about our site ?
- any advice about migrating an existing site ?

Thanks,

Henk

Poppunt webmaster
http://www.poppunt.be


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Running Zope 2.2.1 as NT service

2000-08-28 Thread Wolfgang Strobl

On 27 Aug 2000, 12:50  Alexander Chelnokov wrote:

 The option seems to be unavailable under W2000. 2.1.6 could be run
 that way without any trouble.

Could you please elaborate?

I just installed 2.2.1 final on my developement machine, under 
win2000 prof us. The installer asked the usual questions, I 
answered "run as service", added "-P 0" in the registry, and finally 
started it by commanding "net start name of my service" in a 
command window. Worked like a charm. Later I changed the 
userid for this service from "System" to "Zope". After restarting the 
service, it ran without trouble, too.


--
  o  ( [EMAIL PROTECTED] (+49 2241) 14-2394
 /\*   GMD mbH   #include 
   _`\ `_===  Schloss Birlinghoven, std.disclaimer
__(_)/_(_)___.-._  53754 Sankt Augustin, Germany 

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] getting parent document

2000-08-28 Thread Anders Holmbech Nielsen

Hi,

This should be an easy task but a just cant get it to work.

I have a dtml-method called test which I want to use like:

someurl/document/test

and in the dtml-method I want to include the document in its whole.

I have tried something with the URL like:

dtml-var dtml-var URL1 this offcourse dont work... but this neither...

dtml-var _[URL1]

What to do ??
-- 

Regards

-
Anders Holmbech Nielsen | Tlf:  (+45) 70 22 56 00
Software Engineer   | Fax:  (+45) 70 22 57 00
Integrator Uniware A/S  | http:/www.integrator.dk

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Where is news section how-to?

2000-08-28 Thread Radim Gelner

Hello,

few weeks ago, on Zope site I came across a document describing how to
build news section with features like displaying with five most recent
items from a folder, etc.

But now I can't recall, where it was. Can someone point me in a right
direction.

Thank you,

Radim

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] snippets (was RE: [Zope] Where do I find out about cookies?)

2000-08-28 Thread Jean Jordaan

Hi RDM 

Thanks! That works perfectly, and teaches me about namespaces. 
I just had to fix '/dtml-else' (I also do that)::

  dtml-if sort_key
dtml-if "REQUEST.form.has_key('sort_key')"
  dtml-call "RESPONSE.setCookie('sort_key',REQUEST.form['sort_key'])"
/dtml-if
  dtml-else
dtml-call "REQUEST.set('sort_key','title')"
dtml-call "RESPONSE.setCookie('sort_key','title')"
  /dtml-if

Here's a shortened version of my own, from Squishdot. Instead
of this::

  dtml-if "reply_cnt  1"
B(dtml-var reply_cnt commentsdtml-if body_len, 
dtml-var body_len in body/dtml-if)/B
  dtml-elif reply_cnt 
B(dtml-var reply_cnt commentdtml-if body_len, 
dtml-var body_len in body/dtml-if)/B  
  dtml-else 
dtml-if body_len
  B(dtml-var body_len in body)/B
/dtml-if 
  /dtml-if

I made this::

  dtml-if body_len
b(dtml-if reply_cntdtml-var reply_cnt 
commentdtml-if "reply_cnt  1"s/dtml-if,
/dtml-ifdtml-var body_len in body)/b
  /dtml-if body_len

-- 
Jean Jordaan   --technical writer--
Mosaic Software--Zope 2.1.6 on WinNT and W2K

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] unauthorized when accessing /manage in zope 2.2.1

2000-08-28 Thread Philipp Dunkel

Hia Zopers,
I'm totally confused and I couldn't figure it out in 2 working days so here
it is:

I have a Zope Product that makes use of different nested classes.
When I create an instance of this product I always get an
"unauthorized" error when clicking the instance in the management interface
(=accessing instance/manage)
even if I am logged in as a manager or superuser.
The strange thing is that for example instance/manage_access works fine
for me.
I tried all stuph with permissions, switched acquisition on and off, added
'manage' to my permission tuple, gave everyone the right to view
management-screens and so on.
The error message says only "unauthorized"
and the traceback points to Management.py

Any Ideas?
(btw: it worked fine in 2.1.6)

thanx a lot
philipp dunkel, zReal Productions, The Hague


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] 2.2.1 and zdiscussion

2000-08-28 Thread J. Atwood

 By the way, if I now create a forum with ZUBB, are there any expected
 migration problems when I upgrade it to your next release?

Ummm... ahem no? That is actually one of the things keeping the release
back. Mr. Harris did some fine work but it does not upgrade very easily so I
am trying to figure out how to include all / some of his functionality as
well as be able to upgrade (since I am running a lot of production boards
that I do not want to wipe out).

I would say to play with the current release, get to know it and I will
figure out how to make a mostly painless upgrade path.

J


 
 Thanks again for your work on this.
 
 Best regards
 J Esteves
 
 -- 
 jmce: +351 919838775 ~ http://artenumerica.com/ ~ http://artenumerica.org/
 


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Newbie question: FORM processing in Zope.

2000-08-28 Thread J. Atwood

Easy and hard answer.

The easy answer is forget what you know about scripts/cgi and pulling in
form variables from some sort of CGI method (perl module). Since Zope is a
constant running process it does not require that you point to a script.

Hard Answer: The basics are that all you have to do is give the form element
a name (as you would in any form) and point the action of the form to
another DTML Method/Document. In that M/D all you have to do to get the
variable is call it with DTML-VAR variable_name

1) Create a form page with 'submit' with one text input box with a name of
'email_address'.

2) Point the action to a method called 'result' and create that

3) In the 'result' method include this code dtml-var email_address

4) Play around.

When you submit from one you should be taken to the second page and the
email_address should be there.

Now, for validation you can do all sorts of tricky things. I happen to like
to have the form point back to itself and have one method handle the entire
activity. You can validate things by asking for them, or trying to do
something else like put them into a database/email. If they are not there
you will get an error so you can use dtml-try. What makes Zope great is
that I can have the form and function in the same page (easier to
update/check).

Examples: (these are live and in production so please be kind)

http://fundraising.gotschool.com/tell_a_friend.html

http://market.gotschool.com/  (click on register for either school or
supplier and notice how the form is different for both).

Same thing done twice.

J

 From: Amit Redij [EMAIL PROTECTED]
 Date: Mon, 28 Aug 2000 17:15:03 +0530
 To: [EMAIL PROTECTED]
 Subject: [Zope] Newbie question: FORM processing in Zope.
 
 
 hi,
 
 I am a Perl/CGI programmer, trying out Zope.
 I am confused right now about
 HOW TO process FORM variables?
 and most important thing is
 how to validate form inputs.(like same thing is best done in PERL using
 regex)
 
 that is, if I have a html having some form variables and a submit
 button. I click on the submit button. it should call some script..right?
 My question is how to pass values from one script to another. how is
 this done in Zope?
 
 thanks a lot in advance.
 
 regards
 Amit
 
 
 .--.
 |o_o |
 |\_/ |
 //   \ \Amit Redij
 (| | )   mailto:[EMAIL PROTECTED]
 /'\_   _/`\   
 \___)=(___/ 
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )
 
 


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] How to Delete ZClass Instances programmatically??

2000-08-28 Thread Jean Jordaan

Hi Zopers

I've found the "How-To: Adding ZClass Instances Programmatically",
but now I'm looking for the *Deleting ZClass Instances* one!

I'm trying this as a beginning (hacked from the Zope management
interface)::

dtml-if "AUTHENTICATED_USER.has_role('ContentManager')"
  form action="dtml-var URL0" method="post"
/dtml-if
  [...]
dtml-if "AUTHENTICATED_USER.has_role('ContentManager')"
  input type="checkbox" name="ids:list" value="dtml-var id"
/dtml-if
  [...]
dtml-if "AUTHENTICATED_USER.has_role('ContentManager')"
  input type="submit" name="manage_delObjects:method" value="Delete"
  /form
/dtml-if

Problems: 

 - it sends me to the management screen afterwards, and I'm 
   calling it from the public interface. 

 - I don't necessarily want to give the 'ContentManager' rights
   to delete objects; I'd rather manage this through a delete 
   method with the appropriate proxy role.

Any advice or RTFM pointers?
-- 
Jean Jordaan   --technical writer--
Mosaic Software--Zope 2.1.6 on WinNT and W2K

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] dtml-tree question

2000-08-28 Thread Hugo Ramos

Yellow ppl,

Is there a way to use my own self made '+' icon in a tree tag?
I'dd like to use my own icon only IF i want to... and not change the python
source to use my own icon all the time!

regards

=
Hugo Ramos - [EMAIL PROTECTED]
ZopersORG - http://www.zopers.org
=
Do not meddle in the affairs of programmers, for they are easy to annoy,
and have all the source code!!!


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Re: [Zope-PTK] Re: [Zope] PTK and Membership product

2000-08-28 Thread Shane Hathaway

Chris McDonough wrote:
 
 Forwarding this on from the Zope list to the PTK list
 
 albert boulanger wrote:
 
  From Friday's 8-25 PTK CVS
 
  PTK has logic to support the Membership product, but it seems to be
  using the old MembershipZ name. I want to use this combination because
  we have own own custom database where user accounting will be stored.
 
  (I am using PortalMembership version 0.7.2. By the way the version
  numbers in the code need updating -- it claims it is 0.7.0)
 
   Error Type: AttributeError
   Error Value: setMemberProperties

FYI Membership and the latest CVS PTK have not been made compatible
yet.  That is why it does not work.

Shane

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] rotate Z2.log

2000-08-28 Thread Marcus Mendes

Hello,

How can I rotate my Z2.log??  It's very large !

Thanks.

Marcus Mendes


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] RE: How to Delete ZClass Instances programmatically??

2000-08-28 Thread RC Compaan

Instead of directing your form to URL0 direct it back to your custom
interface.  In your form you can evaluate the value of submit to determine
the appropriate action:

 dtml-if "REQUEST['submit'] == 'Delete'"
dtml-call "manage_delObjects(ids)"

untested.

Roché

 -Original Message-
 From: Jean Jordaan [mailto:[EMAIL PROTECTED]]
 Sent: 28 August 2000 01:43
 To: '[EMAIL PROTECTED]'
 Cc: RC Compaan (E-mail)
 Subject: How to Delete ZClass Instances programmatically??


 Hi Zopers

 I've found the "How-To: Adding ZClass Instances Programmatically",
 but now I'm looking for the *Deleting ZClass Instances* one!

 I'm trying this as a beginning (hacked from the Zope management
 interface)::

 dtml-if "AUTHENTICATED_USER.has_role('ContentManager')"
   form action="dtml-var URL0" method="post"
 /dtml-if
   [...]
 dtml-if "AUTHENTICATED_USER.has_role('ContentManager')"
   input type="checkbox" name="ids:list" value="dtml-var id"
 /dtml-if
   [...]
 dtml-if "AUTHENTICATED_USER.has_role('ContentManager')"
   input type="submit" name="manage_delObjects:method" value="Delete"
   /form
 /dtml-if

 Problems:

  - it sends me to the management screen afterwards, and I'm
calling it from the public interface.

  - I don't necessarily want to give the 'ContentManager' rights
to delete objects; I'd rather manage this through a delete
method with the appropriate proxy role.

 Any advice or RTFM pointers?
 --
 Jean Jordaan   --technical writer--
 Mosaic Software--Zope 2.1.6 on WinNT and W2K



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] rotate Z2.log

2000-08-28 Thread Marcin Kasperski

Marcus Mendes wrote:
 
 Hello,
 
 How can I rotate my Z2.log??  It's very large !
 

Using the same method as for rotating Apache logs. For instance, on my
Debian Linux I created the file
/etc/cron.daily/zope_daily
(made via copying and editing equivalent file for Apache), which rotates
logs. Examine the attachement...



-- Serwis dla programistw, kcik mieszkaniowy: http://www.mk.w.pl 
|
| The only way to truly control a software project is to continuously   
| measure its progress, compare that  to the plan, and then adjust the  
| development  parameters to correct any deviation. Simple. (Martin)

#!/bin/sh
#
# Rotowanie logw zope

cd /opt/Zope-var/var

LOGS=/opt/Zope-var/var/Z2.log
USR=www-data
GRP=www-data

[ -f $LOGS ] || exit 0

APACHE_OLD_LOGS=35
APACHE_DAYS_TO_RUN=all
APACHE_DAY_TO_RUN=any
APACHE_POST_SCRIPT=
APACHE_CHOWN_LOGFILES=1

umask 022

RUNTODAY=0

if [ "$APACHE_DAY_TO_RUN" = "any" ] ; then

# Get today's day and convert to lowercase.
TODAY=$(date +%a | tr 'A-Z' 'a-z')
# Convert days_to_run to lowercase.
APACHE_DAYS_TO_RUN=$(echo $APACHE_DAYS_TO_RUN | tr 'A-Z' 'a-z')
echo "$APACHE_DAYS_TO_RUN" | grep -q "$TODAY"  RUNTODAY=1
[ "$APACHE_DAYS_TO_RUN" = "all" ]  RUNTODAY=1

else

# Get today's day: 01 .. 31
TODAY=$(date +%d | cat)
if [ $APACHE_DAY_TO_RUN = "$TODAY" ] ; then RUNTODAY=1; fi

# Get today's day: 001 .. 366
TODAY=$(date +%j | cat)
if [ $APACHE_DAY_TO_RUN = "$TODAY" ] ; then RUNTODAY=1; fi

fi

if [ "$RUNTODAY" = "1" ] ; then

for LOG in $LOGS
do
if [ -f $LOG ]
then
if [ "$APACHE_CHOWN_LOGFILES" = "1" ]
then
savelog -c $APACHE_OLD_LOGS -m 664 -u $USR -g $GRP \
$LOG  /dev/null
else
savelog -c $APACHE_OLD_LOGS -m 644 -u root -g root \
$LOG  /dev/null
fi
fi
done

/etc/init.d/zope restart

## Send a reload signal to the e server.
#/etc/init.d/apache reload  /dev/null

# Run apache post processing script if executable.
if [ -x "$APACHE_POST_SCRIPT" ]
then
$APACHE_POST_SCRIPT
fi

fi



[Zope] updating only zCatalog ?

2000-08-28 Thread Philipp Dunkel

Hi Zopers,

I'm really happy that the with the newest zope releases
the zCatalog has got more stable.
I'd like to use it for my Products, but I don't have the time now to port
everything to the new zope version.
Is it possible to only use the new catalog and which files do I have to
change/update ?
Or is the catalog even as a product available?

TIA
philipp dunkel


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Better Demo Templates

2000-08-28 Thread Chris Withers

Jean Jordaan wrote:
 I've already made a couple for own use, but will try and make
 one to be general and comment it,  send when I'm done.

Great :-)

I look forward to it...

cheers,

Chris

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Newbie question: FORM processing in Zope.

2000-08-28 Thread Loren Stafford



A great resource for newbies is the collection of How-To's
http://www.zope.org/Documentation/How-To (or better yet:
http://www.zope.org/Members/AlexR/tips/howto_list where you can use browser
search to find what you need).

Search for "forms" and you will see, for example:

http://www.zope.org/Members/jules/smarterforms_html

In short, the methods of Zope objects are all "CGI scripts". For the
"action" of a form, you supply the url of a form-handling method of some
Zope object you have created. When that method runs, form fields are stored
in the dictionary (hash, to you) that implements the namespace for the
request. You access them as simple DTML variables: e.g.

dtml-var form_field_name

If you want to send the value of that form field on to another form, you do
it much the same as in Perl -- you code a hidden form field and assign it
the value dtml-var form_field_name.

-- Hope that helps
-- Loren

- Original Message -
From: "Amit Redij" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: August 28, 2000 04:45 AM
Subject: [Zope] Newbie question: FORM processing in Zope.



 hi,

 I am a Perl/CGI programmer, trying out Zope.
 I am confused right now about
  HOW TO process FORM variables?
 and most important thing is
 how to validate form inputs.(like same thing is best done in PERL using
 regex)

 that is, if I have a html having some form variables and a submit
 button. I click on the submit button. it should call some script..right?
 My question is how to pass values from one script to another. how is
 this done in Zope?

 thanks a lot in advance.

 regards
 Amit

 
  .--.
 |o_o |
 |\_/ |
//   \ \Amit Redij
   (| | )   mailto:[EMAIL PROTECTED]
  /'\_   _/`\
  \___)=(___/
 

 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )




___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] List of object's name in a ZClass

2000-08-28 Thread Vincent



Hi,

In a Zope folder, I have 
:
 - 1 instance of a 
personnal ZClass A
 - 10or more instances of 
ZClass B
 - a DTML 
document

I would like to call a DTML 
method (which is implemented in the ZClass A) from the DTML document to display 
a list of all instances names of ZClasse B

If somebody know how to do 
that...

Thanks for 
all


[Zope] Problem with SiteAccess 1.0.1

2000-08-28 Thread William JOYE

Hello,

I have some minor problems with SiteAccess 1.0.1 and Zope 2.1.6 + hotfix.

1. When click on the folder that contain SiteRoot, I need to enter again
login and password. Why ?
2. When I delete an object, I have always an script error message. Why ?

Are these problems already fixed ? Is the SiteAccess 1.0.1 product stable
enough to use it in production ?

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Sub Class Question

2000-08-28 Thread R. David Murray

On Sun, 27 Aug 2000, Loren Stafford wrote:
 Here's what MJ told me about that case. I'm not sure it applies to your
 case. Did you try it? Did it work?

Thanks for the info.  It was the Extension class piece I was missing.
I tested it on a regular class, of course grin.

The original problem wasn't mine.  I think his problem was different
(passing **kw on to a class method), and I think I pointed him to
the right answer but haven't seen a followup post.

--RDM


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] rotate Z2.log

2000-08-28 Thread Andy McKay

You can patch Z2.py

so that line 599 (or thereabouts) instead of:

lg = logger.file_logger(LOG_PATH)

reads:

lg = logger.rotating_file_logger(LOG_PATH, freq='daily', maxsize=400)

- Original Message -
From: "Marcin Kasperski" [EMAIL PROTECTED]
To: "Zope List Submission" [EMAIL PROTECTED]
Sent: Monday, August 28, 2000 6:39 AM
Subject: Re: [Zope] rotate Z2.log


 Marcus Mendes wrote:
 
  Hello,
 
  How can I rotate my Z2.log??  It's very large !
 

 Using the same method as for rotating Apache logs. For instance, on my
 Debian Linux I created the file
 /etc/cron.daily/zope_daily
 (made via copying and editing equivalent file for Apache), which rotates
 logs. Examine the attachement...



 -- Serwis dla programistw, kcik mieszkaniowy: http://www.mk.w.pl
 |
 | The only way to truly control a software project is to continuously
 | measure its progress, compare that  to the plan, and then adjust the
 | development  parameters to correct any deviation. Simple. (Martin)






 #!/bin/sh
 #
 # Rotowanie logw zope

 cd /opt/Zope-var/var

 LOGS=/opt/Zope-var/var/Z2.log
 USR=www-data
 GRP=www-data

 [ -f $LOGS ] || exit 0

 APACHE_OLD_LOGS=35
 APACHE_DAYS_TO_RUN=all
 APACHE_DAY_TO_RUN=any
 APACHE_POST_SCRIPT=
 APACHE_CHOWN_LOGFILES=1

 umask 022

 RUNTODAY=0

 if [ "$APACHE_DAY_TO_RUN" = "any" ] ; then

 # Get today's day and convert to lowercase.
 TODAY=$(date +%a | tr 'A-Z' 'a-z')
 # Convert days_to_run to lowercase.
 APACHE_DAYS_TO_RUN=$(echo $APACHE_DAYS_TO_RUN | tr 'A-Z' 'a-z')
 echo "$APACHE_DAYS_TO_RUN" | grep -q "$TODAY"  RUNTODAY=1
 [ "$APACHE_DAYS_TO_RUN" = "all" ]  RUNTODAY=1

 else

 # Get today's day: 01 .. 31
 TODAY=$(date +%d | cat)
 if [ $APACHE_DAY_TO_RUN = "$TODAY" ] ; then RUNTODAY=1; fi

 # Get today's day: 001 .. 366
 TODAY=$(date +%j | cat)
 if [ $APACHE_DAY_TO_RUN = "$TODAY" ] ; then RUNTODAY=1; fi

 fi

 if [ "$RUNTODAY" = "1" ] ; then

 for LOG in $LOGS
 do
 if [ -f $LOG ]
 then
 if [ "$APACHE_CHOWN_LOGFILES" = "1" ]
 then
 savelog -c $APACHE_OLD_LOGS -m 664 -u $USR -g $GRP \
 $LOG  /dev/null
 else
 savelog -c $APACHE_OLD_LOGS -m 644 -u root -g root \
 $LOG  /dev/null
 fi
 fi
 done

 /etc/init.d/zope restart

 ## Send a reload signal to the e server.
 #/etc/init.d/apache reload  /dev/null

 # Run apache post processing script if executable.
 if [ -x "$APACHE_POST_SCRIPT" ]
 then
 $APACHE_POST_SCRIPT
 fi

 fi



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] ZClass -- Product

2000-08-28 Thread Nestor A. Diaz L.

HI,

I want to know if there is any utility that let translate a ZClass to a
Product, i'm worry using the frames based interface, so i'm considering to
switch to a Product a utility that let that would be usefull howevere a
HOWTO on doing this would be fine.

thanks,

Nestor A. Diaz
Ingeniero de Desarrollo
Engendro - Comercio Electronico sobre Linux
Email: [EMAIL PROTECTED] - WWW: http://www.engendro.com


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Problem with SiteAccess 1.0.1

2000-08-28 Thread Evan Simpson

From: William JOYE [EMAIL PROTECTED]
 I have some minor problems with SiteAccess 1.0.1 and Zope 2.1.6 + hotfix.

 1. When click on the folder that contain SiteRoot, I need to enter again
 login and password. Why ?

Most likely, because you have a Base set in your SiteRoot that differs from
the base URL you had logged into.  Your browser will not send your
authentication information to a URL with a different host name.

 2. When I delete an object, I have always an script error message. Why ?

Sorry, you'll need to be more specific.  When you delete an object inside
the SiteRooted folder, or anywhere?  What error message? (traceback too,
please)

 Are these problems already fixed ? Is the SiteAccess 1.0.1 product stable
 enough to use it in production ?

It runs all of my domains, and those of a fair number of other people.
YMMV.

Cheers,

Evan @ digicool  4-am


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] FSSession problems...

2000-08-28 Thread Pavlos Christoforou

On Mon, 28 Aug 2000, Curtis Maloney wrote:

 /dtml-if
 
 This was aparently working fine for quite some time (about a month of public 
 usage), until last week.  We have examined logs, and seen that one person 
 accidentaly used the system under someone elses ReturnerID, and then 
 rectified their mistake.

If he did rectify the mistake then that should not have resulted in a
problem. In any case the problem should have been isolated to that user
only. Could it be that the cookie is cached somewhere? I am not familiar
with the underlying pricinciples of the apache Proxy directives. 


Pavlos


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Re. Advice for new zope installation

2000-08-28 Thread Spicklemire, Jerry

Henk Schets wonders:

- how easy and reliably can I manage my virtual hosts (about 8 sites
right now) ? Very important.

The SiteAccess product contributed by Evan Simpson is a popular solution.

http://www.zope.org/Members/4am/SiteAccess2


- how stable is Zope regarding to Apache on Linux ?

That's how "the Zope Folks" at Digital Creations run Zope, so I'd guess 
it's about a clean as can be. However, there is more than one approach. 

Probably the easiest is ZAP, which comes with a preconfigured Apache.

http://www.zope.org/Members/michel/Products/Zap

Start here:

http://www.zope.org/Members/guy_davis/install_routes

Below is the tip of the iceberg from a search on "apache", at Zope.org

http://www.zope.org/Members/shaw/HowTo/ApacheFrontEnd

http://www.zope.org/Members/nemeth/howtos/zopeandapacherh61

http://www.zope.org/Members/anser/apache_zserver

http://www.zope.org/Members/michel/HowTos/ApacheRewriting

http://www.zope.org/Members/kedai/apache_zope_fcgi


- we have a MySql database, is it easy to connect with Zope ?

Lot's of folks use MySQL with Zope, and there's a ready made "DA" 
(database adapter) just for this purpose.

http://www.zope.org/Members/mordred/ZMySQLDA


- can I access the Zope internal database with e.g. ODBC ?

So far, no. New and interesting ways of storing Zope Objects are being 
developed though, so let's not count this one out.


- can I use log analyzers to get some statistics about our site ?

Zope does do some logging, but I don't know much about that. 
Maybe someone could answer?


- any advice about migrating an existing site ?

One handy item that I have used is Jonathan Farr's LocalFS. This way 
you can keep serving static pages and images "directly" from a local 
file system, and frees you to decide when the time is right to turn 
all those icons into Zope Objects.

http://www.zope.org/Members/jfarr/Products/LocalFS

Also, leverage your MySQL for all its worth. The more stuff you can 
abstract into tables and treat as lists, the more you'll like Zope!

Later,
Jerry S.


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Advice for new zope installation

2000-08-28 Thread J. Atwood

 From: "Henk Schets" [EMAIL PROTECTED]
 Date: Mon, 28 Aug 2000 09:08:44 +0200
 To: [EMAIL PROTECTED]
 Subject: [Zope] Advice for new zope installation
 - how easy and reliably can I manage my virtual hosts (about 8 sites
 right now) ? Very important.

Much easier than you can imagine. I have 5 sites (different domains) right
now running off of one installation and I can't tell you how much easier it
has made my life. I can 'manage' into the root of the installation and play
with all the sites. Any products I install can be used on all of them and
yet to the outside user they are all totally different. I am moving over 3
more so within a few months should be at 8.

 - how stable is Zope regarding to Apache on Linux ?

Very. Most of my Linux boxes stay up forever (150+ days and counting). Zope
is harder to tell since you have to restart it with some products. Out of
the 4 or 5 Zope instances I have running they all stay up as long as I don't
reboot them (usually 30-50 days). Plus, since you can configure Zope to
watch its own process you are doubly sure it will stay up. Apache is well,
bulletproof.

 - we have a MySql database, is it easy to connect with Zope ?

Haven't done it but PostgreSQL is a bit tough on the install (a half day)
but very stable after that.

 - can I access the Zope internal database with e.g. ODBC ?

Nope. Not that kind of database. Think more flat file.

 - can I use log analyzers to get some statistics about our site ?

Oh yes. I find that Zope alone (no Apache) produces the best logs. it is CLF
so most log analyzers will get it. I use Analog and it is great.
(http://www.analog.cx).

 - any advice about migrating an existing site ?

There is a program call LoadSite (look on Zope.org) But that only gets you
half way there. I would suggest that you start from scratch but you will
soon see that since Zope is so good at content management and design it will
be much easier to move over lots of data and you will learn new and better
ways of displaying it.

J


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Showing the name of a file-type form variable

2000-08-28 Thread icottee



Hi

file.filename should be what you are after. e.g. In my latest project I set a
variable myFileName to be the name of the file uploaded using

  dtml-var "REQUEST.set('myFileName',file.filename)"

where file is the name of my file upload control in my form.

Ian

Original Message ---
Hi Zopers

I've got this::

 tdinput type="file"
 name="file"
 dtml-if file value="dtml-var "file"" /dtml-if
 /td

Which returns::

 ZPublisher.HTTPRequest.FileUpload instance at 131dc48

in the input box. I'd really rather have the filename. How does
one do that?



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Cool JavaScript

2000-08-28 Thread Robert Miller

On Mon, 28 Aug 2000, Luis Cortes wrote:
 Hi,
 
 I am looking for some cool Java script sites -- I would like to see how
 some button effects are done.  Anyone got one out there?

http://www.google.com/search?q=javascripthl=ensafe=off

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Re: Automatic creation of searchable documents from Oracle DB tables

2000-08-28 Thread Satheesh Babu

Hi Chris,

I've a system, where folks enter data through some
HTML forms - DTML methods - Oracle tables. This
is mainly used for storing web page content. Then
I generate a static document using a chosen template,
from the database. I think this is some what similar
to your requirement.

This is seemingly a round about way of doing things.
My reasons:
1. I'm not really confident in ZODB recovery in case of
   a data corruption.
2. I'm lot more confident of getting data out of Oracle
   using SQL, than writing Python on ZODB :-(
3. Our content can grow quite large, 20-25GB is very realistic.
4. Oracle's interMedia search is very capable.
5. As long as core content is in Oracle, the front end can be
   Zope or PHP or ASP as the suites might dictate.

Why the hell do I make static document back from database?
1. Dynamically creating documents from Oracle is time consuming.
   So, I create static version as some kind of cache.
2. To create links between data in database, it is a lot more
   easier for users, with static versions.

I've working code for this that I could share with you. Ideally
what I want is
   1. ZClass to reflect document attributes
 2. When one manages a ZClass instance, corresponding record
in Oracle gets managed as well.
Didn't get time to check this properly. Someone told be ZPatterns
will be of great help. But then again, Paul Everitt has said that
they are working on Oracle+ZODB. I worked on an Oracle based storage
for some time, but then dropped it.

To make a long story short, for help on making static content
from RDBMS, there is an excellent HOW-TO at
www.zope.org/Members/rossl/GenerateStaticPages

HTH
[EMAIL PROTECTED]
http://www.mamlegault.com/~vsbabu/

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Cool JavaScript

2000-08-28 Thread Kapil Thangavelu

Luis Cortes wrote:
 
 Hi,
 
 I am looking for some cool Java script sites -- I would like to see how
 some button effects are done.  Anyone got one out there?
 
 Thanks ahead of time,
 Luis.
 


http://www.brainjar.com

some of the slickest dhtml i've seen.

Kapil

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Nested dtml???

2000-08-28 Thread Tim Hicks

I am trying to work my way up through folders, checking whether each
folder has a property named 'site_root_folder'.  Logically (in *my*
head anyway), what I have written below is what I want to do, but I'm
not sure that I'm really writing this the write way.  I vaguely
remember reading that I can't nest dtml-if tags within dtml-in tags.

I'd really appreciate any help on this

tim

dtml-let level=0
dtml-in level
dtml-if "PARENTS[level].hasProperty('site_root_folder')"
dtml-var "PARENTS[level].absolute_url()"
dtml-else level="level+1"
/dtml-in
/dtml-let


Tim:  [EMAIL PROTECTED]




___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] SiteAccess 2.0b3 missing setURL?

2000-08-28 Thread Evan Simpson

From: "albert boulanger" [EMAIL PROTECTED]
 An oversight or is there a change in API?

Change in API; You want REQUEST.setServerURL, which is documented here:
http://www.zope.org/Members/michel/Projects/Interfaces/ImplementingVirtualHo
sts

Cheers,

Evan @ 4-am  digicool


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] SiteAccess 2.0b3 missing setURL?

2000-08-28 Thread albert boulanger



   Change in API; You want REQUEST.setServerURL, which is documented here:
   http://www.zope.org/Members/michel/Projects/Interfaces/ImplementingVirtualHo
   sts


Ok the doc says:

Backward Rewriting

Any URLs generated by an application should take virtual hosting into account by 
replacing the VirtualRoot's physical path with its virtual path. The
base elements may also need to be rewritten.

 REQUEST.setServerURL(protocol=None, hostname=None, port=None)
- Hmm no path arg mentioned here but the description says

 This method modifies the URL-related variables in the PublisherRequest to have 
the specified protocol, hostname, port, and path, while
 leaving unspecified parts alone. Returns the new value of REQUEST['SERVER_URL'].

What happened to the path argument to the function? The doc indicates
its should be there, but it seems to be missing:

Zope Error

  Zope has encountered an error while publishing this resource. 

  TypeError

  Sorry, a Zope error occurred.

  Traceback (innermost last):
File 
/users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py,
 line 222, in publish_module
File 
/users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py,
 line 187, in publish
File 
/users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/Zope/__init__.py, 
line 221, in zpublisher_exception_hook
  (Object: Traversable)
File 
/users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py,
 line 162, in publish
File 
/users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/ZPublisher/BaseRequest.py,
 line 309, in traverse
File 
/users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/ZPublisher/BeforeTraverse.py,
 line 85, in __call__
File 
/users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/Products/SiteAccess/AccessRule.py,
 line 22, in __call__
File 
/users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/ZPublisher/BeforeTraverse.py,
 line 112, in __call__
File 
/users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/OFS/DTMLMethod.py, 
line 172, in __call__
  (Object: dtProcessSession)
File 
/users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/DocumentTemplate/DT_String.py,
 line 528, in __call__
  (Object: dtProcessSession)
File 
/users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/DocumentTemplate/DT_Util.py,
 line 337, in eval
  (Object: REQUEST.setServerURL(path=REQUEST.steps+[SessionID]))
  (Info: REQUEST)
File string, line 0, in ?
  TypeError: unexpected keyword argument: path

Puzzled,
Albert Boulanger
[EMAIL PROTECTED]


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] ANN: ZWikiZC version 0.7.3 alpha

2000-08-28 Thread Johan Carlsson

The ZWikiZC version 0.7.3 alpha completely rely on ZCatalog
for looking up WikiPages from WikiNames.

No references are stored in the ZWikiZG page letting cutpaste,
delete and other management actions ignore updating links.

I bellew this is a more scalable solution than in the version 0.7.2 alpha.
Bottle neck might be if a page contains alote of WikiNames.

I also cleaned it up a bit (remove some hacky stuff from the old ZWiki).

Also added are keywords, wiki_meta_types and author_ids.

http://www.zope.org/Members/johanc/ZWikiZG/wiki

Cheers,
Johan Carlsson


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )