-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmod_sp_portfolio.php
executable file
·76 lines (62 loc) · 2.62 KB
/
mod_sp_portfolio.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
/*
# SP Portfolio - Simple Portfolio module by JoomShaper.com
# -------------------------------------------------------------
# Author JoomShaper http://www.joomshaper.com
# Copyright (C) 2010 - 2018 JoomShaper.com. All Rights Reserved.
# @license - GNU/GPL V2 or Later
# Websites: http://www.joomshaper.com
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
$doc = JFactory::getDocument();
$rtl = JFactory::getLanguage()->get('rtl');
$direction = JRequest::getVar('direction');
if(($direction=='rtl') || ($rtl)) {
$rtl = true;
} else {
$rtl = false;
}
//Basic
$moduleclass_sfx = $params->get('moduleclass_sfx');
$moduleName = basename(dirname(__FILE__));
$uniqid = $module->id;
$catid = $params->get('catid', 'root');
$module_layout = $params->get('module_layout');
$column = $params->get('column', 2);
$show_title = $params->get('show_title');
$linked_title = $params->get('linked_title');
$show_category = $params->get('show_category');
$show_url = $params->get('show_url');
$show_introtext = $params->get('show_introtext');
$show_readmore = $params->get('show_readmore');
$ajax_loader = $params->get('ajax_loader');
$show_filter = $params->get('show_filter');
$show_title = $params->get('show_title');
$start = 0;
$limit = $params->get('limit', 6);
$ajaxlimit = $params->get('ajaxlimit', 3);
$ajaxRequest = false;
$load_jquery = $params->get('load_jquery');
if( JRequest::getInt('moduleID', 0) > 0 ){
$start = JRequest::getInt('start');
$limit = JRequest::getInt('limit', $ajaxlimit);
$ajaxRequest = true;
}
require_once (dirname(__FILE__).'/helper.php');
$items = modSPPortfolioJHelper::getList($params, $start, $limit);
$total = modSPPortfolioJHelper::getTotal($params);
$doc->addStylesheet(JURI::base(true) . '/modules/'.$moduleName.'/assets/css/' . $moduleName .'_'.$module_layout.'.css');
if($rtl)
$doc->addStylesheet(JURI::base(true) . '/modules/'.$moduleName.'/assets/css/slimbox2-rtl.css');
else
$doc->addStylesheet(JURI::base(true) . '/modules/'.$moduleName.'/assets/css/slimbox2.css');
if( JVERSION >= 3 )
{
JHtml::_('jquery.framework');
} else {
if ($load_jquery) $doc->addScript(JURI::base(true) . '/modules/'.$moduleName.'/assets/js/jquery.min.js');
}
if ($show_filter) $doc->addScript(JURI::base(true) . '/modules/'.$moduleName.'/assets/js/jquery.isotope.min.js');
$doc->addScript(JURI::base(true) . '/modules/'.$moduleName.'/assets/js/slimbox2.js');
require(JModuleHelper::getLayoutPath($moduleName, $module_layout));