3 * Copyright 2016, Franck Villaume - TrivialDev
4 * This file is a part of Fusionforge.
6 * Fusionforge is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * Fusionforge is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with Fusionforge. If not, see <http://www.gnu.org/licenses/>.
20 require_once 'Widget.class.php';
22 class Widget_HomeLatestNews extends Widget {
23 function __construct() {
24 parent::__construct('homelatestnews');
27 return _('Latest News');
29 function getContent() {
30 $content = news_show_latest(GROUP_IS_NEWS, 5, true, false, false, 5);
34 function getDescription() {
35 return _('Display last 5 validated news for frontpage.');