Seite 1 von 1

How to change document date

Verfasst: So 30. Aug 2009, 15:03
von linxy
Hello,

is it possible to change date when was the document created or modified? I sort a listview by date and want to be able to set the date manually.

Thank you

Re: How to change document date

Verfasst: So 30. Aug 2009, 15:17
von we:willRockYou
Hi linxy,

you may change the fields in the database. That should be tblFile. You could do this with a hook.

Regards,
Daniel

Re: How to change document date

Verfasst: So 30. Aug 2009, 15:22
von linxy
Thank you very much,

but unfortunatelly, I'm not able to read documentation in German. Is there also any English version?

Re: How to change document date

Verfasst: So 30. Aug 2009, 15:35
von we:willRockYou
Same here: I think it should be released in near future. A team is working on documentation for webEdition 6 in german and english language.

I'll try to help you with this:

The fields "Published", "CreationDate" and "ModDate" of table "tblFile" should be interesting for you.

Hooks are functions that will be fired whenever a document/object/class will be saved/published/deleted/unpublished. Now have a look at these filenames: http://documentation.webedition.de/de/w ... ateien.php

weCustomHook_save.inc.php and weCustomHook_publish.inc.php should be interesting for you. Have a look at these files and you'll find a function of the same name. The first parameter of this function is the $we_doc of the document/object. This is an object or array (not sure atm) which contains any data of the document/object. Somewhere inside this array/object you'll find the ID of your current document. With this information you'll be able to make changes to to entry in the database.

Oh, and you'll need to activate hooks in your settings. I think it should be in the tab "System".

Regards,
Daniel

Re: How to change document date

Verfasst: So 30. Aug 2009, 15:55
von linxy
Thank you, I will have a look at it