Re: [Zope] how do you iterate over tiny tables?

2000-05-22 Thread Geir Bækholt

on Monday, May 22, 2000 Graham Chiu wrote :
[snip]
GC> I have a folder full of Tiny Tables.  I would like to go over each
GC> table, and iterate thru their contents.

GC> 
GC>   
GC>  
GC>   
GC> 

GC> doesn't do anything.  Clues?
[snip]

perhaps (untested)  would work
??


--
Geir Bækholt
web-developer/designer
[EMAIL PROTECTED]
http://www.funcom.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] Newbie: String work

2000-06-27 Thread Geir Bækholt

on Tuesday, June 27, 2000 Andy Gates wrote :
AG> Simple stuff from the simple people today: string manipulation.

AG> I have a string variable which has various chunks delimited by double 
AG> tildes ~~. In order to do what I need to do, I need to extract the 
AG> section of the string after the last double-tilde, so that

AG> "fred~~bloggs" returns "bloggs"
AG> "fred" returns "fred"
AG> "fred~~bloggs~aardvark" returns "aardvark"

AG> I can see that rfind is the thing I need to use, but as usual (gah! 
AG> newbie!) I'm stuck on the syntax.  Help!

try something like :



this is documented at
http://www.zope.org/Documentation/Guides/DTML-HTML/DTML.4.4.2.3.html
 - but not very newbie-friendly

 took me a long time to figure out how to use :-)

--
Geir Bækholt
web-developer/designer
[EMAIL PROTECTED]
http://www.funcom.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] zcatalog -- returning context of hits on fulltext

2000-08-14 Thread Geir Bækholt

on Monday, August 14, 2000 Jean Jordaan wrote :

JJ> This works great, but returns only the
JJ> found objects and the cached properties specified in the 
JJ> MetaDate Table.

JJ> Wouldn't it be great to be able to give just a line or two
JJ> of context from the full text, the way Google does? I have
JJ> a feeling I'm asking for pie in the sky, but if anyone has
JJ> a brilliant (or a functional) solution I'd be delighted.

make a pythonmethod that returns the first 200 letters or
something  of the text , and add a metadata field to your
catalog referencing this pythonmethod..

-- Should give you what you want..

:-)

--
Geir Bækholt
web-developer/designer
[EMAIL PROTECTED]
http://www.funcom.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] Simple acquisition (?) question

2000-08-16 Thread Geir Bækholt

on Wednesday, August 16, 2000 Jean Jordaan wrote :

JJ>   
...

JJ> What further confuses me is that '/docs' has no title, and it
JJ> contains 'index_html (Document Warehouse)'. Now 
JJ> 'standard_html_header' renders '/docs/index_html's title. 

JJ> If '/' has no title and '/index_html' does, 
JJ> 'standard_html_header' renders no title. This seems inconsistent.
JJ> Because there's acquisition stuff that escapes me, doubtless.
JJ> Anyone have 50c worth of enlightenment?

Check whether those index_htmls are DTML methods or DTML
documents..

DTML Documents have properties of their own, and return
their title, when title_or_id is callet upon them..

DTML methods are just that, methods of their container, in
this case their folder, and so returns the folder's title
when title_or_id is called on them ..

see also :
http://www.zope.org/Members/michel/HowTos/DTMLMethodsandDocsHowTo


--
Geir Bækholt
web-developer/designer
[EMAIL PROTECTED]
http://www.funcom.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] Managing with Opera

2000-08-22 Thread Geir Bækholt

on Tuesday, August 22, 2000 Jean Jordaan wrote :
JJ> Hi all 

JJ> Looks like I'm running into a cookie hassle with Opera 4.01

JJ> I copy everything in '/docs/tmp' and paste to '/docs'. Lo
JJ> and behold, '/docs' contains not the items copied from 
JJ> '/docs/tmp', but the stuff that was on the clipboard end 
JJ> of yesterday. IE 5.5 did it right. 

JJ> Has anyone else encountered anything similar using Opera?


Had some problems with Opera3.6 and cookies, but it seems to
work with v4.01

I still rather use IE for my Zope-management (athough i use
Opera for everything else) , because opera has some slight
problems with frames and the history/back-button..


--
Geir Bækholt
web-developer/designer
[EMAIL PROTECTED]
http://www.funcom.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] Run a java applet in Zope

2000-08-25 Thread Geir Bækholt

