Re: [Zope] TinyTable : filter query pb

2001-01-26 Thread Aleksander Salwa

On Fri, 26 Jan 2001, Thierry Pasquier wrote:

 usagers is a TinyTable
 
 this, is ok :
 dtml-call "REQUEST.set('usager','bruno')"
 dtml-in "usagers(ident=usager)"
 ...
 
 but, not this : why ?
 dtml-call "REQUEST.set('usager',AUTHENTICATED_USER)"
 dtml-in "usagers(ident=usager)"

Because 'bruno' is a string, while AUTHENTICATED_USER is an instance of
some class (when used in dtml-var AUTHENTICATED_USER it is automatically
converted to string - user's id in that case).
Try AUTHENTICATED_USER.getId().

[EMAIL PROTECTED], [EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/




___
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] zope + img tags + javascript

2001-01-25 Thread Aleksander Salwa

On Thu, 25 Jan 2001, Lee wrote:
 
 I *hate* image maps but I'd like to use one so  how can I add the
 details to the dtml-var imageName? I'd also like to add various bits

Probably you need dtml-var "imageName.tag(attrib='value', attr2='v2')".


___
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] Instatiate object instances :-)

2001-01-25 Thread Aleksander Salwa

Paths can be treated as "pointers", so methods
getPhysicalPath/(un)restrictedTraverse may be what you need.

[EMAIL PROTECTED], [EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] LocalFS and PathHandler

2001-01-22 Thread Aleksander Salwa

On Mon, 22 Jan 2001, Ulrich Wisser wrote:

 I try to access LocalFS from my own DTML method.
 (Exactly from my PathHandler method.) I got all
 directory information in one array like this
 
 path_to_handle = ['sub1', 'sub2', 'sub3']
 
 How can a get a directory listining with LocalFS
 for path "/sub1/sub2/sub3/"? I know I need something
 like "lfs['sub1']['sub2']['sub3'].fileids". But
 what if there are more (or less) elements in path_to_handle?

I would write it in python, as a recursive function:

def goo(lfs, path_to_handle):
   if len(path_to_handle)==0:
  return lfs
   else:
  lfs=lfs[path_to_handle[0]]
  path_to_handle=path_to_handle[1:]
  return goo(lfs, path_to_handle)


[EMAIL PROTECTED], [EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/




___
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] Zope 2.3.0b2 bug #2

2001-01-20 Thread Aleksander Salwa

On Sat, 20 Jan 2001, Oleg Broytmann wrote:

Zope now sends all HTML in management screens with
 
 meta http-equiv="content-type" content="text/html; charset=iso-8859-1"
 
This is WRONG way of doing! Please stop it and don't do it :) Meanwhile
 - where I can turn this off?

It would be very nice, if we could set it somewhere in configuration.
Till now (Zope 2.2.x) I have to patch Zope (some *.dtml files, and even
some *.py files) in order to have proper Content-Type headers on my
management screens (specifically iso-8859-2).

[EMAIL PROTECTED], [EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] exception handling for zclient

2001-01-16 Thread Aleksander Salwa

On Tue, 16 Jan 2001, wade naveja wrote:

 i'm using zclient as outlined in
 http://www.zope.org/Members/lstaffor/ZClientMethod to serve pages from
 another web server as if they were being served form my zope server.
 
 how would i write an exception to handle the case of the other web server
 being down?  when the other web server is down, i'd like to include a bit
 of text saying "this service is temporarily unavailable.  blah, blah,
 blah...".
 
 
 from ZPublisher import Client
 
 def web_client(url = 'http://www.server.com/', username = None,
 password = None, **kw):
 '''access http server'''
 if kw:
 return Client.call(url,username,password,kw)[1]
 else:
 return Client.call(url,username,password)[1]


try:
return Client.call .
except:
return 'this service is temporarily unavailable. \
blah, blah, blah...'


[EMAIL PROTECTED], [EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] Curious DTML question

2001-01-16 Thread Aleksander Salwa

On Wed, 17 Jan 2001, Nick McDowell wrote:

 dtml-with templates
 dtml-var myHTMLtemplate
 /dtml-with
 
 ...everything works correctly and my HTML page is rendered properly with
 graphics etc.  However I initially tried to execute the method via the
 following (slightly less keyboard action) -
 dtml-var expr="templates.myHTMLtemplate"
 
 ...this results in the HTML template being displayed in plain text
 format i.e. the HTML is not rendered and all the tags are visible.

 I also tried calling -
 dtml-var expr="templates.myHTMLtemplate()"
 ...which was worse as it  resulted in errors relating to Zope's
 inability to "locate" dtrml methods called within the "myHTMLtemplate"
 method..

dtml-var expr="templates.myHTMLtemplate(_.None, _)"

[EMAIL PROTECTED], [EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/




___
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] Strange behavior of document_src

2001-01-16 Thread Aleksander Salwa

On Tue, 16 Jan 2001, Sergio Fogel wrote:

 I want to display the source of a DTML document inside a textarea (as in
 Zope's DTML editing screen).
 
 If I do: dtml-var "doc.document_src()" 
 It works OK, but if I try
 dtml-var "_['doc'].document_src()" 
 it tries to evaluate doc, and gives me an error (some of the vars are not
 defined in this context).

It is behavior of _[], not of document_src.
_[] syntax causes rendering of selected object.


[EMAIL PROTECTED], [EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/




___
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] reindex when a zclass is edited

2001-01-14 Thread Aleksander Salwa

On Sat, 13 Jan 2001, Tim Hicks wrote:

 Thanks very much for the help Aleksander, but when I drop your code into my
 method, it doesn't work (it doesn't break either). I simply copied and
 pasted your code, then edited the final redirect at the bottom.  Here is the
 submission part of my edit form (if it makes any difference).
 
 TD align=left
   INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Change"
  /TD
  TD align=left
INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Taller"
INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Shorter"
INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Wider"
INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Narrower"
  /TD
 
 I had a look on the ZQR, and found the section on manage_edit, but I still
 don't really understand how the dtpref_cols/rows works.  Any insight?

It uses cookies (named 'dtpref_rows' and 'dtpref_cols') storing size of
your textarea. Have you turned off cookies by accident ?
If it receives (from edit form) a variable named 'SUBMIT' with value equal
to one of the above ('Taller', etc.), then it sends new cookie values to
the browser.

Source file: lib/python/OFS/DTMLMethod.py,
methods 'manage_edit' and '_er'.


[EMAIL PROTECTED], [EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] Lines Property and special namespace variable

2001-01-13 Thread Aleksander Salwa

On Sat, 13 Jan 2001, Tom Scheidt wrote:

 Im trying to changes the contents of a lines property
 into floating point numbers a la:
 
 dtml-in lines
 dtml-let "_.float(lines)"
 dtml-if "lines  0"font color="#006600"/dtml-if
 dtml-var sequence-item
 /dtml-in
 
 The contents of the lines property are:
 25.32
 -16.50

