[Zope] Alternating Row Colors

2001-01-22 Thread Darin Lee

Lee,

Alternating row colors are very easy in Zope because of the variables 'sequence-odd' 
and 'sequence-even' defined by the dtml-in tag.

A super quick example:

table bgcolor="#ff"
dtml-in some_list
 tr dtml-if sequence-oddbgcolor="#EE"/dtml-if
   tdYour cell data here/td
 /tr
/table

You can code variations on this to get what you need.

-Darin




___
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] Sort broken on zope.org site...

2000-12-05 Thread Darin Lee

Zopistas,

Following up on my question yesterday, regarding sorting on the results columns of 
keyword/text based searches, I have noticed that if I do a text search on the zope.org 
site and then try to sort on a column - the same error comes up:

Error type:  TypeError
Error value: loop over non-sequence

I looked through the collector - but couldn't find anything related to this issue. 
Does anyone have any insight on how to fix this?

Thanks,
-Darin Lee


___
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] Passing lists in a get request (ZCatalog Search) Continued...

2000-12-04 Thread Darin Lee

Zopistas, 

Everyone, Thanks for the help so far. My searchable form and indexes are working 
great, except for one small problem. Whenever I pass in a string to search on a 
text-index, along with the sort_on and/or sort_order parameters I keep getting the 
following error:

Error Type: TypeError
Error Value: loop over non-sequence

Traceback (innermost last):
  File C:\PROGRA~1\DEQ_UP~1\lib\python\ZPublisher\Publish.py, line 222, in 
publish_module
  File C:\PROGRA~1\DEQ_UP~1\lib\python\ZPublisher\Publish.py, line 187, in publish
  File C:\PROGRA~1\DEQ_UP~1\lib\python\Zope\__init__.py, line 221, in 
zpublisher_exception_hook
(Object: Traversable)
  File C:\PROGRA~1\DEQ_UP~1\lib\python\ZPublisher\Publish.py, line 171, in publish
  File C:\PROGRA~1\DEQ_UP~1\lib\python\ZPublisher\mapply.py, line 160, in mapply
(Object: search)
  File C:\PROGRA~1\DEQ_UP~1\lib\python\ZPublisher\Publish.py, line 112, in call_object
(Object: search)
  File C:\PROGRA~1\DEQ_UP~1\lib\python\OFS\DTMLMethod.py, line 172, in __call__
(Object: search)
  File C:\PROGRA~1\DEQ_UP~1\lib\python\DocumentTemplate\DT_String.py, line 528, in 
__call__
(Object: search)
  File C:\PROGRA~1\DEQ_UP~1\lib\python\DocumentTemplate\DT_In.py, line 473, in renderwb
(Object: Catalog)
  File C:\PROGRA~1\DEQ_UP~1\lib\python\Products\ZCatalog\ZCatalog.py, line 455, in 
searchResults
(Object: Traversable)
  File C:\PROGRA~1\DEQ_UP~1\lib\python\Products\ZCatalog\Catalog.py, line 602, in 
searchResults
  File C:\PROGRA~1\DEQ_UP~1\lib\python\Products\ZCatalog\Catalog.py, line 555, in 
_indexedSearch
TypeError: (see above)

So, on a hunch - I tried the query directly on the Catalog method itself (not my 
home-brew code). 
I typed in 
"http://myserver/Catalog/report?main_references=Airsort_on=categorysort_order=reverse"


Same problem - I f I try to query against a zCatalog text-index, and also pass the 
sort_on or sort_order parameters - I get the error.

Is this a Zope bug?

I'd appreciate any information anyone can pass on - I'm so close to getting this thing 
working...

Thanks in advance,
-Darin Lee



___
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] Obtaining just the filename for multiple file fields in an addformform

2000-11-03 Thread Darin Lee

Zopistas,

I have a form that has multiple file upload fields in it (5 to be exact). I am 
handling the upload via DTML. Essentially this is a "publication" item that can have 
multiple formats of a file attached (PDF,  Powerpoint, Word, Excel, HTML). I would 
like the user to create the publication item (Zclass object), and then attach whatever 
format files they require to the add form.

