if ($xartis->cfg->get('EXPANDEBLOG')) { $andwhere = ($this->rev2241) ? " AND b.published='1'" : ''; $query = "SELECT b.id, b.title, b.blogid, b.dateadded, b.seotitle, s.seotitle AS seoblog FROM #__eblog b" ."\n LEFT JOIN #__eblog_settings s ON s.blogid=b.blogid" ."\n WHERE s.published='1'".$andwhere ."\n AND ((b.language IS NULL) OR (b.language LIKE '%".$xartis->maplang."%'))" ."\n ORDER BY b.dateadded DESC"; if ($xartis->cfg->get('MAXITEMS')) { $database->setQuery($query, '#__', $xartis->cfg->get('MAXITEMS'), 0); } else { $database->setQuery($query); } $rows = $database->loadObjectList(); if ($rows) { $tnow = time() + ($mainframe->getCfg('offset') * 3600); foreach($rows as $row) { $node = new stdClass; $node->name = $row->title; $node->link = 'index.php?option=com_eblog&task=show&blogid='.$row->blogid.'&id='.$row->id; $node->seolink = 'eblog/'.$row->seoblog.'/'.$row->seotitle.'.html'; $node->id = $_Itemid; $node->modified = $this->_toTimestamp($row->dateadded); $diff = $tnow - $node->modified; if ($diff < 86400) { $node->changefreq = 'daily'; $node->priority = '0.8'; } elseif ($diff < 2419200) { $node->changefreq = 'weekly'; $node->priority = '0.7'; } else { $node->changefreq = 'monthly'; $node->priority = '0.6'; } $node->pid = $row->blogid; $node->icon = 'document'; $list['link'.$row->id] = $node; unset($node, $diff); } } }