dtml-in lines
dtml-let float_seq_item="_.float(_['sequence-item'])"
 dtml-if "float_seq_item0"font color="#006600"/dtml-if
 dtml-var sequence-item
 dtml-if "float_seq_item0"/font/dtml-if
/dtml-let
/dtml-in

[EMAIL PROTECTED], [EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] reindex when a zclass is edited

2001-01-12 Thread Aleksander Salwa


On Thu, 11 Jan 2001, Tim Hicks wrote:

 from a builtin edit form as my template.  One thing doesn't work now though,
 and that's making the textarea wider/narrow/etc.  Obviously, this is because
 I have static values put in for the dimensions of the text area, but I'm not
 sure how to alter this to make it work... any pointers?

I use this code for that purpose:

dtml-if "REQUEST.has_key('dtpref_cols')"
 dtml-if "REQUEST.has_key('dtpref_rows')"
  dtml-var
"manage_edit(data,title,SUBMIT,dtpref_cols,dtpref_rows,REQUEST)"
 dtml-else
  dtml-var "manage_edit(data,title,SUBMIT,dtpref_cols,REQUEST=REQUEST)"
 /dtml-if
dtml-else
 dtml-if "REQUEST.has_key('dtpref_rows')"
  dtml-var
"manage_edit(data,title,SUBMIT,dtpref_rows=dtpref_rows,REQUEST=REQUEST)"
 dtml-else
  dtml-var "manage_edit(data,title,SUBMIT,REQUEST=REQUEST)"
 /dtml-if
/dtml-if
dtml-call "reindex_object()"
dtml-call "RESPONSE.redirect(manage_edycjaTresciForm.absolute_url())"


[EMAIL PROTECTED], [EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] case insensitive search?

2001-01-03 Thread Aleksander Salwa

On Wed, 3 Jan 2001, Robin Becker wrote:

 Is there an easy way to make the Find tab case insensitive. It seems
 like a very common need, but I see that FindSupport.py is calling
 string.find which makes it seem as though this is harder than it should
 be.

You can try my very quick patch, attached below.
But beware - it gives much more that you want - it is full regexp search.


--- FindSupport.py  Wed Jul 26 16:11:54 2000
+++ FindSupport_caseIns.py  Wed Jan  3 09:33:34 2001
@@ -92,7 +92,7 @@
 from Globals import HTMLFile
 from DocumentTemplate.DT_Util import InstanceDict, TemplateDict
 from DateTime import DateTime
-from string import find
+from re import search, IGNORECASE
 from AccessControl import getSecurityManager
 
 class FindSupport(ExtensionClass.Base):
@@ -177,7 +177,8 @@
 and
 (not obj_searchterm or
  (hasattr(ob, 'PrincipiaSearchSource') and
-  find(ob.PrincipiaSearchSource(), obj_searchterm) = 0
+  search(obj_searchterm, ob.PrincipiaSearchSource(),
+   IGNORECASE) != None
   ))
 and
 (not obj_expr or expr_match(ob, obj_expr))
@@ -269,7 +270,8 @@
 and
 (not obj_searchterm or
  (hasattr(ob, 'PrincipiaSearchSource') and
-  find(ob.PrincipiaSearchSource(), obj_searchterm) = 0
+  search(obj_searchterm, ob.PrincipiaSearchSource(),
+  IGNORECASE) != None
   ))
 and
 (not obj_expr or expr_match(ob, obj_expr))



___
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] case insensitive search?

2001-01-03 Thread Aleksander Salwa

On Wed, 3 Jan 2001, Robin Becker wrote:

 Is there an easy way to make the Find tab case insensitive. It seems
 like a very common need, but I see that FindSupport.py is calling
 string.find which makes it seem as though this is harder than it should
 be.

Now, I did it better way. No regular expressions. Just case-insensitive
search. "Case insensitive" checkbox on "Find" form.
If you need it - just take a look at an attachment.
Maybe I will send it to the Collector...


[EMAIL PROTECTED], [EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/

 caseInsensitiveFind.tgz


Re: [Zope] manage_users( ) method

2001-01-02 Thread Aleksander Salwa

On Tue, 2 Jan 2001, Mohan Baro wrote:
 Where can I get the specifications for acl_users.manage_users()?

I know it's not the best answer, but you can read the
source: ZOPE_DIR/lib/python/AccessControl/User.py


[EMAIL PROTECTED], [EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/



___
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] New install - no management screen?

2000-12-31 Thread Aleksander Salwa

On Sun, 31 Dec 2000, Glenn Gillis wrote:

 After installing 2.2.4 on a Windows 2000 workstation to begin learning Zope
 I'm having trouble getting the management screen to display. When connecting
 to http://localhost:8080/manage I can log in successfully, created a new
 user with the "manager" role and get the tree (control panel, acl users,
 etc) in the left hand pane. But when selecting the root folder (whether
 logged in as the super user or the user I created) the right hand pane
 refuses to display anything but the "Welcome to Zope! Congratulations, your
 Zope is up and running..." page. I don't see anything similar to this
 problem in any other posts, FAQs, etc. Anyone have any suggestions? Thanks
 in advance,

Try to turn off proxy server in your browser's settings.
I saw such things using "wwwoffle" proxy.

[EMAIL PROTECTED], [EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] ZCatalog raises index out of range exception error

2000-12-19 Thread Aleksander Salwa

On Tue, 19 Dec 2000, Marcin Kasperski wrote:
 Partial solution: at something like 2:00 AM delete your SiteRoot rule,
 reindex with ZCatalog and create this rule again. Searching works
 (although I needed to edit the paths found a bit in the form responsilbe
 for search results presentation).

You don't need to delete your SiteRoot. You can use one of techniques
described in SiteRoot docs to suppress it within particular request.
I use trick with phantom folder, call it 'Z'.
So my AccessRule looks like:

Is there a path, and does it start with 'Z'?
dtml-let stack="REQUEST['TraversalRequestNameStack']"
 dtml-if "stack and stack[-1]=='Z'"
  Get rid of 'Z': dtml-call "stack.pop()"
  Put it back logically: dtml-call "REQUEST.setVirtualRoot('Z')"
  
 dtml-else

Is the first-level domain 'hotsite.com'? Ignore sub-domains and port
number.
dtml-if "_.string.split(_.string.lower(_.string.split(HTTP_HOST,
':')[0]), '.')[-2:]==_.string.split('www.hotsite.com','.')[-2:]"
 Add physical root: 
 dtml-call "REQUEST['TraversalRequestNameStack'].append('hotsite')"
 dtml-call "REQUEST.set('SiteRootPATH','/')"
/dtml-if

 /dtml-if
