S
S
Sergey2015-10-01 10:25:16
MODX
Sergey, 2015-10-01 10:25:16

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

2 answer(s)
S
Sergey, 2015-10-04
@Derzaiii

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);
?>

And in the content where you need a fake date, insert:
если REVO 

Если EVO
[!auto-date!]]

IMPORTANT:
1) Allow_url_fopen must be enabled on the hosting
2) The snippet must be launched as NOT sized

R
Ruslan, 2015-10-01
@ruslan_aleev

If you manage your sites through one admin panel, then you could do duplicate materials through "Symbolic links", i.e. rule in one place, but change everywhere.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question