Welcome to Squishdot How-To Newbies Squishdot
 post article
 Mailing Lists
 Bug Tracking


Database manipulation
Squishdot Posted by Suzette Ramsden on Monday October 23, 07:44PM, 2000
from the dept.
I have built a new discussion forum site with Squishdot and I am entering previous discussion articles from as far back as two years ago. However, I would like to back-date the older articles to reflect their true posting period.

You cannot manipulate the date posted field anywhere in the Squishdot administration panel. So I am assuming you have to go down to the source file. Can someone tell me if I can open the database file and manipulate the records, or do I have to change my cpu date to achieve this action? If I can open the database file and change field information, what is the name of the database file and where would it be located?

<  |  >


Related Links
  • Articles on Squishdot
  • Also by Suzette Ramsden
  • Contact author
  • The Fine Print: The following comments are owned by whoever posted them.
    ( Reply )

    Re: Database manipulation
    by Darrick Wong on Wednesday October 25, 12:04AM, 2000
    Well...since the weird '972326685' values are simply the number of seconds since 1/1/1970, I don't think it would be that hard to hack together a little bit of Python code to retrieve an article, reinsert the article into the object store with a given timestamp and delete the original. I don't know all of the specifics of Squishdot, but it seems that such a tool would call ? on a particular posting ID, then it would ask the user for the new timestamp, then call Squishdot.setItem(), then delItem() the old posting. I don't know how that would affect the reply trees, however, so you might want to ask Chris Withers first.

    In regards to the Zope data file, it is a file named "Data.fs" in the var/ subdirectory of wherever Zope is installed. It is a binary file of some sort (file(1) on Linux says it's a "virus"...) and, as far as I can tell, cannot and probably should not be edited by hand. According to some (very old) Squishdot roadmaps, v1.0 of Squishdot will store articles in a SQL database instead of Zope's built-in...but we're only on v0.72.

    Actually, I wonder how hard it would be to modify Squishdot to accept the '972326685' dates OR some other format, say '2000-10-23-07-44' to be more user friendly and look like /.?
    [ Reply to this ]
    Re: Database manipulation
    by Chris Withers on Tuesday October 31, 02:47PM, 2000
    Probably the simplest thing for you to do would be to play with you machine's time and Date.

    Darrick's solution might work, but you'd need to know a lot of python and do some playing with some pretty hairy things that might well not want to be played with.


    [ Reply to this ]
    The Fine Print: The following comments are owned by whoever posted them.
    ( Reply )

    Powered by Zope  Squishdot Powered
      "Any system that depends on reliability is unreliable." -- Nogg's Postulate
    All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©1999 Butch Landingin, ©2000-2002 Chris Withers.