The Publication object is folderish and contains which of the files they uploaded. The 
problem comes in with naming the files. I can't figure a way to get the file name from 
the upload field without getting the entire local path on the user's machine.


The following code works, if I manually delete the path out of the field in the 
browser (ie5) and just leave the filename:
dtml-call "manage_addFile(_.getattr(file1, 'filename'), REQUEST['file1'])"  

However, I would rather get the filename, split it on the \'s, and then take a slice 
to get at the actual filename [:1] to pass to manage_addFile. The problem is, I'm not 
sure how to get this to work in DTML.

This is also clumsy, because in this case there are 5 file upload fields on the form - 
the way I am approaching it would require the same code to be repeated 5 different 
times. Is there an array/list of the file fields I could loop through?

Thanks in advance,
-Darin Lee


___
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] Making Product Base Classable

2000-11-03 Thread Darin Lee

Zopistas,

I would like to make a Zclass a baseclass of the Btree folder object. I installed 
Btree but it's not appearing in the list of base classes. Is there a way to get it in 
there? Any help would be greatly appreciated.

Thanks in advance,
-Darin Lee


___
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] Webdav Questions

2000-10-27 Thread Darin Lee

Zopistas,

I am working under Windows NT 4 and connecting to my Zope Server via the webfolders 
icon in "My Computer." I enter the IP address and port of my server, select finish, 
and a list of folders on the Zope server appears. However, I find that I am unable to 
edit, or even copy, any of the Zope objects. I keep getting an error message "An error 
occured while trying to copy some or all of the selected files".

Here are my questions?

1. How is authentication being handled by my Zope server? Am I automatically 
authenticated to the server as the user I am logged on as on the local NT workstation? 
It never prompts me to identify myself via username and password. 

2. Can the world at large view my Zope site via WebDAV? It seems that I can connect to 
the server from multiple machines, even logged on as users who are not in the Zope 
acl_users folder...Is this the default behavior?

I have looked through the How-to's and performed searches on "Zope and WebDAV" in 
Google but haven't turned up much useful information. Can anyone offer any tips, or 
point me in the right direction on this?

Thanks in advance,
Darin Lee



___
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 digest, Vol 1 #1019 - 28 msgs (I will be out of theoffice Monday, October 16th)office Monday, October 16th)

2000-10-17 Thread Darin Lee

I will be out of the office on Monday, October 16. If you require assistance, please 
contact the DEQ helpdesk at 241-7495.






___
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] Away Message (Apologies)

2000-10-17 Thread Darin Lee

Zopistas,

I apologize for the "Away" messages that have been popping up on the list. I needed to 
add a "zope.org" to my auto-response ruleset.
Unfortunately, I was away - and didn't realize this was happening. :-|

Sorry for all the noise,
-Darin Lee





Analyst / Web Administrator
Department of Environmental Quality
Office of Automation Coordination
Phone: (517) 241-5214
Fax: (517) 241-8379


___
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 digest, Vol 1 #1018 - 39 msgs (I will be out of theoffice Monday, October 16th)office Monday, October 16th)

2000-10-16 Thread Darin Lee

I will be out of the office on Monday, October 16. If you require assistance, please 
contact the DEQ helpdesk at 241-7495.






___
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 digest, Vol 1 #1017 - 17 msgs (I will be out of theoffice Monday, October 16th)office Monday, October 16th)

2000-10-15 Thread Darin Lee

I will be out of the office on Monday, October 16. If you require assistance, please 
contact the DEQ helpdesk at 241-7495.






___
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 digest, Vol 1 #1016 - 28 msgs (I will be out of theoffice Monday, October 16th)office Monday, October 16th)

2000-10-14 Thread Darin Lee

I will be out of the office on Monday, October 16. If you require assistance, please 
contact the DEQ helpdesk at 241-7495.






___
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] Microsoft SQL Server Access under Linux?