/dtml-let


In my SiteRoot, I have all properties left blank.

When I access my server using URL like www.myserver.com/Z/something, then
SiteRoot is turned off.

With this solution, your site may be still accessible to customers, while
you are working without SiteRoot (i.e. cataloging objects).

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/





___
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] adding Mail Host also legacy, broken by Hotfix_2000-12-08

2000-12-18 Thread Aleksander Salwa

On Mon, 18 Dec 2000, Bill Welch wrote:

 Just for the record.

As I grepped through sources, I see that SiteAccess (2.0.0b4)
also uses 2-argument legacy mechanism :(

Anyway: why it still works ?
I have Hotfix_2000-12-08 installed and I still can add new SiteRoots.

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] LoginManager - logging out

2000-12-17 Thread Aleksander Salwa


I used this code in my "logoutForm" to logout user in my old setup
(LoginManager-0_8_7a1, ZPatterns-0-4-2a1 and Zope 2.2.1):
dtml-call "AUTHENTICATED_USER.logout()"

It doesn't work when using LoginManager-0-8-8b1 + ZPatterns-0-4-3b2 +
Zope 2.2.4.
I've found a work-around:
dtml-call "acl_users.logoutUser(AUTHENTICATED_USER.getId())"
It logouts user as expected.

But, can anybody tell me, why the former one doesn't work as it should ?


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/



___
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] LoginManager - logging out

2000-12-17 Thread Aleksander Salwa

On Sun, 17 Dec 2000, Chalu Kim wrote:
 No, you are right. It does not work. It is because LM's default login
 method is Basic. Basic logout does not work because of Basic
 authentication and that the browser caches the credential. This means
 unless you shut down your browser, whatever you do, you are back to
 square one.

But I use cookie authentication all the time.


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] Problems with adding tutorial

2000-12-13 Thread Aleksander Salwa


On Tue, 12 Dec 2000, Bob Sidebotham wrote:

 I did see the messages regarding creating a non-admin user and
 authenticating as that user (by first terminating the zope process). I
 did all that.

Terminating BROWSER, not Zope.

 Please note that I'm using the latest zope tarball:
 
   Linux Mandrake 6.0, zope2.3.0a1, Python 2.0, Communicator 4.6.

Keep in mind that the latest STABLE version is Zope 2.2.4.
Officially supported (by Zope) release of Python is still 1.5.2.


   Aleksander Salwa



___
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] LocalFS question

2000-12-12 Thread Aleksander Salwa

On Mon, 11 Dec 2000, Leichtman, David J wrote:
 How do you access an individual object in a LocalFS? By that, I mean:
[...]
 dtml-var "localfs_object.localfs_subobject.bobobase_modification_time",
 you get the error NameError: localfs_subobject

dtml-var "localFSinstance['directory']['subdir']['file'] 


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/



___
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] ZClass with images

2000-12-11 Thread Aleksander Salwa

On Sat, 9 Dec 2000, Diego Rodrigo Neufert wrote:

 Anyone know how to put some images in  ZClass? I have done things like 
 putting ZClass with base class OFS:Image but with it I can only assing one 
 Image do the object... I need to assign two or tree images do the object.

Try to subclass OFS:Folder. In that folder you can put as many images as
you want.
I have 1 ZClass deriving from both Folder and DTMLMethod and it works
fine. (I had some trouble with setting view tabs properly, but finally I
solved it.)

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/





___
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] security - am I going crazy ?

2000-12-08 Thread Aleksander Salwa


Few days ago I found that on site that I'm currently working on,
everybody can add DTMLMethods and Documents (and maybe do more, I haven't
checked yet, but I think it's bad enough !) by simply entering URL
http://www.mysite.com/manage_addDTMLMethod?id=q1title=qq1file=qqq1

After that Zope sends 'Location' header to redirect user to 'manage_main'.
That (manage_main) causes 'Unauthorized' exception.
But that object 'q1' was added !!!

I was thinking that it's a bug in Product. (I use LoginManager, LocalFS,
SiteAccess). I decided to upgrade my Zope from 2.2.1 to 2.2.4 and upgrade
all Products (one good thing so far ;)). No success.
So I did fresh install of Zope 2.2.4, without additional Products, with
with brand new Data.fs. Problem persists !
I have default security settings, so Anonymous can't "Add Documents,
Images, and Files".

Of course user can put any DTML in this object - you know the
consequences... (and if the folder where this object is located is owned
by high-privileged user, then this object is owned by that user too
(through acquisition)).
I just checked: I can't add Folders this way.

What's going on ?!? Have I found very big security hole, or just
I'm going crazy ? :(

P.S.
Just take a look at object with id "haveIFoundABug" in root level
of www.zope.org that I created few seconds ago...

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] Passing lists in a get request (ZCatalog Search)

2000-12-02 Thread Aleksander Salwa

On Fri, 1 Dec 2000, Darin Lee wrote:

 the request would look like:
 search?meta_type=Publicationtheme=Airtheme=Landtheme=Water
 
 I can't figure out how to pass a list in the get request. How do I pass
 more than one theme to the method as a list? I have discovered through
 trial and error that I can pass it the values if I repeat theme for each
 list item. However, I also have a criteria - "category" with over 32
 items, and a criteria - "division" with 14 items. This becomes extremely
 clumsy with
 "category=reportscategory=guidebooksdivision=lwmdivision=aqd" etc. repeated
 32 times. Not to mention that there is a limit of how much info I can
 pass in the get request itself.
  
 Is there a better way to pass the lists to my method?

Sending data as form-data. Insert in your HTML hidden form (hidden fields
only) with your search method as "action", method="POST", and
enctype="multipart/form-data". In a ... tag used to run your query,
use: href="javascript:myForm.submit()".

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/



___
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] security problems

2000-11-17 Thread Aleksander Salwa

On Fri, 17 Nov 2000, Bowyer, Alex wrote:
 I have one method index_html which should be viewable by anonymous.
 All other methods should only be viewable when a username/password is
 entered for someone with the role I have called UAAdmin
[...]
 I can only seem to get full access to all pages (if I grant a proxy on
 index_html) or password access required on all items (by specifying
 permissions for the class instance) neither of which are the correct
 solution.

You can define different security settings for every method in your ZClass
using 'Define Permissions' management tab. These permissions are unique
for every method. There you can define, which permission is needed to view
your method.

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] Reasons for Apache?? SSL?? (was Running Mailman CGIunder Zope ZServer)

2000-11-17 Thread Aleksander Salwa

On Fri, 17 Nov 2000, Dario Lopez-Ksten wrote:
 one of my colleagues configure Apache and Zope using the "Apache  ZServer"
 how to. This works well and Apache serves Zope pretty well and we can even
 use SSL (there are some issues to be resolved that I suspect are due to
 misconfiguration on our server). However, I can always access Zope directly
 using port 8080 (or whatever port where ZServer is listening to) without
 SSL.
 
 This is aboviously not the intended behaviour. Is there a way to prevent
 this? I know there is ZServerSSL but isn't the whole point of using Apache

