<div id="h-scroll-ranking"> <ul id="ul-ranking" style="width: <?php echo count($this->texts) * 320 + 150; ?> px"> <?php $i = 1; ?> <?php foreach ($this->texts as $text) { ?> <?php echo ideary::generateTextRankingHTML($text, $i); ?> <?php $i++; ?> <?php } ?> </ul> </div> <?php } else { ?> <div id="h-scroll-ranking"> <ul id="ul-ranking">
public function get_more_texts_ranking() { // Get the application object. $app = JFactory::getApplication(); $texts_array_html = array(); $period = JRequest::getString('period'); $userId = JRequest::getString('userId'); $offset = JRequest::getInt('offset'); $texts = ideary::getTextsRanking($userId, $period, $offset); $index = 1; foreach ($texts as $text) { $texts_array_html[] = ideary::removeNewLinesFromString(ideary::generateTextRankingHTML($text, $index + $offset)); $index++; } echo json_encode(array('texts_array_html' => $texts_array_html)); $app->close(); }