on Thursday, August 24, 2000 Michel Houben wrote :
MH> I have a dtml-document with a Java-applet and I can't get it runnning in
MH> the Zope envirronement. I hope someone knows it and can solve my problem.

I run loads of applets in a DTML-environment.
No problems whatsoever . :-)

What seems to be the problem ?
Does it work in a pure HTML-page ?
Check the differences
between the working HTML and the output of your DTML..


--
Geir Bækholt
web-developer/designer
[EMAIL PROTECTED]
http://www.funcom.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] and PARENTS[0]

2000-08-31 Thread Geir Bækholt

on Thursday, August 31, 2000 Tim Hicks wrote :
TH> OK, I have a standard_html_header for my site that uses the following
[snip]
TH>with the correct property being
TH> inserted, however,  results in the id of the parent
TH> folder of standard_html_header being inserted, instead of the id of
TH> the zclass.  Could anyone point out how I can get hold of the zclass
TH> id?

first of all :
make sure your standard_html_header is a method, not a
document....

--
Geir Bækholt
web-developer/designer
[EMAIL PROTECTED]
http://www.funcom.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] Re[2]: [Zope] and PARENTS[0]

2000-08-31 Thread Geir Bækholt

on Thursday, August 31, 2000 Tim Hicks wrote :


TH> Yup, definitely a method.  Out of interest, if it were a document, why
TH> would all of the  work except id?

acquisition, i guess.. satandard_html_header would not
usually have those properties itself..

if it was a document, and had those other properties, the
ones from the header would be used..

Seems rather strange that id from standard_html_header is
used if it is a method.. puzzling..

cannot think of a reason..


--
Geir Bækholt
web-developer/designer
[EMAIL PROTECTED]
http://www.funcom.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] Mail problem ([Zope] how to change the 'Zope' realm/resource?? (fwd))

2000-09-13 Thread Geir Bækholt

on Wednesday, September 13, 2000 Oleg Broytmann wrote :
OB> Hi!

OB>Is it only me? I am getting most (but not all) message twice.

OB> Oleg.


me too !


--
Geir Bækholt
web-developer/designer
[EMAIL PROTECTED]
http://www.funcom.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] list of users tied to database

2000-09-13 Thread Geir Bækholt

on Wednesday, September 13, 2000 tom smith wrote :
ts> I'm trying to create a list of users' emails. There is a table called
ts> "tblUsers" and a field called "Email".
ts> I have created a sql method called "get_email(UserName)" which works fine.
ts> 
ts>   ')">

ts> any ideas anyone?

Don't nest DTML inside DTML
try something like :



--
Geir Bækholt
web-developer/designer
[EMAIL PROTECTED]
http://www.funcom.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] newbie question

2000-11-09 Thread Geir Bækholt


possibly not the cleanest way of doing it, but this ought to do what
you want..


1000
5000
.. etc..

and


 This is not much!

 This is ok!



--
Geir Bækholt
web-developer/designer
[EMAIL PROTECTED]
http://www.funcom.com


on Thursday, November 09, 2000 Stephan Goeldi wrote :
SG> I want to select from a select menu, 3 amounts: 1000, 5000 or 1. After 
SG> this, the form action method should reply:

SG> - "this is not much" if 1000 was selected,
SG> - "this is ok" if 5000 was selected,
SG> - "this is very much" if 1 was selected

SG> Now my form method looks like this:

SG> 
SG> How many money?
SG> 
SG> 1000
SG> 5000
SG> 1
SG> 
SG> 
SG> 

SG> and the form_action method is this:

SG> 
SG>
SG>   This is not much!
SG>
SG>
SG>   This is ok!
SG>
SG>
SG>   This is very much!
SG>
SG> 

SG> I am sure that there is an error in my thinking of these tags.

SG> TIA
SG> -goe-

SG> _
SG> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

SG> Share information about yourself, create your own public profile at 
SG> http://profiles.msn.com.


SG> ___
SG> Zope maillist  -  [EMAIL PROTECTED]
SG> http://lists.zope.org/mailman/listinfo/zope
SG> **   No cross posts or HTML encoding!  **
SG> (Related lists - 
SG>  http://lists.zope.org/mailman/listinfo/zope-announce
SG>  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] Populating a :list variable from the results of a ZSQL method

2000-11-10 Thread Geir Bækholt


don't know about inside zope, but in plain python you could just do:

new_options = list(options)


perhaps an external method would cut it:

return list(inputstring)



--
Geir Bækholt
web-developer/designer
[EMAIL PROTECTED]
http://www.funcom.com

on Friday, November 10, 2000 Tony McDonald wrote :
TM> Hi all,
TM> Say I've got a form with this in it

TM> 
TM> number 1
TM> number 2
TM> number 3
TM> 

TM> When this is put into an SQL database, the field 'options' is this (string)

TM> ['1', '2', '3']  or ['2', '3'] etc.

TM> When I get the data back from the database, 'options' comes back as a 
TM> string, and  ...  gives errors (basically, 
TM> it can't iterate over a string).

TM> I tried
TM> 
TM> and then tried iterating over new_options, but the variable didn't exist...

TM> Has anyone got any solutions for this?
TM> TIA
TM> Tone
TM> --
TM> Dr Tony McDonald,  Assistant Director, FMCC, http://www.fmcc.org.uk/
TM> The Medical School, Newcastle University Tel: +44 191 222 5116
TM> A Zope list for UK HE/FE  http://www.fmcc.org.uk/mailman/listinfo/zope

TM> ___
TM> Zope maillist  -  [EMAIL PROTECTED]
TM> http://lists.zope.org/mailman/listinfo/zope
TM> **   No cross posts or HTML encoding!  **
TM> (Related lists - 
TM>  http://lists.zope.org/mailman/listinfo/zope-announce
TM>  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] Referecing items in subfolders

2000-11-14 Thread Geir Bækholt


try :




--
Geir Bækholt
web-developer/designer
[EMAIL PROTECTED]
http://www.funcom.com

on Tuesday, November 14, 2000 Pieter Claerhout wrote :
PC> Hello all,
PC> have a small question. Imagine you have the following folder structure in Zope:
PC> http://testserver.pclaerhout.com/index_html
PC> http://testserver.pclaerhout.com/resources/standard_header
PC> http://testserver.pclaerhout.com/resources/standard_footer
PC> How can I reference the standard_header document (which is in a subdirectory) from 
the index_html document, for example using a ?? I have the 
same question if the files
PC> in the subdirectory are for example SQL methods. I'm just looking for a way to 
separate different kinds of documents.



___
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] chapter 5 Zope book - problems with the examples

2000-11-16 Thread Geir Bækholt


my guess is that your index.html is a dtmlDocument... Make it a
dtmlMethod, and things will probably work..

Documents have their own namespace, so you are looking for folders
inside index.html (and not finding any, of course)..

if you need to have index.hmtl as a document, you could try (untested) 

good luck

--
Geir Bækholt
web-developer/designer
[EMAIL PROTECTED]
http://www.funcom.com

on Thursday, November 16, 2000 Lee Reilly CS1997 wrote :
LRC> Hi,

LRC> I'm going through the examples in Chapter 5 of the Zope book and am
LRC> having some problems. For those of you familiar with it, it is the 'Zope
LRC> Zoo' example.

LRC> Can anyone help me out?

LRC> 1 - I create a DTML method called navigation as follows:

LRC> 
LRC> 
LRC>   
LRC> 
LRC> 

LRC> 2 - On viewing this method it works fine - a hyperlink to all
LRC> sub-folders appears in the browser.

LRC> 3 - I add '' into my standard_html_header so it
LRC> reads:

LRC> 
LRC> 
LRC> ZAPHOD - zopetastic!
LRC> 
LRC> 
LRC> 
LRC> 
LRC> If your name is Lee then click here to
LRC> login. 
LRC> 
LRC> 

LRC> 4 - On viewing index.html (containing header & footer) everything except
LRC> the navigation method appears. Viewing the source of index.html reveals
LRC> that the  tags are created... just no  elements.

LRC> 5 - The HTML is fine... all tags closed & in te right place.

LRC> Can anyone see a problem?

LRC> Thanks in advance for any replies. My appologies also for such a long
LRC> post.

LRC> - Best regards,
LRC> Lee Reilly

LRC> ___
LRC> Zope maillist  -  [EMAIL PROTECTED]
LRC> http://lists.zope.org/mailman/listinfo/zope
LRC> **   No cross posts or HTML encoding!  **
LRC> (Related lists - 
LRC>  http://lists.zope.org/mailman/listinfo/zope-announce
LRC>  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] Search and replace