Look at z2.py options to set IP to listen on. If Zope and Apache are on
the same machine, you can set 127.0.0.1, so Zope won't be accesible from
other hosts. If they are on separate machines, then probably they are
in the same LAN - so you can use some other address not accessible from
outside your LAN.

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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 Install: Solaris/Zeus

2000-11-16 Thread Aleksander Salwa

On Wed, 15 Nov 2000, Lee Hunter wrote:
 Zope requires Python thread support!

You need to recompile Python with thread support turned on.

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/




___
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] Web mail with POP3

2000-11-16 Thread Aleksander Salwa

I need to build a web mail product with pop3 back-end.
There is WorldPilot, but AFAIK it has no pop3 support.
I'm thinking about taking web inteface/application design from WorldPilot
and writing code to talk to pop3 server (probably based on POPMail
product).

Is this a good approach, or someone already has wrote something like this
for Zope ?

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/



___
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] Web mail with POP3

2000-11-16 Thread Aleksander Salwa

On Thu, 16 Nov 2000, seb bacon wrote:
 What do you mean, 'pop3 support'?  If you want people to access their
 mailboxes both through the web and from a pop3 mail client, then all you
 need to do is use a mail server like UW-imap which speaks both pop3 and
 imap.  Then you can just stick with WorldPilot, for now at least.
 That's what I do, anyway.

I have no imap server (yet), so I was looking for web mail product, that
can talk to pop3 server. But setting up imap server should be easier
then hacking WorldPilot.
Anyway, I need to change the way WorldPilot does the authentication.
Looking at sources, it seems rather easy.

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/




___
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] requests for some dtml tags

2000-11-13 Thread Aleksander Salwa

On Mon, 13 Nov 2000, jacintha menezes wrote:
Is there any dtml tags for creating a new work space also for locking
 some page.Locking some page in the sense for second user the operations in
 that page should not be processed
 unless the process for first user is completed.If there dtml tags for these
 kindly give me
 those tags.

Read some docs about Sessions and Versions.
As usual, what can be done via management interface, can be done
programatically too.

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/





___
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] SiteAccess2: How do I suppress all when managing?

2000-11-08 Thread Aleksander Salwa

On Tue, 7 Nov 2000, Danny William Adair wrote:

 How can I suppress the URL generation in the management screens? I've seen
 the "Z" folder example but it didn't work for me. Everything is fine except
 the management interface.

This example works when you leave blank all properties in your SiteRoot
object (especially 'Path', which is '/' by default). Then you have to
generate SiteRootPATH dynamically. So your 'Set Access Rule Method'
may look like:

Is there a path, and does it start with 'Z'?
dtml-let stack="REQUEST['TraversalRequestNameStack']"
 dtml-if "stack and stack[-1]=='Z'"
  Get rid of 'Z': dtml-call "stack.pop()"
  Put it back logically: dtml-call "REQUEST.setVirtualRoot('Z')"
  
 dtml-else

Is the first-level domain 'hotsite.com'? Ignore sub-domains and port number.
dtml-if "_.string.split(_.string.lower(_.string.split(HTTP_HOST, ':')[0]),'.')
  [-2:]==['hotsite','com']"
 Add physical root: 
 dtml-call "REQUEST['TraversalRequestNameStack'].append('yourFolder')"
 dtml-call "REQUEST.set('SiteRootPATH','/')"
/dtml-if

 /dtml-if
/dtml-let


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/





___
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] Can't access management page.

2000-11-07 Thread Aleksander Salwa

On Tue, 7 Nov 2000, Joel Janosky wrote:

 Starting today, when I browse to the base /manage page, I get the normal
 tree display in the left hand pane. The right hand pane, however, displays
 the base page in its presentation form rather than showing the list of
 objects in the base folder.
 
 Any ideas on what may have been changed to cause this behavior ?? 
 
 Any ideas on how to get it back to normal??

Try to switch your browser to 'direct connection' instead of using Proxy
server.

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/




___
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] acl_users API

2000-11-01 Thread Aleksander Salwa

On Wed, 1 Nov 2000, Harris Peter wrote:
 Failing that, maybe someone can suggest where to look in the
 Zope python source to find the methods acl_users exposes.

lib/python/AccessControl/User.py
Viewing HTML sources of management screens may also help a lot.

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] redirect

2000-10-24 Thread Aleksander Salwa


On Tue, 24 Oct 2000, Joaldo Junior wrote:

 how to for that function REDIRECT understand a variable.
 
 ex.
 
 dtml-call "RESPONSE.redirect('http://zope.org/index.htm?cod=dtml-var
 test')"

DTML tags can't be nested.
Try:
dtml-call "RESPONSE.redirect('http://zope.org/index.htm?cod='+test)"

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/



___
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] Lost External Methods

2000-10-23 Thread Aleksander Salwa


On Mon, 23 Oct 2000 [EMAIL PROTECTED] wrote:

 And... while I'm at it, is there a way in Zope to programmatically reload
 [Edit button] an external method (in case I can't get the problem to go away
 and just out of general curiosity)?

dtml-call "YourExtMethod.manage_edit(title='foo', module='bar',
 function='spam')"

This code must have permission to do it, of course. (proxy roles)


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/



___
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] Updating auto incrementing counter in a propertysheet

2000-10-23 Thread Aleksander Salwa


On Mon, 23 Oct 2000, Max Mller Rasmussen wrote:

 I have a zClass (objectmanger) with a property called "lastID", on a
 propertysheet called "hidden".
 
 I have then written a dtml mehtod that should return the id incremented by 1
 and then sets the lastID to this new id.
 
 the dtml for the "newID()" dtml method looks like this:
 --
 dtml-call "REQUEST.set('new_id', lastID+1)"
 dtml-call "REQUEST.set(lastID, new_id)"

In the above line --- do you want to set up new value for ZClass property,
isn't it ?
If so, you have to use manage_changeProperties method of property sheet.

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] from is a reserved word?

2000-10-12 Thread Aleksander Salwa


On Thu, 12 Oct 2000, iap_y2fun.com wrote:

 Hi,The following dtml couse error,
 
 dtml-comment
 dtml-var "sendMail(from='hello@world')"
 /dtml-comment
 
 The workaround is to change "from"  to other words.


"from" is a python reserved word.

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/



___
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] LoginManager - how does it work?

2000-10-08 Thread Aleksander Salwa


On Sat, 7 Oct 2000, ed colmar wrote:

 I've managed to get loginManager to install, but I am very confused as to
 what to do with it.

I was confused too :)

