How to change document date

basic functions and we:tags
linxy
Junior Member
Beiträge: 15
Registriert: Sa 23. Mai 2009, 21:59

How to change document date

Beitragvon linxy » So 30. Aug 2009, 15:03

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

we:willRockYou
Senior Member
Beiträge: 919
Registriert: Fr 22. Mai 2009, 21:40
Wohnort: Berlin
Kontaktdaten:

Re: How to change document date

Beitragvon we:willRockYou » So 30. Aug 2009, 15:17

Hi linxy,

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

Regards,
Daniel

linxy
Junior Member
Beiträge: 15
Registriert: Sa 23. Mai 2009, 21:59

Re: How to change document date

Beitragvon linxy » So 30. Aug 2009, 15:22

Thank you very much,

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

we:willRockYou
Senior Member
Beiträge: 919
Registriert: Fr 22. Mai 2009, 21:40
Wohnort: Berlin
Kontaktdaten:

Re: How to change document date

Beitragvon we:willRockYou » So 30. Aug 2009, 15:35

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

linxy
Junior Member
Beiträge: 15
Registriert: Sa 23. Mai 2009, 21:59

Re: How to change document date

Beitragvon linxy » So 30. Aug 2009, 15:55

Thank you, I will have a look at it


Zurück zu „Creating templates“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 6 Gäste