News programmate cambiano titolo 
Se avete un articolo programmato e provate ad editarlo noterete che il titolo
verrą sostituito dalla parola News e non sarą possibile corregerlo.
Soluzione
Edita il file modulesNewsadminindex.php
Cerca la funzione function autoEdit e sostituisci tutte le voci title
con subject.
Ecco le righe interessate:
| Codice |
function autoEdit($anid) {
...
...
// riga 372
list($catid, $aid, $title, $time, $hometext, $bodytext, $topic, $informant,
$notes, $ihome, $alanguage, $acomm) = $db->sql_fetchrow($result);
...
...
// riga 407
$title = stripslashes($title);
...
...
// riga 416
themepreview($title, $hometext, $bodytext);
...
...
// riga 419
."<input type="text" name="title" size="50" value="$title"><br><br>"
...
...
} |
che quindi diventano:
| Codice |
function autoEdit($anid) {
...
...
list($catid, $aid, $subject, $time, $hometext, $bodytext, $topic, $informant,
$notes, $ihome, $alanguage, $acomm) = $db->sql_fetchrow($result);
...
...
$subject = stripslashes($subject);
...
...
themepreview($subject, $hometext, $bodytext);
...
...
."<input type="text" name="subject" size="50" value="$subject"><br><br>"
...
...
} |
Ora cerca la funzione function autoSaveEdit e fai le stesse
sostituzioni. Queste sono le righe da sostituire:
| Codice |
// riga 555
function autoSaveEdit($anid, $year, $day, $month, $hour, $min, $title,
$hometext, $bodytext, $topic, $notes, $catid, $ihome, $alanguage, $acomm,
$tags) {
...
...
// riga 588
$title = stripslashes(FixQuotes($title));
...
...
// riga 592
$result = $db->sql_query("update ".$prefix."_autonews set catid='$catid',
title='$title', time='$date', hometext='$hometext', bodytext='$bodytext',
topic='$topic', notes='$notes', ihome='$ihome', alanguage='$alanguage',
acomm='$acomm', tags='$tags' where anid='$anid'");
...
...
} |
che diventano
| Codice |
function autoSaveEdit($anid, $year, $day, $month, $hour,
$min, $subject, $hometext, $bodytext, $topic, $notes, $catid, $ihome,
$alanguage, $acomm, $tags) {
...
...
$subject = stripslashes(FixQuotes($subject));
...
...
$result = $db->sql_query("update ".$prefix."_autonews set catid='$catid',
title='$subject', time='$date', hometext='$hometext', bodytext='$bodytext',
topic='$topic', notes='$notes', ihome='$ihome', alanguage='$alanguage',
acomm='$acomm', tags='$tags' where anid='$anid'");
...
...
} |
In coda al file fare quest' ultima modifica.
Sostituire questo codice:
| Codice |
...
...
case "autoSaveEdit":
autoSaveEdit($anid, $year, $day, $month, $hour, $min, $title, $hometext,
$bodytext, $topic, $notes, $catid, $ihome, $alanguage, $acomm, $tags);
break;
...
... |
con questo:
| Codice |
...
...
case "autoSaveEdit":
autoSaveEdit($anid, $year, $day, $month, $hour, $min, $subject, $hometext,
$bodytext, $topic, $notes, $catid, $ihome, $alanguage, $acomm, $tags);
break;
...
... |
|