Answer the question
In order to leave comments, you need to log in
How can I organize changes to multiple sites under MODX at the same time?
Good time of the day!
There are several directory sites on MODX. Periodically, promotions are held on the sites and the date of the promotion is the same on all sites. And the question arose: is it possible to somehow automate the date change on all sites at once? Something like a script that would make changes to the database in the desired cell, well, or something like that. Thanks in advance for any hint!
Answer the question
In order to leave comments, you need to log in
Found a solution:
On one of the sites we create a file - date.txt - with the desired value - for example, October 10th.
On sites where you need to supply this value, create a snippet - auto-date- with the following content:
<?php
$f=fopen("адрес_сайта_где_лежит_файл/date.txt","r") or die("Ошибка");
$data=fgets($f);
echo $data;//Первая строка в файле
fclose($f);
?>
если REVO
Если EVO
[!auto-date!]]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question