// Get Last-Midified $res = $theRss->db->query($checkLatestSql); $row = $res->fetch(); $xml['last_modified'] = date($theRss->getRssTimeFormat('2.0'), strtotime($row[$params['date']])) . $theRss->getTimeZone(); $stmt = $theRss->db->prepare($sql); if ($stmt->execute() == true) { $items = array(); $item = array(); while ($row = $stmt->fetch()) { // Link $targetId = isset($id) && stristr($id, 'comments_') ? $row['refer_id'] . '#c' . $row['id'] : $row['id']; $link = $theRss->getRootUri() . $dir . 'index.php?id=' . $targetId; // Comment to Content Module $row[$params['comment']] = str_replace('./data/resources/', $theRss->getRootUri() . 'data/resources/', $row[$params['comment']]); // Apply Smiley $row[$params['comment']] = $theRss->setSmiley($row[$params['comment']]); $row[$params['comment']] = str_replace('/index.php?id=' . $targetId . '../../theme/', '/theme/', $row[$params['comment']]); // Apply plugin filter $row[$params['comment']] = $theRss->plugin->applyFilters('entry-content', $row[$params['comment']]); // Excerpt if (isset($row['excerpt'])) { $description = $row['excerpt'] != '' ? htmlspecialchars($row['excerpt']) : htmlspecialchars(mb_substr(strip_tags($row[$params['comment']]), 0, 120, 'UTF-8')) . '...'; } else { $description = htmlspecialchars(mb_substr(strip_tags($row[$params['comment']]), 0, 120, 'UTF-8')) . '...'; } // Enclosure $item['enclosure'] = stristr(isset($id), 'dl_') ? '<enclosure url="' . $theRss->getRootUri() . $dir . 'dl.php?id=' . $row['id'] . '" length="' . $row['file_size'] . '" type="' . $row['file_type'] . '" />' . "\n" : $theRss->getEnclosure($row[$params['comment']]); $item['description'] = $theRss->setBBCode($description); $item['content_encoded'] = $row[$params['comment']]; $item['link'] = $link; $item['title'] = htmlspecialchars($row[$params['title']]);