Now I have working instalation of LoginManager-0-8-7a1. It retrieves
users' data from ZODB, but it may be helpfull to understand how to
implement any other source, i.e. MySQL.
Probably I did it very dirty way, but it works ;)

First, I created my own UserSource class, adding it to source file
lib/python/Products/LoginManager/UserSources.py. Here comes the diff:


7c7
 from Products.ZPatterns.PlugIns import defaultConstructors
---
 from Products.ZPatterns.PlugIns import defaultConstructors, PlugIn
478a479,496
 
 
 
 class OloloUserSource(BasicUserSource):
 
 """Moje wasne rdo uytkownikw"""
 
 meta_type = "Ololo User Source"
 __plugin_kind__ = "User Source"
 
 
 def retrieveItem(self,name):
 Uzytkownicy=getattr(self.aq_parent, 'Uzytkownicy', None)
 return getattr(Uzytkownicy, name, None)
 
 
 
 
489a508,514

 )
 
 context.registerPlugInClass(
 OloloUserSource,
 permission = 'Add Ololo User Source',
 constructors = defaultConstructors(OloloUserSource, globals()),


Method retrieveItem have to return user object with given name. I have
users inside folder Uzytkownicy beside acl_users.

Next thing to do is to create class representing users. It must have
LoginManager:LoginUser as a base class. So I made such ZClass. This class
has methods authenticateUser, domainsForUser, rolesForUser, which do real
work. (Users in folder Uzytkownicy are instances of that ZClass.)
This class contains some properties of user - login (it's just object's
id), name, other data. (Currently I store passwords externally, because I
need them to do POP3 authentication.)

Then, on management tab "User Sources" of your LoginManager instance, add
instance of your UserSource class. Check also for proper settings on
LoginMethods tab.


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] using crontab to restart ZOPE - again

2000-09-24 Thread Aleksander Salwa


On Sun, 24 Sep 2000, George Osvald wrote:

 On Linux it doesn't do anything if ZOPE is running. It only restarts when
 ZOPE stops working. On FreeBSD it stops and then restarts ZOPE every time. I
 wander if anyone knows what should be changed for this script to run on
 FreeBSD. Any help would be appreciated.

 PID1=`cut -d" " -f1 $PIDFILE`
 PID2=`cut -d" " -f2 $PIDFILE`

On FreeBSD command "cut" doesn't like lines not terminated with new-line
character. Zope's pidfiles aren't LF-terminated :(
Possible solution:
Patch Zope - add LFs (file "z2.py" - line 712, "lib/python/zdaemon" -
line 203)

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/



___
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] how to reload external method?

2000-09-14 Thread Aleksander Salwa


On Thu, 14 Sep 2000, Riku Voipio wrote:

 How do you reolad an external method that has changed? 

Just click on 'Edit' button.

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] locale and Splitter.c on FreeBSD - where is the bug ?

2000-09-11 Thread Aleksander Salwa


On Sun, 10 Sep 2000, Dieter Maurer wrote:

 Put it into the collector (URL:http://classic.zope.org/Collector).
   
   8080

Anyway, Collector doesn't work :(  - "Temporarily Unavailable".

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] manage_afterAdd - need enlightenment

2000-09-11 Thread Aleksander Salwa


I decided to convert my ZClasses to CatalogAware. I added CatalogAware as
first base class.
If I add dtml-call "index_object()" in my MyZClass_add method, then
new object is automatically indexed as expected.
But in CatalogAwareness.py I see method manage_afterAdd, which does the
same. Is this method called automatically (probably not), or have I to
call it - where, what arguments ? I tried to call it after call to _add
method - I got strange error:
Error Type:  AttributeError
Error Value: _u
This ZClass base classes are CatalogAware and DTMLDocument.
Without mentioned call to "index_object", object is not indexed.

I need some enlightenment on manage_afterAdd - how (and why) to use it,
and CatalogAware in general :)

Of course, I can put "index_object()" in every _add method, but probably
it's not the right way of doing things.

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] locale and Splitter.c on FreeBSD - where is the bug ?

2000-09-11 Thread Aleksander Salwa


On Sun, 10 Sep 2000, Dieter Maurer wrote:

 Nevertheless, you patch to "splitter" should be welcome
 as it solves a usability problem on FreeBSD systems.
 Put it into the collector (URL:http://classic.zope.org/Collector).

Done.

 You may file a problem report to the FreeBSD maintainers in
 parallel.

Before sending it to the FreeBSD maintainers:
Are here any users of newer releases of FreeBSD ? (I have tested it on
FreeBSD 3.5) If so, could you test the behaviour of function isalpha with
locales ? Does it process properly negative values for national
characters ?

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/





___
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] locale and Splitter.c on FreeBSD - where is the bug ?

2000-09-09 Thread Aleksander Salwa


Some time ago I had a problem with locales on FreeBSD.
Finally, I solved it by patching Splitter.c.

I added casting of values passed to funtions isalpha, isalnum to
type 'unsigned char'. They are declared in Splitter.c as 'char'.

On all machines I'm working on, 'char' is signed.
On Linux/x86, isalpha and others works fine with positive and negative
values of national characters. (For example, one polish character is
'\xc6', what can be evaluated as unsigned 198, or signed -58.)
But on FreeBSD/x86 these functions work only with values 127.
Because 'char' is signed, it needs casting to work with national
characters.

Now, the question is: is it a bug in Splitter.c or in FreeBSD system
libraries ? (or misconfigured system)


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] ChatRoom

2000-08-31 Thread Aleksander Salwa


Not Zope specific, but may be important for many web-masters...

Some days ago I was told to make a chatroom in our site.
I took a look at some products, but no one has satisfied me yet.
If anybody knows about _good_ chatroom, please let me know !

Where _good_ means:
   + highly customizable view of the chatroom
   + non-flickering refresh (I used jzChat from www.javazoom.net, but it
 uses JavaScript on client side, so refresh is flickering)

So, it should be Java applet on client side.
It can be almost anything on server side - Java servlet, Java
stand-alone application, native binary program, standard IRC server, CGI
script, Zope Product, etc...

I don't need many channels at one time.

If you have seen (almost) ready-to-use chatroom solution, your help is
greatly appreciated ! :)

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] ZCatalog and foreign characters

2000-08-31 Thread Aleksander Salwa


On Wed, 30 Aug 2000, Radim Gelner wrote:

 On Tue, Aug 29, 2000 at 11:57:08PM +0200, Dieter Maurer wrote:
  
  If you work with a fixed locale, you can use the "-L" switch
  to inform Zope about your locale. Then the splitter should
  work correctly (for your locale).
 
 Yes, that helped. I've called Zope with -L cs_CZ switch, rebuilt the
 catalog and now searching works as it should.
 

