for ($i = 0; $i < count($matches[0]); $i++) { $enclosureName = substr($matches[0][$i], 13, strpos($matches[0][$i], ' -->') - 13); $item = $this->getEnclosureInfo($enclosureName); if ($item['enclosure_name'] != '' && $item['enclosure_size'] != '' && $item['enclosure_uri'] != '') { $item['enclosure_size'] = $this->toMegaByte($item['enclosure_size']); if (stristr($item['enclosure_name'], '.mov')) { $item['enclosure_class'] = 'mov'; $item['enclosure_mime'] = 'video/quicktime'; } elseif (stristr($item['enclosure_name'], '.m4')) { $item['enclosure_class'] = 'm4'; $item['enclosure_mime'] = 'audio/mpeg'; } elseif (stristr($item['enclosure_name'], '.wav')) { $item['enclosure_class'] = 'wav'; $item['enclosure_mime'] = 'audio/mpeg'; } else { $item['enclosure_class'] = 'mp3'; $item['enclosure_mime'] = 'audio/mpeg'; } $templateFile = $pathToIndex . self::RSS_THEME_PATH . 'podcast.html'; $enclosureView = new Loggix_View($templateFile); $enclosureView->assign('item', $item); $enclosureText = $enclosureView->render(); $comment = preg_replace('/' . $matches[0][$i] . '/', $enclosureText, $comment); } } return $comment; } } $rss = new Loggix_Module_Rss(); $module['LM']['RSS']['linkrel'] = $rss->getRssLinkRel(); $module['LM']['RSS']['link'] = $rss->getRss();
/** * Set Entry Items * * @param array $item * @uses getCategoryArray * @uses getCategoryIdArray * @uses smiley * @return array $item */ public function setEntryItems($item) { global $pathToIndex, $lang, $module; $item['id'] = intval($item['id']); $item['date'] = $item['date']; $item['title'] = htmlspecialchars($item['title']); $item['comment'] = $item['comment']; $item['tag'] = ''; if (isset($_GET['id'])) { foreach ($this->getTagArray() as $row) { $item['tag'] .= in_array($row[0], $this->getTagIdArray()) ? '<a href="' . $pathToIndex . '/index.php?t=' . $row[0] . '&ex=1">' . htmlspecialchars($row[1]) . '</a> ' : ''; } } // Apply Smiley $item['comment'] = $this->setSmiley($item['comment']); $item['comment'] = str_replace('href="./data', 'href="' . $pathToIndex . '/data', $item['comment']); $item['comment'] = str_replace('src="./data', 'src="' . $pathToIndex . '/data', $item['comment']); $item['comment'] = str_replace('src="./theme/images', 'src="' . $pathToIndex . '/theme/images', $item['comment']); // Apply plugin filter $item['comment'] = $this->plugin->applyFilters('entry-content', $item['comment']); // Visitor's comments if (class_exists('Loggix_Module_Comment')) { $aComment = new Loggix_Module_Comment(); $item['comments'] = $aComment->getCommentStatus($item); $module['LM']['comment']['list'] = $aComment->getCommentList($item); } // Trackback if (class_exists('Loggix_Module_Trackback')) { $aTrackback = new Loggix_Module_Trackback(); $item['trackbacks'] = $aTrackback->getTrackbackStatus($item); $module['LM']['trackback']['uri'] = $aTrackback->getTrackbackUri($item); $module['LM']['trackback']['list'] = $aTrackback->getTrackbackList($item); } // RSS if (class_exists('Loggix_Module_Rss')) { $aRss = new Loggix_Module_Rss(); $item['comment'] = $aRss->toEnclosure($item['comment']); } return $item; }
<?php /** * RSS-2.0 generator for Loggix * * @package RSS * @since 5.7.22 * @version 9.1.4 */ /** * Include RSS Module class */ $pathToIndex = '../..'; require_once $pathToIndex . '/lib/Loggix/Module/Rss.php'; $theRss = new Loggix_Module_Rss(); $config = $theRss->getConfigArray(); if (empty($_GET['k'])) { $_GET['k'] = ''; } // Keyword if (empty($_GET['p'])) { $_GET['p'] = '0'; } // Start page of the result if (empty($_GET['pn'])) { $_GET['pn'] = '1'; } // Page number if (empty($_GET['ex'])) { $_GET['ex'] = '0'; }