function getArticleContent($id) { $db =& JFactory::getDBO(); $query = 'SELECT a.* ' . ' FROM #__content AS a' . ' WHERE a.id=' . $id; $db->setQuery($query); $rows = $db->loadObjectList(); $row = $rows[0]; $row->introtext = modBowSlideshowHelper::cleanHtml($row->introtext); return $row; }
$id = $params->get('id', ''); $articles = explode(",", $id); for ($l = 0; $l < count($articles); $l++) { $content_id = $articles[$l]; $links[$l] = JRoute::_(ContentHelperRoute::getArticleRoute($content_id)); $contentArticle = modBowSlideshowHelper::getArticleContent($content_id); $titles[$l] = $contentArticle->title; $descriptions[$l] = $contentArticle->introtext; } } else { if ($caption != "") { preg_match_all("#\\{(.*?)}#is", $caption, $captions); $captions = $captions[1]; for ($i = 0; $i < count($captions); $i++) { preg_match_all('#link\\s*=\\s*"([^"]*)"#is', $captions[$i], $link); $links[$i] = $link[1][0]; preg_match_all('#caption\\s*=\\s*"([^"]*)"#is', $captions[$i], $title); $titles[$i] = $title[1][0]; preg_match_all('#description\\s*=\\s*"([^"]*)"#is', $captions[$i], $description); $descriptions[$i] = $description[1][0]; } } } JHTML::_('behavior.mootools'); $path = JPATH_SITE . "/" . $source; if (is_dir($path)) { $list = modBowSlideshowHelper::getList($params); require JModuleHelper::getLayoutPath('mod_bowslideshow'); } else { echo "Folder source doesn't exsits!"; }