Great, but what about FreeBSD ? I work on Linux at home, but few days ago
someone decided that our production server will be FreeBSD. What is the
right locale string format on FreeBSD (version 3.5) ?
I've tried "pl_PL", "iso-8859-2", "pl_PL.iso-8859-2" - no success... :(

For now, I made hack in Spliter.c - I wrote my own replacements for
isalpha and isalnum functions.

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] ZCatalog and foreign characters

2000-08-31 Thread Aleksander Salwa


 
 For now, I made hack in Spliter.c - I wrote my own replacements for
 isalpha and isalnum functions.
 

Oops, my solution doesn't work. Probably it needs more hacking in python
code
So, how to do it under FreeBSD ?

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] ZCatalog and foreign characters

2000-08-29 Thread Aleksander Salwa


On Tue, 29 Aug 2000, Radim Gelner wrote:

 is it possible to make ZCatalog work correctly with words containing
 characters other then those given in ISO-8859-1.
 

Yes, I did it very simply.
You have to patch file lib/python/SearchIndex/Splitter.c
very slightly.

Just add line:
#include locale.h
somewhere beside include lines (~ line 86)

and line:
setlocale(LC_ALL, "pl_PL");
in function initSplitter, line no. ~493.

It works for polish characters, and all other characters in iso-8859-2
set, so it should satisfy you :)

P.S. You need to compile it, of course:
 gcc --shared -O2 Splitter.c -I/usr/include/python1.5 -o Splitter
 (include path for RH Linux)
 Probably you will need some include files from source distribution.


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] ZCatalog - OR'ing on different colums (indices)

2000-08-25 Thread Aleksander Salwa


Is there any better method of OR'ing on differend indices in quering
ZCatalog, then the method described in 'Advanced ZCatalog Searching'
How-To:

dtml-let res1="MyCatalog(title=userInput)"
  res2="MyCatalog(PrincipiaSearchSource=userInput)"
  res3="MyCatalog(someProperty=userInput)"
  results=
   "res1[:_.len(res1)] + res2[:_.len(res2)] + res3[:_.len(res3)]"

   dtml-in results
  ...
   /dtml-in

/dtml-let

This seems to me too expensive - here three searches are made.
Is there - or should be added - any support for it in ZCatalog ?

Another fault of this method are superfluous repetitions in results - if
some catalogued object matches search pattern on more then one index.

It seems to me to be common case, when we show to user simple search form
with only one input (that is where 'userInput' came from) and 'Go!'
button. User don't want to know, that we have our data splited in many
properties. But on Zope side it's very good to have it structured in that
way - so how to reconcile these things ?

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] GUF and crypt

2000-08-22 Thread Aleksander Salwa


On Mon, 21 Aug 2000, Brad Mabe wrote:

 Greetings,
 I am following the directions in hippy's GenericUserFolder with an SQL
 database how to, and ran into a snag.  When I call crypt, zope returns the
 following:
 
 Error Type: AttributeError
 Error Value: crypt

Maybe you don't have this module ('crypt') in your python instalation.
It's not present in 2.2.0 binary distribution for Linux-x86. Check if you
have file lib/python1.5/lib-dynload/cryptmodule.so.
If not, then you can copy it from RPM package 'python'
(/usr/lib/python1.5/lib-dynload/cryptmodule.so).
(If you work on Linux, of course).


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] Security Problems upgrading to Zope 2.2.0

2000-08-21 Thread Aleksander Salwa


On Mon, 21 Aug 2000, Stefan Bambach wrote:

 class test:
   def __init__(self):
 pass
   def sayhello(self):
 return "hello"
 
 def initialize(self):
   return test()
 

 
 What's wrong with this code ?

Try to add this attribute to your class 'test':

__allow_access_to_unprotected_subobjects__ = 1



[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] __call__ error message - I gave up

2000-08-16 Thread Aleksander Salwa


On Wed, 16 Aug 2000, cuiod-tec Jens Gelhaar wrote:

 dtml-in "objectItems('DTML Document')"
   dtml-var sequence-item
 /dtml-in
 
[...]
 works fine, if there is no reference to another object. But when I put
 something like
 dmtl-var imageobject in one of this DTML Document I get the appended error
 message.
 

Change it to dtml-var "imageobject.tag()". Probably it's a bug in Image
class.


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/



___
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] ANNOUNCE: Zope 2.2.1 beta 1 released

2000-08-14 Thread Aleksander Salwa


On Thu, 10 Aug 2000, Brian Lloyd wrote:

 Hi all - 
 
   Zope 2.2.1 beta 1 has been released - you can download it from
   Zope.org:
 

Is there corrected this bug, that some ZClasses (probably those derived
only from ZObject (not from DTMLDocument, for example)), doesn't support
basic operations - 'paste', 'rename'... ?
(Announced on this mailing list some time ago.)

I can't find it in CHANGES.txt.


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/




___
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] ANNOUNCE: Zope 2.2.1 beta 1 released

2000-08-14 Thread Aleksander Salwa


On Mon, 14 Aug 2000, Aleksander Salwa wrote:

 Is there corrected this bug, that some ZClasses (probably those derived
 only from ZObject (not from DTMLDocument, for example)), doesn't support
 basic operations - 'paste', 'rename'... ?
 (Announced on this mailing list some time ago.)
 
 I can't find it in CHANGES.txt.

I'm sorry, it was my misunderstanding. (as I remember more folks had
this problem before). Now I know, what is ZClasses:ObjectManager :))

Just to give some Zen for those with similiar troubles:
When building your own class, not deriving (directly or indirectly) from
any of built-in classes, you should select ZClasses:ObjectManager as a
base class in order to be able to copy/paste and so on...


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/



___
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] GUF

2000-08-13 Thread Aleksander Salwa


On Fri, 11 Aug 2000, Mathias Bengtsson wrote:

 Does anybody know how the login is handled by GUF. I use cookie
 authentication and I get the loginptomt when I try to access a page that
 has authenticate permissions. But when I try to login I don't know how
 to get the user logged i.e I don't know how to set the cookie. Can
 anybody help me ?

Why do you need to set cookie on your own ? In typical case GUF sets it
for you if it had succesfully authenticated new user (your method
userAuthenticate has returned '1').
Anyway, probably it will work if you set this manually. The cookie is
named (AFAIR) '_guf', and has some random-looking content - a key
identifying user. You can look in source to see, how this content is
computed.


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] GUF

2000-08-08 Thread Aleksander Salwa


You mean, you don't know, how to force users to authenticate ?
Everytime user tries to access resources that needs higher privileges, GUF
starts working, presenting mentioned form, and then it calls
'userAuthenticate' - this method (probably written by you) have to check
if login:password pair is valid.