2000-11-19 Thread Geir Bækholt

You'd have to write a method, looping over the documents you want
changed an doing a 
and a manage_edit_whatever-holds-your-content...

This ought be a method of folders by default, i think, accessible by
manager from the management interface..
(Regexps would be neat here..)


--
Geir Bækholt
web-developer/designer
[EMAIL PROTECTED]
http://www.funcom.com

on Sunday, November 19, 2000 Lee Hunter wrote :
LH> Is there any way to do a 'search and replace' in a Zope folder (and it's
LH> subfolders)?

LH> TIA

LH> Lee
LH> Hum Communications Ltd.


LH> ___
LH> Zope maillist  -  [EMAIL PROTECTED]
LH> http://lists.zope.org/mailman/listinfo/zope
LH> **   No cross posts or HTML encoding!  **
LH> (Related lists - 
LH>  http://lists.zope.org/mailman/listinfo/zope-announce
LH>  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] ZCatalog-weirdness again ??

2000-11-23 Thread Geir Bækholt


i am having a bizarre problem with zcatalog (Zope2.2.2 win2k):

I use Zcatalog for indexing a Zclass( todo-task, (catalogaware))  with a property
named 'priority' (an integer between 1 and 10,-  a field-index in the
catalog) among others ..

If i pass 'sort_on=priority' to the catalog-search, new instances of
todo-task show up twice... if i leave the sort_on out, or also pass
sort_order=reverse, everything works as expected.. Each instace shows
up once.

The instances are just listed once in the cataloged-objects-tab in my
catalog.
When i update my catalog manually, instances created before the update
show up only once, but new instances (created after the update) still
show up twice..(but still only if i pass 'sort_on=priority').

 Any ideas ?
 Anyone experienced anything like it ?

--
Geir Bækholt 
web-developer/designer
[EMAIL PROTECTED]
http://www.funcom.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] "PrincipiaSearchSource()" dtml-method and Catalog

2001-01-14 Thread Geir Bækholt

PrincipiaSearchSource  will  have  to be a PythonMethod or an External
Method.

dtml won't be called by Catalog... Anything Python will work.

so instead of :   , you have to use :
return var1 + var2 + var3

--
Geir Bækholt
web-developer/designer
[EMAIL PROTECTED]
http://www.funcom.com

on Sunday, January 14, 2001 Max M wrote :
MM> I have made a dtml method called "PrincipiaSearchSource" in a bunch of
MM> zClasses so that my Catalog will index severeal parameters in the zClass,
MM> but nothing happens.

MM> As far as I can see PrincipiaSearchSource is a default value that is indexed
MM> in catalog. Have I misunderstood that?

MM> The title gets indexed ok when i update my classes but not the content
MM> delivered via the PrincipiaSearchSource method. Does anybody have an idea?

MM> I have tried to return via PrincipiaSearchSource in 2 different ways (None
MM> of which works):

MM> #1 ---
MM> 

MM> #2 ---
MM>   

MM> regards Max M

MM> Max M. W. Rasmussen,Denmark.   New Media Director
MM> private: [EMAIL PROTECTED] work: [EMAIL PROTECTED]
MM> -
MM> Specialization is for insects.  -  Robert A. Heinlein


MM> ___
MM> Zope maillist  -  [EMAIL PROTECTED]
MM> http://lists.zope.org/mailman/listinfo/zope
MM> **   No cross posts or HTML encoding!  **
MM> (Related lists - 
MM>  http://lists.zope.org/mailman/listinfo/zope-announce
MM>  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] Flat-style

2001-01-17 Thread Geir Bækholt

in your css :

input {border : 1px solid #00}

Netscape4 will cringe, of course, as it usually does from css

good luck
:-)


--
Geir Bækholt
web-developer/designer
[EMAIL PROTECTED]
http://www.funcom.com

on Wednesday, January 17, 2001 Tom Deprez wrote :
TD> Not really zope specific, but I hope nobody minds me asking.

TD> How do you implement flat-looking input boxes? Does somebody knows this?

TD> Thanks in advance,
TD> Tom.


TD> ___
TD> Zope maillist  -  [EMAIL PROTECTED]
TD> http://lists.zope.org/mailman/listinfo/zope
TD> **   No cross posts or HTML encoding!  **
TD> (Related lists - 
TD>  http://lists.zope.org/mailman/listinfo/zope-announce
TD>  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 )