[Zope-dev] Re: [Zope] Running Python Scripts via the Management Interface

2003-02-03 Thread Geir Bækholt
on or about, Monday, February 03, 2003, we have reason to believe that Asad Habib wrote
something along the lines of :
 Hello. Does anyone know why the following script
 stalls when I run it in Zope's Management Interface
 using the 'Test' command? 

 context.manage_addProperty(propertyId, propertyValue,
 propertyType)

 All it does is add a property to a folder. The script
 does function properly and doesn't stall when I access
 it from a DTML method. However, it stalls when I run
 it directly. Any help would be appreciated. Thanks.

it most probably doesn't stall, it just doesn't return anything to the
browser , so it has no response to display ..

try something like this:

context.manage_addProperty(propertyId, propertyValue, propertyType)
return done

:)

-- 
Geir Bækholt[EMAIL PROTECTED]
Web Application/HCI-designer
Product Operations
Funcom Oslo


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



Re: [Zope-dev] DateTime.rfc822() bug?

2002-10-13 Thread Geir Bækholt

Hello Lennart, 

Friday, October 11, 2002, 2:00:03 PM, you wrote:

LR RFC 2822 (which is the currently valid one, if I understand correctly)
LR specifies the date format to have four digit zone specifications, ie
LR GMT+0200, while DateTime.rfc822() happily returns GMT+2. Not that this
LR seems to be any problem, I'm just looking for an answer if this is how it's
LR supposed to be?

i can confirm that this is a bug in DateTime.rfc822(), and that
rfc-conformant mailclients choke on it aswell..

i believe it has been reported to the lists before , and i believe i
have also seen it in the collector..

(the collector seems to be down , but i found this request on google..
http://mail.python.org/pipermail/zope-collector-monitor/2002-May/000652.html
)

Your concerns are valid.
i usually solve it by use of a small script(python) somewhat
resembling this :

# params   indate
fmtstr = %a, %d %b %Y %X +0200
return indate.strftime(fmtstr)



-- 
Geir Bækholt
[EMAIL PROTECTED]


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



Re: [Zope-dev] Problems with Oracle DA and Dates

2001-10-02 Thread Geir Bækholt

Hello Dario, 

Just noticed behaviour similar to this a couple of days ago , but
haven't had the time to file a report on it.. - We managed to narrow
it down a bit , tho' :

In our installation ; Zope silently restarted , quite quickly , and
almost unnoticeable to our editors.
This was triggered either when we passed one of the
oracle-date-objects returned by DCO2 to DateTime(), or when we
believed them to be DateTime objects and tried to run DateTime methods
on them...

I was in a production environment , so i had to fix the errors before
going to work on narrowing down the bug. Selecting your dates as
strings with TO_CHAR(datefield) in your SQL will be a safeguard
against the restarting/crashing/whatever_bad_things_might_happen , but
will give you boring strings instead of date-objects.. -ok , it is a
stopgap, but my Zope stopped restarting every 2 minutes...

Hoop we can get this fixed before the final is released..
:-)



Monday, October 01, 2001, 15:06:44, you wrote:

DLK (I apologise in advance for the crosspost, but I think this is a valid
DLK question on both the zope-db and zope-dev lists. If you disagree, flame
DLK away, and I'll never do it again. oh, btw: flame in private mail, please)

DLK Hello!

DLK We have run into a showstopper problem here where it seems (we're not sure
DLK yet) that there is a severe problem using dates returned from the Oracle DA
DLK adapter. Other possible culprits include LocalFS, Transparent Folder,
DLK Formulator and the source release of Zope 2.4.1.

DLK The problem is that Zope either dies, core dumps and dies, or slows down to
DLK a crawl.

DLK We are using the Zope 2.4.1 release, with Transparent folders and LocalFS,
DLK latest, and a sligthly modified Formulator.

DLK There are about 2-6 people working and developing in it during all hours of
DLK the day (24 hours).

DLK Unfortunately nothing shows up in any of the logs, so they are of little
DLK use; I don't even have a traceback so display. We *think* we found sometign
DLK pointing at LocalFS in one of the coredumps, but we are lowly non-unix
DLK programmers, and have no idea if this is accurate info or not. It could just
DLK be un-collected garabage memory.

DLK Is anybody noticing anything similar, or if you have any opinion on what
DLK might be going on, please reply; we are in DS mode here (we are having a
DLK prototype presentation during two weeks, starting tomorrow) and are feeling
DLK a bit desperate.

DLK Sincerely,
DLK /dario

-- 
Geir Bækholt   web-developer/zopatista
[EMAIL PROTECTED] funcom oslo | webdev-team


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



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




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 :  dtml-return "var1 + var2 +var3" , you have to use :
return var1 + var2 + var3

--
Geir Bkholt
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 dtml-return "var1 + var2 +var3"

MM #2 ---
MM dtml-var var1 dtml-var var2 dtml-var var2

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] Referecing items in subfolders

2000-11-14 Thread Geir Bækholt


try :
dtml-with resources
dtml-var standard_header
/dtml-with

--
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 dtml-var standard_header?? 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] 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 select type="checkbox" name="options:list"
TM option value="1"number 1
TM option value="2"number 2
TM option value="3"number 3
TM /select

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 dtml-in options ... /dtml-in gives errors (basically, 
TM it can't iterate over a string).

TM I tried
TM dtml-call "REQUEST.set('new_options:list', options)"
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] dtml-if 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..

select name="money:int"
option value="1000"1000
option value="5000"5000
.. etc..

and

dtml if "money == 1000"
 This is not much!
dtml-elif "money == 5000"
 This is ok!
dtml-elif ..

etc..
/dtml-if


--
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 form action="form_action"
SG How many money?
SG select name="money"
SG option1000
SG option5000
SG option1
SG /select
SG input type="submit" value="checkit"
SG /form

SG and the form_action method is this:

SG dtml-in money
SGdtml-if "1000"
SG   This is not much!
SG/dtml-if
SGdtml-if "5000"
SG   This is ok!
SG/dtml-if
SGdtml-if "1"
SG   This is very much!
SG/dtml-if
SG /dtml-in

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] 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!

OBIs 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 dtml-in "theOTHERintranet.acl_users.getUserNames()"
ts   dtml-in "get_email('UserName=dtml-var sequence-item')"

ts any ideas anyone?

Don't nest DTML inside DTML
try something like :
dtml-in "get_email('UserName=_['sequence-item']')"


--
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] dtml-with 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]
THwith the correct property being
TH inserted, however, dtml-var id 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] dtml-with 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 dtml-var's 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] 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] 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] Simple acquisition (?) question

2000-08-16 Thread Geir Bækholt

on Wednesday, August 16, 2000 Jean Jordaan wrote :

JJ   !--#var title_or_id--
...

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] 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] 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 :

dtml-var expr="_.string.split('fred~~bloggs','~~')[-1]"

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 )