Re: [Zope] Apache mod_rewrite module...

2000-05-22 Thread Pierre Rougier

>
> > My URL references to Apache
> > example:
> > http://margo.pla.fr/intra/machin.html
> >
> > and I want to use httpd.conf to transform it (only for html and htm
> > files)
> > in
> >
> > http://margo.pla.fr/intra/?machin.html (which is my ZServer)
> >
> > Does someone know the rewrite I sould use regular expression are a
> > mistery for me
>
> does "intra" represent that it should be represented by zserver? if so,
>
> RewriteRule ^/intra/(.*)htm  /intra/?$1htm
> RewriteRule ^/intra/(.*)html /intra/?$1html
>
>

Well, thanks mindlace, it helps, in fact, now, I use the following line:
RewriteRule^(^([^/]*/)*)([^/]*\.html)$  http://newhost:8080$1?$3
(this line should be usefull for those who want to redirect any *.html URL
to your ZServer)

which change the URL like I want. The problem is that it makes a redirect,
and all my relative addresses in the page are changed too (for instance, my
.gif are served by zope too, and I don't want to!)

To be clearer,  what my product do is:

I address Apache, with for instance:
http://margo.ina.fr/intra/index.html

then, Apache change the URL to:
http://margo.ina.fr:8080/intra/?index.html  (8080 is my ZServer port)

my zope product construct a new page with informations from the "intra"
folder, go and search the file ../intra/index.html on the disk, insert it
to the builded page (by reading the file) and serve it.

The problem is that by doing that, as in the HTML pages, paths are
relatives, the redirection change all the relative address to the port 8080
(because the final served URL is on this port), and I want my Images to be
served by apache

(I hope I am clear, but it is hard to explain in an email).
A solution would be to write absolute URL for my images, but I am not
allowed to do it.

so, I try... to use Apache not to redirect, but to go and search the
result of http://margo.ina.fr:8080/intra/?index.html, in a way which would
be transparent to the browser(the printed URL would keep the Apache
one), and I have to say that untill now, I don't manage to do it...

Well. thanks for your attention

Pierre


___
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] installing products.

2000-05-23 Thread Pierre Rougier

well, this can sound a newbie question... well,it is one...

in fact I never used a zope product from the zope site.
I downloaded the SiteAccess product. what do I have to do to use it???

thanks for your attention (special thanks for mindlace)


___
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] object.... from name

2000-05-31 Thread Pierre Rougier

Hi all...
well, I think this is a quite simple problem
In a method, I want to apply an external method to a ZObject stored in
the Folder:



the fact is that I have the object name through the Query_string, so I
tried:



which does not work that is clear as this is a string, and not
my object itself

how can I can find the object itself, to use it as an argument of my
fonction, from its name, which is stored in the query string?

I think this is very simple. but I don't find the documentation

Thanks for your attention


___
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] Missing "how to"s

2000-06-06 Thread Pierre Rougier

hi all,
I am looking for the documentation of the "multiple selection" type, but
the "how to" does not exist anymore on zope.org. argh...
Has anyone of u a copy of the documentation?
If it is the case, please send me, or explain me how does it work

(what I want is a ZClass propertie wich allow to choose an item in a
list, I though multiple-selections were fine for that).

Thanks for your attention.

Pierre


___
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 primitives documentation

2000-06-07 Thread Pierre Rougier

Hi all!

I just have a problem of documentation does anyone know where I can
find the doc about all the manage_something primitives (like
manage_upload(), manage_clone()...)
My problem is that I want to insiantiate an abject from a method, but I
can't find the good primitive.

Thanks for your attention... :^)

Pio.


___
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] creating object from method

2000-06-08 Thread Pierre Rougier

Hi all,

Well, I didn't find it in the ZQR,
I have a product which is able to create instantiate an object of a
ZClass (using a factory).
(so, I can add my special object from the Add list)

In a dtml method, I want to create (instantiate) a new object of this
ZClass..
I tried manage_addProduct... a little by hazard, but I don't find the
right primitive to do that
isn't there something like
manage_addObject(ZClass, id...)?

Does anyone can help me?
:^) thanks by advance

Piotr.



___
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] create object...

