getPath( 'front_html', 'com_content') ); require_once($mosConfig_absolute_path.'/components/com_content/content.class.php'); global $my, $mosConfig_shownoauth, $mosConfig_offset, $acl; // Disable edit ability icon $access = new stdClass(); $access->canEdit = 0; $access->canEditOwn = 0; $access->canPublish = 0; $now = date( 'Y-m-d H:i:s', time()+$mosConfig_offset*60*60 ); $catid = intval( $params->get( 'catid' ) ); $style = $params->get( 'style' ); $image = $params->get( 'image' ); $readmore = $params->get( 'readmore' ); $items = intval( $params->get( 'items' ) ); $moduleclass_sfx = $params->get( 'moduleclass_sfx' ); $params->set( 'intro_only', 1 ); $params->set( 'hide_author', 1 ); $params->set( 'hide_createdate', 0 ); $params->set( 'hide_modifydate', 1 ); $params->set( 'introtext', $image); if ( $items ) { $limit = "LIMIT ". $items; } else { $limit = ""; } $noauth = !$mainframe->getCfg( 'shownoauth' ); // query to determine article count $query = "SELECT a.id" ."\n FROM #__content AS a" ."\n INNER JOIN #__categories AS b ON b.id = a.catid" ."\n WHERE a.state = 1" . ( $noauth ? "\n AND a.access <= '". $my->gid ."' AND b.access <= '". $my->gid ."'" : '' ) ."\n AND (a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '". $now ."') " ."\n AND (a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '". $now ."')" ."\n AND catid='". $catid ."' " ."\n ORDER BY a.ordering" ."\n ". $limit ; $database->setQuery( $query ); $rows = $database->loadResultArray(); $row = new mosContent( $database ); if (!count($rows)) { return; } $numrows = count( $rows ); switch ($style) { case 'horiz': echo "\n
| '; HTML_content::show( $row, $params, $access, 0, 'com_content' ); echo " | \n"; } echo "