(I used GUF with cookies. If your problems are related to HTTP auth, then,
probably, I won't help.)

 On Tue, 8 Aug 2000, Mathias Bengtsson wrote:

 I have GUF installed and I have succeded in coding som managing tools
 for this. From what i see i have also found a loginpromt (for cookies).
 My problem lies in that i don't know how to get the user logged in. I
 try to use userAuthenticate but when i look in the code i see nothing
 that have anything to do with how to get the user logged in. If i try to
 use post and sending the login information lika [EMAIL PROTECTED] I have
 the problem that thoose user only exist for the "usual" acl_users. Can
 anybody help me
 


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/



___
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] new checkbox when adding a zclass in zope 2.2.0

2000-08-08 Thread Aleksander Salwa


On Tue, 8 Aug 2000, Nico Grubert wrote:

 in zope 2.2.0, when adding a new zclass the management-screen includes a
 checkbox 
 "Include standard Zope persistent object base classes?".
 What does exactly this option do ??
 I could not find any differences between adding a zclass with selected
 checkbox and adding a zclass with not-selected checkbox.???
 

Surely, there is difference :)
I created ZClass with this box unchecked, without any other base classes.
Then I can't instantiate any object of that class. (However, when I
selected base class 'DTMLDocument' I can make an instance.)

If you can't reproduce this behaviour, then maybe it's a symptom of
'boolean property bug' ? (If so, you can apply patch for it, posted by me
some time ago).


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/



___
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] Hardware minimum for development

2000-08-08 Thread Aleksander Salwa


On Tue, 8 Aug 2000, Sven Hohage wrote:

 Hallo,
 what's the minimum of hardware to develop Zope-sites(only for
 development).
 I'd like to know because I want to buy a laptop and don't want to spend
 much money !
 Thanks.
 

Now I'm developping on PC with 48 MB RAM, and it's too little for me.
It's because I'm working on one machine - Zope, X-Window, Netscape with
few windows open, sometimes Apache and Gimp are running together.

I'm satisfied with my CPU - k6-2/300MHz is sufficient for me.

I'm going to buy some memory in few next days, I think additional 32MB
will be enough.


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/



___
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] ZCatalog attachments?

2000-08-04 Thread Aleksander Salwa


On Fri, 4 Aug 2000, Simon Coles wrote:

 We have binary files stored in Zope, for example Word documents (but 
 could be any of a variety of document types).
 
 We would like to be able to index and search the contents of these 
 files using ZCatalog. So if a Word file contains the word "Fred", 
 then any search for "Fred" would include that file in the list of 
 documents returned.
 
 Is anyone doing something like this? If so, how?
 

Simple search in binary data of course won't do it, because of complex
format of Word documents. So:
Try to keep beside every document its 'rendered' version - converted to
plain text (created by saving them with Word in plain text format).
Then create class representing your document. This class should provide
parameterless method 'PrincipiaSearchSource' returning rendered version of
document. However, it's untested - but seems to be a step in right
direction ;)


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/



___
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] boolean property bug

2000-08-02 Thread Aleksander Salwa


On Mon, 31 Jul 2000, Jonothan Farr wrote:

 You should submit this to the collector, preferable with a patch! ;)
 Otherwise it's likely to get lost in the chaos of the list.
 
 http://classic.zope.org:8080/Collector

So I did it. (Collector #1495)

You can patch your Zope on your own by replacing some code in file
lib/python/OFS/PropertySheets.py. In class PropertySheet, change method
manage_editProperties to this:

def manage_editProperties(self, REQUEST):
"""Edit object properties via the web."""
for prop in self.propertyMap():
name=prop['id']
value=REQUEST.get(name, '')
self._updateProperty(name, value)
return MessageDialog(
title  ='Success!',
message='Your changes have been saved',
action ='manage')


It works for me, hope it helps.


ololo


___
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] Permissions question.

2000-08-01 Thread Aleksander Salwa


On Mon, 31 Jul 2000, Jeff K. Hoffman wrote:

 Hello,
 
 I am having a permissions problem, and am hoping someone on the list will
 see the error in my ways. I have a ZClass, called a FooManager, that
 inherits from ObjectManager. It is responsible for creating (and managing)
 Foo objects.
 
 In the FooManager ZClass, I created a DTMLMethod called 'addFoo', and a
 form called 'fooForm'. Following the "How to Create ZClass Instances
 Programmatically" How-To, I modified my 'Foo_add' constructor to avoid
 redirecting if the request contains a noRedir parameter.
 
 In my 'addFoo' method, I have:
 
   dtml-with "manage_addProduct['FooProduct']"
 dtml-call "Foo_add(_.None, _, noRedir=1)"
   /dtml-with
 
 and I set it's Proxy role to 'Manager'.
 

Is it Zope 2.2.0 ?  If so, Foo_add should also have proxy role 'Manager'.


ololo


___
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] boolean property bug

2000-07-31 Thread Aleksander Salwa


Probably I found a bug in handling boolean properties in Zope 2.2.0.
I can only set them "on", and then can't turn "off". I can have default
value "off" (in ZClass definition), but after first switch to "true",
it can't be changed.
It only refers to handling properties via Zope's management screens.
API functions manage_changeProperty, manage_editProperty work fine, so
maybe it's an error in generated HTML forms, or in processing of these
forms.


ololo


___
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] Log Out

2000-07-31 Thread Aleksander Salwa



On Sun, 30 Jul 2000, Kapil Thangavelu wrote:

 Is there a way to log out of Zope without presenting a netscape dialog
 or killing the browser?
 
 i'd prefer that users have a link 'logout' that takes them back to the
 /root/index_html as anonymous
 

You can do it with one of the replacements for 'User Folder' - products
'GenericUserFolder' (aka 'GUF') or newer 'LoginManager', running in cookie
mode.
GUF has method 'logout', LoginManager - 'logoutForm', you can custumize it
to make right redirection.


ololo


___
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] Info SendMail + doctype

2000-07-31 Thread Aleksander Salwa


On Mon, 31 Jul 2000, Vincent wrote:
 Following my previous Mail about HTML in the body of emails...
 
 I tryed several of your answers, but it doesn't work.
 My Oultook just displays evrything (included the br, body, etc...),
 eventhough I often receive mail with an HTML content (so my client is well
 configured).
 
 If you have other solution, I'm really interested (I begin to be despaired).
 

Just take a look at any mail with HTML content, to understand, how such
messages are built. I mean reading raw headers and content, so Outlook
probably won't do it. You can do it on Unix account by simply reading your
incoming mail file (/var/mail/username or /var/spool/mail/username).

Try this DTML code (works fine with Pine 4.10):

dtml-sendmail smtphost=localhost
From: swienty@mikolaj
To: ololo@localhost
Subject: hejka5
MIME-Version: 1.0
dtml-mime type=text/html encode=quoted-printable

Hello !br
Here we have some bHTML/b tags.

/dtml-mime
/dtml-sendmail


ololo


___
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] boolean property bug

