Полная версия новости в rss на DLE

На днях, мой заказчик (да и вообще друг) попросил сделать так, чтобы известное информационное агенство могло забирать новости у известного информационного агенства Южной Осетии по rss, причем так, чтобы там отображалась не краткая версия новости, а целиком.

В файле /modules/show.short.php необходимо найти строчку:

$row['short_story'] = trim (htmlspecialchars( strip_tags( stripslashes( str_replace( "<br />", " ", $row['short_story'] ) ) ) ) );

После добавить:

$row['full_story'] = trim (htmlspecialchars( strip_tags( stripslashes( str_replace( "<br />", " ", $row['full_story'] ) ) ) ) );

Далее найти:

$row['short_story'] = stripslashes( $row['short_story'] );

после добавить:

$row['full_story'] = stripslashes( $row['full_story'] );

Далее найти:

$tpl->set( '{short-story}', $row['short_story'] );

и добавить после

$tpl->set( '{full-story}', $row['full_story'] );

Далее найти:

$row['short_story'] = preg_replace( "#<img(.+?)>#is", "", $row['short_story'] );

После добавить:

$row['full_story'] = preg_replace( "#<!—TBegin—>(.+?)<!—TEnd—>#is", "", $row['full_story'] );
$row['full_story'] = preg_replace( "#<img(.+?)>#is", "", $row['full_story'] );

Далее найти:

$row['short_story'] = preg_replace( "#<!—dle_audio_begin(.+?)<!—dle_audio_end—>#is", "", $row['short_story'] );

После добавить:

$row['short_full'] = preg_replace( "#<!—dle_video_begin(.+?)<!—dle_video_end—>#is", "", $row['full_story'] );
$row['short_full'] = preg_replace( "#<!—dle_audio_begin(.+?)<!—dle_audio_end—>#is", "", $row['full_story'] );

Далее найти:

$tpl->set( '{short-story}', stripslashes( "<div id=\"news-id-" . $row['id'] . "\" style=\"display:inline;\">" . $row['short_story'] . "</div>" ) );

После добавить:

$tpl->set( '{full-story}', stripslashes( "<div id=\"news-id-" . $row['id'] . "\" style=\"display:inline;\">" . $row['full_story'] . "</div>" ) );

Далее в /engine/rss.php найти все {short-story} и заменить на {full-story}

Таким образом выводится полная версия новости.