Re: [Zope] some newbie quesions...
Juri Jensen <juri@jones.dk> wrote:
What I need is:
1. A way to let the users subscribe to get a login and a password. They fill in their e-mail address and a name, and get a mail with a password random generated. Their request should be checked by someone in charge before they'll get authorized.
The "real" answer to your prayers is the Portal Toolkit, which DC is rolling out as an alpha release as we speak. The only issue is that it is not-yet-ready-for-prime-time. See http://www.zope.org/Products/PTK Phil Harris had a nice "first cut" at this problem in his zGold product -- unfortunately, it seems to have dropped off the 'Net. The last email address I have for Phil is phil.harris@zope.co.uk; the last known whereabouts of zGold was: http://media-1.ml.uwcm.ac.uk:8080/zGold
2. Alongside with this I've got a webforum based on the Perl-based Sporum. Does any product exist with the same features as Sporum? I would like to keep it all Zope-based (more control, easier etc.).
There are a couple of Zope products which could help you here: Squishdot implements a Slashdot-style weblog (http://www.zope.org/Members/butchland/Squishdot) KM|NetNews implements a CNN|News-style site (http://www.zope.org/Members/tazzzzz/kmnn) Hope this helps! Tres. -- ========================================================= Tres Seaver tseaver@palladion.com 713-523-6582 Palladion Software http://www.palladion.com
Here is the question (after a few too many hours of messing with this) I am trying to figure out the best way to populate links with variables. In raw python I would just declare the links like link = "<a href="http://www.somewhere.com/cgi/%(v1)s/somthingelse/%(v2)s " and populate the link with tuples when I was going to use it. link % variable For the life of me I can't figure out how to do this in Zope. Any help would be great. I am sure this is easy but I am at a complete loss. Thanks, JMA
You can do something like this: The following REQUEST.set's are only necessary to have some placeholder variables, you'd probably get the values from somewhere else, maybe a property on a folder, or a form value, or a SQL field, whatever. <dtml-call expr="REQUEST.set('v1', 'Members')"> # equivalent to Python's "v1 = 'Members'" <dtml-call expr="REQUEST.set('v2', 'ZQR')"> # equivalent to Python's "v2 = 'ZQR'" <A HREF="http://www.zope.org/<dtml-var v1>/<dtml-var v2>"> to make it look a little nicer, you can also use DTML "entity syntax": <A HREF="http://www.zope.org/&dtml-v1;/&dtml-v2;"> You could even do something like this: <dtml-call expr="REQUEST.set('myURL', 'http://www.zope.org/%s/%s' % (v1, v2))"> <dtml-var myURL> Jatwood@bwanazulia.com wrote:
Here is the question (after a few too many hours of messing with this)
I am trying to figure out the best way to populate links with variables. In raw python I would just declare the links like
link = "<a href="http://www.somewhere.com/cgi/%(v1)s/somthingelse/%(v2)s "
and populate the link with tuples when I was going to use it.
link % variable
For the life of me I can't figure out how to do this in Zope. Any help would be great.
I am sure this is easy but I am at a complete loss.
Thanks, JMA
_______________________________________________ Zope maillist - Zope@zope.org 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 )
-- Chris McDonough Digital Creations, Inc. Zope - http://www.zope.org
Thanks Chris for the help... I now can explain the whole problem. I had created a folder "foldername" and in it I created a few DTML Methods (methodname1, methodname2, methodname3). I was getting back a variable from a sql call "variablename" (above the folder) and I was trying to get some of the values stated in those methods in the folder. So I was using... <DTML-VAR "foldername.method1"> And in those method (or so the thinking went) I could store the link and replace the variables like you described below but it would only give back the actual whole method not the some of values defined in the method itself. Again, I knew this is as newbie as they get but even with some Python background I am getting a bit confused. I am having a great time though... Feeling the Zen. JMA At 7:49 PM -0500 2/5/00, Chris McDonough wrote:
You can do something like this:
The following REQUEST.set's are only necessary to have some placeholder variables, you'd probably get the values from somewhere else, maybe a property on a folder, or a form value, or a SQL field, whatever.
<dtml-call expr="REQUEST.set('v1', 'Members')"> # equivalent to Python's "v1 = 'Members'" <dtml-call expr="REQUEST.set('v2', 'ZQR')"> # equivalent to Python's "v2 = 'ZQR'"
<A HREF="http://www.zope.org/<dtml-var v1>/<dtml-var v2>">
to make it look a little nicer, you can also use DTML "entity syntax":
<A HREF="http://www.zope.org/&dtml-v1;/&dtml-v2;">
You could even do something like this:
<dtml-call expr="REQUEST.set('myURL', 'http://www.zope.org/%s/%s' % (v1, v2))"> <dtml-var myURL>
Jatwood@bwanazulia.com wrote:
Here is the question (after a few too many hours of messing with this)
I am trying to figure out the best way to populate links with variables. In raw python I would just declare the links like
link = "<a href="http://www.somewhere.com/cgi/%(v1)s/somthingelse/%(v2)s "
and populate the link with tuples when I was going to use it.
link % variable
For the life of me I can't figure out how to do this in Zope. Any help would be great.
I am sure this is easy but I am at a complete loss.
Thanks, JMA
_______________________________________________ Zope maillist - Zope@zope.org 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 )
-- Chris McDonough Digital Creations, Inc. Zope - http://www.zope.org
_______________________________________________ Zope maillist - Zope@zope.org 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 )
You can do this easily in Zope, using an expression in DTML, for example: <a href= "<dtml-var "'http://www.somewhere.com/cgi/%s/somthingelse/%s'%(v1,v2)">">
Jatwood@bwanazulia.com wrote Here is the question (after a few too many hours of messing with this)
I am trying to figure out the best way to populate links with variables. In raw python I would just declare the links like
link = "<a href="http://www.somewhere.com/cgi/%(v1)s/somthingelse/%(v2)s "
and populate the link with tuples when I was going to use it.
link % variable
For the life of me I can't figure out how to do this in Zope. Any help would be great.
I am sure this is easy but I am at a complete loss.
Thanks, JMA
_______________________________________________ Zope maillist - Zope@zope.org 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 )
-- Anthony Baxter <anthony@interlink.com.au> It's never too late to have a happy childhood.
participants (4)
-
Anthony Baxter -
Chris McDonough -
Jatwood@bwanazulia.com -
Tres Seaver