2000-07-31 Thread Aleksander Salwa


On Mon, 31 Jul 2000, I wrote:
 
 Probably I found a bug in handling boolean properties in Zope 2.2.0.
 I can only set them "on", and then can't turn "off". I can have default
 value "off" (in ZClass definition), but after first switch to "true",
 it can't be changed.
 It only refers to handling properties via Zope's management screens.
 API functions manage_changeProperty, manage_editProperty work fine, so
 maybe it's an error in generated HTML forms, or in processing of these
 forms.

I've located this bug, I think.
It's in file 'lib/python/OFS/PropertySheets.py' in method
'manage_editProperties'. This method should change all properties, even
those not included in REQUEST. But there are handled only properties
included in REQUEST, so checkboxes that get turned off are ignored.


ololo


___
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.0, LoginManager and ZPatterns

2000-07-29 Thread Aleksander Salwa


 Of course, I need to customize and test my LoginManager instance, so
 new troubles may arise soon :)
 

So I'm back ;)

On Mon, 24 Jul 2000, Bill Anderson wrote:

 for doing so. You can search the archives, and it would be a decent idea
 to look at the Membership *alpha* product, as it is an example.
 

Where I can find this 'Membership' product ? (I've tried 
www.zope-treasures.com and 'Search' on www.zope.org).

Anybody knows about any other examples of simple, but useful UserSources ?

I want to convert quickly my site to work with LoginManager (I used GUF
before). I have folder with users data (login, password, and some
properties needed in my site) in Zope. Every user is an instance of my
ZClass. How to simply get it work with LoginManager ?
What requirements (if any) are about class representing user ?
Will be enough to customize (how ?) class GenericUserSource, or should
I write my own ?

Things seems easy, when reading help/API.txt (but there is nothing about
user class). But when looking into source of GenericUserSource... :(

Shed some light on it, please :)


ololo


___
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.0, LoginManager and ZPatterns

2000-07-29 Thread Aleksander Salwa



On Sat, 29 Jul 2000, Bill Anderson wrote:

  Where I can find this 'Membership' product ? (I've tried
  www.zope-treasures.com and 'Search' on www.zope.org).
 
 http://www.zope.org/Members/Bill/Products/Membership
 
 Has the most current version.
  

Thanks !
Finally, I got it working by my own. It's rather simple, but it took few
hours to state it ;)


ololo


___
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] 2.2.0, LoginManager and ZPatterns

2000-07-28 Thread Aleksander Salwa


Hmm..., so I've decided to upgrade to Zope 2.2.0. Most of my site works
fine :)

I used GUF lately, now I want to use LoginManager, but I can't get it
working.

Even on fresh install of Zope 2.2.0 (Linux x86, binary release of Zope),
when I want to create an instance of Login Manager with default settings 
in folder 'test1', I get following error:

Error Type: TypeError
Error Value: keyword parameter redefined

Traceback (innermost last):
  File /usr/local/digicool/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/
 Publish.py, line 222, in publish_module
  File /usr/local/digicool/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/
 Publish.py, line 187, in publish
  File /usr/local/digicool/Zope-2.2.0-linux2-x86/lib/python/Zope/
 __init__.py, line 221, in zpublisher_exception_hook
  File /usr/local/digicool/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/
 Publish.py, line 171, in publish
  File /usr/local/digicool/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/
 mapply.py, line 160, in mapply
(Object: manage_addLoginManager)
  File /usr/local/digicool/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/
 Publish.py, line 112, in call_object
(Object: manage_addLoginManager)
  File /usr/local/digicool/Zope-2.2.0-linux2-x86/lib/python/Products/
 LoginManager/LoginManager.py, line 237, in manage_addLoginManager
  File /usr/local/digicool/Zope-2.2.0-linux2-x86/lib/python/Products/
 ZPatterns/PlugIns.py, line 313, in _constructPlugIn
TypeError: (see above)


I've tried installing ZPatterns from sources and from binary release (both
0.3.0) - same results. LoginManager - 0.8.6.

Of course I've created user with manager role in root folder's acl_users
folder.

What's wrong, Zopistas ?


ololo


___
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.0, LoginManager and ZPatterns

2000-07-28 Thread Aleksander Salwa



On Sat, 29 Jul 2000, Aleksander Salwa wrote:

 I used GUF lately, now I want to use LoginManager, but I can't get it
 working.
 
 Even on fresh install of Zope 2.2.0 (Linux x86, binary release of Zope),
 when I want to create an instance of Login Manager with default settings 
 in folder 'test1', I get following error:
 
[...]

Answering my own question:

I installed newer versions of both products (ZPatterns 0-4-0a5 and
LoginManager 0-8-7a1) and now it seems to be alright.
Of course, I need to customize and test my LoginManager instance, so
new troubles may arise soon :)


ololo


___
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] PCGI still not functional

2000-07-26 Thread Aleksander Salwa


On Mon, 24 Jul 2000, Bill Anderson wrote:

 In the 2.2betas, and in 2.1.6, I could use ZServer and PCGI, but now, I get
 one or the other.

Do you mean that you could use (with earlier Zopes) _BOTH_ ZServer and
PCGI at the same time ? Why ?
And now, you can get up and running one of them; or you can't run PCGI at
all ?

Maybe I'm missing something about architecture of Zope,
explain me if so :)

What HTTP server do you use ?

I use Zope with Apache (on RedHat Linux), and now I wonder how hard it
will be to upgrade to 2.2.0 :(


BTW: could someone (Jeff Rush ?) make rpm packages of Zope, as it was with
2.1.6, divided into Zope, Zope-zserver and Zope-pcgi ?

ololo


___
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] Member Login

2000-07-19 Thread Aleksander Salwa


On Wed, 19 Jul 2000, ethan mindlace fremen wrote:

 HTML, are generally beyond the purview of zope documentation. 
 The standard in this case is HTTP, where Basic Authentication is
 defined:
 
  http://www.cis.ohio-state.edu/htbin/rfc/rfc2068.html
 

Little fix: rfc2616 obsoletes this.

 There is another rfc - the next one, submitted the same month- that
 describes
 digest authentication, a vastly more intelligent scheme.  However,

rfc2617

ololo


___
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] DTMLDocument content - html quoted or not

2000-07-07 Thread Aleksander Salwa


I have ZClass (called Artykul) which subclasses DTMLDocument.
This class has a method, used to view document, which appends some special
stuff to document's content. For some reasons I don't want to put this
stuff directly into document's data.
In mentioned method, to render document, I wrote:

dtml-var this

But this outputs html quoted text (so I see HTML and DTML tags in browser,
instead of formatting and variables).
When I render this object from another methods (external to this class),
everything works as usual.

Is this a bug or feature ? :)

_
Aleksander Salwa, [EMAIL PROTECTED]
An applicant for Zopista


___
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 )