[Zope] Cookie setting problem

2000-12-18 Thread Kit O'Connell

I'm trying to set up a system like example 9 in the tutorial (new elvis
sightings) where new news stories in a specific folder are flagged 'New!'
if they've been modified or added since the last visit. Early on in the
document, I do the following while going through the folder's stories one
at a time with a :


 ZopeTime(TXPNfront)">
- New!



Unlike example 9, I want these tickets to be permanent, and have a Python
method someone on this list provided so that the expiration of each cookie
is set to 1 week from the date it is set. However, I need to reset the
cookie each visit, so it doesn't new-flag stories the user has already
seen, so I:





later in the document. Then:



I seem to be going about this the wrong way, however, as neither adding
new stories now editting existing ones results in the display of the
'New!' tag.

Any ideas on what I'm doing wrong?

Thanks,
Kit


___
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] Cookies & Expiration

2000-11-03 Thread Kit O'Connell

I'm trying to set up something like is used in the Zope Elvis tutorial,
where it sets a cookie  to show when you last visited the site, so that I
can flag certain articles as 'new'. 

However, I'd like to have this cookie set to expire one week from the date
of the current visit. i.e., if its 12:30 on 11/3 when a surfer visits my
site, I want Zope to set their lastVisited cookie to expire on 12:30 on
11/10.

Any ideas?

Thanks,
Kit


___
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] Restart button corrupted data.fs.index file

2000-10-11 Thread Kit O'Connell

After installing two new Products (ZCounter the first time,and FSCounter
the next time), I hit the Restart button in the Zope Control Panel. Zope
did not come up. I tried a manual stop/start. The start resulted in this
error message:

> Traceback (innermost last):
>   File "/usr/home/txpn/Zope/z2.py", line 554, in ?
> exec "import "+MODULE in {}
>   File "", line 1, in ?
>   File "/usr/home/txpn/Zope/lib/python/Zope/__init__.py", line 110, in ?
> DB=ZODB.FileStorage.FileStorage(Globals.BobobaseName)
>   File "/usr/home/txpn/Zope/lib/python/ZODB/FileStorage.py", line 292,
in
+__init__
> r=self._restore_index()
>   File "/usr/home/txpn/Zope/lib/python/ZODB/FileStorage.py", line 427,
in
+_restore_index
> info=p.load()
> cPickle.UnpicklingError: pickle data was truncated

The data.fs.index file was then corrupt. If I renamed it, and tried
another start, Zope would start fine. I did this twice w/ the same
results.

I'm using Zope 2.2.2. 

Stevea on #zope suggested Jim might be interested in this, and that I
should also send it to a Zope mailing list -- since I'm not on Zope Dev
yet, I'm sending it here. I have a copy of the old index files if anyone
needs to see them.

Cheers,
Kit


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