forked from htmgarcia/mod_lastworks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mod_lastworks.php
38 lines (32 loc) · 1.41 KB
/
mod_lastworks.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* @autor Valentín García
* @website www.htmgarcia.com
* @package Joomla.Site
* @subpackage mod_lastworks
* @copyright Copyright (C) 2014 Valentín García. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
include_once JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_content' . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'route.php';
// Include the syndicate functions only once
include_once dirname(__FILE__).'/helper.php';
//vars
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'));//suffix
$id_ = $module->id; //Moduleid
$categories = $params->get('vgcategories');
$filter = $params->get('vgfilter', 'any');
$orderingtype = $params->get('vgorderingtype', 'created');
$ordering = $params->get('vgordering', 'ASC' );
$limit = $params->get('vgnumarticles', 6 );
$layout = $params->get('vglayout', 'default');
$jqueryload = $params->get('vgjquery', 0);
//data
if( $categories ){
$articles = modLastWorksHelper::getArticlesLW( $categories, $filter, $orderingtype, $ordering, $limit );
$categories = modLastWorksHelper::getCategoriesLW( $categories );
}else{
$articles = null;
}
require JModuleHelper::getLayoutPath( 'mod_lastworks', $layout );