[Zope] Unidentified problem with SiteRoot

2001-01-09 Thread Kelvin Cheong

Hello all,

I have a problem which i suspect is site root's problem.

The scenario, I have folders F1, F1a and F2, where F1a is a child of F1
and F2 is on the same directory level as F1. Also F1 and F2 have their
own DB-connections DB1 and DB2 respectively, which have the exact same
properties/connection.

Then...

1) i placed a SiteRoot in F1, 
2) then removed it,
3) copied  pasted F1a into F2,
4) renamed the F1a in F2 to F2a,
5) create a SiteRoot in F1 again,
6) and create a SiteRoot in F2

i've also tried restarting Zope between steps 2 and 3

Then it seems that the ZSQL Methods in F2a are referring still referring
to the MySQL DB connection in F1. I've tested it many tiems with otehr
folders aswell, and it seems that they're all reacting the same way. 

In other words, it seems like once a SiteRoot has been created in the
folder, the DB connections stick to it. I've also tried the "Undo" from
Zope's Management Interface, but to no avail.

Perhaps my intuition of all this is wrong altogether. 

Anyone out there experienced the same problem, or have any solutions to
this problem?

Thanks Zopistas,
amoebia

___
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 : [Zope] NESTED IN STATEMENTS AND PASSING VARIABLES in DTML

2000-11-19 Thread Kelvin Cheong


dtml-in "category_method(id='1')" size=100 start=query_start
id=dtml-var idseq=dtml-var seqvid=dtml-var vid

where can i find out more about these properties, i.e. the seq...vid... and
so on..?

thanx for any directions in advance,
later,
amoebia

VCN - The Leader In Corporate Communication Solutions
Visit our website at http://www.vcn.com.my. 
or http://www.vcnlinux.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] Input for Chinese Characters

2000-09-11 Thread Kelvin Cheong


Hi all!

Now that I have managed to display Chinese characters, i'm stuck with my
next problem. How do i input Chinese characters into Zope?

Thanx in advance to all of ya!

Later,
amoebia

VCN - The Leader In Corporate Communication Solutions
Visit our website at http://www.vcn.com.my. 
or http://www.vcnlinux.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] Using Chinese Characters

2000-09-11 Thread Kelvin Cheong


Christian, 

Thanks for the tip. Your help is much appreciated. Further to your reply, I
would like to ask what the differences of UTF-8 are compared to Big5 Code.
Apparently (from my research on Big5) it is the most commonly used unicode
for chinese characters. Kindly advice.


Thank you once again.


Regards,
amoebia.


Christian Wittern writes:

 Hi there,
 
 I am using Zope successfully with Chinese (Traditional) on Windows. For
 forward compatibility, I am storing it as UTF-8, which is one storage format
 for Unicode/ISO 10646 (aka as UCS). It used to work nice until Zope 2.2,
 where some of the display got mangled. I submitted a patch to the Collector
 to fix this problem some weeks ago, so hopefully this will go away in the
 future. Anothere thing is being able to use ZCatalog: I privately patched
 the splitter program, which is used to split strings into words. I am not
 yet satisfied with the solution, that's why I did not go public with it.
 It's also only tested on my windows box.
 
 All the best,
 
 Christian
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
  Of Tino Wildenhain
  Sent: Friday, September 08, 2000 3:18 AM
  To: Kelvin Cheong
  Cc: [EMAIL PROTECTED]
  Subject: Re: [Zope] Using Chinese Characters
 
 
  Hi Kelvin,
 
  Kelvin Cheong wrote:
  
   i was wondering how i can use chinese characters with Zpe on Linux. does
   anyone know how? According to my "mild" research so far, i
  found out that
   Big5is a 2-byte code and is a part of ISO-10646/Unicode. It
  also seems to
   be the de-facto for traditional chinese characters. There're
  also Unicode
   CJK and GB. But GB is for China, which uses simplified chinese
  characters.
   And CJK includes both Big5 and GB.
 
  classic zope is built on python 1.52 and does not naturally support
  unicode.
  But there is a light on the horizont:
 
  http://www.zope.org/Members/htrd/wstring
 
  I have a vision of everything working together for localizing and
  internationalisation ;-)
 
  Regards
  Tino
 
  ___
  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 )
 
 
 
 

VCN - The Leader In Corporate Communication Solutions
Visit our website at http://www.vcn.com.my. 
or http://www.vcnlinux.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] Using Chinese Characters

2000-09-07 Thread Kelvin Cheong


i was wondering how i can use chinese characters with Zpe on Linux. does
anyone know how? According to my "mild" research so far, i found out that
Big5is a 2-byte code and is a part of ISO-10646/Unicode. It also seems to
be the de-facto for traditional chinese characters. There're also Unicode
CJK and GB. But GB is for China, which uses simplified chinese characters.
And CJK includes both Big5 and GB.

The most puzzling thing to me is how all this works. Do i need a special
browser, font server, Zope products? And when i can display chinese
characters using any one of the standards, how am i going to input it in
the first place? And last but not least, how does all this ascii and
unicode conversion work together?

I've seen a couple of chinese sites running on Zope, and was wondering if I
could get some help in here. Anyone have any ideas?

VCN - The Leader In Corporate Communication Solutions
Visit our website at http://www.vcn.com.my. 
or http://www.vcnlinux.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] LocalFS Documentation

2000-07-12 Thread Kelvin Cheong


Hi,

Anybody know where I can find out more about LocalFS, I've already read
jfarr's How-to's and Product Information. But I still need more on how it
works. 

Might aswell post up my problem since I'm already at it. Well, I have this
dtml method that tries to add images:

!--#var standard_html_header--
H2!--#var title_or_id-- !--#var document_title--/H2
P
dtml-with REQUEST
dtml-call "REQUEST.set('userTABPIX1',REQUEST.form['userTABPIX1'])"
dtml-call "manage_addImage('',userTABPIX1)"
/dtml-with
!--#call "TutadobeInsertMethod(REQUEST)"--

Data Has Been Successfully Inserted!

!--#var standard_html_footer--


I tried replacing (blindly) the dtml-with REQUEST tag with both
dtml-with myLocalFS1 and dtml-in myLocalFS1, and as to my expectations
it did not work. How would I actually upload to the LocalFS object
(myLocalFS1) I've created?

Does anybody know how???
k.c.

VCN - The Leader In Corporate Communication Solutions
Visit our website at http://www.vcn.com.my. 
or http://www.vcnlinux.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: Re: [Zope] LocalFS Documentation

2000-07-12 Thread Kelvin Cheong


I'm puzzled...there isn't any upload at the bottom of the page...but there
has always been an upload at the top of the page in the Zope content
management interface (along with "Contents", "Edit", "View",
"Properties"...etc).

If you're talking about, the bottom of the page, there is only an Available
objects selection list and an "Add" button.

Perhaps it would be better to let you know that I just installed LocalFS,
and am very new to Zope. And frankly, I don't even know where to start with
the LocalFS product i have installed. The only thing i've done with it so
far is add it into my Zope management console from the Available Objects
list.

Btw, just to fill you in, I'm using Zope 2.1.6 and LocalFS 0.9.4 (could it
possibly be the versioning that makes the difference ??).



[EMAIL PROTECTED] writes:

 If you login as the manager there is an upload link at the bottom of the
 page.
 
 
 --Darrell
 
 From: "Kelvin Cheong" [EMAIL PROTECTED]
 
  I tried replacing (blindly) the dtml-with REQUEST tag with both
  dtml-with myLocalFS1 and dtml-in myLocalFS1, and as to my expectations
  it did not work. How would I actually upload to the LocalFS object
  (myLocalFS1) I've created?
 
  Does anybody know how???
 
 

VCN - The Leader In Corporate Communication Solutions
Visit our website at http://www.vcn.com.my. 
or http://www.vcnlinux.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] External Method not accepting CGI module

2000-07-10 Thread Kelvin Cheong


Dear All,

I have this python module for uploading an image from a client to the
server (which would be subsequently inserted into a MySQL database, which
is still on the midst of being resolved). I''m trying to import this into
Zope as an External MEthod. It's contents are as follows :



import cgi

form = cgi.FieldStorage()

fileitem = form["userTABPIX1"]

fname = tempfile.mktemp()
fp=open(fname,'w')
fp.write(fileitem.file.read())
fp.close()



However, Zope generates this error :

Zope has encountered an error while publishing this resource.

Error Type : KeyError
Error Value: userTABPIX1


Apparently, this piece of code is supposed to work. I grabbed it off the
mailing list, and I've compared with the python references and tutorials. 

Is it because it's not meant to be used as an External MEthod? 

If so, can anybody suggest a way for me to upload files from the client to
the server which will subsequently be inserted into a mySQL db?


I posted another message in the archive earlier on which describes my
previous attempts in inserting an image into the mySQL database from a
form.



Thanx,
k.c.

VCN - The Leader In Corporate Communication Solutions
Visit our website at http://www.vcn.com.my. 
or http://www.vcnlinux.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] Unable to upload images from client to server

2000-07-06 Thread Kelvin Cheong


Hello All!

I have this problem with "UPLOADING".

In my HTML form (DTML-embedded-Document) I have data and images to insert
into a mySQL DATABASE. Therefore I'm calling SQL statements from my DTML
METHOD.

However, it seems the SQL insert command does not allow LOAD_FILE procedure
as does the SQL update command e.g.: 

UPDATE table_name 
SET blob_column=LOAD_FILE('full_path_of_file') WHERE
table_column='table_column value'

So I had to resort to using TWO separate SQL methods : 
1) to insert the "data" alone into the database first, from the form; 
2) then another to insert the image of the same form using the SQL "update"
command, verified my the data record's unique id.

All this works fine but this method does not work with the
...ENCTYPE="multipart/form-data"... value at the html form header.
Instead it only works with
...ENCTYPE="application/w-xxx-form-urlencoded" If I use
"multipart/form-data" it will enter the string of the command
LOAD_FILE('...file...') instead of the actual image contents. Why is this?

This is only one small part which I'm puzzled about as this method would
only allow images on the server's harddisk to be uploaded. The main concern
is UPLOADING from the client.

Having mentioned so, the next problem I'm facing is uploading the file onto
the Zope Server from the client. Having searched on the net, it appears
that I will have to use CGI's on my server side to temporarily grab the
files contents and place it somewhere. Is there anyway to use DTML without
the involvement of external CGI's?

Also, it seems that if I had to do this on Zope, it will require me to use
Python. Which of course sounds hard.

Then the questions arise regarding CGI's (IF IT REALLY IS REQUIRED): 
1) How on earth do I do this?; 
2) What if there were multiple users uploading files at the same time, then
what happens to the single temporary file which stores the uploaded files'
contents. 
3) If I were to use a /cgi-bin/... how will that relate to where ZOPE is
installed, in other words, would the directory structures get confusing?

I'm not a hopeless programmer but neither am I close to even "quite good".
Learning won't be a problem, but I'll need the answers quick, as I do not
have the time in my hands. Can anyone please help me out?

I've looked in discussion forums and the DTML reference, as I have said I'm
practically a beginner programmer, and was unable to understand even half
of what had been posted.

VCN - The Leader In Corporate Communication Solutions
Visit our website at http://www.vcn.com.my. 
or http://www.vcnlinux.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 )