2000-06-08 Thread Pierre Rougier

hi,
following my question of this morning, I tried that:


which create me the object, but in the
Control_Panel.Products.Objet_BIB_Product Folder
I would like it to be created in the current Folder (the one from which
I try to create the object)... and don't see how, if I try:

,
zope tells me that ObjetBIB does not work...

any idea???


___
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] creating objects... and change properties..

2000-06-08 Thread Pierre Rougier

Well, I am sorry to send three messages a day, but I am really
desappointed...

I use the following code:




  


(Author, Title. are knowed because in a dtml-let flag)
Well, livre1 is a object created by a SFactory (a product contening a
ZClass with a propertysheet)

Zope do not give me any error, instantiate the new object, but does not
change the properties of the new object. :^(

does anybody can tell me why?

I have seen a function "manage_afterClone"  in the ZQR... do u know what
is it?

Thanks... and sorry for all my emails...


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

2000-06-16 Thread Pierre Rougier

Hi all  :^)

I have a problem with manage_delObjects:
this is the text of one of my dtml-method:


 

  
  

 


and Zope says me:

   Zope Error

   Zope has encountered an error while publishing this
resource.

   Error Type: AttributeError
   Error Value: __getitem__

well. does anyone knows the right args for  manage_delObjects?

thanks by advance...
Piotr


___
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] [Fwd: [Zope] manage_delObjects]

2000-06-16 Thread Pierre Rougier

Pierre Rougier a écrit :

> Pierre Rougier a écrit :
>
> Hi all  :^)
>
> >
>
> I found (thanks to Jerome) that was:
>
> 
>
> this is very hard to find documentation about the manage functions, no?
> the ZQR is not very fine for that
> do u know a place where I can find??
>
> >
> > I have a problem with manage_delObjects:
> > this is the text of one of my dtml-method:
> >
> > 
> >  
> > 
> >   
> >   
> > 
> >  
> > 
> >
> > and Zope says me:
> >
> >Zope Error
> >
> >Zope has encountered an error while publishing this
> > resource.
> >
> >Error Type: AttributeError
> >Error Value: __getitem__
> >
> > well. does anyone knows the right args for  manage_delObjects?
> >
> > thanks by advance...
> > Piotr
> >
> > ___
> > 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 )




Re: [Zope] ProxyPass

2000-06-26 Thread Pierre Rougier

Hi Roché

> Thanks Pierre
>
> This is a relief, I really didn't want to switch back to pcgi.  I have
> worked a little bit with the rewritemodule but if anybody has an example on
> how to do this it would really be helpfull.
>
> Roché
>

I don't know if it help, but
My problem was to serve any request to Apache to the ZServer, and to change
the URL like that:
http://path/file.html(Apache server)
to
http://path:8080/?file.html (ZServer, with the file as a query_string)

and I wanted it to be transparent . So, I matched all the URLs with htm and
html extension to modify them.
The first thing u have to do is defining the regular expression which will
match the URL you want to serve as a proxy
then u can insert, and modify your URL (which will be served transparently
with the [P] flag.

the big problem is to find a way to match what u want, the syntax is horrible
(I passed a whole day on these three lines).

for more informations about rewrite_mod:

http://www.kenzonca.com/manual/mod/mod_rewrite.html


my example: (4 lines in the httpd.conf file this is very powerfull)

#Attention: ici insrtion des regles de reecriture avec mod_write
RewriteEngineon

RewriteRule^(^([^/]*/)*)([^/]*\.htm)$  http://margo.ina.fr:8080$1?$3
[P] # fichiers HTM
RewriteRule^(^([^/]*/)*)([^/]*\.html)$  http://margo.ina.fr:8080$1?$3
[P] # fichiers html
RewriteRule^(^([^/]*/)*)$ http://margo.ina.fr:8080$1 [P]   # pas de
fichier demande (pages sommaires Zope)


I hope it help u!
Pierre


___
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] Access object inside a folder

2000-06-28 Thread Pierre Rougier

Sin Hang Kin a écrit :

did u try that:

 

do what u want



Hope this help
Bye
Pio.