2000-08-23 Thread Darin Lee

Zopistas,

Is it possible to access an ODBC data source through Zope running under Linux? I have 
perused the literature, and it appears the Zope DA's for ODBC only run under the Win32 
environment.

I would very much like to setup ZAP (for many reasons), but our "organizational 
standard" is MS SQL Server 6.5.

Thanks,
-Darin Lee




Darin M. Lee 
Analyst / Web Administrator
Office of Automation Coordination
Michigan Department of Environmental Quality
Phone: 517.241.5214
[EMAIL PROTECTED]

Darin M. Lee 
Analyst / Web Administrator
Office of Automation Coordination
Michigan Department of Environmental Quality
Phone: 517.241.5214
[EMAIL PROTECTED]


___
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] Broken Links and Orphan Checking

2000-08-11 Thread Darin Lee

Greetings,

Is there any way within Zope to parse HTML to look for broken links and orphaned 
files? The site I am building will have many Zope dynamic componants, but also a good 
share of wrapped static HTML pages maintained by content contributors in 
Frontpage/Dreamweaver. I know that orphaned files and broken links *will* become a 
problem over time.

Does anyone know of a good way to handle this?

Thanks,
-Darin M. Lee



Darin M. Lee 
Analyst / Web Administrator
Office of Automation Coordination
Michigan Department of Environmental Quality
Phone: 517.241.5214
[EMAIL PROTECTED]


___
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] LoginManager and ZPatterns - Sparse Install Docs, Help.

2000-08-05 Thread Darin Lee

Zopistas,

Maybe I'm making this harder than it needs to be.

I want to set up a membership system for the site I am developing with Zope.
I do not want to "restrict" any part of the site - instead I want a user to
login (at their convenience) and then extend the "menu" options based on
their group membership. If a user is not logged in - no problem, they just
won't be able to view the advanced options - they'll still be able to surf
the site (I want to maintain my user list in an external database as well).

What is the best tool in Zope to accomplish this? After searching the site,
I find there are several products - ACL Users, GUF, and LoginManager. Is GUF
deprecated (The intro tends to give me this feeling)? Is LoginManager the
way to go?

It also appears GUF is more tailored toward restrictive authentication (I've
already perused the "Using GUF with an SQL Database" how-to). I want a user
to login (via HTML form/cookie) whenever they like, and get presented with
additional menu options (based on their AUTHENICATED/GROUP status). Not have
them try to access a "restricted" page (or type "manage") and get a basic
authentication login box to get in.

As far as LoginManager itself is concerned, I assume it requires ZPatterns.
However, the Zpatterns install instructions are *very sparse.*  How do I get
the thing set up? Here's verbatim from the ZPatterns docs:

-
After unpacking the ZPatterns product, you will need to build this [c]
extension using the included Setup file in the ZPatterns directory.
-

How do I use the "Setup" file?? With the command "python Setup"? It doesn't
say *how* to use it.

-
Please follow the standard procedures for building a Python module on your
platform. (On Unix-ish systems, this usually consists of copying a
Makefile.pre.in to the directory, then doing a make -f Makefile.pre.in boot
followed by make.
-

What are these standard procedures?? I built Python itself with
"configure|Make|Make install". Where do I get this "Makefile.pre.in" file in
the first place, from my Python src/build directory?? Correct me if I'm
wrong, but there's usually some kind of script file to run that get's things
going, or a "configure" script. I find none of this in the
lib/python/Products/ZPatterns directory after I untarred it.

So, I'm basically stumped. It doesn't appear GUF will do what I need, and I
have failed on multiple attempts to get Loginmanager/ZPatterns installed. If
someone could point me in the right direction on this I sure would
appreciate it.

Thanks much,
-Darin Lee


___
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] PropertySheet Question

2000-07-17 Thread Darin Lee

Hi everyone,

I want to do something very simple: I have a ZClass propertysheet with an integer 
property called "views"
Every time I load the page, I would like to increment this value by one, and write it 
back to the propertysheet.
(Yep, a good old-fashioned access counter)


