view.html.php
1.93 KB
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
77
78
79
80
81
82
<?php
/* ======================================================
# Monthly Archive - Joomla! Component v4.3.3 (PRO version)
# -------------------------------------------------------
# For Joomla! 3.x
# Author: Yiannis Christodoulou (yiannis@web357.eu)
# Copyright (©) 2009-2018 Web357. All rights reserved.
# License: GNU/GPLv3, http://www.gnu.org/licenses/gpl-3.0.html
# Website: https://www.web357.eu/
# Demo: http://demo.web357.eu/?item=monthlyarchive
# Support: support@web357.eu
# Last modified: 09 Feb 2018, 13:55:18
========================================================= */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import Joomla view library
jimport('joomla.application.component.view');
class MonthlyarchiveViewOverv extends JViewLegacy
{
function display($tpl = null)
{
$form = $this->get('Form');
// Check for model errors.
if ($errors = $this->get('Errors')) {
JError::raiseError(500, implode('<br />', $errors));
return false;
}
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode("\n", $errors));
return false;
}
// Joomla version
JLoader::import( "joomla.version" );
$version = new JVersion();
if (!version_compare( $version->RELEASE, "2.5", "<=")) :
// j3X
// Include helper submenu
MonthlyarchiveHelper::addSubmenu('overv');
// Show sidebar
$this->sidebar = JHtmlSidebar::render();
else:
// j25x
// Show sidebar
$this->sidebar = "";
endif;
// mapping variables
$this->form = $form;
// Set the toolbar
$this->addToolBar();
// Display the template
parent::display($tpl);
}
protected function addToolBar()
{
// Build title
$title = JText::_('Monthly Archive').': '.JText::_('Overview');
// Set document title
JFactory::getDocument()->setTitle($title);
// Set ToolBar title
JToolbarHelper::title($title, 'monthlyarchive icon-web357');
}
}