Die Änderungen:
In der
\contenido\templates\standard\template.con_edit_form.html
Nach dieser Zeile
Code: Alles auswählen
<tr><td valign="top"><input type="checkbox" id="time_online_move" name="time_online_move" value="1" {ONLINEAFTERMOVECHECKED}></td>
<td colspan="2" class="text_medium"><label for="time_online_move">i18n("Make online after move")</label></td></tr>
das einfügen:
Code: Alles auswählen
<tr><td valign="top"><input type="checkbox" id="time_start_move" name="time_start_move" value="1" {STARTAFTERMOVECHECKED}></td>
<td colspan="2" class="text_medium"><label for="free_use_01">i18n("Zum Startartikel machen")</label></td></tr>
In der
\contenido\includes\functions.con.php
Nach
Code: Alles auswählen
global $time_online_move; // Used to indicate if the moved article should be online
das einfügen
nach
Code: Alles auswählen
$onlineaftermove = ($time_online_move == '1') ? '1' : '0';
das einfügen
Code: Alles auswählen
$startaftermove = ($time_start_move == '1')? '1': '0';
wenn nicht schon vorhanden!!!
ändern in
Code: Alles auswählen
'".Contenido_Security::escapeDB($onlineaftermove, $db)."')";
ändern in
Code: Alles auswählen
'".Contenido_Security::escapeDB($onlineaftermove, $db)."',
'".Contenido_Security::escapeDB($startaftermove, $db)."')";
Nach
Code: Alles auswählen
global $time_online_move; // Used to indicate if the moved article should be online
das einfügen
Nach
Code: Alles auswählen
$onlineaftermove = ($time_online_move == '1') ? '1' : '0';
das einfügen
Code: Alles auswählen
$startaftermove = ($time_start_move == '1' )? '1': '0';
Code: Alles auswählen
time_online_move = '".Contenido_Security::toInteger($onlineaftermove)."'";
ändern in
Code: Alles auswählen
time_online_move = '".Contenido_Security::toInteger($onlineaftermove)."',
free_use_01 = '".Contenido_Security::toInteger($startaftermove)."'";
Das
Code: Alles auswählen
/* Set all articles which are in between of our start/endtime to online */
$sql = "SELECT idartlang FROM ".$cfg["tab"]["art_lang"]." WHERE NOW() > datestart AND (NOW() < dateend OR dateend = '0000-00-00 00:00:00') AND " .
"online = 0 AND timemgmt = 1";
$db->query($sql);
while ($db->next_record()) {
// modified 2007-11-14: Set publish date if article goes online
$sql = "UPDATE " . $cfg["tab"]["art_lang"] . " SET online = 1, published = datestart " .
"WHERE idartlang = " . Contenido_Security::toInteger($db->f("idartlang"));
$db2->query($sql);
}
mit dem ersetzen
Code: Alles auswählen
/* Set all articles which are in between of our start/endtime to online */
#$sql = "SELECT idartlang FROM ".$cfg["tab"]["art_lang"]." WHERE NOW() > datestart AND (NOW() < dateend OR dateend = '0000-00-00 00:00:00') AND " .
# "online = 0 AND timemgmt = 1";
$sql = "SELECT idartlang, idart, idlang, free_use_01 FROM ".$cfg["tab"]["art_lang"]." WHERE NOW() > datestart AND NOW() < dateend AND online = 0 AND timemgmt = 1";
$db->query($sql);
while ($db->next_record()) {
// modified 2007-11-14: Set publish date if article goes online
$sql = "UPDATE " . $cfg["tab"]["art_lang"] . " SET online = 1, published = datestart " .
"WHERE idartlang = " . Contenido_Security::toInteger($db->f("idartlang"));
$db2->query($sql);
if ( $db->f('free_use_01')=='1' )
{
$sql = "SELECT DISTINCT idcat FROM {$cfg['tab']['cat_art']} WHERE idart=".$db->f('idart');
$db2->query($sql);
if ( $db2->next_record() )
{
$startidcat = $db2->f("idcat");
$startidartlang = $db->f("idartlang");
$lang = $db->f("idlang");
if ($cfg["is_start_compatible"] == true)
{
$sql = "UPDATE ".$cfg["tab"]["cat_art"]." SET is_start ='0' WHERE idcat = $startidcat";
$db2->query($sql);
$sql = "UPDATE ".$cfg["tab"]["cat_art"]." SET is_start='1' WHERE idcat = $startidcat AND idart =".$db->f("idart")." LIMIT 1";
$db2->query($sql);
}
else
{
$sql = "UPDATE ".$cfg["tab"]["cat_lang"]." SET startidartlang='$startidartlang' WHERE idcat='$startidcat' AND idlang='".$db->f("idlang")."'";
$db2->query($sql);
}
// deactivate timemanagement if article is a start-article
$sql = "UPDATE ".$cfg["tab"]["art_lang"]." SET timemgmt='0' WHERE idart='".$db->f("idart")."' AND idlang='".$db->f("idlang")."'";
$db2->query($sql);
} // $db2->next_record()
}
}
Das
Code: Alles auswählen
/* Perform after-end updates */
$sql = "SELECT idartlang, idart, time_move_cat, time_target_cat, time_online_move FROM ".$cfg["tab"]["art_lang"]." WHERE NOW() > dateend AND dateend != '0000-00-00 00:00:00' AND timemgmt = 1";
mit dem ersetzen
Code: Alles auswählen
/* Perform after-end updates */
#$sql = "SELECT idartlang, idart, time_move_cat, time_target_cat, time_online_move FROM ".$cfg["tab"]["art_lang"]." WHERE NOW() > dateend AND dateend != '0000-00-00 00:00:00' AND timemgmt = 1";
$sql = "SELECT idartlang, idart, time_move_cat, time_target_cat, time_online_move, free_use_01 FROM ".$cfg["tab"]["art_lang"]." WHERE NOW() > dateend AND dateend != '0000-00-00 00:00:00' AND timemgmt = 1";
In der
\contenido\includes\include.con_edit_form.php
ändern in
Code: Alles auswählen
$tmp_movetocat = $db->f("time_move_cat");
$tmp_startaftermove = $db->f("free_use_01");
ergänzen mit
Code: Alles auswählen
if ($tmp_startaftermove == "1")
{
$tpl->set('s', 'STARTAFTERMOVECHECKED', 'checked'.$allow_usetimemgmt);
} else {
$tpl->set('s', 'STARTAFTERMOVECHECKED', ''.$allow_usetimemgmt);
}
/* Summary */
OHNE GEWÄHR! Da ich mitbekommen habe, dass das Programm DiffDaff auch Fehler macht!
MfG Steffen