$smarty->assign('psRelacionados', $psRelacionados); } } } else { //si no hay ningún post seleccinado mostramos la home //obtenemos la pagina $psPage = 'home'; //obtenemos el titulo $psTitle = $psTitle . ' - ' . $psCore->settings['slogan']; //cargamos las clases necesarias include PS_CLASS . 'c.tops.php'; include PS_CLASS . 'c.portal.php'; include PS_CLASS . 'c.fotos.php'; $psTops =& psTops::getInstance(); $psPortal =& psPortal::getInstance(); $psFotos =& psFotos::getInstance(); //obtenemos los últimos post $psLastPosts = $psPosts->getLastPosts($categoria); $smarty->assign('psPosts', $psLastPosts['data']); $smarty->assign('psPages', $psLastPosts['pages']); //obtenemos los post fijos if ($psLastPosts['pages']['current'] == 1) { $psStickys = $psPosts->getLastPosts($categoria, true); $smarty->assign('psPostSticky', $psStickys['data']); } //obtenemos los últimos comentarios $smarty->assign('psComentarios', $psPosts->getLastComentarios()); //obtenemos el top de post $smarty->assign('psTopPosts', $psTops->getHomeTopPosts()); //obtenemos el top de usuarios $smarty->assign('psTopUsers', $psTops->getHomeTopUsers());
/** * @funcionalidad obtenemos las fotos * @return [type] devolvemos un array con las últimas fotos */ function getFotos() { //obtenemos la clase fotos include 'c.fotos.php'; $psFotos =& psFotos::getInstance(); return $psFotos->getLastFotos(); }