Sounds easy right?? Well, I can't seem to figure it out. Every time I get a little 
farther with Zope, something "trivial" like this completely knocks me for a loop and 
sends me hunting through piles of howto's for hours! argh...how hard can it be??

Got this from the help page (hopefully on the right track)...
manage_changeProperties(self, REQUEST=None, **kw): 

However, there is no clear example of how to call without a REQUEST object. I want to 
increment views, and then write it back to the property sheet. That's all. Do I need 
to include the asterisks? Do I need to include the keyword "self?" It really doesn't 
say. Everything I have seen on Zope.org, references the Web context with a REQUEST 
object.

Coming from the "Perl-CGI" world I can honestly say, Zope *feels* like it should be 
easier to develop with, but this learning curve is immense! 

Thanks for your patience,
Darin Lee (Zope Newbie Extraordinaire)





Darin M. Lee 
Analyst / Web Administrator
Office of Automation Coordination
Michigan Department of Environmental Quality
Phone: 517.241.5214
[EMAIL PROTECTED]


___
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] DTML Problem (from the newbie hair ripper category)

2000-07-16 Thread Darin Lee

Greetings,

I have created a custom Zclass called "Category." This object is based on
the "objectManager" template. Essentially this object is a container with a
few properties attached; "navigation_name" and "description."

Essentially, the gist of this is to create a navigation menu with a
dtml-in loop that displays all of the Category('s) in a given directory.
However, I want the property "navigation_name" to show up as the hyperlink
text. Does this make sense?

So, if I simply call the dtml-in "objectValues(['Category'])" and then
print the name with dtml-var navigation_name, everything works fine!!

Here is the proverbial rub. If I want to *test* for the presence of
"navigation_name" so I can print "title_or_id" if it's not defined, Zope
simply skips the "navigation_name" property. It's like it always evaluates
to false!

Example for "left navigation" dtml method:

dtml-in "objectValues(['Category'])"
 dtml-if "hasProperty('navigation_name')"
  dtml-var navigation_name
dtml-else
 dtml-var title_or_id
/dtml-if
/dtml-in

Okay, I think to myself "self, maybe acquisition is getting in the way," so
I try:

dtml-in "objectValues(['Category'])"
 dtml-with sequence-item
 dtml-if "hasProperty('navigation_name')"
  dtml-var navigation_name
dtml-else
 dtml-var title_or_id
/dtml-if
/dtml-with
/dtml-in

Doesn't work!

Could this have something to do with the definition of my own Zclass? Do I
have to read into the property sheet specifically? Is there a command for
that?

I took the example from the excellent "Breadcrumb Navigation Trail Howto"
and that works fine, as long as I use a supplied Zope object (like
"folder"). As soon as I use my own ZClasses, this breaks. (I'd like to get
my "navigation_name" into the breadcrumbs as well.

Thanks in advance,
-Darin Lee



___
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] Getting at Zope (Version) Transactions

2000-06-29 Thread Darin Lee

Hail Zopistas, 

I would like to develop a "what's new" method that parses/accesses the undo 
transactions list for certain documents so I can post basic information about when 
they were added, updated etc. in a DTML method for display on my index page. This 
would also come in very handy for a file-archive system I am planning on building. 
(I'm talking about the info that shows up when you hit the "undo" link in Zope 
manager).

Is there a way to get at the transaction data? Is this data stored after a version is 
merged back into the main ZOBD? What would be the best way in Zope to parse this log 
for certain types, and generate a DTML method? Does Zope support Regular Expressions?

I hail from the Perl coders guild (where generating and parsing text/sql is a 
relatively easy, albeit messy, task) - but am new to Python and OOP in general. 
However, now that I have Zoped, I can see there's no turning back.

Any help would be greatly appreciated!
-Darin Lee

Darin M. Lee 
Analyst / Web Administrator
Office of Automation Coordination
Michigan Department of Environmental Quality
Phone: 517.241.5214
[EMAIL PROTECTED]


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