> Hi,
>
> I have put objects inside a folder tabledef and would like to refer them :
>
>  mapping>
> 
> 
>
> However, this does not work, But putting the objects in the current folder
> works without problems:
>
> 
> 
> 
>
> I also try:
>
> 
> 
>
> 
>
> and some other combinations, all without success.
>
> How can I access the objects (DTML DOCUMENTS) inside a folder?
>
> Moreover, I would like to do the following:
>
> I have some properties of an object abc which have same name with the object
> ids in the tabledef folder, I would also lookup the objects' properties :
>
> 
>
>   
>  
>   
> 
>
> Assume abc have a property address, then there should be a dtmldoc call
> address in tabledef, which have properties "help" and "tableorder". I would
> like to retrieve them.
>
> Can somebody help me with these?
>
> Rgs,
>
> Kent Sin
> -
> kentsin.weblogs.com
> kentsin.imeme.net
>
> ___
> 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] About "Powered by Zope"...very simple, isn't it?

2000-07-04 Thread Pierre Rougier

Hi zopatistas,
well... this is not a very important thing, but I would like to remove
the picture "Powered by Zope" at the end of my Zope Pages...
is it possible..? I though it was in the "standard html header" but it
seems that it is not...gasp...
someone can help me?


___
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] Creating Factory Objects (Products)

2000-07-18 Thread Pierre Rougier

Hi Fire,
This should work:

-Create a new product (here InstantSiteProduct) (from here, your product can be
accessed through the "Add" list)
-In this product, add a Z Class (name it Instant Site)
-In this ZClass, create your DTML methods (Designer and Builder)

If u need to store properties in the Product, create a propertysheet in this Z
Class.
U will be able to access these properties from your product methods by using
   ""

and, if u want to change the properties in your methods, use



One more thing: all your changes on the product modify all the instances of your
product...

These things should work
Hope this help

Pierre :)

> I'm following the tutorial in Zope Content Manager's Guide. I created an
> 'InstantSite' product, with 2 DTML methods, Designer and Builder. I followed
> most of the instructions, and managed to see the product in my 'Add List'.
> But when i tried to add it into my other folders, the Builder page(which
> would be called after Designer) could not be accessed. The error is:
>
> "Resource not found
>
> Sorry, the requested Zope resource does not exist.
> Check the URL and try again." followed by the tracebacks...
>
> In fact, the tutorial doesn't seem comprehensive and contain errors(e.g.
> screenshots different from description). Could anyone give this newbie some
> pointers here? TIA.
>
> regards,
> Firestar


___
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 problem i 2.2 final - Bug?

2000-07-19 Thread Pierre Rougier

Hi  :)
I may say something idiot, but...

Did u try to change the proxy roles of the method which call the fonction
manage_editProperties?
(in case of: to do it, edit your method and choose proxy at the top of the
window), u can edit the role of your method.

Piotr.

Peter Arvidsson wrote:

> I have a very anoying problem...
>
> I have created a news-product and have several news-objects. Now I want
> to change the properties of a news-object. This is my code for that:
>
> 
>   header=REQUEST['header'],
>  date=REQUEST['date'],
>  author=REQUEST['author'],
>  email=REQUEST['mail'],
>  text=REQUEST['text'],
>  )">
>
>   
>
> 'newsEntries' is the folder where I store my news-objects.
> 'objId' is the id of the product as a string.
>
> Everytime I try to change properties a login prompt is displayed. The
> problem is that I get access denied whoever I login as. My user has the
> same permissions as the superuser and even when I login as the superuser
> I get access denied. I have changed so that I am the owner of both the
> product 'news' and the news objects, the methods that I use and the
> folders that my objects and methods are in. I really dont know what this
> problem could be. I thought these problems was supposed to be resolved
> for 2.2 final but maybe there are some bugs left? I dont get this
> problem when I run the code in 2.1.6.
>
> I have also tried different possibilities in the code, I have both used
> changeProperties and editProperties. I have also tried to write the name
> of the propertysheet instead of '[1]' but everything renders the same
> problem.
>
> Really beacause I am the owner of everything and I have the same rights
> as the superuser I dont think I should be "unauthorized" to change my
> objects. I have no problem to add and to delete these objects so why
> cant I change them?
>
> ___
> 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 )