SPIP Versions

Hello everyone,
I have a question. We are trying to retrieve data using SPIP Versions but we are facing some struggles: Our goal is to check if in a specific data range if there was something in a a certain field at the beginning of the date range.

For example:
We have a text field and in the initial version of this article (ID Version 1) this field is filled with a content let’s say « apple ». This version might have changes in some other fields in the following months, and maybe even the content field changes at some point to « tomato ».
Then on the first of August the content field accidentally gets overwritten and is now empty. The same thing happened with many other articles.
Now I would like to get the content back from right before it got accidentally overwritten back in this case « tomato » .

I have the two tables « spip_versions » and « spip_versions_fragments » but so far I haven’t figured out how I can connect the changes in a range of data with a specific field.

Thanks a lot to anyone who might have an idea how to do this!
Warm regards,
MomoM

Hello

I am not sure I understand: is it the article’s usual text field?
When you click on « Display list of versions », can’t you just use the button « Restore version No xx »?

Hi,

Thanks for the reply and your questions! Yeah, I can see the different versions there.

What I would like to do now is to create a boucle or php functions to see the changes of a content for a custom field during a specific range of date.

Thank you!
MomoM

My best bet is to look at the boucles in the plugin revision mainly in:
/plugins-dist/revisions/prive/squelettes/contenu/revision.html
/plugins-dist/revisions/prive/objets/contenu/revision.html

And customise them to accomodate your object.