[Zope] use properties to get an object with dtml-var

2000-08-14 Thread Gerard Metrailler Jr.

Hello,

I am trying to get the following more generic.

dtml-var "content.whos_who.gmetrail.real_name"

In that case, content and whos_who are folder, gmetrail is a ZClass I 
created which derivates from Image and real_name is a property of that object.

What I am trying to do is getting something like:

dtml-var "user_info + REQUEST.AUTHENTICATED_USER + real_name" where 
user_info is a property that I defined in /

I've tried to use a dtml-with wrapped arround the dtml-var, but couldn't 
figure out how to get the dtml-with use the property instead of the 
hardcoded path.

Thank you for your help.

Best regards,

Gérard Métrailler Jr.

Meeting Maker Inc.
... the intelligent choice for collaborative scheduling

Technical Account Manager Europe
Phone: +41 (79) 239 25 08
Email: [EMAIL PROTECTED]
Web: http://www.meetingmaker.com


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




[Zope] User authentication and properties

2000-08-08 Thread Gerard Metrailler Jr.

Hello,

I am looking into a solution to extend the normal acl_user management 
interface.

First, I want to have properties associated with a user. This could for 
example be the email, the real name or their preferences to view a site.

Second, I want to replace the normal basic authentication method by a new 
form that will have authenticate a user through his username, his password 
and a number that will only be known by the server and the user and that 
will change on each login. This will most certainly require custom 
properties and methods usable for each user.

I've seen there are different products available (GUF, LoginManager), but I 
couldn't understand if they where able to do what I want. Any hint on how 
to use such a product to do this?

It also seems to be possible to subclass the acl_user folder. Is there any 
document explaining how to do this?

Best regards,

Gérard Métrailler Jr.

Meeting Maker Inc.
... the intelligent choice for collaborative scheduling

Technical Account Manager Europe
Phone: +41 (79) 239 25 08
Email: [EMAIL PROTECTED]
Web: http://www.meetingmaker.com


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




Re: [Zope] problem with rss

2000-07-24 Thread Gerard Metrailler Jr.

Hello,

At 12:43 23.07.2000 +, Oliver Frommel wrote:
When I change the XML encoding type to ISO-8859-1 the problem still
persists.
I suspect that Zope silently sets the encoding type to something different.
My DTML method looks like this:

dtml-call "RESPONSE.setHeader('Content-Type', 'text/rdf')"
?xml version="1.0" encoding="ISO-8859-1"?
!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN"
 "http://my.netscape.com/publish/formats/rss-0.91.dtd"
rss version="0.91"

rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns="http://my.netscape.com/rdf/simple/0.9/"

channel
...
/rdf:RDF

when I try to change the dtml-call to set the charset to ISO-8859-1 Zope
produces the "htmlhead/head" sequence again.
Any ideas on how to solve this problem?

Here is the code I use on a Squishdot server containing french text (with 
accents) which works fine:

---
dtml-call "RESPONSE.setHeader('content-type', 'text/rdf')"?xml 
version="1.0" encoding="ISO-8859-1"?
!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN"
 "http://my.netscape.com/publish/formats/rss-0.91.dtd" 
rss version="0.91"
   channel
 titledtml-var "striptags(rss_title)" /title
 languagefr/language
 linkdtml-var site_url/link
 descriptiondtml-var "striptags(rss_description)"/description
.
   /channel
/rss
--

I believe an important point is to have the first line containing the 
dtml-call and the ?xml tags, without a line brake. This is used on a 
2.1.6 server with Squishdot 0.3.2.

Best regards,

Gérard Métrailler Jr.

Meeting Maker Inc.
... the intelligent choice for collaborative scheduling

Email: [EMAIL PROTECTED]
Web: http://www.meetingmaker.com


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




Re: [Zope] Display the icon of a meta_type

2000-07-21 Thread Gerard Metrailler Jr.

Hello,

At 22:42 20.07.2000 +, Maik Roeder wrote:
  I am using a ZCatalog object on my site. When I do a query, I want the
  results do display the meta_type of the document found with it's icon.
I've
  seen that on Zope.org and loved this idea... the only problem is that it
is
  a method on zope.org that does the trick (!--#var
  "icon_for_meta_type(REQUEST,meta_type=meta_type)"--) and I don't have
the
  source for it.

It's all there ;-)

http://www.zope.org/SiteIndex/search/icon_for_meta_type/view_source

OK, sometimes, I really feel stupid.

Thank you very much.

Best regards,

Gérard Métrailler Jr.


___
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] all DTML Methods of current folder and subfolder

2000-07-21 Thread Gerard Metrailler Jr.

Hello,

At 07:21 21.07.2000 +, Wolfgang Klinger wrote:
I have a dtml method in a folder which should
display all "document_title"s of all
"DTML Method"s in the current folder and
all sub folders!

(should work as navigation frame)

How can I do that?

I tried
dtml-in "Info.objectValues(['DTML Method'])"
where "Info" is the current folder where the
method itself is stored
but that didn't work ... :-(

Try using PARENTS[0] instead of Info if you want to display the current 
folder content. I am using the following (with a few sorting options for 
the dtml-in tag) in a ZClass (inheriting from CatalogAware and Folder) I 
created to render the content of the current folder.

dtml-in  "PARENTS[0].objectValues(['DTML Method'])"
dtml-var title_or_id
/dtml-in

Best regards,

Gérard Métrailler Jr.


___
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] two problems.

2000-07-20 Thread Gerard Metrailler Jr.

Hello,

At 15:28 20.07.2000 +, Gregory Haley wrote:
1.  i am exploring using zope 2.2 on my local machine, the installation
went fine, but now when i try to create anything from superuser, i get
an error that says:

  Error Type: SuperCannotOwn
  Error Value: Objects cannot be owned by superuser

what am i doing wrong here.  (this of course runs completely
counterintuitive from my unix experience, where superuser can do
anything anywhere).  i was folloing the steps outlined in the "A first
zope site" How-to, and still did not get this to work.

Well, the rights associated with Superuser changed in 2.2. You now need to 
have a dedicated login to create objects. Superuser should only be used as 
a "last help" login. I don't even remember the password I have as a 
Superuser on my server and will have to change it when I will require the 
superuser login ;-)

Here is how to proceed.

- In the management interface, got to /acl_users
- Click on "add..."
- Enter the username, password, ... and give him at least the role "Manager"
- Restart your browser
- Log into your management screen as this newly created user
- Goto the / folder, select the "Ownership" tab
- Click on "Take ownership" (this step is not required)

You can now add, modify and delete objects.

Best regards,

Gérard Jr.

PS: There seems to be a problem with your email address.


___
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] Display the icon of a meta_type

2000-07-20 Thread Gerard Metrailler Jr.

Hello,

I am facing a little problem ;-)

I am using a ZCatalog object on my site. When I do a query, I want the 
results do display the meta_type of the document found with it's icon. I've 
seen that on Zope.org and loved this idea... the only problem is that it is 
a method on zope.org that does the trick (!--#var 
"icon_for_meta_type(REQUEST,meta_type=meta_type)"--) and I don't have the 
source for it.

Thank you for your help.

Best regards,

Gérard Métrailler Jr.


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